SAP Knowledge Base Article - Public

2957729 - Error 'Category ID already exists' When Using Upsert Operation in Data Workbench For Individual Business Object Product Categories

Symptom

You are trying to use the operation Upsert in Data Workbench work center, in Import view, for Individual Object Product Categories. However, after the task is finished in Monitor view, you see that one or more records are showing the message "Category ID already exists".

Environment

SAP Cloud for Customer

Reproducing the Issue

  1. Go to the Data Workbench Work Center.
  2. Go to the Import view.
  3. Select Individual Object and Upsert operation.
  4. Select Standard Object Product Categories and click Next.
  5. Select the respective file and click Upload.
  6. Select Ignore on Blank Fields (Click Simulation Mode if it is desired) and click Next.
  7. Click Next two times and click Simulation / Import.
  8. After the task is finished, in Monitor view, notice that one or more records present the error "Category ID already exists".

Cause

The issue could be caused due to missing External Keys being maintained in the respective data file.

Resolution

When the Upsert operation is selected, the Data Workbench tool will check for the existence of the external keys and update the records if they exist, otherwise, it will create the records in the system. When external keys are not maintained in the data file, Data Workbench tool will always try to create the records in the system.

If there are records in the system with the same Category ID for Product Categories, the message will be thrown.

If the External Keys do not exist, the steps below should be followed:

  1. Export Product Categories data which needs to be updated.
  2. Download the data exported file from the Monitor view, in the respective task.
  3. Update the data in the exported file
    NOTE: "Product Category ID" cannot be updated, so this column can be removed from data file or do not change the value in this column.
  4. In the Import view, use Individual Object with the operation Update, and upload the updated file, submitting the task.

Keywords

Category ID Already Exists, Data Workbench, Product Categories, Upsert, Individual Object , KBA , category id already exists , data workbench , product categories , upsert , individual object , LOD-CRM-INT-DWB , Data Workbench , How To

Product

SAP Cloud for Customer add-ins all versions ; SAP Cloud for Customer core applications all versions