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: 

How to display two salv tables with out custom container and module pool screen?

0 Kudos


Hi ,

I need to display two salv(cl_salv_table) tables in a list , but it should not with custom container and module pool screen. ?

1 ACCEPTED SOLUTION

former_member219762
Contributor
0 Kudos

Hi,

We need container to hold control(alv). So we cannot display two alv's without container(Custom).

Regards,

Sreenivas.

11 REPLIES 11

Former Member
0 Kudos

hi,

You just try like this.And also see the following link.

data: gr_table type ref to cl_salv_table.

CALL METHOD cl_salv_table=>factory
*  EXPORTING
*    list_display   = IF_SALV_C_BOOL_SAP=>FALSE
*    r_container    =
*    container_name =
IMPORTING
r_salv_table  
= gr_table
CHANGING
t_table       
= it.

ALV Output Display (SAP Library - ALV Object Model)

Regards,

gopi

0 Kudos

Hi Gopi,

Thanks for your quick response. We can display one salv table with factory method. But  I need to display one salve table on top and another salv table on bottom with out container.

Thank's inadvance

Regards,

Vikram.

0 Kudos

hi,

Then try to use cl_gui_docking_container. you can get your requirement.

Regards,

Gopi

0 Kudos

Hi,

We should not use any kind of container. I hope there is a chance, that is we can display alv header with cl_salv_table with class CL_SALV_FORM_LAYOUT_FLOW. Class has create label, create text, create grid methods are there but the problem is I am not able to use create grid method. If you have an idea of this please let me know.

0 Kudos

Hi Vikram,

You can achieve your objective by creating a custom screen & placing a docking container in it.

then use splitter class to for displaying two ALV.

there are standard programs available in SAP starting from BCALV  which clearly describe how to uyse docking container & splitter screen.

Thanks & Regards

Priyesh Shah.

0 Kudos


Hi Priyesh,

Thanks for the response,

We should not use any kind of containers.

regards,

Vikram

0 Kudos

Hi Vikram,

Without custom container or docking container it is not possible. Even you have turned a blind eye towards Module Pool Program.

you can convince your end user or functional owners of the object that there are many technical Aspects / limitation to thought over & these should be better left to the technical team & not functional owners.

Thanks & Regards.

Priyesh Shah

former_member219762
Contributor
0 Kudos

Hi,

We need container to hold control(alv). So we cannot display two alv's without container(Custom).

Regards,

Sreenivas.

0 Kudos

Hi sreenivasa rao,

I hope there is a chance that is we can display alv header with cl_salv_table with class CL_SALV_FORM_LAYOUT_FLOW. Class has create label, create text, create grid are there but the problem I am not able to use create grid method. If you have an idea of this please let me know.

regards,

vikram

Former Member
0 Kudos

HI,

using docking container we can do. plz check  it

DATA: r_dock_container TYPE REF TO cl_gui_docking_container,
       r_salv_table     TYPE REF TO cl_salv_table.

DATA: it_sflight TYPE sflight OCCURS 0,
       it_spfli   TYPE spfli   OCCURS 0.

DATA: count TYPE i.

START-OF-SELECTION.
   SELECT * FROM sflight INTO TABLE it_sflight UP TO 10 ROWS.
   SELECT * FROM spfli INTO TABLE it_spfli UP TO 10 ROWS.

   CALL SCREEN 9000.


module STATUS_9000 output.
   SET PF-STATUS 'ZDEMO'.
     CREATE OBJECT r_dock_container
       EXPORTING
         side   = cl_gui_docking_container=>dock_at_top
       EXCEPTIONS
         OTHERS = 1.
     CALL METHOD r_dock_container->set_height
       EXPORTING
         height = 170.
     CALL METHOD cl_salv_table=>factory
       EXPORTING
         r_container  = r_dock_container
       IMPORTING
         r_salv_table = r_salv_table
       CHANGING
         t_table      = it_sflight.

*  ALV Display
     r_salv_table->display( ).

CREATE OBJECT r_dock_container
        EXPORTING
          side   = cl_gui_docking_container=>dock_at_bottom
        EXCEPTIONS
          OTHERS = 1.

     CALL METHOD r_dock_container->set_height
       EXPORTING
         height = 170.


     CALL METHOD cl_salv_table=>factory
       EXPORTING
         r_container  = r_dock_container
       IMPORTING
         r_salv_table = r_salv_table
       CHANGING
         t_table      = it_spfli.

r_salv_table->display( ).

module USER_COMMAND_9000 input.
   CASE sy-ucomm.
     when 'BACK'.
       LEAVE TO SCREEN 0.
       ENDCASE.


endmodule.


Regards,

gopi

0 Kudos

Thank you Gopi,

Every time your giving quick replies.

We should not use any container for our object, we should try to display two alvs without container.

Regards,

Vikram