SAP Knowledge Base Article - Public

3233470 - "Document Cannot Be Generated" Error When Generating Document Output or Preview

Symptom

While trying to generate the output of a document (or its preview), system raises one of the below mentioned error messages:

  • Document cannot be generated; ADS rendering of SAP template failed
  • Document cannot be generated; ADS server returned an SOAP error
  • Document cannot be generated; form master template error

Environment

  • SAP Cloud for Customer
  • SAP Business ByDesign

Cause

I. Document cannot be generated; ADS rendering of SAP template failed

For this error message, the most common causes of the issue are:

  1. The template contains an extension field which is defined with the data type that only supports text, however a binary object (for example, an image) was pasted in the field, causing the rendering error.
  2. The document contains an invalid character in one of the text fields.
  3. The form template is using a component of type "checkbox" to display a field of type "indicator". When the XML with the document data is passed to the form, the values are sent as "TRUE" or "FALSE". These values cannot be interpreted by the checkbox component, as it expects an integer value.
  4. The error might be caused due to customizations of the form which make it invalid.

II. Document cannot be generated; ADS server returned an SOAP error

This error message means that the document XML which the application generates for the output is too large and the ADS server is unable to process it. This can happen, for example, with sales orders with too many items (products) assigned or e-mail activities with too many attachments.

III. Document cannot be generated; form master template error

This issue happens when changes to the form master template are made by a user with PDI Developer role, for example, any user which has one or more views from the PDI_PARTNER_DEVELOPMENT - Partner Development work center assigned to their access rights. This causes the change to be saved against a PDI layer in the backend, which in turn causes the form master template to become inconsistent.

Resolution

I. Document cannot be generated; ADS rendering of SAP template failed

  1. Check the document (and if possible, the XML file generated by the document) for any binary objects being passed to the form template, and ensure that it is not bound to a field of type "text."
  2. For these sorts of errors, system also raises an error message along the lines of "InvalidDataException: Xml parsing error: not well-formed (invalid token) (error code XX), line XX, column XX of file"; by opening the document's XML in an XML editor, the line and column numbers can be used in the error message to find the invalid character. The invalid characters will usually occur in free text fields such as Notes, Internal Notes and Internal Comments.

    NOTE: To locate the special character in the XML, open the document's .XML file in the Notepad++ tool, for example. This tool will format the XML file, allowing to easily identify the specific column and line of the special character.

  3. Check the form template for components which are being bound to a field of type "indicator" and ensure that a correct component in the form is being used to properly handle the boolean values sent through the XML.
  4. Check for customizations made in the form template which could be causing the error. There is also an option to revert to a previous consistent version of the template to more easily identify the issues. A common customization which causes ADS rendering issues is the use of rich text tags or other such scripts.

If none of the proposed solutions have solved the issue, please report a case to SAP for further analysis.

II. Document cannot be generated; ADS server returned an SOAP error

The solution is to reduce the size of the generated XML by reducing the data of the document. This will depend on the document: if it is a sales order with too many items, consider dividing it into multiple sales orders with fewer items; if it is an e-mail with multiple attachments, consider deleting unnecessary attachments or (if all attachments are necessary), downloading them, deleting them from the system and re-uploading them with type Internal.

III. Document cannot be generated; form master template error

To avoid this error, please ensure that users with PDI Development role DO NOT edit and save changes to forms, specially the form master template.

Once the issue is already happening, however, it can only be corrected by a manual correction from SAP in the tenant's backend. Hence, please report a case to SAP providing the authorization for support to take necessary action.

Keywords

Output, Preview, Document cannot be generated, ADS, ADS rendering of SAP template failed, ADS server returned an SOAP error, form template, form master template error, InvalidDataException, Xml parsing error, not well-formed, invalid token , KBA , ads rendering failed , AP-RC-OUT , Output Management , AP-RC-FF , Forms Flexibility , How To

Product

SAP Business ByDesign all versions ; SAP Cloud for Customer add-ins all versions ; SAP Cloud for Customer core applications all versions