‎2006 Jun 07 3:47 PM
I have this particular requirement I need to select the values from the REGUP table with SGTXT which I have values for that and LAUFI which ends with R.
What is the best possible way to the selection which gives good performance as this is an interface which is pefromance intensive.
Please help. Points will be awarded for the right help.
‎2006 Jun 07 3:51 PM
Hi Varun,
select *
from regup
into table it_regup
where laufi like '%R'
and sgtxt in s_sgtxt.
Regards,
Ravi
‎2006 Jun 07 3:53 PM
Does that give performance. This table contains a large number of records as this is a utility company
‎2006 Jun 07 3:55 PM
As long as this statement is not inside a loop statement or another select-endselect statement,
It doesn't hurt performance much.
Regards,
Ravi
‎2006 Jun 07 3:57 PM
The thing is that I am not selecting REGUP directly from values of the Selection screen. I need to select the records with help of the key from values of BSAK table which is also huge amount of data. So does this statement can hold that much amount of data?
‎2006 Jun 07 3:58 PM
Not sure if performance will be better or not. Give it a try using a range.
report zrich_0001.
data: it_regup type table of regup with header line.
select-options s_sgtxt for it_regup-sgtxt.
ranges: r_laufi for it_regup-laufi.
clear r_laufi.
r_laufi-sign = 'I'.
r_laufi-option = 'CP'.
r_laufi-low = '*R'.
append r_laufi.
select * from regup into table it_regup
where laufi in r_laufi
and sgtxt in s_sgtxt.
check sy-subrc = 0.
Regards,
Rich Heilman
‎2006 Jun 07 4:00 PM
Hi Varun,
Practically the limit set to the internal table capacity would be sufficiently large .
But then, we cannot judge what is the performance of a select statement without seeing it in the bigger picture.
Regards,
Ravi
‎2006 Jun 07 3:59 PM
use like option in where clause.
<b>where laufi like '%R'</b>
Regards
vijay
‎2006 Jun 07 4:02 PM
Right now we dont have that much amount of data to test that. Thats why I am very much concerned about this select. Does this thing will help by creating an index on sgtxt and selecting the values with that and then weeding out the values which do not have LAUFI with R at end. Which will be better.
‎2006 Jun 07 4:05 PM
Yes, the option of weeding out the entries without an R at the end would be a better option , as this operation would not be at the database level(Which consumes more time).
select *
from regup
into t_regup
where <where cond>.
delete itab where laufi cp '*R'.
Regards,
Ravi
‎2006 Jun 07 4:03 PM
Yes you can select on table and in selection you can say
Select from table where LAUFI like '%R%' and SGTXT in your_values.
e,g
Select * from regup INTO CORRESPONDING FIELDS OF wa where LAUFI like '%R%' .
endselect.
Hope thisll give you idea!!
<b>P.S award the points.</b>
Good luck
Thanks
Saquib Khan
"Some are wise and some are otherwise"