cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Is it possible to change the unit of ClassAttributeAssignment thought SAP and Datahub?

Former Member
0 Kudos
393

In SAP System the Unit of Measure of the characteristic SPESSOREISOLAMENTO was changed. Original Value = MTR New Value = MMT

If we send the IDOC of the characteristic and the IDOC of the SAP Classification SAP that contains the characteristic the Unit of Measure is not changed in HYBRIS System. The impex is properly send to HYBRIS Server from datahub, but there’s an errore in its own execution: Impex: INSERT_UPDATE ClassAttributeAssignment;;multiValued;attributeType(code);classificationAttribute(systemVersion(catalog(id),version),code)[unique=true];classificationClass(catalogVersion(catalog(id),version),code)[unique=true];range;formatDefinition;unit(code,systemVersion(catalog(id),version),unitType)[unique=true] ;416;false;number;ERP_CLASSIFICATION_001:ERP_IMPORT:SPESSOREISOLAMENTO;ERP_CLASSIFICATION_001:ERP_IMPORT:ACCUMULOINERZIALE;false;"##,###,##0.00000";MMT:ERP_CLASSIFICATION_001:ERP_IMPORT:SAP-LENGTH

error: cannot create ClassAttributeAssignment with values ItemAttributeMap[ registry: null, type: , data: {attributetype=ClassificationAttributeTypeEnum.number(number(8796100493403)), unit=MMT(MMT(8796133655140)), formatdefinition=##,###,##0.00000, range=false, classificationattribute=SPESSOREISOLAMENTO(SPESSOREISOLAMENTO(8796104065631)), multivalued=false, classificationclass=ACCUMULOINERZIALE(8796094267534)} ] due to [de.hybris.platform.servicelayer.interceptor.impl.UniqueAttributesInterceptor@966b6b]:ambiguous unique keys {classificationClass=ClassificationClassModel (8796094267534@138), systemVersion=ClassificationSystemVersionModel (8796125921881@9), classificationAttribute=ClassificationAttributeModel (8796104065631@2)} for model ClassAttributeAssignmentModel () - found 1 item(s) using the same keys, Exception : line 4: cannot create ClassAttributeAssignment with values ItemAttributeMap[ registry: null, type: , data: {attributetype=ClassificationAttributeTypeEnum.number(number(8796100493403)), unit=MMT(MMT(8796133655140)), formatdefinition=##,###,##0.00000, range=false, classificationattribute=SPESSOREISOLAMENTO(SPESSOREISOLAMENTO(8796104065631)), multivalued=false, classificationclass=ACCUMULOINERZIALE(8796094267534)} ] due to [de.hybris.platform.servicelayer.interceptor.impl.UniqueAttributesInterceptor@966b6b]:ambiguous unique keys {classificationClass=ClassificationClassModel (8796094267534@138), systemVersion=ClassificationSystemVersionModel (8796125921881@9), classificationAttribute=ClassificationAttributeModel (8796104065631@2)} for model ClassAttributeAssignmentModel () - found 1 item(s) using the same keys;2315;false;number;ERP_CLASSIFICATION_001:ERP_IMPORT:SPESSOREISOLAMENTO;ERP_CLASSIFICATION_001:ERP_IMPORT:ACCUMULOINERZIALE;false;##,###,##0.00000;MMT:ERP_CLASSIFICATION_001:ERP_IMPORT:SAP-LENGTH

It’s important to underline the following topics: 1. If we change the unit of measure for backoffice, there’s no error; 2. If we change the impex header as the following: INSERT_UPDATE ClassAttributeAssignment;;multiValued;attributeType(code);classificationAttribute(systemVersion(catalog(id),version),code)[unique=true];classificationClass(catalogVersion(catalog(id),version),code)[unique=true];range;formatDefinition;unit(code,systemVersion(catalog(id),version),unitType)

That is deleting the unique attribute form unit filed There’s no more error and the unit of measure is properly updated in Hybris System

Accepted Solutions (0)

Answers (0)