1 Reply Latest reply: Apr 12, 2018 8:27 PM by Leonardo Contezini RSS

    SAP

    olga avalos

      Hi,

       

       

      I have two tables on SAP, VBRK and VBRP. And I need to filter only one year, but the date only has this table: VBRK

       

       

       

      Please help me

        • Re: SAP
          Leonardo Contezini

          you can link (or join) the tables with the VBELN field, like:

           

          VBRK:

          LOAD

               VBELN AS DOCUMENT_NUMBER,

               GJAHR AS YEAR

          FROM VBRK;

           

          VBRP:

          LOAD

               VBELN AS DOCUMENT_NUMBER,

               FKLMG AS QUANTITY

          FROM VBRP;


          When you select YEAR, it will select data from both tables. If you want to load only one year, I'd suggest you do the following:


          VBRK:

          LOAD

               VBELN AS DOCUMENT_NUMBER,

               GJAHR AS YEAR

          FROM VBRK

          WHERE GJAHR = '2018';

           

          LEFT JOIN(VBRK)

          LOAD

               VBELN AS DOCUMENT_NUMBER,

               FKLMG AS QUANTITY

          FROM VBRP;


          something like this.