Symptom
An application error is received when generating a document.
Error: The document cannot be generated as the following placeholders with multiple values in the same row are mapped to different base objects.
Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.
Environment
Employee Central - Document Generation
Reproducing the Issue
- Go to "Generate Document."
- Select the template Employment_Of_Contract_Expats.
- Select the employee name
- Select the "As of date"
- Generate the template.
- An error : The document cannot be generated as the following placeholders with multiple values in the same row are mapped to different base object
Example: An error pops-up similar to below:
Note: here, in above sample error, the fields shown are the ones having issues. These fields might be different based on instance specific configuration.
Cause
The error is self explanatory. In our sample case, the issue was:
- Tokens mapped to addresses are returning multiple values (most probably because the user has multiple addresses maintained). That is why only those tokens are showed in the error dialog.
- This error occurs when multiple placeholders, each mapped to different base objects, are added in the same table row within the template body.
- Additionally, multiple values are maintained for these placeholders for a user.
Resolution
Possible solutions are:
- Move the placeholders outside the table. Once they're outside, the system resolves these placeholders using the first value if multiple values are returned for a user.
- Remove the tokens mapped to Addresses as they seem to be returning multiple values.
- Use a rule mapping for the fields of Addresses so that you fetch a single address instead of all the available ones.
Kindly apply the same logic where a mapping can return multiple values.
FAQ - Additional Information
Q) Where can I get information on this from the Guide?
A) Guide:Implementing Document Generation Chapter: Troubleshooting Tips
See Also
Keywords
Incident , INC11402562,The document cannot be generated as the following placeholders with multiple values in the same row are mapped to different base object, document ,placeholders, document generate, error, multiple placeholders , KBA , LOD-SF-EC-DOC , Document Generation , LOD-SF-EC , Employee Central , Problem