Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

cl_salv_bs_runtime_info is not retriving data from Called program

former_member308418
Participant
0 Kudos

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.

5 REPLIES 5

FredericGirod
Active Contributor
0 Kudos

Could you give informations about ZTEST1 program ?

former_member308418
Participant
0 Kudos

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.

Sandra_Rossi
Active Contributor

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?

former_member308418
Participant
0 Kudos

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.

former_member308418
Participant
0 Kudos

As the problem is solved, i'm closing the thread. Thanks Sandra Rossi for your idea of simplification.

Best regards.