Delivery Date should propose only working days (Excluding weekends and holidays

Hello All
I have one requirement here, where delivery dates should propose only working days and it should not allow to add weekends and holidays during the creation of sales order.
I would like to know if there are any standard settings to be done in plant or shiping point?
Kindly need all your input on this
Thanks
Naveen

Hello All
Same calendar has already been assigned in shipping point,plant and sales org and also in the calendar holidays been maintained, even though when we create a sales order it will accept weekends and holidays
Thanks

Similar Messages

  • Working day formula that excludes weekends and holidays in WEBI

    Hi Guys,
    Can we calculate a working day formula that excludes weekends and holidays in WEBI OR in Universe?
    The universe I am working on is using stored procedures, so there are no joins or modelling done. Although there is a workday stored proc  that I can bring in the universe.
    I am just thinking if there is no modelling or joins done in the universe how will this help me in webi?
    Your suggestions will be very helpful.
    Thanks,
    Jitan

    One more suggestion I need from you  -
    I have a Work_Calendar_VW that has the following columns -
    Calendar_Date - 5/1/2014
    Calendar_Year - 2014
    Calendar_Month - 5
    Calendar_Day - 1
    Work_Day - 1
    Day_Type - WD (Work Day)  For Weekends this will be displayed as WE
    The columns have all dates for current year in SQL Server.
    I am going to pull this into the universe and create 2 derived tables to calculate MTD Day counts.
    Derived Table 1  - Calculate Yest Work Day... this will remove all the weekends and holidays and give me the last working day. This includes couple of case statments to check each day if it's a working day or weekend.
    For Work Day the above code will be 1 and for weekend 0
    Derived Table 2  - This will give me the count of working days in current month using the above view and Derived table 1 Below is the code  -
    SELECT COUNT(*)
    FROM Work_Calendar_VW
    WHERE [Work_Day] = 1 AND
       (Calendar_Date BETWEEN CAST(CONVERT(VARCHAR(25),MONTH(LastWoringkday()),101) + '/01/'
       + CONVERT(VARCHAR(25),YEAR(LastWoringkday()),101) AS DATE)
      AND LastWoringkday()).
    I cannot do joins because this universe has been built using stored proc and would like to implement this in BO universe.
    let me know if this is the right approach.
    Thanks,
    Jitan

  • Time between dates excluding Weekends and Holidays

    I am fairly new to Power Pivot and I am having trouble with this formula.  I need my Cycle Time Days column to capture the days between CreatedDataTime and ClosedDateTime excluding Weekends and Holidays.  I have a tab that has the holidays but
    I can't get the formula correctly?   Jill
    CreatdDateTime        ClosedDateTime     Cycle Time Days
    12/1/2014                    12/10/2014

    first of all you need a separate time table which holds all possible dates for your model
    there should be no gaps, it should contain full years and a column of datatype DateTime as unique key
    once you have this in place add a calculated column to this table as 
    =IF(INT(FORMAT([Date], "w")) >= 6, "Weekend", "Workday")
    then go back to your original table and add the following calculation for your [Cycle Time Days]-column:
    =COUNTROWS(
    FILTER(
        'Dates',
        Dates[Date] >= DateRanges[DateFrom]
        && Dates[Date] <= DateRanges[DateTo]
        && 'Dates'[IsWeekend] = "Workday"
    Holidays are a bit more tricky but you can follow the same pattern but you need to get the holidays from somewhere
    hth,
    -gerhard
    Gerhard Brueckl
    blogging @ http://blog.gbrueckl.at
    working @ http://www.pmOne.com

  • DATEADD excluding weekends and holidays

    select getdate(),dateadd(day,15,Getdate())
    THis gets me today and 15 days from now. However I need 15 business days. I need to exclude weekends and holidays in here so that is looks like this. 
    where fulldate between getdate() and dateadd(day,15,Getdate())
    I have a dim table for dates and have an isholiday = 0 or 1. I just can't figure out how to include this in the DATEADD expression.

    Hi,
    try this link
    http://www.sqlservercentral.com/Forums/Topic1247790-391-1.aspx
    Hope will help you,
    Questo post è fornito &quot;così com'è&quot;. Non conferisce garanzie o diritti di alcun tipo. Ricorda di usare la funzione &quot;segna come risposta&quot; per i post che ti hanno aiutato a risolvere il problema e &quot;deseleziona
    come risposta&quot; quando le risposte segnate non sono effettivamente utili. Questo è particolarmente utile per altri utenti che leggono il thread, alla ricerca di soluzioni a problemi similari. ENG: This posting is provided &quot;AS IS&quot;
    with no warranties, and confers no rights. Please remember to click &quot;Mark as Answer&quot; on the post that helps you, and to click &quot;Unmark as Answer&quot; if a marked post does not actually answer your question. Please Vote This As
    Helpful if it helps to solve your issue. This can be beneficial to other community members reading the thread.

  • Add working days to a date excluding weekends and holidays

    Hi there,
    I need to write a function that will take a specified date and number of days to add as input parameters, and return the working day based on the number of days to add parameter, excluding weekends and any holidays held in a holiday table.
    Here is my function so far -
    CREATE OR REPLACE FUNCTION f_add_work_days(pd_date IN DATE
    ,pn_add_days IN PLS_INTEGER) RETURN DATE IS
    pd_in_date DATE := pd_date;
    ld_next_holiday DATE;
    ln_days_left PLS_INTEGER := pn_add_days;
    CURSOR cu_holiday(pn_date IN ge740.holdte%TYPE) IS
    SELECT pck_utility.f_dtcnv(g.holdte)
    FROM ge740 g
    WHERE g.holdte >= pn_date
    AND g.maint <> 'D'
    ORDER BY g.holdte ASC;
    BEGIN
    OPEN cu_holiday(pck_utility.f_dtcnv(pd_in_date));
    FETCH cu_holiday
    INTO ld_next_holiday;
    CLOSE cu_holiday;
    LOOP
    IF ln_days_left = 0 THEN
    EXIT;
    END IF;
    pd_in_date := pd_in_date + 1;
    IF pd_in_date > ld_next_holiday THEN
    OPEN cu_holiday(pck_utility.f_dtcnv(pd_in_date));
    FETCH cu_holiday
    INTO ld_next_holiday;
    CLOSE cu_holiday;
    END IF;
    CASE
    WHEN TO_CHAR(pd_in_date
    ,'fmDAY') = 'SATURDAY' THEN
    pd_in_date := pd_in_date + 2;
    ln_days_left := ln_days_left - 1;
    WHEN TO_CHAR(pd_in_date
    ,'fmDAY') = 'SUNDAY' THEN
    pd_in_date := pd_in_date + 1;
    ln_days_left := ln_days_left - 1;
    WHEN pd_in_date = ld_next_holiday THEN
    pd_in_date := pd_in_date + 1;
    ln_days_left := ln_days_left - 1;
    ELSE
    ln_days_left := ln_days_left - 1;
    END CASE;
    END LOOP;
    RETURN(pd_in_date);
    END f_add_work_days;
    I think there is something wrong/missing in the logic as I can't get it to cater for say a double bank holiday(25/26th Dec - if the input parameters are 24/12/2007 and 2, which should return the 28th but returns the 26th!!).
    I'm relatively new to PL/SQL and Oracle, so any help, advice, ideas would be greatly appreciated!
    thanks in advance

    smth like
    SQL> with holidays as (select to_date('10.06.2007','dd.mm.yyyy') h_dt from dual),
      2       par as (select to_date('08.06.2007','dd.mm.yyyy') dt, 2 add_days from dual)
      3  --
      4  select min(dt) needed_date
      5    from (select p.*,
      6                 h.*,
      7                 mod(to_char(dt, 'j'), 7),
      8                 sum(decode(mod(to_char(dt, 'j'), 7), 5, 0, 6, 0, 1)+--get rid of sat and sun
      9                     nvl2(h_dt, -1, 0)--check if the day is holiday
    10                     ) over(order by dt) s
    11            from (select dt + level dt, add_days
    12                    from par
    13                  connect by level <= 100) p,
    14                 holidays h
    15           where h_dt(+) = dt
    16           order by 1)
    17   where add_days = s
    18  /
    NEEDED_DATE
    13.06.2007
    SQL> ?
    Message was edited by:
    Volder
    PS What Oracle version are you on?

  • Calculate the Difference Between two dates excluding weekends and Holidays

    Hi,
    We need to calculate the difference between the two dates by excluding the Local public holidays (It is global and varies across countries) and weekends should not be included in calculation for a business day in OBIEE.
    We have two dates: Open date and close date when ever close date is null we are calculating age based on taking the current timestamp and need to exclude the weekends and Holidays when ever the close date is null.
    Ex:
    Col1 col2 Total
    11/9/2010 2:46:38 PM Null 13
    11/2/2010 8:06:26 PM 11/3/2010 5:37:03 PM 1
    (In the Total we shouldn't include the weekends,holidays)
    Please let me know how to calculate the difference between two dates by excluding the weekends and holidays.
    Thanks
    Edited by: user10441472 on Nov 22, 2010 3:14 PM

    You already asked this question and I answered it...
    Re: calculation of Business day in OBIEE

  • Payment term with fixed day but exclude weekends and holidays

    Hello,
    our customer has a requirement to have payment term that is like this:
    Due date: fixed day 15th next month.
    If due date falls in weekend or holiday due date will move to next business (working) day.
    We have working payment term which is always the 15th on next month but it falls to weekends.
    I was searching SDN found something but not working.
    Could you please send me a step-by-step configuration how to exclude the weekends and holidays?
    Thank you a lot.
    Best regards,
    Lubos

    Dear Lubos,
    unfortunately waht You need to have It is impossible into the SAP Standard System.
    Please be aware that the vendor invoice has two relevant dates:
    Baseline date   > INVFO-ZFBDT
    Due on   > INVFO-NETDF
    The Baseline date is managed by the "Term of payment",  transaction obb8, frame
    "Baseline date calculation" where You can put for example :
    Fixed day            30
    Additional months     3
    This means that if You put as Document date 01.01.2009, the baseline date
    will be 30.04.2009 (fixed day 30, additional months 3).
    The "Due on" date will start ALWAYS from "the Baseline date"
    (that in my example is 30.04.2009) and according to the below
    "Term of payment" , the System will add
    31 days, so the Due on date will be 31.05.2009.
    Term      Percentage   No. of days  /  Fixed date  Additional months
    1.               %      31
    2.               %
    3.
    You could think to use the FI substitution to reach Your goal.
    Mauri

  • Calculating number of days without weekend and holidays

    Hallo all,
    can someone help me with a formular to calculate the number of days with Crystal Reports 2008 between two dates without weekends and holidays
    eg.
    date one = 03/24/2010
    date two = 03/29/2010
    Result should be 4 days as 03/27 and 03/28 will be a weekend.
    Plus how to exclude holidays ?
    Thank you very much
    Gerald

    As Doug mentioned, Holidays are very location specific, and are you talking about "corporate holidays" where the company is closed, or "public holidays" where banks (<g>) are closed?
    I'd suggest setting up a calendar table (if you don't have one already), one record per date.  You could make it work-days only, days-off only, or all dates with a flag to indicate if it is a work date.  You could then use that to count the number of work days.  By using a table, you wouldn't have to change any code to (a) extend your calendar to the following year, or (b) change holiday dates if the holidays change.  (I'm thinking corporate holidays, where the company might be closed Friday 12/24/10 in observation of Christmas, but would usually only close on the 25th.)
    HTH,
    Carl

  • Date difference function that returns minutes between two dates and excludes weekends and holidays

    Is there a way to get this to work as a function? 
    Currently returns error "Select statements included within a function cannot return data to a client"
    CREATE FUNCTION [dbo].[WorkDays](@DateFrom datetime,@DateTo datetime)
    RETURNS int
    AS
    BEGIN
    --Working time
    DECLARE @WTFrom TIME = '8:00AM';
    DECLARE @WTTo TIME = '5:00PM';
    DECLARE @minCount BIGINT
    --Date ranges
    IF (DATEDIFF(HOUR, @DateFrom, @DateTo) > 12)
    BEGIN
    WITH CTE AS
    SELECT @DateFrom AS DateVal
    UNION ALL
    SELECT DATEADD(HOUR, 1, DateVal)
    FROM CTE
    WHERE DateVal < DATEADD(HOUR, -1,@DateTo)
    SELECT DATEDIFF(minute, MIN(CTE.DateVal), MAX(CTE.DateVal))
    FROM CTE
    WHERE (CAST(CTE.DateVal AS time) > @WTFrom AND CAST(CTE.DateVal AS time) < @WTTo) AND DATEPART(dw, CTE.DateVal) NOT IN (1, 7) AND NOT EXISTS (SELECT * FROM Holiday AS H WHERE H.holiday = CTE.DateVal)
    OPTION (MAXRECURSION 0);
    END;
    ELSE
    BEGIN
    WITH CTE AS
    SELECT @DateFrom AS DateVal
    UNION ALL
    SELECT DATEADD(MINUTE, 1, DateVal)
    FROM CTE
    WHERE DateVal < DATEADD(MINUTE, -1,@DateTo)
    SELECT DATEDIFF(minute, MIN(CTE.DateVal), MAX(CTE.DateVal))
    FROM CTE
    WHERE (CAST(CTE.DateVal AS time) > @WTFrom AND CAST(CTE.DateVal AS time) < @WTTo) AND DATEPART(dw, CTE.DateVal) NOT IN (1, 7) AND NOT EXISTS (SELECT * FROM Holiday AS H WHERE H.holiday = CTE.DateVal)
    OPTION (MAXRECURSION 0);
    END;
    END
    Thanks for your help.

    Please post DDL, so that people do not have to guess what the keys, constraints, Declarative Referential Integrity, data types, etc. in your schema are. Learn how to follow ISO-11179 data element naming conventions and formatting rules (you do not). Temporal
    data should use ISO-8601 formats (you do not!). Code should be in Standard SQL as much as possible and not local dialect. 
    This is minimal polite behavior on SQL forums. 
    We hate functions in SQL. This is a declarative language and you are using it like 1950's FORTRAN. We hate local variables (more FORTRAN!)
     The name of a function has to be either a known, common name, like “sine”, “cosine” etc. Or it is “<verb>_<object>”; you think a noun is a verb! Do you really need BIGINT? Why did you invite garbage data with it? Why do you think that SQL
    uses AM/PM? Have you never seen the TIME data type? 
    Think about “date_val” as a data element name. A date is a unit of temporal measurement on a calendar scale. This would be a “<something>_date” in a valid schema. 
    >> Is there a way to get this to work as a function? <<
    Probably, but why do it wrong?
    Build a calendar table with one column for the calendar data and other columns to show whatever your business needs in the way of temporal information. Do not try to calculate holidays in SQL -- Easter alone requires too much math.
    The julian_business_nbr is how SQL people do this. Here is the skeleton. 
    CREATE TABLE Calendar
    (cal_date DATE NOT NULL PRIMARY KEY, 
     julian_business_nbr INTEGER NOT NULL, 
    Here is how it works:
    INSERT INTO Calendar 
    VALUES ('2007-04-05', 42), 
     ('2007-04-06', 43), -- Good Friday 
     ('2007-04-07', 43), 
     ('2007-04-08', 43), -- Easter Sunday 
     ('2007-04-09', 44), 
     ('2007-04-10', 45); --Tuesday
    To compute the business days from Thursday of this sample week to next Tuesday:
    SELECT (C2.julian_business_nbr - C1.julian_business_nbr)
      FROM Calendar AS C1, Calendar AS C2
     WHERE C1.cal_date = '2007-04-05',
       AND C2.cal_date = '2007-04-10'; 
    See how simple it can be when you stop trying to write FORTRAN and think in sets? 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • Exclude Weekends and Holidays while applying for leave...

    Hi,
    Could anyone help me out in excluding holidays while applying for leave via absence management (employee self service) in R12? While clicking on calculate duration it includes weekends as well by default. Since updating the formula BG_ABSENCE_DURATION will involve creating UDTs, modify UDF and additional effort; I tried creating workschedulle and updated the profile HR: Schedule Based Absence Calculation to 'Yes' following the metalink note 'Schedule Based Absence Calculation in Self Service' [ID 437083.1] but no luck. Is there any other additional setup that needs to be done or its better to update Fast Formula. Kindly advise on the same. Thanks in Advance!!!
    Thanks,
    Ahmed

    Thanks much Gaurav. I was able to work it out by creating work schedule itself. I reckon I missed out selecting the schedule pattern. We need to ensure that after creating schedule the pattern needs to be selected and launched. After a while it gets effected in the system. Just in case if others are trying to implement work schedule for working days between Saturday to Wednesday following are the step involved. I have created two schedule pattern with day start as 1 and day stop as 4; and another pattern with day start as 7 and day stop as 7. It works like charm....:)
    Regards,
    Ahmed

  • Fucntion to Calculate business days (exclude weekends & holidays) between two days

    Hello,
    I need to be able to calculate business days between two dates excluding weekends and holidays. I do have a date dimension and also flags which denote weekday, holiday. Would really appreciate help in building a udf for the business days calculation.
    Thanks,

    Hi, Please take a look and tweak accordingly. Best of luck.
    --Assuming data dimension table something like the following
    --tblDateDim (DT date primary key,
    flagHoliday bit,
    flagWeekday bit
    CREATE FUNCTION fnBusinessDays (
    @StartDate DATE,
    @EndDate DATE
    RETURNS INT
    AS
    BEGIN
    DECLARE @Days INT ;
    SELECT @Days = count(*)
    FROM tblDateDim --// date dimension
    WHERE
    ( DT BETWEEN @StartDate AND @EndDate) --// dt is date column in the table.
    AND --// also flags which denote weekday, holiday
    flagHoliday = 0 --// flagHoliday= 1--Holiday;= 0 --workingday/businessday
    AND
    flagWeekday = 1 --// FlagWeekday = 1--businessday ; =0 --weekend (Saturday and Sunday)
    RETURN (@Days)
    END
    GO

  • Confirmed delivery date should be on Monday Only

    Hi All.
    I have a requirement wherein, for a customer the confirmed delivery date should be on monday only.
    We are using APO for GATP.
    Can anyone please guide how to go about this?
    Thanks in advance.

    Hi,
    Create a Separate Factory calendar with only working days on every Monday
    The Factory Calendar will be done either in the OVR3 or SCAL
    And assign this newly defined Factory calendar in the PLANT--Factory Calendar
    Please do this and check
    It will help
    regards,
    santosh

  • Confirmed delivery date should be on Monday

    Hi All.
    I have a requirement wherein, for a customer the confirmed delivery date should be on monday only.
    We are using APO for GATP.
    Can anyone please guide how to go about this?
    Thanks in advance.

    Hi,
    1. For this you need to maintain the Customer Calendar...
    IMG --> SD --> Master data --> Business Partner --> Customer --> Shipping --> Define Customer Calendars....
    Here create a calendar with working day as only on Monday and other days as holiday.
    2. Assign this calendar in the Customer Master --> General data --> Unloading Points....
    create atleast one unloading point and assign the newly created calendar... you can also set this unloading point as default one...
    Now the confirmed delivery date will be only on monday... if the confirmed qty is available on tuesday then it will be confirmed to the customer on next monday....
    Hope this solves your issue.
    Muthu

  • Req. delivery date and Delivery date should be same in a sales order

    Hi experts,
    We need a customization for getting Requested delivery date, Material Availability date and Delivery date should be same.
    Example if I keep request delivery date as 12/12/2012, system should consider same dates for MAD and Delivery and confirm the requested quantity.
    How to achieve this customization..
    Thanks,
    Bala.

    system should consider same dates for MAD and Delivery and confirm the requested quantity
    What you are going to achieve by this?  Hope you know the concept of MAD and confirmed quantity fields.  Let us assume, if stock is not there for a material for which sale order is created, can you let me know, you want the system still to confirm the quantity? You can post the goods issue only if system confirms the quantity in schedule line which is possible, only if stock is made available.  If client asks something which is not possible in SAP, think in a logical way how SAP works and convince them accordingly. 
    G. Lakshmipathi

  • Delivery date should fall on every monday for a PR created by MRP

    Hi Gurus,
    A PR is created by MRP. I need to have delivery date of the PR on every monday. Please let me know , what settings has to be done...
    Regards,
    Vibin

    Friends Thanks for your reply.
    Here is the answer
    1. Set the planning calendar as the period stats with Monday.
    2. Set the weekly lot sizing procedure in such way that the scheduling field as 1 = requirement date = delivery date.
    3. Assign these settings in the MRP view of material master.
    If you run the MD02 then your requirement date will only falls on Monday.
    But since our requirement is delivery date should fall on Monday.
    4. So the GR processing time should be zero in the MRP 2 view of material master.
    Because the delivery date calculated as follows
    Delivery date = Requirement date - GR processing time.
    By this way the delivery date also falls on the same day (Monday ) as the Requirement date.
    Again thanks for your answers and expecting the comments on the same.
    Regards
    Vibin

Maybe you are looking for

  • Movies Purchased on iTunes don't show up on Apple TV

    For some reason, when I purchase movies on iTunes they aren't showing up on my Apple TV ... Which is why I got Apple TV in the first place. Help!!!

  • Comercial rounding in FI Service Tax Calculation

    Dear All, We are in Implemantation project, we done the configuration for Service Tax From FI, system is calculating the persentage but my issue is ........ My client wants the rounding values in tax line items Ex ; if my tax line item is having 10.4

  • Different delivery note in Miro

    Dear all, I have three different delivery notes for a PO. I enter this delivery notes in Migo. Now I 'm looking  first delivery note   in Miro ,  I see total quantity that what we enter in Migo. But I want to see what I enter for  this delivery note

  • How to check hyperlink validity?

    Hi The problem: I have a form in which a user will insert a hyperlink. The servlet should validate this hyperlink in the sense that the hyperlink actually should exist and point somewhere on the internet. How can I do this - I don't want to download

  • How to configure lazy/eager loading for each JPA query

    Hi! I have extensive EJB model (entities with many child entities, entities with association to other large (many fields, BLOBs including) entities, and so on) and I would like for each JPA query configure what properties or associated entities (actu