Function Module to find number of days

Hi, In my program I need to calculate the number of working days, ie days excluding Saturday and Sunday s Also excluding the holidays if any. Could you please suggest me a way to find the same. A code snippet would be very appreciating

Hai,
check these links.
http://www.geocities.com/victorav15/sapr3/abapfun.html
http://help.sap.com/saphelp_erp2004/helpdata/en/9f/db988735c111d1829f0000e829fbfe/content.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/ef/d94b78ebf811d295b100a0c94260a5/frameset.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/43/41341147041806e10000000a1553f6/frameset.htm
Check this link:
http://help.sap.com/saphelp_erp2004/helpdata/en/9f/db988735c111d1829f0000e829fbfe/content.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/ef/d94b78ebf811d295b100a0c94260a5/frameset.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/43/41341147041806e10000000a1553f6/frameset.htm
See the following links:
http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db970e35c111d1829f0000e829fbfe/frameset.htm
http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db970e35c111d1829f0000e829fbfe/frameset.htm
http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db970e35c111d1829f0000e829fbfe/frameset.htm
http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db970e35c111d1829f0000e829fbfe/frameset.htm
http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db970e35c111d1829f0000e829fbfe/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/26/64f623fa8911d386e70000e82011b8/content.htm
withregards,
sowjanya.b

Similar Messages

  • Function module for finding number of records in table

    Do we have any function module to find number of records in a table?
    Thanks,
    Shweta

    use the EM_GET_NUMBER_OF_ENTRIES. You just have to write your table name into the input table IT_TABLES in the TABNAME field

  • Function module to find no of days between two dates

    hi everybody i want a function module to find no of days between two dates

    Function module              /SDF/CMO_DATETIME_DIFFERENCE
    Uppercase/Lowercase
    Runtime:        59,629 Microseconds
      Import parameters               Value
      DATE1                           01.01.2007
      TIME1                           00:00:00
      DATE2                           31.12.2007
      TIME2                           00:00:00
      Export parameters               Value
      DATEDIFF                                                    364  TIMEDIFF                                                      0
      EARLIEST                        1

  • Function module which convert number to days to date

    Hi,
    Any one knows any function module which convert total number of days into date.
    thnaks,
    shilpa k

    Hi,
        FIMA_DAYS_AND_MONTHS_AND_YEARS
    FI_PSO_DAYS_MONTHS_YEARS_GET
    RSSM_CONVERT_DAYSEC2TIMESTAMP
    RSSM_CONVERT_TIMESTAMP2DAYSEC
    Function Modules related to Date and Time Calculations
    DATE_COMPUTE_DAY : Returns weekday for a date
    DATE_GET_WEEK : Returns week for a date
    DAY_ATTRIBUTES_GET : Returns attributes for a range of dates specified
    MONTHS_BETWEEN_TWO_DATES : To get the number of months between the two dates.
    END_OF_MONTH_DETERMINE_2 : Determines the End of a Month.
    HR_HK_DIFF_BT_2_DATES : Find the difference between two dates in years, months and days.
    FIMA_DAYS_AND_MONTHS_AND_YEARS : Find the difference between two dates in years, months and days.
    MONTH_NAMES_GET : Get the names of the month
    WEEK_GET_FIRST_DAY : Get the first day of the week
    HRGPBS_HESA_DATE_FORMAT : Format the date in dd/mm/yyyy format
    SD_CALC_DURATION_FROM_DATETIME : Find the difference between two date/time and report the difference in hours
    L_MC_TIME_DIFFERENCE : Find the time difference between two date/time
    HR_99S_INTERVAL_BETWEEN_DATES : Difference between two dates in days, weeks, months
    LAST_DAY_OF_MONTHS : Returns the last day of the month
    Regards

  • Function module to find number of table entries in Data base table

    Hi All
       I have the urgent requirement to find out the number of table entries in a table  using the function Module.
    if u know the Function Module name please let me know
    Thanks & Regards
    Rajmohan.G

    You can calculate the total number of records like this.
    TABLES : ztable.
    DATA cnt type I.
    Select count( * ) into cnt FROM ztable.
    Regards,
    Santosh

  • Function Module to find the day

    Hi,
    I have a date S_DATE with me.
    I need to find the day of that date.
    I hope there is a function module for this.
    Please reply me if you know the name of the Function Module to find the date.
    Thanks in advance.

    Hi Rajesh,
    Thanks for the reply. Your answer solved my problem.

  • Function module to find the attachment list for an accounting document?

    Is there a function module to find the attachment list for an accounting document? Or which table stores such references?
    I know I can find this info from the transaction FB03, but is there a function module to find the attachments for an accounting document? So far I only found the attachments are stored in the table SOOD, and archived documents in table TOA03, but I can't find the table that stores the links between the accounting document and its attachments?
    <b><REMOVED BY MODERATOR></b>
    Thanks,
    Ning
    Message was edited by:
            Alvaro Tejada Galindo

    Hi,
      i_object1-typeid = 'YARSATTA'.  "<<< Give your Object id name
      i_object1-catid  = 'BO'.
      i_object1-instid = i_yarsitem-docno.    "<<<< Document Number
      call method cl_gos_attachment_query=>count_for_object
        exporting
         is_object = i_object1
         ip_arl    = space
        receiving
         rt_stat   = i_stat1.
      read table i_stat1 into wa_stat1 index 1.
      if sy-subrc eq c_0.
         move wa_stat1-counter to v_attno1.
      endif.
    For link you need to check for table SRGBTBREL
    and also please check class CL_GOS*

  • Function Module to find 3 months Old Date

    Is there any function module to find out 3 months old date for a todays date....Pls Help me......

    Hi,
    use function module : J_1H_CAL_DATE_IN_INTERVAL
    use code as below :
    data : date type sy-datum, out_date type sy-datum.
    date = '20070702'.
    CALL FUNCTION 'J_1H_CAL_DATE_IN_INTERVAL'
      EXPORTING
        date            = date
        days            = '00'
        months          = '03'
       SIGNUM          = '-'
        years           = '00'
    IMPORTING
       CALC_DATE       = out_date.
    write :/ out_date.
    Sandeep Kaushik
    Message was edited by:
            Sandeep Kaushik

  • Function Module to find out the release value in contract

    Dear All,
    I have to upload the contract with new accoutn assignment without changing the existing contract. For that i have to download all the existing contract data with value.
    In that case i have some issues regarding the value.
    For example : In the system old contract is created with value 1000 and the released value as 500.
    In that case i have to uload the new contract with all the details of existing contract with value of 500 (1000-500=500).
    How can i get the value (500) and from which table.Is there any functional module to find out the release value in contract.
    Thanks and regads,
    PM
    Edited by: PM on Jan 21, 2010 8:40 AM
    Edited by: PM on Jan 22, 2010 9:48 AM

    Hi
    You need to link the table VBFA and VBAK.
    For a contract you can check all the subsequent document (which you can filter whether you want to see Order / delivery / Billing) in VBFA and then from there pick the subsequent document no. and then from VBAK you can pick the Net value of these subsequent documents, and so you will have both the values (value of Contract and value in subsequent document) and you can determine the balance value.
    Regards
    Amitesh Anand

  • Function Module to find out detail of open period of Finance (FI)

    Hi  All,
    I have a query that I want to know the existing function module to find out
    FI period detail thatis detail of opened period in FI.
    Regards,
    Rishi

    Hi Rishi
    Go to transaction SE37 and you can see the list of FM.
    Thanks
    Ashok
    Assign points for useful answer

  • Function module to find the Credit limit of a Customer based on Credit Area

    hi Experts,
                       Is there any function module to find the Credit limit of a Customer based on Credit Area.
    Regards,
    Dheepak

    hi
    try this:
      select single * from KNKK INTO zzKNKK
          where KUNNR = xkunnr and KKBER = xkkber.
    credit limit: zzKNKK-KLIMK...
    regards,darek

  • Function Module to find date by passign the Planning Calendar

    Hi All,
    Can you tell me is there any function Module to find date by passign the Planning Calendar?
    The requirement is i have a planning calender assigned to the Material in the MRP2 view.
    Example: Material XXXXXX is assigned a Planning Calendar Z01.
    Z01 is defined such that Delivery is on Monday only. This calendar says that the material is received from the Vendor only on Mondays.
    So whenever i punch a Sales Order for Material XXXXXX, a PR is automatically geenrated when saving the sales order and the calculation of Delivery dates is also happening at this level.
    Basing on this PR a PO is raised to a Vendor for procuring the Material XXXXXX, now my problem is for example the PO is raised today (30.04.2008), but the Materail XXXXXX is available only on next monday in my plant (05.05.2008) basing on my Planning Calendar assigned in the Materail Master, so i have to inform this dealy to my customer at the time of punching the sales order.
    So is there any function Module to find date by passign the Planning Calendar?
    Thanks for your valuable inputs.
    Regards,
    Sudarshan

    Hi Jorge,
    Thanks for your reply.
    I am unable to open the Function module which you have mentioned below.
    I am working on 4.6 c version of SAP.
    Any ways i have found one function module which is useful to my requirement as stated below:
    DATE_GET_PERIOD
    Thanks and Regards,
    Sudarshan

  • Table Name or Function Module to find out all the Screens & Subscreens for

    Hello Experts,
          Table Name or Function Module to find out all the Screens & Subscreens for all T-Codes
    Helpful Answer will b rewarded
    Arif Shaik

    Hi Balaji,
       But TSTC only Gives the Program Name , T-Code and Screen but not all the Subscreen details
    Any other which U know

  • Function module for converting number to exponential???

    Hi All
      please tell me Function module for converting number to exponential.
    Deepak

    try:
    REPORT Zconvertf.
    parameters p1 type p decimals 2 default '4711.99'.
    data f1 type f.
    move p1 to f1.
    write: / p1, f1.
    hope that helps
    Andreas

  • Function Module to find the Difference between two times.

    Hi All,
    Wud you plz let me know the Function Module to find the Difference between two times.
    Input Time1( Hours:Minutes) Time2 ( Hours:Minutes)
    Need Output in Hours:Minutes only . ( No seconds Needed )
    Ex :
    Input :
           06:00 to 18:00 Output : 12:00
    and  20:00 to 06:00 Output: 10:00 with +ve sign only. No -ve sign.
    Thanks,
    N.L.Narayana

    check this .
    data : p_timel like sy-uzeit,
           p_timeh like sy-uzeit,
           diff like sy-uzeit,
           di(8) type c .
           p_timel = '200000'.
           p_timeh = '060000'.
           diff = p_timeh - p_timel.
           concatenate diff+0(2) ':' diff+2(2) into di.
           write:/ di.
    also check for this.
           p_timel = '060000'.
           p_timeh = '180000'.
    see if this can be implemented in ur code .
    or else  u can try with  Fm L_TO_TIME_DIFF passing startdate enddate starttime endtime with UOM as MIN
    hope this helps regards,
    vijay

Maybe you are looking for

  • How to bring all columns in a single/first page in report painter

    Hi Experts, There are 9 columns in a report painter which includes 1 lead column. 7 columns comes in a first page including lead column and rest 2 columns goes to second page. This report is copied from another report where all columns comes in a fir

  • Adcfgclone.pl errored out with  Unzip FAC-50409: Exiting, fatal unzip error

    Hi, while i am doing application cloning i got the following error message: Beginning application tier Apply - Thu Jul 7 17:03:07 2011 Log file located at /u02/appl/appltest/preprod/prodappl/admin/preprod_cjb112vsa400/log/ApplyAppsTier_07071703.log |

  • How to uninstall TVT Monitor from a lenovo X200 laptop?

    We are noticing that the TVT monitor is eating up the cpu on a lenovo X200.  I believe we have already uninstalled the Rescue and Recovery software and still there are issues where the CPU spikes to 100%. The issue is that the service even when disab

  • Dynamic LOV of past 6 months

    I am trying to create a select list item with a dynamic list of values containing the past 6 months like this: February 2011 January 2011 December 2010 November 2010 October 2010 September 2010 So far I have come up with the following ugly looking se

  • Login using j_security_check

    I have a regular login.jsp page that submits data to j_security_check. If j_security_check gets an error (userid is blank, password is blank, paswword does not match), how do I display an error message from my resource bundle pertaining to the error