cancel
Showing results for 
Search instead for 
Did you mean: 

Need Help on JAVA Mapping

Former Member
0 Kudos

Hello All,

I am new to JAVA mapping in PI. Can any one suggest me What are steps need to be do for develop a simple java mapping interface.

In Advanced userdefind function under message mapping we can write java code. If i write system.out.println() Statement, Where will i check result.

Thanks&Regards,

VenkatK

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

go through the below blog on java sax maping

thanks

sankar

Answers (4)

Answers (4)

sunilchandra007
Active Contributor
0 Kudos

Hi ,

U can go thru following links :-

1. Java Mapping secrets revealed

2.Implementing a Java Mapping in SAP PI

3.Java Mapping

http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/content.htm

Regards,

Chandra

GabrielSagaya
Active Contributor
0 Kudos

1.- You should have any one of the Development Tool like SAP Netweaver Developer Studio, NetBeans, Eclipse

2.- Import aii_map_api.jar library.

3.- Write the Source code for the mapping program. (We need to know DOM or SAX parsing proccesing)

4.- Generate .jar file with the compiled class.

5.- Import Jar File in SAP PI.

6.- Use the program mapping in Interface Mapping.

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f0d97345-0801-0010-6595-fa5fd3a6...

In UDF

You can use Trace to check the value

AbstractTrace trace= container.getTrace();

trace.addWarning("Trace will be now seen using trace object");

More on this link,

http://help.sap.com/saphelp_nw04/helpdata/en/c8/98e7d5c1620642973565ea3dd319d1/content.htm

Also, in SXMB_ADM , you can set the TRACE_LEVEl parameters to 1 , 2 or 3. 3 will give you all info all pipeline steps. But, the problem will happen in the fact that memory gets filled up when trace is 3 and so make it 3 only for debugging!

Java Mapping

Former Member
0 Kudos

Hi,

For first question refer to blog

2. The System.out.print statement will be printed on the server command prompt where the xi server is running. You as developoer cannot see that. Although for debugging purpose you can use AbstractTrace trace.addInfo() to log and see the messages.

Thanks

Amit

Edited by: Amit Gupta on Jul 29, 2008 8:56 PM

Former Member
0 Kudos

Hi Amit,

I have all the permissions for accessing to PI server. Can you suggest me where is the path to check the result of System.out.print statement.

Thankls&Regards,

VenkatK

ravi_raman2
Active Contributor
0 Kudos

Venkat,

Ok..too many responses, nobody is reading your question..

IN your UDF........one of the params passed in is Container.........

add this

import com.sap.aii.mapping.api.AbstractTrace;

AbstractTrace at;

at = container.getTrace();

now you can write you sysout like this.......

//System.out.println("something");

at.addInfo("something);

or at.addWarning("Something");

Then run your mapping test...you will see this in the output log...........

Regards

Ravi Raman

Former Member
0 Kudos

Hi,

Check this blog:

Thanks,

Beena.