cancel
Showing results for 
Search instead for 
Did you mean: 

Get screen resolution in WebDynpro ABAP

Former Member
0 Kudos

Hi,

is there is a possibility to get the current screen resolution of the frontend in a Web Dynpro ABAP application?

I found the following class and method: cl_gui_frontend_services => registry_get_value.

I found the Screen Resolution in WIN XP at:

SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Control\VIDEO\{23A77BF7-ED96-40EC-AF06-9B1F4867732A}\0000\.....

As expected, this method only works in the SAP GUI and not in Internet Explorer. In IE it triggers the exception CNTL_ERROR.

Is there another solution?

Regards.

Accepted Solutions (0)

Answers (1)

Answers (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

I guess the root question is why do you need the screen resolution? Web Dynpro isn't design to be screen resolution specific. That is why it is flow layout based and not pixel coordinate based. Generally the use of % based width/height parameters will allow the content to adjust to the screen size. Even if you had the screen size, what you reall need is the browser window size. This can change even the user resizes the browser. Even if you could get this value via ACFExecute or something like that, you wouldn't have an event to let you know when the browser was resized.