Skip to Content
author's profile photo Former Member
Former Member

Custom Exits

Hi all,

I have a requirement to create a report the compares a current year date range to the previous year - same date range.

Does anyone have a code on how this can be done using an exit. Any Ideas will be welcome.



Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Mar 01, 2007 at 12:33 AM


    welcome to sdn

    u do not always require to use a user exit.. try using offsets...

    if us still want to use the exit variable the scenario will be like this first restriction is using a normal variable for current month... then u can create a second restricted key figure for month using a second variable for which code can be like..

    assuming ur month is in format 200702 yyyymm

    in SE37 tocde open FUNCTION EXIT_SAPLRRS0_001 in in that double click on

    FROM the INCLUDE <b>ZXRSRU01 </b>

    there u can use the code for deriving te desired value... <b>this is just to guide u and may not work.... just correct taking help of any ABAP developer.</b>

    declare a variables for year and month
    Data: lo_zmonth(2) type c.
    Data: lo_zyear(4) type c.
    CASE i_vnam.
    WHEN 'Variable2'.
     check I_STEP = 2.
    read table i_t_var_range into wa_var_range with key vnam = 'Variable1'.
    *value of variable 1 is in wa_var_range-low if its a single value... u can manipulate it
     lo_zmonth = wa_var_range-low+4(2).
      lo_zyear =  wa_var_range-low+0(4).
    lo_zyear = lo_zyear -1.
    if sy-subrc = 0.
    wa_range-sign = 'I'.
    wa_range-opt = 'EQ'.
     concatinate lo_zyear  lo_zmonth into wa_range-low .
    CLEAR wa_range-high.
    APPEND wa_range TO e_t_range.

    hope it helps

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 01, 2007 at 05:34 PM

    Hi PN,

    Please give a look to the doc in below.

    Enable Trend Reporting - By Manipulating Variable Value

    Also the topic in below may be useful for you



    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.