on 04-16-2008 3:44 PM
Hi,
Question:
1. What is java mapping.
2. How I use java mapping/UDF in message mapping
for my below scenario
In my Request XML there are 2 fields.
In my Response XML there are 2 fields.
Field 1 of Request XML needs to be mapped directly to
Field 1 of Response XML.
Field 2 needs to be passed as paramter to java class and
java class will be give response that will be mapped to
Field 2 of Response XML.
Pls advice . It is urgent.
Regards
Hi Rac,
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
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
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
Thanks,
Satya Kumar.
Reward points if it is useful..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
My question is can Java Class that is used in Java Mapping be converted into a Method and can be used in User Defined Function of Messsage Mapping?
It means now instead of passing parameter to java class I will
pass parameters to User Defined Function and will get result back and map it to response structure.
Can this be done?
Thanks
Hi,
yes it's possible.
Please have a look here:
http://help.sap.com/saphelp_nw04/helpdata/en/22/e127f28b572243b4324879c6bf05a0/frameset.htm
It says:
> You can use your Java programs from imported archives in user-defined functions if the Java programs are located in the same, or an underlying software component version as the message mapping.
Regards
Patrick
Hi Bhanu,
So my scenario will be :
Request XML --- there are 2 fields.
Response XML --- there are 2 fields.
Field 1 of Request XML needs to be mapped directly to
Field 1 of Response XML.
Field 2 needs to be passed as paramter to User Defined Function.
Now this function will open Socket Connection and get response from Socket. Then socket response will be mapped to Field 2 of Response XML.
Am I corrcet?
Regards
Hi Bhanu/ Ravi
Thanks a lot!!!
Please let me know one more thing.
If suppose I need to use Java Class(Java Mapping).
I need to map first field of request xml directly to first field of response xml.
And 2nd field of request xml needs to send as parameter
to Java Class and response of Java Class to 2nd field of
response xml.
Can you pls describe me in deatil how to do it .
I will be available again in 1 hour. Pls advice.
Regards
Hi Rac,
If you go for Java Mapping, you don't use Message Mapping. I hope you know it. In Interface Mapping, you are going to chose the mapping type as Java. So, as you are expecting it is not possible for applying java mapping only for specific fields in source structure.
Java Mapping will take entire source structure and do the transformations (as defined in program), and generates an output strucure, which will be your target structure.
Hope you understand that applying java mapping only for Field 2 is not possible; instead you need to apply program for entire source.
Regards
Bhanu
Intelligroup.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.