Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Performance issue while coding

Former Member
0 Likes
698

Hi Experts,

If we use ranges in a particular report, could u please explain in detail whether the performance decreases or increases?

Thanks & Regards,

Maha.

5 REPLIES 5
Read only

Former Member
0 Likes
669

Hi,

If u user ranges instead of select options, performance wise it won’t show much difference.

Here both SELECT-OPTIONS & RANGES works for the same purpose. They both are used for the range selection from selection screen. The main diff. between them is, while we use SELECT-OPTIONS system implicitly creates the select options internal table which contains the fields of SIGN,OPTION,LOW & HIGH. But in case of RANGES, this internal table should be defined explicitly.

REWARD IF IT IS USEFUL.

Thanks

Siva kumar

Read only

Former Member
0 Likes
669

Hi,

Ranges : we can use it when no need of selection-screen for to enter values for that field.

So at initililization section of u r program u need to write the code for populating the values to ranges field.

If u do like above time consumption is less(because saving of GUI time and user input time for that field). It is useful when one program execution depends on other program output values. And u need use SAP and ABAP memory for getting values.

So Ranges mainly used for background jobs.

And also if u written SQL statements (like select) in Function module then u can use only Ranges to pass values to import parameters of function module.

More over ranges and select-options have same structure.

Read only

Former Member
0 Likes
669

Hi,

Select-options lead to an internal table in the background having structure for eg.

Sign = I/E

Option = EQ/BT/ GT/LE ....

Low = Low value which u feed in the first input box

High = High value which u feed in the second input box

The advantage u get is that u can have multiple option attached to select-options that u can have the data filled onto the screen , u can use multiple options attached to select-options such as NO Interval..and u can have multiple selection on the selection screen.

While in Ranges u don't have liberty of all these things as u it is filled at runtime with the data from select query ..

PS: Reward Points if helpfull.

Regards

Naveen Gupta

Read only

Former Member
0 Likes
669

Hi Mahalakshmi,

Using ranges generally deteriote the performance as internally SAP Kernal expands IN statement in Where Clause in various conditions.

Using FOR ALL ENTRIES is much preferrable.

I said generally as performance will be good by using Ranges in case you have few big ranges. Example : Inclusive Between 100 to 10000... In such case using FOR ALL ENTRIES will take more time to execute.

Read only

Former Member
0 Likes
669

Hi,

it increases. But based on select statement will differ performance .it will not take more time.