Purpose | With Image you can display image files in the SAP screens. What is the point of having images and graphics in SAP screens? Four principal reasons spring to mind. Firstly, to create a recognizable context. Secondly, to orientate us within a screen. Thirdly, to give the screen a personal, friendly touch. Fourthly, images can carry a mass of vital information, in particular if the choice of image is data dependent. | ||||||||||||
Example |
Image
(10,40) "C:\Images\logo.jpg"
The image file C:\Images\logo.jpg is displayed as of position (10,40), i.e. the upper left corner of the image is in row 10, column 40. |
||||||||||||
Image standards | The following
image standards are supported:
As a rule it makes sense to use bmp for smaller images (like icons) and to use gif, jpg or png for larger ones. |
||||||||||||
Format |
|
||||||||||||
Options |
|
||||||||||||
Multiple Images |
It is also
possible to display multiple images using the
Image
command in a way such that the user can click through the images.
In order to do this you name the images using a sequence number, e.g. "img01.gif", "img02.gif", "img03.gif". You then put the special character combination &# (or &##, &###) into the image filename: Image (10,40) (16,65) "img&##.gif" The system substitutes
1,
2,
3...
(or
01,
02,
03...
or 001,
002,
003...)
in the place of
&#
(&##,
&###),
increasing the number each time the user clicks on the image, and decreasing
the number with each right mouse click. Please see example in GuiXT tutorial 6 Add images. |
||||||||||||
Data dependent images | The image
file name can contain variables that are replaced by their values before
the image is loaded. Example:
Image (4,80) "C:\products\img&F[Material].jpg" If the user enters the material 00500187, the image C:\products\img00500187.jpg will appear. Please see example in GuiXT tutorial 6 Add images. |
||||||||||||
Dynamic image construction | Sometimes
it is not possible or does not make sense to store all images in the local
file system. In this case you can specify an exe- or bat-File in the
Image
command which
copies the image file into the local directory from another source:
Image (row,column) "Name of image file" exe="program name" If the system does not find the image file, it carries out the given exe- or bat-program with the name of the image file as first parameter. After the program has finished, the image file is displayed. Example of an Image command: Image (10,40) (18,74) "C:\tempimg\chart&F[Account]\&F[Date].gif" exe="C:\prog\getchart.exe" |
||||||||||||
Interaction with SAP through images | By clicking
on the image, you can call optional user inputs which will be simulated
within SAP. This is obtained by using the additional parameter
input="string":
Image (row,column) "Name of image file" input="string"
The notations is as follows: input="field1:value1;field2:value2;field3:value3;OK:fcode" 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: input="field1:value1;field2:value2;field3:value3;OK" If you use GuiXT to support a touchscreen, the following special functions will be helpful for offering easy navigation in SAP controls, for example the grid control. You can represent the arrow keys on the keyboard (forward/backward one line or one page, top or botton of the list) with your own images and execute the function with the "Input=..." option. Example: Image (0,1) (3,8) "nextline.gif" input="X[Grid1]:<DOWN>" Folllowing functions are available:
|
||||||||||||
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: input="field1:value1;field2:value2;field3:value3;OK:fcode,Process=displaymaterial.txt" "Using" parameters can be passed to the InputScript 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 |
"input=OK:PR03"
Clicking on the image calls up the function PR03 in SAP. |
||||||||||||
Example 2 |
input="Material:00012345;Plant:0021;OK"
Clicking on the image completes the fields "Material" and "Plant" and then automatically activates the Enter button. |
||||||||||||
Start of PC-applications through images | By clicking
on the image, you can start PC applications. This is obtained by using the
additional parameter
Start="string":
Image (row,column) "Name of image file" start="string"
|
||||||||||||
Example 1 |
start="\\P00800\Doc12\me21.html"
Clicking on the image displays the html file \\P00800\Doc12\me21.html in your standard browser. |
||||||||||||
Display your own help | Component
"Controls" is needed for this function
With viewHelp= you specify an html or pdf file. Clicking on the image will display the html file in the upper right hand side of the window. The ConnectHTML function is automatically executed for the page displayed. Image (row,column) "image file" viewHelp="docfilename.html" |
||||||||||||
Example | Image (toolbar) "help.gif" viewHelp="doc_order.pdf" | ||||||||||||
Options for viewHelp |
|
||||||||||||
Example | Image (toolbar) "help.gif" viewHelp="doc_intorder.html" viewHelpWidth="200" | ||||||||||||
Dynamic text output |
|
||||||||||||
Options for textString |
|
||||||||||||
Example | Image (1.1,0.5) (10,20) "logon.gif" textString="&V[_database]" textHeight="24" textWeight="8" textColor=""yellow" | ||||||||||||
Telephony | You can pass a phone number to the TAPI component ("Telephony Application Programming Interface", outgoing calls), using the parameter dial=. | ||||||||||||
Example |
Image (10,24) "phone.gif" dial="&F[Phone number]" If TAPI is installed and configured on the PC, clicking on the image initiates a phone call to the specified number. |
||||||||||||
Components | GuiXT |