I have this code, which has been working very nice for several months now:
SUBMIT (IV_REPORT_NAME)
WITH SELECTION-TABLE selection_table
USING SELECTION-SET IV_SELECTION_SET_VARIANT
AND RETURN.
FIELD-SYMBOLS <lt_data> TYPE ANY TABLE.
FIELD-SYMBOLS <lt_data_line> TYPE ANY TABLE.
DATA lr_data TYPE REF TO data.
DATA lr_data_line TYPE REF TO data.
DATA lr_data_descr TYPE REF TO cl_abap_datadescr.
DATA lr_data_line_descr TYPE REF TO cl_abap_datadescr.
cl_salv_bs_runtime_info=>get_data_ref(
IMPORTING r_data_descr = lr_data_descr
r_data_line_descr = lr_data_line_descr ).
IF lr_data_descr IS NOT BOUND.
ev_result_json = '[]'.
EXIT.
ENDIF.
....
But for one reports lr_data_descr
is "NOT BOUND" if called via rfc.
It works if I run the function module via "test" in se80. But if I call it via rfc it is not bound. I use the very same user (type "service") for RFC and SE80.
With other words: Same input and same code. It works with normal debugging, but fails (not bound) with remote debugging.
Why is there a difference?
Is there a way to get some error message?
This would really help, if I could get the reason why it is not bound.
I debugged into get_data_ref():
This line behaves different:
import t_component to lt_component from memory id cl_salv_bs_runtime_info=>c_memid_data_def.
if sy-subrc eq 0.
If I test the function module in se80 sy-subrc is 0. If I do external debugging (same user), then sys-subrc is 4
.
It is an adhoc report. It's name: AQZZZMM=========ZME80FN=======