2008 Dec 10 6:18 AM
Hi...
I need to use the Delivered Quantity present in a sales order at schedule line level.
This field can be seen if we, enter a sales order in VA02 and click on the Item and then click on the 'Schedule Lines' tab... i need to know.. how do i fetch the field 'Delivered Quantity' present there....
If no values are present .. then it means.. no delivery has been done for that material........
The F1 or Techinical help points to the field VBEPD-VSMNG...... and i found that this field is calculated at runtime in the function module RV_SCHEDULE_CHECK_DELIVERIES.....
Can someone please tell me... how do i fetch this field ...or calculate this field..... for my requirement.....
Regards.....
2008 Dec 10 6:23 AM
hi,
check VBEP table.
also check this.
[https://forums.sdn.sap.com/click.jspa?searchID=19735799&messageID=1695687]
2008 Dec 10 6:27 AM
Gautham...
Its not present in VBEP...it is calculated at runtime.........
Hmm.. the thread which you have given is also not very helpful..... ....
The guy who has got full points has just given...... the F1 help for that field...
2008 Dec 10 6:31 AM
Hi ,
Try these FMs
BAPI_SALESORDER_GETLIST
BAPI_BILLINGDOC_GETLIST
Regards
Ramchander Rao.K
2008 Dec 10 6:35 AM
2009 Jan 13 9:38 AM
Hi.
You can use the function module RV_SCHEDULE_CHECK_DELIVERIES to get the delivered quanity corresponding to schedule line item in sales order.
Please refer below code:
ie3mdpslx-delnr is sales order numer
ie3mdpslx-delps is line item.
internal table tl_da_vbep has got field VSMNG which is the delievred quantity for each line item
SELECT * FROM vbfa
INTO CORRESPONDING FIELDS OF TABLE tl_xvbfa
WHERE vbelv = ie3mdpslx-delnr
AND posnv = ie3mdpslx-delps
AND vbtyp_v = 'C'.
SELECT * FROM vbup
INTO CORRESPONDING FIELDS OF TABLE tl_xvbup
WHERE vbeln = ie3mdpslx-delnr
AND posnr = ie3mdpslx-delps.
SELECT * FROM vbep
INTO CORRESPONDING FIELDS OF TABLE tl_da_vbep
WHERE vbeln = ie3mdpslx-delnr
AND posnr = ie3mdpslx-delps.
SELECT * FROM vbap
INTO CORRESPONDING FIELDS OF TABLE tl_xvbap
WHERE vbeln = ie3mdpslx-delnr
AND posnr = ie3mdpslx-delps.
CALL FUNCTION 'RV_SCHEDULE_CHECK_DELIVERIES'
EXPORTING
fbeleg = ie3mdpslx-delnr
fposnr = ie3mdpslx-delps
TABLES
fvbfa = tl_xvbfa
fvbup = tl_xvbup
fxvbep = tl_da_vbep
fvbap = tl_xvbap
EXCEPTIONS
fehler_bei_lesen_fvbup = 1
fehler_bei_lesen_fxvbep = 2
OTHERS = 3.