BAPI_SALESORDER_CHANGE does not make changes

I am call BAPI BAPI_SALESORDER_CHANGE to update sales order and need to changed the edatu at item level, the return of the BAPI is that the sales order is changed but no changes are made. i am committing after calling the BAPI BAPI BAPI_SALESORDER_CHANGE but changes are not impacting in the database.

 ls_header_x-updateflag = 'U'. assign ls_schdl to . assign ls_schdlx to . assign ls_items to . assign ls_itemsx to . -itm_number = '000010'. -itm_number = '000010'. -sched_line = '0001'. -sched_line = '0001'. -itm_number = '000010'. -itm_number = '000010'. -itm_number = '000010'. -dlv_date = '20181111'. append to lt_schdl. -dlv_date = 'U'. -updateflag = 'U'. append to lt_schdlx. -updateflag = 'U'. append to lt_items. append to lt_itemsx. *update the data call function 'BAPI_SALESORDER_CHANGE' exporting salesdocument = p_vbeln order_header_inx = ls_header_x tables order_item_in = lt_items order_item_inx = lt_itemsx return = lt_return schedule_lines = lt_schdl schedule_linesx = lt_schdlx. read table lt_return assigning with key type = 'E'. if sy-subrc ne 0. call function 'BAPI_TRANSACTION_COMMIT' exporting wait = 'X' importing return = ls_return. endif. 
10.6k 13 13 gold badges 56 56 silver badges 97 97 bronze badges asked Nov 3, 2018 at 3:55 Umar Abdullah Umar Abdullah 1,290 2 2 gold badges 21 21 silver badges 40 40 bronze badges

1 Answer 1

You need to fill order_item_inx and schedule_linesx item fields with 'X'. Other values ignored.

answered Nov 3, 2018 at 12:51 5,723 1 1 gold badge 23 23 silver badges 31 31 bronze badges

Related

Hot Network Questions

Subscribe to RSS

Question feed

To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

Site design / logo © 2024 Stack Exchange Inc; user contributions licensed under CC BY-SA . rev 2024.9.4.14806