SAP Knowledge Base Article - Public

2084847 - Advanced Configuration of Compensation Statements Using .xsl Files

Symptom

  • Typically you should use the compensation online editor to make minor changes to your compensation statements.
  • More complex changes can be made for a fee via SuccessFactors Product Support, or your Implementation Partner.
  • Statements are written in .xsl language and the following information explains some of this for admins who are familiar with this language.

Environment

  • SAP SuccessFactors HXM Suite
  • SAP SuccessFactors Compensation

Resolution

  • As a self-service option you must download the free statements available from the SuccessStore and start your configuration from scratch.
  • Always keep backups of last working versions before making any changes to valid statements.
  • This is to ensure you can quickly and easily revert to your last known working version.

Note: SuccessFactors Product Support does NOT support any statements you have personally edited and will NOT assist you in trying to troubleshoot your edited/failing statement.

  • What is provided are free downloads from SuccessStore of valid statements you can use. 
  • We do offer paid for service to build customised statements, so whenever you need adjustments to your statements you may submit a request for our expert engineers to make these modifications for you at cost. 
  • If you would like to configure your own statements, and accept full responsiblity for any errors introduced or corrections, then you may find the following information helpful in understanding the .xsl language. 
  • Many clients successfully maintain their own statements and have no issue in making small year over year updates to meet their needs.

Personal Compensation Statement Supported Fields (Data stored in the document)

  • Check your Compensation Template to verify the fields chosen from below list are included within design worksheet.
  • This list can change is the Compensation template is changed/modified.
  • Cannot access any calculated columns since they are not stored in the document.
  • In general, these columns can be calculayted in the statement itself. Please refer ti the totalLumpSum and totalRaise column references below:

Field ID

XSL Field Reference

userId

./comp-plan-entry/comp-plan-entry-userid

userName          

./comp-plan-entry/comp-plan-entry-username

firstName

./comp-plan-entry/comp-plan-entry-firstname

lastName

./comp-plan-entry/comp-plan-entry-last

jobTitle           

./comp-plan-entry/comp-salary/comp-salary-jobTitle

jobLevel          

./comp-plan-entry/comp-salary/comp-salary-jobLevel

jobFamily

./comp-plan-entry/comp-salary/comp-salary-jobFamily

finalJobFamily

./comp-plan-entry/comp-salary/comp-salary-finalJobFamily

jobRole

./comp-plan-entry/comp-salary/comp-salary-jobRole

finalJobRole

./comp-plan-entry/comp-salary/comp-salary-finalJobRole

jobCode

./comp-plan-entry/comp-salary/comp-salary-jobCode

finalJobCode

./comp-plan-entry/comp-salary/comp-salary-finalJobCode

payGrade          

./comp-plan-entry/comp-salary/comp-salary-payGrade

finPayGrade

./comp-plan-entry/comp-salary/comp-salary-finalPayGrade

startDate         

./comp-plan-entry/comp-salary/comp-salary-startDate

prorating         

./comp-plan-entry/comp-salary/comp-salary-prorating

localCurrencyCode 

./comp-plan-entry/comp-salary/comp-salary-localCurrencyCode

curSalary         

./comp-plan-entry/comp-salary/comp-salary-curSalary

curSalaryLocal    

./comp-plan-entry/comp-salary/comp-salary-curSalaryLocal

promotion         

./comp-plan-entry/comp-salary/comp-salary-promo

promoDate         

./comp-plan-entry/comp-salary/comp-salary-promo/@effectiveDate

merit             

./comp-plan-entry/comp-salary/comp-salary-merit

meritDate          

./comp-plan-entry/comp-salary/comp-salary-merit/@effectiveDate

extra             

./comp-plan-entry/comp-salary/comp-salary-extra

extraDate         

./comp-plan-entry/comp-salary/comp-salary-extra/@effectiveDate

extra2            

./comp-plan-entry/comp-salary/comp-salary-extra2

extra2Date        

./comp-plan-entry/comp-salary/comp-salary-extra2/@effectiveDate

raiseProrating    

./comp-plan-entry/comp-salary/comp-salary-raise-prorating

finSalary         

./comp-plan-entry/comp-salary/comp-salary-finalSalary

finSalaryLocal    

./comp-plan-entry/comp-salary/comp-salary-finalSalaryLocal

compaRatio        

./comp-plan-entry/comp-salary/comp-salary-compa-ratio

rangePenetration  

./comp-plan-entry/comp-salary/comp-salary-range-penetration

lumpSumTarget     

./comp-plan-entry/comp-salary/comp-salary-lumpSumTarget

lumpSum           

./comp-plan-entry/comp-salary/comp-salary-lumpSum

lumpsumDate       

./comp-plan-entry/comp-salary/comp-salary-lumpSum/@effectiveDate

lumpSum2Target    

./comp-plan-entry/comp-salary/comp-salary-lumpSum2Target

lumpSum2          

./comp-plan-entry/comp-salary/comp-salary-lumpSum2

lumpsum2Date      

./comp-plan-entry/comp-salary/comp-salary-lumpSum2/@effectiveDate

totalComp         

./comp-plan-entry/comp-salary/comp-salary-totalComp

totalCompLocal    

./comp-plan-entry/comp-salary/comp-salary-totalCompLocal

salaryRateType

./comp-plan-entry/comp-salary/comp-salary-rate-type

salaryRateUnits

./comp-plan-entry/comp-salary/comp-salary-rate-units

salaryRateLocal

./comp-plan-entry/comp-salary/comp-salary-rate-local

salaryRatePlan

./comp-plan-entry/comp-salary/comp-salary-rate-plan

salaryIneligible

./comp-plan-entry/comp-salary/comp-salary-ineligible

salaryProratingStartDate

./comp-plan-entry/comp-salary/comp-salary-prorating-startDate

salaryProratingEndDate

./comp-plan-entry/comp-salary/comp-salary-prorating-endDate

raiseProratingStartDate

./comp-plan-entry/comp-salary/comp-salary-raise-prorating-startDate

raiseProratingEndDate

./comp-plan-entry/comp-salary/comp-salary-raise-prorating-endDate

totalLumpSum      

($lumpSum + $lumpSum2)

totalRaise        

(($promo+$merit+$extra+$extra2) * $raiseProrating div 100)

pmRating          

./comp-plan-entry/comp-rating-source-info[@useFor='salary']/comp-rating-detail/@form-rating

compRating        

./comp-plan-entry/comp-rating-source-info[@useFor='salary']/comp-rating-detail/@comp-rating

bonusTarget       

./comp-plan-entry/comp-bonus/comp-bonus-target

bonusPay4ObsTotal        

./comp-plan-entry/comp-bonus/comp-bonus-pay4ObjsTotal

bonusExtra

./comp-plan-entry/comp-bonus/comp-bonus-extra

bonusMultiplicativeAdjustment

./comp-plan-entry/comp-bonus/comp-bonus-extra-percent

bonusTotal             

./comp-plan-entry/comp-bonus/comp-bonus-total

bonusIneligible

./comp-plan-entry/comp-bonus/comp-bonus-ineligible

pay4ObjId

./comp-plan-entry/comp-bonus/comp-pay4Obj/comp-pay4Obj-id

pay4ObjType

./comp-plan-entry/comp-bonus/comp-pay4Obj/comp-pay4Obj-objType

pay4ObjIndex

./comp-plan-entry/comp-bonus/comp-pay4Obj/comp-pay4Obj-index

pay4ObjRating

./comp-plan-entry/comp-bonus/comp-pay4Obj/comp-pay4Obj-rating

pay4ObjWeight

./comp-plan-entry/comp-bonus/comp-pay4Obj/comp-pay4Obj-weight

pay4ObjMaxPay

./comp-plan-entry/comp-bonus/comp-pay4Obj/comp-pay4Obj-maxPay

pay4ObjActPay

./comp-plan-entry/comp-bonus/comp-pay4Obj/comp-pay4Obj-actPay

stockUnits        

./comp-plan-entry/comp-stock/comp-stock-units

options          

./comp-plan-entry/comp-stock/comp-stock-option

stock             

./comp-plan-entry/comp-stock/comp-stock-stock

stockOther1       

./comp-plan-entry/comp-stock/comp-stock-other1

stockOther2       

./comp-plan-entry/comp-stock/comp-stock-other2

stockOther3       

./comp-plan-entry/comp-stock/comp-stock-other3

stockGrantDate    

./comp-plan-entry/comp-stock/comp-stock-grantDate

stockIneligible

./comp-plan-entry/comp-stock/comp-stock-ineligible

stockPmRating     

./comp-plan-entry/comp-rating-source-info[@useFor='stock']/comp-rating-detail/@form-rating

stockCompRating   

./comp-plan-entry/comp-rating-source-info[@useFor='stock']/comp-rating-detail/@comp-rating

totalCompensation

./comp-plan-entry/comp-plan-entry-totalComp

planId

./comp-plan-id

planName

./comp-plan-name

planGroupId

./comp-plan-group-id

planPlanner

./comp-plan-planner

planBudget4Salary

./comp-plan-budget4Salary

planBudget4Bonus

./comp-plan-budget4Bonus

planBudget4Stock

./comp-plan-budget4Stock

planBudget4Option

./comp-plan-budget4Option

planAllocated4Salary

./comp-plan-allocated4Salary

planAllocated4Bonus

./comp-plan-allocated4Bonus

planAllocated4StockUnits

./comp-plan-allocated4StockUnits

planAllocated4Stock

./comp-plan-allocated4Stock

planAllocated4Option

./comp-plan-allocated4Option

planAllocated4StockOther1

./comp-plan-allocated4StockOther1

planAllocated4StockOther2

./comp-plan-allocated4StockOther2

planAllocated4StockOther3

./comp-plan-allocated4StockOther3

Any custom <comp-field-definition> defined in a Compensation Template

./comp-plan-entry/comp-custom-data/comp-custom-field[@id='<fieldId>']"/>

Compensation User Info Data Fields

  • Statements supports standard Compensation user information fields/columns. Their ID's are listed in the below table.
  • Any fields from the UDF even if they are not defined within column designer.
  • The XSL syntax to access fields is "$<fieldId>". The following example is a syntax used to get salary: "$<SALARY">
  • You do not need to add Compensation field definitions within the template in order to access the user data.
  • The following fields can be accessed as parameters in the XSL by default

managerFirstName, managerLastName, companyName, moneyFormat, percentFormat

Compensation User Info Data Fields

Data Mapping Element ID

SALARY

SALARY

SALARY_LOCAL

SALARY_LOCAL

LOCAL_CURRENCY_CODE

LOCAL_CURRENCY_CODE

JOBTITLE

JOBTITLE

JOBLEVEL

JOBLEVEL

PAYGRADE

PAYGRADE

DATE_OF_CURRENT_POSITION

DATE_OF_CURRENT_POSITION

BONUSTARGET

BONUSTARGET

SALARY_PRORATING

SALARY_PRORATING

RAISE_PRORATING

RAISE_PRORATING

PROMOTION_AMOUNT

PROMOTION_AMOUNT

LUMPSUM_TARGET

LUMPSUM_TARGET

LUMPSUM2_TARGET

LUMPSUM2_TARGET

COMPENSATION_READONLY

COMPENSATION_READONLY

MERIT_TARGET

MERIT_TARGET

MERIT_EFFECTIVE_DATE

MERIT_EFFECTIVE_DATE

COMPENSATION_SAL_RATE_TYPE

COMPENSATION_SAL_RATE_TYPE

COMPENSATION_SAL_RATE_UNITS

COMPENSATION_SAL_RATE_UNITS

SALARY_BUDGET_TOTAL_RAISE_PERCENTAGE

SALARY_BUDGET_TOTAL_RAISE_PERCENTAGE

SALARY_BUDGET_MERIT_PERCENTAGE

SALARY_BUDGET_MERIT_PERCENTAGE

SALARY_BUDGET_PROMOTION_PERCENTAGE

SALARY_BUDGET_PROMOTION_PERCENTAGE

SALARY_BUDGET_EXTRA_PERCENTAGE

SALARY_BUDGET_EXTRA_PERCENTAGE

SALARY_BUDGET_EXTRA2_PERCENTAGE

SALARY_BUDGET_EXTRA2_PERCENTAGE

SALARY_BUDGET_LUMPSUM_PERCENTAGE

SALARY_BUDGET_LUMPSUM_PERCENTAGE

SALARY_BUDGET_LUMPSUM2_PERCENTAGE

SALARY_BUDGET_LUMPSUM2_PERCENTAGE

SALARY_BUDGET_FINAL_SALARY_PERCENTAGE

SALARY_BUDGET_FINAL_SALARY_PERCENTAGE

SALARY_BUDGET_TOTAL_COMP_PERCENTAGE

SALARY_BUDGET_TOTAL_COMP_PERCENTAGE

COMPENSATION_ELIGIBLE

COMPENSATION_ELIGIBLE

COMPENSATION_SALARY_ELIGIBLE

COMPENSATION_SALARY_ELIGIBLE

COMPENSATION_BONUS_ELIGIBLE

COMPENSATION_BONUS_ELIGIBLE

COMPENSATION_STOCK_ELIGIBLE

COMPENSATION_STOCK_ELIGIBLE

BONUS_BUDGET_AMOUNT

BONUS_BUDGET_AMOUNT

STOCK_BUDGET_STOCK_AMOUNT

STOCK_BUDGET_STOCK_AMOUNT

STOCK_BUDGET_UNIT_AMOUNT

STOCK_BUDGET_UNIT_AMOUNT

STOCK_BUDGET_OPTION_AMOUNT

STOCK_BUDGET_OPTION_AMOUNT

STOCK_BUDGET_OTHER1_AMOUNT

STOCK_BUDGET_OTHER1_AMOUNT

STOCK_BUDGET_OTHER2_AMOUNT

STOCK_BUDGET_OTHER2_AMOUNT

STOCK_BUDGET_OTHER3_AMOUNT

STOCK_BUDGET_OTHER3_AMOUNT

Any custom <comp-field-definition> defined in a Compensation Template

importKey in <comp-field-definition>

Any field in the User Import file

User Import Field Id

The following are some basic XSL tips when editing custom statements:

  • Import parameter declaration
    • Example: 
      • <xsl:param name="statementTitle"/>
  • Variable declaration
    • Example:
      • <xsl:variable name="curSalary" select="./comp-plan-entry/comp-salary/comp-salary-curSalary"/>
  • To display a field
    • Example: 
      • <xsl:value-of select="$curSalary"/>
  • Concatenate two fields
    • Example:
      • concat($firstName,' ',./$lastName)"/>
  • Test If statements
    • Example:

<xsl:if test="./comp-plan-entry/comp-salary/comp-salary-ineligible != 'true'"></xsl:if>
<xsl:if test="$raise &gt; 0></xsl:if>
<xsl:choose
<xsl:when test="$raise &gt; 0">NO</xsl:when>
<xsl:otherwise>YES</xsl:otherwise>
</xsl:choose>

  • Math functions

Addition(+), Subtraction(-), Multiplier(*), Division(div)
Example using Merit of 1000 and Salary of 32000:
<xsl:variable name="meritPer" select="(100*$merit) div $curSalary"/>
Total will show 3.125

  • Field formatting
    • Example:

<xsl:value-of select="format-number($curSalary, $moneyFormat)"/>
moneyFormat is a parameter which is within the template xml.
<xsl:value-of select="format-number($meritPer, '#,##')"/>%
Putting the % sign outside of the xsl code to show percentage.

"#" will display the number is a value exists. For example, "0" will always display if there is no values.
"Nan" will display of the values being formatted are not a number. For example, the value in the form is Division it will show Nan
Example: <xsl:if test="((string(number($EXAMPLE_FIELD)) ! ='NaN')"> This will then display the formatted value

Note: HTML and XSL syntax can be different and in some cases, certain HTML syntax cannot be used within a XSL file.

Additional Information

  • When using standard statements, you can add additional styles which are embedded in the xsl file.
  • These would not be within the standard statement downloaded from the store.
  • In some cases, standard statements have been formatted within word, copied and pasted into the standard statement editor.
  • While copying from word you are also copying any additional HTML styles.
  • With this being done, the entire content along with custom styles are being added to the statement template.

Is this a supported configuration?

  • We ask customers NOT to import any external HTML styles into statements via the editor.
  • We would ask when using word to edit any statement to copy/paste this into notepad before placing into the UI statement editor.

Keywords

xsl, syntax, CMP-20576 , KBA , sf compensation statements , LOD-SF-CMP-PS , Personal Statements , LOD-SF-VRP-PS , Personal Statements , How To

Product

SAP SuccessFactors Compensation all versions ; SAP SuccessFactors HCM Suite all versions