SAP Knowledge Base Article - Public

3807090 - Error Occurs When Creating Sales Condition Records with a Custom Field of Type "Code List Based on CDS View" - SAP S/4HANA Cloud Public Edition

Symptom

When creating or uploading sales condition records in the "Manage Prices - Sales" app, the following errors occur:

  • "The value XX of component XXXXX or the key combination is not valid."
  • "The value of component XXXXX or the key combination is not valid."

Environment

SAP S/4HANA Cloud Public Edition

Reproducing the Issue

  1. Open the Manage Prices - Sales app.
  2. Filter to the relevant condition type and condition table.
  3. Create a condition record for the relevant condition type and condition table.
  4. The following errors are displayed:
    • "The value XX of component XXXXX or the key combination is not valid."
    • "The value of component XXXXX or the key combination is not valid."

Cause

  • Starting from the 2608 release, the system performs data validation for custom fields in condition records by checking whether the entered value exists in the defined value help.

    For custom fields of type "Code List Based on CDS View" that expose multiple key fields, the system validates all key components when a value is specified for the custom field in a condition record. If any key value is missing or does not exist in the value help, it is considered invalid and the entry is rejected.

  • In some configurations, only one component of the custom field is included in the condition table, resulting in only one of the required key values being persisted before validation takes place. This incomplete key combination causes the validation to fail and triggers the error. 

Resolution

To resolve the issue, consider one of the following workarounds based on your business requirements:

  1. Use a New Condition Table with All Key Components:
    • Create a new condition table that includes all components of the custom field and apply it for pricing. When creating condition records, ensure that all custom field key values are always maintained as a pair.
  2. Redefine the Custom Field with a Single Key Field:
    • Create a custom CDS view based on the standard CDS view used by the custom field, retaining only the target field as the key field.
    • Then update the custom field configuration to use this custom CDS view and proceed accordingly.



See Also

Keywords

Manage Prices - Sales, Condition Record, Code List Based on CDS View, Custom Field, Validation, Key Fields, Value Help, Condition Table, Pricing Configuration. , KBA , SD-MD-CM-2CL , Conditions and Condition Maintenance (Public Cloud) , Problem

Product

SAP S/4HANA Cloud Public Edition all versions