SAP Knowledge Base Article - Public

2387814 - Document Generation - How to map Pay Component data to a Document Template

Symptom

Resolution

There are two ways to do this - either using a Business Rule, or by using Direct Mappings. Below we cover both methods.

Include Specific Pay Component Amount in Document

If you want to include a specific Pay Component Amount in a Document, you need to use a Business Rule. Please configure the rule as follows -:

1) Base Object = Document Mapping Rule Result

2) Add a Parameter as follows (note that the object is referring to hris-element "payComponentRecurring" and NOT "compInfo")-:

Name Code Object
Compensation Compensation Compensation

3) You need to define an IF condition - it cannot be set to "Always True". Therefore in the below example where we have one "Base Salary" pay component per country, we had to add multile "Else IF" conditions to ensure the Salary is populated correctly -:

Example_Rule_payComponent.jpg

The import things to note are -:

  • In the "THEN" condition, the field "Salary" on the MDF Object "Document Mapping Rule Result" is infact "genericNumber1" field. The amount will be displayed in the document as a whole number. If you want the decimal value to be displayed, you have to add a custom field with Data Type of "Decimal" from the said MDF Object. You could also add other custom field to this object if required - but make sure the field type is the same as the source
  • In the THEN condition, we have to drill down through Compensation > Employment Details > Compensation to get the extra option to "Select Compensation.Employment Details.Compensation where..." so we can tell the rule WHICH row to pull "Amount" from. Here we use the same Pay Component that is used in the IF part of the rule.
  • Because we want this rule to work no matter which of the Base Salary pay components applies, we use multiple "Else IF" statements to ensure all possibilities are considered.

 

 

Include ALL Pay Component Amounts in Document

If you want to include ALL of the Pay Components/Amounts that are defined for an employee, then it is simpler to not use a rule, and instead use a table and the Direct Mappings. For example -:

1) In your Document Template, you must create a Table. This is explained also in the Document Generation Implementation Handbook. Navigate to your Document Template, and click the "Table" icon -:

Add_a_table.jpg

2) Make sure the table has 2 rows and 4 columns. Then add the columns Label in the 1st row, and then a "Placeholder" in the 2nd row -:

add_columnlabel_and_placeholder.jpg

3) Save the template and go to the mapping for the template. For each of your placeholders, make a Direct Mapping to the "Compensation" fields as follows -:

PayCompMappings.jpg

The result is -:

PDF_Output.jpg

Keywords

Document Generation, Recurring Pay Component, Salary Information, payComponentRecurring, Document Mapping Rule Result, Business Rule , KBA , LOD-SF-EC , Employee Central , LOD-SF-EC-DOC , Document Generation , How To

Product

SAP SuccessFactors HCM Core all versions