Skip to Content

Text Variable with Outcome showing actual and previous Jahr result

Hi Experts,

i am working on report and would like to implemet the following.

I have create a report which is using a text variable.

I would like:

to select Last year Date for (12.2008) -


> Onbtain Result for 2008 but publishing in the Column header the actual date (01.2009).

How could i realize it?

Thank you for your Input.

Pat

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Feb 25, 2009 at 04:11 AM

    Hi,

    Do you mean that when users select "2008.12", the column header should display one month later, like "2009.01", even the key figures in that column should be "2008.12"?

    The way I can think of is to create another user exit variable, naming it v_newcal.

    Then set v_newcal by adding one month to the original variable.

    In this case you can obtain v_newcal with value "2009.01".

    And when using text variable in that column header, you can assign the data source of that text variable is v_newcal.

    Hope it helps.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 25, 2009 at 04:35 AM

    Hi,

    Use the following Code:

    ZCDAY = Input Variable on 0CALDAY.

    ZCCALDAY = Text Variable .

    Here Whatever you give date then that data will come. Change the code for your requirement.

    ****Begin*****TO get the Date (TEXT VAR) based on ZCDAY Input variable***********
    
        WHEN 'ZCCALDAY' .
          LOOP AT i_t_var_range INTO loc_var_range WHERE vnam = 'ZCDAY'.
            IF sy-subrc = 0.
              CLEAR: l_s_range.
              l_s_range-low+0(2) = loc_var_range-low+6(2).
              l_s_range-low+2(1) = '/'.
              l_s_range-low+3(2) = loc_var_range-low+4(2).
              l_s_range-low+5(1) ='/'.
              l_s_range-low+6(4) = loc_var_range-low+0(4).
              l_s_range-sign = 'I'.
              l_s_range-opt = 'EQ'.
              APPEND l_s_range TO e_t_range.
            ENDIF.
          ENDLOOP.
    
    ****End*****TO get the Date (TEXT VAR) based on ZCDAY Input variable*************

    Thanks

    Reddy

    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.