SAP Knowledge Base Article - Public

2599596 - Error Message: “Instance with the same key already exists” While Updating the Product with Customer Part Number

Symptom

Your requirement is to add Customer Part Number to the Product using Webservice ManageMaterialIn

Upon executing the Webservice, you see the error:

Instance with the same key already exists

Environment

SAP Hybris Cloud for Customer

Reproducing the Issue

You may run the Webservice in a third-party tool. Below is a sample of the Request payload.

 

3500343635_KBA.JPG

Upon executing the Webservice, system throws the mentioned error.

Cause

Product XXXXX already has Customer Part Number with the following combination:

 <SalesOrganisationID>PQR</SalesOrganisationID>

<DistributionChannelCode>01</DistributionChannelCode>

<CustomerID>YYYYY</CustomerID>

<ProductCustomerID>XYZ</ProductCustomerID>

 In the above example, XXXXX represents the Product IDPQR represents Sales Organisation ID, YYYYY represents the Customer ID and XYZ represents the Product Customer ID.

The combination of all four parameters above, is considered as unique and therefore, the error Instance with the same key already exists.


*XXXXX represents the Product ID
PQR represents the Sales Organization ID
YYYYY represents the Customer ID
XYZ represents the Product Customer ID

Resolution

You may use one of the options below:

Use a different <ProductCustomerID> to have a unique combination of all four fields mentioned above.

Or

In Product XXXXX, change the Customer Part Number from XYZ to a different value, so that the combination is unique.

Keywords

Customer Part Number, ProductCustomerID, ManageMaterialIn , KBA , customer part number , productcustomerid , managematerialin , LOD-CRM-PRO , Products , Problem

Product

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