cancel
Showing results for 
Search instead for 
Did you mean: 

Customer Exit issue

former_member190390
Participant
0 Kudos

Hi Experts,

I have a requirement to write customer exit to display Revenue for WeekToDate(WTD), MonthToDate(MTD), QuarterToDate(QTD) and YearToDate(YTD).

We have Time Characteristics: FISCAL WEEK(ZFISCWEEK), 0FISCYEAR, 0FISCVARNT and 0FISCPER.

The report should display the revenue values, for this i have created Restricted Key Figures for each Revenu by restricting with Customer Exit Variable on ZFISCWEEK.

In Filter, ZFISCWEEK should take previous week as default and user can able to select values. After entering this value it should calculate respective Revenues.

Can any one of you provide Customer Exit code for any one of these?

Thanks in advance

Venkatesh

Accepted Solutions (0)

Answers (2)

Answers (2)

ssurampally
Active Contributor
0 Kudos

Hi,

Here I am giving the Sample code to calculate the Revenue, for the YTD.

ZFISCYEAR is the Customer Exit Variable, ZBMONYR is the User entry variable.

WHEN 'ZFISCYEAR'

IF I_STEP = 2.

LOOP AT I_T_VAR_RANGE INTO LOC_T_VAR_RANGE WHERE VNAM = 'ZBMONYR'.

CLEAR L_S_RANGE.

L_S_RANGE-LOW0(4) = LOC_T_VAR_RANGE-LOW0(4).

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

L_S_RANGE-HIGH = LOC_T_VAR_RANGE-LOW.

L_S_RANGE-SIGN = 'I'.

L_S_RANGE-OPT = 'BT'.

APPEND L_S_RANGE TO E_T_RANGE.

EXIT.

ENDLOOP.

ENDIF.

This Code is initilaze the lower Range to Jan month, and the upper range would be the user Selection.

Now Use this Customer Exit Variable in The Restricted Key Fig, You can get the YTD Revenue.

Similarly You can use this logic for all your requirements, Please follow the Following Doc to do so.

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/25d98cf6-0d01-0010-0e9b-edcd4597...

former_member190390
Participant
0 Kudos

Hi,

can you give solution.

Thanks