To avoid nested select statements we use SELECT FOR ALL ENTRIES statement.
1)Make sure that the select contains at least the primary key
fields
2)IF NOT <ITAB> IS INITIAL. is a mandatory check before FOR
ALL ENTRIES.
When using FOR ALL ENTRIES you need to make sure that table which you are using should not be empty else it will SELECT all the data from that table.