on 03-17-2008 12:16 PM
hi gurus,
i have a req ...if i select month may ,the report should be displayed from jan.. what ever the month we give the report shld be displayed from january ...i knw that we shld write some customer exit code for getting this ..an any one plz give me the code and help me in creating this exit.....
thanx in advance
Ravi
you dont need any customer exit fot that....in your 0 calmonth characteristic you must set that the value must be <= <variable name> ...
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
send me your id i will send you d document.
Shivu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Ravi,
Here is the code and comment lines are bolded
' Declare this in the top
data : v_startmon(6) type n,
v_endmon(6) type n,
' Include this in the case statement
when 'VarName'.
v_year = sy-datum(4).
v_mon = sy-datum+4(2) - 1.
' If the month is Jan
IF v_mon = '00'.
CONCATENATE v_year '01' INTO v_startmon.
CONCATENATE v_year '01' INTO v_endmon.
ELSE.
CONCATENATE v_year '01' INTO v_startmon.
CONCATENATE v_year v_mon INTO v_endmon.
EndIF.
clear l_s_range.
l_s_range-low = v_startmon.
l_s_range-high = v_endmon.
l_s_range-sign = 'I'.
l_s_range-opt = 'BT'.
append l_s_range to e_t_range.
The above will get the user input from variable and finds gives you from Jan to the user input month
Thanks
Chandran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Ravi,
Create a Variable for 0CALMONTH, and use this code,
' Declare this in the top
data : v_startmon(6) type n,
v_endmon(6) type n,
' Include this in the case statement
when 'VarName'.
' Step 2 will execute after the user Input
if i_step = 2.
v_year = sy-datum(4).
v_mon = sy-datum+4(2) - 1.
' If the month is Jan
IF v_mon = '00'.
CONCATENATE v_year '01' INTO v_startmon.
CONCATENATE v_year '01' INTO v_endmon.
ELSE.
CONCATENATE v_year '01' INTO v_startmon.
CONCATENATE v_year v_mon INTO v_endmon.
EndIF.
clear l_s_range.
l_s_range-low = v_startmon.
l_s_range-high = v_endmon.
l_s_range-sign = 'I'.
l_s_range-opt = 'BT'.
append l_s_range to e_t_range.
Endif.
Please see this for
[User Exits in SAP BW|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/23f2f094-0501-0010-b29b-c5605dbdaa45]
[User Exit Examples|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/6378ef94-0501-0010-19a5-972687ddc9ef]
Also see this
[Dependencies for Variables of Type Customer Exit |http://help.sap.com/saphelp_nw04/helpdata/en/1d/ca10d858c2e949ba4a152c44f8128a/content.htm]
Thanks
Chandran
Edited by: Chandran Ganesan on Mar 17, 2008 1:57 PM
Hi,
DATA : YEAR(4),
MONTH(6).
CASE I_VNAM.
WHEN 'YVAR2'.
IF I_STEP = 2.
LOOP AT I_T_VAR_RANGE INTO XTAB WHERE VNAM = 'YVAR1'.
CLEAR YEAR,MONTH.
YEAR(4) = XTAB-LOW+0(4).
L_S_RANGE-HIGH = XTAB-LOW.
L_S_RANGE-SIGN = 'I'. "'I'.
L_S_RANGE-OPT = 'BT'. "'EQ'.
CONCATENATE YEAR '01' INTO MONTH.
L_S_RANGE-LOW(6) = MONTH(6).
ENDIF.
APPEND L_S_RANGE TO E_T_RANGE.
EXIT.
ENDIF.
Regards,
Anil Kuamr Sharma .P
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.