03-25-2011 8:01 AM
Hi friends,
I am using BAPI_SALESORDER_CHANGE and BAPI_TRANSACTION_COMMIT to remove delivery block from an Order.
Not sure why it is taking some time to do the task. When I test the BAPI for a single Order in SE37, runtime analysis shows 71.8% for Database. Even if i use FM SD_SALESDOCUMENT_CHANGE with same data the runtime analysis shows 76.9% for Database.
Can any one please advice .
v_bapisdh1-dlv_block = ' '.
v_bapisdh1x-updateflag = 'U'.
v_bapisdh1x-dlv_block = 'X'.
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
salesdocument = <lf_data>-vbeln
order_header_in = v_bapisdh1
order_header_inx = v_bapisdh1x
TABLES
return = it_bapiret2.
Thanks,
Dev
03-25-2011 12:40 PM
Hi,
You can try following solution,
Before calling BAPI used SET UPDATE TASK LOCAL statment.
SET UPDATE TASK LOCAL.
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
salesdocument = <lf_data>-vbeln
order_header_in = v_bapisdh1
order_header_inx = v_bapisdh1x
TABLES
return = it_bapiret2.
If your trace showing the database taking longer time, So you have to check the Notes or write SAP for same.
03-28-2011 8:17 PM
Thank you.
This helped to some extent.
-Regards,
Dev