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

problem using BAPI_SALESORDER_CHANGE

Former Member
0 Likes
541

Hi Experts,

I am inserting the Item in Sales order by using BAPI_SALESORDER_CHANGE.

suppose there are 2 line item in sales i.e. 10 and 20 .

now i want to insert line item i.e. 30.

now the problem is that when i am trying to insert line item 30 it is getting inserted.

but i want to update the quantity for line item 30.

how to update the quantity of line item 30?

anybody have the solution?

Thanks in advance.

Abhishek

3 REPLIES 3
Read only

Former Member
0 Likes
505

hi,

i mthank this is use full to you to update quantity

passed it in SCHEDULE_LINES table

data : T_SCHED TYPE BAPISCHDL OCCURS 0 WITH HEADER LINE,

T_SCHEDX TYPE BAPISCHDLX OCCURS 0 WITH HEADER LINE.

SCHEDULE_LINES-REQ_QTY = '30'.

SCHEDULE_LINESx-REQ_QTY = 'x'.

regards

Read only

Former Member
0 Likes
505

Hi,

Fill tables parameter ORDER_ITEM_IN and ORDER_ITEM_INX for the line item you want to update the quantity for the field would be TARGET_QTY and TARGET_QU

and in the ORDER_ITEM_INX have ITM_NUMBER = '30 the update indicator equal to 'X' and TARGET_QTY = 'X'and TARGET_QU eq 'X' and that should do it.

Regards,

Himanshu

Read only

Former Member
0 Likes
505

Hi,

You need to use 'U'flag for updation and 'X' flag for insertion. in ordersX and scheduleX structures.

To update quantity , You need to pass the quantity in the ORDERS and SCHEDULE structures as both are mandatory to update qty.

TC

Sajimon Chandran