Liquid UI - Documentation - 6.28 view()

6.28 view()


Purpose

With view(), you can view files in the 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 the 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 the 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 closes 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 creates variables that contain the internal window handle of the created view window.
  2. view([15,15],[50,50],"creatematerial.html",{"returnwindow":"win"});
    
  3. This option returns a window on the SAP screen. This option is used when the view command is used in the function.

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 return values.


Example1

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

Viewing multiple files

Steps

  1. Navigate to SAP Easy Access screen
  2. Create a script file with the 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'); 


Example 2:

The following examples demonstrate the usage of the view() command with the returnwindow option to return the HTML file on the SAP screen.

  1. Navigate to SAP Easy Access screen. Click the Open Toolbar push button.
  2. You will see the Create Material HTML file is opened on the SAP screen.
  3. Click the Close toolbar push button to close the Create Material HTML file. You can also click open again to return the HTML window.


Script Details

del('X[Image_container]');
pushbutton('[toolbar]', 'open', {'process':doOpen});

function doClose() {
	//onscreen 'SAPLSMTR_NAVIGATION.0100'
	view({'closewindow':true});
}

function doOpen() {
onscreen 'SAPLSMTR_NAVIGATION.0100'
	view([0,0], [20,60], 'CreateMaterial.html', {'returnwindow':'win','floating':true}); 
	//returnwindow option returns the file on the SAP window
	
	pushbutton('[toolbar]', 'open', {'process':doOpen});
	pushbutton('[toolbar]', 'close', {'process':doClose});
}


Usage Details


Can't find the answers you're looking for?