SAP Knowledge Base Article - Public

2646020 - Export of Competitor Products in Data Workbench

Symptom

Your requirement is to export the Competitor Products using Data Workbench. Upon trying the Data Workbench Export for the object Competitor Product, able to see that the Total Records are different from the number of records available in Competitor Products view in Competitors workcenter.

Environment

SAP Hybris Cloud for Customer

Reproducing the Issue

To see the available Competitor Products

  1. Go to Competitors work center
  2. Go to Competitor Products view
  3. Show All
  4. There are X records in the OWL

To export the Competitor Products using Data Workbench

  1. Login to the HTML5 client
  2. Go to Data Workbench workcenter
  3. Go to Export tab
  4. In the Search field, select the object Competitor Product
  5. Select Data
  6. Select field
  7. Select Next
  8. Export Data
  9. Go to the Monitor tab
  10. Check for the relevant Task and download the exported file
  11. There are Y records

Cause

When the query to Select All the Competitor Products is executed using the Competitor Products work center, the below parameters are passed in the backend.
(attribute name) (sign) (option) (low)
COMPETITOR_PRODUCT_IND I EQ X
LIFE_CYCLE_STATUS_CODE I EQ 2

This call fetches X records.

Consider the scenario where the OData call is executed as below:
https://myxxxxxx.crm.ondemand.com/sap/c4c/odata/v1/competitorproduct/CompetitorProductCollection/$count

The parameters passed in the backend are:
(attribute name) (sign) (option) (low)
COMPETITOR_PRODUCT_IND I EQ X
COMPETITOR_MAIN_IND I EQ X
PRODUCT_MAIN_IND I EQ X

This call fetches only Y records.

The values for the above parameters are set at the CompetitorProduct entity level, in the CompetitorProduct OData service, and the above parameters are also hidden in the metadata of this OData service.

This is because the backend Business Object structure and the UI models were not same. Hence these two (COMPETITOR_MAIN_IND and PRODUCT_MAIN_IND) additional parameters are needed. Therefore, it cannot be removed from standard service. Hence, the difference in count is expected.

Resolution

You can use Custom Odata Service for querying Competitor Products and the standard service for other purpose.

You can create a Custom Odata Service same as standard one where you can remove the default value for this two parameters (COMPETITOR_MAIN_IND and PRODUCT_MAIN_IND).

To create Custom OData Service for Competitor Products you may follow the below steps:

  1. Go to Administrator work center
  2. Go to OData Service Explorer view
  3. Show Custom OData Services
  4. Select New to create Custom Odata Service
  5. Select Data Workbench enabled (optional)
  6. Edit the Custom OData Service
  7. Select the required BO (Material) under Select Business Object
  8. Select the Root node and expand the Root to select CompetitorInformation
  9. Save
  10. Activate

Keywords

CompetitorProduct, Competitor Products, Competitor Information, CompetitorInformation , KBA , competitor products , competitor information , competitorproduct , LOD-LE-PRD-PRD , Product + Product Category Hierarchy , Problem

Product

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