Question:
I created a variable P_CWEEK (mandatory, ready for input) and I want to populate it with a default week (week 22 in 2005). My problem is that the variable is not populated. It comes up empty.
I wrote the code below in the customer-exit.
CASE i_vnam.
WHEN 'P_CWEEK'.
IF i_step = 1.
LOOP AT i_t_var_range INTO loc_var_range
WHERE vnam = 'P_CWEEK'. "Reporting week
CLEAR l_s_range.
l_s_range-low = '200522'.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
APPEND l_s_range TO e_t_range.
EXIT.
ENDLOOP.
ENDIF.
ENDCASE.
Answer:
First things first: are you sure your variable is of type customer exit and not of type user input? It's only possible with the first...
Answer:
After verifying what TFR has suggested, the next thing to do is to put a breakpoint and debug.
In any case, the code in this user exit is better like this:
case istep.
when 1.
case i_vnam.
when 'P_CWEEK'.
* Code goes here
when 'some other variable'.
endcase.
when 2.
when 3.
endcase.
_________________
Sudhi Karkada