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