cancel
Showing results for 
Search instead for 
Did you mean: 

Schedule Lines result in BAPI_SALESORDER_SIMULATE <> SCLines in Dialog

Former Member
0 Kudos

Hello,

I need to use the BAPI_SALESORDER_SIMULATE in order to get the availabilty stock per item in result.

In my example, I have 304 items on stock. I want to place an order for 1000 items. Through VA01, I got 2 schedule lines with confirmed quantity, first with 304 in confirmed quantity for required date and a second one with 696 after the replenishment lead time.

I got a different results through BAPI, I got 2 schedule lines but first with 0 in confirmed quantity and the second one with the total qty 1000 confirmed.

No partial delivery is taken into account

Lines in BAPI

DelDate Req_Quan Conf_Quan

14.05.2018 1000 0

22.05.2018 0 1000

Lines in VA01

DelDate Req_Quan Conf_Quan

14.05.2018 1000 304

22.05.2018 0 696

I used the same Sales area for both.

In OVZJ, the default parameter are : Fixed date and qty ='X'

Avail. check rule = ' '

Import parameters in BAPI

.....................

"ORDER_ITEMS_IN":

"ITM_NUMBER": "000010",

"PO_ITM_NO": "10",

"REQ_DATE": "20180514",

"MATERIAL": "000000000017010005",

"REQ_QTY": "0000001000000",

"DLVSCHDUSE": null

......................

Does anybody has an idea which parameter is missing, so I get two confirmed quantities?

Regards

Sébastien

Accepted Solutions (0)

Answers (1)

Answers (1)

pjcools
Active Contributor
0 Kudos

Hi

You need to fill in the ORDER_SCHEDULE_IN structures as well with the appropriate information to get confirmed quantities.

Fields to populate include:

- ITM_NUMBER -> matches item numbers from the ORDER_ITEMS_IN.

- SCHED_LINE -> can just be 00001, 00002, etc.

- REQ_DATE -> same as the required delivery date values as populated on the ORDER_ITEMS_IN structures.

- REQ_QTY -> matching ORDER_ITEMS_IN values.

Hope this helps.

Thanks

Phil Cooley

Former Member
0 Kudos

Hi Phil,

Thank you for your feedback.

I already tested to add the structure ORDER_SCHEDULE_IN but this is worse because the BAPi manages twice qty (qty in ITEM and qty in SCHED) and not still partially.

========Result Lines in BAPI ==========

SchedL / DelDate / Req_Quan / Conf_Quan

0001 / 15.05.2018 / 1000 / 0

0003 / 15.05.2018 / 1000 / 0

0004 / 22.05.2018 / 0 / 1000

0005 / 22.05.2018 / 0 / 1000

===================================

Another idea please ?

Thanks

Regards

Sébastien

pjcools
Active Contributor
0 Kudos

Actually, I've just re-read the post. Take out the Fixed Date and Qty setting (i.e. change from 'X' to blank) - I believe this is what is causing the last date to included the full quantity amount. Remove this and see how you go.

Thanks

Phil Cooley

Former Member
0 Kudos

Hi

Same result after changing the [Fixed Date and Qty] setting from 'X' to blank in OVZJ.

pjcools
Active Contributor
0 Kudos

Hi

If you have the Availability check rule maintained with blank try and modify this to an actual value just to generate a different result. Try E or even A or B and see how you go.

Thanks

Phil Cooley

Former Member
0 Kudos

Hi

I have already tested all the combinations for my sales area and each time I have the result in BAPI.

Fixed date and Qty: blank or 'x'

Avail. check rule: blank, A, B, C, D, E, 1

Strange ! i don't know what to do ...

Lakshmipathi
Active Contributor

Whenever you add any post to your original query, please do so under "Comment" and not under "Answer", as you were not answering to a query but only providing additional informations as required by the member. Also, the member to whom you were responding will not be notified if you respond under "Answer". Meanwhile, I have converted your above post from Answer to Comment.