Application Development 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: 

regarding usage of ranges in parameters

Former Member
0 Kudos

Hi frnds,

I have checked ur solution but my requirement is like i have to use ranges which i have tried the same way as u suggested and got it.

now i m in confusion that how shuld use these ranges in parameters.

and eventually use these in the select statement where condition.

what i have done i m putting through.

<code>

ranges : date1 for sy-datum,

date2 for sy-datum.

date1-sign = 'I'.

date1-option = 'BT'.

date1-low = sy-datum + 1. "tommorrows date

date1-high = sy-datum + 60. "60 days later.

APPEND date1.

date2-sign = 'I'.

date2-option = 'BT'.

date2-low = date1-low + 61. "61days after of tomorrow

CALL FUNCTION 'MONTH_PLUS_DETERMINE'

EXPORTING

months = '6'

olddate = date2-low

IMPORTING

NEWDATE = date2-high.

APPEND date2.

so any help frnd.

regards,

satish

3 REPLIES 3

Former Member
0 Kudos

Hi Satish,

Ranges : are being used to assign some default values in the program,its like a select-option,

if you declare it as select option, user have rights to change them before processing the program. where as in Ranges you will define them in program logic.internally you can use them.. say for example.. i wanted to assign some material numbers, based on thease material numbers i wanted to fetch the data..

Ranges: R_MATNR FOR MARA-MATNR.

R_MATNR-LOW = '1000'.

R_MATNR-HIGH = '2000'.

R_MATNR-SIGN = 'I'.

R_MATNR-OPTION = 'BT'.

APPEND R_MATNR.

SELECT MATNR WERKS LGORT

FROM MARD

INTO TABLE ITAB

WHERE WERKS IN R_MATNR.

cheers,

Hema.

Former Member
0 Kudos

Hi Satish, also go through this, will be of some help.

Due to buffering of huge database table with more number of records from one program then other program do update that database table In other application server then due BUFFER-SYNCHRONIZER which can read DDLOG table and REFRESH the records relevant to that larger database table. So, due to reload of table to application servers it consumes more time.

So, to improve database performance in our program we use NUMBER-ranges.

Here it is maintained in one of database table(NUMBERRANGE TABLE) with current level belongs to one NUMBERRANGE GROUP.

AS u know for a document consist number of records then due to number ranges then for each record at application server can assigned with unique identification number which can belongs to number range group current level read from number range table in database.

And while data can updated to that database table can be stored to that table and new number range level group with number ranges can written to database number range table.

So, for next document they get new unique identification number. And no need of buffering of that huge table with old-records (already available at application server with unique identification number). This avoids buffering of database table. So, database traffic is reduced and no need have refresh of data relevant to that huge table. So, performance can increase.

kindly reward if found helpful.

cheers,

Hema.

Former Member
0 Kudos

Hi Satish,

Ranges are data objects that are similar to select-options in functionality.

Select-options are selection screen data objects and user can fill in the data. Ranges are data objects in the program and user has no control over them. Programmer can fill in the ranges either from the select-options or can fill them using other criteria programmatically.

Ranges can be used in a similar fashion as select-options as far as data selection using SELECT statement and other logical expressions are concerned. Operator IN can be used for using ranges in statements.

In addition, they can also be used to submit a report dynamically by passing the pre-filled ranges to the selection-options of the submitted report in the SUBMIT statement. So, ranges are used internally in the program and are filled internally in the program.

Hope this helps.

Thanks

Sanjeev