Liquid UI - WS Reference Library

view()


Purpose

With view(), you can view files in native SAP screen.

The view() command in WS is used to enable users to view files within native SAP screens. Supported file formats that can be viewed in this manner are the following:

  • GIF
  • JPEG
  • HTML
  • RTF


Syntax

  • To display a file inside SAP screen, specify the starting and ending points in the view command.
view([startrow,startcol][endrow,endcol],"filename",{"option":value…});

Note: There is no need of using the coordinates in the command, when the file or window is displayed in a non sap window.


Properties

  • startrow, startcol, endrow, endcol - row and column co-ordinates.
  • filename - name of the file.

Note:Beginning with Server release 3.4.447.0, the view() command is supported on Liquid UI WS Server. However, there are some limitations. 

View command supports only the following file formats on Server.

  • filename.html
  • URL (e.g. www.liquid-ui.com)

Note: Currently, View() is not supporting options on Liquid UI Server.


Available Options

The view() command takes the following options.

"closewindow":".."

"closewindow" - This option closes the window opened by the command.

"floating":".."

"floating" - This option opens and enables the window to move on the screen.

"maximize":".."

"maximize" - This option is usually used in conjunction with the floating option and opens the window to fullscreen.

"returnwindow":".."

"returnwindow":true - This option creates a variable that contains the internal window handle of the created view window.

"template":".."

"template":true - This option creates a template file.

Note: To use the view() command, you must install the file 'pinnacle.dll' in the same directory as the executable of the application in which view is to be used.


Options Detail

closewindow

  1. This option closes the window opened by the command.

  2. view([5,5],[50,50],{"closewindow":true});
  3. This option close the Liquid UI window

floating

  1. This option enables the window to float and can be moved into a position above the main SAP window.

  2. view([5,5],[50,50],"http://www.liquid-ui.com/support",{"floating":true});
    
  3. Here the window(www.liquid-ui.com) floats and can be moved.

maximize

  1. This option is used to maximize the window to fullscreen.

  2. view([15,15],[50,50],"http://www.liquid-ui.com/support",{"maximize":true});
    
  3. This option has maximized the Liquid UI window.

Note: This option is usually used in conjunction with the floating option,

returnwindow

  1. This option create variables that contains the internal window handle of the created view window.
  2. view([15,15],[50,50],"&V[filename]",{"returnwindow":"&V[winname]"});
    

template

  1. This option creates a template file.

  2. view([3,65],[15,95],'test.html',{"template":temp.html});
    
  3. As per the code, test.html acts as an object to the template file(temp.html) to returnvalues.


Example

The following examples demonstrate the usage of view() command.

Viewing multiple files

Steps

  1. Navigate to SAP Easy Access screen
  2. Create a script file with a name SAPLSMTR_NAVIGATION.E0100.sjs and copy the below script code. 
  3. You can view 3 files on the SAP Easy Access screen, as shown below:

Script

clearscreen();
view([1,0],[3,18],'Logo.JPG');
view([5,0],[13,25],'help.html');
view([1,30],[8,70],'img1234.rtf');