This code has been working nicely for several months now:
SUBMIT (IV_REPORT_NAME)
WITH SELECTION-TABLE selection_table
USING SELECTION-SET IV_SELECTION_SET_VARIANT
AND RETURN.
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( 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 in one of the cases it is called through RFC and throws
lr_data_descr is NOT BOUND
It works fine via SE37, but if executed via RFC throws the error despite I use the very same user (type "service") for RFC and SE37, same input and same code.
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() and found out 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 se37 then sy-subrc
is 0, and if I do external debugging with the same user then sy-subrc
is 4.
It is an adhoc report, its name is AQZZZMM=========ZME80FN=======
NONE
(screen field above the parameters)? PS: a "service" user is dialog-capable, and the OP said he debugged both cases with the same user so I think it's not a user problem; moreover RFC is GUI-capable provided that you select it when you open the RFC connection (activated by default with SAP) – Sandra Rossi