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 @schauer.schau 

 

I have create a table the following table

 

DROP TABLE IF EXISTS "WORKDAY_CAL_TFACS";

CREATE TABLE WORKDAY_CAL_TFACS(

IDENT  VARCHAR(10),

JAHR int,

MON01 VARCHAR(31),

MON02 VARCHAR(31),

MON03 VARCHAR(31),

MON04 VARCHAR(31),

MON05 VARCHAR(31),

MON06 VARCHAR(31),

MON07 VARCHAR(31),

MON08 VARCHAR(31),

MON09 VARCHAR(31),

MON10 VARCHAR(31),

MON11 VARCHAR(31),

MON12 VARCHAR(31),

CBASIS int,

FTNUM int,

WENUM int,

CLOAD VARCHAR(1)

);

 

And i have add values

 

INSERT INTO WORKDAY_CAL_TFACS

select 

'SP-MAD',

2021,

'0001101100111110011111001111100',

'1111100111110011111001111100',

'1111100111110011110001111100111',

'000011111001111100111110011111',

'0001111001111100111110011111001',

'111100111110011111001111100111',

'1100111110011111001111100111110',

'0111110011111001111100111110011',

'111001111100111110011111001111',

'1001111100011110011111001111100',

'011110011111001111100111110011',

'1110001011001111100111110011111',

0,

365,

220,

''

If you are able to use with week_calendar please helpme, cause i am not able to use both calendar at the same time.


Hi @enrique sanchez alonso ,

 

it is not quite clear to me how to fill some columns in the new structure.

Here are my questions / comments on the individual columns:

- Ident - I assume that this means the name of the calendar. Can the same name be entered for several years? Does the column have to be limited to 10 characters or can it be more.

- Cbasis - what should be entered here?

- Ftnum - I assume that the column is the number of days in the year (365 / 366). Is this assumption correct?

- Wenum - what should be entered here?

- Cload - what should be entered here?

 

Thank you for the help


Hi @schauer.schau 

 

I have use with Oracle system the SAP format of WORKDAY TFACS and its works properly.

 

I have attacked an image with the description of the values.

 

TFACS table formatI´ll hope this will help you.

 

 


Reply