I need to use the Delivered Quantity present in a sales order at schedule line level.
Sheeba Bhaskaran
Posts: | 252 | ||||||||
---|---|---|---|---|---|---|---|---|---|
Registered: | 2/27/07 | ||||||||
Forum Points: | 302 | ||||||||
Re: | Getting Sales order -Schedule line field , Delivered Quantity ( VSMNG ) ?? | ||||||||
Posted: | Jan 13, 2009 10:38 AM | ||||||||
Content: | 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:
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. |
沒有留言:
張貼留言