SAP Knowledge Base Article - Public

3583245 - Incorrect Data Displayed Using CTX Tag in SAP CPQ

Symptom

  • When using the CTX tag <*CTX( Quote.CurrentItem.CustomField(<custom_field_name>) )*> in SAP CPQ, incorrect data is displayed.
  • The issue arises when a new item is being configured but not yet created. The system displays the value from the first item in the Formula Builder or script result.

Environment

SAP Sales Cloud CPQ

Reproducing the Issue

  1. Open a quote containing 2 items and edit the second item.
  2. Open Formula Builder and execute script with tag <*CTX( Quote.CurrentItem.CustomField(<custom_field_name>) )*>. The system shows a value, which is correct.
  3. Return to quote.
  4. Open Configurator with Add Item button.
  5. Open Formula Builder and execute script with tag <*CTX( Quote.CurrentItem.CustomField(<custom_field_name>) )*>. The system shows a different value, which is incorrect as it is data from the first product item.

Cause

The issue arises due to the incorrect usage of the CTX tag. The context of the configurator differs from that of the quote, even if the configurator is accessed through the quote.
Within the configurator context, the CTX tag <*CTX(Quote.CurrentItem)*> is not applicable.

Resolution

  1. Understand that the context of the configurator differs from that of the quote.
  2. Realize that within the configurator context, the CTX tag <*CTX(Quote.CurrentItem)*> is not applicable.
  3. For retrieving product information in the configurator, use the <*CTX( Product )*> tag instead.

See Also

Keywords

SAP CPQ, CTX Tag, Incorrect Data, Configurator, Quote, Product Information, Item_External_Id, Formula Builder, Script Result. , KBA , CEC-SAL-CPQ , Sales Cloud CPQ , Problem

Product

SAP CPQ all versions