SAP Tutorials Blog

 


DATA: t_spfli       TYPE STANDARD TABLE OF spfli,

      alv           TYPE REF TO cl_salv_table,

      error_message TYPE REF TO cx_salv_msg.


" Fill the internal table with example data

SELECT * FROM spfli INTO TABLE t_spfli.


" Fill ALV object with data from the internal table

TRY.

    cl_salv_table=>factory(

      IMPORTING

        r_salv_table = alv

      CHANGING

        t_table      = t_spfli ).

  CATCH cx_salv_msg INTO error_message.

    " error handling

ENDTRY.


" Use the ALV object's display method to show the ALV on the screen

alv->display( ).


Serkan AKKAVAK

Computer Engineer BSc

SAP Department Deputy Manager

Contact : serkurumsal@yandex.com