Application Development and Automation 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: 
Read only

Splitter container without creating a dynpro

kim_ternstrm
Explorer
0 Likes
2,950

Is it possible the use a splitter container without creating a seperate dynpro with a container on it.

It is possible if you just need a single ALV. But as soon as the splitter container is called I can't get the program to output the ALV.

I saw a demo program where a user was able to display a ALV on the selections screen - and if I modify this example http://www.saptechnical.com/Tutorials/ALV/Selscreen/Display.htm) to use the splitter container the 2 ALV's are displayed. But as soon as i change the "AT SELECTION-SCREEN OUTPUT." to "END-OF-SELECTION" nothing is being displayed.

8 REPLIES 8
Read only

Former Member
0 Likes
1,710

Hi Kim,

It would not work in End of selection.

1. To use the splitter for a container, you would need a dynpro - this is unavoidable. Containers are used to host front end controls such as ALV's, pictures, Text editors and so on. These controls are tied to the dynpro.  The dynpro could be anything - Could be a system generated selection screen or a screen you had created for this program .

2. It would work at Selection screen output because, keep in mind the selection screen itself is a dynpro and it splits that dynpro to show the output .  ( I never ever thought of dipslaying an ALV here ! ) . At "End of Selection" you do not have a dynpro  to split it up. 

I hope this helps.

Thanks,

Venkat.

Message was edited by: Venkat Gowrishankar

Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,710

You could create a docking container without having to create via screen painter a dynpro with a customer container in it.

DATA: go_dock TYPE REF TO cl_gui_docking_container.
CREATE OBJECT go_dock
  EXPORTING
    parent = cl_gui_container=>screen0
    side   = cl_gui_docking_container=>dock_at_left
    ratio  = 90.

Then use the splitter container in it.

Regards,
Raymond

Read only

0 Likes
1,710

I already tried that. And that is not possible without a screen/dynpro

Read only

0 Likes
1,710

Read my answer carrefully ("a dynpro with a customer container in it.") you must have a dummy dynpro without any element (can be also the selection-screen), but you don't need a customer container in it.

Regards,

Raymond

Read only

0 Likes
1,710

Do you create the GO_DOCK in PBO ?

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,710

Of course you have to ...


You'll have to split the screen in a screen-processing event (since this has to be done before the screen is displayed you have to use the PBO event).


END-OF-SELECTION is not a screen processing event & hence it doesn't work!


BR,

Suhas

Read only

0 Likes
1,710

Yes in the PBO of the screen where I want to attach the container (can be the AT SELECTIOJN-SCREEN OUTPUT or a PBO module of any dynpro)

Regards,

Raymond

Read only

0 Likes
1,710

Suhas,

Do we need to write the controls initialization (Docking & splitter) in PBO explictly ?  Since the initialization is to be done only once,  can't we embed the initializations in a method in local class and then call the screen ?

START-OF-SELECTION.

<data extraction logic>

IF gt_post[] IS NOT INITIAL.
     lr_local->initialize_controls.( ).
     CALL SCREEN 100.
   ENDIF.

method initialize_controls.

CREATE OBJECT gr_docking
     EXPORTING
       parent                      = cl_gui_container=>screen0
       extension                   = 90

CREATE OBJECT gr_splitter
       EXPORTING
         parent            = gr_docking
         rows              = 3
         columns           = 1
......    

       gr_grid_hdr->set_table_for_first_display(

         EXPORTING
           i_save                        = abap_true
           i_default                     = abap_true
......

endmethod.

MODULE pbo_0100 OUTPUT.
   SET PF-STATUS 'DISC_POST'.
ENDMODULE.                 " PBO_0100  OUTPUT

MODULE pai_0100 INPUT.
   CASE ok_code.
     WHEN 'DETL'.
       CLEAR : ls_table.
       MOVE abap_true TO ls_table-row.
       MOVE abap_true TO ls_table-col.
       gr_grid_dtl->refresh_table_display(
         EXPORTING
           is_stable      = ls_table
         EXCEPTIONS
           finished       = 1
           OTHERS         = 2 ).
ENDMODULE.

The above code worked perfectly even though the instance of DOCKING container and SPLITTER container created outside the PBO event.  Hope I didn't misunderstood your reply.

Regards, Vinod