• Home
  • Blog
  • How to add a document to a generated document based on parameters in SAPⓇ CPQ


How to add a document to a generated document based on parameters in SAPⓇ CPQ


Author: Paul Trozan

Having the right documents included in the quote phase of configure, price, quote (CPQ) is essential to the success of your solution. Dynamically adding documents that are related to a specific product will ensure the customer receives all the relevant info about what they ordered in their quote.

This how-to will explain the process of adding documents (such as a product datasheet) to a dynamically generated document using SAP CPQ.

Ask a Consultant

  1. Upload the datasheets in Quotes -> Manage Content Documents
  2. Next, take the information from “Manage Content Documents” and put it into a custom table.


  3. Create a document template.
  4. The template should only have  <<INCLUDE_DOCUMENTS>> <<INCLUDE_DOCUMENTS_END>> tags in it
  5. In the Additional Files section, add a TABLE tag to pull the data from the custom table. The table tag below will grab the data sheet based on the part number in the cart. This criteria can be changed to whatever you want! Example:

    <* TABLE (SELECT Datasheet FROM CanidiumDatasheets WHERE PartNumber = '<*CTX( Quote.CurrentItem.PartNumber )*>' ) *>

  6. To make this work for all quote items, you will want to check the checkbox “Include file(s) for each quote item”, otherwise it will only generate for the first quote item. Example: 

We hope this step-by-step provided the necessary information to help you add documents to a generated doc in SAP CPQ. Do you still have questions about this process or about your SAP CPQ solution? Just request a free consultation to get the information you need.

Happy plan building!

Ask a Consultant

Want to receive more thought leadership? Opt-In to our newsletter below! 

Receive future pieces


See all