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

Schedule lines creation with BAPI_SALESORDER_CHANGE

Former Member
0 Likes
3,116

Dear All,

1. I'm trying to create a new Schedule Lines to an already existing Scheduling Agreement.

2. For this, I'm using the BAPI --> BAPI_SALESORDER_CHANGE.

3. This BAPI returns me a message saying that the Schedule line processed successfully.

4. When I check the VBEP Table with the Scheduling Agreement number, I'm able to see the newly created schedule line.

5. But, when I see the Transaction VA33, I'm not able to see the schedule lines.

I checked in SDN and OSS notes. I found 1647069 which says to pass the line number and Item number which I'm already doing it.

Can any one help me out ?

Regards,

Deepu.K

6 REPLIES 6
Read only

Former Member
0 Likes
1,784

I verified in my system that the below should work. Here, I am inserting a new schedule 0002 for item 10 with qty 1 and another date.

Of course, you should ensure that there is sufficient quantity that is not yet confirmed by existing schedule lines.

BAPI_SALESORDER_CHANGE

SALESDOCUMENT = '0011827125'
 
ORDER_HEADER_INX
           UPDATEFLAG = 'U'
 
ORDER_ITEM_IN
           ITM_NUMBER = '000010'
 
ORDER_ITEM_INX
           ITM_NUMBER = '000010'
           UPDATEFLAG = 'U'
 
SCHEDULE_LINES
           ITM_NUMBER = '000010'
           SCHED_LINE = '0002'
           REQ_DATE   = '20120104'
           REQ_QTY = '1'
 
SCHEDULE_LINESX
           ITM_NUMBER = '000010'
           SCHED_LINE = '0002'
           UPDATEFLAG = 'I'
           REQ_DATE   = 'X'
           REQ_QTY = 'X'.

Read only

0 Likes
1,783

Hello Vishnu and Joseph,

Thanks for the input.

I tried exactly whatever was mentioned in your earlier post.

But still it is not working.

Any customization issue ?

Regards,

Deepu.K

Read only

Former Member
0 Likes
1,783

Hi Deepu,

Please check following points:

do not forget to call BAPI_TRANSACTION_COMMIT after the BAPI call for sales order change.

check with POSNR(ITM_NUMBER) passed to schedule and schedulex correspond to the existing on in the POITEM (VBAP).

Hope this helps.

Sajan Joseph

Read only

Former Member
0 Likes
1,783

Hi,

VA33 refers to Schedule agreement.

The BAPI only creates schedule lines and not the schedule agreement.

You need to create Schedule agreement separately.

Thanks and Regards,

Sriranjani Chimakurthy.

Read only

madhu_vadlamani
Active Contributor
0 Likes
1,783

Hi Deepu,

Are you going to create scheduling agreement using this bapi or you are changing the schedules lines of sales order.As i know this bapi not to create a schedule agreement.

Regards,

Madhu.

Read only

0 Likes
1,783

Hello Madhu,

As mentioned in the starting of my post, I'm adding schedule lines to the existing scheduling agreement.

Regards,

Deepu.K