3

I would like to ask if it is possible to display two related tables (e.g., by PO number) on one screen by using the class CL_SALV_TABLE.

If not, what other class would work?

Thank you in advance!

  • 3
    `CL_SALV_TABLE` displays exactly one table. You can use it to display the table inside one GUI container, and you may display two containers in one screen via the class `CL_GUI_SPLITTER_CONTAINER`. – Sandra Rossi Jul 16 '21 at 15:38

1 Answers1

5

As Sandra correctly said it is impossible. You need to change the approach: set up split container and display your tables/grids in it. The template steps for such displaying would be following:

* creating splitter
DATA(split) = NEW cl_gui_splitter_container( parent = cl_gui_container=>screen0
                                             no_autodef_progid_dynnr = abap_true
                                             rows = 1
                                             columns = 2 ).

* marking container
DATA(spl_left) = split->get_container( row = 1 column = 1 ).
DATA(spl_right) = split->get_container( row = 1 column = 2 ).

* grid 1
cl_salv_table=>factory( EXPORTING
                            r_container    = spl_right
                          IMPORTING
                            r_salv_table   = o_salv
                          CHANGING
                            t_table        = it_salv_itab1 ).

* grid 2
cl_salv_table=>factory( EXPORTING
                            r_container    = spl_left
                          IMPORTING
                            r_salv_table   = o_salv
                          CHANGING
                            t_table        = it_salv_itab2 ).

Check this page for a comprehensive example https://codezentrale.de/abap-gui-simple-tree-und-salv-grid-in-split-container-ohne-dynpro-anzeigen-eventhandling/

Suncatcher
  • 10,355
  • 10
  • 52
  • 90