Application Development 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: 

Getting Sales order -Schedule line field , Delivered Quantity ( VSMNG ) ??

Former Member
0 Kudos
2,786

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.....

5 REPLIES 5

GauthamV
Active Contributor
0 Kudos
615

hi,

check VBEP table.

also check this.

[https://forums.sdn.sap.com/click.jspa?searchID=19735799&messageID=1695687]

Former Member
0 Kudos
615

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...

0 Kudos
615

Hi ,

Try these FMs

BAPI_SALESORDER_GETLIST

BAPI_BILLINGDOC_GETLIST

Regards

Ramchander Rao.K

Former Member
0 Kudos
615

Ram..

I dont think these bapi's would help.. ..:(

615

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.