Code: Alles auswählen.
SELECT * INTO CORRESPONDING FIELDS OF TABLE itab
FROM ( vbak
INNER JOIN vbuk
ON vbuk~vbeln = vbak~vbeln
INNER JOIN vbkd
ON vbkd~vbeln = vbak~vbeln
AND vbkd~posnr = '000000'
INNER JOIN vbep
ON vbep~vbeln = vbak~vbeln
INNER JOIN vbap
ON vbap~vbeln = vbak~vbeln
AND vbap~posnr = vbep~posnr
INNER JOIN kna1
ON kna1~kunnr = vbak~kunnr
INNER JOIN knb5
ON knb5~kunnr = vbak~kunnr )
* VBAK
WHERE vbak~vbeln IN svbeln
AND vbak~vkorg EQ pvkorg
AND vbak~lifsk IN slifsk
AND vbak~faksk IN sfaksk
AND vbak~auart IN sauart
AND vbak~vdatu IN svdatu
AND vbak~gwldt IN sgwldt
AND vbak~erdat IN serdat
AND vbak~audat IN saudat
AND vbak~bstdk IN sbstdk
AND vbak~bstnk IN sbstnk
AND vbak~vdatu IN svdatu
AND vbak~gwldt IN sgwldt
AND vbak~ernam IN sernam
AND vbak~lifsk IN slifsk
AND vbak~augru IN saugru
AND vbak~mahdt IN smahdt
AND vbak~vkbur IN svkbur
AND vbak~vkgrp IN svkgrp
AND vbak~kvgr1 IN skvgr1
AND vbak~kvgr2 IN skvgr2
AND vbak~kvgr3 IN skvgr3
AND vbak~kvgr4 IN skvgr4
AND vbak~kvgr5 IN skvgr5
AND vbak~zzrecip IN szzrecip
* VBAP
AND vbap~abgru IN sabgru
AND vbap~matnr IN smatnr
AND vbap~vkaus IN svkaus
AND vbap~lprio IN slprio
AND vbap~pstyv IN spstyv
AND vbap~kondm IN skondm
AND vbap~ktgrm IN sktgrm
* VBUK
AND vbuk~lfstk IN slfstk
AND vbuk~fksak IN sfksak
AND vbuk~gbstk IN sgbstk
* VBKD
AND vbkd~zlsch IN szlsch
* KNA1
AND kna1~regio IN sregio
AND kna1~erdat IN serst.