cancel
Showing results for 
Search instead for 
Did you mean: 

Java Proxy logging

rodel_nanca3
Explorer
0 Kudos

I want to do logging (for displaying debugging/information/errors) in Java Proxy. Does SAP Java API have a logging class that I can use?

Accepted Solutions (1)

Accepted Solutions (1)

henrique_pinto
Active Contributor
0 Kudos

Use AbstractTrace class from mapping API: http://help.sap.com/saphelp_nw70/helpdata/en/c8/98e7d5c1620642973565ea3dd319d1/frameset.htm

Here's the javadoc (go for com.sap.aii.mapping.api package): https://help.sap.com/javadocs/NW04S/SPS09/pi/index.html

And here's some sample code for instantiating the trace object: http://help.sap.com/saphelp_nw70/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/frameset.htm

Regards,

Henrique.

Edited:

Oooooooops, sorry. You wanted for Java Proxies, not Java mappings. My bad.

Since Java proxies are deployable EJBs, you should use SAP logging API.

In the below link, there is a general guide regarding tracing & logging on SAP J2EE engine (it includes a reference to SAP Logging API):

http://help.sap.com/saphelp_nw70/helpdata/en/d2/5c830ca67fd842b2e87b0c341c64cd/frameset.htm

Its javadoc may be found in the SAP NWDS Help (look for com.sap.tc.logging package).

I will leave the Java mapping logging reference since it may be useful to someone else.

Best regards,

Henrique.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi !

You can make some JCO calls from inside your java proxy code, to execute this BAPIs on your XI system

APPL_LOG_INIT

APPL_LOG_SET_OBJECT

APPL_LOG_WRITE_DB

APPL_LOG_WRITE_HEADER

APPL_LOG_WRITE_LOG_PARAMETERS

APPL_LOG_WRITE_MESSAGES

Then you could access transaction SLG1 in your XI system to see the log.

Regards,

Matias

PS: please award points if helpful