[英]cl_salv_bs_runtime_info=>get_data_ref() returns no data
I have this code, which works very nice for a lot of reports:我有这个代码,它适用于很多报告:
if IV_SELECTION_SET_VARIANT is INITIAL.
SUBMIT (IV_REPORT_NAME)
WITH SELECTION-TABLE selection_table
AND RETURN.
ELSE.
SUBMIT (IV_REPORT_NAME)
WITH SELECTION-TABLE selection_table
USING SELECTION-SET IV_SELECTION_SET_VARIANT
AND RETURN.
endif.
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 AdHoc Queries the line IF lr_data_descr IS NOT BOUND.
但是对于 AdHoc 查询,
IF lr_data_descr IS NOT BOUND.
该行IF lr_data_descr IS NOT BOUND.
is true and ev_result_json
is empty.为真且
ev_result_json
为空。
What could be the reason for this?这可能是什么原因?
The name of the report is AQZZZMM=========ZME80FN=======
.报告的名称是
AQZZZMM=========ZME80FN=======
。
The method cl_salv_bs_runtime_info=>get_data_ref
provides data only if in your precedent SUBMIT
call an ALV grid control had been called, and the writing of the data has been requested before (internally by the submitted report, or explicitly, by calling the method cl_salv_bs_runtime_info=>set
beforehand).方法
cl_salv_bs_runtime_info=>get_data_ref
仅当在您的先例SUBMIT
调用中调用了 ALV 网格控件时才提供数据,并且之前已请求写入数据(在内部由提交的报告,或显式地,通过调用方法cl_salv_bs_runtime_info=>set
预先cl_salv_bs_runtime_info=>set
)。
cl_salv_bs_runtime_info=>get_data_ref
will give you no data.cl_salv_bs_runtime_info=>get_data_ref
将不会给您任何数据。cl_salv_bs_runtime_info=>get_data_ref
will give you no data.cl_salv_bs_runtime_info=>get_data_ref
不会给你任何数据。cl_salv_bs_runtime_info=>get_data_ref
will retrieve the data from the last displayed ALV grid control (the last grid for which the method SET_TABLE_FOR_FIRST_DISPLAY
has been called).cl_salv_bs_runtime_info=>get_data_ref
将从最后显示的 ALV 网格控件(已调用方法SET_TABLE_FOR_FIRST_DISPLAY
的最后一个网格)检索数据。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.