Gelieferte Menge

Ermittlung der gelieferten Mengen zu einem Auftrag.

* Nötige Tabellen lesen
  SELECT * FROM vbap INTO TABLE xvbap
                               WHERE vbeln EQ vbeln.

  SELECT * FROM vbep INTO TABLE xvbepd
                               WHERE vbeln EQ vbeln.

  SELECT * FROM vbup INTO TABLE xvbup
                               WHERE vbeln EQ vbeln.

  SELECT * FROM vbfa INTO TABLE xvbfa
                               WHERE vbelv EQ vbeln
                               ORDER BY PRIMARY KEY.

* Berechnung durchführen
  CALL FUNCTION ‘RV_SCHEDULE_CHECK_DELIVERIES’
       EXPORTING
            fbeleg = vbeln
            fposnr = ‘000000’
       TABLES
            fvbfa  = xvbfa
            fvbup  = xvbup
            fxvbep = xvbepd
            fvbap  = xvbap
       EXCEPTIONS
            OTHERS = 1.

 

Enno Wulff