Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

OO ALV on selection-screen

Former Member
0 Kudos

Hi,

Is it possible to display a OO ALV on the same screen as the selection parameters ?

At first only have the selection-screen, and after validation, display the ALV at the end of the screen ?

1 ACCEPTED SOLUTION

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Yes, it is. you can implement in a docking container.



report  zrich_0005.

data: imara type table of mara with header line.
data: it001w type table of t001w with header line.

parameters: p_check type c,
            p_rad1 radiobutton group grp1 default 'X',
            p_rad2 radiobutton group grp1,
            p_rad3 radiobutton group grp1.

start-of-selection.

at selection-screen output.

  data: dockingbottom type ref to cl_gui_docking_container,
        dockingright  type ref to cl_gui_docking_container,
        alv_bottom    type ref to cl_gui_alv_grid,
        alv_right     type ref to cl_gui_alv_grid,
        repid type syrepid.

  repid = sy-repid.

  select * into corresponding fields of table imara
              from mara
                    where mtart = 'ZNBW'.

  select * into corresponding fields of table it001w
              from t001w.


  check dockingbottom is initial.

  create object dockingbottom
              exporting repid     = repid
                        dynnr     = sy-dynnr
                        side      = dockingbottom->dock_at_bottom
                        extension = 170.

  create object alv_bottom
                exporting i_parent = dockingbottom.


  call method alv_bottom->set_table_for_first_display
      exporting
           i_structure_name       = 'MARA'
      changing
           it_outtab       = imara[].

  create object dockingright
              exporting repid     = repid
                        dynnr     = sy-dynnr
                        side      = dockingright->dock_at_right
                        extension = 600.

  create object alv_right
              exporting i_parent = dockingright.

  call method alv_right->set_table_for_first_display
     exporting
          i_structure_name       = 'T001W'
     changing
          it_outtab       = it001w[].

Regards,

Rich Heilman

2 REPLIES 2

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Yes, it is. you can implement in a docking container.



report  zrich_0005.

data: imara type table of mara with header line.
data: it001w type table of t001w with header line.

parameters: p_check type c,
            p_rad1 radiobutton group grp1 default 'X',
            p_rad2 radiobutton group grp1,
            p_rad3 radiobutton group grp1.

start-of-selection.

at selection-screen output.

  data: dockingbottom type ref to cl_gui_docking_container,
        dockingright  type ref to cl_gui_docking_container,
        alv_bottom    type ref to cl_gui_alv_grid,
        alv_right     type ref to cl_gui_alv_grid,
        repid type syrepid.

  repid = sy-repid.

  select * into corresponding fields of table imara
              from mara
                    where mtart = 'ZNBW'.

  select * into corresponding fields of table it001w
              from t001w.


  check dockingbottom is initial.

  create object dockingbottom
              exporting repid     = repid
                        dynnr     = sy-dynnr
                        side      = dockingbottom->dock_at_bottom
                        extension = 170.

  create object alv_bottom
                exporting i_parent = dockingbottom.


  call method alv_bottom->set_table_for_first_display
      exporting
           i_structure_name       = 'MARA'
      changing
           it_outtab       = imara[].

  create object dockingright
              exporting repid     = repid
                        dynnr     = sy-dynnr
                        side      = dockingright->dock_at_right
                        extension = 600.

  create object alv_right
              exporting i_parent = dockingright.

  call method alv_right->set_table_for_first_display
     exporting
          i_structure_name       = 'T001W'
     changing
          it_outtab       = it001w[].

Regards,

Rich Heilman

0 Kudos

Thanks a lot !