Skip to Content
0
Former Member
Apr 20, 2004 at 10:15 PM

Bex customer exit - Variable for YTD-1month

87 Views

What iam trying to do is using a customer exit variable in BW calculate the YTD period minus 1 (if my month is April then I have do YTD till march).

Case i_vnam.

WHEN 'ZPPYTD'.* customer exit variable.

IF I_STEP = 2.

LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE

WHERE VNAM = 'ZPOSTPER'.

*input user variable example 004

CLEAR L_S_RANGE.

L_S_RANGE-LOW = LOC_VAR_RANGE-LOW(3).004

*converting the low value to 001 which is basically Jan.

L_S_RANGE-LOW(3) = '001'.

*calculating for input = 004 then l_cal is 004-001= 003.loc_var_range is used again for finding the high interval.

L_FPER(3) = LOC_VAR_RANGE-LOW.

L_CALC *value is 3 = L_FPER - L_VAL.

V1 = '00'.

CONCATENATE V1 L_CALC INTO L_CAL.

LOC_VAR_RANGE-LOW = L_CAL.

  • Problem area the value calculated for loc_var_range-low is not accepted. I would like to append it with value of l_cal(003).

L_S_RANGE-HIGH = LOC_VAR_RANGE-LOW.

L_S_RANGE-SIGN = 'I'.

L_S_RANGE-OPT = 'BT'.

APPEND L_S_RANGE TO E_T_RANGE.

EXIT.

ENDLOOP.

ENDIF.

ENDCASE.

Has anybody done this kind of exit variable or is there any other way to do it?.

Regards,

Raj