Select for all entries in SAP ABAP

Select statement for all entries:

SELECT FOR ALL ENTRIES is the best alternative for SELECT WITH JOINS, this statement is very helpful for reading data from more than 2 tables.
The load on database will be very less.

Ensure before using SELECT FOR ALL ENTRIES
  • Parent internal table must not be empty ( If it is empty, where condition fails and it will get all records from database).
  • Remove all duplicate entries in parent internal table.

Syntax:

SELECT Table_FIELDS FROM DBTBL1 INTO TABLE ITAB1 
WHERE <CONDITION>. 
SELECT TABLE_FIELDS FROM DBTBL2 INTO ITAB2 FOR ALL ENTRIES IN ITAB1 
WHERE TABLE_FIELD1 = ITAB1-TABLE_FIELD1.

Comments

Popular posts from this blog

New commodity code create in SAP S/4 Hana

BAPI to Change STO PO/ PO Delivery date in SAP

INITCAP- First letter of the word Capital in SAP ABAP