Show TOC

Function documentationReplicating Product Hierarchies from SAP ERP to SAP CRM

 

Hierarchy data is replicated from SAP ERP to SAP CRM using middleware. The data from SAP ERP that is replicated as categories is derived from fields in the material master, which have grouping characteristics and are used for classification purposes. These are the material type, material group, and product hierarchy.

The system performs the replication of hierarchy data as part of the Customizing download and uses the download object DNL_CUST_PROD1. This download has to be performed before the material download.

A delta download is not available for Customizing objects. The initial download therefore has to be repeated for DNL_CUST_PROD1 if data is changed in SAP ERP after the initial download.

Prerequisites

If a product hierarchy is used in SAP ERP, you have created the numbering scheme R3PRODHIER in SAP CRM for the product hierarchy from SAP ERP. You have ensured that the numbering scheme corresponds precisely to the structure of the product hierarchy in SAP ERP (structure PRODHS). This numbering scheme is essential for the data to be created correctly.

The number of levels in the numbering scheme must be the same as the number of fields in structure PRODHS. The number of digits for each level must be the same as the length of the corresponding field in structure PRODHS.

In Customizing for Cross-Application Components, choose Start of the navigation path SAP Product Next navigation step Product Category Next navigation step Define Category Numbering Schemes End of the navigation path.

Features

The hierarchy to which data is mapped is determined automatically during the initial download, when the hierarchies are created and assigned. In most cases you do not have to make any entries manually.

The relevant settings can be checked in Customizing for Start of the navigation path Cross-Application Components Next navigation step SAP Product Next navigation step Product Category Next navigation step Assign Category Hierarchies to Applications End of the navigation path. If the entries do not yet exist, in most cases you should not make any entries, as the system creates these automatically during the initial download.

The following applications are relevant for the mapping processes:

  • Sales (used, for example, in orders and opportunities)

  • Purchasing (used in Enterprise Buyer functions, such as shopping baskets, purchase orders, bid invitations, and goods receipts)

  • Products

The grouping fields from the material master are mapped to the hierarchies in SAP CRM as follows:

SAP ERP

SAP CRM

Material type

Hierarchy assigned to Product application (03): Typically R3PRODSTYP

Material group

Hierarchy assigned to Purchasing application (02): Typically R3MATCLASS

Product hierarchy

Hierarchy assigned to Sales application (01): Typically R3PRODHIER

To do this, the system performs the following steps during the download:

  1. At the start of the download using the object DNL_CUST_PROD1, the system checks whether a hierarchy is already assigned to the applications 01, 02, and 03.

  2. If a hierarchy has already been assigned, the system creates the categories in the respective hierarchy. This can also be a hierarchy that was created in SAP CRM.

  3. If a hierarchy has not been assigned, a new hierarchy is created with the ID R3PRODHIER, R3PRODSTYP, or R3MATCLASS.

    Note Note

    If you have created hierarchies in SAP CRM and assigned them to applications before starting the download, a warning is issued. However, if you deactivate this message in Customizing (Start of the navigation path Customer Relationship Management Next navigation step Master Data Next navigation step Products Next navigation step Basic Settings Next navigation step Define System Message Characteristics End of the navigation path), the SAP ERP categories are created in the existing SAP CRM hierarchies.

    End of the note.
Replication of Material Types

The hierarchy R3PRODSTYP has two levels:

  • The first level contains the categories MAT_ for materials and SRV_ for services.

  • For materials, the second level is a sublevel of MAT_ and contains the material types imported from SAP ERP, each with the prefix MAT_. For example, the SAP ERP material type HAWA (trading goods) is created as the category MAT_HAWA.

The standard SAP CRM set types are assigned to the categories of the hierarchy R3PRODSTYP as follows:

  • The following set types are assigned to the category MAT_, and therefore inherited by all material types:

    • COMM_PR_MAT (basic data on materials)

    • COMM_PR_SHTEXT (descriptions)

    • COMM_PR_UNIT (conversion of units of measure)

    • COMM_PR_LGTEXT1 (basic texts)

    • COMM_PR_GTIN (GTINs)

  • The following set types are also assigned to the category MAT_ if the status Sales is assigned to the material type in SAP ERP:

    • CRMM_PR_SALESA (sales: control fields, units of measure, and quantities)

    • CRMM_PR_SALESG (sales: groupings)

    • CRMM_PR_LGTEXT2 (sales: texts)

Replication of Material Groups

The hierarchy R3MATCLASS is built from the following data sources:

  • Material group hierarchy levels

    These are situated at the topmost levels of R3MATCLASS.

  • Material groups

    These are placed below the material group hierarchy levels in R3MATCLASS.

To use this feature, you must activate the business function SAP Multichannel Foundation for SAP CRM (CRM_MCF_R1).

Subsequent Changes

Once you have replicated a hierarchy from SAP ERP you should not change the assignment to an application.

If you change the hierarchy assigned to an application, for example, Sales or Product, and then perform a material download, this causes an error. As a result of downloading the category, the SAP CRM hierarchy is extended with the new data.

Multiple Backends
  • If material types or the sales product hierarchy are replicated from several backends, the IDs are merged.

    Example Example

    ERP1 has category 01, German name “Auto”

    ERP1 has category 02, German name “Fahrrad”

    ERP2 has category 02, English name “Cycle”

    ERP2 has category 03, English name “Motorbike”

    A download is performed firstly from ERP1, then from ERP2. The result is as follows:

    End of the example.
    • Category 01 is not changed, as it is not contained in ERP2.

    • Category 02 is extended, an additional language is created and the existing language is overwritten.

    • Category 03 is created.

  • The behavior described above applies equally to material groups. However, this can be changed in Customizing. In Customizing for Customer Relationship Management, choose Start of the navigation path Master Data Next navigation step Products Next navigation step Product Category Next navigation step Pricing Next navigation step Define Settings for Downloading Product Categories from SAP ERP End of the navigation path.

  • Where the sales product hierarchy is downloaded from multiple backends, it is important that the numbering schemes in both ERP systems are the same.

Delta Download

A delta download is not available for Customizing objects. An initial download has to be repeated in the following cases:

  • There are new categories in SAP ERP or existing categories have been changed

    Repeat the initial download to replicate the changes.

  • Categories have been deleted in SAP ERP

    By repeating the initial download the category is deleted in SAP CRM, but only if it is not being used.

Activities

During the download, the system performs the following checks and issues error messages in certain cases. Typical situations in which you might need to check your data and make certain corrections are as follows:

  • Hierarchy is used for more than one application

    You may have specified in Customizing (Start of the navigation path Cross-Application Components Next navigation step SAP Product Next navigation step Product Category Next navigation step Assign Category Hierarchies to Applications End of the navigation path) that the same hierarchy is to be used for two applications. This is not allowed when downloading categories from SAP ERP. If a download has been performed, the entries should read as follows:

    • Start of the navigation path Application Sales (01) Next navigation step Hierarchy R3PRODHIER End of the navigation path

    • Start of the navigation path Application Purchasing (02) Next navigation step Hierarchy R3MATCLASS End of the navigation path

    • Start of the navigation path Application Product (03) Next navigation step Hierarchy R3PRODSTYP End of the navigation path

    If you want to use a hierarchy other than R3PRODSTYP as the base hierarchy for the product type Financing or Service, you can assign it specifically for the product type concerned. However, you should not do this for the product type Material, as this causes the material types to be imported into this hierarchy.

  • Material groups cannot be imported into given hierarchy

    You have specified that the given hierarchy is to be used for the application Purchasing (02) (Start of the navigation path Cross-Application Components Next navigation step SAP Product Next navigation step Product Category Next navigation step Assign Category Hierarchies to Applications End of the navigation path). This means that the material groups would be created in this hierarchy. You should delete this setting and, if hierarchy R3MATCLASS already exists, assign this hierarchy to the Purchasing application. The material groups are then created in this hierarchy.

    However, if you want to import the material groups into the given hierarchy, leave your settings as they are and deactivate the error message in Customizing (Start of the navigation path Customer Relationship Management Next navigation step Master Data Next navigation step Products Next navigation step Basic Settings Next navigation step Define System Message Characteristics End of the navigation path).

  • Material types cannot be imported into given hierarchy

    You have specified that the given hierarchy is to be used for the application Product (03) and product type Material(Start of the navigation path Cross-Application Components Next navigation step SAP Product Next navigation step Product Category Next navigation step Assign Category Hierarchies to Applications End of the navigation path). This means that the material types would be created in this hierarchy. You should delete this setting and, if hierarchy R3PRODSTYP already exists, assign this hierarchy to the Product application. The material types are then created in this hierarchy.

    However, if you want to import the material types into the given hierarchy, leave your settings as they are and deactivate the error message in Customizing (Start of the navigation path Customer Relationship Management Next navigation step Master Data Next navigation step Products Next navigation step Basic Settings Next navigation step Define System Message Characteristics End of the navigation path). Note, however, that in most cases you are not advised to import material types into a customer-defined hierarchy.

  • Product hierarchy cannot be imported into given hierarchy

    You have specified that the given hierarchy is to be used for the application Sales (01) ( Start of the navigation path Cross-Application Components Next navigation step SAP Product Next navigation step Product Category Next navigation step Assign Category Hierarchies to Applications End of the navigation path). This means that the ERP product hierarchies would be created in this hierarchy. You should delete this setting and, if hierarchy R3PRODHIER already exists, assign this hierarchy to the Sales application. The ERP product hierarchies are then created in this hierarchy.

    However, if you want to import the ERP product hierarchies into the given hierarchy, leave your settings as they are and deactivate the error message in Customizing (Start of the navigation path Customer Relationship Management Next navigation step Master Data Next navigation step Products Next navigation step Basic Settings Next navigation step Define System Message Characteristics End of the navigation path). Note, however, that in most cases you are not advised to import ERP product hierarchies into a customer-defined hierarchy.

  • Numbering scheme R3PRODHIER not maintained

    To import product hierarchies from SAP ERP you have to define the numbering scheme R3PRODHIER in SAP CRM. This numbering scheme must correspond to the structure PRODHS in SAP ERP. You do this in Customizing for Cross-Application Components, by choosing Start of the navigation path SAP Product Next navigation step Product Category Next navigation step Define Category Numbering Schemes End of the navigation path.

  • Given category ID is not suitable for numbering scheme

    This refers to the download of product hierarchies. You should check your entries in table T179 in SAP ERP. The given product hierarchy does not comply with the R3PRODHIER numbering scheme defined in SAP CRM. You should correct either the entry in table T179 or the R3PRODHIER numbering scheme.

    After doing this, you restart the download for object DNL_CUST_PROD1 so that the new data is selected.