on 2008 Sep 23 11:21 PM
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.
Hi
t_order_item_inx is not appended
Pls append and give a try
Regards
MD
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Was missing a parameter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your help. 😃
I also realized that I forgot to add the SO Item # into the T_ORDER_ITEM_INX-ITM_NUMBER fields.
But now it works.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
109 | |
8 | |
8 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.