Application Development 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: 

Calculate timestamp based on factory calendar and day work schedule

0 Kudos

Hello,

I want to calculate the date/time based on a timestamp and adding x hours. The result has to be a working day and within working hours. My search so far has lead me to the factory calendar (function module end_time_determine), but I cannot find anything that takes a timetable into consideration.

Any sugestions?

Regards,

Jurgen

6 REPLIES 6

LucianoBentiveg
Active Contributor
0 Kudos

Look up for FMs:

CIF_GEN3_CONVERT_DATETIME

CIF_GEN_CONVERT_TIMESTAMP

Regards.

nishanthbhandar
Contributor
0 Kudos

Try using CACS_TIMESTAMP_GET_DATE.

0 Kudos

Thanks for both answers, but these are not in the direction I intended. What I am looking for is:

adding a duration (days of hours) to a given timestamp and the result can not be:

- a holiday

- before of after service hours (say 8 AM till 8 PM)

That is why I was looking into work schedules, since we want to have this configurable.

0 Kudos

Hi,

Can you post your answer on how you manage to reolve this.I'am trying to achieve the same.Any tips on the FM or classes used to resolve the problem will be appreciated an rewarded.

Cheers,

Manju

Former Member
0 Kudos

Hi Meulenbeek;

How did you finally manage to implement this requirement. I am facing the same issue. I would appreciate it if you or anyone can share their resolution.

Thanks in advance.

Sizo Ndlovu

0 Kudos

I am sorry: the system has been decommisioned so i cannot recall the implementation of this function.