Using SubQueries in ABAP

Using SubQueries in ABAP

Sometimes you just want to know whether some records in a secondary table exist or not. You don‘t need their actual content.
This is where Subqueries come in handy:

Are there any rows in the SFLIGHT table without a corresponding entry in table SPFLI?

SELECT carrid connid
INTO (xcarrid, xconnid)
FROM sflight AS f
WHERE NOT EXISTS ( SELECT * FROM spfli
WHERE carrid = f~carrid
AND connid = f~connid ).
ERP Avatar

One response to “Using SubQueries in ABAP”

  1. Free N Avatar
    Free N

    Can you give me some examples of aggregate using subquery ?

    Thank you.

Leave a Reply to Free N Cancel reply

Your email address will not be published. Required fields are marked *