I have been learning abap recently and working on select operations but then I came across this question. How can I put these 2 select statements into single select statement?
SELECT * FROM SPFLI INTO SPFLI_WA.
SELECT * FROM SFLIGHT INTO SFLIGHT_WA
WHERE CARRID = SPFLI_WA-CARRID
AND CONNID = SPFLI_WA-CONNID.
You can use inner join for getting matching records from other table.
INNER JOIN SPFLI ON SFLIGHT~CARRID = SPFLI~CARRID
AND SFLIGHT~CONNID = SPFLI~CONNID.