cancel
Showing results for 
Search instead for 
Did you mean: 

how to set delay hours or minutes to zero if calculated overtime covers detected delay?

anafea
Explorer
0 Kudos

I created time valuation to calculate late comer and overtime for example

Scheduled working time is 08:00 am to 05:00

if entered time event: In 09:00 am and Out is 07:00 pm the system will calculate 1 hour delay and 2 hour overtime

but customer want to if overtime hours cover delay time then calculate overtime to be 1 hour and set delay to 0

I tried to have solution but I couldn't .

please advise.

View Entire Topic
TB
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello anafea,

can you please check both Time Valuations (TV105, TV106) which route the Time Type Group TTG104? Can you test the result when TTG104 is used as Comparison Time Type Group in these Time Valuations?

The Time Type Group TTG104 needs to be used as Input Time Type Group and Comparison Time Type Group in these Time Valuations.

Best Regards,

Timo

anafea
Explorer
0 Kudos

Hello timo.biedenbender

Thanks.

I tried your solution it working to fix last test case I sent to you but I tried other test cases and it fail.

sorry may I didn't explain full scenario which is

1. scheduled working time 08:00 am to 05:00 pm

2. I did time valuation to get late comer, early leave and overtime and it calculate correctly for many test cases.

3. the client asked to calculate overtime after deduct any late comer or early leave (if exist) which mean employee can work flextime

the main issue that in SAP time valuation there is no valuation type to get number of hours/minutes worked before scheduled start time per day I can get but as full week. And after trying more time valuations (equations) with your help and support I asked the question

https://answers.sap.com/questions/14028525/how-to-get-early-hours-or-minutes-before-scheduled.html

Thanks again for your help and support.

TB
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello anafea,

Sorry that I ask again for details of this requirement. I would like to understand it in detail, so that I'm able to help.

Can you please describe in detail the other test cases you mentioned? Maybe, you can add screenshots from trace for them.

I'll answer your question about the main issue there. I assume it should be possible to determine recorded working time before the scheduled working time.

Best Regards,

Timo

anafea
Explorer
0 Kudos

Hello timo.biedenbender

Thanks for Your patience.

requirement details:

the Scheduled working time is: Start: 08:00 AM End: 05:00 PM

Employee can come before/after start time can leave before/after end time (2 hours)

Overtime will be calculated for early or late hours more than scheduled hours after deduct any delay or early leave

anafea
Explorer
0 Kudos

Trace for No.8 TV106 not exist

TB
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello anafea,

In relation to case 8, is it expected behaviour that 1 hour of potential overtime (07:00 AM 08:00 AM) and 2 hours of early leaving (03:00 PM - 05:00 PM) results in 1 hour of real "undertime" (delay time)?

After I analyzed case 8 using your screenshots from the trace, it seems that TV104, TV105, and TV106 are correct. This is the part of the configuration, which I described.

I think, that the value of the Input Time Type Group SAR Overtime Base (TTG013) causes the issue. TV015 would need to be analyzed to verify whether TTG013 calculation is right. This Time Type Group is used in TV104 as Input Time Type Group and, in my opinion, causes the issue.

Do note that a comprehensive understanding of the requirement and your Time Recording Profile would be required to describe the necessary changes. With both, I'm not familiar.

But taking into account my current knowledge of your configuration, it appears that the Time Type Group “Find First Gap...” might need to be removed from TV015 as an Input Time Type Group. When you remove this Time Type Group from the Time Valuation TV015, please be aware, that there could be negative side effects to other Time Valuations when they use the Time Type Group TTG013 as well.

The part "(2 hours)" of your sentence "Employee can come before/after start time and leave before/after end time (2 hours)" is slightly unclear. Does this mean, that only up to two hours must be considered as overtime/delay time? Or does this mean, that only two hours before/after start of scheduled working time and two hours before/after end of scheduled working time must be considered. If one of both conjectures is true, your configuration might not handle this situation accurately.

Best Regards,

Timo

anafea
Explorer
0 Kudos

Hello timo.biedenbender

Regarding to SAR Overtime Base (TTG013) You are right and I fixed it but I'm facing the issue that I can not calculate shortage hours (delay or early leave) between working hours and scheduled hours number per day (as employee can start before/after scheduled start time and leave before/after end time which mean I compare recorded hours with number of scheduled hours = 9 )

For The part "(2 hours)" of your sentence it's mean flextime for 2 hours but it may be more or less.

Regards,