Skip to Content
author's profile photo Former Member
Former Member

customer exit

can someone help me in understanding this code:

I just like to understand L_S_RANGE. whats the meaning of low, high ,sign, and opt in it?

DATA: L_S_RANGE TYPE RSR_S_RANGESID.

DATA: LOC_VAR_RANGE LIKE RRRANGEEXIT.

CASE I_VNAM.

WHEN 'CUMMONTH'.

IF I_STEP = 2. "after the popup

LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE

WHERE VNAM = 'MONTH'.

CLEAR L_S_RANGE.

L_S_RANGE-LOW = LOC_VAR_RANGE-LOW(4)."low value, e.g.200001

L_S_RANGE-LOW+4(2) = '01'.

L_S_RANGE-HIGH = LOC_VAR_RANGE-LOW. "high value = input

L_S_RANGE-SIGN = 'I'.

L_S_RANGE-OPT = 'BT'.

APPEND L_S_RANGE TO E_T_RANGE.

EXIT.

ENDLOOP.

ENDIF.

ENDCASE.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 27, 2006 at 04:25 AM

    Range is a structure used in selections (for example what you see in selection-screen for select-option, is stored in a similar internal table).

    Low and high contain the values for the range (to be selected), sign can be I or E (which is include / exclude the values ) and option can have a value from a set (eg CP ->Contains pattern, BT>Between, EQ>Equal to, NE-->Not equal to).

    So, if for a date field, I fill

    low = 20050901

    high = 20050930

    sign = 'E'

    option = 'BT'

    I can use this range table in a select statement (eg select .... where aedat in l_s_range) which will get me all records with field value between 20050901 and 20050930.

    In the specified code, it is reading the value entered for variable MONTH and takes its year value (2006 for example) and builds a selection from first month of the year to the month entered by the user.

    ie if the user entered 200609 for the variable month, it build a selection for variable CUMMONTH which will select all values from 200601 to 200609.

    Message was edited by: Ajay Das

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.