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

need to subtract 2 date field

i need to find delay%

delay% = ((aufk-idat2) - (caufvd-gltrp))/((caufvd-gltrp) - (caufvd-gstrp))* 100.

how to subtract two date field and then divide it.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Dec 10, 2005 at 07:28 PM

    You can just do - (minus).

    For example: if you do (vsy-daum -1), it will give you yesterdays date.

    And lets say, if you do '12/10/2005' - '12/02/2005' it will give you 8.

    then divide it by 100 to bet the percentage.

    Did i answer your question.

    Please close the issue with appropriate points if it helps.

    Good luck.

    Venu

    Add a comment
    10|10000 characters needed characters exceeded

    • Is this what you are looking for?

      
      report zrich_0001
             no standard page heading.
      
      data: aufk-idat2 type sy-datum  value '20051215',
            caufvd-gltrp type sy-datum value '20051210',
            caufvd-gstrp type sy-datum value '20051207',
            delay% type p decimals 2.
      
      delay% = ( ( aufk-idat2 - caufvd-gltrp )
               / ( caufvd-gltrp - caufvd-gstrp ) ) * 100 .
      
      write:/ delay%.
      
      

      Regards,

      Rich Heilman

  • author's profile photo Former Member
    Former Member
    Posted on Dec 11, 2005 at 11:18 AM

    Hi Josephine,

    Use this FM

    RP_CALC_DATE_IN_INTERVAL

    Best Regards,

    Aslam Riaz

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 11, 2005 at 02:12 PM

    Reminder:

    Please close this with appropriate points if the problem is sloved.

    Thanks.

    Venu

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 11, 2005 at 03:45 PM

    Hi,

    Use this function module

    'RP_CALC_DATE_IN_INTERVAL' Add/subtract years/months/days from a date .

    Hope this solves your problem.

    Thanks,

    Naga

    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.