Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

BAPI_SALESORDER_CHANGE to change quantity

Hi,

I use the BAPI BAPI_SALESORDER_CHANGE to change the quantity of items. BAPI returns these messages :

ORDER_HEADER_IN has been processed successfully

ITEM_IN has been processed successfully

Returns 61665291 has been saved

After that I call the BAPI_TRANSACTION_COMMIT to commit process.

But sales order doesn't change. I can see in tcode va03.

What can I do to change correctly?

Source Code :

order_header_inxc-updateflag = 'U'.

order_items_in-itm_number = itab-posnr.

order_items_inx-itm_number = itab-posnr.

order_items_inx-target_qty = 'X'.

order_items_in-target_qty = my_value.

order_items_inx-updateflag = 'U'.

APPEND order_items_in.

APPEND order_items_inx.

CALL FUNCTION 'BAPI_SALESORDER_CHANGE'

EXPORTING

salesdocument = my_vbeln

order_header_in = order_header_inc

order_header_inx = order_header_inxc

TABLES

order_item_in = order_items_in

order_item_inx = order_items_inx

return = return3.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question