Code: Alles auswählen.
SELECT * INTO CORRESPONDING FIELDS OF TABLE gt_caufv FROM caufv
JOIN jest AS a ON caufv~objnr = a~objnr
WHERE caufv~aufnr IN s_aufnr
AND caufv~werks IN s_werks
AND a~stat = 'I0012' AND a~inact = space
AND NOT EXISTS ( SELECT * FROM jest WHERE objnr = caufv~objnr
AND stat = 'I009' AND inact = 'X' ).