on ‎2020 Apr 14 9:08 AM
If data is less then function module execute easily but data is arounds more than 80,000 then it take more time.Please provide the solution.
Request clarification before answering.
You are seriously trying to use CRM_ORDER_READ for 80'000 one-order objects at once? I am not surprised that this will take a long time. What 'performance' are you hoping to realistically achieve (seconds, minutes, hours)?
Are you already making use of most import parameters to limit the scope of the FM? What do you actually need to read from those orders?
I simple limitation would be this one, to restrict to read-mode as well as the objects you actually only need from the one-orders.
INCLUDE CRM_DIRECT. " includes e.g. CRM_OBJECT_NAMES_CON as well CRM_MODE_CON
DATA lt_requested_objects TYPE crmt_object_name_tab.
" ....
" only request necessary objects from one-order objects, e.g. ORDERADM_H, CUSTOMER_H
" but there are also others, see Include CRM_OBJECT_NAMES_CON
INSERT gc_object_name-orderadm_h INTO TABLE lt_requested_objects.
INSERT gc_object_name-customer_h INTO TABLE lt_requested_objects.
CALL FUNCTION 'CRM_ORDER_READ'
EXPORTING
it_header_guid = lt_header_guid
it_requested_objects = lt_requested_objects
iv_mode = gc_mode-display
IMPORTING
et_orderadm_h = lt_orderadm_h
et_customer_h = lt_customer_h
EXCEPTIONS
OTHERS = 1.Otherwise, you might have to read from database tables directly and join accordingly, to truely get the best performance possible.
And you will have to be a lot more specific on what you are currently doing and actually trying to achieve, in order for the community to help you out.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please find this..
IF IT_GUID_H[] IS NOT INITIAL.
IS_REQ = 'ACTIVITY_H'.
INSERT IS_REQ INTO TABLE IT_REQ.
IS_REQ = 'ORDERADM_H'.
INSERT IS_REQ INTO TABLE IT_REQ.
IS_REQ = 'PARTNER'.
INSERT IS_REQ INTO TABLE IT_REQ.
IS_REQ = 'STATUS'.
INSERT IS_REQ INTO TABLE IT_REQ.
IS_REQ = 'SERVICE_OS'.
INSERT IS_REQ INTO TABLE IT_REQ.
IS_REQ = 'DOC_FLOW'.
INSERT IS_REQ INTO TABLE IT_REQ.
CALL FUNCTION 'CRM_ORDER_READ'
EXPORTING
IT_HEADER_GUID = IT_GUID_H
IT_REQUESTED_OBJECTS = IT_REQ
IMPORTING
ET_ORDERADM_H = ET_ORDERADM_H
ET_PARTNER = ET_PARTNER
ET_SERVICE_OS = ET_SERVICE_OS
ET_STATUS = ET_STATUS
ET_ACTIVITY_H = ET_ACTIVITY
ET_DOC_FLOW = ET_DOC_FLOW.
Hi Sharma Ji.
Enable the ST12 trace, refer the SAP note 2436955 with help of ABAPer check the expensive sql statement and take the necessary action.
Regards
SS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.