Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
NathanWilkinson
Product and Topic Expert
Product and Topic Expert
731

The requirement from the customer was to ensure that every person completing their onboarding process was to complete one document in the ‘Work Permit’ portlet.  This is relatively straight forward as you could us the cardinality functions to ensure they have at least one document.

An example of this rule would look like this.

Picture1.png

The cardinality function is adding up how many values are in the ‘work permit’ portlet and raising a message if one is not entered.  You can then add in other statements to the ‘If’ statement for a particular legal entity.  Or if you only wanted this to trigger in onboarding, you could add in the following statement.

Picture2.png

This solution can work on any portlet.

However, if you want to build logic based on specific values then you could do this by adding a ‘Variable’ to the rule.  The variable allows you to specify a ‘where’ statement.

In our rule we have created a variable var_passport and var_residence, these allows us to refer to them in the ‘if’ condition.

Picture3.png

So, in our first ‘if’ condition we have if the variable ‘var_passport’ is equal to null, i.e. is the value GBR-Passport is not added, and if variable var_residence (UK Resident card) is added, we can raise a message asking the using to add in a passport.

You can create any number of variables in the rule to use in the ‘if’ statements, in the example below we are saying if you employed in UK then you will need to add in a Passport.

 

Picture4.png

During hiring you may have oninit rules pre-populating fields in national id portlet.  During internal hire these rules will trigger again and overwrite the data.  The rule below will use the cardinality function to prevent this.

image (5).png

 

Finally, another example of this the rule below were we add in a Variable for personal email address, and trigger an error message if a personal email address is not provided for certain users as defined on a generic object.

Picture5.png

In summary the use of variables and cardinality give you flexibility to ensure hires in onboarding and employee central submit the correct information

2 Comments