Function Module to calculate age

Hi Abapers,
Kindly suggest some function module which can calculate age of a person by taking date of birth till date.
Thanks in advance,
Radhika

Hi Radhika,
Check this program
REPORT ZTEST.
DATA : BIRTH_DATE LIKE SY-DATUM,
       DAYS TYPE NUM2,
       MONTHS TYPE NUM2,
       YEARS TYPE NUM2.
BIRTH_DATE = '19830307'.
CALL FUNCTION 'HRCM_TIME_PERIOD_CALCULATE'
  EXPORTING
    BEGDA         = BIRTH_DATE
    ENDDA         = SY-DATUM
  IMPORTING
    NOYRS         = YEARS
    NOMNS         = MONTHS
    NODYS         = DAYS
  EXCEPTIONS
    INVALID_DATES = 1
    OVERFLOW      = 2
    OTHERS        = 3.
WRITE : / YEARS , 'years' , MONTHS , 'months' , DAYS , 'days'.
Regards,
Satish

Similar Messages

  • Function Module to calculate Open Contract Quantity

    Hi All,
    Is there a function module to calculate Open Contract Quantity?
    Thanks.

    Hi Ravi,
    Thanks for the reply.
    For this FM, i need to pass the Sales Doc Number. Is there an FM where i can pass the contract number?
    Best regards,
    Sindy

  • Function module to calculate available budget

    Hi everyone
    Is anybody aware if there is any function module which calculates the available budget from the report alr_87013558?
    thanks and kind regards

    thanks Paolo
    yea, i tried to debug that report but in vain
    is there any other way?
    I could get the value assigned, the budget value but not the actual
    So was wondering if anybody can help me
    thanks for your help

  • Function module to calculate Estimate delivery lead time

    Hi Experts,
    It's ugrent.
    In APO System,
    I need a function module to calculate the estimated delivery lead time, The estimate delivery lead time is the time in weeks between the current date and the estimated delivery date. This is rounded up to the next integer value.
    Thanks in advance,
    Regards
    Adil

    Hi Vishal,
    I've declared two variables
    DATA: LDATE(20),
               LTIME(20).
    CALL FUNCTION 'GET_SYSTEM_TIME_REMOTE'
    IMPORTING
      K_DATE        =
      K_TIME         =
       L_DATE         = LDATE
       L_TIME          = LTIME
    AND IN THE FORM HEADER I'VE GIVEN IT AS,
    WA_HEADER-TYP  = 'S'.
    WA_HEADER-INFO = ': Date'.
    WA_HEADER-KEY  = LDATE.
    APPEND WA_HEADER TO IT_HEADER.
    WA_HEADER-TYP  = 'S'.
    WA_HEADER-INFO = ': Time'.
    WA_HEADER-KEY  = LTIME.
    APPEND WA_HEADER TO IT_HEADER.
    STILL IM NOT GETTING WAT ELSE IS REQUIRED ?

  • Function module to calculate Variable-Size Item

    I am creating a report for manual reservation. User wants to calculate quantity of material if he enters size1, size2 and size3. Also he wants that a formula key option to be provided so that he can mention conversion formula. Is there any standard function module to calculate quantity?

    Hi Vishal,
    I've declared two variables
    DATA: LDATE(20),
               LTIME(20).
    CALL FUNCTION 'GET_SYSTEM_TIME_REMOTE'
    IMPORTING
      K_DATE        =
      K_TIME         =
       L_DATE         = LDATE
       L_TIME          = LTIME
    AND IN THE FORM HEADER I'VE GIVEN IT AS,
    WA_HEADER-TYP  = 'S'.
    WA_HEADER-INFO = ': Date'.
    WA_HEADER-KEY  = LDATE.
    APPEND WA_HEADER TO IT_HEADER.
    WA_HEADER-TYP  = 'S'.
    WA_HEADER-INFO = ': Time'.
    WA_HEADER-KEY  = LTIME.
    APPEND WA_HEADER TO IT_HEADER.
    STILL IM NOT GETTING WAT ELSE IS REQUIRED ?

  • Function Module to calculate pallets

    Hi,
    I need a Function Module to calculate pallets for free of charge articles while creating a sales order.
    can someone name any FM for this purpose.
    Thanks in advance

    Hi Abhishek,
    Check FM L_PALLET_SUGGESTION.
    Hope this helps.
    Thanks
    Lakshman

  • Function module to calculate due date of FI document

    Hi All
    I need a function module to calculate the due date of FI document considering BSId Zterm ( Payment terms ) Document date , Basline date .
    Regards,
    chitra

    call function 'FI_TERMS_OF_PAYMENT_PROPOSE'
      exporting
        i_bldat         = gv_bldat
        i_budat         = gv_budat
        i_cpudt         = sy-datum
        i_zfbdt         = gv_zfbdt
        i_zterm         = gv_terms_paym
        i_bukrs         = gv_comp_code
      importing
        e_zbd1t         = gv_zbd1t
        e_zbd2t         = gv_zbd2t
        e_zbd3t         = gv_zbd3t.
    faede-shkzg = 'H'.
      faede-koart = 'K'.
      faede-zfbdt = gv_zfbdt.
      faede-zbd1t = gv_zbd1t.
      faede-zbd2t = gv_zbd2t.
      faede-zbd3t = gv_zbd3t.
      faede-bldat = gv_bldat.
      call function 'DETERMINE_DUE_DATE'
        exporting
          i_faede = faede
        importing
          e_faede = faede.
    *    if sy-subrc eq 0.
      duedate = faede-netdt. <<<<<< ------

  • Function module to calculate capacity requirements of production order

    HI
    Hav a requirement to calculate capacity requirement  for production orders like we see in cm50... does anyone know a function module to calculate capacity requirement?

    Hi All,
    Just to reopen this issue, even I am looking for a similar functionality.
    To reinstate the requirement:
    I want to find shifts and corresponding capacities for a work center. These details are obtained from CR03 and CR13 transaction.
    If possible do let me know Function module or tables for the same.
    Debs

  • Function module to calculate withholding taxes

    Hi all,
    Can anyone please tell me if there is any function module to calculate withholding taxes?
    Thanks,
    Diogo LF Moreira

    Hi,
    You can use the function module FI_WITHHOLDING_TAX_CALCULATION
    Regards,
    SDNer

  • Function module to calculate WBS Remaining Plan

    Hi all,
    Is anyone know if there is Function Module to calculate WBS remaining plan?
    thanks,
    libl69

    Try function MD_CONVERT_MATERIAL_UNIT
    the table of UOM's is MARM.
    Doug

  • What is the function module to calculate "years of services" in HR?

    What is the function module to calculate "years of services" in HR?

    hi ,
    following function module will help you to find the years of service
    CALL FUNCTION 'HR_HK_TOTAL_YOS' "HR-HK: Calculate an employee's total years of service
      EXPORTING
        years1 =                    " pea_scryy     Years of service
        months1 =                   " pea_scrmm     Months of service
        days1 =                     " pea_scrdd     Days of service
        years2 =                    " pea_scryy     Credit years of service
        months2 =                   " pea_scrmm     Credit months of service
        days2 =                     " pea_scrdd     Credit days of service
      output_format = '01'        " char2         Format to display the output
      IMPORTING
        years =                     " pea_scryy     Total years of service
        months =                    " pea_scrmm     Total months of service
        days =                      " pea_scrdd     Total days of service
        .  "  HR_HK_TOTAL_YOS
    thanks u..

  • Function module to calculate quantity of unrestricted stock

    Is there any function module to calculate the quantity of unrestricted stock in alternate units of measure.
    For example we have a material '123456', its unit of measure is 'EA'(eaches) and we have 172 'EA'.
    but this material can be issued only in boxes. Each box has 50 'EA.
    I believe that SAP has a standard function module to convert the quantity, because the quantity gets updated in transaction 'MMBE' depending on our UOM selection.
    If not can you please let me know which table stores the relation between the UOMs.
    Thank you,
    Goldie.

    Try function MD_CONVERT_MATERIAL_UNIT
    the table of UOM's is MARM.
    Doug

  • Function module which calculates GL balances

    Hello to you all,
    I am looking for a function module which calculates balances for GL account as Tcode FS10N do.
    I would like to implement this FM in an ABAP program,
    Thanks,
    Amir

    Hi
    Check the  Code, if it could be of use to you
    http://www.sapfans.com/forums/viewtopic.php?f=10&t=317349
    Regards
    Sanil Bhandari
    Edited by: Sanil K Bhandari on Jun 29, 2011 6:17 PM

  • Function Module to Calculate Due Date from Payment Terms?

    I'm writing an aged debtor report as the SAP standard one isn't quite right for our requirements.  Is there a function module that will calculate the payment due date if I give it the payment terms and the base line date?
    I did a search in SE37 but couldn't see one which fitted my requirements (I was searching on CALCDUEDATE and variantions of).
    Any suggestions welcome, thanks.
    Gill

    Hi,
    Use the FM FI_TERMS_OF_PAYMENT_PROPOSE for calculating the Payment due date
    call function 'FI_TERMS_OF_PAYMENT_PROPOSE'
      exporting
        i_bldat         = gv_bldat
        i_budat         = gv_budat
        i_cpudt         = sy-datum
        i_zfbdt         = gv_zfbdt
        i_zterm         = gv_terms_paym
        i_bukrs         = gv_comp_code
      importing
        e_zbd1t         = gv_zbd1t
        e_zbd1p         = gv_zbd1p
        e_zbd2t         = gv_zbd2t
        e_zbd3t         = gv_zbd3t.
    Regards,
    Dwaraka.S

  • Function Module to Calculate Capacity per Shift.

    Hello SAPients.
    I have to create a report where I have to distribute the production requirement (table KBED) in different shifts. I tried to calculate the values with normal calculation in programming but it's getting too complicated finding the right amounts per shift. For example, I have a requirement of 100 CAses and 3 shifts for the 09/10/2006, the output should be 50 in first shift and 25 for the second and the third shift. I have to consider the capacity of the Work Center and the Shift.
    Do you know of a function module to achieve this?
    Thank you in advance for your help.
    Message was edited by: Ricardo Fernández Vázquez

    Hi All,
    Just to reopen this issue, even I am looking for a similar functionality.
    To reinstate the requirement:
    I want to find shifts and corresponding capacities for a work center. These details are obtained from CR03 and CR13 transaction.
    If possible do let me know Function module or tables for the same.
    Debs

Maybe you are looking for

  • Solaris 8.0 on SUN SPARC 5 machine.

    Can i install Solaris 8.0 on SUN SPARC 5 machines ? Why can't i find it in the hardware compatibility list ?

  • Event Creation in UCCX

    Hi, I am using UCCX 10.0 with Premium License. I have both Inbound and Outbound. For Outbound calls, i have to popup the details of customer. I created a HTTP event in the workflow for that in Ringing Event and is working fine. But i need to popup th

  • Lightroom 4.4 not importing video, Mac OS X. Canon 5d Mk2

    Hi, I Just bought LR on the weekend and upgraded to 4.4 as per request during the install process.  The only problem I seem to have is it not importing any video files. I am running it on a Macbook Pro 2010 with OS X Mountail Lion - latest updates, e

  • ITunes 11.0.4 won't open

    I updated my iTunes on Wednesday night to 11.0.4 and restarted my Macbook. I went to use iTunes for the first time since the update today and it just won't open. Each time I try a problem report pops up to send to Apple. Each time I click on reopen a

  • New form of Hacking done to me.

    Im having an AI apparently use my account for msging. the I am in Jadiction stuff and everything below that is the "AI".