CRM Data Extraction Optimization To BI
CRM Data Extraction Optimization To BI
CRM Datasource extraction issues, data not extracting, extraction is very slow.
In my current project we were extracting data from CRM System for data sources like 0CRM_SRV_PROCESS_I,
0CRM_SRV_PROCESS_H etc. As far as my knowledge concerned we dont have setup tables in CRM System. So its more of
a Finance Type extraction. Everything was working fine in Development system but when we transported our data sources
to QA system it was not fetching any data to BI System that was one problem and the other issue was that once our
datasources started extracting data the extraction was extremely slow.
Since we need not to fill setup tables we have to extract data directly, so do I started my loads for Datasources
0CRM_SRV_PROCESS_I, 0CRM_SRV_PROCESS_H but I end up with having 0 records in QA System where in all things work
fine in Development environment, I tried full load as well, checked data in base tables, re-transported the entire
datasources again n again but its all waste as the output was still zero. So there was something more to that than
just checking data in tables or re-transporting the datasources in QA which stopping me to extract data in BI System. Now
this is where my analysis started..... SDN, Google and Friends I approached everyone who has done some work in CRM. But
it takes lot of time, energy & client escalations as well to reach to exact problem and this is how we gain experience.
Now I am sharing my experience on what checks we have to made in such cases where standard datasources does not
extract data at all without enhancement's and the cases where data extractions are very slow after enhancement.
I. STANDARD DATASOURCE NOT EXTRACTING DATA FROM CRM SYSTEM IN QA:
There are tables in CRM System which stores data about the datasource:
SMOXHEAD- Control Table: BW Adapter 002, SMOXHEAD_S - Shadow Table for Table smoxhead,
These are the tables which stores the Datasource type, Delta status, Selection field function module, mapping function
module etc.
In our case this table was somehow not having the entry for the datasource 0CRM_SRV_PROCESS_I & H in our QA system.
This was the very basic reason why we were not able to extract the data in QA system but same was possible in DEV. Now
this might seems to be very simple reason but it took lot of time n effort to know that :)
The other things we can check for is that datasource should be checked in TCODE BWA5.
Now lets move on the issue
II. DATA Extraction is very slow after enhancement:
Below are points which one needs to keep in mind while writing enhancement code in CRM for the custom fields in
datasource:
i) Avoid select statements in loop,
ii) Minimize the use of nested select statements & use for all entries statement instead
iii) During calling of the function module CRM_ORDER_READ(based on requirement) add the below mentioned code to clear
the buffer:
CALL FUNCTION 'CRM_ORDER_READ'
IMPORTING =
EXPORTING = .
*******START OF BUFFER CLEAR********
CALL FUNCTION 'CRM_ORDER_INITIALIZE'
EXPORTING
iv_initialize_whole_buffer = 'X'
EXCEPTIONS
error_occurred = 1
OTHERS = 2.
CALL FUNCTION 'PRC_INIT'.
CALL FUNCTION 'BREL_INIT_BUFFER'.
CALL FUNCTION 'REL_INIT_BUFFER'.
*******END OF BUFFER CLEAR********
iv)Since in CRM System everything be it Service order, confirmation etc is business type driven i.e. everything is
differentiated on the basis of business type, for e.g. business type 'BUS2000116' defines a service order. In TCODE BWA1
please check that you have the relevant business type selected in tab 'Selection Conditions', we may have some additional
business type's also mentioned of which data may not be required (purely requirement based) so we can remove those
business type which improves the data extraction process a lot as it has to only extract particular business type data now.
v) There are couples of notes also which deals with these issues, which can be implemented in the system to make the
extraction faster:
1. SAP Note 1330249 - Performance 0CRM_SRV_PROCESS_H
2. SAP Note 508008 - Extractor; GUID selection: changing from LDB to rep. framew.
3. SAP Note 520846 - 1O-Extractor: Ranges for the partner fields does not work
4. SAP Note 521299 - 1O extractor: Extraction from CRM to BW is too slow
5. SAP Note 535306 - One order selection module: selection after CREATED_AT
6. SAP Note 564334 - One-Order extraction: Orgnztnl objects as selection fields
7. SAP Note 572695 - BW, initialization of internal table during initial upload
8. SAP Note 590557 - BW, termination with initial load of business transactions
9. SAP Note 593659 - BW, termination of initial area load SALES, conditions
10.SAP Note 595416 - One-Order: selection by CREATED_AT for single value
11.SAP Note 634880 - BW extraction: Missing records during selectn by CREATED_AT
12.SAP Note 639072 - CRM/BW parallel proc. for extracting business transactions
13.SAP Note 653645 - Composite SAP Note performance
14.SAP Note 1122666 - RFW:Parameters maintanence in smofparsfa for performance
vi) The performance could be slow because of the wrong control parameters used for packaging in InfoPackage while
extracting data from CRM System:
Change the package size for the data extraction.
Infopackage (scheduler) > Menu 'Scheduler' > 'DataS. default data transfer' > maintain the value as 1500 or 1000 or 500
(This value is variable)
These are solutions which I did in my project in order to achieve my stated problems and now they are successfully running.
I hope it helps a lot of peoples who are also dealing with the similar problems.