Skip to Content

SAP PI 7.1 Mapping Enhancements Series: Parameterized Message Mappings


In SAP NetWeaver Process Integration (PI) 7.1, there is support for using parameters in mapping programs.  In general, the ability to pass parameters to/from mapping programs gives them more flexibility and applicability by allowing for the transfer of values at configuration time (e.g. Integration Directory).  This is similar to the concept of using parameters for a program method or procedure.  Currently, parameterized mappings are supported for:

  • Message Mappings
  • Java Mappings
  • XSLT Mappings


General Properties


Since at runtime time, all PI mappings are accessed via a corresponding operation mapping, parameter bindings must be created in order to connect the mapping program and operation mapping parameters. In addition, the actual parameter values can be set at configuration time within the interface determine of the Integration Directory or by using a transformation step in an integration process or monitoring process.


Import/Export Parameters

Import Parameters – transfer values to mapping

  • Standard functions only allow for import parameters
  • Values can be passed from both interface determinations and transformation steps

Export Parameters – transfer values from mapping

  • Values can only be assigned to export parameters in user-defined functions
  • Values can only be passed using a transformation step and thus, can only be evaluated within integration processes or monitoring processes

Parameter Category

  • Simple Type – parameters in this category are used to transfer simple typed constants (i.e. xsd:string or xsd:integer) that can be used as import or export parameters.
  • Adapter – parameters in this category are used to transfer the channel name that is to be used for mapping lookups. An adapter type (e.g. JDBC, RFC) must in addition be selected.


Using Parameters in Message Mappings

In order to use parameters in message mappings, parameters first have to be defined within the signature tab of the message mapping.


Parameters of message mappings can be passed between both standard functions and user-defined functions. Above there are three parameters defined, two of type import and one of type export. Using the parameter ‘dateDelimiter’ as an example, we can, for example, pass this parameter to the standard function concat as shown below.


This is done by opening the properties of the concat function and then selecting ‘dateDelimiter’ as the parameter to be used for the function. The parameter will only be listed if it has already been defined as a parameter in the Signature tab.




Operation Mapping Parameters and Bindings

The message mapping parameters must be binded to operation mapping parameters as shown below.



Setting Parameter Values in Interface Determination

In the Integration Directory, the values can be set at configuration time in the interface etermination object. Once the operation mapping is specified, parameters defined for the operation mapping will be shown at the bottom of the interface determination screen as shown below.



Setting Parameter Values in Transformation Step of an Integration Process

Values can also be transferred from/to an integration process via a transformation step.


You must be Logged on to comment or reply to a post.
    • Maybe I made it more complex than it is...  hopefully not.  Once you try it, you'll see that it's pretty simple.  Appreciate your thoughts.


      • Hi Jin,

        One stupid question how is it different from defining constant in mapping and defining static parameter and using it mapping.


        • Hi -

          For example, if in a concat function, you use a constant '-' as the delimiter, this is like "hard coding".  But one receiver might want to use '-' but another might want to use '/'.  You can use a parameter for this w/o providing additional logic and using the same mapping.


      • Jin,

        I am trying to apply an input param in an XSLT map using Java enhancement.
        To run the getInputParameters() for the TransformationInput does the transform() method need to be called?
        If so, how to then pass out this InputParameters value from a any “get..”. method called from the XSLT enhancement?

        Any working example of XSLT code with the corresponding Java enhancement class would be very useful.

        -- Kevin.

  • Is there any trick to this for XSLT Mappings as opposed to Graphical Maps?<br/><br/>(I can see get the Header Parameters in XSLT OK like SenderParty, SenderSystem but my own Import Parameters all arrive blank from the Test harness)<br/><br/>Operation Mapping contains a Parameter called MyTestParam of SimpleType xsd:string import <br/><br/>I am using a very simple test case inside XSLT mapping just to inlcude the value in a comment<br/><br/><xsl:variable name="MyTestParam"/><br/><xsl:variable name="SenderSystem"/><br/><br/>And in the output template<br/><xsl:comment><br/> MyTestParam:<xsl:value-of select="$MyTestParam"/><br/></xsl:comment><br/><xsl:comment><br/>  SenderSys:<xsl:value-of select="$SenderSystem"/><br/></xsl:comment><br/><br/>Using the Test tool SenderSystem Header Parameter works but MyTestParam is never filled even though Test Tool prompts for value for it with a ? and I fill it with "MyValue"<br/><br/><!MyTestParam:><br/><!SenderSys:Test_SenderSystem><br/><br/><br/>

  • I have attached some sample code for java first to get parameters. I can only get it to work and access the input parameters & output parameters using the new PI7.1 class AbstractTransformation and not the backwards compatible deprecated implementation StreamTransformation. <br/><br/>The XSLT mapping cannot get to the paarmeters because I can't a handle on where the parameters are... <br/><br/>the only thing I have thought of is to copy the parameters to the DynamicConfiguration section using a Java transformation step first... which is a bit ugly. <br/><br/>Source follows:<br/><br/>(Have really simple MT & DT & SI for basic XML message and transformation copies the input to output) - no config just using Operation Mapopin test tool at his point<br/><br/>bindings are the same for all code samples:<br/>  testparam as an input (and set to the value X)<br/>  testoutparam as an output (in the java only)<br/><br/>New (Working) Java code: (39 lines)<br/><br/>  package test.pi;<br/>  <br/>  import;<br/>  import java.util.;<br/>  import*;<br/> <br/>  public class JavaMapping extends AbstractTransformation  {<br/><br/>  public void transform(TransformationInput in, TransformationOutput out) <br/>      throws StreamTransformationException {<br/><br/>      getTrace().addInfo("ReceiverService as header:" + in.getInputHeader().get("ReceiverService"));<br/>      getTrace().addInfo("testparam as header:" + in.getInputHeader().get("testparam")); //Doesn't work<br/>      getTrace().addInfo("testparam as string param:" + in.getInputParameters().getString("testparam")); // does work<br/><br/>      // copy payload<br/>      copyPayload(in, out);<br/><br/>      // try output parameter<br/>      out.getOutputParameters().setString("testoutparam","testme"); <br/>  }<br/><br/>  private void copyPayload(TransformationInput in, TransformationOutput out) <br/>      throws StreamTransformationException { <br/>         <br/>         InputStream inS = in.getInputPayload().getInputStream();<br/>      OutputStream outS = out.getOutputPayload().getOutputStream();<br/>         int c;<br/>         try {<br/>             c =;<br/>             while (c != -1) {<br/>                 outS.write(c);<br/>                 c =;<br/>             }<br/>         } catch (IOException e) {<br/>             throw new StreamTransformationException(e.getMessage());<br/>         }<br/>     }<br/>  }<br/><br/><br/><br/>Output from test window:<br/><br/>12:20:43 Start of test<br/><br/>     Loaded class test.pi.JavaMapping<br/> <br/>     Call method execute of the application Java <br/>     mapping test.pi.JavaMapping<br/> <br/>     *** START APPLICATION TRACE ***<br/> <br/>     ReceiverService as header:Test_ReceiverService<br/> <br/>     testparam as header:null<br/> <br/>     testparam as string param:X<br/> <br/>     Dynamic config parameters follow:0<br/> <br/>     *** END APPLICATION TRACE **<br/> <br/>     Java mapping test/pi/JavaMapping completed. <br/>     (executeStep() of test.pi.JavaMapping).<br/><br/>    Execution of mapping on server took 57 milli-seconds<br/>    Executed successfully<br/>12:20:44 End of test<br/><br/><br/><br/><br/><br/><br/>Old (deprecated) Java code (47 lines) - doesn't get or set user defined parameters - fine with Std parameters<br/><br/><br/>  package test.pi;<br/>  <br/>  import;<br/>  import java.util.;<br/>  import;<br/> <br/>  public class OldJavaMapping implements StreamTransformation {<br/><br/>  private Map param;<br/><br/>  private AbstractTrace trace = null;<br/><br/>  public void setParameter(Map param) {<br/>      this.param = param;<br/>  }<br/><br/>  public void execute(InputStream in, OutputStream out) <br/>      throws StreamTransformationException {<br/><br/>      trace = (AbstractTrace) param.get(StreamTransformationConstants.MAPPING_TRACE);<br/><br/>      trace.addInfo("ReceiverService as string param:" + param.get("ReceiverService"));<br/>      trace.addInfo("testparam as string param:" + param.get("testparam"));<br/><br/>      // copy payload<br/>      copyPayload(in, out);<br/><br/>      // try output parameter<br/>      param.put("testoutparam","testme"); <br/><br/>  }<br/><br/>  private void copyPayload(InputStream in, OutputStream out) <br/>      throws StreamTransformationException { <br/>         <br/>         int c;<br/>         try {<br/>             c =;<br/>             while (c != -1) {<br/>                 out.write(c);<br/>                 c =;<br/>             }<br/>         } catch (IOException e) {<br/>             throw new StreamTransformationException(e.getMessage());<br/>         }<br/>     }<br/>  }<br/><br/><br/>Results:<br/><br/>12:23:04 Start of test<br/> <br/>     Loaded class test.pi.OldJavaMapping<br/> <br/>     Call method execute of the application Java <br/>     mapping test.pi.OldJavaMapping<br/> <br/>     *** START APPLICATION TRACE ***<br/> <br/>     ReceiverService as string param:Test_ReceiverService<br/> <br/>     testparam as string param:null<br/> <br/>     *** END APPLICATION TRACE **<br/> <br/>     Java mapping test/pi/OldJavaMapping completed. <br/>     (executeStep() of test.pi.OldJavaMapping).<br/><br/>    Execution of mapping on server took 36 milli-seconds <br/>   E xecuted successfully<br/>12:23:04 End of test<br/><br/><br/><br/><br/>Unfortunately the $inputparam for XSLt does not contain the passed parameter. I am testing this all with the Operation Mapping test tab (using the trace output). (It is very much like the old java)<br/><br/><br/>Simple Style sheet (that returns the original document and chucks in some comments - and trace log courtesy of the Java extension)<br/><br/><?xml version="1.0" encoding="UTF-8"?><br/><xsl:stylesheet version="1.0" xmlns:xsl="" xmlns:ns="urn:test" xmlns:java=""><br/>  <xsl:output method="xml" indent="no"/><br/>  <xsl:strip-space elements=""/><br/>  <xsl:variable name="ReceiverSystem"/><br/>  <xsl:variable name="testparam"/><br/>  <xsl:variable name="inputparam"/><br/>  <xsl:template match=""><br/>    <xsl:copy-of select="."/><br/>  </xsl:template><br/>  <xsl:template match="/"><br/>    <xsl:element name="{name()} namesapce="{namespace-uri()}"><br/>      <xsl:comment>testparam:<xsl:value-of select="string($testparam)"/></xsl:comment><br/>      <xsl:comment>ReceiverSystem:<xsl:value-of select="$ReceiverSystem"/></xsl:comment><br/>      <xsl:comment>Javacall test:<xsl:value-of select="java:test.pi.XsltJavaExtension.testcall('test',$inputparam)"/></xsl:comment><br/>      <xsl:copy-of select="."/><br/>    </xsl:element><br/>  </xsl:template><br/></xsl:stylesheet><br/><br/><br/><br/>Java extension (compiled as class): (55 lines)<br/>Note this also skims through Attachments & Dynamic Config and you could ignore that bit<br/><br/><br/>  package test.pi;<br/><br/>  import java.util.;<br/>  import;<br/><br/>  public class XsltJavaExtension {<br/><br/>     private static AbstractTrace trace = null;<br/><br/>     public static String testcall(String myStr, <br/>                                  Map inputparam)<br/>     {<br/>        // Setup to write trace information and write one message<br/>        trace = (AbstractTrace)inputparam.get(<br/>                   StreamTransformationConstants.MAPPING_TRACE );<br/>        trace.addDebugMessage("testcall():\nmyStr = " + myStr);<br/>        <br/>     // check if testparam available as normal input parameter<br/>     trace.addDebugMessage("testparam:" + (String)inputparam.get("testparam"));<br/><br/>     // Loop through all input parameters and echo names to trace<br/>     trace.addDebugMessage("List of inputparam:");<br/>          Set set = inputparam.entrySet (  ) ; <br/>          Iterator iterator = set.iterator (  ) ; <br/>          while (iterator.hasNext()){  <br/>               Map.Entry entry = (Map.Entry); <br/>               trace.addDebugMessage(entry.getKey().toString());<br/>     }  <br/><br/>     // Loop through all DynamicConfiguration just in case it was in there<br/>        DynamicConfiguration conf = (DynamicConfiguration) <br/>                inputparam.get("DynamicConfiguration");<br/>        trace.addDebugMessage("Dynamic config parameters follow:" + conf.size());<br/>        Iterator it = conf.getKeys();<br/>        while (it.hasNext()){  <br/>           DynamicConfigurationKey key = (DynamicConfigurationKey); <br/>           trace.addDebugMessage("dynamic parameter:" + key.getName());<br/>        }<br/><br/>     // Check input attachments<br/>     InputAttachments ia = (InputAttachments) inputparam.get("InputAttachments");<br/>        if (ia == null) {<br/>           trace.addDebugMessage("InputAttachments empty");<br/>        } else {<br/>           if (ia.areAttachmentsAvailable() != true) {<br/>             trace.addDebugMessage("No input Attachments available");<br/>           } else {<br/>              trace.addDebugMessage("Input Attachments available:");<br/>           }<br/>        }<br/><br/>        // return string passed in as input<br/>        return myStr;<br/>     }<br/>  }<br/><br/><br/><br/>Regds Doug.<br/>

  • Hi Jin,

    I have used this feature with normal message mapping & it worked absolutely fine.

    However, when I tried this parameterized feature in multimapping, it shows error at run time.
    Here,I am using a parameter for RFC Look Up during multimapping.At run time, it shows "parameter(XYZ) used for RFC Look Up doesn't exist".

    To add,if I just tested my message mapping(Multimapping) & operation mapping alone(not at runtime),it worked fine there too.

    Please provide info if this feature also supported in multimapping or not for PI 7.1.


      • Thanks a lot Jin for Information.

        I have searched almost all SAP Notes for PI 7.1 before posting here but seems this one was missed out by me 🙂


  • Hi, Jin:

    This is nice blog, but I have some doubts: saying  there are two mapping programs In an OM,, does the export parameter from first mapping program automatically become import parameter of second one ?


  • Hi,
    When I worked with DateTimeStamp mapping with various delimiters like :,-,+ in Interface Determination Its working fine. But when I filled the delimiter as / I am getting the error message as
    Thrown: java.lang.IllegalArgumentException: The value for the input paramter DATEDELIMITER must not be null! at execution.InputParameter.( ~.
    In order to work with the Delimiter /, What should we fill in the Interface Determination parameter value.
    • There shouldn't be a specific limitation for using '/' for a delimiter as far as I know.  The only Note that's somewhat related to this is 1346533, but is not your exact symptom. If the problem persists, please open a customer message with SAP support in case it's a bug.


    • Hi Gabriel,

      I have the exact same issue as we have multiple special characters in over parameters.

      Can you please tell us how you found a work around?

      Thank you,


    • Thanks for your comments.  In a business process?  Not necessarily, but more the purpose of extracting particular values from payload content within ccBPM (integration process).
  • Jin, can the export parameter used as below...?
    assign value to it in transformation step of BPM -> send message sync from BPM -> in the interface determination read this export parameter in operation mapping(in both MM & XSLT) ....??


    • No, afraid not.  Export parameters can only be used within the integration process.  In interface determination, only import parameters can be used.
  • Hi,
       We tried using JDBC Lookup to retrieve data from a DB. But in the message mapping while saving, it throws an error Binding rec0: check update method.
    Can you please suggest on this, how to resolve the issue.


  • Hi Jin,

    we know that we give the RFC parameter in Receiver Determination but when we do transport it to QA these parameters are not getting changed automatically to requried business system. how to over come this.


  • Hello, Jin!

    I am using the Adapter type parameter (RFC channel) for a parameterized Message Mapping.

    Standalone this mapping works fine, but when I am trying to use it in ccBPM - I cannot find the way to specify this parameter for the mapping.

    Is there a restriction for using Adapter type parameters in Integration Processes or you can suggest a workaround?

    Thank you very much,

    • In the integration process, you need to define a "configurable parameter" of adapter type RFC (toggle bottom view).  Later, in the Integration Directory, when you define your integration process there, there should be a place where you can set the parameter for the channel in the Integration Process component – can’t remember exactly, but you should see it.


  • Hello Jin,

    Is there a character limit for the parameters? And any exception for special characters? If yes, any escape sequence characters that need to be employed?