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

Force one schedule line with BAPI_SALESORDER_CREATFROMDAT2

Joseph_BERTHE1
Active Contributor
0 Likes
729

Hi,

How can I force the BAPI BAPI_SALESORDER_CREATFROMDAT2 to create sales order with only one schedule line for some itmes ?

Remark : <i>I don't want to change the customer parameters</i>

Regards

Hi,

How can I force the BAPI BAPI_SALESORDER_CREATFROMDAT2 to create sales order with only one schedule line for some itmes ?

Remark : <i>I don't want to change the customer parameters</i>

Regards

5 REPLIES 5
Read only

Former Member
0 Likes
691

You have to fill the internal table to feed the function table <b>order_schedules_in</b>. If you fill that table with only one line for a certain item, you should be able to have only one schedule line for that item.

but maybe I've misunderstood your question. What do you mean by "<i>I don't want to change the customer parameters</i>" ?

Regards

Read only

0 Likes
691

Hi,

Thanks for answering.

The solution you said is good, but my problem is I don't want to lose the FirstDate.

<u>For instance :</u> if I have an item with two schedule lines after simulation, I want to force the result with one schdule line without losing the RequestedDate (FirstDate in VA01).

regards

Read only

0 Likes
691

if simulation returned 2 SL - means SAP is unable to deliver on requested date and thus creates 2 SL as a result of availability check.

You may try to receive 1 SL by changing shipping priority or shipping point/route... it can redetermine dates and your order will be confimred with 1 SL.

OR you have to use sched.line category which is not relevant for ATP check, in this case you can confirm manully via your program... but still if you requested with current date and your material is available today - you may nto be able to deliver it today due to pick/pack time, trnasit time,...

Read only

0 Likes
691

Hi,

thanks for answering,

But I can't change the Shipping point or route.

Furthermore, could you explain what you said at the end of your post, cause I didn't understand.

Kind regards

Read only

0 Likes
691

If your schedule line category is relevant for availability check - it means that you can't say in advance will it be confirmed or not and how many sched.lines it's going to have, you can estimate by "order simulate" but it doesn't mean that your real order will fully match to simulation.

If you are not doing any availability check (your materials are always available) - then your item will get current material availability date... but stil the number of schedule lines will depend on whether or not your required delivery date can be met taking into account pick/pack time, transit time (route), calendars of shipping point, route & customer.... and you can't force one schedule line in this case unless you change your required date to a proposed delivery date based on simulation.