Prerequisites
- Products: Liquid UI WS, Liquid UI Server or Local DLL, Client Software
- Commands: windowsize(), title(), _windowsize
Purpose
Learn how to use the _windowsize system variable to retrieve either the width or the height of your SAP window in pixels.
- The variable for width: _windowsize_x
- The variable for height: _windowsize_y
To demonstrate the above aspects, we will walk you through the following steps.
- Delete unnecessary elements on the SAP screen using the del command
- Add the webpage “https://www.guixt.com/” on the SAP screen using the view command
- Add title command
User Interface
//Create this file inside your script folder for adding functionality to the SAP Easy Access screen: SAPLSMTR_NAVIGATION.E0100.sjs
//Now, let's start adding the Liquid UI script to the above file and save it.
Customization
- Logon to SAP and delete the image container using the del command on the SAP Easy Access screen, as shown below.
// Deletes an image container on the easy access screen
del("X[IMAGE_CONTAINER]");
- Add view command with coordinates to open the given webpage on the SAP Easy Access screen.
// Opens Google web page on the SAP screen view([0,0],[x,y],"https://www.guixt.com/");
Note: Available from WS Version 1.2.295.0 and Liquid UI Server Version 3.5.522.0 onwards! - Add the title command to view the height and width of the webpage displayed on the SAP Easy Access screen.
// Changes the SAP screen title title("Width: "+_windowsize_x+", Heigth: "+_windowsize_y);
y=_windowsize_x/7.4;
x=(_windowsize_y+280)/38;
SAP Process
- Now, refresh the SAP Easy Access screen to view the width and height of the webpage displayed on the title bar. Also, you can view the change in the webpage size according to the change in your SAP window size, as shown below.