Subquery with EXISTS
Task
Select materials that exist in another table using EXISTS .
Write Your ABAP Code
Loading...
📥 Sample Input & Output
Input: Materials with plant assignment Output: Filtered materials
💡 Hint
EXISTS stops processing after the first match.
✅ View Reference Solution
SELECT matnr
FROM mara
WHERE EXISTS (
SELECT matnr
FROM marc
WHERE marc~matnr = mara~matnr )
INTO TABLE @DATA(lt_mat).