Copy paste mentah-mentah dari sini. I think we'll definitely need this some day.
You can find the delivered quantity via a function, it is not as easy as reading the confirmed quantity.. I guess function is RV_DELIVERY_SCHEDULE, this checks all subsequent delivery documents etc and returns the quantity in VBEPVB structure ...
Use of function may look like this:
Data:
lT_VBFA type VBFA occurs 0 with header line,
lT_VBUP type VBUP occurs 0 with header line,
lT_VBEP type VBEPVB occurs 0 with header line,
lT_VBAP type VBAPVB occurs 0 with header line,
l_vsmng like vbepvb-vsmng.
SELECT * FROM vbup INTO TABLE lt_vbup
WHERE vbeln EQ vbeln AND
posnr EQ my_posnr.
SELECT * FROM vbfa INTO TABLE l_vbfa
WHERE vbelv EQ vbeln AND
posnv EQ my_posnr.
SELECT * FROM vbep INTO TABLE l_vbep
WHERE vbeln EQ vbeln AND
posnr EQ my_posnr .
SELECT * FROM vbap INTO TABLE l_vbap
WHERE vbeln EQ vbeln AND
posnr EQ my_posnr .
call function 'RV_SCHEDULE_CHECK_DELIVERIES'
exporting
fbeleg = vbeln
fposnr = my_posnr
tables
fvbfa = lt_vbfa
fvbup = lt_vbup
fxvbep = lt_vbep
fvbap = lt_vbap.
loop at lt_vbep where posnr eq my_posnr.
add lt_vbep-vsmng to l_vsmng. " tot.deliv.quan
endloop.
1.12.2009
Ambil Delivered Date SA
Subscribe to:
Posts (Atom)