10-29-2008 4:07 PM
Is it possible to call a ALV grid display in a class~method.
I thought, I would call a screen and make a ALV grid display using the control frame work,it is no possible to call screen inside a method.
Then i tried to avoid calling the screen..
data: dockingleft type ref to cl_gui_docking_container,
alv_left type ref to cl_gui_alv_grid,
repid type syrepid.
repid = sy-repid.
check dockingleft is initial.
create object dockingleft
exporting repid = repid
dynnr = sy-dynnr
side = dockingleft->dock_at_left
extension = 1700.
create object alv_left
exporting i_parent = dockingleft .
call method alv_left->set_table_for_first_display
exporting
i_structure_name = 'SMESG'
changing
it_outtab = TSMESG[]
EXCEPTIONS
INVALID_PARAMETER_COMBINATION = 1
PROGRAM_ERROR = 2
TOO_MANY_LINES = 3
others = 4.
This doesn't seem to invoke the ALV grid. Any suggestions ?
10-29-2008 4:21 PM
Yes, use the CL_SALV_TABLE class instead. It is OO based, and you do not have to create a screen.
Regards,
Rich Heilman
10-29-2008 4:18 PM
Hi,
You need to call you custom screen with custom container like the following
create object g_docking_container_1
exporting
repid = g_repid
dynnr = '100' "Place the custom container in 100
extension = 1700
side = cl_gui_docking_container=>dock_at_left.
then
call method alv_left->set_table_for_first_display
a®
10-29-2008 4:21 PM
Yes, use the CL_SALV_TABLE class instead. It is OO based, and you do not have to create a screen.
Regards,
Rich Heilman
10-29-2008 4:49 PM
Rich,
I think this class is not available in 4.7. We are on 4.7 and I cannot call a screen inside a method.
THanks,
Shareen
10-29-2008 5:23 PM
10-29-2008 5:25 PM
Hi Shareen,
In ECC 6.0 SALV concept comes into the picture. For your case Ver4.7 there is not SALV Concept.
Thanks,
Chidanand
10-29-2008 6:53 PM
fyi,
It is also available in ECC 5.0 (NetWeaver 2004, Basis 6.40).
Cheers,
Jamie
03-30-2009 3:32 PM