‎2008 Jun 03 5:31 AM
Hi guys,
i have to remove nested select endselect statement please help.
‎2008 Jun 03 5:36 AM
hi,
for that u have to
add 'into (corresponding fields of) table itab.'
~~ please be specific. or give ur code here!!!
regards,
madhu
‎2008 Jun 03 5:36 AM
hi,
for that u have to
add 'into (corresponding fields of) table itab.'
~~ please be specific. or give ur code here!!!
regards,
madhu
‎2008 Jun 03 5:45 AM
thanks for response,
actually my TL is telling to use FOR ALL ENTRIES.
i don't know how to use it.please guide
‎2008 Jun 03 6:06 AM
say if u want to display material and its text. u can use this concept.
~from the master table i'm selecting the materials based on the input s_matnr.
~then for the materials selected above , i have to get their corresponding description.
ie:
select matnr from mara into table i_matnr
where matnr in s_matnr.
if sy-subrc = 0.
select matnr maktx
from makt into table i_makt
for all entries in i_matnr
where matnr = i_mara-matnr.
endif.
This is similar to INNER JOIN concept. get the common data from 2 tables based on the input. Sometimes Join will give poor performance , n there u can use FOR ALL ENTRIES.
regards,
madhu
‎2008 Jun 03 5:43 AM
Hi,
Try to use join query or else populate entries into internal table and fetch entries in another table using that internal table.
Thanks
Murugan.B
‎2008 Jun 04 4:21 AM
Hi,
Madhumita is right............
with that Never forget to use
SORT and DELETE ADJASCENT DUPLICATES stmt whenever u use FOR ALL ENTRIES stmt in SELECT....
Try to check everytime if the table going to be checked wether INITIAL or not.....
performance will be gud...
Reward all helpful answers,
Thanks
‎2008 Jun 04 7:29 AM
hi...
instead of using nested select end select while writing select query use' select * from ....into table .....itwill select all enties at one go in your internal table for given conditions.
‎2008 Jun 05 6:43 AM
ive me ur id will send you code where for all entries has been used