ERP Database - The Unofficial ERP Knowledge Base

Facebook Twitter del.icio.us Digg it
ERP Database contains a huge collection of articles related to ERP System and Software. Many of the articles are specifically related to SAP. All these ERP/SAP articles are freely available to everyone.

If you would like to submit an article or share any document related to ERP or any specific ERP software. Please mail it to support@erpdb.info. Please make sure that the documents are not copyrighted.
Social Bookmarks:

Create OO ALV without Container

Print This Post Email This Post Written by rajivsharma.sap on Jul 9th, 2009 | Filed under: ABAP Programs

Guest post by Rajiv

Usually, you will need to create a container in SE51 in order for the OO ALV to be displayed in the container. Now, there is a little work around to it. Check this below ABAP Program to create an ALV without creating the container.

DATA: gr_alvgrid             TYPE REF TO cl_gui_alv_grid.
*----Creating ALV Grid instance
CREATE OBJECT gr_alvgrid
EXPORTING
i_parent          = cl_gui_container=>screen0
EXCEPTIONS
error_cntl_create = 1
error_cntl_init   = 2
error_cntl_link   = 3
error_dp_create   = 4
OTHERS = 5.
IF sy-subrc NE 0.
ENDIF.

Now call the method GR_ALVGRID ofcourse with relevant parameters

CALL METHOD gr_alvgrid->set_table_for_first_display
CALL SCREEN 100.  "<== Just double click and activate the screen.
Share


Leave a Reply