Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BAPI_SALESORDER_CHANGE

Former Member
0 Likes
1,180

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

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

4 REPLIES 4
Read only

Former Member
0 Likes
931

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.

Read only

Former Member
0 Likes
931

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

Read only

Former Member
0 Likes
931

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

Read only

0 Likes
931

Hello Ankesh,

In addition to ,add leading zeros to sales order number and then pass it to BAPI.

Thanks