‎2007 Jan 10 2:21 AM
DATA : BEGIN OF ITAB2 OCCURS 0,
KEY(10),
END OF ITAB2.
There are about 8000 lines in the ITAB2
LOOP AT ITAB2.
SELECT name FROM EMP
APPENDING TABLE IT100
WHERE KEY = ITAB2-KEY
ENDLOOP.
so this loop program is processing for a long time.
Could you show how to query at once?
Message was edited by:
jake
‎2007 Jan 10 2:25 AM
Use the following code..
if not itab2[] is initial.
select name from emp into table it100
for all entries in itab2
where key = tab2-key.
endif.
~Suresh
‎2007 Jan 10 2:25 AM
Use the following code..
if not itab2[] is initial.
select name from emp into table it100
for all entries in itab2
where key = tab2-key.
endif.
~Suresh
‎2007 Jan 10 2:38 AM
Use FOR ALL ENTRIES as follows:
SELECT name FROM EMP
TABLE IT100
FOR ALL ENTRIES IN itab2
WHERE KEY = ITAB2-KEY.Raja T
Message was edited by:
Raja Thangamani
‎2007 Jan 10 2:47 AM
CHECK NOT ITAB2[] IS INITIAL.
SELECT NAME
FROM EMP
INTO TABLE IT100
FOR ALL ENTRIES IN ITAB2
WHERE KEY EQ ITAB2-KEY.
Thanks,
Santosh