Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Time calculation

Former Member
0 Likes
1,057

I've found a number of datetime function modules that take two date-time values and spit out the time between these date-time values in all sorts of ways. But what I really need is a function module that takes two date-time values and returns the business hours between the two values including taking into account the holiday calendar in SAP config.

As an example of what I'm refering to... Operating hours for my business is 8am to 5pm (Monday thru Friday) and, for instance, May 1st is a holiday in SAP config. The first date-time value is April 30th, 10:00:00 and the second date-time value is May 2nd, 10:00:00. Total time is 48 hours, however, total business hours is 18 hours (9 hr day) but you need to take out the holiday in between as well so that drops the "business time difference" is 9 hours.

Any thoughts?

Thanks

5 REPLIES 5
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,018

Its a date time time question and doesnt look basic.

You can have look at COPF_DETERMINE_DURATION. Please note that you have to pass the factory calendar to the function

Kesav

Read only

0 Likes
1,018

i'm in CRM7 and COPF_DETERMINE_DURATION does not exist.

Read only

0 Likes
1,018

Hi,

I donot have a CRM system here, May be you can login to other system and check the logic written in it. There should be some functions existing in CRM to get the working days between two dates, Making use of that please build the custom logic.

Kesav

Read only

0 Likes
1,018

the DURATION_DETERMINE exists in CRM. i'll use it.

Thanx.

Points rewarded.

Read only

Former Member
0 Likes
1,018

Dear Andre,

I am not sure whether this will help or not