cancel
Showing results for 
Search instead for 
Did you mean: 

Java mapping how to use com.sap.tc.logging

Former Member
0 Kudos

Hi I would like to know how to use logging within a java mapping.

I know i have to use theese classes : Location, Category, ConsoleLog but i dont know how.

1) How to load the P1, P2, P3 and P4 tags in the Error tag of the SOAP header watched in SXMB_MONI

- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">

<SAP:Category>Application</SAP:Category>

<SAP:Code area="MAPPING">STREAM_TRANSFORMATION_EX</SAP:Code>

<SAP:P1>SwissMedical/Interfaces/IFI002/LiquidacionMapping~</SAP:P1>

<SAP:P2 />

<SAP:P3 />

<SAP:P4 />

<SAP:AdditionalText />

<SAP:ApplicationFaultMessage namespace="" />

<SAP:Stack>Java mapping of application triggered an exception</SAP:Stack>

<SAP:Retry>M</SAP:Retry>

</SAP:Error>

2) How to load and activate log in the DIAGNOSTIC tag of the SOAP Header.

- <SAP:Diagnostic xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">

<SAP:TraceLevel>Information</SAP:TraceLevel>

<SAP:Logging>Off</SAP:Logging>

</SAP:Diagnostic>

Thanks!!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

As already suggested, you can display custom messages using AbstractTrace.

trace = (AbstractTrace)param.get( StreamTransformationConstants.MAPPING_TRACE );

trace.addInfo("G1-CYCLE is missing");

For more on coding front refer:

http://help.sap.com/javadocs/NW04/current/pi/com/sap/aii/mapping/api/StreamTransformation.html

To get this trace seen in MONI, set parameter TRACE_LEVEL in SXMB_ADM to 2.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello Mariano,

Please refer to OSS note # 1090753 - Creation of logs for WebChannel/E-Commerce applications

https://service.sap.com/sap/support/notes/1090753

including the attached PDF which explains logging.

Hope this answers your question.

Regards,

Rasmus

stefan_grube
Active Contributor
0 Kudos

I don't think you can use com.sap.tc.logging in Java mapping.

Use AbstractTrace instead.