10-12-2020 6:17 AM
Dear All,
I am trying to fetch data from my custom report to another report. Problem is ,the called program is fetching data but not returning in caller program. I tried to debug in CL_SALV_BS_RUNTIME_INFO and found LT_COMPONENT in method GET_DATA_REF is not getting filled and therefore there is no values extracted in Caller program.
Here is the code.
cl_salv_bs_runtime_info=>set( EXPORTING display = abap_false metadata = abap_false
data = abap_true ).
SUBMIT ztest1 WITH so_bukrs IN so_bukrs
WITH so_fkdat IN so_fkdat
WITH so_vbeln IN so_vbeln
EXPORTING LIST TO MEMORY
AND RETURN.
TRY.
cl_salv_bs_runtime_info=>get_data_ref( IMPORTING r_data = lr_pay_data1 ).
ASSIGN lr_pay_data1->* TO <lt_pay_data1>.
CATCH cx_salv_bs_sc_runtime_info.
MESSAGE 'Unable to retrieve ALV data' TYPE 'E'.
ENDTRY.
10-12-2020 6:33 AM
10-12-2020 6:46 AM
Dear Frederic Girod,
Thanks for your reply. ZTEST1 is an ALV report which also have other SUBMIT report(custom) inside that.
I am getting data from this report. Can also see output if comment on line EXPORT LIST TO MEMORY. But this class cl_salv_bs_runtime is not populating components.
10-12-2020 10:51 AM
Could you give information about ZTEST1 and "report(custom)" program how they generate the ALV, what type of ALV?
NB: if you have a problem, you should simplify the problem to the minimum. Here you have 2 programs. Try with only 1 program. Does it work?
10-12-2020 11:00 AM
Dear Rossi,
I am using Custom container for ALV in ZTEST1 and the SUBMIT report using in ZTEST1 also have same ALV type. Those are working fine. Actually ZTEST1 is a big report. I just need to use the output of that report in my new program. I can try with only one program but that also needs huge changes in both programs.
Please see, if I use FM LIST_FROM_MEMORY, i am getting data but i need to get those data in internal table. Also I have doubt that I cannot get large volume of data using this FM.
10-13-2020 3:52 AM
As the problem is solved, i'm closing the thread. Thanks Sandra Rossi for your idea of simplification.
Best regards.