Key mapping is an important process during implementation of intercompany integration solution for SAP Business One. Key Mapping is required to successfully replicate masters and transactions across branch companies.

In the following, we cover these broad sections on key mapping:

  1. Why key mapping is required?
  2. Data harmonization process
  3. How to perform Key Mapping?
  4. Best way to perform key mapping for bulk data or large number of companies.
  5. Impact of company template in key mapping
  6. Key mapping while introducing new company in existing landscape
  7. Key mapping masters list

1. Why key mapping is required?

Some business objects in SAP Business One have an internal primary key which differs from the key that visible in SAP GUI (e.g. freight, length and width UOM, weight UOM, payment terms, item group, etc.).

It is important to understand how the internal keys are generated.

Internal keys are generated in the sequence in which the data is entered. It is quite possible that the same set of records are entered in a different sequence in all the participating companies. This means the primary key generated at Database level could be different for the same description of records in different company databases.

In following diagram, even though all item group master data exists in all three branch companies (California, New York and Texas), their internal primary keys are different. For Example, Item Group “Laptop” has internal key as 102 in head office (California), 101 internal key in Branch (New York) and 103 internal key in Branch (Texas).

To successfully replicate item group master, the internal keys of all participant companies must be mapped to each other.


Essentially, you need to map the similar master data record description across companies. However, you may have different description because of different language. In that case, you need to manually map the records.

Not only this, data harmonization is a mandatory process before undertaking the Key Mapping exercise.

 

2. Data harmonization process

Before initiating the key mapping process, you must manually ensure that number of records in each company are equal for all key mapping master. For reference purposes, please refer to the list of key mapping master below in this article.

E.g., Item Groups master: if in Head office you have ‘Items’ as a single group in the item groups master; and in other participant company, you have ‘Items’ and ‘PC’ as groups in the item group master; and in the third company you have ‘Items’ and ‘Laptop’ in the item group master as shown below.

Then, you must ensure that all three companies should have same number of groups defined in the item group master. I.e. Items, PC and Laptop are defined in all three companies.

 

3. How to perform Key Mapping?

To successfully replicate master data for all key mapped objects, the internal keys of all branch companies must be mapped to each other.

In following diagram, even though all item group master data exists in all three branch companies (California, New York, and Texas), their internal primary keys are different.

  1. Item Group “PC” has internal key as 101 in head office California company need to map with 102 internal key in New York Branch and 102 internal key in Texas Branch Company.
  2. Item Group “Laptop” has internal key as 102 in head office California company need to map with 101 internal key in New York Branch and 103 internal key in Texas Branch Company.
  3. Item Group “Printer” has internal key as 103 in head office California company need to map with 103 internal key in New York Branch and 101 internal key in Texas Branch Company.
  4. Item Group “Items” has internal key as 100 in head office California company need to map with 100 internal key in New York Branch and 100 internal key in Texas Branch Company.

Steps to perform the key mapping:

  1. First you import all the key mapping data to be mapped. The import process may take some time depend on the data or number of companies.
  1. You can view the summary of import data by choosing View Summary
    With summary report, you can check whether all key mapping records are consistent in all companies or not.
    In this report, Consistent denotes that the imported data has same number of records for that object across all the participating companies and Inconsistent denotes that the imported data does not have same number of records for that object across all the participating companies
  2. You can use the Microsoft Excel template for mapping master data records. For details about this option, refer to the Key Mapping process in the Admin guide of the integration solution.
  3. If you are not using Microsoft Excel then the next step will be to choose the base company and object to be mapped. Note that you can choose ALL objects but if you plan to run the AutoMap option, we recommend you to do it for each object separately.
  4. Once you choose the base company, a table is presented at the bottom of the Key Mapping window including the internal keys to be mapped for the selected object.
  5. You can manually choose the internal keys or you can use the AutoMap option.
  6. The Auto Map maps the internal keys based on the same description and leave the keys it could not trace for you to map manually.
  7. Finally, choose Save to save the object mapping.
  8. Repeat these steps for each object in the master record list.

Note: Key mapping exercise is a one-time activity at the time of solution deployment. Once the solution is deployed, all subsequent master data replication will do the necessary key mappings automatically.

Subsequent example to explain: After deployment, if you create a new item group in the branch company, let say “Apparel” the application will automatically replicate this item group in all the participant companies and perform the key mapping automatically.

 

4. Best way to perform key mapping for bulk data or large number of companies

When you are having large number of companies or having large number of data in the system for key mapping masters, it is always recommended to use the Microsoft Excel template for key mapping.

Tips and Tricks – Using Microsoft Excel Template

Once you Export the key mapping Excel from the application as shown in below screenshot, application generates the key mapping excel template with all key mapped masters from all participant companies.

In Excel template, first you need to filter the template using Object column and then filter the template using the Display Key if description is same and then provide the Mapping Key that needs to be the same for particular set of records.

Once you provide the mapping key in all records, import the template as shown below.

If you encounter an error during the import process, download the Excel template and check the error details displayed in the Error column. Rectify all errors and import the Excel template again.

 

5. Impact of company template in key mapping

With company template feature, user can enable or disable the replication of masters across branch companies. If you make the changes in the company template, let’s say you have enabled the new master for replication and which requires the key to be mapped then you must perform the key mapping for that particular master. Otherwise system gives an error during replication or wrong data gets updated in the recipient branch companies.

For Example, if you have enabled the replication of “Address Format” for US localization template as shown below and the same template is assigned to branch companies in intercompany landscape.

In this case, you must perform the key mapping of this record as “Address Format” is a key mapped master. For key mapping, you need to follow the same steps as mention above, import the key mapping record for address format and then perform the key mapping as shown below.

 

6. Key mapping while introducing new company in existing landscape

If you have introduced a new company in the intercompany landscape, then you must ensure that new company must have the same number of key mapped master as other companies have. In other words, identical number of records must exist in the new company as well.

Once you complete the deployment with new company, you must perform the key mapping for this new company.

 

7. Key mapping masters list

Following is the list of all Key Mapping masters:

Master Data
Address Format
Bank
Business Partner Group
Commission Group
Credit Card
Currency
Customs Groups
DNF Code
Document Type
File Format
Freight
House Bank Account
Instructions
Intrastat Configuration
Item Group
Languages
Length And Width UOM
Manufacturer
Material Group
NCM Code
Payment Blocks
Payment Terms
Portfolio
Price List
Sales Person
Service Code
Service Group
Shipping Type
Weight UOM
Fuel Code
SPED Profile Setup
CNAE Code
Units of Measurement
Unit of Measurement Groups
Discount Groups
Package Types
Industry
Occurrence

 

Note: If you are using only consolidation feature then you need to perform the key mapping for currency master only.

Recommendation is to carefully map all Key Mapped Masters while performing the key mapping process. This is extremely important process for the solution to work correctly.

(This blog content was created by the development team of the intercompany integration solution for SAP Business One)

To report this post you need to login first.

2 Comments

You must be Logged on to comment or reply to a post.

  1. Péter Forró
    • Importance and role of key mapping is well explained, I do however not understand how will be the business partners and items replicated, as these are not among the key mapping masters.

      I mean BPs and items seem to be in principle very similar to these master data, but may of course be different from company to company, so what will guarantee a cardcode or itemcode generated in one of the companies, not to be already existing in another one where it should be replicated?

    (0) 
    1. Peter Hartwich Post author

      Dear Péter,
      Thanks for your question.
      Key Mapping is only required for Masters for which the Primary Key is auto generated by the system and is also not visible on the GUI.

      Whereas for Business Partner Master Data and Item Master Data, the Primary Key is Card Code and Item Code respectively which is user defined and is visible on the GUI. Therefore these masters are different than the Masters which require Key Mapping.

      In the Intercompany integration solution, user can selectively choose BP and item master data for replication. I.e. all BP and items are not necessarily replicated across the landscape. Also, user can choose the particular recipient companies to which BP and Item master data need to be replicated.

      When BP or item master are replicated to the recipient company, the solution checks the item code and BP code in the receiver system, if the code exist the solution will overwrite the information of the recipient company with the sender company information.

      Before implementing the Intercompany integration solution, a data harmonization has to be performed and a codification for global items and business partners needs to be adopted. This avoids any accidental data override due to replication by the Intercompany integration solution.

      Hope this clarifies,
      Best regards, Peter

      (0) 

Leave a Reply