|Purpose||With View you can display html and rtf files. In addition, the html display offers the possibility of interaction with R/3 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 is part of the component GuiXT Viewer (R/3 add-on by Synactive). It also requires Microsoft Explorer 4.0.
|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 specifiy 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.
|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 R/3 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 R/3 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:
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 sceen 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 R/3 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:
|Starting an InputScript||In conjunction with InputAssistant you can also start an InputScript. You have to add the process= attribute to the OK:fcode.
“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.
|Example 1||<A HREF=”SAP://OK:PR03″><IMG SRC=”advance.jpg”></A>
Clicking on the image advance.jpg calls up the function PR03 in R/3.
|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:
By clicking on the “Display” button you call up transaction VD03 with the InputScript “ShowCustomerData.txt” . You pass the cutomer 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 R/3 field “Customer” is taken as initial value in the html form.
See the detailed example in Viewer tutorial 5 Designing simplified transactions with html and Java Script.
|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.