天天看點

SAP CRM Interactive Report(互動式報表)裡和服務訂單相關的一些字段

Recently I am working on CRM Interactive Report and I was quite confusing about the difference between these two key figures below:

SAP CRM Interactive Report(互動式報表)裡和服務訂單相關的一些字段

This report is created based on Reporting Area: ServiceOrder

The technical name for “Gross Value of Service Orders”: /CRMBW/SVO_GV

“Gross Value Header”: /CRMBW/GV_SVOH

SAP CRM Interactive Report(互動式報表)裡和服務訂單相關的一些字段

From this customizing I know the cache table to display report key figure values for Service Order is: CRMD_DHR_HSRVORD

SAP CRM Interactive Report(互動式報表)裡和服務訂單相關的一些字段

However in this table there is only one field GROSS_VALUE_H, and how can this single field serve two key figures mentioned in the title of this blog?

SAP CRM Interactive Report(互動式報表)裡和服務訂單相關的一些字段

Via debugging I have figured out how the key figure values are retrieved from database table and rendered in WebUI.

It consists of two steps:

(1) the guid of orders which fulfills the specified search criteria in WebUI is fetched from CRMD_ORDER_INDEX via reporting framework API CRM_BSP_OIC_1O_SEARCH_FROM_RF.

I write a simple report to simulate the call sent from Reporting UI:

SAP CRM Interactive Report(互動式報表)裡和服務訂單相關的一些字段
SAP CRM Interactive Report(互動式報表)裡和服務訂單相關的一些字段

Execute the report, in my system for posting date 2015.01.27, there are five Service Orders & Service Confirmation:

SAP CRM Interactive Report(互動式報表)裡和服務訂單相關的一些字段

(2) Buffer table CRMD_DHR_HSRVORD is then read with the guid fetched from step1, and key figure calculation is done in BAdI implementation class CL_CRM_RFQ1OCALC_STATUS_COMMON.

In line 638 the logic is clear: the gross value of Service Order key figure is only accumulated when the given order is a Service Order ( object_type = ‘BUS2000116’ ).

SAP CRM Interactive Report(互動式報表)裡和服務訂單相關的一些字段

This BAdI is called within OLTP extractor belonging to Service Order Reporting Area: /CRMBW/OLTP_EXTRACT_SRV_ORDER

SAP CRM Interactive Report(互動式報表)裡和服務訂單相關的一些字段

As a result I can now continue with my simulation report to calculate these two key figures with the same logic:

SAP CRM Interactive Report(互動式報表)裡和服務訂單相關的一些字段

Now execute the report, and you can get the same calculated value as you see in WebUI for posting date 2015.01.27:

SAP CRM Interactive Report(互動式報表)裡和服務訂單相關的一些字段

Alternatively I have written another report which calls the Reporing framework API from a higher level. The two steps mentioned above are embedded within API RSOA_DSOURCE_READ_REMOTE_DATA.

SAP CRM Interactive Report(互動式報表)裡和服務訂單相關的一些字段
SAP CRM Interactive Report(互動式報表)裡和服務訂單相關的一些字段

Of source the response stored in l_t_container has compressed format, which could be parsed by the corresponding program specified in variable l_program.

SAP CRM Interactive Report(互動式報表)裡和服務訂單相關的一些字段

The name of this program could be read from function module RSAR_ISOURCE_MD_T_GET. See the following report as an example:

SAP CRM Interactive Report(互動式報表)裡和服務訂單相關的一些字段

The program name to parse the reporting response into ABAP format is stored in variable l_s_ts:

SAP CRM Interactive Report(互動式報表)裡和服務訂單相關的一些字段

繼續閱讀