SAP Knowledge Base Article - Public

3742902 - Translated formula values are not evaluated correctly in document generation output when using <<C_DESC>> tag

Symptom

When generating documents in SAP CPQ using a language dictionary that contains formula-based translations, the generated PDF output displays the formula itself instead of the evaluated value.

Environment

SAP CPQ

Reproducing the Issue

  1. Navigate to a Quote.
  2. Select "Generate Documents".
  3. Generate a document using a language dictionary with standard translations and verify that the description is displayed correctly.
  4. Select a language dictionary that contains formula-based translations.
  5. Generate the document preview.
  6. Observe that the description field displays the formula text instead of the evaluated output.

Cause

  • The issue occurs due to the use of the <<C_DESC>> tag in combination with translations defined as formulas.
  • During the document generation process, values for quote item properties are retrieved based on the selected language.
  • However, when translations are implemented as formulas, the <<C_DESC>> tag does not trigger formula evaluation.
  • As a result, the formula expression itself is displayed instead of the evaluated value.

Resolution

Replace the predefined description tag with a CTX-based tag that evaluates formulas in the appropriate context.

For product-level description formulas, use:

<<C_PATTR(<CTX(Quote.CurrentItem.Description)>)>>

In this approach:

  • CTX retrieves the appropriate value based on the current context.

  • C_PATTR ensures that the formula is evaluated at the product level.

If the formula depends on quote-level context or requires broader quote evaluation logic, use C_TAG instead of C_PATTR.

As a general recommendation, it is preferable to use CTX-based tags together with C_TAG or C_PATTR instead of relying on predefined tags such as <<C_DESC>> when working with formula-based translations.

See Also

Refer to: Template tags for document generation

Keywords

document generation, template, non-default language, translations, description, formula not evaluated, c_desc, c_pattr, c_tag, ctx, quote item, pdf, dictionary, tag evaluation, cpq , KBA , CEC-SAL-CPQ , Sales Cloud CPQ , Problem

Product

SAP CPQ all versions