Baseline date calculation excluding non-Business days

Hi,
We have a requirement to exclude non-Business days while calculating Baseline date.
Currently the Baseline Date being populated in the Accounting Document is Document date + 5days(including Holidays).
For eg
Current Scenario
Document Date: 12th Feb 2008
Baseline date: 17th feb 2008.
Requirement:
Document Date: 12th Feb 2008
Baseline date: 19th feb 2008(Excluding Sat & Sun).
Request you to share useful info in this regard.
Thanks
Binu

Hi,
Use user exit RV60FUS5 for these base line date calculations.
Thanks
Krishna.

Similar Messages

  • Baseline date calculation

    Hi,
    We have a requirement to exclude non-Business days while calculating Baseline date(for the Accounting Document created on saving the Billing document)
    Currently the Baseline Date being populated in the Accounting Document is Document date + 5days(including Holidays).
    For eg
    Current Scenario
    Document Date: 12th Feb 2008
    Baseline date: 17th feb 2008.
    Requirement:
    Document Date: 12th Feb 2008
    Baseline date: 19th feb 2008(Excluding Sat & Sun).
    Request you to share useful info in this regard.
    Thanks
    Binu

    Hi,
    Use user exit RV60FUS5 for these base line date calculations.
    Thanks
    Krishna.

  • Baseline date calculation in Invoice verification (MIRO)

    Dear experts,
    I need to set baseline date after 40 days from document date in MIRO.
    Baseline date calculation of "Terms of Payment" in IMG has two parameters:
      ・Fixed day
      ・Additional months
    We cannot set 40 days in these parameters.
    Can anybody tell me how to set baseline date not month but date(not fixed day) ?
    Please advise me on the settings SPRO>MM>Purchasing>Vendor Master>Define terms of Payment.
    Thanks & Regards
    Ken

    Hi,
    You can't do this.
    The baseline date is the date on which the calculations are made.
    So if you have 40 days to pay, this will be 40 days from the baseline date.
    This will either be the document date or another date, but you can't (in standard SAP) have the baseline date as "X" days after "Y".
    So the baseline date is the date of an event (e.g. the date that the Invoice was posted) not a calculation.
    Is it possible that you have misunderstood the use of this date?
    If you just want to ensure that the payment date is 40 days after invoice recipt, then set you just have to enter the number of days in the payment terms and the baseline date stays as the invoice date (etc.)
    Steve B

  • Date calculations based on working days

    I need to add date calculations to a worksheet to show the time elapsed between two actions.
    Just a straightforward subtraction works fine, but what I really need to be able to do is calculate the number of working days between the two point (as something taking 5 days over Christmas with the 2 bank holidays is different equivalent to something taking 3 days in a normal week)
    At the moment I'm exporting the data into excel for analysis of this, but would really like to be able to do it in Disco so that the end users can go straight to the report using viewer, rather than having to do the conversion for them.
    Is this possible?
    Cheers

    Hi,
    Every thing is possible, the Q is how complicated is it....
    My suggestion is to create a table with all the dates of the non-working days for ex:
    create a table with all the MON-THURSDAYS, union to this table the holidays you know of such as christmas and so on.
    After getting this table you can create a function that returns the number of working days between 1 date to another by subtracting the days exists in this table.
    I started with that, you are more then welcome to get ahead with it and let us know what happened...
    create table holiday
    D_date date,
    d_day varchar2(20)
    create or replace procedure holiday_proc is
    d_date date;
    begin
    d_date := trunc(sysdate);
    while d_date<'01-jan-2010'
    loop
    if to_char(trunc(d_date),'Day') not in ('Saturday ','Sunday ') then
    INSERT INTO Holiday (d_date,d_day)
    (select trunc(d_date),to_char(trunc(d_date),'Day') from dual);
    end if;
    d_date := d_date+1;
    end loop;
    commit;
    end holiday_proc;

  • Debit memo(DR doc type) baseline date exceding the payment term days

    Hi All
    For debit memo I am facing a issue where my baseline date for a customer is showing more then the days specified in his(customer's) payment terms.
    sales document category is DR and order is created for some customer xyz and payment terms of that customer is showing 0% UP TO 15 DAYS. But when I check it in FBL5n the Net due dt for that order is showing 180 + 15 = 195days.
    What can be the reason, is it due to some enhancement or some routine or what , I am not able to figure out from where these days are coming for. I have checked MV45AFZZ , RV60AFZA and other exit s, I couldnt find any code which shows these added 180 days..
    Guide me in finding out the source ot this, <removed by moderator>.
    Thanks in Advance
    Regards
    Amit
    Edited by: Thomas Zloch on Sep 30, 2011 3:46 PM

    HI,
    You may need to check the copy control settings between the debit memo request and sales document in transaction code VTAA.
    Select the target document type and source document type, and click on the details (header level). Check the routine that is assigned for the field copying requirements for transfering business data.
    The routine assigned may be copying the base line date from the source document. You may need to assign other routine or you may need to develop your own routine to resolve your issue.
    Regards,

  • Setting Due Date for task using business days

    While this may not be new news to many, I found little information on how to add a certain number of business days to determine the due date for a task to be used in a workflow.  For SharePoint 2010 environments that cannot run custom code, I have
    found a solution that utilizes two additional columns in the task list.  The first column I named
    Deadline (a number with no decimal places), which will contain the number of business days until a task is to be completed.
    The second I named Business Deadline (a calculated column returning a
    Date and Time).  The formula for the calculated column is:
    =[Modified]+INT(ROUNDDOWN([Deadline]/5,0)*7)+ IF(WEEKDAY([Modified]+MOD([Deadline],5))<MOD([Deadline],5), IF(WEEKDAY([Modified]+MOD([Deadline],5)+2)=7,MOD([Deadline],5)+4, IF(WEEKDAY([Modified]+MOD([Deadline],5)+2)=1,MOD([Deadline],5)+3,MOD([Deadline],5)+2)), IF(WEEKDAY([Modified]+MOD([Deadline],5))=7,MOD([Deadline],5)+2, IF(WEEKDAY([Modified]+MOD([Deadline],5))=1,MOD([Deadline],5)+1,MOD([Deadline],5))))
    The workflow on create in the task list then is:
    Set Deadline to {number of business days}
    then Wait for Deadline to equal {number of business days} 'Necessary to ensure the Business Deadline has been set
    'then Set Due Date to CurrentItem:Business Deadline
    Hope this helps a few others that are beating their heads against their desks like I was.

    Hi,
    Glad to hear that you solve this issue, thanks for your sharing.
    Thanks,
    Linda Li
    Linda Li
    TechNet Community Support

  • Building a report filter that excludes non-business hours and weekends

    Hi All,
    I need to know if this can be done in Answers:
    I have built a system in CRM that captures timestamps when SRs are moved into and out of stages in the SR resolution lifecycle. Then I have a report that uses timestampdiff to calculate the time that a SR spends in each SLA metric window (Respond, Diagnose, Resolve). The report currently displays only the hard difference based on a 24 hour clock.
    We need to be able to build a filter that will exclude any non-business hours (say outside of 9:00 to 5:00) and weekends, so that if my Respond window is 2 hours and an issue is recorded with a Response Start timestamp of 4:00pm, the report would show that if the Response Stop timestamp is at 9:30am the next business day, the SR met the required SLA.
    Does anyone know if this can be done? If so, any insight on how to build it? I've seen a document that explains how to exclude weekends from workflow, but can the same thing be done in reporting?
    This is a very urgent request and any help here is greatly appreciated.
    Thanks!

    Exclude weekends you can do but not business hours but perhaps you can create something....if timestampdiff(Days) greater than 1 then take off 16 hours....Mike Lairsons book has the formula for excluding weekends and I think someone may have posted it in this forum if you search for it.
    cheers
    alex

  • Payment terms - Baseline date calculation.

    Hi
    In payment terms configuration, we have option "No Default" for determining Base line date.
    If we have payment terms with above configuration.......
    In Fi, Baseline field will be blank while posing Customer Invoice, in which case We can enter baseline date manually. However If Invoice is generated from SD-billing document, we dont have any field "Baseline date" while posting billing doc. In such case how system determines Baseline date. When I checked few billing documents, Baseline date is defaulted with BIlling date even "No default" option is selected.
    Is there any configuration in SD that prompts this action. or is it always billing date is defaulted ?
    Please clarify

    Hi !! Madhu,
    There is a way, but not exactly what u require! You can check while maintaining the condition records in t.code VK12, observe the last two columns available, one is called a 'Fixed Value date' & the other is called 'Add Val Days'.
    If you make any entry in the field 'Fixed Value date' this will be the date from which the payment terms start taking effects. Or if you make an entry in Add Val Days' in this case the payment terms start taking effect from billing date + the no. of days mentioned in this column.
    You cannot make a entry in both 'fixed value date' & 'Add Val date'  fields at one time.
    Give your feedback if this has worked for you.
    Regards,
    PATHIK

  • Baseline date calculation from the terms of condition

    Dear,
    I need to calculate baseline date from the delivery date of the last consignment date of the GR. It means if there are 3 goods receipts for the purchase order then the due date should be = Last GR date + number of days in the terms of payment.
    Is it possible in Standard SAP? I have tried using the Base line date and document date in the terms of payment. It is not working
    Please help

    Hi,
    This requirement can't be fulfilled in standard SAP. Give logic coding in the program and can print the document for only sales order and not for cost center and Asset. You can custamize interactive report according to your requirement.Give the inputs to ABAPer and get it done. I hope this will help you. Thanking you.

  • How to get the data for last 3rd business day and also include saturday and sunday if its a wednesday?

    Hi All,
    I have a simple query which is below:-
    Declare @reportdate date
    set @reportdate= (DATEADD(dd,-5,getdate()))
    select * from dbo.Table
    where date IN (@reportdate)
    I need this query to pull the data for the last 3rd business day .So lets say today is monday then i need the data for last week wednesday which is 3 business days back from monday, if today is a tuesday it would be for last thursday ( as 3 business days for
    tuesday would be thursday). But if today is wednesday then i need to be last 3rd business day which is last friday and i also need to get the data for saturday and sunday.
    Can someone please help me how cani change my filter to do this?
    Please let me know if i am still unclear.
    Thanks

    Hi SqlDev12,
    Based on my understanding on your requirement, you can reference the below sample.
    CREATE TABLE BusinessTable
    Bdate DATE,
    Wd VARCHAR(10)
    ;WITH Cte(DT,WD) AS
    SELECT CAST('20150401' AS DATE),DATENAME(WEEKDAY,CAST('20150401' AS DATE))
    UNION ALL
    SELECT DATEADD(DAY,1,DT),DATENAME(WEEKDAY,DATEADD(DAY,1,DT)) FROM Cte
    WHERE DT<GETDATE()
    INSERT INTO BusinessTable SELECT * FROM Cte
    SELECT * FROM BusinessTable
    SET DATEFIRST 7 -- Set Sunday as the first day of a week
    DECLARE @givenDay DATE ='20150415' --Wednesday
    SELECT * FROM BusinessTable
    WHERE Bdate BETWEEN
    --For Monday and Sunday, select last wednesday
    (CASE WHEN DATEPART(WEEKDAY,@givenDay) IN(1,2) THEN DATEADD(DAY,2,DATEADD(WEEK,DATEDIFF(WEEK,0,@givenDay)-1,0))
    --For Tuesday and Wednesday, last week's Thursday and Friday
    WHEN DATEPART(WEEKDAY,@givenDay) IN(3,4) THEN DATEADD(DAY,-5,@givenDay)
    --For Thursday and Friday, current week's Monday and Tuesday
    WHEN DATEPART(WEEKDAY,@givenDay) IN(5,6) THEN DATEADD(DAY,-3,@givenDay)
    --For Saturday, current week's Wednesday
    ELSE DATEADD(DAY,2,DATEADD(WEEK,DATEDIFF(WEEK,0,@givenDay),0)) END)
    AND
    (CASE WHEN DATEPART(WEEKDAY,@givenDay) IN(1,2) THEN DATEADD(DAY,2,DATEADD(WEEK,DATEDIFF(WEEK,0,@givenDay)-1,0))
    WHEN DATEPART(WEEKDAY,@givenDay) IN(3) THEN DATEADD(DAY,-5,@givenDay)
    WHEN DATEPART(WEEKDAY,@givenDay) IN(4) THEN DATEADD(DAY,-3,@givenDay)
    WHEN DATEPART(WEEKDAY,@givenDay) IN(5,6) THEN DATEADD(DAY,-3,@givenDay)
    ELSE DATEADD(DAY,2,DATEADD(WEEK,DATEDIFF(WEEK,0,@givenDay),0)) END)
    DROP TABLE BusinessTable
    If you have any feedback on our support, you can click
    here.
    Eric Zhang
    TechNet Community Support

  • How to set the payment Due date calculation as per working days.

    how to make changes in the vendor Payment terms so that while calculating the Payment due date as per Payment terms, system calculates it based on Working Days & not the Calender days ?
    Help is much appriciated.
    Thank you,
    Amit

    Hi,
    This is the standard settings by SAP, normally we couldn't change it to working day.
    Good luck
    Tao

  • Working/Business Days with TimeStampDiff

    Hi,
    Background: I have an order table with a set of possible statuses. There also exists an audit trail that has a timestamp for when a certain status is set.
    Customer wants to measure between two different statuses - which is no problem with a timestampdiff between the two. However, there is also a need to subtract any day classified as a non-business day that falls between the two dates. What i've created is a table that contains the dates that are non-business days. In SQL, i would do this by doing the timestampdiff, then subtracting the count of days that falls between the two dates in the timestampdiff.
    The problem comes when i try to express this in the business model... I can of course do the timestampdiff, but i cannot seem to find a way to do the count of the days in the exception table. Anyone have an idea of how to solve this?

    The easiest way that i can think of is to have a database function created within the database which would accept the 2 dates as parameters and would return the count. Use EVALUATE to call the database function. Use my blog entry here http://oraclebizint.wordpress.com/2007/09/10/oracle-bi-ee-10133-support-for-native-database-functions-and-aggregates/ which would give you a basic idea of calling the database functions.
    Thanks,
    Venkat
    http://oraclebizint.wordpress.com

  • Calculate "Business Days" and account for holidays

    I have played with Date math based on what I have found for documentation, and adding an arbitrary number of days is pretty easy. But what about adding an arbitrary number of business days? I found a web site that talks about "Next business day",
    which could be adapted I am sure, but it only accounts for weekends. I want to calculate the date an arbitrary number of business days from a provided date. So, +3 business days calculated from a Monday should produce the date of the following Thursday,
    and calculated from a Friday should produce the date of the next Wednesday. And calculated from Friday Sept 4, 2015 (Friday before Labor Day) should produce Thursday Sept 10, 2015.
    Given that Windows is very business focused, I wonder if there is some nice hidden .NET functionality to calculate business days based on holidays as well? I know, some offices might give extra days off, four day weekends, etc. But those would be edge case
    enough to be safely ignorable for my purposes. Indeed, even holidays could probably be ignored, but if there is a quick approach I would rather use it. If I would need to code some sort of Exchange calendar scraper or some such, I'll live with just accounting
    for weekends. ;)

    You can pull holiday info from outlook.hol file and do the date math based on it. It won't be 100% reliable though. Not all the holidays listed in calendar are non-business days (not in all countries at least). International support may also present additional
    issues: in some countries it is a common practice to "move" weekend days to fill a single day gap between holidays and weekend (which screws up next business day calc anyway, regardless of holiday info :-). Not to mention all the possible industry-wide
    or company specific policies regarding working days.
    Gleb.

  • Baseline Date as the Document Date

    Hi,
    I have a query on Payment Terms which we maintain in the Posting Parameters->Postings Tab page in RE-FX Lease Out Contract.
    I maintain a payment term for 10 days in the RE-FX Contract.
    I have maintained a Condition which is due on 1st of every month with a monthly frequency.
    When i simulate the contract for planned Cash Flow, it shows me the conditions which are due to be posted on 1st of every month. Now, here is a scenario wherein I am unable to post the conditions through Periodic Posting (RERAPP) on 1st and i eventually carry out the Posting on 16th of that month. Hence I maintain Document Date and Posting date in the T Code RERAPP (Periodic Posting) as 16th of that month.
    Now when i open the Customer Line Items in FBL5N, i find that the Document Date and Posting date to be 16th whereas the Baseline date to be 1st of that month. This makes the calculation of Due Date totally wrong since the system takes 1st of that month as Baseline Date and adds Payment Term days (10 days) to it and shows 11th of that month as the Net due date (which instead should have been 26th of that month.
    I tried changing the definition of Baseline Date in the Payment Terms definition to Document Date but it still did not bring the desired effect.
    Pankaj

    Hi,
    I face similar problem but not involving TRM.
    I've payment term set-up in OBB8 and stating default baseline date = document date.
    But in FBL5N system is always retrieving posting date as baseline date. Is there any other setting prevailing over payment term definition?
    Regards,
    Baptiste

  • Business Days

    I have a simple select statement in SQL.  I want to add a column to compare 2 date columns and do business days count, not just days.
    Column B 01/15/14 - Column A 01/05/14 = X days removing Saturday and Sunday.  Not worries about the holidays.
    How can this be done?

    See this
    http://visakhm.blogspot.in/2010/03/calculating-business-hours.html
    just tweak the last part to return days instead of hours
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

Maybe you are looking for