Formula to calculate due date considering only business days (Middle East)
I have a form which contains two fields: 'Start Date' and 'Completion Date'; the 'Completion Date' field is automatically set, it's always 3 more days than the 'Start Date' field.
The problem is that these 3 days must be only business days.
- if 'Start Date' is on Sunday then the 'Completion Date' should be set to next Wednesday
- if 'Start Date' is on Monday then the 'Completion Date' should be set to next Friday
- if 'Start Date' is on Tuesday then the 'Completion Date' should be set to next Sunday
- if 'Start Date' is on Wednesday then the 'Completion Date' should be set to next Monday
- if 'Start Date' is on Thursday then the 'Completion Date' should be set to next Tuesday
- if 'Start Date' is on Friday then the 'Completion Date' should be set to next Tuesday
- if 'Start Date' is on Saturday then the 'Completion Date' should be set to next Tuesday
Friday and Saturday should be ignored as 'Completion Date' (weekend in Middle East).
Anyone has any idea of how to make this formula? I need to put it into a calculated SharePoint column.
Thanks in advance for your help.
Hi
check my post
http://www.romeodonca.ro/Lists/DB_IT/Adding%20a%20number%20of%20working%20days%20to%20a%20specific%20date
If you need more details let me know
Romeo Donca, Orange Romania (MCSE, MCITP, CCNA) Please Mark As Answer if my post solves your problem or Vote As Helpful if the post has been helpful for you.
Similar Messages
-
Formula to calculate due date considering only business days
Hello,
I have a form which contains two fields: 'Start Date' and 'Due Date'. The 'Due Date' field is automatically set , it's always 4 more days than the 'Start Date' field.
The problem is: Those 4 days must be only business days... e.g., if 'Start Date' is on Friday then the 'Due Date' should be set on the next Thursday. Saturday and Sunday are ignored. Anyone has any idea of how to make this formula? I need to put it into
a calculated SharePoint column.
Thanks in advance.Hello,
you can use this calculated formula for Due Date:
=IF(WEEKDAY(StartDate+4)=7,StartDate+6,IF(WEEKDAY(StartDate+4)=1,StartDate+5,StartDate+4))
Be aware that it treats holidays and national bank holidays as business days unless they are on a weekend.
cheers, teylyn
teylyn,
Thank you for your example. However this formula doesn't seem to be entirely correct, right? Because
according to the excel spreadsheet you sent, when the Start Date is May 29th (Thursday), Due Date
will be on June 2nd (Monday) taking so only two days rather than four.
Maybe a little change in this formula and we will be fine. -
Calculation of due date based on Business Days for FICA documents
Hi All,
I am working on project where SD - FICA integration is in picture. We post some charges through SD and FICA document gets posted on relevant Contract Account.
Normally we create Sales Order using transaction VA01 and then we do Billing for this Sales Order through VF01. After billng is done, FICA document automatically gets generated.
We have following requirement to be fulfilled.
For the SD bills posted as above, I want to calculate due date of these bills based on Business Days for FICA document generated (SAP Standard calculate due date based on Calander days). We can use factory calander for calculating business days in relevant function module.
I have checked in the system and it seems that event 1330 ( FM - ISU_DUE_DATE_DETERMINE) is not working in this scenario. Is there any other FM which I can use?
Can anyone help me on this?
Regards,
PradeepHello Praeva ,
The event 1330 has a sample FM FKK_SAMPLE_1330. It doesnt even have a Standard Function Module.
You need to create a Installation-Specific FM and put your code to determine the Due Date based on the logic.
Rgds
Ram Kumar. -
Data between Date Range with Business Days only
Hi All,
We have a requirement that we need to retrieve data between a data range, providing From date and To date as input.
We also have the option to Include Business Days Only through a check box which will be passed to CR 2008 through a report frame work.
Can some one help me how to display the report data within the Date Range entered and that includes only Business Days.
Thanks in advance for the help.
Regards,
Naresh.try this formula. Lets if your date range parameter is {?date} then try this formula
@startdate:
if datepart('w',minimum({?date}))=7 then
minimum({?date})+2
else if datepart('w',minimum({?date}))=1 then
minimum({?date})+1
else
minimum({?date})
@enddate
if datepart('w',maximum({?date}))=7 then
maximum({?date})+2
else if datepart('w',maximum({?date}))=1 then
maximum({?date})+1
else
maximum({?date})
regards,
Raghavendra -
Hi All
Can any one please guide me in creating a payment term
The Base Line Date would be 80 days from Posting date ........... But end of that month
Example
Posting date 01.01.2009 so the base line date would be on 21st March
01.01 ; 31.01 ; 31 Days
01.02 ; 28.02 ; 28 Days
01.03 ; 21.03 ; 21 Days 80 Days
But due date should fall on end of that month 31st of march
So irrespective of any day calculated as above in that month it will always take the baseline date as last day of the month
Its Picking up the posting day as Baseline date from Transaction VA01 -> Additional data tab -> ETD ( Festinated Time of Departure)
From this date it need to calculate the due date as above ( 80 day but last day of the month)
Please Guide
Many thanks in advance
AadiHi Aditya,
You may have to create 2 payment terms using the day limit option to meet this requirement.
Follows the below steps -
T-code OBB8
Term 1
Payment terms = xxxx (as you wish)
Day limit = any number between 10-15 (you may fix an appropriate date as you think fit for your business)
Default for baseline date = Posting date
Payment terms/fixed date = 31
Payment terms/additional months = 2
Term 2
Payment terms = same name as above
Day limit = 31
Default for baseline date = Posting date
Payment terms/fixed date = 31
Payment terms/additional months = 3
Logic here is... for all invoices with posting date on or before 10th-15th of a month, 80th day will fall definitely on the 2nd month. Invoices with posting date after 15th, the 80th day will fall on the 3rd month.
You have to take a concious decision on the day limit number. Because 80 days will not exactly work for all the months.
Regards,
Mike -
Aprroval for Invoice have due date greater than 100 days
Hi all!
I would like to create query to approve for Invoice have due date greater than 100 days.
SELECT 'true' from OINV where max(datediff(day, OINV.docduedate, getdate()))>100 and OINV.docstatus ='O' and cardcode = $[$4.0.0] group by cardcode
It's not working. Can you help me!
Thanks!Hi Tien,
Hopefully not trying to teach you how to suck eggs here, but it looks like the query is doing too much. There shouldn't be a need to perform a "GROUP BY" in a query to dictate if an approval is to be triggered or not, only the criterai to make it happen.
For examle, the following code will send a transaction for approval if the customers code equals a specific reference.....
SELECT 'TRUE' FROM ORDR T0 WHERE ${ORDR.CardCode} = 'ABC001'
If you're wanting a query to just return a boolean answer based on the date criteria, you might want to try adapting your query to something like.......
SELECT 'true' from OINV where max(datediff(day, ${OINV.docduedate}, getdate()))>100 and ${OINV.docstatus} ='O' and cardcode = ${$4.0.0}
(As an additional tip, in order to test a query that you're wanting to use as either a formatted search or approval type selection, when in the transaction, if you locate the relevant saved query under "Tools > Queries > User Queries" etc, where you have references to specific fields e.g. ${ORDR.CardCode}, this will pick up the values from the current record and give you a what if scenario. I tend to have just a "Temp" query I use for WIP type queries of this nature.)
Note - You need to replace the bracket's "{}" with square ones, I've used the others as the forum posts as a http reference.
Hope this helps!
Julian -
"D2008178" - FM to calculate the date of the x day in a year
Hi all!
I am looking for a FM to calculate the date of a certain day in the year.
For example which date has the day 178 of the year.
This has nothing to do with the factory calendar!!!
Thanks a lot for your help
CU
PeterHi Peter,
Please check this funtion module "FIMA_DATE_CREATE".
Sample code as follows:
REPORT ztest_vinay.
DATA: w_date TYPE vtbbewe-dvalut.
PARAMETERS: p_date TYPE vtbbewe-dvalut.
CALL FUNCTION 'FIMA_DATE_CREATE'
EXPORTING
i_date = p_date " Here you need to pass first day of the year
i_calendar_days = 178
IMPORTING
e_date = w_date.
WRITE: w_date.
Regards,
Vinay
Edited by: Vinay Kumar Amruth on Feb 18, 2009 2:52 PM
Edited by: Vinay Kumar Amruth on Feb 18, 2009 3:01 PM -
Payment terms should calculate Payment due date based on working days
Hi Experts,
As we know that standard SAP calculates Payment due date= base line date + number of days maintained in payment terms. In this payment days are considered as calendar days and not the working days.
Example: If base line date is Thursday, payment terms says 3 days then payment due date is calculated as Sunday ( which is not a working day as per the factory calendar I use). The requirement is that payment date should be calculated as following Tuesday considering Satuarday and Sunday are not working days as per the calendar.
Can you please suggest how can we achieve this?
Thanks,
RaviYou can not acheive from config pooint of view but you can use BADI and get the solution
use BAdI MRM_PAYMENT_TERMS to set terms of payment
You can use this Business Add-In to change the following fields for the
terms of payment in the invoice document header:
o ZFBDT: Base date for due date calculation
o ZBD1T: Discount days 1
o ZBD1P: Discount percentage 1
o ZBD2T: Discount days 2
o ZBD2P: Discount percentage 2
o ZBD3T: Deadline for net condition
o ZLSPR: Key for payment block -
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,
chitracall 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 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.
GillHi,
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 -
Calculate due date for vendor payment
hi friends,
In my project i need to calculate the due date for vendor payment.as my client maintain different payment terms for different vendors am not able to pick the payment key from t052 table and calculate the due date.
do anyone have a solution for this......
prajithHi
You can insert Payment terms in Vendor master and also you can change or assign payment term while making transaction.
But first of all you should have payment term.
IMG -- Financial Accounting -- Accounts Receivable and Accounts Payable -- Outgoing Invoices/Credit Memos -- Maintain Terms of Payments
Regards,
Amit -
Hello guys:
I need your help here.
I try to build an application that has to calculate the due date for 14 days.
I have two date picker:
1)P11_BORROW_DATE
2)P11_RETURN_DATE
How can i calculate the borrow date plus 14days to become the return date shown in the in the second date picker.
I am using date format of (DD-MM-YYYY).
Can u guys explain to me step by step, for example : (html form header region, process, and also htnl attiributes, etc )
Edited by: user10258545 on 14-Sep-2008 10:57hello
>> It can calculate the date after i press a button. It cannot calculate automatically when i change the borrow date in my application.
In his example, Denes is using AJAX. You can read more about AJAX with APEX in here - http://htmldb.oracle.com/pls/otn/f?p=11933:63 . This page should answer most of your questions.
I’m not sure why you think you must press a button in order to fire the AJAX code. You have complete control on the firing timing, by using the appropriate event. Using ‘onchange’ or ‘onblur’ will fire the AJAX code without pressing any button.
>> Btw, where should i load the process??
The processes involved with APEX are Application Processes with process point of “On Demand …”. They are been loaded on demand, by part of the AJAX process.
Regards,
Arie. -
Formula for report to run with data of only current day
I need a report that whenever refreshed it run with data for only the current day. It is for knowing how many checks were performed from the start of the current day to the time the report runs. Iu2019ve tried to use the select expert but I guess I need to use a formula in it.
Thanks,
AndreiaAndreia,
I think you've posted this into the wrong forum!
-Anil -
ICal to do list due date shows only day and year
Trying to set up a few to do items for the future, I checked the "due date" box and it's showing today's date as 22/2013 as oppose to "01/22/2013". While I can change the "22" to a future day, I don't have the option to modify the month because it's not shown. Any clues?
Thanks.Nevermind. There's a setting in the preferences for how soon after an event is completed that it is removed from the visible list.
-
Fixed day limit to calculate Due date for payments
Dear Gurus,
My Management wants to regulate its cash flows and want to use terms of payment in such a way that customer invoicing should be due on whole month evenly
Proposed payment plan is that
if invoices are created with 01 to 15th of the month, term of payment should be 40 days due net
if invoices are created with 16 to 25th of the month, term of payment should be 30 days due net
if invoices are created with 26 to 30th of the month, term of payment should be 25 days due net
so according to above scenario, plan should be
Invoice date Payment terms payment due date
9/1/2011 40 10/11/2011
9/15/2011 40 10/25/2011
9/16/2011 30 10/16/2011
9/25/2011 30 10/25/2011
9/26/2011 25 10/21/2011
9/30/2011 25 10/25/2011
Requirement,
Please advice how to cater it through OBB8 or should we have to look towards ABAP solution
BR
SajidaHi
Create the payment terms like
1)
Payment Terms Z01
Day Limet 15
In Payment Terms TAB
Term Percentage No,of.days
1 0.00 40
2)
Payment Terms Z01
Day Limet 25
In Payment Terms TAB
Term Percentage No,of.days
1 0.00 30
3)
Payment Terms Z01
Day Limet 30
In Payment Terms TAB
Term Percentage No,of.days
1 0.00 25
This will resolve your issue,we can create multiple levels with same payment term with different day limit
Thanks
Kameshwar Rao
Maybe you are looking for
-
Can not see long text description of a characteristics in portal
Hi experts, I designed two queries via Query designer and published them to portal but I can not see the the long text description of "Name" attribute belongs to 0BPARTNER characteristics. One of the queries shows only the last name of partner in por
-
Using a POP mail account in mac mail
My friend has an AT&T sbcglobal POP mail account he has added to his mac mail app. Since it is POP mail it is not always received in his mac mail box if AT&T Yahoo account receives it first. I guess he can prevent the Yahoo mail box from downloading
-
Is it possible to change the length of a note in the score editor?
I thought I saw somewhere that it was now possible to adjust the length of a note in the score editor graphically, i.e. by clicking on the note and somehow adjust its length directly to change it from 1/4 note to 1/8 (for example). I don't want to do
-
I have a Power Mac G4 with OX 10.4.11. I have previously burned DVDs with no problem. Now I've gotten two different sets of messages. One states that the disc is not readable and an error code: 0x8002006D. The more recent message states the disc
-
Hello Community, I just made a PDF form on Adobe Acrobat XI Pro (trial version). In the last 3 textboxes, people can fill their e-mail. I want to make a interactive button with when you click it, outlook opens and the 3 mailadresses are there. Is thi