SAP Knowledge Base Article - Public

2440812 - Defaulting Payment Information using Business Rules

Symptom

Business need is to default Payment Information values but this is not achievable using UI rules or via an onInit business rule on the Payment Information Object

Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.

Environment

  • SAP SuccessFactors Employee Central
  • Payment Information

Reproducing the Issue

  1. A UI rule has been created to default Payment Information values such as below:


1.png

  1. This rule is then set to trigger via onInit on the Payment Information UI:

2.png


However the UI rule does not default Payment Information values via Add or Edit as desired. Nor does a business rule that is configured to do similar which is set on onInit on Payment Information Object.

Cause

It is not recommended to default Payment Information values using UI rules on the Payment Information UI or using an onInit business rule on Payment Information Object.

Using UI rules to set field values could cause unexpected behaviors (in some cases, data might not be saved properly and the field appears blank, etc.)

Resolution

In this example the business need is to default -

1. Pay Type = Main Payment Method
2. Payment Method = Bank Transfer
3. Currency = Euro
4. Bank Country = Job Country

To do this the business rule needs to use base Object Payment Information as it allows a rule to be created that will be able check if the fields are null before defaulting the value. This rule is then set to trigger on the jobCountry field that is maintained on the Payment Information Object. This field is chosen due to the fact that you need Job Information to be able to maintain Payment Information in Employee Central.

5.png


Correct Rule Configuration:

3.png

Important Notes:

1. If the rules' THEN conditions contain any reference to Bank Country or Job Country the rule cannot be set as always true
2. Prior to 1811 the rule could contain an elaboration of the IF Statement to "Select Payment Information.Details where Pay Type is equal to Null" - this can no longer be included as it will result in the null check in IF Statement being ignored which will cause data loss during editing existing records or inserting new records. Please compare the above rule image to the below:
3. The rules cannot be always true. It must have an if statement

4.png

The rule now defaults the values when the Pay Type, Payment Method, Currency and Bank Country fields are empty.


Notes:

1. To default Payment Information values during Add New Hire Wizard a seperate rule (example below) is needed and it to be set on 'Initialise Rules' on Payment Information Details Object
2. This rule cannot be "Always True"
3. Bank Country value cannot be set to be equal to Job Country value at this stage as this would lead to undesired behavior when editing existing users Payment Information data.


6.png

Keywords

Payment Information, Employee Central Payment Information, Defaulting Payment Information, UI, Rules, Rule, delete, bank, details, payment, info, portlet, details, delete, ECT-91729, values, paymeninfo, add new hire, jobCountry, worker, externalCode, currency, payment method, pay type, null, clear, bank country, job country , KBA , LOD-SF-EC-PAY , Payment Information (Bank Information) , LOD-SF-EC , Employee Central , LOD-SF-EC-HIR , Hire & Rehire Wizards , LOD-SF-EC-RUL , DO NOT USE - Business Rules & Event Derivation , How To

Product

SAP SuccessFactors Employee Central all versions