1

I would like to ask about proper way to split following screens in ALV:

  1. 1st screen with type CL_GUI_ALV_GRID
  2. 2nd screen is subscreen with Tab strip control

Using docker there are issues with resizing of screen during the runtime. I am not able to provide ratio for both screen. Is there a way to use CL_GUI_SPLITTER_CONTAINER also for the screen with Tab strip control ?

Thank you !

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
bagere
  • 221
  • 5
  • 17
  • No you can't embed classic SAP GUI elements (tab strip control in your case) in a container. What issues do you have with the resizing? – Sandra Rossi Nov 28 '18 at 20:21
  • I am not able to setup docker for screen ratio (e.g. as in SPLITTER control 1st screen 70% and 2nd screen 30%). Issue when when the "Restore Down" (middle windows button) is pressed, the smaller screen is not visible. User can only drag the tabstrip sceen. – bagere Nov 29 '18 at 07:19

1 Answers1

2

The following code reacts to a change of the window height. It does not react to a window width, that's a limit of Dynpro, so most of time it will react to Windows buttons minimize and restore, unless the window is the exact half left or half right of the monitor (combined keys Windows+Left and Windows+Right). SY-SCOLS and SY-SROWS are the only way I know to get the window size when a dynpro screen is displayed, but probably there are other ways.

DATA go_docking TYPE REF TO cl_gui_docking_container.
DATA ok_code TYPE syucomm.
DATA ratio TYPE i VALUE 70.
DATA pixels_by_sy_scol TYPE p DECIMALS 2.

CALL SCREEN 100.

MODULE pbo OUTPUT.
  IF go_docking IS INITIAL.
    CREATE OBJECT go_docking
      EXPORTING
        repid = sy-repid
        dynnr = sy-dynnr
        side  = cl_gui_docking_container=>dock_at_left
        ratio = ratio.
    go_docking->get_extension( IMPORTING extension = DATA(extension) ).
    cl_gui_cfw=>flush( ). " to calculate the extension (by default in pixels)
    pixels_by_sy_scol = extension * 100 / ratio / sy-scols.
  ELSE.
    go_docking->set_extension( sy-scols * pixels_by_sy_scol * ratio / 100 ).
  ENDIF.
ENDMODULE.
Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48