Interface Mapping VS Message Mapping

What is the meaning of Interface mapping and Message mapping in real business?
I think it is something like the difference between the class and object. object is an instance of class.
While talking about the mapping, there are the source interface and target interface. Can two source intefaces map to only one interface, and what about the vs verse? And how about the message mapping?
Thanks a lot

Hi -
First, an Interface Mapping is not only linked with "Message Mappings" (which is the XI term for a mapping created with the XI graphical tool), but any other XI supported mapping type (e.g. XSLT, Java, or ABAP).  So basically, an Interface Mapping is used to link a source interface to a target interface via a mapping (of any of the supported types).  At runtime, you can't have an interface mapping without a mapping and a mapping without an interface mapping - they need each other.
<i>>>>Can two source intefaces map to only one interface, and what about the vs verse? And how about the message mapping?</i>
Yes, the ratio of source to target interfaces are n:m.  In those multiple cases, Multi-Mappings are typically involved as mentioned in the previous post.
Also, remember that in one interface mapping, you are not limited to one mapping.  More than one mapping (of any type) can execute in the sequence you have set up in the Interface Mapping.  However, watch out for performance in these back-to-back(to-back) mappings.

Similar Messages

  • Exchanging data between interface mapping and message mapping possible?

    please have a look at my interface mapping:
    source message -
    mapping programs
    1. Java mapping
    2. XSL mapping
    3. message mapping
    > target message
    in my scenario a Java Class (1) is called for the interface mapping. There, some information ist read from the xml structure. Next, a xslt mapping (2) takes place that strips some information. The remaining data is passed to the message mapping (3)
    The reason for this is that the source message consists of a xml message inside an xml message.
    I am looking for a way to access the informationen gained in step 1 (Java class) in the message mapping (step 3). I was hoping that the global container (used by user-defined function within message mapping) is accessible from the java mapping, but I could not find out how.
    Anybody with some ideas how to pass information from step 1 to step 3? I cannot put the Information in the xml that is passed to the message mapping, because the schema of the inner xml cannot be changed.
    Thanks very much, best regards,

    Hi Wolfgang!
    I have used the "Dynamic Configuration" section in the XI Message header for this issue. You could write something into the Dynamic Configuration Section in step 1 (Java-Mapping) and read it out again in steps 2 or 3. You could use a section for a adapter you are not using in your interface for the real receiver. So if you have a File-Receiver Adapter at the "end" you could use some section of the e.g. SOAP adapter not to interfere with your receiver-adapter when using Dynamic Configuration Settings there ...
    See also:
    Best regards,

  • XI 7.0 passing attributes between java mapping and message mapping

    Hi all,
    Here's a newbie question. There is a scenario where an interface mapping has several stages of java mapping and message mapping
    I would like to know how to set attributes in the java mapping so that it can be accessed in a message map (or vice versa). What I intend to do is pass some information from one mapping to the other so that action can be taken based on the values passed.
    Thank you!

    Another option is storing the values in the message header in the same way as the Adapter-Specific Message Attributes:
    Just use your own name/namespace combination, which is not used in any adapter.
    If possible use the way that Sandro proposed and add the information which you need to additional tags in the payload.

  • Hi , friends pls explain abap mapping and message mapping

    1) pls explain abap mapping and message mapping
       send me screen shorts also.

    Mapping Techniques
    XI provides 3 standard ways of interface mapping between source and target.
    Graphical mapping
    Java Mapping
    XSLT Mapping
    Two more additional mapping types can be activated in XI by making changes to the exchange profile. Those two mappings are
    ABAP mapping
    XSLT mapping with ABAP Extensions
    Graphical Mapping
    Graphical mapping is a common approach followed by everyone for generating desired target structure. It involves simple drag-n-drop to correlate respective nodes (fields) from source and target structure. It hardly involves coding. (Exception - User defined functions). But sometimes with graphical mapping it is difficult to produce required output. For example ... text/html output, namespace change, sorting or grouping of records etc.
    ABAP Mapping
    A person comfortable with Object Oriented ABAP can go for ABAP mapping instead.
    Java Mapping
    Java Mapping uses 2 types of parsers. DOM and SAX. DOM is easier to use with lots of classes to help you create nodes and elements, but , DOM is very processor intensive.
    SAX parser is something that parses your XML one after the other, and so is not processor intensive. But, it is not exaclty easy to develop either.
    XSLT Mapping
    One can also think of Java mapping as another option but it is a bit complex and required knowledge of Java. In such cases, XSLT mapping can be the best approach to meet the requirements.
    A few example cases in which an XSLT mapping can be used:-
    When the required output is other than XML like Text, Html or XHTML (html displayed as XML)
    When default namespace coming from graphical mapping is not required or is to be changed as per requirements.
    When data is to be filtered based on certain fields (considering File as source)
    When data is to be sorted based on certain field (considering File as source)
    When data is to be grouped based on certain field (considering File as source)\
    Advantages of using XSLT mapping
    XSLT program itself defines its own target structure.
    XSLT programs can be imported into SAP XI. Message mapping step can be avoided. One can directly go for interface mapping once message interfaces are created and mapping is imported.
    XSLT provides use of number of standard XPath functions that can replaces graphical mapping involving user defined java functions easily.
    File content conversion at receiver side can be avoided in case of text or html output.
    Multiple occurrences of node within tree (source XML) can be handled easily.
    XSLT can be used in combination with graphical mapping.
    Multi-mapping is also possible using xslt.
    XSLT can be used with ABAP and JAVA Extensions.
    Disadvantages of using XSLT mapping
    Resultant XML payload can not be viewed in SXMB_MONI if not in XML format (for service packs < SP14).
    Interface mapping testing does not show proper error description. So errors in XSLT programs are difficult to trace in XI but can be easily identified outside XI using browser.
    XSLT mapping requires more memory than mapping classes generated in Java.
    XSLT program become lengthier as source structure fields grows in numbers.
    XSLT program sometimes become complex to meet desired functionality.
    Some XSL functions are dependent on version of browser.
    Different types of Mappings
    Message Mapping -> Graphical Design and testing environment. Default Provided By XI. Queue based modelling allow handling or large documents. Extensible via user defined functions
    XSLT Mapping - > Based on openstandard, Portable across application platform, Extensible using user defined functions kewl but disadvantage is Memory overload while handling large documents.
    SAX -> Simple Api For XML. -> Allows you to parse through a XML document. Doesn't consume any memory. But the message can be parsed only once from top to bottom. It Has evolved by contributions made by group of ppl itz a open architecture.
    DOM -> Document Object Model -> Itz designed by W3C. Consumes Memory as the message will be loaded. Allows parsing of document in both way top down and bottom up.
    Send me your email id.Shall send you very good docs for both ABAP Mapping and message mapping.

  • Can we call a Java Map in Message  Map

    Can we call a Java Map in Message  Map
    Thanks and Regards

    Hello Vijay,
    I think this is your code:
    import java.util.Map;
    public class PayloadToXMLField1 implements StreamTransformation {
        String strXML = new String();
       //Declare the XML tag for your XML message
       String StartXMLTag = "<DocumentBody>";
       String EndXMLTag = "</DocumentBody>";
       //String StartXMLTag1 = "<Code>";
       //String EndXMLTag1 = "</Code>";
        AbstractTrace trace;
        private Map param = null;
        public void setParameter(Map param) {
            this.param = param;
        public void execute(InputStream in, OutputStream out) {
            trace =
                (AbstractTrace) param.get(
            trace.addInfo("Process Started");
            try {
                StringBuffer strbuffer = new StringBuffer();
                byte[] b = new byte[4096];
                for (int n;(n = != -1;) {
                    strbuffer.append(new String(b, 0, n));
                strXML = strbuffer.toString();
            } catch (Exception e) {
                System.out.println("Exception Occurred");
            String outputPayload =
             + "<![CDATA["
             + strXML
             + "]]>"
             + EndXMLTag;
            try {
             trace.addInfo("Process Completed");;
            } catch (Exception e) {
                trace.addInfo("Process Terminated: Error in writing out payload");;
    I need this code to be converted in UDF if Java map cannot be called in Message Map.
    Can anyone help me how to write UDF for the same java map.
    Thanks and Regards

  • ABAP Mapping  and Message Mapping

    I want to do the followig mapping
    File - > IDOC
    field1  ->field_idoc1
    field2  ->field_idoc2
    field3  ->field_idoc3
    field4  -> (based on an dictionary table in the R/3)
    For the first 3 fields I will use message-mapping.
    For field4 I heard about ABAP Mapping. Select with the value of field4 in an ABAP Table and response the new value to the mapping back.
    Would both mappings in one Interface-Mapping work?

    Christoph, There was an article previously available in articles section, now i dont find the link.
    I have given a sample code below. You can find lot of sample JCO code provided along with the JCO library that can be downloaded from
    JCO.Repository mRepository;
    JCO.Client mConnection = JCO.createClient(
                   systemNumber );
    // connect to SAP
    // create repository
    mRepository = new JCO.Repository( "sample", mConnection );
    // Create function
    JCO.Function function = null;
    IFunctionTemplate ft = mRepository.getFunctionTemplate("Z_TEST");
    function = ft.getFunction();
    // Obtain parameter list for function
    JCO.ParameterList input = function.getImportParameterList();
    // Pass function parameters
    input.setValue( param1_value , "P_PARM1");
    input.setValue( param2_value , "P_PARM2");
    JCO.ParameterList tabInput = function.getTableParameterList();
    JCO.Table inputTable = tabInput.getTable("T_PARM3");
    inputTable.setValue("test" , "IDOC");
    mConnection.execute( function );
    String ret = function.getExportParameterList().getString( "P_GEN_NUM" );
    return ret ;

  • Enumeration mapping in message mapping

    I have a source structure ABC that contains two fields.  This structure needs to be transformed into two records that will store the field name of the source as well as the value.  It actually creates name/value pair in the target interface.  I wonder if message mapping could possibly handle that. 
    ---FIELD_A = 123
    ---FIELD_B = 456
    ---NAME = "FIELD_A"
    ---VALUE = "123"
    ---NAME = "FIELD_B"
    ---VALUE = "456"
    Chong Wah

    Hi Chong Wah,
    You can use the following java code to solve your problem using java mapping.
    * Created on Sep 14, 2005
    * To change the template for this generated file go to
    * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
    import java.util.HashMap;
    import java.util.Map;
    import java.util.Set;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMSource;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    * @author AnanthBabu Chinnaraj
    * To change the template for this generated type comment go to
    * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
    public class JavaMapping implements StreamTransformation {
         private Map map;
         private Document document;
         DOMSource domS = null;
         Document docOut = null;
         HashMap[] xmlData = null;
          * method setParamters is required, but we do not anything with it
         public void setParameter(Map param) {
              map = param;
          * method execute is called by the XI mapping program
         public void execute(InputStream in, OutputStream out) {
              HashMap[] xmlData = null;
              xmlData = parseInputXML(in);
              createOutputXML(xmlData[0], out);
         public static void main(String args[]) throws Exception {
              try {
                   JavaMapping mapObj = new JavaMapping();
                   FileInputStream in = new FileInputStream("D:/zAnanth/SDN/Src.xml");
                   FileOutputStream out =
                        new FileOutputStream("D:/zAnanth/SDN/Trgt.xml");
                   mapObj.execute(in, out);
              } catch (Exception e) {
          * method to process input xml
          * return array of HashMap for every 'ABC' tag
         public HashMap[] parseInputXML(InputStream in) {
              DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
              try {
                   String tagName = null;
                   String tagValue = null;
                   // create DOM structure from input XML
                   DocumentBuilder builder = factory.newDocumentBuilder();
                   document = builder.parse(in);
                   // look for the tag 'ABC'
                   NodeList list = document.getElementsByTagName("ABC");
                   //Initialize array size
                   xmlData = new HashMap[list.getLength()];
                   for (int i = 0; i < list.getLength(); i++) {
                        Node node = list.item(i);
                        //Initialize hashmap
                        xmlData<i> = new HashMap();
                        //Process Child nodes
                        NodeList childList = node.getChildNodes();
                        for (int j = 0; j < childList.getLength(); j++) {
                             Node childNode = childList.item(j);
                             if (childNode != null) {
                                  if (childNode.getNodeType() == Node.ELEMENT_NODE) {
                                       //Store tag name
                                       tagName = childNode.getNodeName();
                                       //System.out.println("Name  *:"+childNode.getNodeName());
                                       //Store tag value
                                       tagValue = processValueNode(childNode);
                                       //Store as name value pair
                                       xmlData<i>.put(tagName.toUpperCase(), tagValue);
              } catch (Exception e) {
              return xmlData;
         private String processValueNode(Node childNode) {
              String tagValue = null;
              NodeList valueNodesList = childNode.getChildNodes();
              Node valueNode = valueNodesList.item(0);
              if (valueNode != null) {
                   if (valueNode.getNodeType() == Node.TEXT_NODE) {
                        tagValue = valueNode.getNodeValue();
                        //System.out.println("Value #:"+valueNode.getNodeValue());
              return tagValue;
          * Method to create xml document from input hashmaps
          * return XML doc in InputStream
         public void createOutputXML(HashMap xmlData, OutputStream out) {
              try {
                   DocumentBuilderFactory factory =
                   TransformerFactory tf = TransformerFactory.newInstance();
                   Transformer transform = tf.newTransformer();
                   DocumentBuilder builder = factory.newDocumentBuilder();
                   //Create the output DOM
                   docOut = builder.newDocument();
                   //Create Top most Element
                   Element topRoot = docOut.createElementNS("http://XYZ", "ns:MT_ABC");
                   Element defNode = null;
                   Set set = xmlData.keySet();
                   String[] tagNames = new String[set.size()];
                   for (int i = 0; i < tagNames.length; i++) {
                        defNode = createElement("DEF", topRoot);
                        createElement("Name", defNode, tagNames<i>);
                             (String) xmlData.get(tagNames<i>));
                   //Process XML
                   domS = new DOMSource(docOut);
                   transform.transform((domS), new StreamResult(out));
              } catch (Exception e) {
         //Create an Element and add it into Parent
         private Element createElement(String elementName, Element parent) {
              Element ele = docOut.createElement(elementName);
              return ele;
         //Create an Element and Text node and add it into Parent
         private Element createElement(
              String elementName,
              Element parent,
              String value) {
              Element ele = docOut.createElement(elementName);
              return ele;
         //Get Values from Map, if value is null pass empty string
         private String getValue(HashMap map, String tagName) {
              String value = "";
              try {
                   value = (String) map.get(tagName);
                   if (value == null) {
                        value = "";
              } catch (Exception e) {
              return value;

  • Is it possible to copy segment mapping in message mapping??

    Hii Experts,
    I want to duplicate one segment and I want to copy all the mappings of one segment into the other in message mapping.
    Mapping Templete does not work here.
    Anyone knows any other work around ?? The segment contains hell lot of mapping rules and it is difficult to copy each and every rule.
    Thanks in advance.

    Hi shripad
    just try one thing right click on target field which you want to copy and select option copy node ..if it is work then it may.....otherwise i donot think its possible..

  • Difference of FixValues and Value Mapping in Message Mapping

    I would like to know the exact difference between the "FixValues" and Value Mapping. And the Scenarios of usage.
    If i use Value Mappings, value mappings more for fixed values or can they be used for business data that will change ?
    If the flow is from "Non SAP to SAP System" then if i maintain the "Value Mapping Tables" in Message Mapping, Do i need to maintain the same Value Mapping tables on SAP System. If this is the case, it will be over head of maintaining on both sides.
    More thankful if you clarify my doudt.

    your question is best explained in the following link(PDF).
    Its given in the 75th page.
    >>If the flow is from "Non SAP to SAP System" then if i maintain the "Value Mapping Tables" in Message Mapping, Do i need to maintain the same Value Mapping tables on SAP System.
    I think this is not needed.its not needed to maintain value mapping tables in SAP system.
    hope this helps.

  • PI 7.1 Operation mapping - Multiple message mapping - one to many issue

    Dear Experts,
    I am facing this issue in PI 7.1 and I beleive i did similar one in PI 7.0 successfully.
    I have an operation mapping with two message mappings.
    The occurence of source message of operation mapping is 1
    The occurence of target message of operation mapping is 0..unbounded
    Corresponding i configured two message mappings
    For message mapping-1
    Source message occurence = 1  and Target message occurence = 1
    For message mapping-2
    Source message occurence = 1  and Target message occurence = 0...unbounded
    When i test message mappings individually they are working good. But when i test it in operation mapping, the operation mapping is not it is not able to convert single occurence output of message mapping -1 to the second message mapping-2.
    Any suggestions?

    The message that i get when testing in operation mapping:
    Runtime Exception when executing application mapping program com/sap/xi/tf/_MM_MessageMapping_1_; Details:; Cannot create target element /ns0:MT_MessageMapping_1_TargetMessageType/RECORDSET. Values missing in queue context. Target XSD requires a value for this element, but the target-field mapping does not create one. Check whether the XML instance is valid for the source XSD, and whether the target-field mapping fulfils the requirement of the target XSD
    My question is, has somebody mapped similar scenario in your environment? If yes, can you please provide details.
    Operation mapping :  1 to 0..unbounded
    Message Mapping1: 1 to 1
    Message Mapping2: 1 to 0...unbounded

  • XSLT-Mapping oder Message Mapping (grafisches Mapping)?

    which mapping type is the best? xslt oder message mapping?

    In terms of perfromance , XSLT is supposed to be very bad and is to be avoided whenever possibl.e
    Graphical Mapping is the best when it comes to performance of the mapping.
    But , there are a few features, which are not possible using graphical in which case you might have to go for JAVA/ ABAP / XSLT mapping.

  • Hierarchical structure to Flat Structure mapping in Message mapping

    Hi Experts,
       I need to map the below hierarchical segments of SHPMNT03 IDOC XML to  repitative stucture G_SHL of 857 EDI XML.
    Segments from IDoc.
    E1EDL24(Delivery Line Item)
    E1EDL44(IDoc: Handling Unit Item Delivery) for Pack)
    Required Target Segment:
    ITEM HL (PART A)                       
    Please let me know how to achive this.
    I tried to achive this by changing the context of the target field, but in that case I am loosing the sequence. I get all delivery together, all Item this.Please tell me how to retain the sequence.
    Please reply ASAP.
    Thanks in advance,

    Hi Sushama,
    Could you be bit more elaborative on the problem. What exactly is the error ?? what is the source/target structure ? with this information one would be able diagnose the scenario assist you!!!

  • Quantity Mapping in Message mapping

    I have the below mapping conditions...
    Create for every quantity related to billcode and Sponsorcode.  If there is no quantity, create segment with quantity 0.
    How to map this?  Please help how to map this clearly...
    Thanks in advance..

    This can be solved by using the node function mapWithDefault. Since your quantity is 0..1, you can use a logic that looks like this
    quantity --> mapWithDefault: 0 --> target
    Please take note that for the mapWithDefault to work, there should be no context manipulations in your quantity field.
    Hope this helps,

  • Message mapping crashes only in INterface Mapping

    hi guys,
    i have an issue with one of my interface mapping. the message mapping crashes when i run the interface mapping. however when i run the message mapping separately it works fine.
    any hints?

    Hi Ali,
    If you are using try catch then in case of catch condition if you pass null to substring it will fail.. Either you call the substring inside your udf (so that you can make sure that the filename is available then only substring is called) else handle the null condition in message mapping before calling substring...
    Also you can try looking into the display queue entry for substring in Message Mapping for further analysis. Here also you will not get any filename by dynamic configuration, but i am not sure why it was not failing there.. May be display queue will help you.

  • Data &message types,message interface, interface&message mapping

    I am very new to XI, i want to know about
    1) Data Types
    2)Message Types
    3)message interface
    4) interface mapping
    5)message mapping
    i am totally confused with eachother, can you please give me the clear definitions for these things

    Hi Pradeep,
    A data type is a basic unit for defining the structure of the data for a message type and, as a result, for the message to be exchanged
    ->A data type is a basic unit for defining the structure of the data for a message type and, as a result, for the message to be exchanged.
    A data type is an XML Schema Definition (XSD). This definition determines how the valid payload of a message will look. Data types in XML schema are only an abstract description of a structure that you can assign to elements in an XML schema definition. A message type or a fault message type that references a data type determines the name of the root element of a message.
    Ref link
    2)Message Types
    A message type comprises a data type that describes the structure of a message. At the following points in SAP Exchange Infrastructure you can refer to the message to be exchanged at runtime by using the message type:
    ·        More than one message interface can use the same message type. For example, an asynchronous outbound message interface and an asynchronous inbound message interface can reference the same message type because the request message does not need to be mapped.
    ·        When defining a message mapping you can directly reference message types to map messages from an outbound interface to messages from a receiver interface.
    3)message interface
    You use a message interface to describe a platform-independent or programming-language-independent interface, which you want to use to exchange messages between application components using SAP Exchange Infrastructure.
    4) interface mapping
    Interface mappings register your mapping program for an interface pair in the Integration Repository.
    5)message mapping
    A message mapping refers to a mapping of messages and is supported by a graphical mapping editor. The editor enables you to design a structure mapping between any two XML structures and connect to a value mapping.
    Follow these Ref Link for all answers...

Maybe you are looking for

  • Output of data in one row

    Hi, I have 1000 records that are coming in a column one after the other below in different rows. I require these records to come in a single row, with a comma after each record. how to do this ?

  • I can't have a simple 4 digits passcode on my iPhone 5

    Hi everyone! Here is the issue I'd like you to help me with: I got a new iPhone off Apple and when I restored it from my last backup, my iPhone made me chose a passcode using letters. That was weird as I've always used a simple 4 digits passcode.. An

  • How to add "Product Unit" while entering a new price for a product?

    Hi All, I recently created a product in CRM.(in web ui)  .Then I navigated to the Price assignment block anc clicked on New.In that under the "rate" heading there is a field "Product Unit" for which I have no value in search help maintained..Now, how

  • Update 10.1 - Cannot sort by track numberTrack number header

    My album tracks are now all sorted alphabetically. I try to click the track number header and it doesn't work. All the other headers work, but not the track number header. So now all my albums have their tracks in the wrong order and I can't get them

  • IE version certified for

    We are currently running OBIEE I am trying to figure out the latest version of Internet Explorer that is certified for this release. I believe it is I.E. 8, but my question is...what is the latest version of I.E. 8 that is certified for OBI