03-20-2008 7:41 AM
hello experts,
in a module pool programming on the 3rd screen i need to display a list in alv format.
i have populated the alv table and fieldcatalog but cant understand how to call a screen and display the list.
do i need to use some abap classes instead of reuse_alv_grid_display?
if i o need then what will be the flow of codes?
please help...........
03-20-2008 10:24 AM
Hi Agnihotro,
In the PAI of 2'nd screen you have to call the 3'rd screen.
before the call statement create object ....for grid and container, set layout and fields cat and then display grid, after this CALL SCREEN 3'rd screen.
Regds,
Gaurav
03-20-2008 10:33 AM
Hi..
try in this way...
Create a screen with Custom container...call that screen in ur program....
find some classes which is useful for display alv grid list ...
cl_gui_alv_grid,clgui_custom_container,
methods: set_table_for_first_display...
This is for simple list.....
data <name of reference variable> type ref to cl_gui_alv_grid.
DATA: grid TYPE REF TO cl_gui_alv_grid, g_custom_container TYPE REF TO cl_gui_custom_container ,
gt_sflight TYPE TABLE OF sflight.
SELECT * FROM sflight INTO TABLE gt_sflight.
In the PBO module of the screen,
IF g_custom_container IS INITIAL.
CREATE OBJECT g_custom_container
EXPORTING CONTAINER_NAME = 'CCCONTAINER'.
CREATE OBJECT GRID1
EXPORTING I_PARENT = g_custom_container.
ENDIF.
In the PAI module of the screen,
CALL METHOD grid->set_table_for_first_display EXPORTING I_STRUCTURE_NAME = 'SFLIGHT'
CHANGING IT_OUTTAB = gt_sflight.