cancel
Showing results for 
Search instead for 
Did you mean: 

Java mapping

Former Member
0 Kudos

Hi Guys;

Can I have some information regarding:

1) Why Java mapping is needed?

2) How do we achieve it?

Screenshots will be appreciated.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

You can use Java mapping when you can achieve functionality by standard mapping tool.

There is no screen shot for same. You need to write a java function and upload as a jar archieve.

visit the link ...

http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm

You can see basic information on help and few blogs are also on SDN.

Thanx & Regards

Vinod

Answers (5)

Answers (5)

prabhu_s2
Active Contributor
0 Kudos

<b>1) Why Java mapping is needed?</b>

when u req is not sorted out in graphical mapping u go4 java

<b>2) How do we achieve it?</b>

create a java program using sax or dom parsers and convert them into jar file. upload it to interface mapping and use them

for screen shot u can drop a mail to mailprabhu@gmail.com.

Former Member
0 Kudos

JAVA Mapping :If you have complex mapping in your scenarios and also some times if you have more than 100 field tomap then better to choose the 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.

DOM and SAX are APIs

In NWDS we have to develop the mapping and create jar and archieve and import it under Iported archieved in IR. this can be used in Interface mapping.

See the below links so that you can have screen shots,...

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

Testing and Debugging Java Mapping -/people/stefan.grube/blog/2006/10/23/testing-and-debugging-java-mapping-in-developer-studio

Regards

Chilla..

<i>Points rewarded if it is usefull..</i>

Former Member
0 Kudos

Hi SAP XI,

<b>Why Java mapping is needed?</b>

There are no hard and fast rules!

Java Mapping is used when the mapping is complex and there is a deep nested strcutue!

<b>How do we achieve it?</b>

1) Develop your code in Netweaver developer studio or any java editor(Eclipse).

2) you can use any parser techniques either DOM Or SAX.

3) SAX is bit tuff but the efficiency is more DOM implemention is bit easy..compare to SAX the efficiency is less.

4) Develop your code with out main method.

5) save it and create a jar file for that corresponding program.

6) Go to IR ..you will be creating DT,MT,MI but you will not create Mapping program because you are using java mapping instead of Graphical Mapping.

7) click on imported objects there you need to give name for the improted objects here we are importing the jar file of the java program.

😎 Go to Interface mapping and there you need to select the module as java class and you have select the mapping program as the name you have created in the imported objects.

9) The next process is same.

What we are achieving is instead of message mapping Using Graphical Editor we are achieving the Mapping Program using Java....by implementing the SAX or DOM...These are the two techniques for parsing the XML Messages.

Hope I am clear.

Please let me know if you have any queries..!

Thanks and Regards,

Chandu.

former_member91687
Active Contributor
0 Kudos

Hi,

>><i>Why Java mapping is needed?</i>

When handling the mapping using graphical mapping gets complex, say a non XML structure or you have a comlpex structure for example and the like.

>><i>How do we achieve it?</i>

You need to have an IDE such as NETWEAVWER DEVELOPER STUDIO installed on your system. Once this is done these are the steps you need to follow to write the program and to be able to use it in the directory:

1. Write your java program.You need the libraries aii_map_api.jar and inqmyxml.jar.You can use SAX or DOM for navigating through the source XML and creating the target XML.

2. Create Jar file. After compiling your program, you have to create a jar file. The content of the jar file have to be all classes and libraries you need for the mapping program to run.

3.Load the JAR file into the IR.Go to the Integration Repository. Under your Software Component and Namespace you create a new Mapping Object ‘Imported Archive’. Inside this object you upload the jar file.

4.Attach Java mapping to an interface mapping.

Create a new Mapping Object ‘Interface Mapping’, chose the interfaces you want to map. To attach the Mapping to the request or response, use ‘value help’ and chose ‘Java Class’. Chose the Java Class with the corresponding mapping. After saving and activating the change list, you will be able to use the Mapping in the Integration Directory.

Some very good blogs are available right here to help you out

/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,

Chandra

agasthuri_doss
Active Contributor
0 Kudos

Hi,

>> 1) Why Java mapping is needed?

It all depends upon the Scenerio Java mapping is flexible.

>>2) How do we achieve it?

Import the Java code and use it during the Mapping.

Java Mapping advantages

1)It support Parsing Techniques.

2)It is very easy to use and execute through developing by code.

3)Easy to implement Interfaces.

4)In java Mapping we can achieve even the Interface(outbound and Inbound)

structure are too difficult.

Regards

Agasthuri Doss