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

Difference in date

Hi all,

How will I get the difference of Current date and basic start date(Current date - Basic strat) date in the query.

I am getting Basic Start date. User will enter Current date in the selection Variable.

Please help.

Regards,

sunny

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Nov 11, 2009 at 07:29 PM

    Hi

    Create a new variable for (Current date - Basic strat) say ZDATE as Customer exit variable.

    in the EXIT_SAPLRRSOO_001 (Se37 in the include structure write a logic wich reads the current data - Basicstart date) using the variable name ZDATE.

    now the diffrence of the date will be calculated and the data for that data will be displayed.

    santosh

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 11, 2009 at 06:28 PM

    Create a Formula Variable for Basic Start Date as you normally would. For the Current Date, you would create the Variable for the end-user input and then create a Formula Variable, but instead of using Key in the Replace With on the Replacement Path tab, use Variable and then select the Variable that you created for this date characteristic.

    Then create a CFK to calculate the difference between the two dates.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      How will I create variable for User end input. If I create that variable on some characteristic it will check that particular date on that char and the query will be executed based on that. May be I am not clear again what you meant to say. Can you please provide me steps for the current day variable and how to give it in a replace with option

      Regards,

      Sunny

  • Posted on Nov 12, 2009 at 03:30 AM

    Hi,

    If is very simple using customer exit code..

    create one Custome exit varible using formula variable and pass SY-DATUM and create a formula varible on Basic Start and do simple subtraction in report see the "Calculating the Ageing of the Materials" Article it will resolve your problem

    https://wiki.sdn.sap.com/wiki/display/profile/Surendra+Reddy

    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/business-intelligence/a-c/calculating%20the%20ageing%20of%20the%20materials.pdf

    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.