‎2006 Sep 21 4:51 AM
Hi,
I know that without creating a screen, we can display the ALV using OOP's....with the following code..
CREATE OBJECT o_alvgrid1
EXPORTING
i_parent = cl_gui_custom_container=>screen0.
WRITE space.
*-- Display Report
CALL METHOD o_alvgrid1->set_table_for_first_display
EXPORTING
i_save = 'A'
is_layout = wa_layout
is_variant = wa_variant
it_toolbar_excluding = lt_excl_func[]
CHANGING
it_outtab = i_cdhistory[]
it_fieldcatalog = i_fieldcat
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4.
But I want to know, how this is working internally. Without the 'WRITE' statement, display won't work. Why it is like that. What is happening inside. And why screen0 only....there are so many like screen1, screen2 ....screen9, desktop attributes in class cl_gui_custom_container.
Please explain me in detail / provide any material on this.
‎2006 Sep 21 10:00 AM
Hi ,
Please refer to the following link for explaination of functionality of the method set_table_for_display ..
http://help.sap.com/saphelp_47x200/helpdata/EN/bf/3bd1369f2d280ee10000009b38f889/frameset.htm
‎2006 Sep 21 10:12 AM
Hello Satya
I cannot explain why the WRITE statement has this effect (indeed, I did not know that this is possible) but at least I can explain to you the function of CL_GUI_CONTAINER=>SCREEN...
If your ALV list is displayed on a main dynpro (i.e. level 0) then you have to set:
i_parent = CL_GUI_CONTAINER=>SCREEN0However, if you want to display your ALV list in a popup (i.e. level 1) then - no surprise - you have to set:
i_parent = CL_GUI_CONTAINER=>SCREEN1I assume you set what screen level to use if you display your list in a popup within another popup.
Regards
Uwe