‎2007 May 08 1:37 PM
‎2007 May 08 1:52 PM
‎2007 May 08 1:39 PM
it depends on the data fetching.
u can use select * from table or else select <fields> from table if u have less data or else master data.
select...endselect is used for hughe tables like BSEG, BSID, BSAD, MSEG tables.
‎2007 May 08 1:44 PM
Hi
Don't use SELECT..ENDSELECT
use INTO TABLE internal table
and with the necessary field sin the internal Table
see this
1) Dont use nested seelct statement
2) If possible use for all entries in addition
3) In the where addition make sure you give all the primary key
4) Use Index for the selection criteria.
5) You can also use inner joins
6) You can try to put the data from the first select statement into an Itab and then in order to select the data from the second table use for all entries in.
7) Use the runtime analysis SE30 and SQL Trace (ST05) to identify the performance and also to identify where the load is heavy, so that you can change the code accordingly
Reward points if useful
Regards
Anji
‎2007 May 08 1:52 PM
Hi Rajamehender,
Select ..Endselect is used depending upon the requirement.
If u want to check each data in the table . then use it.
generally it is not used. it increases the execution time.
In place of sel endsel populate whole data in to internal table directly.
SELECT * FROM mara <b>table INTO iab</b>
WHERE matnr in s_matnr.
Reward points if helpful.
Regards,
Hemant
‎2007 May 08 1:52 PM
hi,
if we are using
select * from table itab where <condition>.
then we need not have to give select
endselect.
if we give
select * from itab where <condition>
endselect.
reward with points if helpful.
‎2007 May 08 1:52 PM