Purpose | With View
you
can display html and rtf files. In addition, the html
display offers the possibility of interaction with SAP
screens (Setting field values and calling up menu
functions). It is possible to use a template file (rtf or html) which contains GuiXT variables, e.g. field names. These variables are automatically replaced by their current value. The View command supports the standard image formats bmp, gif and jpg just as Image does. In contrast to the Image command they are displayed in a separate scrollable screen area. Note that the View command refers to the former component "GuiXT Viewer", which has been replaced by the more comprehensive component "GuiXT Controls" since 2018. |
||||||||||
Example | View
(10.5,40.2) (20.5,80)
"C:\html\menupr00.html" The html file C:\html\menupr00.html is displayed in the area (10.5,40.2) to (20.5,80). |
||||||||||
Formats | The following file
formats are supported:
|
||||||||||
Format | View
(row1,column1) (row2,coloumn2) "file
name" View (row1,column1) (row2,coloumn2) "file name" template="template file" View (row1,column1) (row2,coloumn2) template="template file" With (row1,column1) (row2,coloumn2) you specify the upper left hand and lower right hand corner; you may use decimal numbers as coordinates. The file is searched for in the current GuiXT Script directory unless you specify a drive letter, e.g. "C:\html\file.html". If you
specify a template file, then this file
is copied into the file that you specified first, and all
GuiXT variables &[....] are replaced by
their current values. |
||||||||||
Additional options |
|
||||||||||
Data dependent views | The file name can
contain variables that are replaced by their values
before the file is loaded. Example: View (4,80) (12,120) "C:\products\img&[Materialnummer].rtf" If the user enters the product number 00500187, the file C:\products\img00500187.rtf is displayed. |
||||||||||
Interaction with the SAP screen | As usual, you can
click on URLs in the html display in order to
navigate to other documents in the local file system, the
intranet or internet. The "Back" button can be
called up via a right mouse click. As a particularly handy feature you can define interactions with the SAP screen via special SAP URLs:
The SAP URLs start with the string "SAP://". You then specify the field names and field values and, if desired, a menu function. The notations is as follows: <A href="SAP://field1:value1;field2:value2;field3:value3;OK:fcode"> Since a browser URL is not allowed to contain any blanks, you have to denote the field names without them, for example you have to write "PreviousAccountNumber:00012345" instead of "Previous account number:00012345". The field names are not case sensitive. The function code fcode can either be an internal code taken from the screen menu, e.g. SCMP, or a transaction code as for example /NFB01 or /OMM02. You will find the internal menu codes as follows: Choose the desired function in the transaction menu and press F1 while the mouse cursor points to this function. Now the SAP system displays the internal function code in a pop-up window. The Enter button, without any special function code, can be called up with OK at the end of the SAP URL: <A href="SAP://field1:value1;field2:value2;field3:value3;OK"> |
||||||||||
Starting an InputScript | In conjunction with
InputAssistant you can also start an InputScript. You
have to add the process= attribute to the OK:fcode. Example: <A href="SAP://field1:value1;field2:value2; "Using"
parameters can be passed to the InputScript via the SAP-URL
with the notation U[name]:value. You can
also set internal GuiXT variables with V[name]:value
and use this value in your InputScript or in GuiXT
scripts. |
||||||||||
Using JavaScript | If your html page
contains a form which has entry fields, it might make
sense to use JavaScript in order to pass these values to SAP.
See Example 3. |
||||||||||
Example 1 | <A
HREF="SAP://OK:PR03"><IMG SRC="advance.jpg"></A> Clicking on the image advance.jpg calls up the function PR03 in SAP. |
||||||||||
Example 2 | <A
HREF="SAP://Material:00012345;Plant:0021;OK">Screw
8x15mm</A> Clicking on the text "Screw 8x15mm" completes the fields "Material" and "Plant" and then automatically activates the Enter button. |
||||||||||
Example 3 | HTML page: <form
name="form"> <script language="JavaScript"><!-- function
toGuiXT(string) By clicking on the "Display" button you call up transaction VD03 with the InputScript "ShowCustomerData.txt" . You pass the customer number that the user entered to the InputScript with U[Customer]:... If you use
the template= option of the View
command, then the last (i.e. most recently entered) value
in the SAP field "Customer" is taken as initial
value in the html form. |
||||||||||
Open documents | You can open any document with
View; the document viewer
is started as a separate application: View "file name" This will start the same application as if the user clicked on the document in Windows Explorer. Examples: .doc or .pdf files. You can also start .exe or .bat files. |
||||||||||
Additional Options |
|
||||||||||
Tips & Tricks |
|
||||||||||
Components | GuiXT + Viewer |