cancel
Showing results for 
Search instead for 
Did you mean: 

Enabling Trace for BRFplus Calls

Former Member
0 Kudos

Hi,

I'm facing the following issue and I hope someone can suggest a solution:

I want to enable trace for BRFplus function calls I make out of ABAP in order to see the execution log later. I call the function with the following code:

cl_fdt_function_process=>process(
          EXPORTING
            iv_trace_mode = if_fdt_constants=>gc_trace_mode_lean
            iv_function_id = lv_function_id
            io_context = lo_context
            iv_timestamp = lv_timestamp
          IMPORTING
            ea_result = <fs_result>
            eo_trace = lo_trace
        ).
lo_lean_trace ?= lo_trace.
lo_lean_trace->save( ).

This gives me an exception in the save-method because the returned trace is in technical mode, although I requested lean mode in the process-call.

     Supplied trace mode contradicts supplied trace instance

I checked the function with FDT_LEAN_TRACE_READY_CHECK and it says the function is lean trace ready. I tried gs_trace_mode_lean_required as an alternative, and now, I already get an exception in the process call:

     Processing in generation mode is currently not possible

That leads to two question:

1) What is it that I'm missing to make the lean trace mode work?

2) If I can't get the lean mode working, is there a way to persist the technical trace so I can look at it in the workbench? I didn't find a class with a save-method

Thanks,

Tobias

Accepted Solutions (0)

Answers (1)

Answers (1)

carsten_ziegler
Active Contributor
0 Kudos

Looks like your instance LO_TRACE has been used before and it was used in technical trace. Maybe do a clear on the instance and then call the process method.

Former Member
0 Kudos

Thanks for your reply Carsten.

I tried to clear the variable but is doesn't change anything. Actually, it has always been initial when the process-method is called.

I did a little bit of further debugging and there seems to be a problem with the generated function. Within the process-method, no generated class can be found and interpretation mode is used as a fallback, which uses technical trace by default.

Therefore I looked at the "Generated Code"-tab of the function in the workbench and it looks weird: There are generated classes, trace support is checked, they are valid, but they don't have a name.

So I used the FDT_GENERATION_TOOL report to manually generate the class, and I receive the followeing error message:

Generation for 0050568E41441EE2AFBF65D9222FC361 failed: The data object "<_V_SOURCE_LINE5>" has no structu

Message no. FDT_CORE503

But I can't find a data object with that name in my application... Any idea how to solve this issue?

carsten_ziegler
Active Contributor
0 Kudos

I think you miss a note. Maybe search for notes with text _V_SOURCE.

Open a ticket when you cannot find a good note.