cancel
Showing results for 
Search instead for 
Did you mean: 

Using trace in UDF

Former Member
0 Kudos

Hey,

I try to use trace in my UDF but can not see it in my test environment of graphical mapping.

Could it be, that the trace is only visibile in message monitoring sxmb_moni?

I thought I will also see it in Integration Repository.

MappingTrace importanttrace;

importanttrace = container.getTrace();

importanttrace.addWarning("Test");

If I cannot see it in Repository, why I can set up the trace level there?

Thanks in advanced.

Regards

Chris

Accepted Solutions (0)

Answers (5)

Answers (5)

prasannakrishna_mynam
Contributor
0 Kudos

Hello Christian,

MappingTrace importanttrace;
importanttrace = container.getTrace();
importanttrace.addWarning("Test");

You can see the trace at desgining level in Integration Repository, in order to view that you have to choose the trace option to All and before executing your text. For instance in your case you are addeding the warning to the trace, select the Trace level Warning/All before you run the test.

Regards,

Prasanna

Former Member
0 Kudos

Hello,

thank you all.

@Rajesh

I will test, if this code would do any changes.

@Prasanna:

I already selected "All", but I couldn't see any of my traces. Therefore I think that tracing can only be seen

in sxmb_moni.

regards

Chris

Former Member

Hi Chris,

If you want to trace the values at runtime use this below code in your UDF.

MappingTrace mt = container.getTrace();

mt.addInfo("<Some description>.." + <Trace_Variable_Name>);

Regards

Ramesh

Former Member
0 Kudos

Use Container Class

container.getTrace().addWarning("");

Rajesh

Shabarish_Nair
Active Contributor
0 Kudos

the udf should be triggered for the trace be displayed.

in the test instance window make sure you have provided the trace level to "ALL" so that you can see the trace messages you have included.

Former Member
0 Kudos

Mapping Trace Object:

This object enables you to transfer messages to the mapping trace. If the trace level is set correspondingly (see Displaying/Changing Configuration Data), then the trace is visible in message monitoring (transaction SXMB_MONI)

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

Former Member
0 Kudos

Hi,

Trace will be available in runtime.

>If I cannot see it in Repository, why I can set up the trace level there?

You are setting trace because you want to make it available during runtime when something goes wrong you can analyze this trace.

Regards,

Gourav