2007 Aug 22 2:27 PM
Hi ALV Xperts
I've a requirement where initially a ALV list/grid is displayed and cliking on a data i need the detail items in the same page next to the displayed ALV grid....something like the display functionality of SE80. I know this is possible via control containers and using ALV classes but i dont have a clue on how to proceed with that nor any documents i have. Kindly let me know on how to achieve it.
thkx
Prabhu
Hi ALV Xperts
I've a requirement where initially a ALV list/grid is displayed and cliking on a data i need the detail items in the same page next to the displayed ALV grid....something like the display functionality of SE80. I know this is possible via control containers and using ALV classes but i dont have a clue on how to proceed with that nor any documents i have. Kindly let me know on how to achieve it.
thkx
Prabhu
2007 Aug 22 2:37 PM
2007 Aug 22 2:39 PM
What you are referring to is the use of docking containers, this can be done in a view ways, where you have one docking container hanging from one screen, and the screen is updated when the user click on something in the docking container, another is eventing across docking containers, so there are two containers, you click someting in the first and the second container is filled accordingly. This is an example of that below. Click on a material and see the MARC values in the second container
report zrich_0001 .
data: imara type table of mara.
data: xmara like line of imara.
data: imarc type table of marc.
data: dockingbottom type ref to cl_gui_docking_container,
dockingtop type ref to cl_gui_docking_container,
alv_bottom type ref to cl_gui_alv_grid,
alv_top type ref to cl_gui_alv_grid,
repid type syrepid.
*---------------------------------------------------------------------*
* CLASS lcl_event_handler DEFINITION
*---------------------------------------------------------------------*
* ........ *
*---------------------------------------------------------------------*
class lcl_event_handler definition.
public section.
class-methods handle_double_click
for event double_click of cl_gui_alv_grid
importing e_row e_column.
endclass.
*---------------------------------------------------------------------*
* CLASS lcl_event_handler IMPLEMENTATION
*---------------------------------------------------------------------*
* ........ *
*---------------------------------------------------------------------*
class lcl_event_handler implementation.
method handle_double_click.
read table imara into xmara index e_row-index.
select * into table imarc from marc
where matnr = xmara-matnr.
call method alv_bottom->refresh_table_display( ).
endmethod.
endclass.
parameters: p_check type c.
start-of-selection.
at selection-screen output.
repid = sy-repid.
select * into corresponding fields of table imara
from mara up to 100 rows.
check dockingbottom is initial.
create object dockingtop
exporting repid = repid
dynnr = sy-dynnr
side = dockingtop->dock_at_top
extension = 200.
create object alv_top
exporting i_parent = dockingtop.
call method alv_top->set_table_for_first_display
exporting
i_structure_name = 'MARA'
changing
it_outtab = imara[].
* handler for ALV grid
set handler lcl_event_handler=>handle_double_click for alv_top.
create object dockingbottom
exporting repid = repid
dynnr = sy-dynnr
side = dockingbottom->dock_at_bottom
extension = 200.
create object alv_bottom
exporting i_parent = dockingbottom.
call method alv_bottom->set_table_for_first_display
exporting
i_structure_name = 'MARC'
changing
it_outtab = imarc[].
Regards,
RIch Heilman
2007 Aug 22 2:43 PM
RIch
this looks so kool and i want to build my skill on such concepts. can u point to some pdf docs which helps me in this? if time permits can u mail to [email protected]
thkx
Prabhu
2007 Aug 22 2:47 PM
is it possible to do it using control container defined in screen painters? if yes kindly guide on how to get it done?
2007 Aug 22 2:51 PM
2007 Aug 22 2:55 PM
can u point to some docs that could help me to build my skills on it?