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

Former Member
0 Kudos

Hi all,

I have a sales order, consisting of 3 items with their ordered quantity material number, item number,...

My requirement is that i must be able to delete a desired item from that sales order, via BAPI_salesorder_change.

If i set 'D' in the header update flag, it deletes the whole order, which is undesired.

Please anyone can advice how to proceed with this?

Im thinking only to set update flag to 'D' in schedule_INX

4 REPLIES 4

Former Member
0 Kudos

hai nitu

why r u keeping delete flag at header

instead do it at item level

m.a

nirajgadre
Active Contributor
0 Kudos

Hi Nitu,

If you want to delete the line item from sales order then it is not require to keep the update flag as 'D' at the header level.

Instead of that you keep the item details in BAPISDITM and update flag in table ORDER_ITEM_INX along with the correct item number so that it will delete that line item from sales order.

Former Member
0 Kudos

Hi Nitu,

If u want to delete a line item from as ales order then u need to go for line item deletion , not header deletion.

U can use the bapi table

ORDER_ITEM_IN

and bapi update table

ORDER_ITEM_INX

to delete a line item from a sales order.

If u have any queries, pls feel free to ask,.

Rajendra

0 Kudos

Hi all, thanks for your precious advices.

I was putting the update flag in schedule lines, which was wrong.

Instead as u all said, I should be updating the ITEMS IN Internal table.

Now it works perfectly fine.