Skip to Content

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

Remove Reason For Rejection From Sales Order Using BAPI_SALESORDER_CHANGE

Hi

I have a sales order and would like to remove the rejection reason.

I am trying to use BAPI_SALESORDER_CHANGE with the following code:

(0000xxxxxxx is my material #. i just removed the actual #).

*********************************************************

MOVE: '0000050106' TO SALESDOCUMENT.

MOVE: 'U' TO T_HEADER_INX-UPDATEFLAG.

MOVE: 30 to t_order_item_in-ITM_NUMBER,

' ' to t_order_item_in-REASON_REJ,

'0000000000xxxxxxxx' to t_order_item_in-material.

APPEND t_order_item_in.

MOVE: 'U' TO t_order_item_inx-updateflag.

MOVE: 'X' to t_order_item_inx-REASON_REJ,

'X' TO t_order_item_inx-material.

CALL FUNCTION 'BAPI_SALESORDER_CHANGE'

EXPORTING

salesdocument = SALESDOCUMENT

order_header_inx = T_HEADER_INX

tables

RETURN = T_RETURN

ORDER_ITEM_IN = T_ORDER_ITEM_IN

ORDER_ITEM_INX = T_ORDER_ITEM_INX

.

.

WAIT UP TO 5 SECONDS.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

WAIT = 'X'

IMPORTING

RETURN = t_return

.

WAIT UP TO 5 SECONDS.

*********************************************************

can anybody help?

the BAPI returns success messages saying the item was processed successfully but the reason code is still there.

However, if i pass in any other reason code like 02 or 06, it works!.

thanks.

Tags:
Former Member

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question