10-02-2008 8:40 AM
Hello experts.
I want to know , how i can display 2 alv in one screen in this way : when i push double click on the row ( in first alv ) i give the detail of this row in the new alv ( second alv ) under the first alv .
Thanks for the help,
AVI.
10-02-2008 8:43 AM
Hi,
Yes you can, you will need to create two containers on the screen and use them as the parent for each of the ALVs.
Darren
10-02-2008 8:58 AM
>
> Hi,
>
> Yes you can, you will need to create two containers on the screen and use them as the parent for each of the ALVs.
>
> Darren
You can give me the name of program that i can to see example for this case ? or maybe , example of code that generate 2 alv in one screen.
I will be very happy.
Thanks for the help.
AVI.
10-02-2008 9:02 AM
Sure, something like this...
report ztwo_alvs.
data: gt_alv1 type table of t001,
gt_alv2 type table of t001.
data: gr_splitter type ref to cl_gui_easy_splitter_container,
gr_alv1 type ref to cl_gui_alv_grid,
gr_alv2 type ref to cl_gui_alv_grid.
start-of-selection.
call screen 0100.
*&---------------------------------------------------------------------*
*& Module pbo OUTPUT
*&---------------------------------------------------------------------*
module pbo output.
data: lv_name type dd02l-tabname value 'T001'.
check ( gr_splitter is initial ).
create object gr_splitter
exporting parent = cl_gui_container=>screen0
orientation = 0
sash_position = 25.
create object gr_alv1
exporting i_parent = gr_splitter->top_left_container.
create object gr_alv2
exporting i_parent = gr_splitter->bottom_right_container.
call method gr_alv1->set_table_for_first_display
exporting
i_structure_name = lv_name
changing
it_outtab = gt_alv1.
call method gr_alv2->set_table_for_first_display
exporting
i_structure_name = lv_name
changing
it_outtab = gt_alv2.
endmodule. " pbo OUTPUT
where the screen is defined as
process before output.
module pbo.
process after input.
module pai.
Cheers,
Darren
10-02-2008 9:12 AM
Tanks for help,
If i want to create double click like this : push in row in first alv , and give the details in second alv under the first , how i can to apply this task ? you can give me the code that operate this task ?
Thanks for the help,
AVI.
10-02-2008 10:05 AM
hi Barton code is perfect ,
use that and create a custom container in the module pool .
what is ur exact req .
u can display 2 alv in 1 screen .
for eg. 1st half is 1st ALV , 2nd bottom half is 2nd Alv .
if u click . the 1 st Alv . is it need to change the 2nd alv display or the 1 st alv display . it can done using the Hide statement and the getcursor statement .
plz clearly mention ur Req .
regards
vinoth.v