API to Ascertain Client Information

The API IF_WD_CLIENT_INFORMATION enables you to query specific information about the client and respond to it in your application.

With this interface you can find answers to the following questions:
  • What is the size of the browser window your application is running in?
  • What is the size of the screen?
  • What is the orientation of the screen?
  • What device type is your application running on?
  • Has the user of the application changed the size of the browser window, the size and orientation of the screen, or the device type?
  • Are browser plug-ins required for displaying your application missing?
API IF_WD_CLIENT_INFORMATION has the following GET methods:
Method Description Values
GET_CLIENT_WIDTH Returns the width of the browser window Value in pixels
GET_CLIENT_HEIGHT Returns the height of the browser window Value in pixels
GET_SCREEN_WIDTH

Returns the width of the screen

Value in pixels
GET_SCREEN_HEIGHT

Returns the height of the screen

Value in pixels
GET_DEVICE_TYPE

Returns the type of device the application is running on

  • phone
  • tablet
  • desktop
GET_SCREEN_ORIENTATION

Returns the orientation of the screen

  • portrait
  • landscape
GET_FLASH_AVAILABLE Tells you whether the Flash plug-in is installed or activated in the browser
  • abap_true
  • abap_false
GET_JAVA_AVAILABLE

Tells you whether the Java plug-in is installed or activated in the browser

  • abap_true
  • abap_false
GET_PDF_AVAILABLE Tells you whether the Adobe Reader plug-in is installed or activated in the browser
  • abap_true
  • abap_false
GET_SILVERLIGHT_AVAILABLE

Tells you whether the Silverlight plug-in is installed or activated in the browser

  • abap_true
  • abap_false

The API provides the following methods too:

Method Description
REGISTER Registers an event handler on a client event (for example, a change to the browser window size, or a missing browser plug-in). The event handler is called when the event occurs.
UNREGISTER Deletes the event registration

To retrieve an instance of IF_WD_CLIENT_INFORMATION, you use method GET_CLIENT_INFORMATION of interface IF_WD_APPLICATION.

Example

You can find an application example in the system in component WDR_TEST_CLIENT_INFO.