Skip to Content
0
Oct 12, 2020 at 05:17 AM

cl_salv_bs_runtime_info is not retriving data from Called program

173 Views Last edit Oct 12, 2020 at 05:17 AM 2 rev

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.