Message split - XML to IDOCs - (1:n) mapping

I have to split an incoming XML(in idoc DEBMDM format) from MDM to 2 Idocs (ADRMAS & DEBMAS).
Target message set to occurences "0:unb".
Have tested my graphical-mapping in IR and its working fine. Tested the configuration and got error in IB.
In SXMB_MONI i find the error message,
- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
  <SAP:Category>XIServer</SAP:Category>
  <SAP:Code area="OUTBINDING">CO_TXT_MMF_ENGINETYPE</SAP:Code>
  <SAP:P1 />
  <SAP:P2 />
  <SAP:P3 />
  <SAP:P4 />
  <SAP:AdditionalText />
  <SAP:ApplicationFaultMessage namespace="" />
  <SAP:Stack>Messages in multi-message format can only be sent to one Adapter Engine</SAP:Stack>
  <SAP:Retry>M</SAP:Retry>
  </SAP:Error>
Read in few threads about creating a "custom adapter module"...is this right? if so.... how to proceed ?
Appreciate any help.

Ram,
Message Split using Graphical Mapping that ur using now supports adapter which are on same J2EE engine .
In ur case Ur trying to post IDOCS ( I suppose ) which is not
   supported in using Graphical mapping.
U need to change the design.
-- Kavitha

Similar Messages

  • Message Split -- File to Idoc Scenario  -  ( Without BPM )

    I have multiple records coming to XI in a File and I have to create Multiple Idocs to R/3.
    Due to Complexity of mapping I'm splitting Maaping step into 2 message Mappings.
    A-->B
    B-->C
    In the 2nd Mapping step  I'm doing message Split meaning for each Source record I'm creating multiple Idocs ( To be precise each record on the source becomes 4 idocs in the Target.
    2nd Mapping step is as follows
    Source 1..1
      Sourcerecord 0.. Unbounded
        field1  0..1
        field2  0..1
        filed3  0..1
    Target
    Message 1
        Idoc   1.. Unbounded
          Idoc Structure..
    Message 2
          Idoc   1.. Unbounded
    Message 3
          Idoc   1.. Unbounded
    Message 4
          Idoc   1.. Unbounded
    So based on some criteria each record of Source will be mapped to 4 Messages (  1 each under each Message )
    Is it possible to do this without BPM?. Iam sending all these Idocs to same R/3 System.
    Thanks for any help..RK

    Hi,
    See the blog
    /people/michal.krawczyk2/blog/2005/12/04/xi-idoc-bundling--the-trick-with-the-occurance-change
    <i>Basicly we have 2 ways of handling such scenarios:
    - we can use a block step and send multiple IDOCs from our BPM
    - we can also do a little trick and send multiple IDOCs from the XI without a BPM
    The first approach is a standard XI approach. It involves the use of a BPM
    so the speed of this transfer many not be very good in case you'd like to send
    hundreds or thousands of IDOCs in just one call.
    The second approach uses a little trick that was mentioned several times
    on the XI Froum by a number of XI developers but is still not very clear to the XI newbies.
    It allows us to send multiple IDOCs without the use of a BPM. Most probably this will be your choice
    if you'd like to use such 1:N (IDOCs) scenarios effectively.</i>
    Please see the bwlow threads also..
    IDOC Splitting
    File To IDOC Thru XI
    Multi-Mappings in BPM (XI 3.0)
    Please let me know , your prob..is solcev or not..
    Regards
    Chilla..

  • Message split via BPM Status stays TBDL

    Hi to all,
    I have a Scenario with a BPM.
    In the IntegrationProcess (IP_Split), is a mapping with message splitting.
    The result von the Mapping are serveral Proxymessages and a var count, that counts the new Messages.
    After, i have a loop over the messages an with the receiverdetermination i send the new messages to the SAP-System.
    the Scenario works fine. in SXI_MONITOR it looks great.
    There is only one Problem:
    When i go to the Integration Engine in the Message Monitoring (Runtime Workbench) there is a strange Message.
    There is a Message with SenderService and ReceiverService IP_Split. The Status is still TBDL.
    Can anybody help me?
    Thanks
    Chris

    Hi,
    Few months ago we had also problems with "locked user" in XI, in our case XIAPPLUSER was sometimes (b)locked.
    Perhaps note:
    721548 Changing the passwords of the XI 3.0 service users
    will help you.
    We removed and entered the service users again, with the password in CAPITALS and language blank.
    After that our problem was solved, I hope yours too.
    Regards
    Jack

  • Message splitting-- Queue stopped when no message created for one interface

    Hi all,
    I think you saw one post regarding this issue in SDN, but I can't find the post any more.
    So, I have message splitting (it's multiple mappings to map one outbound msg to multip inbound msgs, not one mapping to map 1 to n. This is because of our own reason, but should not affect the analysis of the issue) to split one message to multiple. It works fine if the outbound message contains data for every inbound interface. However if the outbound message does NOT contain data for any one inbound message, there is an error in MONI and all subsequently splitted messages will not be passed in IE. The error in MONI says Split mapping created no messages, and Queue status turns to be Queue Stopped, and thus all the subsequently splitted messages are stuck in the queue.
    Why this? and how to solve this problem?
    Thanks
    Jayson

    >
    Jayson wrote:
    > Hi all,
    >
    > I think you saw one post regarding this issue in SDN, but I can't find the post any more.
    >
    > So, I have message splitting (it's multiple mappings to map one outbound msg to multip inbound msgs, not one mapping to map 1 to n. This is because of our own reason, but should not affect the analysis of the issue) to split one message to multiple. It works fine if the outbound message contains data for every inbound interface. However if the outbound message does NOT contain data for any one inbound message, there is an error in MONI and all subsequently splitted messages will not be passed in IE. The error in MONI says Split mapping created no messages, and Queue status turns to be Queue Stopped, and thus all the subsequently splitted messages are stuck in the queue.
    >
    > Why this? and how to solve this problem?
    >
    > Thanks
    > Jayson
    Hi Jyson,
    what i analyse from this is you may be using different maapings and different inbound interfaces
    but your receiver is the same and hence you are using only one interface determination with all the   interface mappings specified there...
    if this is the case..i suggest you remove the "maintain order at runtime "
    tick in that interface detemination and it will surely work
    giving points is another way to say thanks
    Edited by: Tarang Shah on Mar 20, 2009 7:18 PM

  • Splitting XML string as separate fields in message mapping

    Hi Experts,
    I am getting XML string in one field from source message, i need to separate those fields and map it to target fields.
    Sorce message:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:test_source xmlns:ns0="urn:gp:prototype">
       <Document>
          <store>3021</store>
          <date>2011-03-24</date>
          <type>3002</type>
          <till>32</till>
          <transaction>1478</transaction>
          <data><![CDATA[<buy><merchantID>006001007031992</merchantID><laneID>29</laneID><referenceID>PP0323095107</referenceID><localDate>2011-03-2302:00</localDate><localTime>09:51:0702:00</localTime></buy>]]></data>
       </Document>
    </ns0:test_source>
    Target Message:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:test_target xmlns:ns0="urn:gp:prototype">
       <item>
          <storeID>3021</storeID>
          <businessdate>2011-03-24</businessdate>
          <Typecode>3002</Typecode>
          <workstation>32</workstation>
          <SeqNum>1478</SeqNum>
          <XX>006001007031992</XX>
          <YY>29</YY>
          <PP>PP0323095107</PP>
          <QQ>2011-03-23+02:00</QQ>
          <RR>09:51:07+02:00</RR>
       </item>
    </ns0:test_target>
    Can anyone please suggest me how can we do this???

    You can easily do both using standard function or simple udf
    Use indexOf  and substring to achieve this...
    Simple UDF
    String var1="><![CDATA<buy><merchantID>006001007031992</merchantID><laneID>29</laneID><referenceID>PP0323095107</referenceID><localDate>2011-03-23+02:00</localDate><localTime>09:51:07+02:00</localTime></buy>]>";
    String search = "<merchantID>";
    if(var1.indexOf(search) != -1){
    int pointer = var1.indexOf(search);
    return var1.substring(pointer+12, pointer+27);
    }else{
    return "";
    similarly for laneid
    search ="<laneID>";
    if(var1.indexOf(search)!= -1){
       int pointer = var1.indexOf(search);
        return var1.substring(pointer+8,pointer+10);
    }else{
       return "";                         
    Same way you can do for all the elements creating seperate method for each element or just use standard function to achieve this.
    Edited by: Baskar Gopal on Mar 24, 2011 10:13 AM

  • XI have to break/split XML-File into N times a XML Message

    Hello,
    Can anyone help with this one. I guess this is not an easy exercise but I need to solve it urgently.
    XI gets a XML-file from a system.
    This file has N times a element <XBT>.
    Every time XI gets such a file the number of <XBT> is different.
    XI haves to break this xml into N xml messages according to element ><XBT> in order to send them to Sap sequentially.
    For example the following XML file have to split up into 2 xml files (the elements XBT occurs 2 times)
    How can this be done?
    <mt_BubaBestand>
    <b><XBT></b>
      <Algemeen>
         <Verkooporganisatie>5000</Verkooporganisatie>
         <Distributiekanaal>50</Distributiekanaal>
         <Productgroep>50</Productgroep>
         <Ordernummer>123123</Ordernummer>
         <Verkoopgroep/>
         <Documentdatum>20061207</Documentdatum>
         <Medewerker_nr>e60217</Medewerker_nr>
         <Medewerker_naam>Hermans</Medewerker_naam>
         <CRM_nr/>
         <CIFDedicated/>
         <Klantgroep/>
      </Algemeen>
    <b></XBT></b>
    <b><XBT></b>
      <Algemeen>
         <Verkooporganisatie>5000</Verkooporganisatie>
         <Distributiekanaal>50</Distributiekanaal>
         <Productgroep>50</Productgroep>
         <Ordernummer>123123</Ordernummer>
         <Verkoopgroep/>
         <Documentdatum>20061207</Documentdatum>
         <Medewerker_nr>e60217</Medewerker_nr>
         <Medewerker_naam>Hermans</Medewerker_naam>
         <CRM_nr/>
         <CIFDedicated/>
         <Klantgroep/>
      </Algemeen>
    <b></XBT></b>
    </mt_BubaBestand>

    This is pretty standard procedure if you are posting these messages to R/3.  As was pointed out in the weblogs above, when using IDocs you don't need to do any tricky configuration.  Just make sure that your XML structure is set correctly (ie:  1 to unbounded, etc) to the limits that you want, and XI will automatically loop the mapping process for each instance of the <XBT> item that it detects in the source message.  You mentioned:
    <i>For example the following XML file have to split up into 2 xml files (the elements XBT occurs 2 times)</i>
    Well, you don't actually split it into two XML files per say, XI just processes the source message straight to multiple IDocs using the IDoc adapter.

  • Multi-Mapping Message Split 1:n

    Hi experts,
    I have a few questions regarding a multi-mapping for a 1:n message split. I have a business process which collects IDOCs from a specific IDOC type (ZHINVOIC01).
    I have a 1-to-1 Mapping for collecting the IDOCs.
    After this 1-to-1 Mapping the IDOC has the following structure:
    xdoc has the occurrence 0..unbounded
    For every IDOC in the source structure one xdoc in the target structure should be created. My Mapping works very fine, but I have one question. If there are more IDOC-Elements in the source structure, I have more xdoc-Elements in the target structure. But I do not want to have one target-message. the mapping should create one file with the element xdoc for every IDOC element in the source structure.
    I want to send a xml-file for each xdoc-element to a ftp-server. is that possible?
    Thanks and best regards
    Christopher Kühn

    Hi Udo,
    look at my example above:
    for the source structure
    <Messages>
       <Message1>
          <ZHINVOIC01>
             <IDOC/>
             <IDOC/>
             <IDOC/>
          </ZHINVOIC01>
       </Message1>
    </Messages>
    I have the following target structure:
    <Messages>
       <Message1>
          <xdoc/>
          <xdoc/>
          <xdoc/>
       <Message1>
    <Messages>
    now the target structure is only one message, isn't it?
    But I want to have for this case 3 Messages each with only one xdoc-element.
    I hope that we are not talking at cross-purposes
    Thanks and best regards
    Christopher

  • Message split on adapter engine for the java based IDoc adapter

    Hi Guys,
    Do you know if message split on adapter engine is available for the java based IDoc adapter on the single stack (PI 7.31)?
    I'm getting such exception when I try to post 3 IDocs
    Transmitting the message to endpoint <local> using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.idoc.exception.IDOCAdapterException: Error before sending due to idoc parsing error: (7) IDOC_ERROR_PARSE_FAILURE: Invalid XML 1.0 character encountered within IDocXML for type <ns0:Messages>:
    state=EXPECTING_IMMEDIATE_TAG_END, charPosition=68, lineNumber=1, columnNumber=69, invalidChar=U+0078,
    sourceSnippet=...UTF-8" standalone="no"?><ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge"><ns0:Message1><...
    ^
    Mapping is one to many.
    Each IDoc content has been compared manually against the xsd schema and it was fine.  
    I know that old way of modifying xsd is still possible.
    Best regards,
    Wojciech

    Did you find a solution to this? Having a similar error right now.
    Thanks and kind regards
    Jens

  • Message splitting using java mapping and BPM

    Hi all,
    I have a PLAIN FILE to IDOC Scenario.
    We decide to use javamapping instead of message mapping because we have several hierachical structures.
    We has more than one IDOC for file. And the mapping it's unable to detect the another header and create it at XI.
    I had seen:
    /people/michal.krawczyk2/blog/2005/12/04/xi-idoc-bundling--the-trick-with-the-occurance-change
    "XI: IDOC bundling - the "trick" with the occurance change"
    But the problem it's we doesn't use mapping programs, so we can't apply to this case.
    So now i need to create a BPM scenario for resolve this issue. Anyone knows any example for split the income message and send any idocs to destination?
    Thanks in advance,

    IT WORKED !!!!
    The only thing it's at out code line we must improve it in another way.
    For everyone who needs to resolve, i copy the code line of the java mapping program.
    The relationship is from the specific mapping for every scenary calling GenToHierMap.
    0.0.0.0.0.0.0.0.0.0.0.0.1. GENERIC PACKAGE (GenToHierMap)
    0.0.0.0.0.0.0.0.0.0.0.0.2.
    package com.sap.javaMapping;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.util.Map;
    import java.util.Vector;
    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 javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import org.w3c.dom.Text;
    import com.sap.aii.mapping.api.StreamTransformation;
    public class GenToHierMap
         private Element root, idoc;
         private Element nodeArrayRef[];
         private String nodeArrayTagName[];
         private Relation  rel ;
         private int  stack_count ;
         private String nameSpace;
         private String separator="#!";
         protected String msgName;
         GenToHierMap(InputStream in, OutputStream out,Vector v1,String msgName1,String nameSpace1)
         msgName = msgName1;
         nameSpace = nameSpace1;
         rel = new Relation(v1);
         execute(in,out);
        public void execute(InputStream in, OutputStream out)
              Element e ;
              Relation cur_rel;
              DOMSource domS = null;
              Element keyNodeParent;
              //int numdocs;
              try
                           DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
                           factory.setNamespaceAware(true);
                             TransformerFactory tf = TransformerFactory.newInstance();
                             Transformer transform = tf.newTransformer();
                             // Create DOM structure from input XML
                             DocumentBuilder builderel = factory.newDocumentBuilder();
                             Document docIn = builderel.parse(in);
                            NodeList rows = docIn.getElementsByTagName("ROW");
                            nodeArrayTagName = new String[rows.getLength() + 1];
                            nodeArrayRef = new Element[rows.getLength() + 1];
                             Document docOut = builderel.newDocument();
                             root = docOut.createElement(msgName);
                             docOut.appendChild(root);
                             //idoc = docOut.createElement("IDOC");
                             //root.appendChild(idoc);     
                            //Número de documents inicialitzat a 0
                            //numdocs=0;
                            //Per cada filera ROW
                       for (int count=0;count<rows.getLength();count++)
                                  String dataRecord = "";
                                  Node node = rows.item(count);
                                  node = node.getFirstChild();
                                  dataRecord = node.getNodeValue();
                                  String fieldValue [] = dataRecord.split(separator);
                                  //Cada cop que es troba una nova capçalera es crea un nou document.
                                  //Això permet que hi hagi més d'un IDOC per missatge processat.
                                  if (Integer.valueOf(fieldValue[0]).intValue()==1){
                                       //numdocs = numdocs + 1;
                                       //if (numdocs > 1){
                                            //Es dona sortida al document anterior abans de crear-ne un de nou - BE AWARE BECAUSE IN THE NEXT LINES WE DEFINE THE UNBOUNDED IDOC ATTRIBUTE, WITH BEGIN = 1 ****
                                            //transform.transform((domS),new StreamResult(out));
                                            //docOut = builderel.newDocument();
                                            //root = docOut.createElement(msgName);
                                            //docOut.appendChild(root);
                                            idoc = docOut.createElement("IDOC");
                                            idoc.setAttribute("BEGIN","1");
                                            root.appendChild(idoc);     
                                  cur_rel = (Relation) rel.v.get(Integer.valueOf(fieldValue[0]).intValue());                    
                                  String keyId = cur_rel.node;
                                  keyNodeParent = searchNode(keyId);
                                  nodeArrayTagName[count] = keyId;
                               e = docOut.createElement(keyId);
                                  e.setAttribute("SEGMENT",fieldValue[0]);
                               nodeArrayRef[count]= e;
                              keyNodeParent.appendChild(e);
                              createXmlTree(docOut,e,keyId,fieldValue);
                              domS = new DOMSource(docOut);
                              stack_count = stack_count + 1;
                         transform.transform((domS),new StreamResult(out));
           catch (Exception t)
                  t.printStackTrace();
    return;
    //returns the parent of the given node
    private Element searchNode(String keyId)
         Relation cur_rel;
         for (int i=0;i<rel.v.size();i++)
              cur_rel = (Relation) rel.v.get(i);
              if (cur_rel.node.equals(keyId))
                     for (int j=0;j<cur_rel.parents.length;j++)
                              if (cur_rel.parents[j].equals("NULL")) return root;
                              if (cur_rel.parents[j].equals("IDOC")) return idoc;
                               for (int k=(stack_count-1);k>=0;k--)
                                   for (int p=0;p<cur_rel.parents.length;p++)
                                       if (nodeArrayTagName[k].equals(cur_rel.parents[p]))
                                       return nodeArrayRef[k];
    return null;
    //Creates all the elements of the given node
    private void createXmlTree(Document docOut,Element node,String keyId, String fieldValue[])
          Element tagName;
          Text tagValue;
          Relation cur_rel;
          for (int i=0;i<rel.v.size();i++)
                     cur_rel = (Relation) rel.v.get(i);
                     if (cur_rel.node.equals(keyId))
                        for (int j=1;j<cur_rel.elements.length;j++)
                           tagName = docOut.createElement(cur_rel.elements[j]);
                           node.appendChild(tagName);
                           if ( j < fieldValue.length  && fieldValue[j].length() != 0 )
                           if ( fieldValue[j].substring(0,1).equals("""))
                           if ( fieldValue[j].length() > 2 )
                           fieldValue[j] = fieldValue[j].substring(1,( fieldValue[j].length() - 1 ));
                           else
                           fieldValue[j] = new String ();
                           if ( j >= fieldValue.length )
                           tagValue = docOut.createTextNode(new String());
                           else
                           tagValue = docOut.createTextNode(fieldValue[j]);
                           tagName.appendChild(tagValue);
                        return;
    //Main thread of execution
    0.0.0.0.0.0.0.0.0.0.0.0.1. SPECIFIC ONE
    0.0.0.0.0.0.0.0.0.0.0.0.2.
    package com.sap.javaMapping;
    * Mapping Program to Convert NOM IDOC Master Structure to the Generic structure Expected by
    * the FTP Receiver adapter
    import com.sap.aii.mapping.api.*;
    import java.io.*;
    import java.util.Map;
    import java.util.Vector;
    import javax.xml.parsers.*;
    import javax.xml.transform.*;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.*;
    import org.xml.sax.*;
    //Specify the Hirearchial Structure
    public class INT938_mapping implements StreamTransformation
         public Vector v;
        private Map map;
        /** * 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 buildXsd()
      Relation  mriRel ;
      v = new Vector();
      /* INICI MODIFICACIÓ ESTRUCTURA DE SORTIDA DEL MAPPING */
      // --> TOCAR AQUEST NODE IMPLICA MODIFICAR EL CÒDI!!!
      mriRel = new Relation();
      mriRel.parents = new String[1];
      mriRel.node =  "IDOC" ;
      mriRel.parents[0] =   "NULL" ;
      v.add(mriRel) ;
      /* ESTRUCTURA DEL IDOC DE SORTIDA */
      //NODE - 01
      mriRel = new Relation();                          
      mriRel.parents = new String[1];                                                    
      mriRel.elements = new String[22];                                                                 
      mriRel.node = "E1BPEBANC";                                    
      mriRel.parents[0]   =   "IDOC";                                              
      mriRel.elements[0]  =   "SEGMENT";   
      mriRel.elements[1]  =   "PREQ_ITEM"; 
      mriRel.elements[2]  =   "DOC_TYPE";  
      mriRel.elements[3]  =   "PUR_GROUP"; 
      mriRel.elements[4]  =   "CREATED_BY";
      mriRel.elements[5]  =   "PREQ_NAME"; 
      mriRel.elements[6]  =   "PREQ_DATE"; 
      mriRel.elements[7]  =   "SHORT_TEXT";
      mriRel.elements[8]  =   "MATERIAL";  
      mriRel.elements[9]  =   "PLANT";     
      mriRel.elements[10] =   "STORE_LOC";
      mriRel.elements[11] =   "TRACKINGNO";
      mriRel.elements[12] =   "MAT_GRP";   
      mriRel.elements[13] =   "QUANTITY";  
      mriRel.elements[14] =   "UNIT";      
      mriRel.elements[15] =   "DELIV_DATE";
      mriRel.elements[16] =   "ACCTASSCAT";
      mriRel.elements[17] =   "DES_VENDOR";
      mriRel.elements[18] =   "PURCH_ORG"; 
      mriRel.elements[19] =   "BATCH";     
      mriRel.elements[20] =   "VEND_MAT";  
      mriRel.elements[21] =   "CURRENCY";
      v.add(mriRel) ; 
      //NODE - 02
      mriRel = new Relation();                                   
      mriRel.parents = new String[1];                                                    
      mriRel.elements = new String[2];                                                                  
      mriRel.node = "Z1SOLCOM";                                    
      mriRel.parents[0]  =   "E1BPEBANC";                                                     
      mriRel.elements[0] =   "SEGMENT";  
      mriRel.elements[1] =   "ZPO_NUMBER";
      v.add(mriRel) ;
      //NODE - 03
      mriRel = new Relation();                                   
      mriRel.parents = new String[1];                                                    
      mriRel.elements = new String[3];                                                                 
      mriRel.node = "E1BPEBKN";                                    
      mriRel.parents[0]  =   "IDOC";                                                   
      mriRel.elements[0] =   "SEGMENT";
      mriRel.elements[1] =   "PREQ_ITEM";   
      mriRel.elements[2] =   "COST_CTR";
      v.add(mriRel) ;
      //NODE - 04
      mriRel = new Relation();                                   
      mriRel.parents = new String[1];                                                    
      mriRel.elements = new String[8];                                       
      mriRel.node = "Z1SOLRES";                                    
      mriRel.parents[0]  =   "E1BPEBKN";                                                   
      mriRel.elements[0] =   "SEGMENT";            
      mriRel.elements[1] =   "DADES_PACIENT";      
      mriRel.elements[2] =   "NOHIS";              
      mriRel.elements[3] =   "ZNINTER";            
      mriRel.elements[4] =   "ZFEIMP";             
      mriRel.elements[5] =   "NMPAC";              
      mriRel.elements[6] =   "ZNLOTE";             
      mriRel.elements[7] =   "ZNSERIE";            
      v.add(mriRel) ;
      /* FI    MODIFICACIÓ ESTRUCTURA DE SORTIDA DEL MAPPING */
    public void execute(InputStream in, OutputStream out) throws com.sap.aii.mapping.api.StreamTransformationException
         INT938_mapping rel = new INT938_mapping();
         rel.buildXsd();
         new GenToHierMap(in,out,rel.v,"ZPREEX01","http://namespace1/namespace");
    public static void main (String[] args) throws Exception
              try
                   INT938_mapping rel = new INT938_mapping();
                   FileInputStream in = new FileInputStream ("C:/DOM_IN.xml");
                   FileOutputStream out = new FileOutputStream ("C:/DOM_OUT.xml");
                   rel.buildXsd();
                   new GenToHierMap(in,out,rel.v,"ZPREEX01","http://namespace1/namespace");
              }catch(Exception e) {e.printStackTrace();}
    //Transformation of flat structure to hirearchial structure
    Any issue you can contact me. Best regards and reward points !

  • Message Split Comes Before Mapping

    Hi,
    Can anybody explains the following queries....
    1.Why Message Split Comes Before Mapping in Pipeline Steps?
    2.What do you mean by Collaborative Profile and Collaborative Agreement?
    3.What are Context Path, Context Object and Context Handling?
    4.Which adpaters run on j2ee engine and which run on ABAP stack.
    5.What is the need of datatype when we are creating the message type
    6. and similarly what is the use of Business system when we are creating the corresponding Technical system
    Thanks n Advance.,
    Stallin

    >>1.Why Message Split Comes Before Mapping in Pipeline Steps?
    Simple. Imagine you have 2 receivers with different mappings. If this has to work correct, XI needs to copy of the source msg for doing the mapping. rite?
    >> 2.What do you mean by Collaborative Profile and Collaborative Agreement?
    Collaborative profile -->Serivce with out party and service and all the commn channels you create for it.
    Collaborative agreement -->Sender & Receiver agreements, that bind your cc with the interface.
    >> 3.What are Context Path, Context Object and Context Handling?
    Context path- It is Xpath expressions I guess. It is used for specifying conditions in receiver determination and interface determination.
    Context Objects -- Used for the same.It reduces the complex Xpath expressions.
    >>4.Which adpaters run on j2ee engine and which run on ABAP stack.
    All adapters are part of j2ee frame work except IDOC and HTTP adapters. You dont need sender agreements for the 2.
    5.What is the need of datatype when we are creating the message type
    To get the valid XML structure.
    6. and similarly what is the use of Business system when we are creating the corresponding Technical system
    Tech systems -->Physical entiteis
    Buss Systems --> Logical entities.
    Regards,
    Jai Shankar
    Message was edited by:
            Jai Shankar

  • File to Idoc (message split)

    Hi Gurus,
    I have a incoming xml file which is split into multiple debmas idoc for ecc.
    In message-mapping, message-tab
    source message occurance is set as '1' and target is set with "0...unbound"
    On target:idoc
    There is NO mapping for Messages and Message1 nodes. DEBMAS06 is mapped to source-field to create as many idocs. IDOC has NO map and BEGIN is set as constant(1).
    When i run the test, my result is as below: (NO Idoc)
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
    <ns0:Message1></ns0:Message1>
    </ns0:Messages>
    When i ran the scenario with a test-file, got following error message:
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Call Adapter
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>XIAdapter</SAP:Category>
      <SAP:Code area="IDOC_ADAPTER">ATTRIBUTE_IDOC_RUNTIME</SAP:Code>
      <SAP:P1>MSGGUID C834F5D4235B44BD373F9F12AA5B0674: Tag found instead of tag IDOC BEGIN=</SAP:P1>
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>Error: MSGGUID C834F5D4235B44BD373F9F12AA5B0674: Tag found instead of tag IDOC BEGIN=</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>

    Hi,
    IDOC multimapping (it's called bundling) is supported please fallow that Michal's blog:
    [/people/michal.krawczyk2/blog/2005/12/04/xi-idoc-bundling--the-trick-with-the-occurance-change|/people/michal.krawczyk2/blog/2005/12/04/xi-idoc-bundling--the-trick-with-the-occurance-change]
    You need to modify the xsd definition. It works perfect. E.g. in my company we are splitting 1000 idocs in one run.
    Best regards,
    Wojciech

  • Idoc(receiver) message splitting using BPM

    Hi,
    could you provide some blogs which is useful for Idoc (as a Receiver) message splitting (1:N scenario) using BPM.
    I have gone thru some of the Blogs, i didn't find good one according to this scenario.
    Thanks
    Praba

    Hi Michal,
    Thanks for ur reply.
    You said " if you have one message and want to have multiple IDOCs
    there is no need for a BPM -
    you just need to change IDOC occurance - that's all"
    I agree to your point.
    My scenario is more or less same but "With single message , i need to generate multiple Idocs" based on synchronous proxy response from R3. That is the reason we already gone with BPM.
    Already i used the BPM in my interface due to req.  It was working. Earlier i was posting single Idoc to R3 with multiple Header segment (each Header segment has one quantity)
    Now due to req. change, for each single quantity (quantity is my source Message Type field), i need to post single Idoc to R3  if i get response from R3.
    My XI version PI 7.0 SP14
    Idoc structure:
       <xsd:attribute name="SEGMENT" type="xsd:string" fixed="1" use="required"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
       </xsd:complexType>
    - <xsd:complexType name="WPUWBW.WPUWBW01";>
    - <xsd:annotation>
       <xsd:documentation>POS interface: Upload goods movements</xsd:documentation>
       </xsd:annotation>
    - <xsd:sequence>
      <xsd:element name="EDI_DC40" type="EDI_DC40.WPUWBW.WPUWBW01"; />
       <xsd:element name="E1WPG01" type="WPUWBW01.E1WPG01"; minOccurs="0"
       maxOccurs="9999999999" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
       </xsd:sequence>
       <xsd:attribute name="BEGIN" type="xsd:string" fixed="1" use="required"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
       </xsd:complexType>
       </xsd:schema>
    Already I am using this Idoc structure in various interfaces also. If i edit the occurance of the this Idoc and import in External definition with same name, I feel it afffect mapping in other interfaces also.
    Inputs are highly appreciated.
    Edited by: Prabaharan Rangasamy on May 22, 2009 4:14 PM

  • 1:N mapping - One EDI document (ST-SE) to be split into multiple idocs

    Hello Experts,
    I am working on a scenario where the source is an EDI 204 document. Now in this document, the L11 segment has a count of the total number of items in the source EDI document.
    ISA
    ST
    L111110BC   <------- 2 is the number of OIDs that can appear
    OID*1
    LADCAS3****BL84985197CGZZAM000521*122
    LAD******CCCC12345678COCO12345678PMPM123456
    OID*2
    OID*910
    OID*911
    OID*1110
    SE148744
    IEA
    Now both the OIDs are in a single ST-SE EDI document. The requirement is that if the number of OID segments exceed 910 in a single document, then the output needs to be split with one idoc containing 910 items (OID, LAD, LAD...). The next set of 910 OIDs (from OID*911 onwards)need to be output into a new idoc.
    The header part for both the idocs would be the same. Only the detail part would differ for the next set of OID, LAD segments.
    I do not intend to use BPM. I want to achieve this using using graphical mapping.
    Awaiting your replies.
    Thank you
    Vincent

    Hi Vincent,
    1:n Multi mapping can be used for that. Please refer to the following link for how to implement a message split using multi mapping.
    http://help.sap.com/saphelp_nw04/helpdata/en/26/9e97b0f525d743882936c2d6f375c7/frameset.htm
    Honestly speaking, I have never tried using that myself. But after seeing your post I am now keen to develope a similar interface. Will let you know if I am successful.
    Regards,
    Suddha

  • Problem with Mulit Mapping/Message Split

    Hi,
    I am a newbie to XI trying to set up a file2file scenario with multi-mapping/message splitting without BPM.
    System is XI 3.0 SP14
    Scenario is:
    read an XML-File and multiply it and write 2 XML-files using the File adaptor.
    For reference I used "multimapping without BPM".
    - setting occurancy of Message types to unbounded in both Message Mapping and Interface Mapping.
    - using the RB_Split button
    - setting up one business service containing 2 message interfaces and 2 communication channels for output.
    Designing and Konfiguring worked fine.
    File is read but no file is written.
    XML-Moni tells me "Mapping did not create Messages" 
    I did extensive studies in sap.help, forum and various blogs. Also to verify Messagetypes and Kommunication channels I set up similar file2file scenario without splitting. Nothing really helped.
    Any clues?

    Hi again,
    very efficient method to test XML-source file. - Thanks.
    Unfortunately it did not solve my problem.
    Again: "Split mapping did not create messages"
    Below you can find a part of the trace created when processing this message:
    <Trace level="3" type="T">Multi mapping required.</Trace>
      <Trace level="3" type="T">Creating Java mapping com/sap/xi/tf/_MM_data_duplic_async_.</Trace>
      <Trace level="3" type="T">Load ac6179b0-a92e-11da-be15-e51f0a000472, http://MyTutorial/SHeinz05, -1, com/sap/xi/tf/_MM_data_duplic_async_.class.</Trace>
      <Trace level="3" type="T">Search com/sap/xi/tf/_MM_data_duplic_async_.class (http://MyTutorial/SHeinz05, -1) in swcv ac6179b0-a92e-11da-be15-e51f0a000472.</Trace>
      <Trace level="3" type="T">Loaded class com.sap.xi.tf._MM_data_duplic_async_</Trace>
      <Trace level="2" type="T">Call method execute of the application Java mapping com.sap.xi.tf._MM_data_duplic_async_</Trace>
      <Trace level="2" type="T">Java mapping com/sap/xi/tf/_MM_data_duplic_async_ completed. (executeStep() of com.sap.xi.tf._MM_data_duplic_async_</Trace>
      <Trace level="3" type="T">Nachrichtentyp 1 Anzahl der Nachrichten 0</Trace>
      <Trace level="3" type="T">Nachrichtentyp 2 Anzahl der Nachrichten 0</Trace>
      <Trace level="1" type="E">CL_XMS_PLSRV_MAPPING~ENTER_PLSRV</Trace>
      </Trace>
    - <Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_LOG_TO_PERSIST">
      <Trace level="3" type="T">Persisting message after plsrv call</Trace>
      <Trace level="3" type="T">Message-Version = 005</Trace>
      <Trace level="3" type="T">Message version 005</Trace>
      <Trace level="3" type="T">Pipeline CENTRAL</Trace>
      </Trace>
      <Trace level="3" type="System_Error">Error exception return from pipeline processing!</Trace>
      <Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_TO_PERSIST" />
    - <!--  ************************************
      -->
      <Trace level="3" type="T">Persisting message Status = 014</Trace>
      <Trace level="3" type="T">Message version 006</Trace>
      <Trace level="3" type="T">Pipeline CENTRAL</Trace>
      </SAP:Trace>
    Test of MM and IM is always successful.
    Any clues?

  • IDOC Message Splitting with Logic

    Hi,  I have a business requirement for IDOC to IDOC mapping where the incoming IDOC line item should be split in to multiple line items based on a field value and also the resulting IDOC will be split in to multiple IDOCs based on a limitation on the number of line items. Without using BPM, have anybody used SAP XI to efficiently perform the above logics with proper check logics and error controls ? Appreciate your responses.

    Hi Raj,
    Try this:
    You can use Split by Value node function and set the properties of the split by value as: Each Value.So the for every different number,different item will be created.
    Using the Node Functions you can solve your problem.
    1.SplitByValue:
    The SplitByValue() function is the counterpart to removeContexts(): Instead of deleting a context, you can insert a context change in the source value queue. You then receive this element for each inserted context change instead of a top node element. However, for this to be possible, the top node source field must be assigned a top node target field and minOccurs must be >0. You can insert a context change in the queue after each value, after each change to the value, or after each tag without a value.
    2.RemoveContexts:
    You use removeContexts () to delete all the top contexts for an element. This removes all top hierarchy levels, so that all elements of the target queue are assigned to a root element of the source queue.
    Advanced user-defined functions can import either just one context into the input arrays, or complete queues. Make your selection by selecting or deselecting the Save Entire Queue in Cache checkbox in the function editor.
    3.CreateIf:
    CreateIf node function is used to create a node if true value is passed to it otherwise suppress it.
    4.collapseContext
    To remove the context in between the value and transfer only one value at a time
    5.useOneAsMany
    First Input:
    The value which is needed to be repeated.
    Second Input:
    It defines how many times the first input should be repeated.
    Third Input:
    It define when the context should be changed (on the basis of the required output
    Please go through the given link hope it will be helpful to you.
    /people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii
    Message Mapping Simplified – Part II
    /people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii
    Replication of Nodes Using the Graphical Mapping Tool
    /people/claus.wallacher/blog/2006/04/17/replication-of-nodes-using-the-graphical-mapping-tool
    Message Splitting Using the Graphical Mapping Tool
    /people/claus.wallacher/blog/2006/06/29/message-splitting-using-the-graphical-mapping-tool
    Also check this weblogs:
    /people/sravya.talanki2/blog/2005/08/16/message-mapping-simplified--part-i
    /people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii
    Split by value
    http://help.sap.com/saphelp_nw04/helpdata/en/21/3bb8c495125e4eb5969f0377885fe0/content.htm
    For value mapping check this video presentation and weblog:
    /people/sreekanth.babu2/blog/2005/02/23/value-mapping-replication
    /people/community.user/blog/2007/01/08/valuemapping-using-the-graphical-mapping-tool
    https://www.sdn.sap.com/irj/sdn/docs?rid=/webcontent/uuid/110ff05d-0501-0010-a19d-958247c9f798#xi [original link is broken]
    /people/claus.wallacher/blog/2006/04/17/replication-of-nodes-using-the-graphical-mapping-tool
    Function formatByExample:
    /people/sundararamaprasad.subbaraman/blog/2006/02/21/real-example-for-formatbyexample
    Split by value, remove context and collapse context:
    /people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii
    Reward points if this helps
    Regards
    Pragathi.

Maybe you are looking for

  • How can I block a wifi signal that is overtaking my connection?

    I am having a problem with a new network detected by all my apple products-iPhone 4s, MacBook Pro running lion and older g4 I book running snow leopard. The network Is called NOTFREE and had two signals - one secured and one unsecured that says guest

  • Photoshop CC 2014: lost advance tab in menu Archive file info

    Hi to all. Recently I install Photoshop CC 2014, and I can't find the advance tab in the window "File Info" inside the Archive Menu, when I choose it. did we lost this tab in CC2014? Can I find this "advance" tab in other menu into Photoshop CC 2014?

  • Conditional formatting in Webi report

    Hi, I have a  requirement wherein I need to conditionally format column to make the coulmn value "red colored"  as per a certain condition and also need to display a small image next to the column value. Does anybody have an idea to achieve this? Tha

  • Email Accounts Fail

    iPhone 4 , Verizon I've had this iPhone about 2 1/2 weeks. I have several email accounts with Verizon & Gmail. I had no trouble setting up these accounts in my iPhone, but after a few days only the Verizon accounts quit responding using wi-fi or  3G.

  • Mac Mini boot issue after reinstalling original RAM

    Hi, So i am having issues with my 2012 Mac Mini i5 with 4gb of RAM(2x2Gb).  I wanted to upgrade my RAM and unfortunately i keep getting stuck at the Apple logo screen with the progress/loading bar.  The bar gets up to around 40-50% and then my mini j