Creating Consumer Mappings

Context

You use consumer mappings to enable communication with a provider that uses a different interface. By default, the consumer mapping is defined as a single-target consumer mapping (STCM), meaning that you have to provide operation mappings for each operation and that all operations must be assigned the same target consumer. During configuration, the single-target consumer mapping is configured like a normal service consumer, since a single logical port can be used to send a message from the source consumer proxy to the communication partner, using the target consumer of the mapping.

Procedure

  1. In the ABAP Workbench (transaction code SE80) in the Enterprise Services Browser, open the enterprise services wizard to create a consumer mapping. For example, you can start it from the context menu of the Enterprise Services folder.
  2. In the wizard, specify a name and a namespace for the consumer mapping and optionally a prefix.
  3. Assign the operation mapping to a package or define it as a local object.

    The operation mapping is opened in the proxy editor.

  4. On the Properties tab in the proxy editor, you can change the name of the operation mapping and the implementing class, as well as the prefix. You can also change the release status of the newly created proxy object.
  5. On the Detail View tab, assign the consumer proxy for which you want to define the mapping.

    All operations of the selected consumer proxy are shown in the Detail View.

  6. By default, the consumer mapping is a single-target consumer mapping. If you want to map the source consumer to multiple target consumers, deselect the Single Target option.
  7. Select an operation of the source consumer.
  8. Assign an operation mapping or, if this is not a single-target consumer mapping, select Direct mapping.
    • Operation mappings

      If you assign operation mappings for each operation, you do not need to implement the consumer mapping. You only need to implement the message assembly for the target consumer based on the assembled messages of the source consumer.

    • Direct mappings

      If you want to define a direct mapping for one operation, you have to deselect Single Target for the consumer mapping first, as direct mappings are not allowed in a STCM. This creates a folder for potential target consumers of this direct mapping underneath the operation mapping node. Here you can add target consumers that can be used for the implementation and configuration of the consumer mapping. On the Properties tab, an implementing class is created when the consumer mapping is activated. For a direct mapping, you have to implement the message assembly as well as the call of the target consumers.

  9. Repeat steps 7 and 8 for all operations of the source consumer.
  10. Save and activate the consumer mapping.

Results

The consumer mapping has been created.