Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9052

Re: Join of three tables

$
0
0

Try like this

 

TABLES : vbrk.


TYPES : BEGIN OF ty_finovr,
          fkdat TYPE  vbrk-fkdat,
          vbeln TYPE  vbrk-vbeln,
          fkart TYPE  vbrk-fkart,
          kunag TYPE  vbrk-kunag,
          kunrg TYPE  vbrk-kunrg,
          vkorg TYPE  vbrk-vkorg,
          vtweg TYPE  vbrk-vtweg,
          netwr TYPE  vbrk-netwr,
          vkbur TYPE  vbrp-vkbur,
          posnr TYPE  vbrp-posnr,
          BEZEI type  TVKBT-BEZEI,
          END OF ty_finovr.

DATA : it_finovr TYPE TABLE OF ty_finovr.

SELECT-OPTIONS : so_fkdat FOR  vbrk-fkdat.

SELECT vbrk~fkdat
         vbrk~vbeln
         vbrk~fkart
         vbrk~kunag
         vbrk~kunrg
         vbrk~vkorg
         vbrk~vtweg
         vbrk~netwr
         vbrp~vkbur
         vbrp~posnr
         TVKBT~BEZEI
         INTO CORRESPONDING FIELDS OF TABLE it_finovr
         FROM vbrk JOIN vbrp ON vbrk~vbeln = vbrp~vbeln
                   join TVKBT on vbrp~vkbur = TVKBT~BEZEI
                   WHERE vbrk~fkdat IN so_fkdat
                   and TVKBT~spras = 'EN'.


Viewing all articles
Browse latest Browse all 9052

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>