cancel
Showing results for 
Search instead for 
Did you mean: 

simple java-mapping

Former Member
0 Kudos

can i have a file2file scenario which uses simple java-mapping. As i m new to Java, jus wanna learn how it happens.

I wanna know how to code the Java mapping .....and how to utilize it in the Interface Mapping.....

I know a bit of DOM parsing..

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi,

see the below links

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

Check this blog on Mapping:

/people/ravikumar.allampallam/blog/2005/02/10/different-types-of-mapping-in-xi

Also, check this thread for more info,

/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

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.highlightedcontent?documenturi=...ValidationsinSAPXI-ACaseStudy.pdf

http://www.cafeconleche.org/books/xmljava/chapters/ch09.html

http://www.cafeconleche.org/books/xmljava/chapters/ch06.html

Check these blogs for reference..

/people/udo.martens/blog/2006/08/23/comparing-performance-of-mapping-programs

/people/ravikumar.allampallam/blog/2005/06/24/convert-any-flat-file-to-any-idoc-java-mapping

java mapping /people/amol.joshi2/blog/2006/03/10/think-objects-when-creating-java-mappings

Regards

Chilla

Former Member
0 Kudos

For java mapping

1.Develop Java code with ur IDE

2.create a .jar or .zip file

3.Create new imported archive and import the jar file

The java class must implement com.sap.aii.mapping.api.StreamTransformation

and must contain 2 methods

1. public void execute(java.io.InputStream in,

java.io.OutputStream out)

to perform the mappings.

2. public void setParameter(java.util.Map param)

to access to runtime constants possible

(for example: INTERFACE, SENDER_NAME)

and requires libraries contained in aii_map_api.jar

Former Member
0 Kudos

Hi,

You can use Java Mapping for any scenario you want.

You can use DOM, but try to understand SAX too, as SAX takes up much less space.

If you want to make a completely new structure, use DOM, else use SAX. SAX works on the principle of event-handling.

DOM, on the other hand, needs to load the <i>entire</i> XML structure into memory. Hence, it is resource-intensive.

Regards,

Puloma.

prabhu_s2
Active Contributor
0 Kudos

configure a simple file-file scenario but here u dont go 4 graphical mapping rather u create a java mapping and import it as a JAR file and make use of the class.

Former Member
0 Kudos

prabhu u r true...i wanted a sample code that can do java mapping by parsing source XML and converting it to Target XML file

bhavesh_kantilal
Active Contributor
0 Kudos

Look into the blogs I have pointd out. They have source code and the explanation as well.

Regards

Bhavesh

prabhu_s2
Active Contributor
0 Kudos

coudlnt find ur mail id for fwd a simple code

bhavesh_kantilal
Active Contributor
0 Kudos

Start of with these 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

Regards

Bhavesh