SAP Knowledge Base Article - Public

3667216 - Delete statement conflict with reference constraint during knowledge base synchronization

Symptom

  • When performing KB sync, error is thrown: The DELETE statement conflicted with the REFERENCE constraint "fk_pav_id". The conflict occurred in the database "database name", table "demoadmin.v_used_pav_id", column 'pav_id'. The statement has been terminated.
  • Server error occurs when accessing the formula rules tab for designated product version.

Environment

SAP CPQ

Reproducing the Issue

  1. Perform a KB sync for dedicated product
  2. On Knowledge Base Diagnostics, there is the displayed error message: 
    • The DELETE statement conflicted with the REFERENCE constraint "fk_pav_id". The conflict occurred in the database "database name", table "demoadmin.v_used_pav_id", column 'pav_id'. The statement has been terminated.

Cause

Before visibility restrictions were imposed, advanced and simple rules were added to Knowledge Base products. If attribute information related to these rules was modified or deleted, or if duplicate attributes were added, the formula could trigger issues even if the rules are not visible.

Resolution

  1. Change the product type from "variant" to a CPQ-specific type (standard, for example)
  2. Access the rules and messages associated with the product
  3. Delete the problematic rules and messages
  4. Revert the product type back to "variant".

Keywords

Delete statement, Reference Constraint, Visibility Restrictions, Variant Type, KB, CPQ , KBA , CEC-SAL-CPQ , Sales Cloud CPQ , Problem

Product

SAP CPQ all versions