2084847 - Statements - Advanced Configuration Using .xsl - Compensation

SAP Knowledge Base Article - Public

2084847 - Statements - Advanced Configuration Using .xsl - Compensation

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 Customer Support. Statements are written in .xsl language. The following information explains some of that for admins that are familiar with this language.
     
     
  • Can I edit my own statements?

Environment

  • Compensation

Resolution

    Customer Support does NOT support any statements that you have personally edited!

  • As a self-service option you must download the free statements from SuccessStore and start from scratch whenever your edits create errors or issues with a statement.
     
  • Always keep backups of last working versions before you make changes to valid statements so that you can quickly and easily revert to your last known working version.
     
  • Customer Support will NOT assist you in trying to troubleshoot your edited statement that now fails to work. What we do provide are the free downloads from SuccessStore of valid statements you can use.
     
  • We do offer paid for service to build customized 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 and realize that you will need to correct those errors, then you may find the following information very helpful in understanding the .xsl language that statements are written in.
     
  • Many clients successfully maintain their own statements and have no issue in making small year over year updates to their statements to meet their needs.

 

Personal Compensation Statement Supported Fields
Data that is stored in the document

  • Check your Compensation Template to verify that the fields chosen from below are included in the Compensation Plan.
     
  • This list can change if the Compensation Template changes.
     
  • Cannot access any calculated fields since they are not stored in the document.  In general, these fields can be calculated in the statement itself.  Please refer to the totalLumpSum and totalRaise field 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

 

  • Supports the standard compensation user info fields. Their IDs are listed in the following table.
     
  • Supports any fields from the user import file, even if it is not defined as a fieldId in the template.
     
  • The XSL syntax to access the fields is “$<fieldId>”.  For example “$SALARY”.
     
  • You do not need to add compensation field definitions in the compensation template in order to access user data info fields.
     
  • The following fields can be accessed as parameters in the XSL by default:  managerFirstName, managerLastName, companyName, moneyFormat, and 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

 
 

 

Basic XSL Quick Tips

  • 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”/>
     
  • To Concatenate two fields
     
    Example:  concat($firstName,' ',./$lastName)"/>
     
     
  • Test (If Statement) Examples: 

        <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 (-), Multiplication (*), and Division (div)

        For Example:  <xsl:variable name="meritPer" select="(100 * $merit) div $curSalary"/>
 

  • Field Formatting Examples: 

       <xsl:value-of select="format-number($curSalary, $moneyFormat)"/> (moneyFormat is a parameter in the default template)

       <xsl:value-of select="format-number($meritPer, '#,###')"/>% (Put the “%” sign outside of the XSL code)

          “#” displays the number if it exists.  “0” always displays the number (0 if it doesn’t exist). 

          “NaN” will be displayed if the value being formatted is not a number.

          Check if the value is “NaN” before formatting it to prevent “NaN” from being displayed on the page. 
 

          For exmple:  <xsl:if test=" ((string(number($EXAMPLE_FIELD)) != 'NaN')">, then display the formatted value.
 

  • HTML/XSL Syntax Differences
     
    Certain HTML syntax cannot be used in an XSL file. 

Keywords

KBA , sf compensation statements , LOD-SF-CMP , Compensation Management , How To

Product

SAP SuccessFactors HCM Core all versions