04-07-2009 12:10 PM
Hi all,
How do i get Delivered quantity in sales units, in schedule lines (SD - VA02).
I tried RV_SCHEDULE_CHECK_DELIVERIES, it not works.I m unable to find any table.
Please suggest ...
regards,
prasad gore
04-07-2009 12:26 PM
Hi ,
Delivery details can be found out directly from LIKP and LIPS.But to have a more effective way you can do that by going to the table MSEG and select the records for which goos issue has been done.
04-07-2009 12:30 PM
04-07-2009 12:44 PM
I tried but not found any record for my sales order (vbeln).
for both the tables LIPS and LIKP.
04-07-2009 12:50 PM
Hi..
You have to pass the value of the sales order in VGBEL field of LIPS.. ...
ie VBELN should be passed in VGBEL....
04-07-2009 1:16 PM
04-07-2009 12:31 PM
hi,
try this.
******************************************************
* Fill Pending and Delivered Quantity *
******************************************************
SELECT *
from vbup
into table it_vbup
where vbeln = it_vbap-vbeln
and posnr = it_vbap-POSNR.
READ TABLE IT_VBUP WITH KEY VBELN = IT_VBAP-VBELN POSNR = IT_VBAP-POSNR.
IF SY-SUBRC EQ 0.
IT_FINAL-lv_status = IT_VBUP-LFSTA.
ENDIF.
SELECT *
from vbfa
into table it_vbfa
where VBELV = it_vbap-vbeln
and POSNV = it_vbap-posnr.
loop at it_vbap into wa_vbap where vbeln = it_vbak-vbeln.
MOVE-CORRESPONDING wa_vbap to it_VBAPVB.
append it_VBAPVB.
endloop.
loop at it_vbEp where vbeln = it_vbak-vbeln.
MOVE-CORRESPONDING it_vbep to IT_VBEPVB.
append it_VBEPVB.
ENDLOOP.
CALL FUNCTION 'RV_SCHEDULE_CHECK_DELIVERIES'
EXPORTING
fbeleg = it_vbap-vbeln
fposnr = it_vbap-Posnr
* FVERRECHNUNG = ' '
* FS073_ALT = ' '
* IF_NO_SORT = ' '
tables
fvbfa = it_vbfa
fvbup = it_vbup
fxvbep = it_VBEPVB
* FVBLB =
fvbap = it_VBAPVB
EXCEPTIONS
FEHLER_BEI_LESEN_FVBUP = 1
FEHLER_BEI_LESEN_FXVBEP = 2
OTHERS = 3
.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LOOP AT it_VBEPVB WHERE POSNR = IT_VBAP-POSNR.
IT_FINAL-KWMENG_d = IT_FINAL-KWMENG_d + it_VBEPVB-VSMNG. " COMPUTE DELIVERY QTY
ENDLOOP.