mustafayalcin.com

Creating an ALV Grid in 3 lines

by on Oca.21, 2009, under SAP

DATA: l_alv      TYPE REF TO   cl_gui_alv_grid,
         lt_sflight TYPE TABLE OF sflight.
SELECT * FROM sflight INTO TABLE lt_sflight.
* automatically use the full screen to display the grid,
* NO CONTAINER DEFINITION IS REQUIRED !
CREATE OBJECT l_alv EXPORTING i_parent = cl_gui_container=>screen0.
CALL METHOD l_alv->set_table_for_first_display
     EXPORTING i_structure_name = ‘SFLIGHT’
     CHANGING  it_outtab        = lt_sflight.
* You have to create an EMPTY screen
CALL SCREEN 100.

:, , ,
No comments for this entry yet...

Comments are closed.

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...