Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Dynamic SELECT with FOR ALL ENTRIES IN: take 2

Hello Xperts,

we are now having a bit of new trouble with the following SELECT ... special thanks to Raul and Suhas for their previous contributions.

        <itab1>      TYPE standard table. 
  ASSIGN ATTR_T_I->* TO <itab1>.
    from DBTAB1
    into CORRESPONDING FIELDS OF table <itab1>
    FOR ALL ENTRIES IN <itab1>

ATTR_T_I is a static attibute of type table containing 10 records where all records have FIELD1 and FIELD2 empty.

The select finds in DBTAB1 entries fulfilling the 'condition' for 8 of the above 10 records in ATTR_T_I.

Hence, after the select 8 of the 10 records in ATTR_T_I have the fields FIELD1 and FIELD2 filled (ie not empty).

So far so good!

BUT: the 2 remaining records (i.e. those without entries in DBTAB1 fullfilling 'condition') have been deleted! Why? This is not what we want nor expected.

Any ideas out there how to fix this?


Former Member
Not what you were looking for? View more on this topic or Ask a question