Human Capital Management Blogs by Members
Gain valuable knowledge and tips on SAP SuccessFactors HCM suite and human capital management market from member blog posts. Share your insights with a post of your own.
cancel
Showing results for 
Search instead for 
Did you mean: 
Karthi_Viswa
Active Contributor
3,347
Thanks to volker.ruof , to provide us hint in cracking below rule.

https://partnercommunity.successfactors.com/t5/Employee-Central/Time-OFF-Take-Rule/m-p/11358

In this blog, am going to explain how we can control users from applying leave/absence on a particular date using simple "Month of Year" and "Day of Month" function in the rule.

These scenarios may come in when there is an integration to HCM in place, where certain date/absence should not be combined and they want EC to send it separately.

Scenario 1:

  • Users should apply for separate absence/leave on 05th June, should not be a combined leave.

  • Users not allowed to take leave from 04th to 07th of June, because 05th June falls in between those days, or whatever the start date and end date of the absence, 05th June should not be combined, it should be applied separately only.


Take Rule using the function "Month of Year" and "Day of Month"



Scenario 2:

  • Users are not allowed to apply for leave/absence from 05th to 07th of June, because 05th has to be applied separately only.

  • ie. start date should not be 05th June.




 

Scenario 3:

  • Users are not allowed to apply for leave/absence from 04th to 05th of June, because 05th has to be applied separately only.

  • ie. end date should not be 05th June.




 

The tricky one what if Users are not allowed to combine 31st Dec along with other date/absence and should apply a separate leave for 31st Dec !!

31st Dec is the year-end and the next date goes to next consecutive year.



 

Hope this helps someone, where we can achieve complex scenarios using simple rule functions.
3 Comments
former_member60840
Participant
0 Kudos
Hello Karthik,

This is much informative.

Thank you for sharing.

Regards

Jyotika
Volker_Ruof
Product and Topic Expert
Product and Topic Expert
0 Kudos
Thanks for posting this here.
S0016945977
Discoverer
0 Kudos

Hi Karthik

Thank you for sharing these handy tips!

Regarding the last scenario where users are not allowed to combine 31st Dec along with other date/absence, wont the logic fail in case the user applies for leave from 30th November 2018 – 2nd Jan 2019?

In this case, Month of Year will be 11. Since it’s an AND condition, since the first condition checked is not met, the entire loop fails – thereby allowing the user to include 31st Dec in the absence applied.

I reckon the logic will be fool-proof if it satisfies the below scenarios:

Start Date - End Date

30.11.2018 - 31.12.2018

30.12.2018 - 31.12.2018

31.12.2018 - 1.1.2019

31.12.2018 - 5.1.2019

31.12.2018 - 31.12.2019 (this one's unlikely to happen in real-time but it could still be a possibility)

Please do correct me if there’s a gap in my understanding. Look forward to your response.

Regards

Saeed Ahmed

Labels in this area