Work day of a calendar

Hi all,
I am searching for a FM which will say 3rd work day of a factory calendar or 4th work day of a factory calendar etc. I could see there are few FMs to say first work day - last work day but not the Nth work day. If we input some date and factory calendar, we should get which work day it is. For example if we give 09/02/2010 and factory calendar name it should return as 2nd workday etc. Any help will be appreciated..
Thanks in advance.
Moderator message: date calculation questions = FAQ, please search before posting.
locked by: Thomas Zloch on Sep 15, 2010 4:39 PM

hi,
Please check with this fm DATE_CONVERT_TO_FACTORYDATE.
Keerthi

Similar Messages

  • Working day to factory calendar date

    Hello Experts,
    I wish to get the factory calendar date, specific to a factory calendar, based on a working day.
    Basically, if i pass say 4, then i want to get the date for the 4th working day based on a specific factory calendar.
    Can someone throw some light on possible function module that i can use in BW ?
    Thanks

    That's what I was giving you, you give the working day and the factory calendar and you get the date, or you can use this function and you can do it the other way:
    (Unless I'm completely missing your point here...)
        CALL FUNCTION 'DATE_CONVERT_TO_FACTORYDATE'
      EXPORTING
        CORRECT_OPTION                     = '+'
        DATE                               = G_WORKAREA3-CREATEDON
        FACTORY_CALENDAR_ID                = L_S_PLANT-FACTCAL_ID
      IMPORTING
    *   DATE                               =
       FACTORYDATE                        = L_FCDATE
      EXCEPTIONS
        CALENDAR_BUFFER_NOT_LOADABLE       = 1
        CORRECT_OPTION_INVALID             = 2
        DATE_AFTER_RANGE                   = 3
        DATE_BEFORE_RANGE                  = 4
        DATE_INVALID                       = 5
        FACTORY_CALENDAR_NOT_FOUND         = 6
        OTHERS                             = 7.
      ENDIF.

  • Suggestions on calculating work days instead of Calendar days

    Hi there,
    I would like for someone to suggest how would I approach a project in calculating a date that would consider if a date is a holiday or a work day. For example: If I take current date + 7 normally it would be a week (7 days). However, if a day in that week is a holiday, then it would return the 8th day. If the 8th day falls into a weekend, then, get the next work date.
    Any ideas would be greatly appreciated.
    Thanks for your assistance in advance.

    Thanks. This give me a pretty good start. I am thinking that I need a table that store holidays (Non-work days excluding weekend). Once I load this table into memory, then I would check the first date + 7. Then compare the two dates against the array to see if there is a holiday. If there is, then I would increment the end date by 1 and validay if it is a weekend date. If it is, I would continue to incurement until it is nolonger an weekend date. Once I have that, I would check the date against the array (where I left off) and continue to validate to see if there are more holidays.
    What do you think about this approach?

  • HR-TM: Two Holiday Calendars That Have Different Non-working Days?

    Dear All,
    Please help me on the predicament below:
    I need to create two holiday calendars.
    Holiday Calendar 1 will have Saturday and Sunday as non-working days.
    Holiday Calendar 2 will have Friday and Saturday as non-working days.
    And both holiday calendars are used in the same country.
    Then, there is one holiday which is assigned to both holiday calendars such as New Year Day.
    How can I configure so that
    1) if New Year Day falls on the first non-working day of each week of each holiday calendar, the holiday will be moved to the previous day?
    2) if New Year Day falls on the second non-working day of each week of each holiday calendar, the holiday will be moved to the following day?
    Should I create two lines of data for New Year Day so that each of them assigned to different holiday calendar?
    Or I can just use one New Year Day in both holiday calendars?
    Thanks.

    I've got my answer.
    First calendar, i use fixed date and floating date for the public holiday based on the real situation.
    Second calendar, i use floating date for all the public holiday, then set the date every year once.

  • How to show no. of actual working days in Payslip in case of +ve time mgt

    Dear Experts,
    We have a requirement of showing no. of actual working days in payslip, which should be Calendar Days-(Paid+Unpaid absence). I created an w/t 1WRD for actual working days. Our paid absence w/t is 2006 and unpaid absence is 2005 copied from /845 and /846 respectively, both the absences are included in absence valuation table and working fine in that respect. But issue is i wrote a small PCR for calculating actual working days like below:
    ZWRD
         NUM=TKSOLL Set
         NUM-E 2005
         NUM-E 2006
        ADDWTE1WRD
    But still its fetching full working days i.e. calendar days 30 or 31 not deducting paid or unpaid absence for a month.
    Pls help, what else should i do.
    Regards
    Tan

    Sorry, i am unable to paste RT, but its exactly as below
    01, April, 2011
    1WRD Working days     30.00
    2006  Paid Absence       2.00                
    02, May, 2011
    1WRD Working days     31.00
    2005  Unpaid Absence   1.00                 
    regards
    Tan

  • Dependent demand on non-working days

    Hi Experts,
    Let me explain our scenario:
    1) We have a factory that is 90% closed for a period of time (i.e. August) for production (10% of the work centers are still working)
    2) Same factory is 100% closed for receptions.
    We have setup the system in the following calendars:
    1) Z1 --> closed on august
    2) Z2 --> opened on august
    And assigned them in the following way:
    1) Location calendar --> Z1 (we avoid purchase requisitions creation for roh's and pack's)
    2) Work centers that will stop --> Z1 (we avoid planned orders creation in these way)
    3) Work centers that will still work --> Z2 (as the work center calendar is more restrictive than location calendar)
    With this setting behavior is nearly the one we need, but we have the following problem:
    Once a planned order is created on, for example 22nd August in a working work center system is doing this:
    Basic end date: 22nd August
    Then, order is scheduled and system calculated production dated and basic start date in the following date:
    Basic end date: 01st September (first working date in Z1,  the one in the location)
    Basic start date: 31st July (last working day in Z1 calendar, the one in the location)
    Production start date: 22nd August
    Production en date: 22nd August
    So is seems that the behavior is...production dates based on work center calendar, basic dates based on location calendar.
    The problem of this is that "dependent demand" for all the components of these orders are based on "basic start dates"...which is incorrect; "dependent demand" should be placed wherever the production starts...
    Any suggestion?
    Thanks in advance,
    Raü

    Dear,
    Yes you can do this with scheduling parameter go to OPU5 and OPU3 here define Adjust date= Adjust date to operation start.
    One more thing I would like to tell you that you have no need to create to calendar you can do this with same factory calander.
    If you don't work on that particular period define work center available capacity as zero  and other day so you need to create two shift sequence in OP4A one with working Hr and another withiout working hrs.
    Assign it to your  work center with valid date. Meas up to 22 Aug on shift sequence and from 22 August another shift sequence.
    And you knows that system do the scheduling as per available capacity.
    Hope it will help you. Please try and come back.
    Regards,
    R.Brahmankar
    Edited by: R Brahmankar on Aug 1, 2009 12:38 PM

  • Sales Order confirmed date in work days

    Is there a way to change configuration so a Saler Order will confirm based on the Factory Calendar??
    I created a new Order Type (VOV8) but see no option to change from calendar days to work days.
    Bascially, I need the sales order confirmation date to be based on work days and not calendar days. 
    Is this possible???

    Hi,
    Sales Order is created for particular Sales Area i.e. SO + DC + Div. And Sales Org. is the highest org unit in SD.
    At Sales Organizational level you maintain Sales Org calendar and not factory calendar.
    Factory Calendar is basically used at plant level which comes under MM module.
    So, by SAP std practice i dont think it will be possible..............
    Or you can do one thing that is,........maintain the same sales org calendar as factory calendar..........so i think it will help you....
    But can you elaborate you point so that we can understand properly.............
    regards,
    Sagar

  • Non-working day setting affects in MM

    Hi,
    in case Saturday and Sunday are defined as non-working days in factory calendar, what funtions are possible in MM on non-working days? Is it possible to perform physical inventory, create and post deliveries, create purchase orders and so on?
    Br,
    Tapio

    done

  • Holiday as Working day - Marked as leave is not deducting from Quota

    Hi Experts,
    Please help me with below mentioned scenario.
    We have one holiday calendar for two personnel areas however holidays are different in both personnel areas, and as it is middle of year so I can't create a new holiday calendar for other personnel area so we maintain special day as working day in factory calendar to change holiday as working day for one personnel area.
    Holiday Calendar :- HA (haryana) ,                      Personnel Area (A)           Personnel Area (B)
    Holidays :-     25th Till 28th Oct Diwalii,                25th till 28 Holiday             26 & 27 Holiday only (25 & 28 working in special day rule)
    Issue :- personnel area (B) Now if Employee is getting leave for 25th (which is holiday in calendar and maintained as working day in special day rule) it is not deducting leave from quotas.
    Issue :- Half Employee on 25th are marked as Holiday (HH) in system however half have Absent (AA) in report.
    **(Should I try to make a deduction rule and counting rule for 25th & 28th as it is holiday & working togather... if yes thn what needs to be selected in counting rule)**
    Please provide inputs in this regards as it is urgent.
    Thanks you!!
    Anshul

    Hi Swapnil,
    Thanks man, I understood now, Yes you are right as but it is not working when I am trying to solve this issue after maintaining IT 2003. Now I have to go with second solution however I made Counting rule and deduction rule but facing issue assigning counting rule to Absence Type so the question is Do i need to make new absence type then counting rule and deduction rule or I can just make a counting rule and assign it to the existing Absence type?????
    Please help me through the process as I am little confused, just explain a bit like.. I need to make counting rule and assign it from <so & so> place.
    Thank you so much for your precious time,
    Anshul Upadhyay

  • Working days between two date fields and Changing Factory Calendar

    Hi,
    I have to calculate working days between two date fields excluding the weekends and public holidays for Switzerland.
    I have written the routine using factory calender and its working fine except for two problems now:
    1. If any one of the date field is empty then teh rsult should be zero.
    2. And the below code is working from 1996 but my cleints wants it to work for years before 1996 as well.
    I also tried to change the Start date in SCAL for factory calendar but it says enter values between 1995 to 2020.
    I am new to ABAP. Please help me how i can achieve these for below code.
    DATA: IT_HOLIDAYS type TABLE OF ISCAL_DAY,
          IS_HOLIDAYS TYPE ISCAL_DAY.
    DATA: T_DATE TYPE SY-DATUM,
          P_DATE TYPE SY-DATUM.
    DATA : X_DATE(4) TYPE C.
    DATA: CNT TYPE I.
    REFRESH : IT_HOLIDAYS.
    CLEAR : IT_HOLIDAYS.
    T_DATE = SOURCE_FIELDS-/BIC/ZCCCHP812.
    P_DATE = SOURCE_FIELDS-/BIC/ZCCCHP810.
    CALL FUNCTION 'HOLIDAY_GET'
    EXPORTING
    HOLIDAY_CALENDAR = 'CH'
    FACTORY_CALENDAR = 'CH'
    DATE_FROM = P_DATE
    DATE_TO   = T_DATE
    TABLES
    HOLIDAYS = IT_HOLIDAYS
    EXCEPTIONS
    FACTORY_CALENDAR_NOT_FOUND = 1
    HOLIDAY_CALENDAR_NOT_FOUND = 2
    DATE_HAS_INVALID_FORMAT = 3
    DATE_INCONSISTENCY = 4
    OTHERS = 5.
    DESCRIBE TABLE IT_HOLIDAYS LINES CNT.
    X_DATE = T_DATE - P_DATE - CNT.
    RESULT = X_DATE.
    Please help
    Regards
    Zabina
    Edited by: Syed786 on Nov 2, 2011 9:15 AM

    Hi Zabina,
    Try this function module  'DURATION_DETERMINE'.
    Give the factory calendar and unit as DAY
    With regards,
    Rajesh

  • Adding working day as a holiday in calendar without affecting stock orders

    It was very recently decided by the SA government that this coming Wednesday, 18th May, will be a Public Holiday (PH) due to national elections.
    Itu2019s just been highlighted by the business now that this day is currently still set as a Production day in the calendar.
    As such, could you please advise what needs to be done to urgently set this day to be a non-working day?
    Also, whatu2019s of greater concern is that there are already Stock Orders sitting in system timed for picking & delivery on the 18th, and the Service Levels will be calculated on a working day for the 18th.
    How can these orders be u201Crecalculatedu201D for the 19th so as not to impact negatively on the warehouseu2019s Service Levels, given that the warehouse will not actually be working on the 18th?

    Use this function module & make sure you pass the plant details, as factory calendar mostly depeneds on the Plant.
    Below is just an example to get the plant depending on Requisition & pass it to the function module.
    Createdate --> will be the current date.
    SELECT SINGLE t~fabkl
           INTO lv_fabkl
           FROM ( t001w AS t
             INNER JOIN eban AS e ON ewerks = twerks )
           WHERE banfn = reqnumber.
    CALL FUNCTION 'FKK_ADD_WORKINGDAY'
      EXPORTING
        i_date            = createdate
        i_days            = days
        I_CALENDAR1       = lv_fabkl
      I_CALENDAR2       =
    IMPORTING
       E_DATE            = workingday.
      E_RETURN          =

  • Is it possible to modify the Calendar object to only show working days?

    Is there a way to configure the Calendar selection, duration calculations, and notification dates in the system to only include working days (i.e. holidays and weekends are not counted and not available for selection)? This is particlular for Purchasing and Sourcing Modules.
    Thank you.

    This can be changed through registry:
    https://msdn.microsoft.com/en-us/library/ff800821%28v=ws.10%29.aspx
    You can do the change through group policy preferences, or some other method you prefer (ConfigMgr compliance settings for example).

  • Team Calendar non-working days

    Hi Gurus,
    Is there a way we can configure the team calendar to show non-working days for the employee (public holidays, days off in part-time/shift work-schedules) in green for example?
    I haven't seen any configuration options for this, but I would expect it to show them somehow!?  Will we need to do custom development for this?
    Many thanks,
    Russell.

    Hi Russell,
    You can check this<a href="http://help.sap.com/saphelp_erp2005vp/helpdata/en/2f/d7844205625551e10000000a1550b0/frameset.htm">SAP Help</a> for additional info on the Team Calendar iView..
    ~Suresh
    Russell,
    I didn't think the "10 points offer" was open to all.. ideally, it should be to Duxton only.. You could probably open a customer message in OSS & seek SAP's clarification on Team Calendar
    Message was edited by: Suresh Datti

  • Working day for a Holiday Calendar

    Hi, experts.
    I'm looking for a FM that returns me the next working day based on a Holiday Calendar (SCAL).
    It should have the same functionality as Factory Calendar FM FIMA_DAY_CONVERT_TO_WORKINGDAY.
    Can you help me out?
    Thanks in advance,
    Flavia

    Use this function module & make sure you pass the plant details, as factory calendar mostly depeneds on the Plant.
    Below is just an example to get the plant depending on Requisition & pass it to the function module.
    Createdate --> will be the current date.
    SELECT SINGLE t~fabkl
           INTO lv_fabkl
           FROM ( t001w AS t
             INNER JOIN eban AS e ON ewerks = twerks )
           WHERE banfn = reqnumber.
    CALL FUNCTION 'FKK_ADD_WORKINGDAY'
      EXPORTING
        i_date            = createdate
        i_days            = days
        I_CALENDAR1       = lv_fabkl
      I_CALENDAR2       =
    IMPORTING
       E_DATE            = workingday.
      E_RETURN          =

  • Calculating the planned delivery time in calendar days or working days

    Hi,
    It seems that there is a way to calculate the planned delivery time in calendar days instead of working days.
    When I use the "Planned delivery time calculation" (WPDTC), in Evaluation Options, I got the message :
    "Note that follow-on applications are currently interpreting the planned delivery time as calendar days.
    If they should be interpreting the planned delivery time as working days, you need to modify these applications. If the planned delivery time should be calculated in working days, there needs to be a factory calendar in Customizing with the calendar ID Country of vendor."
    When MRP create a PR -with MDBT, MD03 or MD01- I want my Planned delivery time to be in working days.
    I can't manage to make that "If the planned delivery time should be calculated in working days, there needs to be a factory calendar in Customizing with the calendar ID Country of vendor."
    I would appreciate your help.
    Thanks
    PYR

    Hi,
    I understand that it makes sense that vendors calendar has to be different (compared to my plant).
    But, I still don't understand why in the SAP help, they say "If the planned delivery time should be calculated in working days, there needs to be a factory calendar in Customizing with the calendar ID Country of vendor."
    It seems that planned delivery time may follow a calendar.
    Thanks,
    PYR

Maybe you are looking for

  • I am unable to restore my previous session after an update to the latest Firefox version.

    I was alerted of my available update so I let the update run, came back to the Firefox home page and saw the "Restore previous session" button. I clicked on it and it started to download my update all over again. I tried this again as I thought maybe

  • Conditional GROUP BY

    Hi I need a SQL report to conditionally display fields based on the value of a bind variable. I can achieve this via the interactive reports feature conditional display but I need to remove the GROUP BY for that field at the same time. How can I have

  • New MBPro and iTunes does not work along with certain websites on Chrome and Safari

    I just bought my Macbook Pro 13" about two weeks ago. Everything worked fine when I was at school and at my friends house. The day I came home, I was not able to go to many websites such as Facebook.com or even my Gmail on Chrome or Safari. Also, the

  • Interactive Scripts not Visible

    Hello All, I have a problem in launching scripts from interaction web center.Below you can see that there is a sample script available (and the validity of the script is from 6th June to 11th june 2014) But when i go to the Interaction web center, i

  • Question   Elements 10

    The tool shop of my working version of Elements 10 has suddenly stopped working.  The main screen is there, but most of the tools, including the healing spot brush are not functioning. I reinstalled the disks (took some time) and the problem remains.