ERP Database - The Unofficial ERP Knowledge Base

Facebook Twitter del.icio.us Digg it
ERP Database contains a huge collection of articles related to ERP System and Software. Many of the articles are specifically related to SAP. All these ERP/SAP articles are freely available to everyone.

If you would like to submit an article or share any document related to ERP or any specific ERP software. Please mail it to support@erpdb.info. Please make sure that the documents are not copyrighted.
Social Bookmarks:

Using SubQueries in ABAP

Print This Post Email This Post Written by admin on May 4th, 2009 | Filed under: SAP General

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 ).
Share


Leave a Reply