cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to raise an error for time off requests if minutes not equal to :00 or :30?

olgabartczak
Explorer
0 Kudos
636

Hi!

Has anyone has any experience with setting up the business rule to restrict requested hours in Time Off? For example, employee requests a Time Type X where the duration is equal to 6 hours 46 minutes. However, we only allow to request for 6 hours, 6 hours 30 min, 7 hours, etc. Basically every half an hour. I was wondering if there is any possibility to round the value up? Or to set up a business rule like "if minutes not equal to 00 or 30 then raise an error"?

I would appreciate any advice in this!

Accepted Solutions (0)

Answers (2)

Answers (2)

olgabartczak
Explorer
0 Kudos

Hi Volker

Thank you very much for this link. However, I'm not sure if that's possible for other scenario than Accrual. But I used another rule that is working - raise an error if number of hours is not equal to 1,2,3,4...etc. (Initally it was supposded to be half an hours as well but at then we only need full hours). Maybe it will be useful for someone:

Best regards

Olga

Volker_Ruof
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Olga,

yes, both options exist. Here is an example on rounding:

https://blogs.sap.com/2018/11/07/lets-do-rounding-without-any-lookup-tablemdf-useful-for-ec-time-off...

And if you check the implementation guide there are rounding examples as well.

You can also use business rule functions - but those create then just an error if the employee did not record what you want him to record. So, both options exist - one is a rounding, the other one is raising an error and forcing the employee to enter the correct value.

And in the documentation you find other rounding rexamples, here it is for accruals, but you can use it in validation rules as well I guess:

Implementatioon guide

Best regards

Volker