Skip to Content
0
Former Member
Jul 07, 2006 at 06:49 PM

UserExit For Variable issue..

96 Views

Hi,

I am struggling with my first customer exit for variables in BEx.

In BEx Query user enters Fiscalyear/period : ZPER (e.g.001/2007) in the selection criteria.

And in the rows I want to calculate the versions ZVER for each posting period Jan, Feb, Mar....(0FISCPER-> 1, 2, 3....) in the columns.

Eg.

PPeriod Jan Feb Mar...

Version 3 2 3

The logic is:

If ZPER is GE 0FISCPER then ZVER=3 else posting period is 2.

Can anyone please help me with the code for this.

The exit is : EXIT_SAPLRRS0_001 and include ZXRSRU01.

So far I could manage:

DATA: L_S_RANGE TYPE RSR_S_RANGESID.

DATA: LOC_VAR_RANGE LIKE RRRANGEEXIT.

DATA: PERIOD TYPE d.

CASE i_vnam.

WHEN 'ZVER'.

PERIOD = ZPER(3)

IF I_STEP = 2.

CLEAR L_S_RANGE.

IF PERIOD GE 0FISCPER.

ZVER = 3.

ENDIF.

Can anyone please help me with this code.

Thanks