04-13-2006 7:59 PM
I have to read out the delivered quantities of the schedule lines which are under the position. I already have the data from the table VBEP, but I don't have the delivered quantities (VSMNG) in this table. How can I read this information for a sales order?
04-13-2006 8:14 PM
It is a calculated value, not a value of a table field. Also, it may lead to wrong results if you don't pay attention to this description of the field here under in bold.
Delivered quantity in sales units
The quantity from the schedule line that has already
been delivered.
Use
When there is more than one schedule line for an item,
the system distributes the total delivered quantity for
the item across the schedule lines according to the
sequence of their delivery.
Example
A sales order item has three schedule lines, each with
an order quantity of 50 pieces. You make two subsequent
deliveries: the first for 20 pieces, the second for 60
pieces. The delivered quantity for the first schedule
line is 50 pieces, for the second 30 pieces, and for the
third zero.
<b>If you delete the first delivery (20 pieces), the
delivered quantity for this schedule line is still 50
pieces.</b> However, the system reduces the delivered
quantity for the second schedule line to 10 pieces.
04-13-2006 8:06 PM
From table LIPS . You can see sales order reference on item line of delivery item in tr.code VL02 .it also has the sales order item number .
quantity in sales order on schedule line is GR. 101 and 102 and delivers is 601 and 602.
youll also find the result w.ref to material if you execute the report MB51 or Mb5b .
you can also see it in Table :Mseg .. as movement type for delivery is 601 and 602 is reversal .
hope thisll help you .
Thanks
Saquib
Message was edited by: Saquib Khan
04-13-2006 8:14 PM
It is a calculated value, not a value of a table field. Also, it may lead to wrong results if you don't pay attention to this description of the field here under in bold.
Delivered quantity in sales units
The quantity from the schedule line that has already
been delivered.
Use
When there is more than one schedule line for an item,
the system distributes the total delivered quantity for
the item across the schedule lines according to the
sequence of their delivery.
Example
A sales order item has three schedule lines, each with
an order quantity of 50 pieces. You make two subsequent
deliveries: the first for 20 pieces, the second for 60
pieces. The delivered quantity for the first schedule
line is 50 pieces, for the second 30 pieces, and for the
third zero.
<b>If you delete the first delivery (20 pieces), the
delivered quantity for this schedule line is still 50
pieces.</b> However, the system reduces the delivered
quantity for the second schedule line to 10 pieces.
04-13-2006 8:49 PM
Did you see the bold sentence above? It talks exactly about why this may not be accurate. You will not be able to accurately tell which schedule line item is still to be delivered. Any undelivered quantity will always be associated to the last schedule line. You can determine the undelivered line quantity as the difference between line quantity and the sum of delivery quantities referring to that line.
04-14-2006 10:13 PM
Delivered quantity at the schedule line is calculated with function module RV_SCHEDULE_CHECK_DELIVERIES. You have to feed it with document flow from sales order to delivery (FVBFA), schedule lines (FVBEP), status (FVBUP), and sales order item (FVBAP) to get the vsmng filled in FVBEP. If you set a break-point at this function module and run VL01N, you get a typical example for the usage of this function module.
Best regards, Ulrich
04-13-2006 8:19 PM
Hi Amandeep,
Have you looked at the following FM yet?
<b>SD_VBEP_ARRAY_READ_VBELN
SD_VBEP_READ_WITH_POSNR
SD_VBEP_READ_WITH_VBELN
SD_VBEP_SELECT
SD_VBEP_SINGLE_READ </b>
It will return VSMNG value(s) in table parameter (table strucuture VBEPVB).
Hope this will help.
Regards,
Ferry Lianto
04-13-2006 8:39 PM
I tried all the four FMs but all the FM has delivery qty[VSMNG] always zero.
I have case like this.
Order qty Confirmed qty Delivered qty
20 20 20
25 25 25
25 25
for the third schedule line item the delivery qty is blank[means not delivered]
I have to display only those schedule line items where it is not fully delivered.