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: 

code for exit variables variables

Former Member
0 Kudos

Hi experts

how to write customer exit variable code code in SE24.it is implemented in CMOD. but the same code if i write in se24 it's giving errors.i don't know the reason.i am writing the customer exit code is se24.

http://code.google.com/p/simplebwvariables/wiki/DeveloperDoc

In the following example, the current month is taken from an input-ready variable; this is then used to generate an interval that cumulates all months from January (01) up to the current month. The customer exit variable COMMONTH contains the interval as the value.

DATA: L_S_RANGE TYPE RSR_S_RANGESID.

DATA: L_S_VAR_RANGE TYPE RRRANGEEXIT.

CASE I_VNAM.

WHEN 'CUMMONTH'.

IF I_STEP = 2. "after the popup

READ TABLE I_T_VAR_RANGE INTO L_S_VAR_RANGE WITH KEY VNAM = 'MONTH'.

IF SY-SUBRC = 0.

CLEAR L_S_RANGE.

L_S_RANGE-LOW = LOC_VAR_RANGE-LOW(4)."low value, for example, 200601

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.

ENDIF.

ENDIF.

ENDCASE.

Regards

Sruthi Reddy

1 REPLY 1

Former Member
0 Kudos

Sruthi,

I have gone through your coding.

there is a statement

" L_S_RANGE-LOW = LOC_VAR_RANGE-LOW(4)."low value, for example, 200601 "

which should give the issue.

Kindly do as follows :I HAVE added one temp variable p_period and modified the code.

kindly check and get back to me in case of any issue.

DATA : p_period(6).

DATA: L_S_RANGE TYPE RSR_S_RANGESID.

DATA: L_S_VAR_RANGE TYPE RRRANGEEXIT.

CASE I_VNAM.

WHEN 'CUMMONTH'.

IF I_STEP = 2. "after the popup

READ TABLE I_T_VAR_RANGE INTO L_S_VAR_RANGE WITH KEY VNAM = 'MONTH'.

IF SY-SUBRC = 0.

CLEAR L_S_RANGE.

*""""L_S_RANGE-LOW = LOC_VAR_RANGE-LOW(4)." low value, for example, 200601

concatenate LOC_VAR_RANGE-LOW+0(4) '01' into p_period.

L_S_RANGE-LOW = p_period.

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.

ENDIF.

ENDIF.

ENDCASE.