cancel
Showing results for 
Search instead for 
Did you mean: 

How to calculate Actual duration of an activity , field IDAUV of structue CORUF in hana ?

0 Kudos

Hi,

I need to show the Actual duration of an activity in one of our reports. This is IDAUV field of CORUF structure.

I have searched a lot and found that this is a calculated field and not present in any table. So I tried to find the logic to calculate this field and I found that it is the duration between start date/time (ISDD+ISDZ) and end date/time (IEDD+IEDZ).

I calculated this field in hana in same manner, but results do not match with IW47.

Kindly help me to know the table name if this filed is present in any table or the logic to calculate this in hana?

Thanks

Sawan

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member640809
Discoverer
0 Kudos

Use FM CX_SCHED_VIA_OPERATING_TIME

you can see the example of its execution in include LCORUF78

former_member345913
Active Participant
0 Kudos

Hello Sawan,

Your calculation logic is true, but also work center master data affects the result. Below you can find 3 different scenarios.

First, take a look at the workcenter capacity data:

You see, the shift start at 8 am and ends at 5 pm. And 1 hour of break is defined. That means 8 hours of total working time.

Now I've recorded 3 confirmations to 3 different orders. Actual works will be 0 for all, and start finish dates are different.

First confirmation results at 0 hour of actual duration since it is outside the start/finish date interval that I define in work center.

Second confirmation only took 1 hour and 20 minutes into account.

Third confirmation results in only 8 hours. Although 08-17 = 9 hours, it subtracted the hour of break.

Now this could be a start for you, look at your work center data configuration and analyze some confirmation data. You will grasp the logic for sure.

former_member345913
Active Participant
0 Kudos

Hi again,

It behaves different if you have more than one counter. As you point out it always displays the same actual duration for all counters as if they are only one work (as it is a single work order). Below I did some testing for the same order:
1st counter 05.06.2018 / 08:00 - 05.06.2018 / 17:00 = 8 hours (1 hour of break)

2nd counter 06.06.2018 / 08:00 - 06.06.2018 / 09:00 = 1 hour* (8/9) (Since I have break of 1 hours every 9 hours)

3rd counter 06.06.2018 / 10:00 - 06.06.2018 / 11:00 = 1 hour *(8/9)

If you add them up it should have been 8 + 0,89 + 0,89 = 9,78.

But the system calculated it as if I give a confirmation for the second day from 08:00 to 11:00 and calculated as 10,7.

Now as you can also figure out, regardless of the dates entered in different counters, it always take the earliest start date and latest finish date. And then it takes breaks into account and gives you actual duration.

So for your case, I do not know why, numbers do not add up 🙂

You should have 28th - 8th = 20 days of 7,5 hours = 150 and for the 29th: 339 minutes * (7,5/8) = 5 hours and 17 minutes. But you have 152,3 H instead of 155,1