3

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

 8 months ago
source link: https://answers.sap.com/questions/14025058/how-to-set-delay-hours-or-minutes-to-zero-if-calcu.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
Search Questions and Answers
Jan 02 at 06:33 PM

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

153 Views


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.



3 Answers
Sort by:
Jan 03, 2024 at 12:43 PM

Hello Ahmed,

It's certainly possible to meet the described requirement with the following configuration. Results of my tests are promising.

Here are the assumptions for this solution:

  • Real Overtime must be calculated by subtracting delay from Overtime. A positive difference indicates remaining Overtime. A negative difference indicates Delay time.
  • Delay time is already calculated on a daily basis and is used as potential Delay in the configuration. The calculation is not described as part of this configuration.
  • Similarly, Overtime is also calculated daily and is used as potential Overtime. The calculation is not described as part of this configuration.

These assumptions are important to consider before implementing the suggested solution. Each organization might have slight variations in how they handle overtime and delay, so adjust the solution as necessary to fit your situation.

The solution looks like this

  • First, calculate the difference using the valuation type 'Difference Between Threshold and Input'. If Overtime is more than Delay, your result will be positive. If Delay is more, your result will be negative.
  • Next, if your calculated difference is less than 0 (indicating more delay), route this potential Delay to a separate Time Type Group as Time Type Group Below, using 'Compare Threshold with Comparison Group to Route Input'. Remember to set up the Input Time Type Group with Reverse Sign since the difference is negative.
  • If your calculated difference is more than 0 (indicating more Overtime), route this potential Overtime to a separate Time Type Group as Time Type Group Above. Use the same valuation type as above: 'Compare Threshold with Comparison Group to Route Input'.

With this setup, either the Time Type Group for real Delay or the real Overtime will be filled.

The different valuation types are described in more detail here: https://blogs.sap.com/2022/10/20/how-to-setup-time-evaluation-in-time-tracking/

I hope this helps! Let me know if you have any more questions.

Best Regards,

1 comment
Jan 03, 2024 at 05:07 PM

Hello Timo Biedenbender

Thanks for your support

I applied your solution it works fine but in case there is Delay with value 0 and Overtime with any value result will be delay same as overtime.

"Next, if your calculated difference is less than 0 (indicating more delay), route this potential Delay to a separate Time Type Group as Time Type Group Below, using 'Compare Threshold with Comparison Group to Route Input'. Remember to set up the Input Time Type Group with Reverse Sign since the difference is negative.""


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK