Daily Archives: March 29th, 2016

Customer Master Data Exchange

Agenda:

  • Illustrate the Customer Master Data Integration
  • List the necessary prerequisites
  • Outline the architectural concept and extensions.

Screen Shot 2016-03-29 at 2.58.20 pmScreen Shot 2016-03-29 at 2.58.36 pm.png

Integration Scenarios

Screen Shot 2016-03-29 at 2.59.52 pm.png

Prerequisites to Enable the Process

Screen Shot 2016-03-29 at 3.02.03 pm.png

  • Core+ platform
  • most important features of Core+ architecture:
    • Module independence(each module owns its data and other modules cannot break it by modifying its data or services)
    • New persistence layer with a NoSQL engine for MongoDB
    • Extensibility and customization options
  • Architecture Overview:
    • Rest WebApp: Exposes the public API as a REST interface
    • Facade – Provides a well-defined use case relating the API to the presentation layer, decoupled from the Service Layer. It will be structured through use cases. Usually, the facade is composed of a set of Service layer calls, translating input arguments from DTO’s to ManagedObjects and the results from ManagedObjects to DTOs.
    • Service Layer: Contains service logic needed to realize business use cases. This is the biggest layer and usually is divided into the
      • Data Layer: defines the domain models as ManagedObjects and data access components(Queries, DAOs)
      • Services Layer: Operates on ManagedObjects
    • Persistence: If the service application requires persistence capabilities, it should use Kernel components and its PersistenceManager(supports several persistency engines – MongoDB, NoSQL DBs like Cassandra)

Screen Shot 2016-03-29 at 3.14.38 pm.png

  • Once the raw data has been imported, it must be composed. Composition is a two-step process beginning with grouping and then progressing to composition. During the grouping stage, the com.hybris.Data.Hub.grouping.GroupingStrategy class iterates through a sequence of grouping algorithms against a set of RawItem objects. The whole process of grouping the integration items can be configured by adding or removing grouping handlers or by changing the order they are applied to the raw input data set. Each group at the end of the grouping stage must correspond to exactly one canonical item to be created.
  • The composition phase of data processing is governed by a set of composition rules. To process the imported raw data, it is necessary to know what item types can be created from the imported item type, what attributes the composed types should be constructed from the imported raw items. This is accomplished using composition metadata, which is defined in the CanonicalAttributeDefinition attributes.
  • The overall publication process is described in the following steps:
    • Data is converted from the canonical format into the format specific to the target system where data is being published
    • From the target system format, data is imported into the target system. A special adapter specific to the target system type, for example, Core vs Core+, places data into the target system. During the process, the data might be formatted again by the target system adapter.
    • When the data is delivered to the target system, it is loaded into the hybris application. In the specific case of hybris, this portion of the publication process is handled by a Data Hub Adapter extension import service on the target system.
    • The target system may reject all or some of the data. Any rejected data is returned to the Data Hub for further processing.

Screen Shot 2016-03-29 at 3.23.58 pm.png

Screen Shot 2016-03-29 at 3.24.23 pm.png

Screen Shot 2016-03-29 at 3.24.55 pm.png

Screen Shot 2016-03-29 at 3.25.12 pm.png

Screen Shot 2016-03-29 at 3.25.39 pm.png

Screen Shot 2016-03-29 at 3.26.06 pm.png

Architectural Insights

Screen Shot 2016-03-29 at 3.26.46 pm.png

Summary: Now we will be able to do customer master data integration.

Synchronize Common Data between SAP ERP and hybris

Agenda: Identify Common Data in SAP ERP and hybris & Synchronize the Common Data from SAP ERP to hybris.

Procedure:

Screen Shot 2016-03-29 at 2.15.35 pm

Screen Shot 2016-03-29 at 2.16.00 pm.png

Data Synchronization:

Data is being exchanged between SAP ERP and hybris, in both ways, with SAP ERP being the source system for Master Data.

Each system uses different values for certain data types: for example, in SAP ERP the form of address titles ‘Mr’ and ‘Ms’ are represented by 0002 and 0001 respectively, whereas in hybris they are mr and ms.

Data must be understood by both systems.

There is Common Data that must be available in both systems.

Data Synchronization – Solution:  ZDOWNLOAD_CUSTOMIZING_AS_IMPEX report

To ensure that values are commonly understood, you create a report in SAP ERp that allows you to specific values for the following types of data:

  • Currency Codes, Unit of measurement, Countries, Regional taxes, Price elements, Material groups(include product price classes and product discount classes), customer groups(includes customer price lists and customer discount groups), Form of address keys, Distribution channels, Divisions.

In the report you specify the languages in which the specified values should be available, and a file location to which you will download the customizing values. When you run the report, the system downloads the specified values to an ImpEx file, which you can then import into hybris.

The report replicates the corresponding SAP ERP tables to hybris. For the example with the form of address titles, the replicated tables are: tsad3 table and the corresponding tsad3t text table.

Steps:

  1. Create the ZDOWNLOAD_CUSTOMIZING_AS_IMPEX report in SAP ERP. The instructions are available in SAP Note 1983231.
  2. Remove existing values for the relevant Common Data Types from hybris. Using the example of the form of address titles, you need to delete the existing mr and ms entries before importing the ImpEx file generated by the report. Do not remove other types of entities as they are already used / configured/ linked with other entities inside the hyrbis platform.
  3. Extend the localextensions.xml file by enabling the sapmodel extension (SAP Model Extension). This allows you to import values of sapCode, distribution channels and divisions.
  4. Run the report in SAP ERP.
  5. Import the generated ImpEx file in hybris by using Legacy mode(one time action)

Note:

The HY600 is based on release v5.4

hybris 5.5 onwards additional SAP master data and functional integration, as well as extended Data Hub capabilities are provided.

Practice

  1. Check the SAPMODEL extension is installed.
    1.  Open the localextension.xml file of the hybris Platform from the Config folder( add <path autoload=”true” dir=”${HYBRIS_BIN}\ext-integration/sap/core” depth=”1″ /><!core exnsion>
    2. Open the {HYBRIS_BIN}\bin\ext-integration\sap\core folder, check to see if the sapmodel folder in this path. The extension should already be installed here.

Screen Shot 2016-03-29 at 2.37.57 pm

Screen Shot 2016-03-29 at 2.39.02 pm.png

Screen Shot 2016-03-29 at 2.39.28 pm.png

Screen Shot 2016-03-29 at 2.39.53 pm.png

Screen Shot 2016-03-29 at 2.40.16 pm.png

Screen Shot 2016-03-29 at 2.40.41 pm.pngScreen Shot 2016-03-29 at 2.40.51 pm.png

Screen Shot 2016-03-29 at 2.41.25 pm.pngScreen Shot 2016-03-29 at 2.41.33 pm.png

Screen Shot 2016-03-29 at 2.42.08 pm

Copy and paste it in the ABAP EDITOR in SE38.

Check and activate it.

Screen Shot 2016-03-29 at 2.43.30 pm.png

Execute and download the ImpEx file.

Screen Shot 2016-03-29 at 2.44.21 pm.png

Give the Language keys where you want to maintain the base store.

Upload the downloaded file from report to the hybris

Screen Shot 2016-03-29 at 2.47.29 pm

Screen Shot 2016-03-29 at 2.48.41 pm.png

Screen Shot 2016-03-29 at 2.49.23 pm.png

HYBRIS ADMINISTRATION CONSOLE.

Screen Shot 2016-03-29 at 2.50.41 pm.png

Screen Shot 2016-03-29 at 2.50.51 pm.pngScreen Shot 2016-03-29 at 2.50.59 pm.pngScreen Shot 2016-03-29 at 2.51.52 pm.png

Screen Shot 2016-03-29 at 2.52.14 pm.png

Screen Shot 2016-03-29 at 2.52.40 pm.png

Screen Shot 2016-03-29 at 2.53.03 pm.png

Screen Shot 2016-03-29 at 2.53.32 pm.pngScreen Shot 2016-03-29 at 2.53.51 pm.png

Screen Shot 2016-03-29 at 2.54.14 pm.png

Summary:

This makes the synchronization case between the SAP ERP and hybris software by containing the same data types and the notations(like Mr and Ms) on both the side.