Skip to Content

Current month to end of the year

Hello Experts,

we have a requirement to add some RKF's in Bex to show the Key figure values for Current month to end of the year. Is it possible using Variable exits? Lets say if I run the report this month it should only show Nov and Dec data , where as if I run the same report in Jan it should give Jan till Dec. Please advice

Cheers

--

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Nov 20, 2012 at 06:54 PM

    Hi,

    First of all you need to create two variables:

    1) Manual entry/user input variable-----Single value on 0calmonth.Variable is ready for input.Suppose VAR1

    2) customer exit variable on 0calmonth---Mandatory ----Interval---Lest say VAR2

    Make two RKF's:

    First rkf will be restricted with manual entry variable (Dummy).

    Second one will be restricted with customer exit variable (Main KF)

    Code:

    WHEN 'VAR2'.

    IF I_STEP = 2.

    READ TABLE I_T_VAR_RANGE INTO LOC_VAR_RANGE WITH KEY VNAM = 'VAR1'.
    CLEAR L_S_RANGE.

    L_S_RANGE-LOW = LOC_VAR_RANGE-LOW .

    L_S_RANGE-HIGH(4)= LOC_VAR_RANGE-LOW .

    L_S_RANGE-HIGH+4(2) ='12'.

    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'BT'.

    APPEND L_S_RANGE TO E_T_RANGE.
    ENDIF.

    For more info refer the below snippets.

    http://wiki.sdn.sap.com/wiki/display/Snippets/BI+date,month,year+variable+customer+exits

    Hope that helps.

    Regards,

    AL

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 21, 2012 at 06:18 AM

    Hi,

    This can be easily achieved by variable offset values for the calmonth variable. Use +2 in offset. Create a range variable like calmonth-calmonth+2. This will give Nov and Dec.

    Assign the calyear also to your RKF along with calomonth. So u need to create one more variable for calyear by replacement path. You need to replace the calmonth variable which user enters while executing. Put offset length as 3 in From box and 4 in To box.

    You need not to write any customer exits.

    Regards,

    Suman

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.