Accessing SAP:HopList element in message header from JAVA-mapping

Dear Experts,
Is it possible to access the SAP:HopList element from message header in JAVA-mapping? 
I need this to get the list off all receivers of current message (I have a ReceiverDetermination with two receivers, without any conditions, so both receivers are receiving each message and in InterfaceDetermination to one of the receivers I have a JAVA-mapping, in which I need to know the name of another receiver. And the SAP:HopList is containing this information).
Or maybe where is some other solution?
Best Regards,
Artsiom Anichenka

That's tricky, since the proper way of doing it would be through BPM.
Anyway, if you expose your XI interface as a WebService (Soap sender cc) you could access it through Mapping Lookup (lookup works for RFC, DB and Soap lookups). Check https://help.sap.com/javadocs/NW04S/current/pi/index.html
But be aware that Mapping Lookup API is not intended for inserts/updates (since it doesn't contain any transacational handling), just mere lookups (selects in tables), so I'm not sure it is the best approach for your case.
Regards,
Henrique.

Similar Messages

  • Call another Message Interface from Java Mapping

    Hi Gurus!!
    I have designed a Java Mapping that does a Socket Connection. Before send the response of the Java Mapping, I have to send information to our SAP System.
    I have see in a blog that I can call a RFC from the Java Mapping, but my doubt is, can I call another Message Interface designed on XI?
    Thanks and regards,
    Manuel Míguez.

    That's tricky, since the proper way of doing it would be through BPM.
    Anyway, if you expose your XI interface as a WebService (Soap sender cc) you could access it through Mapping Lookup (lookup works for RFC, DB and Soap lookups). Check https://help.sap.com/javadocs/NW04S/current/pi/index.html
    But be aware that Mapping Lookup API is not intended for inserts/updates (since it doesn't contain any transacational handling), just mere lookups (selects in tables), so I'm not sure it is the best approach for your case.
    Regards,
    Henrique.

  • No messages created from split mapping - Multimapping

    Hi,
    Getting the error in MONI saying that : No messages created from split mapping
    Sender is :
       <Purchase>
                <Number>007</Number>
                <Desc>RAJ</Desc>
                <Quantity>half</Quantity>
       </Purchase>
    Target should be 3 files such as:
      <Purchase>
                <Number>007</Number>
                <Desc>RAJ</Desc>
       </Purchase>
    <Purchase>
                <Number>007</Number>
                <Quantity>half</Quantity>
      /Purchase>
    <Purchase>
                 <Desc>RAJ</Desc>
                <Quantity>half</Quantity>
    </Purchase>
    Regards,
    Y.Raj.

    Hi,
    In your mapping select the cardinality of source message as 0..1 while that of target message should be 0..unbounded.
    Also since you are not using all the elements of source into all the target messages (seems using only two source elements in each target msg) do the mapping accordingly...i doubt whether you can achieve your requirement in one mapping itself....may be you will have to follow what Tarang mentioned:
    3. have 3 mappings between source structure and MT1(map only num,dec), source struc and MT2(map num,Qty) ....
    Exception to above statement:)
    If you set the target cardinality as 0..unbounded then duplicate the root target node thrice (as per your requirement)....and then map each target section seperately....
    Regards,
    Abhishek.
    Edited by: abhishek salvi on Apr 7, 2009 9:12 AM

  • No messages created from split mapping

    Hello,
    My Scenario is JDBC to Proxy and there is  1:n Mapping
    I had done the multi mapping and done the all the necessary configuration in the MM, IM and ID
    I tested the payload in the MM and IM and it is working fine.
    But while iam doing the end to end testing in the ID --- Test Configuration,It is showing the error at Interface Determinmation and Mapping step.
    In SXMB moni, iam getting error as
    - <!--  Request Message Mapping
      -->
    - <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="MAPPING">GENERIC</SAP:Code>
      <SAP:P1>No messages created from split mapping</SAP:P1>
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>No messages created from split mapping</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    The below is my source payload.
      <?xml version="1.0" encoding="utf-8" ?>
    - <ns:mt_vendor_fusiondb xmlns:ns="http://loreal.com/poc_vendor">
    - <row>
      <ID>1</ID>
      <LIFNR />
      <NAME1>SriTest</NAME1>
      <PSTLZ>07066</PSTLZ>
      <LAND1>USA</LAND1>
      <TELF1>1234567890</TELF1>
      <Status>READY</Status>
      <LastUpdated>2008-11-20 09:20:00.0</LastUpdated>
      </row>
    - <row>
      <ID>2</ID>
      <LIFNR />
      <NAME1>GilderTest</NAME1>
      <PSTLZ>07066</PSTLZ>
      <LAND1>USA</LAND1>
      <TELF1>1234567890</TELF1>
      <Status>READY</Status>
      <LastUpdated>2008-11-20 09:20:00.0</LastUpdated>
      </row>
    - <row>
      <ID>3</ID>
      <LIFNR />
      <NAME1>KarthikTest</NAME1>
      <PSTLZ>07066</PSTLZ>
      <LAND1>USA</LAND1>
      <TELF1>1234567890</TELF1>
      <Status>READY</Status>
      <LastUpdated>2008-11-20 09:20:00.0</LastUpdated>
      </row>
      </ns:mt_vendor_fusiondb>
    Please help me in resolving this error
    Srinivas

    Hi Carlos,
    Now my message mapping is working, the error is in the messagetype i declared 'row' as capital letters,due to this in the runtime it is erroring out in the request message mapping.
    But still I had one more issue,iam getting error in Technical routing, the error is
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Technical Routing
      -->
    - <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 be sent to one adapter engine only</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    In the ID i checked the radio button extended.
    But still iam getting the above error.Can you guide me in resolving the error

  • No messages created from split mapping   error .....

    HI XI Friends..
    In My XML to RFC scenario,,
    i am doing message splitting withput BPM.
    in message mapping ..i changed target message occurance to unbounded
    and same i did in interface mapping also..
    static test is OK..creating multiple target messages in static test.
    in interface determination,using enhanced option i given interface mapping.
    file is picking but in SXMB_MONI ...i am getting error like this
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Request Message Mapping
      -->
    - <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="MAPPING">GENERIC</SAP:Code>
      <SAP:P1>No messages created from split mapping</SAP:P1>
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>No messages created from split mapping</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    please guide me..
    regards
    ram

    Hi Ram,
    Check these..
    Split mapping created no messages
    Message Split without BPM - Error
    cheers,
    Prashanth
    P.S Please mark helpful answers

  • How to send SMS ( Short Message Service ) from java code

    Hi
    How to send SMS ( Short Message Service ) from java code.
    Thanks
    Gaurav

    Do you need to receive SMS? If you need to receive SMS, you will need to host your own GSM device or modem so that people can send you SMS.
    If not, you can just use internet SMS gateways like clickatell as mentioned above will do the work, and post to them by HTTP, XML or email. The cost is about 6-8 cents per SMS. There are cheaper services, but not always reliable. If you need to host your own GSM device, you can use software like http://www.kannel.org (GPL Open Source) or http://www.visualgsm.com. Alternatively, you may obtain a shortcode from your Telco - but these come with monthly subscription of maybe one or two hundreds.
    Regards,
    Joshua
    <SMS Gateway>@Expert

  • Read Filename form Adapter-Specific Message Attributes in Java Mapping

    Hi,
    I have scenario File to Mail adapter. How can i read filename from Adapter-Specific Message Attributes
    in java mapping.
    Thank you and Best regards
    Fernand

    Hello Fernand,
    Are u using DOM or SAX parser?
    In any case just put the Dynamic config code in the execute function or the other option is to define it as a private functionand call it in the execute,My personal advice would be the former.
    Just put this code in ur java mapping
    As fellow sdn ers have mentioned there is no need of the container method,just initialise the set param method and use it in the dynamice config code as follows
    public class YourClass implements StreamTransformation
         private Map map;
    public void setParameter(Map param)
         map = param;
    public void execute(InputStream in, OutputStream out) throws StreamTransformationException
                   DynamicConfiguration conf =(DynamicConfiguration) map.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
                   DynamicConfigurationKey KEY_FILENAME =DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    // read value
    File = conf.get(KEY_FILENAME);
    Now just call File in the mapping program,
    Should help u out 
    Regards,
    Tauseef

  • Start and stop the Communication channel from Java Mapping

    How to start and stop the Communication channel from Java Mapping in XI 3.0
    Scenario  PI - > MQ -> Third Party web application 
    Web application is down and then Communication channels are stop manually .  
    We need to automate this process,
    MQ Solution - Trigger will be set in MQ which will be called when web application is stopped
    Trigger will send u201CSTOP u201C message to PI
    How to configure PI scenario to stop different com channels when this message received ?

    check this link: http://help.sap.com/saphelp_nw04/helpdata/EN/45/0c86aab4d14dece10000000a11466f/frameset.htm
    make sure that MQ send http request to PI. i dont think a configuration scenario is required in PI. Only roles should be enabled with proper user provided to MQ team.
    However, for security reasons, you can configure a scenario if you dont want to expose PI infrastructure directly to 3rd parties.

  • Query another message payload from graph mapping program

    Hi all,
    I have the following scenario
    Third Party Business System -> XI -> ECC 5.0
    Third Party sends ORDER to ECC and ECC answers with ORDRSP
    When mapping ORDRSP.ORDERS05 to Third Pty format, I need to use info that the Third Party provided us on the ORDERS.
    So... I have to query the ORDERS message payload from ORDRSP message mapping program.
    Any ideas?
    My first idea deal with doing an RFC lookup to search the ABAP Database for this info (my ABAP background raises ) but I'd like to know if there is a more elegant and efficent way of doing this.
    regards,
    David R.

    Hi,
    Let's try again to explain myself with my poor english!
    Time frame
    A) TPart system sends order. XI maps to ORDERS.ORDER05 idoc and is forwarded to ECC.
    B) In ECC users modify Sales order and then triggers the outbound ORDRSP.ORDERS05.
    C) XI has to map ORDRSP.ORDERS05 and include some info (in fact the original message) that was sent in step B).
    The xmls from TPart could be (simplified version):
    Orders (step A)
    <?xml version="1.0" encoding="iso-8859-1">
    <document>
      <header>
      </header>
      <Items>
      </Items>
      <Items>
      </Items>
      </Header>
    </Document>
    The received XML on step C) could be something like this:
    <?xml version="1.0" encoding="iso-8859-1">
    <Document>
      <PurchaseOrder_from_vendor>
      <i>Here I have to include the whole xml sent in step A</i>
      </PurchaseOrder_from_vendor>
      <SalesOrder_from_customer>
      <i>Here the ORDRSP.ORDERS05 mapping stuff</i>
      </SalesOrder_from_customer>
    </Document>
    All the communication will be always async.
    Any ideas?
    regards,
    David R.

  • How to send response message from Java mapping class? Please help!

    Hi Experts,
      I have a sync scenario
              -Req-->  -
    >
    SOAP           XI       RFC
              <Res--     <-----
      The Req message contains:
      <Order>
           <Orderid>100</Orderid>
           <Desc>Extrenal Order</Desc>
           <Qty>2500</Qty>
      </Order>
      Response message is:
      <Log>
         <LogTxt>Qty value cannot be more than 3 chars</LogTxt>
      </Log>
      In the XI I have to validate the input request message using a schema. For this I am writing a java mapping program using aii_map_api.jar.
    My requirement is that If the input message schema validation fails then I want to send a response message back to sender.
      How can I send a response message back to the sender in java mapping program?
    Kindly help with sample code example.
    Thanks
    Gopal

    Hi,
    First, I think PI 7.1 has this functionality and perhaps it comes in a SP for PI 7.0 and XI 3.0.  So first have a look at that before creating custom development.
    Second, if you use the java mapping, you will only have access to a request or response message.  I would advise using a custom java module in the module processor and insert this message in the sender communication channel.  This will allow you to validate request and send a response.
    Regards,
    Yaghya

  • Accessing EJB from Java Mapping

    Hi all,
    I developed an EJB, deployed it to the J2EEServer via Visual Administrator. When I do a lookup from outside (NWDS) with the JNDI Name I gave it, everything works fine.
    Now I have to use this EJB in a Java Mapping. I do the same --> lookup and narrow with PortableRemoteObject and so on.
    But the problem is that I always get an java.lang.NoClassDefFoundError for the home interface.
    Any ideas?
    Thanks a lot
    Olli

    Hello.
    Check my wiki article:
    http://wiki.sdn.sap.com/wiki/display/stage/SapNetweaverProcessIntegration.CallEjb3.0methodfromJavaclassmappingPI7.1
    (SapNetweaver Process Integration. Call Ejb 3.0 method from Java class mapping PI 7.1)

  • 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 !

  • RFC response from Java mapping

    Guys,
    I am RFC response in my java mapping as &lt & &gt. Any ideas why and how we can make it to get in xml < > format. The problem is parser does not identify this format.
    &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&lt;rfc:BAPI_COMPANYCODE_GETDETAIL.Response xmlns:rfc=&quot;urn:sap-com:document:sap:rfc:functions&quot;&gt;&lt;COMPANYCODE_ADDRESS&gt;&lt;ADDR_NO&gt;&lt;/ADDR_NO&gt;&lt;FORMOFADDR&gt;&lt;/FORMOFADDR&gt;&lt;NAME&gt;&lt;/NAME&gt;&lt;NAME_2&gt;&lt;/NAME_2&gt;&lt;NAME_3&gt;&lt;/NAME_3&gt;&lt;NAME_4&gt;&lt;/NAME_4&gt;&lt;C_O_NAME&gt;&lt;/C_O_NAME&gt;&lt;CITY&gt;&lt;/CITY&gt;&lt;DISTRICT&gt;&lt;/DISTRICT&gt;&lt;CITY_NO&gt;&lt;/CITY_NO&gt;&lt;POSTL_COD1&gt;&lt;/POSTL_COD1&gt;&lt;POSTL_COD2&gt;&lt;/POSTL_COD2&gt;&lt;POSTL_COD3&gt;&lt;/POSTL_COD3&gt;&lt;PO_BOX&gt;&lt;/PO_BOX&gt;&lt;PO_BOX_CIT&gt;&lt;/PO_BOX_CIT&gt;&lt;DELIV_DIS&gt;&lt;/DELIV_DIS&gt;&lt;STREET&gt;&lt;/STREET&gt;&lt;STREET_NO&gt;&lt;/STREET_NO&gt;&lt;ST R_ABBR&gt;&lt;/STR_ABBR&gt;&lt;HOUSE_NO&gt;&lt;/HOUSE_NO&gt;&lt;STR_SUPPL1&gt;&lt;/STR_SUPPL1&gt;&lt;STR_SUPPL2&gt;&lt;/STR_SUPPL2&gt;&lt;LOCATION&gt;&lt;/LOCATION&gt;&lt;BUILDING&gt;&lt;/BUILDING&gt;&lt;FLOOR&gt;&lt;/FLOOR&gt;&lt;ROOM_NO&gt;&lt;/ROOM_NO&gt;&lt;COUNTRY&gt;&lt;/COUNTRY&gt;&lt;LANGU&gt;&lt;/LANGU&gt;&lt;REGION&gt;&lt;/REGION&gt;&lt;SORT1&gt;&lt;/SORT1&gt;&lt;SORT2&gt;&lt;/SORT2&gt;&lt;TIME_ZONE&gt;&lt;/TIME_ZONE&gt;&lt;TAXJURCODE&gt;&lt;/TAXJURCODE&gt;&lt;ADR_NOTES&gt;&lt;/ADR_NOTES&gt;&lt;COMM_TYPE&gt;&lt;/COMM_TYPE&gt;&lt;TEL1_NUMBR&gt;&lt;/TEL1_NUMBR&gt;&lt;TEL1_EXT&gt;&lt;/TEL1_EXT&gt;&lt;FAX_NUMBER&gt;&lt;/FAX_NUMBER&gt;&lt;FAX_EXTENS&g t;&lt;/FAX_EXTENS&gt;&lt;/COMPANYCODE_ADDRESS&gt;&lt;COMPANYCODE_DETAIL&gt;&lt;COMP_CODE&gt;0001&lt;/COMP_CODE&gt;&lt;COMP_NAME&gt;SAP A.G.&lt;/COMP_NAME&gt;&lt;CITY&gt;Walldorf&lt;/CITY&gt;&lt;COUNTRY&gt;DE&lt;/COUNTRY&gt;&lt;CURRENCY&gt;EUR&lt;/CURRENCY&gt;&lt;LANGU&gt;D&lt;/LANGU&gt;&lt;CHRT_ACCTS&gt;INT&lt;/CHRT_ACCTS&gt;&lt;FY_VARIANT&gt;K4&lt;/FY_VARIANT&gt;&lt;VAT_REG_NO&gt;&lt;/VAT_REG_NO&gt;&lt;COMPANY&gt;&lt;/COMPANY&gt;&lt;ADDR_NO&gt;&lt;/ADDR_NO&gt;&lt;COUNTRY_ISO&gt;DE&lt;/COUNTRY_ISO&gt;&lt;CURRENCY_ISO&gt;EUR&lt;/CURRENCY_ISO&gt;&lt;LANGU_ISO&gt;DE&lt;/LANGU_ISO&gt;&lt;/COMPANYCODE_DETAIL&gt;&lt;RETURN&gt;&lt;TYPE&gt;W&lt;/TYPE&gt;&lt;CODE&gt;FN021&lt;/CODE&gt;&lt;MESSAGE&gt;Address data not found for company code 0001&lt;/MESSAGE&gt;&lt;LOG_NO&gt;&lt;/LOG_NO&gt;&lt;LOG_MSG_NO&gt;000000&lt;/LOG_MSG_NO&gt;&lt;MESSAGE_V1&gt;0001&lt;/MESSAGE_V1&gt;&lt;MESSAGE_V2&gt;&lt;/MESSAGE_V2&gt;&lt;MESSAGE_V3&gt;&lt;/MESSAGE_V3&gt;&lt;MESSAGE_V4&gt;&lt;/MESSAGE_V4&gt;&lt;/RETURN&gt;&lt;/rfc:BAPI_COMPANYCODE_GETDETAIL.Response&gt;

    If you check Michal's guide on RFC Loopkup, it also comes with &lt; and &gt; chars.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/801376c6-0501-0010-af8c-cb69aa29941c#search=%22site%3Asdn.sap.com%20lookup%20rfc%22
    What happens if you output this string directly to output stream? I think XI will be able to understand it as a XML. Then, you could execute another mapping program to parse this XML and get the fields you want. In a same interface mapping, you can use more than one mapping programs.
    Regards,
    Henrique.

  • Is it possible to call XSLT from Java Mapping Class?

    Hi,
    does someone have experience with this? Or any ideas?
    And, if yes, how can be this XSLT called? Is it necessary to specify special path? Or it is the XSLT file placed in the same directory?
    Thanx in advance, Peter
    Message was edited by: Peter Jarsunek

    Hi SUdhir,
    Thanx 4 your answer. I have seen this link before, but there is only Java->Java or XSLT->Java calling.. I need Java->XSLT.. When I create Java mapping, I want to use stored XSLT stylesheet to convert the message. Because, my problem is,that my primary message contains characters which I want to be changed. For this reason I need java class - to replace the characters. And then I want to do transformation with the XSLT stylesheet. Can you post some example?
    Thanx, Peter

  • Terminate Message processing From UDF/mapping

    i think u will be checking the condition first if its false then u will be raising alert.
    wat u can do is when the condition fails u set the flag to false and send the output of UDF to ifwithoutelse statement and becuase of which ur mapping will not be processed.
    u have to do it at root node level and u have to supress the target node when the condition fails.
    chirag

    wat exactly r u doing?
    U have to first check all the condition at root level only before message get processed, based on that result u will stop the processing of message at the target end.
    u ahve to set the falg in UDF and accordingly u need to suppress the target root node.
    chirag

Maybe you are looking for

  • Component image not getting displayed in Portal

    Hi All, I have added a jpg image to MIME folder in my component and used it as source for Image UI and also as a separator in Breadcrumb. When I run this web dynpro application in portal, the image is not getting rendered. I am getting cross mark ins

  • Multi room Dvr with other dvr problem

    I recently upgraded my fios internet from 20/5 to 150/65.  I also upgraded my mdvr to a new unit, and my other 2 set top boxes to dvr's and added 2 more dvr's...  So a total of 5 dvr's and one of those acting as a mdvr. The tech spent 13 hours trying

  • HT201317 How do I include all photos in photo stream on Apple TV?

    I can only see photo stream photos as of march 19, but I have them from a year ago.  How do I get them to photo stream on my Apple TV?  They are on my iPad under photo stream

  • Image in JPanel

    I am trying, as so many others, to print an image to a frame. i am using a panel to do so. I just don't get any images to show up... Thanx for your help!!! here my code... public class MyFrame exends JFrame { private void initComponents() { JPanel we

  • HOW CAN I SWITCH PLAYLISTS ?

    HOW CAN I SWITCH PLAYLISTS ? I would like to change directories while listeniong -