Start of Content Area

Function documentation Parameterized Java Mappings  Locate the document in its SAP Library structure


Parameterized Java mappings enable you to increase the number of possible applications for a Java mapping. By defining an appropriate interface, you can query values from or to the Java mapping program.

See also: Parameterized Mapping Programs


To be able to access Java mapping parameters at runtime, in the binding of the operation mapping, define the relevant Java mapping parameters:

This graphic is explained in the accompanying text

You define the Java mapping parameters for a Java mapping program when you create the binding, and at the same time connect them to operation mapping parameters. When you access the Java mapping parameters in the Java mapping program, the mapping runtime checks whether you have defined the parameters in the Enterprise Services Repository. If not, an exception is raised.



       1.      Create an operation mapping and reference the source and target interfaces. You also have the option of exporting the XSD schema of the request and response messages if you want to develop your Java mapping externally (see: Operation Mappings).

       2.      When you implement the Java mapping program, you access the mapping program parameters by using a mapping API (see also: Java-Mapping):


public class Parametrization_Java
   extends AbstractTransformation {

      public void transform(
         TransformationInput in,
         TransformationOutput out)
      throws StreamTransformationException {

         try {
// Read Import Parameters

            String paramS =
            int paramI =
            Channel paramC =

// Use Parameters during Mapping
// ...

// Set Export Parameters

                  .setString(“PARAM_ES”, [String-Wert]);
                  .setInt(“PARAM_EI”, [Integer-Wert]);
                  .setValue(“PARAM_EC”, [java.lang.Object]);

         } catch (Exception e) {
            // Exception Handling


When you develop the Java mapping programs, maintain a list of these parameters so that you can enter them later in the binding of the operation mapping.


You also have the option of creating the mapping program parameters before you implement them in the operation mapping (see steps 3 to 6).

       3.      To create the necessary operation mapping parameters, choose Parameters. You can use an operation mapping import parameter to transfer values to multiple mapping program import parameters. Note that multiple mapping program export parameters cannot be connected to the same operation mapping export parameters.

       4.      Import your Java mapping program to the Enterprise Services Repository (see: Imported Archives (XSLT/Java)) and then reference the parameterized Java mapping program from your operation mapping.

       5.      In the table in frame Mapping Programs, locate the row in which you have entered your message mapping program. Choose This graphic is explained in the accompanying text in column Binding to define a binding.

       6.      In the table in the subsequent window, enter the required mapping program parameters for your Java mapping. In the second column, assign the operation mapping parameters to the mapping program parameters you entered. By doing so, you define both the binding and the type of the mapping program parameters.

       7.      Save and activate your operation mapping.

       8.      Assign values to the parameters:

       Use an interface determination in the Integration Directory (import parameters only).

       Use a transformation step of an integration or monitoring process (import and export parameters).






End of Content Area