Using Conditional Mapping in SAP Application Interface Framework

Objective

After completing this lesson, you will be able to describe conditional mapping, and identify the various types of conditional mapping.

Conditional Mapping

Structure Mapping Steps with Field Mapping Highlighted.

A conditional mapping is created for a specific field mapping. After defining the field mapping for the field, you can create one or more conditions for the field. The mapping of the field is changed accordingly if one of the conditions is executed. If you have to set the value of a field to a specific value, depending on the result of the check, you can enter the value directly in Customizing in the Alternative Field Name field with %value.

Flow diagram showing structure Mapping showing conditional mapping.

To define if a condition should be executed, a check is needed. If the check is successful, the condition is used to fill the destination field. If the check fails, the normal field mapping is executed. There are three condition types, and they've been set in the condition accordingly:

  • Empty Value: An empty value is passed to the destination field.
  • Alternative Value Mapping/ Field Name: Depending on the Customizing settings, several things can be done with this condition type:
    • If only alternative field names are defined, the alternative field name(s) is used to fill the destination field.
    • If a value mapping is defined for the normal field mapping, the alternative field name(s) is used for the value mapping of the normal field mapping.
    • If only an alternative value mapping is defined in the condition, the fields from the normal field mapping are passed to the alternative value mapping. If alternative value mapping and alternative field name(s) are defined, the alternative value mapping is used with the alternative field names.
  • Ignore Value Mapping/Use Alternative Field Name: Value mapping in the normal field mapping is ignored. Instead, the value of alternative field name(s) is passed to the destination field.
Flow diagram showing Conditional Mapping Types as described in the text.

How to Create a Conditional Mapping

Watch this demo to understand the process of defining and testing conditional mappings for filling the CLASS field in the target interface. Explore how to set up conditional mappings based on conditions and alternate field values from different source structures. Follow the steps to define conditional mappings effectively and test the mappings using sample data entries for validation.

Log in to track your progress & complete quizzes