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: 

How do i get Delivered quantity in sales units

Former Member
0 Kudos

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

6 REPLIES 6

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi..

In LIPS table

Field is LFIMG

Cheers

0 Kudos

I tried but not found any record for my sales order (vbeln).

for both the tables LIPS and LIKP.

0 Kudos

Hi..

You have to pass the value of the sales order in VGBEL field of LIPS.. ...

ie VBELN should be passed in VGBEL....

0 Kudos

Thax ,

I got it.

prasad

Former Member
0 Kudos

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.