Code: Alles auswählen.
SELECT r~belnr r~gjahr k~bukrs "key für RW-Beleg
INTO CORRESPONDING FIELDS OF TABLE tab
FROM ( ekbe AS r INNER JOIN ekpo AS p
ON r~ebeln = p~ebeln
AND r~ebelp = p~ebelp )
JOIN ekko AS k
ON p~ebeln = k~ebeln
WHERE p~matkl IN matkl
AND p~bukrs = bukrs
AND r~vgabe = 2.