cancel
Showing results for 
Search instead for 
Did you mean: 

Customer exit code needed

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

you dont need any customer exit fot that....in your 0 calmonth characteristic you must set that the value must be <= <variable name> ...

Regards

Former Member
0 Kudos

HI,

send me your id i will send you d document.

Shivu

Former Member
0 Kudos

Hi Friend,

Can u send it to my id ,tapas.das@hotmail.com

Thanks

Former Member
0 Kudos

hi,

sorry for late reply...

my id is ravi.med@gmail.com

thanx

Former Member
0 Kudos

Check out i sended u an document......

Former Member
0 Kudos

Hi Shivu,

I didnt receive the doc ..

ChandranGanesan
Active Contributor
0 Kudos

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

Former Member
0 Kudos

hi

thnx for the reply... shld i create customer exit variable for 0fiscper??

do we have chance like giving the input value after creating variable with customer exit ???

as i dnt have proper knw on exits im bit confused.....

tthnx

ravi

ChandranGanesan
Active Contributor
0 Kudos

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

Former Member
0 Kudos

thnx a lot .. i will try this

Former Member
0 Kudos

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