2014 Feb 11 4:08 PM
Hello,
I’m trying to debug a delivery creation program from the VA02 menu. The requested delivery date is today’s and the Material Availability Date is in the future. I get the error message that no schedule lines are available for delivery.
I would like to know that which SAP program/form exactly does the check on Material Availability Date and then throws the above error.
Thanks!
2014 Feb 11 6:01 PM
Hi Alice
You can simply note down the error message number and message class. Again try to create delivery but switch on debugger.Breakpoint at-> Message number-> Provide message details...(new debugger) it will stop where error is thrown. Check the call stack for program details
Nabheet
2014 Feb 12 6:31 AM
Hi Alice,
One of the reasons why the above error comes is that there is no confirmed quantity available on the requested delivery date. Please check if you have some confirmed quantity on the RDD.
Regards,
Varun
2014 Feb 12 11:44 AM
Hi Alice,
First consider the following example:
0 in stock.
There is a production order with a finish date in the future. Production Orders are considered in the ATP check via transaction OVZ9. So, lets say we have a production order with finish date = 5th March 2014, CO09 will look like this:
Now when we create a sales order with a requested delivery date = today (12th Feb), the system cannot confirm as there is no available quantity until 5th March. Therefore, the system will confirm on 5th March:
If I was to deliver this sales order today, I get the message "No Schedule Lines due for delivery up to the selected date". The "Selected Date" is automatically today's date when you deliver from the menu option in VA02. You have the option of manually entering the date in VL01n.
The reason you get the error is because todays date is earlier than the material availability date. As per the long text of the message "If this is the case, set the selection date further into the future if you still want to create a delivery for this item." - you can do this in VL01n:
From debugging viewpoint, the most relevant code is here:
SAPFV50C FORM LIPS_FUELLEN_AUS_VBEP (Include SAPFV50C_LIPS_FUELLEN_AUS_VBEP)
********************************************************************
LOOP AT XVBEP WHERE VBELN = CVBAK-VBELN AND
POSNR = CVBAP-POSNR AND
( MBDAT LE LV50C-DATBI OR
TDDAT LE LV50C-DATBI ).
********************************************************************
^^The LOOP is only true is MBDAT (Material Availability Date) is less than or equal to LV50C-DATBI (Selection Date). Within this loop, LF_DELIVERY_FLAG is set:
* Flag: at least one schedule line is copied into delivery
LF_DELIVERY_FLAG = CHARX.
that goes on to create the delivery. When the LOOP is not true, the system never sets the flag and you get the VL248 message. In the case above, it wont be true as LV50C-DATBI = today (12th) while MBDAT = 5th March.
Hope this helps.
2014 Feb 12 11:58 AM
Hi Alice D' Souza ,
In new debugger set breakpoints at message statement. It will lead you directly there.
You can check the condition written over there which results into that message.
Regards,
Pravin
2014 Feb 12 12:35 PM
Hi,
Note down the error message details and put a break point in new debugger by providing the message details (id,number and type).
please activate the update debugging as well while debugging because if error occures while updating then it iwll stop or else it willnot stop even though you put breake point at message.
or try one more method that open message in SE91 tcode then try where used list from there and put break point an debug. some times it will not work(if they are generating dynamic message ).