Rules and Picklists in The SuccessFactors Metadata Framework - SAP Blogs

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

5/23/2021 Rules and Picklists in the SuccessFactors Metadata Framework | SAP Blogs

Community

Ask a Question Write a Blog Post Login

Luke Marson
July 9, 2013 3 minute read

Rules and Picklists in the SuccessFactors Metadata


Framework
Follow RSS feed Like

28 Likes 31,503 Views 24 Comments

Following up on my recent blog Extending SuccessFactors with the Metadata Framework, I wanted to delve a
little deeper into the Rules Engine that forms part of the SuccessFactors Metadata Framework (MDF) and also
look at Picklists. Both of these form an integral part of data validations, approvals, and business logic that is
used within the SuccessFactors system and, in particular, Employee Central.

Rules Engine

As mentioned in my blog on the MDF, it provides a exible and consistent framework for customers and
consultants to extend the object model of SuccessFactors and add their own unique rules, validations, and
business logic to SuccessFactors. Rules can be used where user exits, BAdIs, or ABAP program Enhancement
points would be used in SAP HCM to provide customer-speci c business logic or validation of data input.

The Rules Engine allows you to create rules by modeling statements and ow logic to de ne the business logic
of the rule. Rules have two sets of logic that is con gured in the MDF: If logic and Then logic.

If logic uses statements “and” and “or” statements to determine if the Then logic should occur. Each of these
statements involves checking a eld for a particular value or object attribute. If logic can also be set to Always

https://blogs.sap.com/2013/07/09/rules-and-picklists-in-the-successfactors-metadata-framework/ 1/14
5/23/2021 Rules and Picklists in the SuccessFactors Metadata Framework | SAP Blogs

True, which means that the Then logic automatically executes when the rule is triggered. An example can be
seen in the screenshot below, along with Then logic.

The Then logic determines either the value to be set and/or the message to be raised if the If logic conditions
are met. When the Set Output Type is selected then a value will be set to the eld that is con gured, either from
a selected value or an object attribute.

Hooks

Once a rule has been created, it can be assigned to one or more Hooks. Hooks are points at which Rules can be
triggered and can be either at the object level or the eld level.

At the object level Rules can be added at four points of the object “lifecycle”:

Initialization
Validation (pre-save)
Saving
Deleting

At each point one or more rules can be de ned. They will be triggered once the object gets to that point of its
maintenance.

https://blogs.sap.com/2013/07/09/rules-and-picklists-in-the-successfactors-metadata-framework/ 2/14
5/23/2021 Rules and Picklists in the SuccessFactors Metadata Framework | SAP Blogs

Within the object level rules can be added at eld level. Here one or more rules can be de ned so that they will
be triggered when a eld is modi ed.

Picklists

Picklists are, simply, selection lists used to populate a data input eld with one of a number of prede ned
values. They act in the same way as F4 Helps in SAP HCM. Picklists provided in the standard system can be
altered to use customer-speci c values. The screenshot below shows a simple example of a Picklist for Marital
Status.

https://blogs.sap.com/2013/07/09/rules-and-picklists-in-the-successfactors-metadata-framework/ 3/14
5/23/2021 Rules and Picklists in the SuccessFactors Metadata Framework | SAP Blogs

Picklists are con gured using the option Manage Con gure Generic Object De nition under Company Settings
in OneAdmin or under Generic Objects in the old Admin Tools. Below shows a Picklist being created for the
di erent types of documents that you can contribute on SCN.

https://blogs.sap.com/2013/07/09/rules-and-picklists-in-the-successfactors-metadata-framework/ 4/14
5/23/2021 Rules and Picklists in the SuccessFactors Metadata Framework | SAP Blogs

This Picklist can then be assigned to a eld in the MDF as below. You can also see the Rules section to de ne
one or more rules at the eld level.

https://blogs.sap.com/2013/07/09/rules-and-picklists-in-the-successfactors-metadata-framework/ 5/14
5/23/2021 Rules and Picklists in the SuccessFactors Metadata Framework | SAP Blogs

Summary

When combined, the Rules Engine and Picklists provide customers to add their own business logic, rules, and
validations to objects and elds. This means that customers can have a signi cant level of control on ensuring
that data is created, maintained, and deleted the way that they need it. It also means that data quality can be
upheld by using the system to validate data entry or provide users with picklists from which to select values.

The MDF is covered in detail in the SAP PRESS title SuccessFactors with SAP ERP HCM.

https://blogs.sap.com/2013/07/09/rules-and-picklists-in-the-successfactors-metadata-framework/ 6/14
5/23/2021 Rules and Picklists in the SuccessFactors Metadata Framework | SAP Blogs

Alert Moderator

Assigned tags

HCM (Human Capital Management) | Cloud | cloud on-demand and saas | con guration | customization |

View more...

Related Blog Posts

SAP SuccessFactors Metadata Framework


By Former Member , Dec 18, 2015
Extending SuccessFactors with the Metadata Framework
By Luke Marson , Jun 25, 2013

SAP SuccessFactors Metadata Framework (Part 2)


By Former Member , Apr 04, 2016

Related Questions

Need SuccessFactors Reference Documents !!


By Former Member , Oct 22, 2013
Role Based permission in SuccessFactors
By Former Member , Nov 24, 2015

https://blogs.sap.com/2013/07/09/rules-and-picklists-in-the-successfactors-metadata-framework/ 7/14
5/23/2021 Rules and Picklists in the SuccessFactors Metadata Framework | SAP Blogs

SuccessFactors Azure MFA Con guration


By Former Member , Jun 20, 2016

24 Comments

You must be Logged on to comment or reply to a post.

Former Member

July 9, 2013 at 8:53 pm

Luke, if one reads through the MDF documentation they would have to ip through 20 pages to get the
information you provide in this well-structured blog. Great follow-up to your MDF blog.

Cheers,

Jyoti

Like(1)

Luke Marson | Post author

July 10, 2013 at 6:57 am

Thanks Jyoti. I know which document you are referring too and I only read it after I'd written the blog. I'm
expecting it to be enhanced over the coming months as the MDF gets rolled out. My blog may become obsolete
in that case though

Best regards,

Luke

Like(1)

Sven Ringling

July 10, 2013 at 12:22 pm

Seems as the cloud systems face an ever wider range of real world requirements they gain in complexity and
then it takes an SAP on-premise trained and battle hardened consultant like Luke to cut through the jungle

Like(0)

Luke Marson | Post author

https://blogs.sap.com/2013/07/09/rules-and-picklists-in-the-successfactors-metadata-framework/ 8/14
5/23/2021 Rules and Picklists in the SuccessFactors Metadata Framework | SAP Blogs

July 10, 2013 at 3:32 pm

I think the key to the SaaS is getting what SaaS means as a delivery method for HR services. It's not just on-
premise technology hosted in the Cloud. The aim for consultants who transition is to understand both on-
premise and Cloud.

Like(0)

Christopher Parmar-Saville

August 13, 2013 at 3:47 pm

Nice article. Keep them coming!

Like(0)

Luke Marson | Post author

August 13, 2013 at 3:58 pm

Thanks Christopher!

Like(0)

Luke Marson | Post author

April 8, 2014 at 8:11 pm

Readers of this blog might enjoy this article if they have an SAPexperts subscription:

Creating Metadata Framework Objects in SuccessFactors Employee Central

Like(1)

Former Member

February 2, 2015 at 4:16 am

Hi Luke,

Thanks for sharing nice overview on rules and picklist. I am trying to create a custom rule using manage data
link but "Rule type" eld is blank while I create a custom rule.

Based on rule engine Handbook ( section 3.3 ) I followed mentioned steps to create a rule type.

1. Company Processes & Cycles portlet, -> Company Settings -> Con gure Object De nitions.
https://blogs.sap.com/2013/07/09/rules-and-picklists-in-the-successfactors-metadata-framework/ 9/14
5/23/2021 Rules and Picklists in the SuccessFactors Metadata Framework | SAP Blogs

2. Click Search: Picklist and select RuleType (RuleType) from the dropdown list.

However I could not nd any prede ned picklist so I created custom picklist "RuleType".

After I created a picklist to for rule type I still can not nd my custom rule type in "RuleType" dropdown from the
dropdown list.

Is there something I am missing while creating a rule type? I have checked permission and I have all the
permission to create a rule.

Thanks

Abhay

Like(0)

Luke Marson | Post author

February 4, 2015 at 9:52 pm

Hi Abhay,

You need to create the Rule Type picklist as per the handbook. It seems like you might have done that. However,
make sure you have set the e ective date of your RuleType picklist to 1/1/1900.

All the best,

Luke

Like(0)

Former Member

April 3, 2015 at 4:14 pm

Hi Luke,

I appreciate the simplicity of this blog and it's always easy to comprehend. I'm currently looking for any
expression within the rule to extract the last 4 characters of a string.

I have built the custom eld WBS in MDF alternate cost distribution, the requirement is when saving the record I
have to check if the cost centre value is equal to last 4 characters of WBS string. Kindly share your thoughts.

Regards

Prasanna Manikandan

Like(0)

https://blogs.sap.com/2013/07/09/rules-and-picklists-in-the-successfactors-metadata-framework/ 10/14
5/23/2021 Rules and Picklists in the SuccessFactors Metadata Framework | SAP Blogs

Luke Marson | Post author

April 7, 2015 at 12:19 pm

Hi Prasanna,

See Girish's response to your question on his blog:

Employee Central | Business Rules Engine at work

Best,

Luke

Like(0)

Naveed Bilal

May 22, 2016 at 12:28 am

My Question - i have a picklist of numbers which once selected from the dropdown will be used to do some
calculations. Somehow the calculations are not correct when i do it thru picklist but If i manually input a number
in the eld, the calculation is correct. Any ideas please?

Like(0)

Luke Marson | Post author

May 23, 2016 at 3:16 pm

Picklist is stored as text, so you would need to use a function to convert the datatype to number within your rule

Like(0)

Naveed Bilal

May 23, 2016 at 3:22 pm

Luke - You are awesome. Still need to gure out how to convert the picklist string to number but THANKS A LOT.

Like(0)

Naveed Bilal

May 23, 2016 at 3:59 pm

Hi Luke, How can we change the datatype thru a rule? Thanks

https://blogs.sap.com/2013/07/09/rules-and-picklists-in-the-successfactors-metadata-framework/ 11/14
5/23/2021 Rules and Picklists in the SuccessFactors Metadata Framework | SAP Blogs
Like(0)

Luke Marson | Post author

June 4, 2016 at 2:18 pm

You can use the ToNumber() function

Like(0)

Former Member

May 24, 2016 at 8:12 am

Hi Luke,

Thanks for another great article. I'm wondering if you can help me; do you know how I modify the 'AddressType'
picklist? The implementation guide states that for this picklist, the external code needs to be referenced in the
data model; do you know if there are any further notes I can nd around this?

Many thanks for your help!

Like(0)

Luke Marson | Post author

June 4, 2016 at 2:19 pm

AddressType is not an MDF Picklist, so you change it by downloading the picklist le in Admin Center in
Company Settings > Picklist Management

Like(0)

Yamen Zarnaji

May 1, 2017 at 8:42 am

Hi Luke,

thanks for this nice acritical, i have one question

can i add authorization on the pick list level, for example i have pick list include 3 options (A,B,C), each option
will open other elds, but all the elds for the 3 options on the same portlet, the business requirements is to
give separate access for each group of elds according to pick list options, so is this doable somehow ?

Like(0)

https://blogs.sap.com/2013/07/09/rules-and-picklists-in-the-successfactors-metadata-framework/ 12/14
5/23/2021 Rules and Picklists in the SuccessFactors Metadata Framework | SAP Blogs

Luke Marson | Post author

April 7, 2018 at 4:12 pm

This is not possible. You might need to create 3 di erent elds with di erent picklists.

Like(0)

Former Member

September 7, 2017 at 2:10 pm

Hi Luke,

I have a question.. How can a picklist can be created through csv. what is the procedure to follow, i am aware of
the picklist management in MDF but i get stacked up when i try to create a Picklist through csv, Xml. Please
advice.

Thank in advance.

Like(0)

Luke Marson | Post author

April 7, 2018 at 3:19 pm

Hi Lokesh,

Download the CSV template, ll it in, then upload it. Make sure to save it as a CSV le with the right encoding so
you don't lose formatting.

Best regards,

Luke

Like(0)

Margaret Walter

January 29, 2018 at 8:07 pm

Hi Luke,

https://blogs.sap.com/2013/07/09/rules-and-picklists-in-the-successfactors-metadata-framework/ 13/14
5/23/2021 Rules and Picklists in the SuccessFactors Metadata Framework | SAP Blogs

I have two questions.  With a picklist, is it possible to hide the key value?  So what we see is Stop Pay Statement
Print (Stop) where Stop is the picklist key.  The other question I have is can you default a value to a eld such as
setting the e ective date to the system date?

Thanks for all your help!

Like(0)

Luke Marson | Post author

April 7, 2018 at 4:11 pm

Hi Margaret,

On some objects (typically Generic Objects) you can remove the key, but that is not universal across SF.

Yes, you can default eld values using business rules.

Like(0)

Find us on

Privacy Terms of Use

Legal Disclosure Copyright

Trademark Cookie Preferences

Newsletter Support

https://blogs.sap.com/2013/07/09/rules-and-picklists-in-the-successfactors-metadata-framework/ 14/14

You might also like