如何在SAP WebClient UI裡使用jChartFX
In my blog CRM One Order statistic tool I develop a small tool to print out the statistics of number of assigned line item for all business documents in the system.
The tool has the following three sections of output in SAPGUI.
This section means there are 1 order which has 5000 line items, 1 order has 2000 items, 1 order has 1998 items …
Accordingly, this section below means Sales Organization 50000732 has been used in 38746 Business document, Organization 50001194 used in 1346 Business document.
And this is for Service Organization unit.
In this blog, I will introduce how to display the output in browser instead, using a chart library jChartFX.
You can refer to final achievement below:
Here below is detail step to build this tool. Step1. Create a new BSP application in SE80, and create a new page index.htm.
Paste the following source code to index.htm:
<%@page language="abap" %><!DOCTYPE html><html><head>
<script src="jchartlib/js/jquery1.7.1.js" >
</script>
<script src="jchartlib/chartUtil.js" >
</script>
<script src="jchartlib/js/jchartfx.system.js">
</script>
<script src="jchartlib/js/jchartfx.coreVector.js">
</script>
<script src="jchartlib/js/jchartfx.coreVector3D.js">
</script>
<script src="jchartlib/js/jchartfx.advanced.js">
</script>
<script src="jchartlib/js/jchartfx.gauge.js">
</script>
<script>
function initialize() {
initChart("divChart1", "Order's item number overview",
<%= zcl_crm_order_statistic=>get_item_json( ) %>);
initChart("divChart2", "Sales Org usage overview",
<%= zcl_crm_order_statistic=>get_sales_json( ) %>);
initChart("divChart3", "Service Order usage overview",
<%= zcl_crm_order_statistic=>get_service_json( ) %>);
}
</script>
<link rel="stylesheet" type="text/css" href="jchartlib/styles/Attributes/jchartfx.attributes.aurora.css" />
<link rel="stylesheet" type="text/css" href="jchartlib/styles/Palettes/jchartfx.palette.aurora.css" />
<style type="text/css">
.jchartfx .AxisY_Text {
fill: #FEFEFE;
}
.jchartfx .AxisX_Text {
fill: #FEFEFE;
}
.jchartfx .Title {
fill: #FEFEFE;
}
.jchartfx .LegendItem {
fill: #FEFEFE;
}
</style>}</head><body class="jchartfx_body">
<div class="jchartfx_container">
<div id="divChart1" style="width:90%;height:270px;display:inline-block;position:absolute;left:0px;top:0px"></div>
<div id="divChart2" style="width:90%;height:270px;display:inline-block;position:absolute;left:0px;top:280px"></div>
<div id="divChart3" style="width:90%;height:270px;display:inline-block;position:absolute;left:0px;top:570px"></div>
<script language="javascript">
$(document).ready(function ($) {
initialize();
});
</script>
</div></div></body></html>
Step2. Switch to MIME Repository in SE80, create a new folder for this BSP application:
And import the following js and css file into the BSP application.
Step3. Add the following one line in OnCreate event handler of this BSP application.
The tool basically scan the CRM business document header table CRMD_ORDERADM_H and item table CRMD_ORDERADM_I and HR table hrp1000 to calculate the result.
要獲取更多Jerry的原創文章,請關注公眾號"汪子熙":
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24475491/viewspace-2715055/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 如何在SAP WebClient UI裡使用HANA Live reportWebclientUI
- 如何在SAP WebClient UI裡建立柱狀圖(bar chart)WebclientUI
- 如何在CRM WebClient UI裡使用HANA Live ReportWebclientUI
- 如何在 WebClient UI 裡建立 Value HelpWebclientUI
- 使用note++開發SAP WebClient UIWebclientUI
- 在SAP WebClient UI裡顯示倒數計時的UIWebclientUI
- 在SAP WebClient UI裡使用AJAX進行非同步資料讀取WebclientUI非同步
- 在SAP CRM WebClient UI裡開啟ABAP Webdynpro頁面WebclientUI
- 使用Selenium自動化測試SAP CRM WebClient UIWebclientUI
- 使用SAP Transaction Launcher將ABAP Webdynpro嵌入到WebClient UI中WebclientUI
- SAP WebClient UI的白屏問題分析WebclientUI
- SAP CRM WebClient UI和Fiori UI混搭並存WebclientUI
- SAP WebClient UI overview頁面裡assignment block的可見性分析技巧WebclientUIViewBloC
- SAP WebClient UI的會話重啟原理WebclientUI會話
- SAP CRM WebClient UI和Hybris backoffice UI開發的相同點WebclientUI
- SAP WebClient UI One Hit Navigation的實現方法WebclientUINavigation
- Jerry答網友提問:SAP CRM WebClient UI裡的EXT,STRUCT等含義WebclientUIStruct
- SAP CRM WebClient UI上將text area裡的文字清空的後臺處理WebclientUI
- 如何在SAP UI5應用裡新增使用攝像頭拍照的功能UI
- 在SAP CRM WebClient UI中用javascript觸發ABAP eventWebclientUIJavaScript
- SAP CRM WebClient UI異常的持久化機制WebclientUI持久化
- 將SAP CRM WebClient UI的表格匯出成PDFWebclientUI
- 自己實現一個SAP WebClient UI Repository Information SystemWebclientUIORM
- 如何將SAP WebClient UI的表格匯出成PDFWebclientUI
- SAP WebClient UI component模型後設資料解析工具WebclientUI模型
- 如何自行分析SAP WebClient UI開發環境裡丟擲的錯誤訊息根源WebclientUI開發環境
- SAP WebClient UI配置決定(configuration)的邏輯介紹WebclientUI
- SAP CRM WebClient UI的Delta處理機制介紹WebclientUI
- SAP WebClient UI component context node class單元測試方法WebclientUIContext
- SAP CRM WebClient UI和ABAP Webdynpro頁面的互相跳轉WebclientUI
- SAP CRM WebClient UI html 格式的 Text 顯示邏輯WebclientUIHTML
- SAP CRM WebClient UI 支援的一些 url 引數WebclientUI
- 如何在SAP Kyma的控制檯裡擴充套件新的UI套件UI
- 如何在 SAP 電商雲 Spartacus UI 裡新建一個頁面UI
- 如何在SAP Fiori應用裡使用React componentReact
- SAP UI5 應用開發教程之四十五 - 如何在 SAP UI5 應用裡使用 jQuery 和原生的 DOM APIUIjQueryAPI
- SAP CRM WebClient UI和Hybris的controller是如何被呼叫的WebclientUIController
- SAP CRM WebClient UI的on_new_focus應該怎麼理解WebclientUI