cancel
Showing results for 
Search instead for 
Did you mean: 

SAP CPQ - Cannot retrieve configuration based on variant

nicolabeghin-2
Employee
Employee
0 Kudos

Hi everyone we're facing a strange issue with SAP variants. We got hundreds of configurators working on Hybris, but right now we can't load a simple variant loaded through DataHub/idoc/BD10 - meaning, we can't populate the related configurator from a given variant because the whole thing throws exception.

 GRAVE: Servlet.service() for servlet [DispatcherServlet] in context with path [/store] threw exception [Request processing failed; nested exception is java.lang.IllegalStateException: Cannot retrieve configuration based on variant [F011851]] with root cause
 java.lang.IllegalStateException: Cannot find external configuration for variant [F011851]
         at de.hybris.platform.sap.productconfig.runtime.ssc.impl.CommonConfigurationProviderSSCImpl.retrieveExternalConfigurationFromVariant(CommonConfigurationProviderSSCImpl.java:575)
         at de.hybris.platform.sap.productconfig.runtime.ssc.impl.CommonConfigurationProviderSSCImpl.retrieveConfigurationFromVariant(CommonConfigurationProviderSSCImpl.java:497)
         at de.hybris.platform.sap.productconfig.services.impl.ProductConfigurationServiceImpl.createConfigurationForVariant(ProductConfigurationServiceImpl.java:496)
         at de.hybris.platform.sap.productconfig.facades.impl.ConfigurationFacadeImpl.getConfiguration(ConfigurationFacadeImpl.java:120)
         at com.ccelera.cpqselectoraddon.facades.CPQSelectorConfigurationFacadeImpl.getConfiguration(CPQSelectorConfigurationFacadeImpl.java:40)
         at com.client.sapproductconfigaddon.controllers.AbstractProductConfigController.loadNewConfiguration(AbstractProductConfigController.java:274)

example link:

variant link https://hybris.local:9002/store/clientstore/en/somecategory/p/F011851/configuratorPage/CPQCONFIGURAT...

configurator link https://hybris.local:9002/store/clientstore/en/somecategory/p/CONF-TC1M-SINGOLO/configuratorPage/CPQ...

where F011851 is the variant of configurable material CONF-TC1M-SINGOLO

Debugging the source code of CPQ, we saw that the CPQ lib is expecting to find a reference to the variant in the CPQ table COMM_PR_FRG_REL:

Does this mean we need to extend our CPQ MATERIALS.TXT filter with all the variants? Like below

 range=MARA,MATNR,I,EQ,F011851

This isn't clear from docs, we assumed replicating the ERPVariantProduct through BD91,Bd92,BD93,BD10 was enough, since we see the variant attributes were correctly loaded and shown into HMC/Backoffice.

 2018-06-05 16:58:38,779 [WARN] [DataHubActorSystem-akka.actor.default-dispatcher-14] [c.h.d.s.p.DetermineAttributeValueVariant]

thanks nicola

Accepted Solutions (1)

Accepted Solutions (1)

nicolabeghin-2
Employee
Employee
0 Kudos

I confirm the variants needs to be listed in the MATERIALS.TXT CPQ filter file.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Nicola, Just one comment. You can use wildcards in the material.txt like: range=MARA,MATNR,I,CP,* for all materials. You may try range=MARA,SATNR,I,CP,* for all material variants. SATNR is the id of the configurable material for a variant. BR, Thomas

nicolabeghin-2
Employee
Employee
0 Kudos

hi thanks a lot! This is extremely useful (and an elegant solution)! We ended up using an hybrid approach, listing all the SATNR of the project-scoped configurators.

thanks nicola

nicolabeghin-2
Employee
Employee
0 Kudos

Hi it seems like any SATNR-related line is not honored. Do you have any idea why? We tried to fallback to the one you suggested but the COMM_PROD_VAR table is not populated until we explicitly state all the MATNR..

 range=MARA,MATNR,I,EQ,F023957
 range=MARA,MATNR,I,EQ,F023958

or

 range=MARA,MATNR,I,CP,F*

thanks nicola