09-20-2010 2:40 PM
Hi Experts,
I have suspended an order, there is a back ground job which use to reinstate it automatically but now it not changing its status to reinstate i have checked that inside BAPI_SALESORDER_CHANGE , i am getting error message adline status can not be changed and sales document was not changed.
Please help me on this.
Thanks,
Trupti
09-20-2010 2:44 PM
Hi,
Check the Lock statsu of the sales order.
and check whether are you passing the Item detials .
above all check the Bapi return messages for correct reason.
Prabhudas
09-20-2010 2:45 PM
What number and class message the system returns?
I cannot understand the error type you get 😕
09-21-2010 11:16 AM
after 'BAPI_SALESORDER_CHANGE u have to call 'BAPI_TRANSACTION_COMMIT
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
salesdocument = p_vbeln
order_header_in = s_order_header_in
order_header_inx = s_order_header_inx
behave_when_error = 'P'
TABLES
return = it_return
order_item_in = i_order_item_in
order_item_inx = i_order_item_inx
schedule_lines = i_sched
schedule_linesx = i_schedx.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
LOOP AT it_return.
WRITE / it_return-message.
ENDLOOP.