Maintaining Code Lists and Value Mappings

Objective

After completing this lesson, you will be able to explain the relevance of Code List maintenance and the need for value mappings

Code Lists and Value Mappings

In this lesson, we’ll focus on code lists, another dependency for successful message exchange between systems, how to maintain them, and how to leverage value mappings.

Elements of a message

Code Lists

A code list is a set of items, each consisting of a code value, a description, and sometimes additional attributes. Code lists are used in many business objects to allow users to select from a predefined list of options for a specific field. They are part of the system’s configuration and must be defined by administrators in the System Settings. In the user interface, they are typically represented as drop-down menus. While the description can usually be translated into all relevant logon languages, the code is a language-independent, technical representation of the selected value, which is also used in integration messages.

The following graphic displays two sample code lists for the Business Partner object and the similarly named settings entry, showing where they can be maintained in SAP Sales and Service Cloud Version 2.

Screenshot of SAP Sales and Service Cloud Version 2 with the System Settings for Business Partners and two code lists open.
  • The screenshot on the left displays the Business Partner menu entry showing all Business Partner-related configuration settings with the two code lists Academic Titles (1) and Legal Forms (2) highlighted.
  • The screenshot in the middle displays the Academic Titles (1) code list, which allows users to assign an academic title to a person that can be placed either before or after the name. In this way, Academic Title is an example of a code list that includes an additional attribute to Code and Description.
  • The right screenshot displays another code list related to Business Partners: Legal Forms (2).

Code Lists in Integrated Systems

In an integrated system landscape, it is crucial that code lists are in sync across all systems. The following graphic displays two screenshots of the Academic Title code list maintained in SAP Sales and Service Cloud Version 2 on the left and SAP S/4HANA on the right.

Academic Titles Comparison of SSCv2 and S/4

In this case, the codes, descriptions, and item counts are the same in both systems. This is the best case, where no further changes or mappings are needed.

If you’d like to compare the Academic Title code list, which serves as an example, in your environment, you can do so as follows:

  • SAP Sales and Service Cloud Version 2: From the user menu, navigate to System SettingsBusiness PartnersAcademic Titles
  • SAP S/4HANA
    • Maintain: Use transaction SPRO and navigate to IMG ReferenceCross-Application ComponentsSAP Business PartnerBusiness PartnerPersonsName ComponentsMaintain Academic Titles.
    • View Only: Use transaction SE16 or SE16N and open table TSAD2

As you can see, the Customizing menu structure in SAP S/4HANA is more complex compared to SAP Sales and Service Cloud Version 2. If you only want to look up a value, you can alternatively access the table for a specific code list through the table view transactions SE16 or SE16N. More information about customizing paths and tables is provided later in this lesson.

Code List Maintenance

The overall goal of maintaining code lists is to set up all code lists in SAP Sales and Service Cloud Version 2 exactly like in SAP S/4HANA. Value mappings and other solutions should be introduced only if maintaining equal values cannot be achieved.

Note

Unlike SAP Sales and Service Cloud (version 1), where user-created entries in code lists often had to start with a Z or another prefix, Version 2 allows you to replace codes entirely for most code lists. This enables you to keep them exactly as in SAP S/4HANA without prefixes and, therefore, without needing Code List/Value Mappings in most cases.

You can find additional information about which code lists belong to each business object and where to find details in the on-premise systems in the Knowledge Base Article (KBA / SAP Note) 2598332 - Code list mapping for integration with SAP Cloud for Customer. Although the KBA targets the previous version of SAP Sales and Service Cloud, the Excel file (Code_List_Usage.xlsx) can still be useful for locating customizing paths or tables in the on-premise systems (worksheet Code List Details). SAP S/4HANA shares most SAP ERP tables. For business partner-related code lists, you may check the SAP CRM table entry.

For many code lists, you have two options:

  • Manual Maintenance

    You can manually maintain code lists in the system System Settings, located under the object they belong to. The examples Academic Titles and Legal Forms of the Business Partner are shown in a graphic at the beginning of this lesson.

    The manual method is useful for quickly reviewing entries and maintaining single values or small code lists. If you need to maintain descriptions in multiple languages, you might have to log in separately for each language because the system doesn’t currently offer a translation feature for all code lists. (For example, Academic Titles don’t offer translation, while Business Partner/Customer Roles do.)

  • Replication

    For larger code lists, the recommended approach is to integrate or replicate them. This is a new feature of SAP Sales and Service Cloud Version 2 that didn’t exist in version 1. Unfortunately, it’s not supported for all code lists. However, for those code lists where it is supported, you should consider using this feature, as it enables loading entire code lists from SAP S/4HANA into the cloud CRM, including descriptions in different languages.

    The replication of code lists will be covered in more detail in the next lesson. If you want to find out whether replication is supported for a specific code list, you can check the SAP Business Accelerator Hub to see if the integration package includes an integration flow for it.

Code List Maintenance and The Relevance of Value Mappings

Let’s look at a different situation where the code lists don’t match. We’ll still use the Academic Titles for this example. The following tables show the initial situation for the code list in SAP Sales and Service Cloud Version 2 on the left and SAP S/4HANA on the right.

Academic Titles are not Equal

The annotations and icons show the status of each entry. Let’s examine the entries in detail:

  • The descriptions for the codes 0001 and 0002 are different.
  • The descriptions for code 0003 match.
  • The cloud CRM’s entries 0004 and 0005 do not exist in SAP S/4HANA.
  • The SAP S/4HANA entry Z111 does not exist in the cloud CRM.
What does that mean?

If you replicated business partners from SAP S/4HANA to SAP Sales and Service Cloud Version 2 using these sets of academic titles, doctors became professors, professors became doctors, and those with Ph.D. could not be processed at all because Z111 is completely missing in the cloud CRM.

For the other direction, if you allow the creation of business partners in the cloud CRM and replicate them to SAP S/4HANA, the current code list allows users to select the academic titles B.A. or MBA, which do not exist in SAP S/4HANA. This means that the replication of those codes would also fail.

How to solve this?

While the first two entries seem ideal for mapping the code values, the other disparities cannot be resolved through mappings. You need to update the code list in the cloud CRM. Why in the cloud CRM? Because SAP S/4HANA is the leading system that was already in place when SAP Sales and Service Cloud Version 2 was introduced into the system landscape. Although the cloud CRM comes with pre-delivered code lists, which makes running the system independently in a non-integrated landscape very convenient, in an integrated system landscape, customers usually prefer not to change their existing systems. Therefore, SAP Sales and Service Cloud Version 2 must conform to the existing systems, and its code lists must be adjusted accordingly.

Value Mappings

Value Mappings allow you to map code values of SAP Sales and Service Cloud Version 2 to different external codes for communication with other systems. This can help in situations where code lists cannot be maintained equally across systems, for instance, because a code list cannot be edited in SAP Sales and Service Cloud Version 2.

Example: Customer / Business Partner Role

The Customer Role is an example for such a code list. The following screenshot shows the maintenance view under System SettingsCustomersRoles.

Customer Roles

The system comes with two roles: one for prospects and one for customers. You can create additional roles, but as you can see, the Trash Bin action icon is disabled, so the pre-defined entries cannot be deleted.

Since the customer role used in SAP S/4HANA in our demo environment is FLCU01, the Value Mapping is needed.

Value Mapping Maintenance

You can maintain Value Mappings in SAP Sales and Service Cloud Version 2 under System SettingsIntegrationValue Mapping. The following screenshot shows the related screen. The top section shows general mapping information, while the bottom section displays the actual mapping pairs.

Value Mapping for Business Partner Roles

Although the code list maintenance is located under the CustomersRoles setting, the Value Name for the mapping is Business Partner Role.

Settings for Value Mappings

  • Mapping Groups: Value Mappings are organized in Mapping Groups that can be assigned to Communication Configurations. This enables the use of different mappings for different scenarios and systems. The mapping group in the demo environment is named S/4HANA.
  • Parent Mapping Group: Allows inheriting value mappings from another mapping group. This can be used when connecting different systems that share some value mappings, while others require mappings.
  • Value Name: The name of the code list you want to map values for.
  • Rule for Missing Mappings: You don’t need to map every code in a code list. With the Rule for Missing Mappings field, you can choose whether a code value without an explicit mapping should simply Pass-Through, or Raise an Error.
  • Local Context: In some code lists, values depend on other code lists, such as Regions and Countries, where the country would serve as the context for the region.
  • Mappings: The lower part of the screen shows the actual mapping entries, where you can select the Internal Value from the code list and then enter the corresponding External Value.
  • Default Outbound and Default Inbound: In rare cases, you might need to map multiple different external codes to a single internal code or the other way around. In such cases, you must define defaults. If you map multiple different external codes to a single internal code, the system must know which of the external code to use when sending out an object with that internal code. In this situation, you must flag one entry as Outbound Default.

Note

When mapping multiple codes into one using Default Inbound or Default Outbound in bi-directional replication scenarios, remember that an object will alter its data during a round-trip!

Strategy for Code List and Value Mapping Maintenance

The key facts for maintaining code lists and value mappings are as follows:

  1. Whenever possible, maintain code lists in SAP Sales and Service Cloud Version 2 consistent with the leading system.
  2. Whenever possible, use the replication of code lists.
  3. Use the value mapping for code list that can’t be maintained equally or where the number of entries do not match and codes must be mapped with inbound/outbound defaults.
  4. When using value mappings that default inbound or outbound codes, consider the impact of a round-trip of records when exchanging them between systems in both directions.

Code lists and value mappings should not be analyzed solely from a technical perspective or maintained blindly as far as technically possible. Instead, most of them should also be evaluated from a functional viewpoint and maintained in a way that makes sense for the scope of the integration and the involved processes.

Manual Maintenance of Distribution Channels

This section demonstrates manual maintenance of code lists using the example of Distribution Channels. This code list often has only a few entries in most environments and is relevant for many integration scenarios involving Sales Area data, such as product and business partner replication.

You can look up and maintain Distribution Channels in the systems as follows:

  1. SAP Sales and Service Cloud Version 2: System SettingsCompanyDistribution Channels
  2. SAP S/4HANA – Lookup Only: Transaction SE16/SE16N, table TVTWT.
  3. SAP S/4HANA – Maintain Transaction SPRO, SAP Reference IMGEnterprise StructureDefinitionSales and DistributionDefine, copy, delete, check distribution channel

The following screenshot shows these locations:

Maintain Code List Manually - Distribution Channel

As the screenshot shows, the Distribution Channel setting in SAP Sales and Service Cloud Version 2 includes the translation feature. Therefore, you can view different languages either from the table TVTWT or through the SPRO transaction via menu GotoTranslation.

Although three distribution channels are maintained in SAP S/4HANA, only two are used in SAP Sales and Service Cloud Version 2 because this course's scenarios focus on sales organizations that do not use the third; therefore, the third is omitted.

Hint

Defining the distribution channel is only half of the task. To use distribution channels, they must be assigned to sales organizations. In this course's demo environment, only the two highlighted distribution channels are used with the sales organizations.

Video: Maintain Distribution Channels

The following video shows how to maintain the distribution channel code list in the logon language, English.

Although there was already an entry for Direct Sales, it was deleted to create a new one with the same description, but this time, the code from SAP S/4HANA was used to avoid a value mapping.

Note

The Distribution Channel code list is only used for demonstration purposes. Other code lists will be required for replicating most business objects.

Maintain Value Mappings for Business Partner Role

The main purpose of Value Mappings was discussed earlier in this lesson. This section demonstrates how to maintain Value Mappings using the Customer / Business Partner Role as an example.

You can maintain Value Mappings in SAP Sales and Service Cloud Version 2 as follows:

System SettingsIntegrationValue Mapping

The completed mapping is shown in the following screenshot, which we also saw earlier in this lesson.

Value Mapping for Business Partner Roles

Video: Maintain Value Mapping for Business Partner Role

The following video shows how to maintain the value mapping for the Business Partner Role. Remember that the required values in your environment might differ!