In an SAP S/4HANA (and SAP ERP) System you typically maintain address information for Business partners (like Vendors and Customers). One of the important fields within an address is the region code which belongs to a country. An example is the region “Hessen” which belongs to the country “Germany”. In an S/4HANA System the region code for “Hessen” is “06” but the ISO code and the code expected in MDG cloud edition (SAP ODM) is “HE”.

Example for different reference data on attribute regions codes between SAP MDG cloud edition and SAP S/4HANA

 

Because of that we recommend to harmonize the customizing according to the ISO codes. Another option is the usage Value Mapping to ensure that the correct ODM/ISO codes are distributed to SAP MDI/connect systems. The following graphic explains the situation.

Integration%20between%20SAP%20MDG%20cloud%20edition%20and%20SAP%20S/4HANA%20via%20SAP%20MDI

Integration between SAP MDG cloud edition and SAP S/4HANA via SAP MDI

Goal

The goal of this guide is to explain how to configure the Value Mapping for the region DE. Of course, the guide can be applied for other countries as well. The procedure can also be used for other attributes such as Company Code, Sales areas etc.

If you don’t have value mapping in place and you send a SOAP message via DRFOUT you will see this in SRT_MONI

SAP%20S/4HANA%20Outbound%20Message%3A%20Without%20Value%20Mapping

SAP S/4HANA Outbound Message: Without Value Mapping

If you follow the guide and repeat the DRFOUT replication you will see this:

SAP%20S/4HANA%20Outbound%20Message%3A%20With%20Value%20Mapping

SAP S/4HANA Outbound Message: With Value Mapping

 

You can also have different value mappings for different communication systems. The value mapping is considered during inbound and outbound.

 

SAP S/4HANA – Value Mapping

This technology was introduced years back in parallel to key mapping features. It’s also used in MDG and DRF.

Assign Code Lists to Elements and Systems

  1. Start tcode vmimg
  2. Start activity “Assign Code Lists to Elements and Systems
  3. Click on New Entries
  4. Enter details like
  5. Save

Maintain Value Mapping

  1. Start tcode vmimg (again)
  2. Start activity “Maintain Value Mapping”
  3. Scroll down to existing standard entry “MDG_FND_REGION_CODE”
  4. Click on the VM button
  5. Click on Edit
  6. New Entries
  7. Enter details

Info: Disable the checkbox “Outb. Def.” if you want this code list only for the specific business system. This makes sense if you replicate the via point to point connection to other SAP S4HANA systems with same code lists.

  1. Save
  2. Select the new entry and navigate to “Define Value Mapping”
  3. Click on New entries
  4. Add the entries (use copy & paste)
    Internal Code Value
    01
    02
    03
    04
    05
    06
    07
    08
    09
    10
    11
    12
    13
    14
    15
    16External Code ValueSH
    HH
    NI
    HB
    NW
    HE
    RP
    BW
    BY
    SL
    BE
    BB
    MV
    SN
    ST
    THResult should look like:
  5. Save

Test

A typical test would be:

  1. Create new BP via tcode BP; use in address Country DE and Region 08
  2. Save BP and copy BP-iD
  3. Use tcode DRFOUT and define manual filter: define the BP-ID
  4. Execute the replication
  5. Go to tcode srt_moni and inspect the Original XML
Sara Sampaio

Sara Sampaio

Author Since: March 10, 2022

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x