UME java mapping with ABAP

Hi Experts
I need to keep the users of my AS Java syncronized with some user in ERP.
Thats means, when some user change some information in ABAP, i need to get this information and change in AS Java too, like email or password...
I can't use CUA, and i can't use that function that syncronized ABAP user in AS Java automatically. There is another way to do it?
Could somene help me?
Best Regards
Marcos Brandã

Hi Martin
Thanks for your response,
When i was talking about the function that syncronized the user in abap and java, i was talking exactly about use ABAP user store as a source for UME. This solution doesn't wirk because the customer do not when activate this. He is worried about the performance and the information of the user in 2 diferent location, there is a lot of users in ABAP user store and he don't want this solution.
I need to get just specific user to reply in Java stack user store. I kown how can i do it without get user password, but this do not resolve to me. I need the same user credencials in both systems.
I will see th SPML / Idm and what kind of problems this solution brings to me, if this solve my problem, i will try to use it.
There is another way, instead this two way? maybe get the encripted password, decript it and save in java user store with encription mecanism of ume?
Best Regards
Marcos Brandao

Similar Messages

  • Regarding Java mapping and ABAP Mapping

    Hello,
         If I suppose to do Java mapping or ABAP mapping, Is there any pre requisite to perform these two mappings?
    If exist what they are?
    How to perform them?
    Thank you

    Hello jyotsna,
    Java mapping can be used when you have complex mapping structures.
    We can do most of the times for our requirements through Graphical mapping.
    When the structures are very complex to build you can go for SAX (Simple API for XML) or DOM (Document Object Model) parsers.
    Message mapping internally generates DOM parser.
    Java Mapping in XI
    https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=java+mapping&adv=false&sortby=cm_rnd_rankvalue#
    SAP Network Blog: Implementing a Java Mapping in SAP PI
    /people/carlosivan.prietorubio/blog/2007/12/21/implementing-a-java-mapping-in-sap-pi
    Java Mapping (SAP Library - Partner Connectivity Kit)
    http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/frameset.htm
    SAP Network Blog: XI Java Mapping Helper (DOM)
    /people/alessandro.guarneri/blog/2007/03/25/xi-java-mapping-helper-dom
    SAP Network Blog: Testing and Debugging Java Mapping
    /people/stefan.grube/blog/2006/10/23/testing-and-debugging-java-mapping-in-developer-studio
    Binary Conversion in XI - Java Mapping - Code Gallery - Wiki
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/binary%2bconversion%2bin%2bxi%2b-%2bjava%2bmapping
    SAP Network Blog: "JAVA MAPPING", an alternate way of reading a CSV file
    /people/rahul.nawale2/blog/2006/07/18/java-mapping-an-alternate-way-of-reading-a-csv-file
    ABAP mappings run on ABAP Stack and are developed in the ABAP workbench of the Integration Server.
    You normally do not need to use the ABAP mappings and is preferable for someone with ABAP programming background. I should say JAVA functions would suffice any complex scenarios.
    refer step by step guides for ABAP Mapping
    ABAP Mapping
    https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=abap+mapping&adv=false&sortby=cm_rnd_rankvalue#
    How to Use ABAP Mapping in Exchange Infrastructure 3.0 (NW2004)
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/5c46ab90-0201-0010-42bd-9d0302591383
    SAP Network Blog: Testing ABAP Mapping
    /people/sameer.shadab/blog/2005/09/29/testing-abap-mapping
    SAP Network Blog: How to call XI ABAP Mapping via RFC
    /people/ricardoandres.maienza/blog/2007/04/06/how-to-call-xi-abap-mapping-via-rfc
    SAP Network Blog: XI: ABAP mapping logs - more standard = better visibility
    /people/michal.krawczyk2/blog/2006/09/20/xi-abap-mapping-logs--more-standard-better-visibility
    SAP Network Blog: Dynamically sending a mail to the PO creator using XSLT- ABAP Mapping
    /people/rahul.nawale2/blog/2006/11/01/dynamically-sending-a-mail-to-the-po-creator-using-xslt-abap-mapping
    You need to provide the name of your mapping program maually , you see it is an input box.
    just provide the name of abap mapping program it will work.
    and one more thing you cannot test abap mapping program in integration builer you need to test in abap only.
    use tcode: SXI_MAPPING_TEST for testing abap mapping
    Thanks,
    Satya
    Reward points if it is useful..

  • Java Mapping with Stream API

    Hi,
      Can you please let me know when java mapping with STAX will be supported in Netweaver XI?
    Regards
    Sudhir

    Hi Sudhir,
      STAX is Stream API for XML. It works similar to SAX but is a pull based model. It can also work with multiple XSD's...
    XI support of STAX will moslty be supported when XI supports Java EE 5. We can say that this will be supported very soon...
    http://www.xml.com/pub/a/2003/09/17/stax.html presents the overview of STAX.
    Hope this helps
    Regards
    Kiran..

  • Graphical Mapping Vs XSLT mapping Vs Java Mapping Vs ABAP Mapping

    Hi Experts,
              I have a question regarding different message mapping options available in XI namely
    Graphical Mapping
    XSLT mapping
    Java Mapping
    ABAP Mapping
    Q1: Which amoung the above mappings is the best and why?
    Q2: On what cases Graphical, XSLT, Java and ABAP Mapping should be used?
    Q3: Is it true that graphical and XSLT mappings are converted into Java class internally?
    Kindly help!
    Thanks
    Gopal
    Message was edited by:
            gopalkrishna baliga

    Hi,
    There is no hard and fast rule for using the mapping techniques.
    Graphical Mapping is used for simple mapping cases. When, the logic for your mapping is simple and straight forward and it does not involve mult hiearchical mapping requirement. and context handling.
    Java and XSLT mapping are used when graphical mapping cannot help you.
    When the choice is between Java And XSLT, XSLT is simpler than java mapping and easier. But, it has its drawbacks.  XSLT can lead to a bad perfrormance if the Source XML is huge.
    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.
    For further info on each of the mapping, refer to these links,
    Graphical Mapping,
    http://help.sap.com/saphelp_nw04/helpdata/en/6d/aadd3e6ecb1f39e10000000a114084/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/content.htm
    XSLT Mapping
    http://help.sap.com/saphelp_nw04/helpdata/en/73/f61eea1741453eb8f794e150067930/content.htm
    http://www.w3.org/TR/xslt20/
    Java Mapping
    http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/content.htm
    DOM parser API
    http://java.sun.com/j2se/1.4.2/docs/api/org/w3c/dom/package-frame.html
    Also, check this thread for more info,
    Different types of Mapping in XI
    Am not sure about XSLT , but , yes graphical mapping is converted into java classes internally and these classes use SAX parsing as well.
    Regards,
    Bhavesh

  • Java Mapping/UDF/ABAP mapping to capture payload

    Hi,
    could you please provide me Java mapping code samples (or UDF code) to save payloads of a message based on Message ID
    i have a synchronous scenario where i have payloads in sxmb_moni for request and response with different message IDs. So pelase let me know how to save those request and response payloads to a file.
    it would be great if you provide the stpes to implement and java code samples....if it is possible with ABAP mapping also please let me know te steps.
    Best Regards....SARAN

    Try with this code
    import com.sap.mw.jco.IFunctionTemplate;
    import com.sap.mw.jco.IRepository;
    import com.sap.mw.jco.JCO;
    public class PayloadExtractor {
        // The MySAP.com system we gonna be using
        static final String SID = "SID";
        // The repository we will be using
       IRepository repository;
        JCO.Field msgkeyField;
        public PayloadExtractor() {
            try {
                System.out.println("*** Creating the Pool... ***");
                JCO.addClientPool(SID, 10, "001", "user", "pwd", "EN", "host", "00");
                repository = JCO.createRepository("RecoverRepository", SID);
            } catch (JCO.Exception ex) {
                System.out.println("RecoverXI Caught an exception: \n" + ex);
        // Retrieves and prints information about the remote system
        public void getPayload() {
            // A messageID from your XI/PI
            String key = "48CD01EB3D27021BE1008000C0A8477D";
            final String pipelineID = "CENTRAL";
            byte[] msgkey = key.getBytes();
            try {
                IFunctionTemplate ftemplate = repository.getFunctionTemplate("SXMB_READ_MESSAGE_VERSION_RAW");
                if (ftemplate != null) {
                    System.out.println("*** Creating client and function... ***");
                    JCO.Function function = ftemplate.getFunction();
                    JCO.Client client = JCO.getClient(SID);
                    JCO.Structure struct = function.getImportParameterList().getStructure("MESSAGEKEY");
                    struct.setValue(key, "MSGID");
                    struct.setValue(pipelineID, "PID");
                    // SELECTION must be like this!
                    function.getImportParameterList().getField("SELECTION").setValue("2");
                    // This is the msg version number, where 000 is the first (Inbound); the last can be caught from the function output (see below).
                    // Setting this strongly depends on what you want to get: basically before or after the mapping...
                    function.getImportParameterList().getField("VERSION_REQUEST").setValue("000");
                    System.out.println("*** Calling... ***");
                    client.execute(function);
                    JCO.Table tb = function.getExportParameterList().getTable("MESSAGEPAYLOAD");
                    if (tb.getNumRows() > 0) {
                        // There could be multiple payloads (even if usually it's only one)
                        do {
                            String plstr = new String(tb.getField("PAYLOAD").getByteArray());
                            System.out.println(
                                "*** Payload found *** " + tb.getField("NAME").getString() + " *** BEGIN ***");
                            System.out.println(
                                "Message Last Version: "
                                    + function.getExportParameterList().getField("MAXVERSION").getString());
                            System.out.println(plstr);
                            System.out.println(
                                "*** Payload found *** " + tb.getField("NAME").getString() + " ***  END  ***");
                        } while (tb.nextRow());
                    } else {
                        System.out.println("*** No payload found! ***");
                    // Release the client into the pool
                    JCO.releaseClient(client);
                } else {
                    System.out.println("Function SXMB_READ_MESSAGE_VERSION_RAW not found in backend system.");
            } catch (Exception ex) {
                System.out.println("Caught an exception: \n" + ex);
        protected void cleanUp() {
            System.out.println("*** Cleaning... ***");
            JCO.removeClientPool(SID);
        public static void main(String[] argv) {
            PayloadExtractor e = new PayloadExtractor();
            e.getPayload();
            e.cleanUp();
    -Madhu

  • XSLT-transformation in Java-Mapping with javax.xml

    Hi,
    we wanna use javax.xml for transformations in Java-Mapping.
    Inside the Java-mapping we read in XSL-files to transform a XML-stream. With XSLT 1.0 everything works fine - but with XSLT 2.0 we are getting runtime errors.
    Is it possible that javax.xml only supports XSLT 1.0?
    Regards
    Wolfgang

    Hi ,
    Jaxp 1.3 is available in this link -
    http://java.sun.com/webservices/jaxp/
    Use these jar files to process XSLT 2.0.
    Nanda

  • Java Mapping with an xml array as input

    Hi Gurus,
    I have to perform a java mapping to map some input xml contained in an array with a target message type. I have found a good java mapping example here:
    Re: Please provide Java Mapping example
    but my mapping input is not a single XML, but an XML array, thus I have a doubt...
    How can I map multiple XML contained in an array with a target XML? I have to solve this problem into a Java mapping prospective.
    Thanks to all!
    Message was edited by:
            Gabriele Morgante

    Hey Stefan, I think he is refering to a n:1 multimapping.
    If that is indeed the case, Gabriele, you will have to consider the initial tags inserted by mapping runtime to treat multimappings.
    Suppose your XML message is like
    <myMT xmlns="urn:mynamespace">
      <value>xpto</value>
    </myMT>
    Then, if your source message interface occurrence is defined as unbounded in your interface mapping, your mapping program (message mapping, xslt, java mapping, whatever) will receive, from mapping runtime, a message like this:
    <Messages xmlns="http://sap.com/xi/XI/SplitAndMerge">
      <Message1>
        <myMT xmlns="urn:mynamespace">
          <value>xpto1</value>
        </myMT>
        <myMT xmlns="urn:mynamespace">
          <value>xpto2</value>
        </myMT>
        <myMT xmlns="urn:mynamespace">
          <value>xpto3</value>
        </myMT>
      </Message1>
    </Messages>
    Also, if you have more than 1 message type as source of your interface mapping, your mapping program will receive the other message types in <Message2>, <Message3>... tags.
    The <Messages> and <MessageX> tags will always be automatically generated by mapping runtime when dealing with multimappings, which are mappings from m XML messages to n XML messages, with either m, n or both different of 1 (note that this definition includes mappings from 1 type to 1 type, when either source, target or both message types have max occurrence = ubounded).
    Finally, remember that the output that your mapping program generates will also have to include these <Messages> and <MessageX> tags (with proper namespace), since mapping runtime will be expecting them. Message mappings treat those by default, but your xslt and java multimappings will have to explicitely include these tags in the output.
    Regards,
    Henrique.

  • Java Mapping with CDATA

    One simplest way is read the data element value as the string and ignore first  six or seven characters by using substring method or so... Use the return value string for parsing the values from respective tag element using parser or manually

    Hi Xinaxu,
    Here is the java mapping code.
    public class Cdata implements StreamTransformation{
         public static void main(String[] args) {
              try{
                   Cdata genFormat=new Cdata();
                   FileInputStream in=new FileInputStream("C:\\Apps\\acm\\cdata.xml");
                   FileOutputStream out=new FileOutputStream("C:\\Apps\\acm\\cdata1.xml");
                   genFormat.execute(in,out);
                   catch(Exception e)
                   e.printStackTrace();
         public void execute(InputStream in, OutputStream out)
                   throws StreamTransformationException {
              try
                   DocumentBuilderFactory factory=DocumentBuilderFactory.newInstance();
                   DocumentBuilder builderel=factory.newDocumentBuilder();
                   /*input document in form of XML*/
                   Document docIn=builderel.parse(in);
                   /*document after parsing*/
                   Document docOut=builderel.newDocument();
                   TransformerFactory tf=TransformerFactory.newInstance();
                   Transformer transform=tf.newTransformer();
                   Element root,child,child1;
                   root=docOut.createElement("Header");
                   root.setAttribute("xmlns","urn:bp:xi:hr:edm:test:100");
                   NodeList l;
                   Node n;
                   l=docIn.getElementsByTagName("Data");
                   int i,len=l.getLength();
                   String charSet[]={"&lt;","&gt;","&amp;","&apos;","&quot;"};
                   String replaceSet[]={"<",">","&","'","\""};
                   for(i=0;i<len;++i)
                        child=docOut.createElement("Data");
                        if(l.item(i).hasChildNodes())
                             n=l.item(i).getFirstChild();
                             //System.out.println(n.getNodeType());
                             //System.out.println(n.getNodeValue());
                             int j;
                             if(n.getNodeType()==3 && n.getNodeValue().indexOf("CDATA")>=0)
                                  // that means this is Cdata section
                                  //capture data in a string
                                  String s=n.getNodeValue();
                                  /*if you are sure that string contains
                                   * valid xml tags. You can parse
                                   * the tags.First replace
                                   * &lt; with < less than
                                     &gt; with > greater than
                                     &amp; with & ampersand 
                               &apos; with ' apostrophe
                               &quot; with " quotation mark
                               to avoid exceptions
                                  //System.out.println("s="+s);
                                  for(j=0;j<charSet.length;++j)
                                       s=s.replaceAll(charSet[j], replaceSet[j]);
                                  int ll;
                                  ll=s.length();
                                  String a="";
                                  int count=0;
                                  //extract only xml tags from string
                                  for(j=0;j<ll;++j)
                                       if(count<2)
                                            if(s.charAt(j)=='<')
                                                 count++;
                                            if(count<2)
                                                 continue;
                                       a=a+s.charAt(j);
                                  //System.out.println("a="+a);
                                  for(j=a.length()-1,count=0;j>=0;--j)
                                            if(a.charAt(j)=='>')
                                                 count++;
                                            if(count==2)
                                                 break;
                                  if(j>=0)
                                       s=a.substring(0,j+1);
                                  System.out.println(s);
                                  org.xml.sax.InputSource inStream = new org.xml.sax.InputSource();
                                 inStream.setCharacterStream(new java.io.StringReader(s));
                                  DocumentBuilder b=factory.newDocumentBuilder();
                                  Document cdataSection=b.parse(inStream);
                                  child1=(Element) docOut.importNode(cdataSection.getDocumentElement(),true);
                                  child.appendChild(child1);
                             else if(n.getNodeType()==4)
                                  // that means this is Cdata section
                                  //capture data in a string
                                  String s=n.getNodeValue();
                                  /*if you are sure that string contains
                                   * valid xml tags. You can parse
                                   * the tags.  replace invalid characters
                                   * before parsing
                                  for(j=0;j<charSet.length;++j)
                                       s=s.replaceAll(charSet[j], replaceSet[j]);
                                  org.xml.sax.InputSource inStream = new org.xml.sax.InputSource();
                                 inStream.setCharacterStream(new java.io.StringReader(s));
                                  DocumentBuilder b=factory.newDocumentBuilder();
                                  Document cdataSection=b.parse(inStream);
                                  child1=(Element) docOut.importNode(cdataSection.getDocumentElement(),true);
                                  child.appendChild(child1);
                        root.appendChild(child);
                   docOut.appendChild(root);
                   transform.transform(new DOMSource(docOut), new StreamResult(out));
              catch(Exception e)
                   e.printStackTrace();
         public void setParameter(Map arg0) {
              // TODO Auto-generated method stub
    Hope this solves your problem.
    regards
    Anupam

  • JAVA Mapping with SAX: Illegal character exception &

    Hi everybody,
    I use a SAX JAVA Mapping. It throws an error cause the xml that is parsed has a
    &amp;
    like in
    <D_3036>Company &amp; Co. KG</D_3036>
    Does anybody know how to solve the problem?
    I do not want to replace the
    &amp;
    Are there special settings/properties for the handler/parser?
    Thanks
    Regards
    Mario

    Hi all,
    thanks for your comments and suggestions. The error was not cause by the problem I describes.
    FYI:
    If there is an ampersand in the middle of a string, than the standard method
    characters
    in the handler is called three times!
    This let me asume the ampersand was the error.
    Regards Mario
    Edited by: Mario Müller on Dec 19, 2008 1:23 AM

  • Java Mapping with a huge file

    Hi to all,
    I have a strange problem in my integration process.
    there are two java mappings in order to create bapi input:
    -the first mapping keeps a file of 5Mb and transforms it in a file of 50MB (and it works!)
    -the second mapping keeps the file above and has to create another file of 50Mb.
    And this second mapping doesn't work on the customer system, while everything is ok on my developing system.
    On customer system I don't have any error message: SXMB_MONI gives me a "clock" and the message says: mapping in process..... It remains in this status "forever"!!!
    Why does it work on my system with same code and same file and it doesn't on customer's?
    There is any system parameter that I can check to see if there is some difference in system configuration?
    Thank for the help!
    bye,
    Antonio

    Hi Antonio,
    ...seems to be a hardware problem (sizing).
    I would write some logging in my java to see how far it comes.
    Regards Mario

  • Diff between XSL - JAVA and XSL - ABAP

    Hi All,
    What is the difference between the XSLT in JAVA and XSL in ABAP? which is the preferable one.

    for
    <b>XSL in ABAP</b>
    refer these links
    /people/sap.user72/blog/2003/09/18/xsl-and-abap
    http://help.sap.com/saphelp_nw04/helpdata/en/09/b7463c32a3fe13e10000000a114084/frameset.htm
    /people/achim.bangert/blog/2005/07/17/code-generation-using-xsl-transformations
    /people/tobias.trapp/blog/2006/10/06/xml-processing-in-abap-part-9-150-abap-processing-using-xslt
    /people/udo.martens/blog/2006/08/23/comparing-performance-of-mapping-programs
    for <b>XSL in JAVA</b>
    http://help.sap.com/saphelp_nw04/helpdata/en/4c/b2ad3de2d76b3be10000000a114084/frameset.htm
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/05a3d62e-0a01-0010-14bc-adc8efd4ee14
    http://help.sap.com/saphelp_nw04/helpdata/en/ce/1d753cab14a909e10000000a11405a/frameset.htm
    XSLT Mapping:
    http://help.sap.com/saphelp_nw04/helpdata/en/73/f61eea1741453eb8f794e150067930/content.htm
    Java Mapping:
    http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/content.htm
    Links of blogs on java mapping...
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-i
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-ii
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-iii
    Have a look at this blog on XSLT mapping in ccbpm:
    /people/sap.user72/blog/2005/03/15/using-xslt-mapping-in-a-ccbpm-scenario
    /people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping(file to xslt mapping)
    /people/pooja.pandey/blog/2005/06/27/xslt-mapping-with-java-enhancement-for-beginners(xslt with java enhancement function)
    XSLT Mapping:
    http://help.sap.com/saphelp_nw04/helpdata/en/73/f61eea1741453eb8f794e150067930/content.htm
    and article on XSLT Mapping
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/xi%20code%20samples/generic%20xslt%20mapping%20and%20sample%20code.pdf
    Java Mapping:
    http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/content.htm
    Message Mapping:
    http://help.sap.com/saphelp_nw04/helpdata/en/ee/bf9640dc522f28e10000000a1550b0/content.htm
    this thread could give u a better understanding....
    https://www.sdn.sap.com/sdn/collaboration.sdn?contenttype=url&content=https%3A//forums.sdn.sap.com/thread.jspa%3FthreadID%3D40283%26tstart%3D25
    /people/ravikumar.allampallam/blog/2005/02/10/different-types-of-mapping-in-xi(types of mappping in xi)
    /people/sap.user72/blog/2005/03/15/using-xslt-mapping-in-a-ccbpm-scenario(XSLT mapping in bpm)
    refer this thread
    Difference in using java,xslt,message mapping
    XSLT-transformation in Java-Mapping with javax.xml
    Thanks !!!!

  • XI with ABAP stack only ?

    Looking at some very annoying problems with the XI Java Stack and applications (stability, memory consumption), following question comes to mind:
    is it technically possible to run an XI system without the Java stack ? How much functionality do we have in there, can we do customers projects with that ?
    In ABAP stack, we have the following functions:
    - Business Process Engine
    - Integration Engine
    - HTTP Adapter
    - IDoc Adapter
    - ABAP-Mapping (XSL or handmade)
    also, we have of course the functionality of using File/FTP,Mail in ABAP. This means the most important adapter types are available in ABAP (without needing the Java adapter engine).
    Of course the Integration Builder is not available then. But do we really need it ?? Same applies for the SLD.
    Are the pipeline objects (receiver determination, interface determination and so on) stored in the ABAP stack ? I assume that is the case. Does ABAP stack contain the XI message type objects ? Or is that stored in Java ?
    Anyone tried that path ? Is it already failing in the installation because some core XI ABAP components require Java parts ? Or would it work ?
    Of course the answer depends on "what do we define to be XI". For me it is the core integration engine with the pipeline architecture plus mapping and proxy extension points. Everything else (e.g. tools) needed can be built around it.
    Customer benefits would be: focus on ABAP only (Java knowhow not needed), easier administration and more stability.
    CSY

    Hello Jaishankar,
    > there is no transaction to replace Visual Admin (NWA from >PI7.1) functionality.
    question: suppose we are not using the J2EE stack of XI, do we need the NWA ? Does NWA also contain important functions which control/configure the ABAP stack ?
    >I would say Java and ABAP stacks are very tightly coupled >to each other and it would take ages to understand how >tightly it is coupled.
    this would be quite bad design then. But you may be right. Current cross-calls from ABAP to Java I know:
    - call Java-Mapping from ABAP pipeline. If we do not need Java mapping, this call is not needed. In ABAP, we have ABAP and XSLT mapping options
    - other ? What else ? I am talking about runtime execution (pipeline), not designer tools
    >For example XI is a client of SLD which runs on Java stack, >how do you think you can replace the functionality of SLD via
    yes. But what does XI need from SLD ? Business systems, target transports, ok. It's a handful of objects types which can easily be maintained in the ABAP stack also. For customers which are using the SAP portal or other Java components (apart from XI), of course, that makes no sense. But for smaller customers which do not use portal: for what do they really need that SLD ? I have seen one customer recently who didnt know about the transport targets and so maintained the IR objects on the productive system manually. More an education issue, but it shows a bit that the SLD for some customers is overkill.
    >improvised and will be done in the future versions. The long >term plan is to make XI a complete Java based tool. All the >developers tools will be accessed via NWDS in future"
    yes, I heard that also, and it is very interesting in fact. We will see what happens
    thanks for your input,
    CSY

  • Creation of additional attachment in Java Mapping

    Hello all,
    I want to use a Java Mapping with the functionality to create a second /attachment which I can send over email out?
    I don’t want to pick this file somewhere from the server, instead I want to fill the content of the additional attachment directly in the java mapping.
    I hope somebody knows the answer of my question.
    If its possible is there any kind of example??
    Many thanks for your help
    ilka

    hi Stefan,
    http://scn.sap.com/thread/1874962
    Regarding the comment in this thread, can you please tell me if you have faced any issue with creating output attachments. Right now, i have a message mapping in which i have written a udf to create attachments
    this message mapping is a multi mapping and the source is 0-unb. I have used a return as xml on the root message and pointed it to the udf after split by value.
    There are three root nodes in one of my cases, and when this goes through this mapping, there is 1 attachemnt each created with three main documents and submain documents. However, all the attachments contain details of the first root node itself where in actually it should be each main and submain document having a different attachment. Please find my udf below. Please let me know if you think it is wrong somewhere.
    udf :-
    GlobalContainer globalContainer = container.getGlobalContainer();
    OutputAttachments outputAttachments = globalContainer.getOutputAttachments() ;
    int flag =0;
    AbstractTrace trace = container.getTrace();
    String attachmentName = "";
    //for(int i=0;i<var1.length;i++){
    try
    var1=var1.replaceAll("><",">\n<");
    attachmentName = "attachment"+cnt;
    Attachment newopAttachment = outputAttachments.create((attachmentName), var1.getBytes("UTF-8"));
    outputAttachments.setAttachment(newopAttachment);
    trace.addInfo("newopAttachment"+newopAttachment);
    cnt=cnt+1;
    attachmentName ="";
    newopAttachment = null;
    var1="";
    catch (Exception e)
    trace.addInfo("ever reaching trace");
          e.printStackTrace(); 
    //result.addValue("1");  
    //result.addValue("1");  
    return "1";
    Input :-
    Messages
    Message1
    SBDH
    SBDH
    SBDH
    Each of the above SBDH, i have returned as xml and pointed to the udf after split by value
    Your help is highly appreciated.
    Regards,
    Ninu

  • N:1 Mapping Possible using Java Mapping?

    All,
    Is it possible to do a N:1 mapping using Java Mapping?
    If yes , how?
    Reason for this question is that the execute() of the Java Mapping is going to take the source / request message as the InputStream . In the case of N:1 mapping , as we have multiple messages , how will they be send to the InputStream? Will both the messages be sent combined into the InputStream? Will the MESSAGES tag be embedded into the input stream?
    Regards,
    Bhavesh

    Hi @ll;
    i try the same.
    to conduct a java mapping with 2 input structures that fills one target structure.
    This mapping is part of a Integrationprocess.
    I tested the mapping at the Integration Repository (Interface mapping) with the structure given by henrique and it works fine without any error.
    At runtime this structure looks like this (different prefix)
    <?xml version="1.0" encoding="UTF-8"?>
    <sxi:Messages xmlns:sxi="http://sap.com/xi/XI/SplitAndMerge">
         <sxi:Message1>
              <YOURXML1>...</YOURXML1>
         </sxi:Message1>
         <sxi:Message2>
              <YOURXML2>...</YOURXML2>
         </sxi:Message2>
    </sxi:Messages>
    As I put it in the Integrationprocess unfortunately a strange error arises.
    The trace Workflow-Protocoll shows following error.
    <Trace level="2" type="T">Call method execute of the application Java mapping com.endress.infoserve.xi.mapping.MergeConfigStore_IdocOrder </Trace>
    <Trace level="2" type="T">Java mapping com/endress/infoserve/xi/mapping/MergeConfigStore_IdocOrder completed. (executeStep() of com.endress.infoserve.xi.mapping.MergeConfigStore_IdocOrder </Trace>
    <Trace level="1" type="T">Parsing error after multi mapping.Expected Message<i> instead of IDOC </Trace>
    I can't make head nor tail of it.
    what´s the mistake?
    can anybody please help me?
    Thanks in advance
    Kind regards

  • Getting Error in java mapping: Parsing empty source. Root element expected!

    Hi Experts,
       I am using java mapping for schema validation of input message. I have followed all the standard procedures and implemented the java class in the interface mapping.
    My interface mapping is like this:
    OrderData --->Java Class ---SchemaValidate
                         Mesg Map ---OrderData_to_BAP --->BAPI Msg
    So first I want to validate the schema of the input message. If the input message is invalid then XI should throw an exception. Then I use the actual message mapping to map the input order data to the BAPI input parameters.
    In the java code I am using xerces parser.
    The java code works fine when I run it as a standalone application.
    The interface mapping also works fine if I don't include the java mapping. Ofcourse schema validation does not happen.
    But when I test the interface mapping by including the java mapping then I am getting the error:
    Call method execute of the application Java mapping SchemaValidate
    Java mapping SchemaValidate completed. (execute() of SchemaValidate
    com.sap.aii.utilxi.misc.api.BaseRuntimeException: Parsing an empty source. Root element expected!
    What am I doing wrong? Why it is not getting the root element?
    My Java code is as follows:
    import com.sap.aii.mapping.api.StreamTransformation;
    import com.sap.aii.mapping.api.StreamTransformationConstants;
    import com.sap.aii.mapping.api.StreamTransformationException;
    import java.io.*;
    import java.util.Map;
    import javax.xml.parsers.*;
    import org.xml.sax.helpers.*;
    import org.xml.sax.*;
    import org.apache.xerces.jaxp.*;
    Sample mapper for SAP-XI
    @author Gopal
    public class SchemaValidate implements StreamTransformation {
        //Constants when using XML Schema for SAX parsing.
         static final String JAXP_SCHEMA_LANGUAGE =
         "http://java.sun.com/xml/jaxp/properties/schemaLanguage";
         static final String W3C_XML_SCHEMA =
         "http://www.w3.org/2001/XMLSchema";
         static final String JAXP_SCHEMA_SOURCE =
         "http://java.sun.com/xml/jaxp/properties/schemaSource";
    Injection of mapping parameters
    from integration engine
    @param map Map with configuration data
        public void setParameter(Map map) {
    Mapping implementation
    @param inputStream Input data from integration engine
    @param outputStream Output data to integration engine
        public void execute(InputStream inputStream,
                            OutputStream outputStream)
          throws StreamTransformationException {
            try {
                  // obtain an object of class javax.xml.parsers.SAXParser,
                  SAXParserFactory spf = SAXParserFactoryImpl.newInstance();
                  spf.setNamespaceAware(true);
                  spf.setValidating(true);
                  SAXParser sp = spf.newSAXParser();
                  // setup the schema file
                  sp.setProperty(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
                  sp.setProperty(JAXP_SCHEMA_SOURCE, new File("IOReqMsgSchema.xsd"));
                  //parse the input xml using the given schema
                  sp.parse(inputStream, new ParseErrorHandler());
            catch(SAXException se) {
              se.printStackTrace();
            catch ( Exception e ) {
              throw new StreamTransformationException( e.getMessage() );
    My input message is :
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:OrderCreate_request xmlns:ns0="mynamespace">
       <ORDER>HTEST1234567</ORDER>
       <ORDER_TYPE>z001</ORDER_TYPE>
       <ORDER_NAME>Test Order</ORDER_NAME>
       <CO_AREA>INTC</CO_AREA>
       <CCTR_POSTED>1234567890888888888</CCTR_POSTED>
       <CURRENCY>USD</CURRENCY>
       <PERSON_RESP>12345679</PERSON_RESP>
    </ns0:OrderCreate_request>
    Kindly help! please this is urgent!!!!!!
    Thanks
    Gopal
    Edited by: gopalkrishna baliga on Feb 28, 2008 9:34 AM

    Hi Stefan,
       I did the code changes to return output stream and the java code works perfectly in standalone mode in my PC.
       But when I use the same in the Java mapping with XI then It throws an error "Getting Error in java mapping: Parsing empty source. Root element expected!".
    My XI J2EE server has JDK1.4.3.11.
    Is there any limitation of using SAX parser in XI? If Yes, then which parser should be used for schema validation in XI?
    I have included the XSD file for schema validation along with class files in the .jar file. This jar file is then imported in XI repository. Is the XI engine not able to read the XSD file?
    Do I have to handle reading XSD file differently? Any suggession how?
    Is this parser error due to some security access?
    Kindly help me! I have been struggling with this problem since 2 weeks. I will be greatfull to you if you can help me.
    Thanks
    Gopal

Maybe you are looking for