Simply display internal table into ALV grid

Simply display internal table into ALV grid

To display content of internal table into ALV grid, use this method :


  DATA : lo_table TYPE REF TO cl_salv_table. 

* Create ALV 
  TRY. 
      cl_salv_table=>factory( IMPORTING r_salv_table = lo_table 
                               CHANGING t_table      = gi_data_to_display ). 
      CATCH cx_salv_msg. 
  ENDTRY. 

* Display ALV grid 
  lo_table->display( ).

Example of use in SAP demo program : SALV_DEMO_TABLE_REAL_SIMPLE.

Go further with post : Create ALV with class CL_SALV_TABLE

About the author

fjourneau administrator

Hi, I'm Florian Journeau, SAP ABAP R3 Freelance, based in Toulouse, France. You want to know more about me, have a look on my CV : cv.fjourneau.net.

3 Comments so far

f.s.Posted on11:51 am - Aug 5, 2020

Exactly what I needed!
Cheers!
f.s.

ClemclemPosted on4:30 pm - Nov 18, 2024

Mieux que ChatGPT, je recommande.

Leave a Reply