Skip to main content

How do I calculate the working days between two activities with a work calendar from a non SAP system?

 

Hello community,

 

I am having difficulties calculating the number of working days between two activities. 

As I do not have SAP connected to Celonis, I want to connect a work calendar using another table. I have added an additional table with the following structure. It is linked to the time stamp of the cases.

 

Now I want to sum up the flags of all days between the two activities. However, I only get the timestamps of the activities from the added table (This means I always get two as a result). 

 

I have assumed that this could be due to the link via the timestamps of the two tables. Does anyone have an idea how I could solve this problem or how I can do the calculation in PQL?

 

Basically, I would be interested to know if it is at all possible to integrate a work calendar with a non SAP system? Unfortunately Celonis only suggests a TFACS table? Which table structure would be advisable?

 

Many thanks for the answer

Many regards

Laura

 

Table 

 

Hi Laura,

 

are you using the EMS? Then you can use different kinds of calendars directly in PQL. You can find an overview and detailed descriptions of the calendars in our documentation: https://help.celonis.cloud/help/display/CIBC/DateTime+Calendars

Interesting for you are the following calendars:

  • WEEKDAY_CALENDAR: With this, you can specify weekdays that are workdays, e.g. MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY to exclude weekends.
  • FACTORY_CALENDAR: Here you pass a table which contains shifts. The table always should contain the start and end timestamps of each shift. an IDENT column can be added to put calendars for e.g. multiple countries or factories into the same calendar table.

 

You can use those calendars inside REMAP_TIMESTAMPS. By subtracting two REMAP_TIMESTAMPS values, you get the difference between those timestamps in the unit you specified. REMAP_TIMESTAMPS is often used together with SOURCE/TARGET or CALC_THROUGHPUT. Some examples can be found in our documentation: https://help.celonis.cloud/help/display/CIBC/Throughput+Times

 

Let me know if you have any questions about that.

 

Cheers

David

 

 


Reply