‎2006 Sep 05 10:50 AM
Hi All,
I am currently working on the ALV Grid that should be in background? How can I make this? Can anyone of you can provide me a sample code of a program that generates ALV Grid in background?
Thank you very much in advance!
‎2006 Sep 05 11:01 AM
HI,
If you are using function module technique then there is
no difference. it will be displayed in background in list format.
For oops this function do the trick.
<b>cl_gui_alv_grid=>offline( ) IS INITIAL.</b>
For OOPs technique use the following code.
<b>
data: g_custom_container type ref to cl_gui_custom_container.
data: G_DOCK TYPE REF TO CL_GUI_DOCKING_CONTAINER.
if g_custom_container is initial.
IF cl_gui_alv_grid=>offline( ) IS INITIAL.
create object g_custom_container
exporting container_name = g_container.
create object grid1
exporting i_parent = g_custom_container.
ELSE.
* If it is in backround:
CREATE OBJECT grid1
EXPORTING i_parent = G_DOCK.
ENDIF.
call method grid1->set_table_for_first_display
exporting
is_print = gs_print
is_layout = gs_layout
is_variant = gs_variant
i_save = 'A'
i_default = 'X'
changing it_fieldcatalog = ITAB_C[]
it_outtab = itab[].
endif.</b>
Regards,
‎2006 Sep 05 10:53 AM
‎2006 Sep 05 10:56 AM
‎2006 Sep 05 10:55 AM
‎2006 Sep 05 10:55 AM
Hi,
Check this code :
Data : o_container TYPE REF TO cl_gui_custom_container.
DATA : o_dockingcontainer_1 TYPE REF TO cl_gui_docking_container .
DATA: grid1 TYPE REF TO cl_gui_alv_grid.
IF NOT sy-batch = 'X'.
CREATE OBJECT o_container
EXPORTING
container_name = 'CONTAINER'.
CREATE OBJECT grid1
EXPORTING
i_parent = o_container.
ELSE.
CREATE OBJECT grid1
EXPORTING
i_parent = o_dockingcontainer_1.
IF sy-subrc NE 0.
ENDIF.
ENDIF.Regards
Appana
‎2016 Sep 02 5:04 PM
‎2006 Sep 05 11:01 AM
HI,
If you are using function module technique then there is
no difference. it will be displayed in background in list format.
For oops this function do the trick.
<b>cl_gui_alv_grid=>offline( ) IS INITIAL.</b>
For OOPs technique use the following code.
<b>
data: g_custom_container type ref to cl_gui_custom_container.
data: G_DOCK TYPE REF TO CL_GUI_DOCKING_CONTAINER.
if g_custom_container is initial.
IF cl_gui_alv_grid=>offline( ) IS INITIAL.
create object g_custom_container
exporting container_name = g_container.
create object grid1
exporting i_parent = g_custom_container.
ELSE.
* If it is in backround:
CREATE OBJECT grid1
EXPORTING i_parent = G_DOCK.
ENDIF.
call method grid1->set_table_for_first_display
exporting
is_print = gs_print
is_layout = gs_layout
is_variant = gs_variant
i_save = 'A'
i_default = 'X'
changing it_fieldcatalog = ITAB_C[]
it_outtab = itab[].
endif.</b>
Regards,
‎2006 Oct 19 9:01 PM
I'm considering using this code, but I'm not sure what the output looks like. Right now I'm gettting my ALV to output in batch, but some of the colums get cut off... I wanted to try this to see if that corrects the issue. Does the method allow what you see in the spool like a regular ALV table or is it a regualr print format?
Thanks for the help!
Eric Glenn
‎2006 Sep 05 11:19 AM
Hi Jason,
If your are running the pgm in background mode. You can only use LIST DISPLAY METHOD of ALV.
Regards
Saurabh
‎2006 Nov 15 6:56 AM
‎2006 Nov 15 7:15 AM
Hi ,
if you are on Higher versions then ALV Grid works well in Background.
But if you are using the ALV Class CL_GUI_ALV_GRID then you have to use the Logic mentioned in H R A 's Post.
Regards
Vijay