Hi Experts,
In my requirement, i need to display particular month that user has entered in the selection screen as header for the column (Eg : APRIL).
For that, i have created "Y1" variable for 0CALDAY as user input (Mandatory) and I have created a Text Varaible "Y2" with Customer Exit (optional).
I have written the below code, But it is not working. Even i set the breakpoint, the curser is not coming to the point.
Please need help to resolve this issue. Rewarding points will be given.
data:zdate type sy-datum,
zdate1 type sy-datum,
zmonth type table of t247,
wa type t247,
zdate2(2) type c,
zmonth1(10) type c,
LOC_VAR_RANGE LIKE RRRANGEEXIT.
*Break-point
IF i_step = 2.
*Break-point
CASE i_vnam.
WHEN 'Y2'.
LOOP AT i_t_var_range INTO loc_var_range WHERE vnam = 'Y1'.
CLEAR: l_s_range.
ZDATE2 = loc_var_range-low.
CALL FUNCTION 'MONTH_NAMES_GET'
EXPORTING LANGUAGE = SY-LANGU
* IMPORTING * RETURN_CODE = TABLES
MONTH_NAMES = zmonth.
* EXCEPTIONS
* MONTH_NAMES_NOT_FOUND = 1
*OTHERS = 2 .
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
read table zmonth[] into wa with key mnr = zdate2.
if sy-subrc = 0.
zmonth1 = wa-ltx.
l_s_range-low = zmonth1.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
APPEND l_s_range TO e_t_range.
endif.
ENDLOOP.
ENDCASE.
ENDIF.
To get break-point work:
1. Set a breakpoint in exit (directly in code or dynamic).
2. Open new window in SAPLogon.
3. Run rsrt there, open your query and execute it.
4. Execution must stop at your breakpoint.
If not so - you must check the place where you write this code
(CMODE, Component RSR00001, FM EXIT_SAPLRRS0_001, INCLUDE ZXRSRU01). Maybe project in CMODE is not active, activate it.
Change code and in place of
ZDATE2 = loc_var_range-low.
write
ZDATE2 = loc_var_range-low+4(2).
And activate above code.