cancel
Showing results for 
Search instead for 
Did you mean: 

Customer Exit for 0P_KEYD2

Former Member
0 Kudos

Hi All,

I am trying to write copy the logic from the customer exit variable 0P_KEYD2-Posting Key Date, following is the code for 0P_KEYD2:

DATA:

LS_RA_SID TYPE RSR_S_RANGESID,

L_THX_VAR TYPE RRO01_SX_VAR.

REFRESH E_T_RANGE.

IF I_STEP EQ 0. " without popup set to sy-datum

CLEAR: LS_RA_SID.

LS_RA_SID-SIGN = 'I'.

LS_RA_SID-OPT = 'EQ'.

LS_RA_SID-LOW = SY-DATUM.

APPEND LS_RA_SID TO E_T_RANGE.

ELSEIF I_STEP EQ 1. " before popup appears

" set to nothing so we get called

" a second time after popup has

" appeared

ELSE. " after popup has appeared

" same as variable 0P_KEYDT

READ TABLE I_THX_VAR WITH TABLE KEY VNAM = '0P_KEYDT' INTO L_THX_VAR

.

IF SY-SUBRC EQ 0.

E_T_RANGE[] = L_THX_VAR-RANGE[].

ENDIF.

ENDIF.

I know that For LS_RA_SID we can use l_s_range, but for L_THX_VAR what do i use in EXIT_SAPLRRS0_001 do i use the the same L_THX_VAR.

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

dielom
Active Contributor
0 Kudos

Hi,

You can use the same variable with the same definition. The name you use it wouldn't affect the program. you can just copy the code and it should work.

Hope this helps.

Regards,

Diego

Former Member
0 Kudos

Thank You.

Former Member
0 Kudos

I tried the same code but its giving an error saying that the L_THX_VAR is not recognized even though i declared it. can any one let me know what modifications need to be made to the above code.any help is really appreciated.

Message was edited by: shetty s

dielom
Active Contributor
0 Kudos

Hi,

Include this on your program:

DATA: L_THX_VAR TYPE RRO01_SX_VAR.

Hope this helps.

Regards,

Diego

dielom
Active Contributor
0 Kudos

Hi Shetty,

Try with another name, and check if the declaration is made on top of the program. Otherwise, post the code you are using and i'll take a look to it.

Regards,

Diego

Answers (0)