How to achieve the UNION SQL operation results in ABAP? To be specific, I want to retrieve STCD1 field value from vendor master table (LFA1) for all vendors (LIFNR) that exist in table BSIK or BSAK.
And I want to achieve the results in single SQL statement. So in essence, the resultant SQL would be something like:
INTO TABLE my_internal_table
WHERE LIFNR IN (SELECT DISTINCT LIFNR
SELECT DISTINCT LIFNR
But the UNION is not a valid keyword in ABAP. Any idea how to achieve this?