Application Development 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: 

BAPI_SALESORDER_CHANGE

0 Kudos

Hello experts,

Can I use BAPI "BAPI_SALESORDER_CHANGE" to create an new item line on a sales order?

I read on the FM Documentation that it's possible, but there is a check into the code of the BAPI that only allows Update and Delete mode.

If the answer is No, what BAPI can I use?

Many thanks!!

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Edgar,

yes you can use that BAPI to create a new line item. You enter the details of the material in the table ORDER_ITEM_IN and set the item number of the new line item in the ITM_NUMBER and the update flag as "I" (for insert) in ORDER_ITEM_INX.

The "U" (for update) needs to set in the ORDER_HEADER_INX so that the entire document gets updated.

In addition, make sure you have a look at the SAP Note 1079521.

T00th

3 REPLIES 3

Former Member
0 Kudos

use UPDATEFLAG = 'I' in the item table and this will add a new item

Regards

Carl

Former Member
0 Kudos

Hi,

Ya sure you can use the BAPI 'BAPI_SALESORDER_CHANGE' to add an item in the existing sales order. For that you have to identify the last created item number and + 10 with that.

Use the update mode as 'U'

Thanks,

Karthik.

Former Member
0 Kudos

Hi Edgar,

yes you can use that BAPI to create a new line item. You enter the details of the material in the table ORDER_ITEM_IN and set the item number of the new line item in the ITM_NUMBER and the update flag as "I" (for insert) in ORDER_ITEM_INX.

The "U" (for update) needs to set in the ORDER_HEADER_INX so that the entire document gets updated.

In addition, make sure you have a look at the SAP Note 1079521.

T00th