I need FM calc. days/months/years between 2 dates but computes the work day

I need FM calc. days/months/years between 2 dates but computes the work day.
someone knows ?

Hi,
The FM is 'FIMA_DAYS_AND_MONTHS_AND_YEARS'
Check the following example:
DATA: EDAYS   LIKE VTBBEWE-ATAGE,
      EMONTHS LIKE VTBBEWE-ATAGE,
      EYEARS  LIKE VTBBEWE-ATAGE.
PARAMETERS: FROMDATE LIKE VTBBEWE-DBERVON,
            TODATE   LIKE VTBBEWE-DBERBIS DEFAULT SY-DATUM.
call function 'FIMA_DAYS_AND_MONTHS_AND_YEARS'
  exporting
    i_date_from          = FROMDATE
    i_date_to            = TODATE
  I_FLG_SEPARATE       = ' '
  IMPORTING
    E_DAYS               = EDAYS
    E_MONTHS             = EMONTHS
    E_YEARS              = EYEARS.
WRITE:/ 'Difference in Days   ', EDAYS.
WRITE:/ 'Difference in Months ', EMONTHS.
WRITE:/ 'Difference in Years  ', EYEARS.
INITIALIZATION.
FROMDATE = SY-DATUM - 60.
Regards,
Bhaskar

Similar Messages

  • How to get days , months , years between two dates with groovy

    I've a table that contains Start Date and End Date and I want to get the difference between then in this format 2 days , 1 moth , 1year
    Can I make this with Groovy
    I've added a transient attribute to a view object and make its value      return (EndDate) - (StartDate); but this returns the difference of days like 200 day
    I want it in this format 2 days , 1 moth , 1year

    AFAIK - You cannot do it in groovy.
    You can achieve the same using the transient variable approach.
    Create a VORowImpl Class for VO, and in the getter method of the transient variable - do the necessary logic and return the string as required in your use-case.
    Thanks,
    Navaneeth

  • How to calculate the month difference between two date char. in Query?

    Customers would like to see how many months passed between two date type of characteristics (e.g., the month difference between the current date and the scheduled delivery date in the record) and put the result into the column as KF. 
    We would have to grab the fiscal year/period kind of value and then do the subtraction, e.g., if the current date value is 2/28/2008 and the scheduled delivery date value in the record is 12/01/2007, the correct result should be 2 month difference between these two date values, but could someone here give us the technical light on how to make this happen in query design?
    Thanks and we will give you reward points for the correct anwsers!

    Hi Kevin,
    The Badi is RSR_OLAP_BADI.
    You can create an implementation using Transaction  SE18.
    The implementation is per cube and is defined in the filters.
    In the Implementation you have the following methods :
    1. Define : Here you will provide the Keyfigure you need as a virtual one.
    2. Initilialize : Any Init Function you want to do.
    3. Compute. This is called per datarecord and here you can cimpute your value.
    Hope this helps.
    Pralay Ahluwalia

  • Calculating years between 2 date fields

    I am trying to build a form in LiveCycle Designer 7 to report missing persons.  I would like to populate a text field with the number of years between two dates entered in date/time fields; specifically using a missing person's DOB and the date they were last seen to calculate their age when last seen.
    Any assistance would be greatly appreciated.
    Thanks
    Drew

    Greetings,
    I need an age in months and years.
    On my LiveCycyle form I have two date fields 'dob' and 'rdtestdate'.  I am in Australia so we use dd/mm/yyyy as the format.
    The field designated to display the calculated result -- 'rdage' -- is set as a calculated-read only text field.
    What javascript/formcalc code would I use to calculate the age in years and months, please?
    I've been studying and testing the various solutions but don't understand well enough, sorry!  When I paste in a sample and change the field names to match mine, my result remains empty.  Sometimes I get a failed script message as I try to save the form.    I've tried quite a few different scripts to no avail.
    Thanks for any assistance.
    jeannie

  • Is there a way to repeat an activity in the calendar monthly on the same day, i.e., the 2nd Wednesday of each month?  I can repeat on the date but not the day of the month.

    Is there a way to repeat an activity in the calendar monthly on the same day, i.e., the 2nd Wednesday of each month?  ( I can repeat on the date but not the day of the month.)

    Not with the stock calendars app.

  • When i turn on itunes, it crashes automatically with the error message saying "itunes has encountered a problem and needs to close." I've tried reinstalling itunes but its the same. CAN SOMEONE PLEASE HELP!!!

    when i turn on itunes, it crashes automatically with the error message saying "itunes has encountered a problem and needs to close." I've tried reinstalling itunes but its the same. CAN SOMEONE PLEASE HELP!!!

    Try:
    iOS: If you can't back up or restore from a backup in iTunes

  • Just upgraded to Office 365. Reinstalled my Acrobat 7.0 standard. All I need to do is convert office files to pdf but it wont work. Any suggestions?

    Just upgraded to Office 365. Reinstalled my Acrobat 7.0 standard. All I need to do is convert office files to pdf but it wont work. Any suggestions?

    Hi,
    Acrobat 7 is not tested with Office 365. However your PDF Printer is working fine then you can print your office files to it.
    Regards,
    Anoop

  • I need to download photoshop elements on my new laptop but lost the installation disc...

    I have the serial number and solution disk and everything it came with BUT the installation disc. How do I download it on my new laptop without installation disk?

    it is PSE 9
    Krista Pandiscio
    Date: Wed, 22 Jan 2014 10:43:31 -0800
    From: [email protected]
    To: [email protected]
    Subject: I need to download photoshop elements on my new laptop but lost the installation disc...
        Re: I need to download photoshop elements on my new laptop but lost the installation disc...
        created by Barbara B. in Photoshop Elements - View the full discussion
    It would help if you would tell us which version. If it's PSE 12, just install the trial and enter your serial number into that.
         Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/6040988#6040988
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/6040988#6040988
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/6040988#6040988. In the Actions box on the right, click the Stop Email Notifications link.
               Start a new discussion in Photoshop Elements at Adobe Community
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0.

  • The calendar typeface is so dim, I can barely read it. Name of days and date, but not the items I put in. Apple says they have no fix. Anyone else have this problem? Any solutions?

    The calendar typeface is so dim, I can barely read it. Name of days and date, but not the items I put in. Apple says they have no fix. Anyone else have this problem? Any solutions?

    I agree and I found your post because I did a google search ical typeface dim.
    If I find anything out, I will post back here.

  • I need to re install my printer to my laptop, but lost the disc for MX410.

    I need to re install my printer to my laptop, but lost the disc for MX410.

    Hi morineb,
    The latest drivers for the printer can be downloaded from the Canon USA website.  Please click here to go to the Drivers and Software page for the PIXMA MX410.  Once on the initial download page for your model, please do the following:
    1. Verify that the operating system detected in the "OPERATING SYSTEM" drop-down menu is correct, and if it is not, please click the drop-down menu to select your operating system.
    2. Next, please click on the red arrow next to the "RECOMMENDED DOWNLOADS" section and click the MP drivers file. When you do, a red DOWNLOAD button will appear. Please click on the checkbox below the DOWNLOAD button, then click the red DOWNLOAD button to begin the download. The time for the download process may vary depending on the speed of your Internet connection and the size of the file being downloaded.
    Once you have downloaded the MP drivers file, please double-click on it and follow the prompts to reinstall the printer on your computer.
    Hope this helps!
    Did this answer your question? Please click the Accept as Solution button so that others may find the answer as well.

  • An icon has appeared on my desktop called colour sync utility.  I clicked on it, and it came up with information about needing to repair something which I tried to do but it didnt work. What is this and shouldI be worried ?

    An icon has appeared on my desktop called colour sync utility.  I clicked on it, and it came up with information about needing to repair something which I tried to do but it didnt work. What is this and shouldI be worried ?

    The Color Sync Utility is part of OSX and usually resides in the Application/Utilities folder.
    Don't know how it appeared on your desktop.
    But it is no malware, spyware or the like but as said part of OSX.
    http://docs.info.apple.com/article.html?path=Mac/10.6/en/8476.html
    Stefan

  • Need to display "Calendar Month/Year" at report level from Calendar Day

    Hello Experts,
    I have a scenario in which I have 0CALDAY (e.g. 01.01.2009) along with other fields available in my report. My requirement is to display "Calendar Month/Year" (01.2009) in my report. Is it possible to have "Calendar Month/Year" in my report from 0CALDAY, by making changes to the query, as I cannot remodel the underlying InfoCube.
    Many Thanks,
    VA

    What you mean with huge - 100 Mio dataset?
    The import of the new infocube will be also take a long time - the database must be insert a new field for every dataset.
    => is this a big infocube, then don't use virtual infoobjects.
    => on a big infocube is important to have a good datamodel - please insert always all 11 infoobjects for the time dimension.
    Sven

  • FM to get previous fiscal month/year and calendar month/year for a date.

    Hi All,
    I am having a requirement to extract some data based on either the previous fiscal month/year or the previous calendar month/year. There is no company code input to find the fiscal/calendar month/year.
    At selection screen, user can select either fiscal or calendar selection.
    Based on the selection, the data will be extracted.
    For the system date, we need to calculate previous fiscal month/year or previous calendar month/year and populate the calculated data back to the selection-screen.
    Can you one of you please suggest an FM to find previous fiscal month/year and previous calendar month/year.
    Thanks in Advance,
    Regards
    Gowthami

    Hi Gowthami,
    You can use following function module to calculate previous / next day or month or year.
       call function '/SAPHT/DRM_CALC_DATE'
          exporting
            date      = sy-datum
            days      =
            months    =
            sign      = '-'
            years     =
          importing
            calc_date = .
    Here, you can give '-' to sign, if you want previous day / month / year.
    Here, you can give '+' to sign, if you want next day / month / year.
    And depending upon your requirement, you can pass suitable value to days / month / year.
    e.g. To calcualte last month,
       call function '/SAPHT/DRM_CALC_DATE'
          exporting
            date      = sy-datum
            days      =
            months    = 1
            sign      = '-'
            years     =
          importing
            calc_date = wv_prev_month.
    so it will give '23-01-2008' . Then convert it in the required format as per your requirement using string function concatenate.
    Hope this help you.
    Regards,
    Anil

  • Schedule Monthly Reports with Dynamic Dates, but also allow Ad-Hoc Running

    Post Author: Dan-Mica
    CA Forum: General
    I am trying to find a way to schedule a report that has an as_of_date, and a start and end date.
    When running monthly it will be scheduled to run on the 11th of each month.  The as of date will be the 10th of the month.  The start date will be the first day of the year and the end date will be the last day of the previous month.
    I have written the report using date functions to calculate the correct dates, and this can be scheduled.
    Now the users are asking to be able to run ad-hoc versions of the report and choose the dates that they use.
    What I don't know how to do is to schedule the job to run monthly as above, but also allow the users to choose the start and end dates and as of dates for the report? 
    Besides writting two versions of the reports is there another way to do this???
    Thanks for the help....

    Hi,
    U can use Infoset Query for report in HR. T-Codes are SQ03, SQ02 AND SQ01. By SQ03 create user group. then SQ02 -infoset and by SQ01 create reports.
    try this. it works.
    Regards
    Nas

  • Why cant i get street view on google maps since installing mountain lion everytime i try i get a message saying i need to download latest flash player i do this but still doesnt work

    since installing mountain lion i am unable to get street view on google maps
    it asks me to download latest flash player to view street view which i do but still no joy

    Hi, see if it's related to this...
    About Safari 5.1.7 and Leopard Security Update 2012-003
    Summary
    Learn about Safari 5.1.7 and Leopard Security Update 2012-003.
    Products Affected
    Mac OS X 10.5, Product Security, Safari 5.1 (Mac OS X 10.6), Safari 5.1 (OS X Lion)
    Safari 5.1.7 for OS X Lion, Safari 5.1.7 for OS X Snow Leopard, and Leopard Security Update 2012-003 disable out-of-date versions of Adobe Flash Player.
    Out-of-date versions of Adobe Flash Player do not include the latest security updates and will be disabled to help keep your Mac secure. If Safari 5.1.7 or Leopard Security Update 2012-003 detects an out-of-date version of Flash Player on your system, you will see a dialog informing you that Flash Player has been disabled. The dialog provides the option to go directly to Adobe's website, where you can download and install an updated version of Flash Player.
    Additional Information
    If you need to re-enable an out-of-date version of Flash Player, you can do the following:
    1. Navigate to the /Library/Internet Plug-Ins (Disabled) folder.
    2. Drag "Flash Player.plugin" into /Library/Internet Plug-Ins.
    3. If the browser is running, quit and restart it.
    http://support.apple.com/kb/HT5271

Maybe you are looking for

  • How do you Place rtf files from LibreOffice into InDesign CS6

    I am new to InDesign CS6. I am having a problem Placing LibreOffice rtf files into InDesign. I am using LibreOffice 4.3.2.2, Lotus WordPro, and Windows 7. I am saving my work in rtf files. Each page has two columns. Placing rtf files from WordPro int

  • Officejet Pro 8600 Software Will Not Run

    I updated my computer to Windows 7 and installed the software for my Officejet Pro 8600. Setting up and connecting the printer was not a problem. When I went to run the program it would not start. I downloaded the 64 bit program and went through the

  • Im downloading bridge cc and its stuck on 42 % for two days ... ?

    i have tried to find the file so i can uninstall and try again but cant find it ?

  • XML-Type and reference to unavailable DTD causes validation problems

    Hi, I'm fairly new to Oracle's XML features. I've created a view that produces XML from a number of tables. The resulting XML is used to be stored on a web site for download by customers (this is a manual process about once a week via a CMS). It cont

  • PDF Binder - OutOfMemoryError

    Hello Everyone, We are using Oracle BI (XML) Publisher in our application for PDF Book binding (PDFBookBinder). We are running into OutOfMemoryError while binding number of pdf files greater than 1500. We have tried all the following combinations and