Entering content frameFunction documentation Executing Value Mappings Locate the document in its SAP Library structure

Use

At configuration time you can complete a value-mapping table in the Integration Directory. Values that are semantically the same are summarized in one group in this table.

The mapping runtime provides an API to determine a target value during a Java mapping for a source value.

Features

The classes of package com.sap.aii.mapping.key.* provide the functions required to execute a mapping:

Methods of Class KeyMappingService

Method

Use

public static KeyMappingFactory
  getInstance( )
   throws KeyMappingException;

Returns an instance of the class KeyMappingService. Use this service class to execute the value mapping.

public abstract Representation
  newRepresentation(
     String system,
     String namespace,
     String objectType,
     String key)
throws KeyMappingException;

Generates a new representation for a value.

public abstract Representation
  newRepresentation(
    String system,
    String namespace,
    String objectType)
throws KeyMappingException;

Generates an instance for the representation of a value without the value itself.

public abstract String
  query(
    IRepresentation source,
    IRepresentation target)

throws Exception;

Queries the target value for a source representation. The result is returned using both the parameter target and the return value.

public static String
  queryS(
    String sourceSystem,
    String sourceNamespace,
    String sourceObjectType,
    String sourceKey,
    String targetSystem,
    String targetNamespace,
    String targetObjectType);

Queries the target value for a source representation without using the class for the representation. The result is only returned using the return value.

Unlike query, no exception is thrown here if no target value is found.

Methods of the Interface IRepresentation

Method

Use

public String getSystem();

Returns the system for a representation

public String getNamespace();

Returns the namespace for a representation

public String getObjectType();

Returns the object type for a representation

public String getKey();

Returns the value for a representation

Activities

  1. Import the classes of the package com.sap.aii.mapping.key.* to your Java mapping.
  2. Generate an instance of the class KeyMappingService:
  3. KeyMappingService s = KeyMappingService.getInstance();

  4. Using the methods of the generated instance, query a target value for a source value:

Result

You can now use the target value in the target structure.

 

 

 

 

Leaving content frame