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,

BAPI_SALESORDER_CHANGE is the bapi which you can use to add new line items in the existing sales order. You have got a flag field in the line item structure which tells you whether that line item has to be added or deleted or changed.

Your BAPI is perfectly fine, you just need to check out the fields in the line item structure to achieve your requirement.

Thanks,

Mahesh.

4 REPLIES 4

Former Member
0 Kudos

Hi,

Yes you can use the BAPI_SALESORDER_CHANGE to create a new Item.

Use the update flag as 'I' = add

regards,

Advait.

Former Member
0 Kudos

hai,

use f.m BAPI_SALESORDER_CREATEFROMDAT2 to create sales order.

shan.

Former Member
0 Kudos

Hi,

BAPI_SALESORDER_CHANGE is the bapi which you can use to add new line items in the existing sales order. You have got a flag field in the line item structure which tells you whether that line item has to be added or deleted or changed.

Your BAPI is perfectly fine, you just need to check out the fields in the line item structure to achieve your requirement.

Thanks,

Mahesh.

Former Member
0 Kudos

hi,

function module BAPI_SALESORDER_CHANGE is perfectly fine to change ur data. if not use the f.m BAPI_SALESORDER_CREATEFROMDAT2

and create with the same name. the bapi will over write the first one. it wont throw any errors.

regards,

rajeev