SAP Data Hub Integration with SAP Commerce (Hybris) – Full Guide for Legacy and Modern Setups | Hybris Tube

SAP Hybris Datahub Integration

What is SAP Data Hub?

SAP Data Hub was a middleware solution used to facilitate asynchronous, decoupled data integration between SAP ERP systems (like ECC or S/4HANA) and SAP Commerce Cloud (formerly SAP Hybris). Acting as a staging and transformation layer, Data Hub managed the flow of product, customer, pricing, and inventory data across systems.

Key Functions of SAP Data Hub:
a) Decouples SAP ERP from SAP Commerce.
b) Transforms incoming IDocs into a canonical format.
c) Maps canonical data to Hybris-compatible target structures.
d) Injects custom logic during transformation (e.g., pricing logic, product categorization).
e) Supports event-driven architecture for data distribution.

Typical Data Flow Using SAP Data Hub
1) ERP sends IDocs (e.g., MATMAS, DEBMAS, ORDERS).
2) Data Hub receives and parses the IDoc.
3) Data is transformed into canonical items.
4) Canonical items are mapped to target items.
5) Final data is sent to SAP Commerce (Hybris) via REST or Impex.

Why SAP Deprecated Data Hub
SAP officially deprecated Data Hub due to several limitations:
1) Complex Setup & High Resource Usage
2) Not Cloud-Native – incompatible with modern CCV2 architecture.
3) Lack of Real-Time Processing – primarily batch-based.
4) Better Alternatives Available – e.g., SAP Integration Suite, CPI, and Backoffice Integration Framework.

Modern Alternatives to SAP Data Hub

AlternativeDescription
SAP Integration Suite (CPI)Cloud-native iPaaS on SAP BTP for integrating SAP and non-SAP systems.
Backoffice Integration API (BIF)Use Integration Objects in Hybris to import/export data.
OData / REST APIsDirect API-based integration between S/4HANA and Hybris.
Third-Party ToolsMulesoft, JBoss, Dell Boomi (legacy systems)

How to Integrate SAP Commerce with SAP ERP Using Data Hub

Note: This section is relevant for legacy systems still using Data Hub.
Prerequisites

1) SAP Commerce (Hybris) instance running with:
datahubadapter, core, platform, backoffice extensions enabled in localextensions.xml
2) SAP ERP configured to send IDocs to Data Hub
3) Data Hub installed and connected via RFC

Step-by-Step Guide

1) Configure datahub.properties in SAP Commerce
Add the following to your local.properties or datahub.properties file:
#Outbound Data Hub config
datahub.adapter.datahuboutbound.url=https://:/datahub-webapp/v1
datahub.poolname=Product
datahub.targetsystemname=Hybris
#Credentials (if security enabled)
datahub.adapter.outbound.username=admin
datahub.adapter.outbound.password=nimda
2) Define Custom Attributes (if needed)
If your ERP sends custom product fields, extend the Product item type in your items.xmlfile.
3) Receive Data from Data Hub
Data Hub will POST transformed data to SAP Commerce:
POST https://<HYBRIS_HOST>/datahubadapter/<pool>/<targetSystem>
4) Handle Data with Event Listener or Inbound Service:
Hybris will handle the data using:
DefaultDataHubInboundService, OR
A custom event listener (if implemented).
5) Create a Processor to Persist Data into Hybris database.
public class MyProductImportProcessor implements DataHubInboundItemConsumer {
@Override
public void consume(final InboundItem inboundItem) {
String code = inboundItem.getAttribute(“code”).getValue();
String name = inboundItem.getAttribute(“name”).getValue();

    MyProductModel product = modelService.create(MyProductModel.class);
    product.setCode(code);
    product.setName(name);

    modelService.save(product);
}

}

6. Register this processor class as bean in your *spring.xml file:

While SAP Data Hub served a critical role in legacy systems, its deprecation signals a shift toward modern, API-driven, and cloud-native integration strategies. If you’re still supporting Data Hub-based integrations, now is the time to plan your migration to SAP Integration Suite or Backoffice Integration Framework (BIF).

If you’re interested in knowing the end to end steps for datahub integration and our other Technical content in SAP Commerce Cloud along with our Technical support—subscribe to our member-only course by clicking the button below!

For any questions or inquiries, feel free to contact us at info@hybristube.com or amandeepInJavaHybris@gmail.com.

Leave a Reply

Your email address will not be published. Required fields are marked *

Comment

Name