How To… Define Value Mapping for Regions (MDG_FND_REGION_CODE)
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”.
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.
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
If you follow the guide and repeat the DRFOUT replication you will see this:
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
- Start tcode vmimg
- Start activity “Assign Code Lists to Elements and Systems
- Click on New Entries
- Enter details like
Maintain Value Mapping
- Start tcode vmimg (again)
- Start activity “Maintain Value Mapping”
- Scroll down to existing standard entry “MDG_FND_REGION_CODE”
- Click on the VM button
- Click on Edit
- New Entries
- 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.
- Select the new entry and navigate to “Define Value Mapping”
- Click on New entries
- Add the entries (use copy & paste)
Internal Code Value
16External Code ValueSH
THResult should look like:
A typical test would be:
- Create new BP via tcode BP; use in address Country DE and Region 08
- Save BP and copy BP-iD
- Use tcode DRFOUT and define manual filter: define the BP-ID
- Execute the replication
- Go to tcode srt_moni and inspect the Original XML
Nice and very easily understandable presentation.