XI 7.0 passing attributes between java mapping and message mapping

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

Another option is storing the values in the message header in the same way as the Adapter-Specific Message Attributes:
http://help.sap.com/saphelp_nw04/helpdata/en/43/09b16006526e72e10000000a422035/frameset.htm
Just use your own name/namespace combination, which is not used in any adapter.
If possible use the way that Sandro proposed and add the information which you need to additional tags in the payload.
Regards
Stefan

Similar Messages

  • Hi , friends pls explain abap mapping and message mapping

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

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

  • Exchanging data between interface mapping and message mapping possible?

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

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

  • ABAP Mapping  and Message Mapping

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

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

  • Passing vector between java class and jsp page

    Hi,
    I think this is similar to the last post but anyways maybe somebody can help us both out bontyh.....I am getting an error saying undefined variable or class when i try to access a Vector which was returned in a class.
    Anyways anyone got any ideas?

    Maybe if you give some more information...

  • Interface Mapping VS Message Mapping

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

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

  • Java ,abap and XSLT mapping

    Hi all,
               can any one provide some material on java ,ABA and XSLT mapping(as i got requirement on my current project)..
    thanks in advance.
    regards
    krish..

    Hi
       All mapping related links
    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 any complex logic.
    Java and XSLT mapping are used when graphical mapping cannot help you and you have multilevel hierarchy structure data.
    When the choice is between Java and XSLT, XSLT is simpler than java mapping and easier. But, it has its drawbacks. One among them being that you cannot use Java APIs and Classes in it. There might be cases in your mapping when you will have to perform something like a properties file look up or a DB lookup, such scenarios are not possible in XSLT and so, when you want to use some specific Java API's you will have to go for Java Mapping.
    Java Mapping uses 2 types of parsers. DOM and SAX. DOM is easier to use with lots of classes to help you create nodes and elements, but, DOM is very processor intensive.
    SAX parser is something that parses your XML one after the other, and so is not processor intensive. But, it is not exactly easy to develop either.
    To know more about each of them please go thru the following links. And if you ask me your which is better, it depends basically on the scenario you implementing and the complexity involved. Anyways please go thru the following 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
    /people/bhanu.thirumala/blog/2006/02/02/graphical-message-mapping-150-text-preview
    http://www.sapgenie.com/netweaver/xi/mapping1.htm
    /people/alessandro.guarneri/blog/2006/01/26/throwing-smart-exceptions-in-xi-graphical-mapping
    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
    ABAP mapping
    /people/r.eijpe/blog
    To know more about the value mapping tools for the SAP Exchange Infrastructure (XI), please go thru the following link:
    http://www.applicon.dk/fileadmin/filer/XI_Tools/ValueMappingTool.pdf
    To get an idea as to what value mapping is, please go thru the following links:
    http://help.sap.com/saphelp_nw04/helpdata/en/13/ba20dd7beb14438bc7b04b5b6ca300/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/f2/dfae3d47afd652e10000000a114084/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/2a/9d2891cc976549a9ad9f81e9b8db25/content.htm
    most of the links that I have provided also helps you get the step by step procedure of doing the same. And also involves the procedure to implement certain advanced features.
    And please go through this link which clearly explains the 3 types of mappings.
    /people/ravikumar.allampallam/blog/2005/02/10/different-types-of-mapping-in-xi
    regards
    Prasad

  • [svn] 4112: Further work for FXG to SWF transcoding - checking in some work resulting from collaborating with Kaushal to correct FXG transforms and gradient transforms as well as cater for differences between Java AffineTransform and the SWF Matrix type .

    Revision: 4112
    Author: [email protected]
    Date: 2008-11-14 10:05:42 -0800 (Fri, 14 Nov 2008)
    Log Message:
    Further work for FXG to SWF transcoding - checking in some work resulting from collaborating with Kaushal to correct FXG transforms and gradient transforms as well as cater for differences between Java AffineTransform and the SWF Matrix type.
    QE: Not yet.
    Doc: No
    Checkintests: Pass
    Reviewer: Kaushal
    Modified Paths:
    flex/sdk/trunk/modules/swfutils/src/java/flash/fxg/dom/GraphicContentNode.java
    flex/sdk/trunk/modules/swfutils/src/java/flash/fxg/dom/fills/LinearGradientFillNode.java
    flex/sdk/trunk/modules/swfutils/src/java/flash/fxg/dom/fills/RadialGradientFillNode.java
    flex/sdk/trunk/modules/swfutils/src/java/flash/fxg/dom/strokes/LinearGradientStrokeNode.j ava
    flex/sdk/trunk/modules/swfutils/src/java/flash/fxg/dom/strokes/RadialGradientStrokeNode.j ava
    flex/sdk/trunk/modules/swfutils/src/java/flash/fxg/swf/AbstractFXGGraphics.java
    flex/sdk/trunk/modules/swfutils/src/java/flash/fxg/swf/TypeHelper.java
    Added Paths:
    flex/sdk/trunk/modules/swfutils/src/java/flash/fxg/dom/ScalableGradientNode.java

  • How to interchange data between Java Program and C++ Program

    I constructed a java program using netbeans IDE that has ability to connect with a respective DLL; I want to connect and interchange data between my java program(.jar) and VSC++ program(.exe) through DLLs.JNI uses single Dll to invoke C/C++ function in native manner,In order to increase the efficiency I tried to connect and interchange primitive data types between Java program and C++ program using that DLL(JNI implemented).
    Unfortunately C++ program cannot obtain data values that has been changed by Java Program.For example - If I declare a global int variable in DLL,java program can catch that int variable and can update it but If I run my C++ program(exe) loading same DLL simultaneously it cannot receive the updated value of that int variable declared in the DLL.
    Therefore I need a solution to share/Interchange at least primitive data and their respective values between a JAVA and C++ Program using JNI (in spite of date transferring through Sockets).JAVA TO C/C++ & C/C++ to JAVA using DLLs.
    (TWO WAY COMMUNICATION)
    JAVA.jar  <=> <JNI> <=> DLL <=> [Connector Program C/C++] <=> C/C++ .exe
    PLEASE HELP ME!! THANK YOU

    What in the are you trying to say? What does "filled into the servlet mean?" Is the map somewhere outside the servlet? In a different process? Are you asking how to extract data from a map? Something else?
    Sorry, but your question makes no sense.

  • Whats is difference between Java JRE  and  Java SDK

    Hi,
    what is the difference between Java JRE and Java SDK...
    i think both of them have the same set of files to be installed...
    I am not able to understand where they differ

    The JRE (Java runtime Environment) contains just the stuff necessary to run Java and the SDK (System Development Kit) contains the extra stuff necessary (and also helpful) to develop in Java.

  • Compatibility between Java crypto and open ssl

    Hello
    I have some question about compatibility between java crypto and openssl library.
    This is my case:
    1.I created DESede key and stored it to file:
    SecretKey key = KeyGenerator.getInstance("TripleDES").generateKey();
    File f = new File("c:\\key.dat");
    DataOutputStream dos =new DataOutputStream(new FileOutputStream(f));
    dos.write(key.getEncoded());
    dos3.close();2.I encrypt some file "c:\\normal.dat" through:
    ecipher.init(Cipher.ENCRYPT_MODE, key2);
      byte[] enc = ecipher.doFinal(normalData);
      File f2 = new File("c:\\enc.dat");
      DataOutputStream dos =new DataOutputStream(new FileOutputStream(f2));
      dos.write(enc);
      dos.close();

    You have carefully left out some critical java code, namely the Cipher.getInstance() method. You'll notice in the documentation for this method that there 3 components to the "transform" argument of this method, the algorithm, the mode, and the padding. All of these must match exactly with the what openssl is using. Furthermore, if you are using one of the modes which require an IV, like CBC mode, then this must match exactly too. If you don't explicitly specify some of these parameters, you might get default values supplied. It is up to you to find out what these are.

  • Can we call a Java Map in Message  Map

    Hello,
    Can we call a Java Map in Message  Map
    Thanks and Regards
    Hemant

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

  • What's the difference between Java SDK and the Enterprise Edition?

    What's the difference between Java SDK and the Enterprise Edition? Are they both free?

    both r free but they are used in diffrent applications. sdk are used for simple apps that run on your computer while j2e (enterprise edition) are ment for large distributed computer systems that include servers and such. if you don't know the diffrence you probably wont need the the j2e, only the sdk.

  • Java Maping and ABAP Mapping

    Hello,
    Pls let me know about Java Maping and ABAP Mapping
    Also pls provide good simple scenario blogs for Java Maping and ABAP Mapping.
    Regards

    Hi Ranchit,
    Check these links for Mappings
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9202d890-0201-0010-1588-adb5e89a6638
    https://websmp102.sap-ag.de/~sapdownload/011000358700003604872004E/MappingXI30.pdf  (Need Service Makrket place ID)
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8a57d190-0201-0010-9e87-d8f327e1dba7
    JAVA Mapping BLOGS
    /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
    /people/stefan.grube/blog/2006/10/23/testing-and-debugging-java-mapping-in-developer-studio
    ABAP Mapping Blogs
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e3ead790-0201-0010-64bb-9e4d67a466b4
    /people/sameer.shadab/blog/2005/09/29/testing-abap-mapping
    Sachin
    Message was edited by:
            Sachin Dhingra

  • Java Mapping  and Graphical Mapping

    Hi All,
    Could any one clarifies the situation where we need to write in a same interface ,
    Both Java mapping and Graphical mapping.
    Regards,
    venu.

    Hi,
       Here is a scenario where you might need to use both graphical and user defined functions.
    source: <fname> <lname> <filename>
    target: <name> <filetype>
    Suppose, you need to concatenate fname and lname into the target <name> tag, you could use the normal graphical mapping using the concat function.
    <fname>\
    concat <name>
    <lname>/
    next, if we need to extract only the filetype from the filename, for example, if we have filename.txt... and we want only the value .txt, we need to write a user defined function which would achieve this for u, since there are no inbuilt function which can solve this for you in graphical mapping.
    Further XSLT mapping comes into picture when we need to create the entire target xml structure. Again, graphical mapping would not be useful here.
    Regards,
    Smitha.

Maybe you are looking for

  • How to set up internet connection between MacBook Pro and an old eMac?

    I got an old eMac without wifi and a MacBook Pro. I'd like to share the network connection via ethernet cable to my eMac, but I can't get it work. I'd like to use it with screenrecycler and it needs a network connection. How to do it? How to set up t

  • How to get ContextHandlerCallback in LoginModule

    Hi everyone, I want to get ContextHandlerCallback in my login module. I need it to get ContextHandler. To do this I do this code: Callback[] callbacks = { new ContextHandlerCallback() }; ContextHandler contextHandler = ((ContextHandlerCallback) callb

  • Mass Generation of Billing output

    Hello Gurus, The output condition record for EDI invoices was not entered at the beginning for a customer, so as a result I have many invoices for which I need to generate the EDI output record. I know I can go into each invoice (VF02) and generate i

  • Flex mobile add emoticons and text

    I created a chat program in the mobile project, but I can not add emoticons,I know textarea can not display pictures,So I reluctantly use RichEditableText, it can add a picture, but why can not I enter characters (letters and Chinese characters) in t

  • Technically completion of PI sheet collectivly

    Hello, I would like to know if it is possible to set to tecnically complete PI sheets in a collective way! I can only find the individual option in trx CO56 . If  this is not posssible, maybe there is another way around to let appear automatically th