on 06-05-2007 2:36 PM
Dear friends
I am facing an issue with my variable exit.
The business requirement is to be able to retrieve indicators for a week interval for the current year in one column and in another retrieve indicators for the same week interval of the previous year.
When I execute my query in get an error saying no value could be determined for the variable I want to populate.
here is the code of my exit function
DATA: L_S_RANGE TYPE RSR_S_RANGESID.
DATA: LOC_VAR_RANGE like RRRANGEEXIT.
DATA: ZYEAR1(4) type N,
ZYEAR2(4) type N,
ZMONTH1(2) type n,
ZMONTH2(2) type n.
CASE I_VNAM.
WHEN 'Zvar_CALWEEK'.
IF I_STEP = 2. "
read table I_T_VAR_RANGE INTO LOC_VAR_RANGE with key VNAM = 'Zvar_CALWEEKREF'.
LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE WHERE VNAM = 'ZCALWEEKREF'.
IF SY-SUBRC = 0.
CLEAR L_S_RANGE.
ZYEAR1 = LOC_VAR_RANGE-LOW(4).
ZYEAR1 = ZYEAR1 - 1.
ZMONTH1 = LOC_VAR_RANGE-LOW+4(2).
CONCATENATE ZYEAR1 ZMONTH1 INTO LOC_VAR_RANGE-LOW.
L_S_RANGE-LOW = LOC_VAR_RANGE-LOW.
ZYEAR2 = LOC_VAR_RANGE-HIGH(4).
ZYEAR2 = ZYEAR2 - 1.
ZMONTH2 = LOC_VAR_RANGE-HIGH+4(2).
CONCATENATE ZYEAR2 ZMONTH2 INTO LOC_VAR_RANGE-HIGH.
L_S_RANGE-HIGH = LOC_VAR_RANGE-HIGH.
L_S_RANGE-LOW = LOC_VAR_RANGE-LOW.
L_S_RANGE-HIGH = LOC_VAR_RANGE-HIGH.
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'BT'.
APPEND L_S_RANGE TO E_T_RANGE.
ENDIF.
ENDIF.
ENDCASE.
In short I would like to populate my variable based on the first variable ready for input and obligatory.
I thank you in advance
Regards
Boujema
Hi,
Try with following modifications:
ZYEAR1(4) = LOC_VAR_RANGE-LOW(4).
ZYEAR1(4) = ZYEAR1(4)- 1.
ZMONTH1(2) = LOC_VAR_RANGE-LOW+4(2).
CONCATENATE ZYEAR1(4) ZMONTH1(2) INTO LOC_VAR_RANGE-LOW(6).
With rgds,
Anil Kumar Sharma .P
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I found out how to do it thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
read table I_T_VAR_RANGE INTO LOC_VAR_RANGE with key VNAM = <b>'Zvar_CALWEEKREF'</b>. this variable should be your input variable.
not User exit variable.
Put break point and debugg....
Hope it Helps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.