Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI_SALESORDER_CHANGE performance

Former Member
0 Kudos

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

2 REPLIES 2

ravi_lanjewar
Contributor
0 Kudos

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.

0 Kudos

Thank you.

This helped to some extent.

-Regards,

Dev