如何在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 …

如何在SAP WebClient UI里使用jChartFX_第1张图片

Accordingly, this section below means Sales Organization 50000732 has been used in 38746 Business document, Organization 50001194 used in 1346 Business document.

如何在SAP WebClient UI里使用jChartFX_第2张图片

And this is for Service Organization unit.

如何在SAP WebClient UI里使用jChartFX_第3张图片

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:

如何在SAP WebClient UI里使用jChartFX_第4张图片

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" %>



    
    
    
    
    
    
    
     
         
    

     
}


  

Step2. Switch to MIME Repository in SE80, create a new folder for this BSP application:

如何在SAP WebClient UI里使用jChartFX_第5张图片

And import the following js and css file into the BSP application.

如何在SAP WebClient UI里使用jChartFX_第6张图片

Step3. Add the following one line in OnCreate event handler of this BSP application.

如何在SAP WebClient UI里使用jChartFX_第7张图片

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的原创文章,请关注公众号"汪子熙":

你可能感兴趣的:(sap,saprfc,crm,abap,erp)