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

Time Characteristics: MTD and Yesterday (How to adjust for different times

Hi,

I have this report which runs daily without any user input based on

Current Calendar Day (SAP Exit)-1 [for column 1 on the report]

and

Current Calendar Month [for column 2 on the report]

If today I want to run this report for the Jan 20, 2006 how best can this be done without the need for writing ABAP code?

i.e. I want on the report, column 1 as Yesterday(Jan 19, 2006)

and column 2 MTD (Jan 20, 2006)

Any help?

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jul 01, 2007 at 07:01 AM

    Dear Amanda,

    The variables you have mentioned, 0DAT and 0CMONTH, always restrict your query result on the current calendar day respectively the current month. They cannot be used if you want to restrict on a different date which is not an offset to the current date.

    Of course, if the date "January, 20th 2006" is a fixed date, you could restrict on it in your query "hardcoded". Or you could use a replacement path variable, if another query gives you the correct date.

    But I guess that your requirement is not that simple. Unfortunately, I do not see a solution apart from creating a customer exit variable.

    Greetings,

    Stefan

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Dear Amanda,

      The restriction on key figures is done in a similar way as the restriction on characteristics.

      I guess that you have a characteristic 0CALDAY "Calendar Day", which is restricted by variable 0DAT. By this you have defined the subset of your InfoProvider, on which you want to report.

      Now, add the key figure which you want to restrict by a fixed date. Select "Edit" from the key figure's context menu and drag 0CALDAY upon the key figure. Restrict 0CALDAY by "January, 29th 2006". Add the same key figure a second time and restrict it by variable 0CALMONTH. Add the same key figure a third time and restrict it by the fixed time frame "January, 1 2006" to "January, 20th 2006".

      This should work as you intended. If you have more than one key figure which has to be restricted in this way, it could be more appropriate to create a second structure with the above mentioned restrictions instead of restricting the key figures directly.

      Greetings,

      Stefan

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.