Skip to Content
0
Former Member
Nov 03, 2006 at 09:34 AM

Customer Exit for Variables not working

748 Views

Hi All,

I am creating a month to date report. For that I have created 2 variables on 0CALDAY, one with USer Entry and mandatory options and another with Customer Exit, Mandatory and Interval options(not ready for input). I have used the first one for creating a restricted keyfig for daily sales and the other for another restricted keyfig for month to date sales.

The user will input value in the first variable at the runtime and in the customer exit I wrote some code(took help from one of the old forums) to get the values of the start and end dates of the second variable. But the Month to date restricted keyfigs are also showing the same daily sales figs. Below is the code I wrote in the user exit.

CASE I_VNAM.

WHEN 'ZMONTH'.

if I_STEP = 2.

loop at I_T_VAR_RANGE into L_S_VAR_RANGE.

where vnam = 'ZDAY'.

L_S_RANGE-LOW = L_S_VAR_RANGE-low(6).

L_S_RANGE-LOW+6(2) = '01'.

L_S_RANGE-HIGH = L_S_VAR_RANGE-low.

L_S_RANGE-SIGN = 'I'.

L_S_RANGE-OPT = 'BT'.

append L_S_RANGE to E_T_RANGE.

endloop.

endif.

ENDCASE.

Can someone please let me know if I an doing any mistake here.

Thanks,

RPk.