Skip to Content
0
Feb 18, 2015 at 01:20 PM

Changing Sales Material Text using Bapi bapi_salesorder_change

479 Views

Hi Experts,

I have to change Sales orders Material sales text. I tried with BAPI_SALESORDER_CHANGE by passing data to ORDER_TEXT. Buts its not updating.

I passed the data in the following way.

ls_order_item_in-itm_number = ls_salesorder-posnr.

APPEND ls_order_item_in TO lt_order_item_in.

ls_order_item_inx-itm_number = ls_salesorder-posnr.

ls_order_item_inx-updateflag = 'U'.

APPEND ls_order_item_inx TO lt_order_item_inx.

ls_order_text-doc_number = ls_salesorder-vbeln.

ls_order_text-itm_number = ls_salesorder-posnr.

ls_order_text-text_id = 001.

ls_order_text-langu = E.

ls_order_text-text_line = ls_salesorder-smtext.

ls_order_text-function = 005.

APPEND ls_order_text TO lt_order_text.

CALL FUNCTION 'BAPI_SALESORDER_CHANGE'

EXPORTING

salesdocument = lv_vbeln

order_header_inx = ls_order_header_inx

TABLES

return = lt_return

order_item_in = lt_order_item_in

order_item_inx = lt_order_item_inx

schedule_lines = lt_schedule_lines

schedule_linesx = lt_schedule_linesx

order_text = lt_order_text.


Am I missing something? or is there any other way to achieve this?


Thanks in Advance.


Regards,

S Sivaganesh.