‎2007 Aug 20 6:04 AM
when v use ....SELECT * INTO CORRESPONDING FIELDS OF TABLE TAB1 ........THE OUTPUT IS BETTER THAN ...........SELECT F1 F2 F3 F4 INTO TABLE TAB1 ......Y IT IS SO ??????PLS LEMME KNOW
‎2007 Aug 20 6:11 AM
Hi,
For further reference regarding optimization you can look into this link....
Regards,
Priyanka.
‎2007 Aug 20 6:08 AM
Guru,
Select * will fetch all the records and is not recomended as it affects the performance.
Always see to that the where clause in the select statement have either primary key fields or index field,else it will also effect the performance.
select f1 f2 f3 from vbap into table ivbap where .....
is much better than using select *.
Just check for the keyword OPTIMISATION in SDN forum,you will be able to see tons of info related to your query.
K.Kiran.
‎2007 Aug 20 6:09 AM
Hi,
Because when u write select matnr mtart matkl into table it_mara at that time it find field as per your select query sequence but when u write selct * into corresponding fields it means it follow sequence of data dictionary so we always use corresponding fields option for that is improve your performance.
Rewards if it is useful.
‎2007 Aug 20 6:11 AM
Hi,
For further reference regarding optimization you can look into this link....
Regards,
Priyanka.
‎2007 Aug 20 6:22 AM
THNX PRIYANKA 4 UR HELP .............GIVING U REWARDS.........
‎2007 Aug 20 6:12 AM
Hi,
using of * and into corresponding will results in poor performance
but the select fields into table will results in good performance
because when * is used all the fields will be fetched and it has to match the
field names from data base and in your internal table fields order and names...
but this will not be in the case of select field and into table
here we should be care full that the order of fields in itab and order of fields in
select query should be same
egL
data:begin of itab occurs 0,
matnr type mara-matnr,
ersda type mara-matrn,
matkl type mara-matkl,
end of itab.
select matnr ersda matkl
from mara into table itab
but it should not be
select matnr matkl ersda
from mara into table itab
as it will put the value of matkl in the ersda field in itab.
thanks & regards,
Venkatesh
...SELECT * INTO CORRESPONDING FIELDS OF TABLE TAB1 ........THE OUTPUT IS BETTER THAN ...........SELECT F1 F2 F3 F4 INTO TABLE TAB1 ......Y IT IS SO ??????PLS LEMME KNOW
‎2007 Aug 20 6:16 AM
Hello Guru,
Both are same... U can find the difference only with... INTO CORRESPONDING FIELDS OF TABLE... If you use this one... order of the fields in the selec statement and order of the fields in the internal table need not be same. where as if you are not using this... order of feids in both select statement and internal table should be same.
If u usr select * from... then it will just kill the performance of the report... so it is not suggestable...
Reward If Helpful.
Regards
--
Sasidhar Reddy Matli.