Symptom
This KBA explains when and why to use the [code] attribute in the mapping XML between:
- Employee Central (EC) and Onboarding
- Employee Central (EC) and Recruiting (RCM)
When the [code] attribute is not used in the mapping XML, the following issues may occur:
- No value is mapped for a specific field for a candidate in Manage Pending Hires (MPH)
- An incorrect value is mapped for a specific field for a candidate in MPH
- Slow performance when loading candidate sections (such as Personal Information or Job Information) during the hiring process
Environment
SAP Successfactors Employee Central
Cause
The [code] attribute can be manually added to the refid of fields in the mapping XML to control how values are resolved during the mapping process.
Example: Company field in Job Information
- Default mapping (without [code]):
- <target country-code="" variant="" refid="jobInfo.company"/>
- Mapping using [code]:
- <target country-code="" variant="" refid="jobInfo.[code].company"/>
The difference determines whether the system resolves values using labels/names and IDs, or IDs only.
Resolution
Benefits and Limitations of Using vs. Not Using the [code] Attribute
- Not Using [code] Attribute - Example: refid="jobInfo.company"
- Benefits
- Can be configured directly via the UI (applies only to the Onboarding Field Mapping Tool).
- Allows sending the full label and code together.
- Example: SAP(001)
- SAP = label/name
- 001 = code/ID
- Limitations
- If multiple values have similar labels, the system may populate the wrong value.
- Example: Monthly vs. Bi-Monthly
- The mapped field may remain blank if an exact match cannot be found.
- The system searches both labels and codes, which can impact performance in environments with large datasets.
- If multiple values have similar labels, the system may populate the wrong value.
- Benefits
- Using [code] Attribute - Example: refid="jobInfo.[code].company"
- Benefits
- Forces the system to resolve values only by ID/code, ignoring labels.
- IDs are unique, eliminating the risk of incorrect value mapping.
- Reduces the likelihood of blank values due to unmatched labels.
- Improved performance, as the lookup is limited to codes/IDs only.
- Limitations
- Changes must be made directly in the mapping XML; this cannot be configured via the UI
- (applies only to the Onboarding Field Mapping Tool).
- The source system must send only the ID/code.
- Example: For SAP(001), only 001 should be sent—not the full label.
- Changes must be made directly in the mapping XML; this cannot be configured via the UI
- Benefits
Using the [code] attribute in the mapping XML is recommended for better accuracy and performance, especially in environments with large datasets or similar label values. However, it requires manual XML maintenance and strict control over the values being sent.
See Also
Keywords
onboarding, EC, RCM code, id, blank, wrong value, mapping, xml, code attribute explained, code map,map code, map code explanation, rcm mapping, onboarding mapping, incorrect values from rcm, incorrect value from onboarding, event reason, employee central, recruiting, onboarding, manage pending hires, successfactors , KBA , LOD-SF-EC-INT , Manage Pending Hires (Integration RCM/ ONB/ OBX + UI) , LOD-SF-RCM , Recruiting Management , LOD-SF-OBD , Onboarding , How To
SAP Knowledge Base Article - Public