Skip to Content
0
Former Member
May 27, 2008 at 04:05 AM

Where condition

47 Views

Hi all,

My 2nd select query is not working.

Plz tell where i m wrong.

if itab_lfa1[] is not initial.

if p_bukrs is initial.

select lifnr bukrs

from lfb1

into corresponding fields of table i_lfb1

for all entries in itab_lfa1

where lifnr = itab_lfa1-lifnr.

else.

select lifnr bukrs

from lfb1

into corresponding fields of table i_lfb1

for all entries in itab_lfa1

where lifnr = i_lfa1-lifnr

and bukrs eq p_bukrs.

endif.

endif.

Showing the error msg in 2nd select this:

The WHERE condition does not refer to the FOR ALL ENTRIES table.

But when we remove for all entries in itab_lfa1,

then it show no error, but doesn,t able to pick all records.

Best Regards,

Aastha.