07-22-2014 7:52 AM
Hi,
I need to update Reason for Rejection(VBAP-AGBRU) and Line item text for sale order. I am using BAPI_SALESORDER_CHANGE for it but it is not updating.
I pass all the required information to the BAPI,
- Sales Order Number : 70000782
- Update Flag in HEADER_INX (U)
- Item Number and Reason for Rejection in ITEM_IN : 000010/ZW
- Item Number, Update Flag, Reason for Rejection (X) in ITEM_INX
This is ORDER_TEXT Values which I am passing:-
DOC_NUMBER 70000782
ITM_NUMBER 000010
TEXT_ID VBBP
LANGU EN
LANGU_ISO
FORMAT_COL
TEXT_LINE THIS IS TEST UPDATE OF DATA
FUNCTION 009
It is showing below lines in return table but it is not updating values.
S V4 233 ORDER_HEADER_IN has been processed successfully
S V4 233 ITEM_IN has been processed successfully
S V1 311 IR Debit Memo 70000782 has been saved
What would be the reason why it is not updating sale order, Please suggest
Rgds
Ankesh
07-22-2014 8:04 AM
Hi Ankesh,
After calling the BAPI 'BAPI_SALESORDER_CHANGE ', you also need to call FM 'BAPI_TRANSACTION_COMMIT' if the return table does not have any error messages.
Regards,
Apeksha.
07-22-2014 8:26 AM
Hi Ankesh,
from the values of return table it is clear the record is updating but check once that you are populating
ORDER_ITEM_IN table correctly specially field REASON_REJ..
might be this field is not populated check in debugger..
Regards,
Shashikanth
07-22-2014 8:37 AM
Hi
In the BAPI, check in the structure BAPISDITM, the field value for REASON_REJ is filled.
Also in the BAPI, check in the structure BAPISDITMX, the field value for REASON_REJ is 'X'.
Also use the BAPI_TRANSACTION_COMMIT function module at the end.
Regards
Shaik
07-22-2014 9:30 AM