Symptom
- You have a requirement to set some fields (amount, currency, frequency) in Compensation (payComponentRecurring) to read-only with respect to Pay Component code.
- You are using a business rule as onView using "Compensation Model" but this is not working if you have an IF condition.
- Once the rule is set to Always True, the fields are are set to read-only as expected.
Note: 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 - Compensation
- SAP SuccessFactors Employee Central - Business Rules
Reproducing the Issue
Scenario A: With IF Condition
Configure a rule with the following condition. Make sure that an IF statement is defined.
Assign this rule as onView in payComponentRecurring so that it is triggered whenever you edit Compensation.
Upon editing Compensation Information, this is the behavior shown. The fields are still set to Editable.
Scenario B: Without IF Condition (Always True)
Modify the initial rule and remove the IF Condition.
Result: The fields are set to view only based on the rule configuration.
Cause
The Compensation (payComponentRecurring) HRIS element is a data grid portlet. As of the current system design, it is not possible to control the visibility properties of the fields for data grid portlets with respect to the key identifier of a particular row. In this case, there is no way to set the "Amount", "Currency", and "Frequency" to read-only or editable say for example if Pay Component code = ABC or Pay Component Code = XYZ.
The same behavior is applicable for other grid portlets like Email info, Phone info, Job Relationships, etc. The rules may initially work for some types for other portlets upon page load, but currently since this usecase still is not supported, it might not work as desired say upon change of the key (e.g. email type) or addition of a new row.
Resolution
You may create an Enhancement Request in our Influence/Idea page. Please see KBA 2090228 for more details on how to do this.
Keywords
visibility, read-only, rule, pay component, set amount currency frequency, view only, payComponentRecurring, data grid portlet, onView rule, onInit , KBA , LOD-SF-EC-RUL , DO NOT USE - Business Rules & Event Derivation , How To