Skip to Content

EVENT been triggert when Window Size is changed?

Hello ABAP Experts

I created a screen with Table Control in the Screen Painter and used a Docking Container with embedded HTML Control to display some documentation at the right side of the screen / Table Control.
The System field SY-SCOLS and the klowledge about the just created Table Control and its width allowed me to calculate the width of the Docking Container suitable and to set its extension.

But what happens it the user uses the Windows buttons [Maximize] or [Reduce]?? ([Verkleinern] in German) in the upper right corner of the Window to change the window size or if window size is changed via Drag and Drop of the left or right window border?

The Docking Container keeps its size. The HTML Contol overlapps the Table Control or a gap occurs between Table Control and HTML Control. Anyway not very smart?

Of course I was able to implement a PBO Module with some Coding in it. Here I remembered the last screen width (old value of SY-SCOLS), could recognice the change,
repeat the calculations initially done and adapt the extension of the Docing Container.
Now it is a little bit better. But still not good. Because after the window resizing the User has to press [Enter] of force any other user command to get back to a good loocking screen.

That leads me to my questeion:
Is there any event been triggert whenever the screen size is changed? Of Couse that exists. But is it available in SAP for our development?

Thanks for your help.

Best regards

Stephan Weber

Add comment
10|10000 characters needed characters exceeded

2 Answers

  • Posted on Jun 09, 2017 at 03:33 PM

    Dynpros are not really made for the responsive design you are looking for. One thing to try might be to switch the docking containers extension mode (absolute / relative ), i. e. having 1/3 of the screen covered by the container. This will always be 1/3 even if you resize the screen window.

    Also not sure if the event you mentioned is triggered server side. If you want to be really tricky you can force the normal PAI event using CL_GUI_TIMER. Though this does have some side effects.

    Add comment
    10|10000 characters needed characters exceeded

    • Hallo Fabian
      Thank you for your replay with two options.
      I tested using the CL_GUI_TIMER to force PAI and PBO every second. But that makes working in SM30 nearly impossible because of to many interupts and the screen refresh. So that does not rearly help.

      The other option based on using fixed parts i.e. 1/3 left and 2/3 right does not meet my needs since that could lead to the result that table control on th left side is't shown completely.
      My be that could be a good solution in other cases.

      Thanks a lot and best regards

  • Posted on Jun 09, 2017 at 08:57 PM

    If you define a redimensionable table control (in its attributes), then a change of the window's height (don't ask me why it's not for the width too) triggers the PAI as if the user had pressed the Enter key. Same thing if you use a custom control. I don't know what happens with a docking container only.

    Add comment
    10|10000 characters needed characters exceeded