on 10-23-2014 9:20 PM
Hi again,
Maybe this is just a basic question, is the technical trace only available for the simulation tool?
Is there any way to activate it temporally, I am saying this because in the simulation mode I am not able to load the test data (due to the function signature) and I have to add it manually which is very time consuming. If is possible, could you provide me some details on how to activate it?
Regards,
M.
The trace mode can be defined when calling the function from ABAP:
lr_function->process( EXPORTING io_context = lr_context
iv_trace_mode = if_fdt_constants=>gc_trace_mode_technical iv_timestamp = lv_timestamp
IMPORTING eo_result = lr_result
eo_trace = lr_trace ).
You can get the result back as XML:
lr_trace->read( IMPORTING ev_trace = e_xml_trace ).
You can even start to think of converting the XML document to HTML or TEXT using an XSL Transformation (CALL TRANSFORMATIO command):
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/sapxsl" xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<xsl:strip-space elements="*"/>
<xsl:template match="/">
<asx:abap>
<asx:values>
<ROOT>
<xsl:apply-templates/>
</ROOT>
</asx:values>
</asx:abap>
</xsl:template>
<xsl:template match="/FDT/LOG/TEXT">
<item>
<xsl:value-of select="string(.)"/>
</item>
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="/FDT/LOG/CONTEXT_UPDATE">
<item>
<xsl:value-of select="concat(string(@DataObjectName), ' is assigned to ' , string(text()))"/>
</item>
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="text() | @*">
</xsl:template>
</xsl:transform>
The logs can also be stored the DB. Please be aware that the persistance of those Messages has been optimized.
BR Tobias
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Tobias,
Sorry my ABAP ignorance, how should the lr_result
be defined?
For example:
DATA: lt_name_value TYPE | abap_parmbind_tab, |
lv_function_id TYPE if_fdt_types=>id, | |
lo_trace_plus TYPE REF TO if_fdt_trace, |
lv_timestamp TYPE | timestamp. |
"Trace active
MOVE abap_true TO lv_trace_gen.
CALL METHOD cl_fdt_function_process=>process
EXPORTING
iv_function_id = lv_function_id
iv_timestamp = lv_timestamp
iv_trace_mode = if_fdt_constants=>gc_trace_mode_technical
IMPORTING
eo_trace = lo_trace_plus
eo_result = lr_result
CHANGING
ct_name_value = lt_name_value.
Many thanks,
Mario
I recently published a document on this very question.
Please take a look at Tracing in SAP Decision Service Management.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.