guixt syntax

123
GuiXT with InputAssistant und Viewer Keywords A-Z Synactive

Upload: cs01pj

Post on 24-Oct-2014

1.006 views

Category:

Documents


65 download

TRANSCRIPT

GuiXTwith InputAssistant und Viewer

Keywords A-Z

Synactive

Copyright © 2003 by Synactive GmbH,Raiffeisenstraße 2, D 64572 Büttelbornwww.synactive.com1st edition – revised version august 2004

All rights reserved.

Synactive is registered trademark of Synactive GmbH.SAP and R/3 are registered trademarks of SAP AG.Internet Explorer is registered trademark of Microsoft CorporationAll other trademarks are property of the respective owners and are herewithacknowledged.For orders please use the order page in www.synactive.comor send an email to [email protected].

Contents

AppendFile 5ApplyGuiScript 6Box 7BoxSize 8ButtonSize 9Call 10CheckBox 15CloseFile 16ColumnHeader 17ColumnOrder 18ColumnSize 19ColumnWidth 20Comment 21Compress 22CopyText 24Decimalseparator 26Default 27Del 28Enter 30FieldSize 33File 34GetTableAttribute 35GlobalTextReplace 36Goto/Label 37HistoryUpdate 38Icon 39If 40Image 45Include 51InputField 52Leave 60Link 61ListImage 62Mark 64Message 67NoDropDownList 68

NoInput 69NoLeadingZeros 71Numerical 72Offset 73On 74OpenFile 75Parameter 76Pos 77ProcessingOption 79Pushbutton 81Radiobutton 83Radiobutton (IA) 85ReadFile 86RemoveFile 88Retry on error 89Return 90Returnvalues 91Set 94SetCursor 97StatusMessage 98Stop 100Tab 101TableWidth 102Text 103TextBox 104TextReplace 105Tip 106Title 107TitlePrefix 108Uppercase 109Using 110VersionNumber 111View 112ViewHelp 118WindowSize 120GuiXT system variables 121

GuiXT Keywords 5

AppendFile

PurposeWith AppendFile you can append a new record to a file, e.g. inorder to fill a table with R/3 data for later use in Excel.It is also possible to specify a second file. This file is copied to thefirst one, and all GuiXT variables in each line are replaced with theircurrent values.

ExampleAppendFile "X:GuiXTFiles\MatDes.txt" s_matnrs_text s_unit s_price

The value of the variables &[s_matnr] &[s_text]&[s_unit] &[s_price] is concatenated to a single record.The values are separated by the delimiter specified in the OpenFilecommand (Delimiter=, default delimiter is the tab).Looking at the example, assume that &[s_matnr]= 10000120&[s_text]= Bolt &[s_unit]= ST &[s_price]= 0.02 andthat the delimiter is ';'. Then the new file record is1000001;20;Bolt;ST;0.02

FormatAppendFile "filename" var1 var2 var3 ...Currently up to 14 variables are possible.AppendFile "filename" template="templatefile"The template file is copied and all GuiXT variables &[...] arereplaced with their current values.

Tips&TricksSee "Special Topics" for a detailed example File handling ininputscripts.

6 Synactive Documentation

ApplyGuiScript

FunctionWith ApplyGuiScript you can use VBScript in order to access thescreen object model (requires SAP GUI 6.20, "SAP GUI ScriptingAPI for Windows" ) . For example, you can handle special controlslike the "grid" control.

ExampleApplyGuiScript "activate_document_link.vbs"

FormatApplyGuiScript "filename""filename" is the name of a .vbs file. If you do not specify the fullpath for the file, GuiXT takes the current script directory. It is alsopossible to use files from SAP Web Repository.ApplyGuiScript template="templatefilename""templatefilename" is the name of a .vbs file. GuiXT copiesthe template file into a temporary file, replaces the variables, e.g."&V[varname]", and executes the script.

Tips &TricksFor further information and examples, please see the article "SAP GUIScripting and GuiXT" in our "Special Topics" .

GuiXT Keywords 7

Box

PurposeWith Box you can draw a rectangular box around a group of otherscreen elements.

ExampleBox (10,20) (16,44) "Invoice data"A rectangular box will appear with its top left hand corner at(10,20) and its bottom right hand corner at (16,44). Theheading "Invoice data" will also appear.

FormatBox (row1,column1) (row2,column2)Box (row1,column1) (row2,column2) "Heading"

Tips&Tricks• You may use screen variables within the heading text, e.g.

Box (10,20) (16,44) "Invoice data for&[Ref number]"

• When you place an Image within a Box, we suggest, foresthetic reasons, that you use somewhat larger coordinates for thetop left hand corner of the image, e.g.Box (10,20) (16,44) "Heading"Image (10.2,20.5) (16,44) "Image file"

8 Synactive Documentation

BoxSize

FunctionWith BoxSize you can resize a group box

ExampleBoxSize G[General data] (5,40)

FormatBoxSize G[Box] (rows,columns)rows is the height and columns the width of the group box. If oneof the two values, i.e. for rows or columns, is entered as 0, then itsprevious value will be retained.

GuiXT Keywords 9

ButtonSize

FunctionWith ButtonSize you can resize a pushbutton

ExampleButtonSize P[Anzeige] (3,20)

FormatButtonSize P[Pushbutton] (rows,columns)rows is the height and columns the width of the pushbutton.

10 Synactive Documentation

Call

PurposeWith Call you can call a function from a GuiXT script or from anInputScript.The function can either be a local dll-function (on the frontend PC),implemented in VC++ or a similar language, or an R/3 functionmodule on the R/3 application server, implemented in ABAP. In thiscase SAP's RFC (Remote Function Call) technology is used.

ExamplesCall "ImgName" dll="guiexits" In="&[Material]"Out="Matfilename"

Call "ImgName" In="&[Material]"Out="Matfilename"

In the first case the dll-function ImgName is called locally. In thesecond case the R/3 function module ImgName is called via RFC.

Format

RFC call*old format (positional parameters):Call "funcname" In="par1" In="par2" ...Out="par1" Out="par2" ...

new format (named parameters):Call "funcname" In.Name1="par1"In.Name2="par2" ... Out.Name1="par1"Out.Name2="par2" ... Table.Name1="tab1"Table.Name2="tab2" ...

Call "funcname" Destination="dest"In.Name1="par1" In.Name2="par2" ...Out.Name1="par1" Out.Name2="par2" ... ...Table.Name1="tab1" Table.Name2="tab2" ...

*Please see Calling a R/3 function module -Passing parameterson next page.

GuiXT Keywords 11

dll callCall "funcname" dll="dllname" In="par1"In="par2" ... Out="par1" Out="par2" ...

Please observe that only up to 20 parameters (In+Out+Tables) arecurrently possible.

Option

-try

In case of RFC. Please specify the option immediately after thefunction name.If the function ends with an "exception", no error message isshown to the user. Instead, the system variable V[_exception]obtains the name of the exception. With if Q[ok] you can query,after Call, if the function ended normally.Example:Call "RPY_TABLE_READ" -try in.TABLE_NAME="&V[structid]" ..if not Q[OK]

Return "E: Structure &V[structid] not found in data dictionary" –statusline

endif

How to use the output parameters in your scriptThe output parameters of a Call can be used in the format &[name]in all subsequent script lines.

Example:Call "ImgName" In="&[Material]"Out="MatFileName"

Image (16,81) (24,100) "&[MatFileName]"Start="&[MatFileName]" "-NoStretch"

Calling a dll functionThe function declaration is as follows (example with 2 IN parametersand 3 OUT parameters):__declspec(dllexport) int funcname(char* p1, char*p2, char* p3,char* p4, char* p5)All parameters (IN and OUT) are passed in the order specified in thescript. The maximum length of each string is 255 characters. Please

12 Synactive Documentation

specify all parameters in your script, otherwise the dll-function gets anaddress exception.You can download some useful examples from the dll-download-pagein www.synactive.com.

Calling a R/3 function module

Passing parametersThere are 2 variants for parameter passing.You can either use positional parameters, without specifying aname:Call "funcname" In="par1" In="par2" ...Out="par1" Out="par2" ...

In this case the importing parameters of the function must be namedIn1, In2, .., the exporting parameter Out1, Out2,... (R/3 functionlibrary, transaction SE37).

GuiXT Keywords 13

Or you use named parameters:Call "funcname" In.Name1="par1" In.Name2="par2"... Out.Name1="par1" Out.Name2="par2" ...Table.Name1="tab1" Table.Name2="tab2" ...

In this case there is no restriction on parameter names.

Restrictions• All parameters must be of type C (Character), maximum length

255. For example, you could use the reference field SY-LISEL• EXCEPTIONS are not supported. If any exception occurs, the

user gets a message and the next script line is executed• Dialogs within the function require a "Call Function

SYSTEM_ATTACH_GUI." in the called function.• Tables must consist of character-type fields as well.• The maximum table witdth is 255. No restriction on the number

of lines. If necessary, you can specify a different widthbetween 1 und 32000 for each table in the call statement:Table.Name1(width:4000)="tab1"

It is possible to call other function modules from your functionmodule.

Handling of tables• Tables are handled in InputScripts like texts.

For example, you can use the TextBox and CopyText statements.

• They are transferred in both directions• It is not possible to use data dictionary based structures in

InputScripts; you have to use substring notation in order to dividea table line into single fields

Example: Calling a BAPIWe use the method "Get_Detail" of the R/3 business object "User" toread the user group (User master record).Call "BAPI_USER_GET_DETAIL"In.Username="&[_user]"Out.LogonData="UserLogonData"

Set V[UserGroup] "&[UserLogonData](18-29)"Now the variable &[UserGroup] contains the R/3 user group.

14 Synactive Documentation

Explanation(see also the interface definition in transaction SE37):• The system variable &[_user] is passed as importing

parameter Username• The variable &[UserLogonData] obtains the value of the

exporting parameter LogonData• According to structure definition BapiLogonE you find the user

group as substring 18-29

Calling other systemsYou can call functions in other systems (R/3 or R/2) as well, using theparameter Destination=...The destination must be described in the file saprfc.ini; please see theSAP RFC documentation for details. The file saprfc.ini is either in thesapgui working directory "...\SAPworkdir", or you use theenvironment RFC_INI to name the saprfc.ini file.Using this technique you can easily integrate information from othersystems into the R/3 screens.

Tips&Tricks• If you want to implement the dll in some other language, e.g.

Visual Basic, you might need additional tools in order to build thedll. Please ask the supplier of the corresponding programminglanguage if you have any problems here.

• It is a good idea to use the test environment of the ABAPworkbench in order to test your function module before you use itin a GuiXT script.

• It is possible to switch into the R/3 debugging mode if you callthe function module from the script, if you issue a "Call FunctionSYSTEM_ATTACH_GUI." before the first Break-Point.

• You can specify the RFC user and password in the GuiXT profile.As default, GuiXT uses "SAPCPIC" and the correspondingstandard password. The password is stored in the GuiXT profilein encrypted format.

GuiXT Keywords 15

CheckBox

PurposeWith CheckBox you can create additional checkboxes. Its value("X"=checked, " " otherwise) can be used in an InputScript.

ExampleCheckBox (10,1)"Environmentally relevant"Name="EnvRel"

This defines a checkbox at position (10,1). The internal field nameis EnvRel, i.e. in the InputScript its value is written in the symbolicform &[EnvRel]

FormatCheckBox (row,col) "text" Name="..."

Options:Default="..." Specification of a default value, only "X" or "" are possible

Tips&TricksYou can also specify a quickinfo for the checkbox, observing the SAPstandard convention for a text with a quickinfo. Example:"@0L\QAttention: Material safety sheetsrequired@Environmentally relevant"

16 Synactive Documentation

CloseFile

PurposeWith CloseFile you can close a file.

ExampleCloseFile "X:GuiXTFiles\MatDes.txt"The file is closed. The next ReadFile command starts at thebeginning of the file with the first record.

FormatCloseFile "filename"

Tips&TricksOpening and closing a file is valid for each R/3 mode separatelySee "Special Topics" for a detailed example File handling inInputScripts

GuiXT Keywords 17

ColumnHeader

PurposeWith ColumnHeader you can change the column headers in a tablecontrol

ExamplesColumnHeader [Material] "Product"ColumnHeader [Table.2,Material] "Product"

FormatColumnHeader [column] "text"ColumnHeader [table,column] "text"The table name should be specified if there are 2 or more tables on thescreen and the column name is not unique. You name the table by itstitle, if a table title is shown, or otherwise as Table, Table.2, ... If youclick on View �Screen elements in GuiXT you see the correct nameof the table.

Icon and quickinfoYou can also display an icon and a quickinfo. Use the following SAPnotation:ColumnHeader [column] "@id\Qquickinfo@text"Here id is the short name of an SAP icon, quickinfo is thequickinfo string and text is the column header. You will find a listof all R/3 icons in transaction ICON, and a list of all icon short namesin the ABAP program <ICON> (Transaction SE38, enter the programname <ICON> and press the Display button).

Example:ColumnHeader [Description] "@8O\QEnter adescription please@Description"

Tips&TricksYou can use the icon and the quickinfo to mark a column in a table.

18 Synactive Documentation

ColumnOrder

PurposeWith ColumnOrder you can change the column order in a tablecontrol.

ExamplesColumnOrder [Material] 2ColumnOrder [Table.2,Material] 2

FormatColumnOrder [column] nColumnOrder [table,column] nn is the the new column number, i.e. n=1 means that the columnshould be the first column that is displayed, n=2 the second.The table name should be specified if there are 2 or more tables on thescreen and the column name is not unique. You name the table by itstitle, if a table title is shown, or otherwise as Table, Table.2, ... If youclick on View�Screen elements in GuiXT you see the correct nameof the table.The position of all other columns is unchanged.If the table is already customized by normal R/3 means, and you useGuiXT in addition, then the GuiXT script overrides.

GuiXT Keywords 19

ColumnSize

PurposeWith ColumnSize you can change the column width in a tablecontrol.

ExamplesColumnSize [Material] 8ColumnSize [Table.2,Material] 8

FormatColumnSize [column] nColumnSize [table,column] nn is the new column width in the table display (number ofcharacters).The table name should be specified if there are 2 or more tables on thescreen and the column name is not unique. You name the table by itstitle, if a table title is shown, or otherwise as Table, Table.2, ... If youclick on View�Screen elements in GuiXT you see the correct nameof the table.

Columnwidth 0: If you specify width 0, then the column is notdisplayed.If the table is already customized by normal R/3 means, and you useGuiXT in addition, then the GuiXT script overrides.

Tips&Tricks• ColumnWidth changes only the visual width of the column.

ColumnSize changes the field size of the column fields both fordata entry and display.

• When using Sapgui 4.6D it is not possible to create additionalGuiXT elements on some R/3 screens that contain large tables; youget an error message in the GUiXT script window. UseColumnSize to delete some of the unused columns, or tochoose a smaller size for some columns, so that you have enoughspace left for your additional elements.From Sapgui 6.20 onwards you won't have this problem.

20 Synactive Documentation

ColumnWidth

PurposeWith ColumnWidth you can change the column width in a tablecontrol.

ExamplesColumnWidth [Material] 8ColumnWidth [Table.2,Material] 8

FormatColumnWidth [column] nColumnWidth [table,column] nn is the new column width in the table display (number ofcharacters). If the column contains cells that contain more than ncharacters, the cell can be scrolled.The table name should be specified if there are 2 or more tables on thescreen and the column name is not unique. You name the table by itstitle, if a table title is shown, or otherwise as Table, Table.2, ... If youclick on View�Screen elements in GuiXT you see the correct nameof the table.

Columnwidth 0: If you specify width 0, then the column is notdisplayed.If the table is already customized by normal R/3 means, and you useGuiXT in addition, then the GuiXT script overrides.

GuiXT Keywords 21

Comment

PurposeWith Comment you can display any given comment text on the R/3screen

ExamplesComment (10,50) "Please use form M10A"Comment (11,50) "for printout"

FormatComment (position) "text"

Tips&TricksIf you want to display a text in a more esthetic way, you can use theImage command or you can use the View command for the displayof an html file or an rtf text (e.g. as produced in Microsoft Word) .

22 Synactive Documentation

Compress

PurposeWith the Compress comand you can get rid of empty lines within aframe or within an entire screen. Lines from below will be movedupwards to fill the empty ones, thus reducing the area and perimeter ofthe frame. This is particularly useful when you have deleted numerousfields in a screen and you would like to have a compact layout withoutnecessitating a lot of rearranging and fiddling about.The frame is compressed vertically, not horizontally; i.e. there is areduction in the number of lines but not in the number of columns.

ExampleCompress G[further data]

FormatCompress G[frame]Empty lines (rows) within the given frame will be deleted, the framecompacted and its size thereby reduced.CompressEmpty lines (rows) within the given screen will be deleted and theentire screen compacted.

Tips&Tricks• Delete the supefluous fields in your script before compressing the

screen.

• In doing so you may have to use the "-triple" option in orderto make sure you also delete the text fields behind input fields;otherwise the lines won't be able to be compressed.

• You can shift frames or fields before or after compressing.Usually it makes sense to do so before compressing in order tohave a better overview of the general effect and avoid clutter.

• "Blank line" applies only to the area within a frame if you arecompressing a frame, otherwise it applies to the entire area. Ittherefore sometimes makes sense to compress individual framesbefore proceeding to compress the entire screen.

GuiXT Keywords 23

• If you add your own elements (texts, pushbuttons, inputfields...),please remember to do it before compressing, otherwise there willbe no available space left to do so afterwards.

• You may find that your own elements are also shifted and yourframes reduced in the compressing process.

24 Synactive Documentation

CopyText

PurposeWith CopyText you can copy texts between files, screen areas andtext variables.

ExamplesCopyText fromText="t1" toScreen="X[LONGTEXT]"The text in text variable "t1" is copied into the text areaX[LONGTEXT] on the screen.

FormatCopyText from...="name1" to...="name2"

The following are supported:fromText, fromScreen, fromFile, fromTemplate,fromString, -fromClipboard, toText, toScreen,toFile, toString, -toClipboard.

In each case, please specify at least one of fromText or toText.

fromText="t1" toText="t2" Text t1 is copied into text 2

fromText="t1"toScreen= "X[area]"

Text t1 is copied into screen areaX[Area].

Please observe:The text is actually copied whenthe screen is displayed, or with thenext "Enter" in an InputScript(asynchronous processing).

fromText="t1" toFile="dsn" Text t1 is copied intofile dsn.

fromText="t1"toString= "varname"

The beginning of text t1 is copiedinto the variable varname.

fromText="t1" -toClipboard Text t1 is copied into Windowsclipboard.

GuiXT Keywords 25

toText="t1"fromScreen= "X[area]"

The text in screen area X[Area]is copied into text t1.Please observe:The text is actually copied whenthe screen is displayed,or with the next "Enter" in anInputScript (asynchronousprocessing).

toText="t1" fromFile="dsn"

File dsn is copied into text t1.You can also copy files on httpor ftp servers or in the SAPWebrepository (Notation:http://..., ftp://..., SAPWR:...).

toText="t1"fromTemplate= "dsn"

File dsn is copied into text t1; all&-Variables will be replaced.

toText="t1"fromString= "varname"

The content of variable varnameis copied into text t1.

toText="t1" -fromClipboardThe content of Windowsclipboard is copied into text t1.

Options-append The source text is appended to the target text.

-appendline The source text is appended to the target text as a newline.

line=

Only in combination with toString=. You specifythe number of the desired line, starting with 1.After CopyText you can use if Q[ok] in orderto query whether the desired line has been found.

delimiter=Only in combination with toString= and line=.Instead of "line feed" the specified character isconsidered as delimiter.

Tips&TricksFor examples, see the article Text handling in InputScriptsin "Special Topics" .

26 Synactive Documentation

Decimalseparator

PurposeWith the Decimalseparator-command you can define thedecimal separator sign (point or comma) that is used in calculationswith Set. As default, the point is taken if the user selected logonlanguage English, and the comma otherwise.

ExampleDecimalseparator "."

FormatDecimalseparator "."Decimalseparator ","

GuiXT Keywords 27

Default

PurposeWith Default you can assign a default value for an input field. Inother words, if the field is blank when the screen is displayed, thisdefault value will be assigned to it.

ExampleDefault [Order type] "CS"If the field Order type is blank, the value "CS" is assigned to it.

Format Default [Input field] "Value"

Tips&Tricks• You can assign a Default even for fields which are not

displayed using del.

• When you represent a field by means of a series of radiobuttonsusing the Radiobutton command, the assigned default valueleads to the activation of the corresponding radiobutton.

28 Synactive Documentation

Del

PurposeWith del you can delete fields, field groups, pushbuttons,radiobuttons, checkboxes, tables and menu items .

Examplesdel [Business area.]del G[Client specific configuration]del #[12,60]del [Business area.]+(1,3)del M[Change]del M[UPD]del M[1,4,2]

Formatdel [screen element]In the case of fields both the field name and the value or the inputfield that follows are deleted. In the case of field groups all elementswithin the group and the group box itself are deleted.

Delete a menu item.del M[menu item]del M[fcode]del M[i,j,k,l]You can use either the menu item text or the internal function code(press F1 on the menu item to display the function code). In specialcases you can also work with the hierarchical position of the menuitem, starting with position 1. GuiXT deletes the following elements:• the menu item itself• the corresponding push button in the toolbar, if it exists• the function key assignment• if the menu item is a submenu, all items of the submenu are

deleted as wellGuiXT also disables the direct input of the function code in the OKcode field.For further documentation see the article Deleting menu items in"Special topics".

GuiXT Keywords 29

Options-Triple Applicable for input/output fields with an additional text

field behind the entry field. All 3 fields are deleted.

-Value Applicable for input/output fields.Only the field value (entry field) is deleted.

-Text Applicable for input/output fields.Only the field text is deleted.

-Box Applicable if the screen element is a group box.Only the box around the fields is deleted.

Tips&Tricks• If you wish to delete all fields of a field group except one, you

can first shift this field outside the box using pos and then deletethe rest.

• Pushbuttons within the application toolbar can be deleted as well.With icon pushbuttons you name them using their quickinfo text.

• You can delete several screen elements at once:del [screen element 1] [screen element 2]First screen element at the top left corner and the bottom rightelement have to be specified. All elements between those two willbe deleted.

30 Synactive Documentation

Enter

PurposeWith Enter you can simulate a user action within an InputScript. Ifyou use Enter without specifying anything else, the InputAssistantsimulates pressing the Enter button. You can also specify an internalfunction code which corresponds to a menu entry or a pushbutton.

ExamplesEnterEnter "BU"The internal function code "BU" is activated.Enter "/nSE38" process="ShowABAPSource.txt"The transaction SE38 is started and InputScriptShowABAPSource.txt is executed

FormatEnterEnter "Value"Enter "Value" process="InputScript.txt"

OptionsOnError=

A function code that is executed in case of an error message, asresponse to the first function code.See Special Topics File Handling in InputScripts, Example 2 for anexample.Typically, the OnError= function code is "/N" (Cancel transaction)or "/12" (Cancel). The Script is continued with the Screen commandthat is active after executing the OnError function code. The variableV[_lasterror] contains the error text.OnError="Continue" This is the most flexible way to handleerror messages, but you have to program all further actions in yourInputScript. In the case of an error message, the script is continuedwith the statement after the Enter statement. The variableV[_lasterror] contains the error text. Among other things youcan now correct certain values with "Set", and then enter a newfunction code.

GuiXT Keywords 31

Please observe:• Some of the normal entry fields might be read-only in the case of

an error.

• All statements between Enter ... OnError="Continue"and the next Screen command are executed only if an errormessage is produced by Enter. Otherwise they are skipped.

• It is also possible to use Enter ...OnError="Continue" several times within one Screenblock, e.g. to try several input values.

Example:Screen ... Set [Material] "abc" Enter "/5" OnError="Continue"

// The following statements are executed inthe case of an error message Message "Material abc not found" Set [Material] "xyz" Enter "/5" OnError="Continue"

// The following statements are executed inthe case of a 2nd error message Message "Material xyz not found" Set [Material] "M-01" Enter "/5"

Wait=

Parameter in milliseconds between 0 and 5000. The Enter isperformed after the specified number of milliseconds.

Enter "/ScrollToLine=..." Table=

Scrolling in a table on the screen. Specify the table name and a linenumber, starting with 1.In list output, scrolling is possible as well; no table name needs to bespecified in this case.

Tips&Tricks• If no Enter is specified for the current screen, the processing of

the InputScript is terminated. The user can then continue with thetransaction himself.

• See Pushbutton for a description of how to get the internalcode.

32 Synactive Documentation

• If you activate Options�Visible Auto Processing for a test ofyour InputScript, you only press the Enter button in each screen inorder to simulate the function code that you specified in theInputScript.

• Note: if Enter is always executed, the system will loop. In thiscase you can stop it by selecting Options�Visible AutoProcessing.

GuiXT Keywords 33

FieldSize

PurposeWith FieldSize you can change the size of an input or output field.

ExampleFieldSize [Material] 10

FormatFieldSize [Screen element] nThe new field size is n characters; n is a value between 1 and thecurrent field size.

Options

-ScrollableOnly that part of the input field which is visible isreduced; the field becomes scrollable and can still bemade the same length as it originally was.

Tips&TricksIf the value to be used has more than n characters, the field becomesscrollable automatically, so that the user can display the increasedvalue. But normally FieldSize should be used only if you are surethat the field value will not be more than n characters long, or if itsuse is combined with the -Scrollable option.

34 Synactive Documentation

File

PurposeWith File you can assign an alias name to SAPWR (SAP WebRepository)scripts with long names (reason: 30 character name lengthrestriction in SAPWR).

ExampleFile "saplsmtr_navigation.e0100.txt"Alias="menu.txt"

FormatFile "long_filename" Alias="short_filename"

Tips&TricksThe File command should be put in session script ESession.txt,DSession.txt.

GuiXT Keywords 35

GetTableAttribute

PurposeWith GetTableAttribute you can read attributes of a tabledisplayed on screen (table control).

ExampleGetTableAttribute T[Table]FirstVisibleRow=FVisRowLastVisibleRow=LVisRow LastRow=LastRow

The specified attributes of the table are read into the variablesV[FVisRow], V[LVisRow], V[LastRow].

FormatGetTableAttribute tabid ... attribute=varname...

Following attributes are available:FirstVisibleRow= Number of the first row that is visible on

screen (starting with 1)LastVisibleRow= Number of the last row that is visible on

screenLastRow= Number of the last row of the table (independent of its

visualization)For example, at the beginning of a table display you could haveFirstVisibleRow=1, LastVisibleRow=12, LastRow=115; i.e. rows 1 to12 are currently displayed, and the table has 115 rows in total.

Tips&TricksSee www.synactive.com "Tips&Tricks" and "Special topics" for adetailed example

36 Synactive Documentation

GlobalTextReplace

PurposeWith GlobalTextReplace you can replace a text in the displayof all R/3 screens.

ExampleGlobalTextReplace "company code" "regionaloffice"

FormatGlobalTextReplace "old" "new"

The string is replaced in the following screen elements:• Field labels• Screen title• Group box title• Push button title and quickinfo• Message line• Menu texts• Column headers in tables• Table titleThe following rules apply for the text replacement:1. It is not case-sensitive, but the first character remains in upper case

or lower case2. Longer texts are replaced before shorter ones

The command GlobalTextReplace should be put into the scriptESession.txt (E=English; ISession.txt for Italian). This script isperformed exactly once for each R/3 session, after the logon screen.

Tips&TricksThe command TextReplace has the same effect, but for a singlescreen only.

GuiXT Keywords 37

Goto/Label

PurposeWith Goto you can control the InputScript processing.

ExampleGoto NextPositionLabel NextPositionScreen SAPMVCF66G.0400

FormatGoto labelnameLabel labelnameThe InputScript processing is continued with the line following thespecified label.

Tips&Tricks• Backward Gotos are possible. They are dangerous since you

could run into an infinite loop. If you produce an infinite loop,you can activate the "Visible auto processing" option in GuiXT inorder to stop it, and then use a /N-command in order to start anew transaction.

• If you place the Label statement before a Screen statement,the processing of the current screen is terminated after the Goto.If you place it after the Screen statement, the processingcontinues even if the screen names are different.

• It is possible to use if/else/endif within a Screenprocessing block, but it is not possible to put Screen commandsinside of if/else/endif. Use Goto instead.

38 Synactive Documentation

HistoryUpdate

PurposeWith HistoryUpdate you deactivate or activate the history update,either for the whole screen or for a single field (e.g. a date field).

ExampleHistoryUpdate [posting date] off

FormatHistoryUpdate off / onHistoryUpdate [field] off / onDeactivates or activates the history update for the whole screen or fora single field.

GuiXT Keywords 39

Icon

PurposeWith the Icon-command you can change the icon in the R/3 title line.By doing this, you are able to differenciate between two applicationsat a glance, even if they are only in the taskbar.

ExampleIcon "C:\Icones\guixt.ico"

FormatIcon "Name of file.ico"The icon appears instead of the R/3 icon in the top left corner ofR/3 screens or in the taskbar before the name of the program.You can define icons in 16x16 or 32x32 format.

Tips&Tricks• If you put the Icon-command in the script of the R/3 logon

screen, it will appear on all following screens.• If you want to have client specific icons, you can include

the Icon-command in the script of the system menu S000.

• You can define the icons as "transparent". In this case,the background colour of the icon will be the colour of thetaskbar.

• Programs helping you in designing or editing icons are eitheravailable as shareware in the internet or included in variousdevelopment systems.

40 Synactive Documentation

If

PurposeWith if you can make script commands dependent on conditions.For example, on the current GUI-Status or on whether certain fieldsexist in the R/3 screen.

Exampleif Q[Status=ADD1] or Q[Status=UPD1]Image (1,50) (10,90) "imgupd.gif"

elseImage (1,50) (10,90) "imgdis.gif"

endifIf the GUI Status is ADD1 or UPD1, the image file "imgupd.gif"will appear, otherwise "imgdis.gif" will appear.

ConditionsWhat conditions are available with if ?

Existence of screen elementsFirstly, you can look for the existence of screen elements by simplynaming the corresponding screen element in the if command.For example:

if F[Amount] means: "if there is a field Amount on thescreen".

if I[Amount] means: "if there is an input field Amounton the screen".

if P[Cancel] means: "if there is a Cancel pushbuttonon the screen".

Status dataSecondly, you can inquire about certain status data:if Q[Status=xxxx] If the GUI-Status is xxxx

if Q[Language=x]

If the language key is x(1 character, E=English,D=German, F=French,I=Italian,...)

GuiXT Keywords 41

if Q[Database=xxx] if the system (databaseserver) id is xxx

if Q[Client=xxx] if the client is xxx

if Q[User=xxx] if the user is xxx (see Rolespecific user screens )

if Q[Role=xxx] if the role is xxx (see Rolespecific user screens )

if Q[Profile=xxx] if the profile is xxx

if Q[Transaction=xxxx]If the transaction code isxxxx (N.B. only possible withR/3 Rel.4 and upwards)

if Q[ScreenVariant=xxxx]if an R/3 screen variant xxx isactive(with a central GuiXT script)

if Q[GuiXTVersion=yyyyQx x]

if the GuiXT Version is equalto yyyy Qx x.You can use <, = or >. Seealso Tips & Tricks below.

if Q[StopRequest]if the user has provoked aStopRequest in an InputScript(see StatusMessage)

if Q[Page=xxxx]if the current page of a tabbeddialog is xxxxx (xxxxx is thetext displayed on the tab)

if V[vname=value]if the variable vname has thevalue value (only possiblewith InputAssistant)

if U[uname=value]if the using parameter unamehas the value value (onlypossible with InputAssistant)

User optionsThirdly you can inquire about user options set in guixt.ini:Option opt1Option opt2with if Q[Option0xxxx]. For example, you could offer anoption HelpDisplay. When the user activates this option inguixt.ini, you could display a help text for certain transactions, either

42 Synactive Documentation

as image file using Image or as rtf or html file using View. Eachuser can then decide individually whether or not to use the help text.You can define up to 50 different options in guixt.ini, each Optionstring containing up to 30 characters.

Is it possible to use nested if else endif ?Are logical expressions permitted?

Yes, both are possible.

Example:if not Q[Status=UPD1] Image (1,50) (10,90) "imgdis.gif"else if ([Company code] or [Business area]) and not [Order number]

Image (1,50) (10,90) "imgupd1.gif" else Image (1,50) (10,90) "imgupd2.gif" Pushbutton (Toolbar) "Cancel" "/OZC27" endifendifYou can use normal brackets, "and", "or" and "not" within logicalexpressions. Normal rules of logic apply for priority and bracketing.Inquiring about field values is not possible.With InputAssistant you can inquire about global variables that can beset in GuiXT Scripts and InputScripts.

Tips&Tricks• A field, e.g. F[Company code], cannot be specified directly in an

if statement, please use a variable. Example:Set V[buk] "&F[Company code] "if V[buk=0001] ...endif

• In order to compare two variables V[x1] and V[x2], you have touse the value &V[x2] in "if V[x1=value]":if V[x1=&V[x2]] ...endif

GuiXT Keywords 43

• For details concerning if Q[Role=xxx] andif Q[Profile=xxx] see Role specific user screens atwww.synactive.com.

• "if Q[GuiXTVersion..." is supported in GuiXT version2002 Q4 3 and upwards. If you want to ensure that in your script(probably the logon script) the installed GuiXT version is at least2002 Q4 5, you can use the following coding:if Q[GuiXTVersion<2002 Q4 5] Message "Please install new GuiXT versions \nFor questions contact S. Bauer ext. 2649" Title="Update necessary"endif

But in this case no message would appear in the versions prior to2002 Q4 3, since the condition if Q[GuiXTVersion<....] didn't yetpertain, and the indication "false" is returned. In order to coversuch cases as well, use "not ... >" with the previous GuiXTversion id:

if not Q[GuiXTVersion>2002 Q4 4]Message "Please install new GuiXT versions\nFor questions contact S. Bauer ext.2649" Title="Update necessary"

endif

• You should not use Screen commands within if ... endif,since this makes the script hard to understand, and sometimes thebehavior will be quite unexpected.

Bad example:Screen S1

Set V[x] "a"Enter

if V[x=b]Screen S2Enter "xx"

elseScreen S2Enter "yy"

endif

Assume that we have Screen S1 and then Screen S2. Does GuiXTnow process Enter "xx" or Enter "yy"? In fact, in this example,

44 Synactive Documentation

Enter "xx" is executed, since GuiXT looks for the next matchingScreen command for Screen S2, without considering open ifstatements of previous screen blocks.

Instead, please close all open "if" statementsin each screen block:

Screen S1Set V[x] "a"Enter

Screen S2if V[x=b]

Enter "xx"else

Enter "yy"endif

In some cases it makes sense to use goto/label:

Screen S1Set V[x] "a"Enter

if V[x=b]goto l_b

endif

Screen S2Enter "xx"goto l_continue

label l_bScreen S2

Enter "yy"

label l_continue

GuiXT Keywords 45

Image

PurposeWith Image you can display image files in the R/3 screens. What isthe point of having images and graphics in R/3 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.

ExampleImage (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 standardsThe following image standards are supported:• bmp• gif• jpgAs a rule it makes sense to use bmp for smaller images (like icons)and to use gif and jpg for larger ones.

Format• Image (row,column) "Name of image file"

The coordinates (row,column) are the upper left corner of theimage. They can be specified as decimal numbers in order to positionthe image exactly. The image is displayed in its original size.The image is searched in the current script directory unless a full pathis specified, e.g. "E:\pictures\logo1.bmp". The image files areinternally buffered.

Instead of (row,column) the position (toolbar)issupported as well. In this case the image size should be

46 Synactive Documentation

18x18 pixels. The image is displayed at the right hand side of thetoolbar.

• Image (row1,column1) (row2,column2) "Name of image file"

Here (row1,column1) is the upper left corner and(row2,column2) is the right lower corner. The image is stretchedto fit into the given rectangular screen area, without keeping itsoriginal proportions (but see -NoStretch option).

Options-NoStretch Keeps the height/width ratio of the original image.-Plain No 3D-frame is displayed around the image.

-NoBuffer

The image is read from the file system each time it isdisplayed. Without this option GuiXT keeps theimage in memory in order to avoid reading it fromthe file system each time.This option is useful if new versions of the image areprovided by external programs (e.g. from R/3 ortimer controlled).

-Transparent

Applicable for .gif and 8-bit .bmp images. The imageis displayed in a transparent way.Technically, the color of the upper left corner of theimage is replaced with the background color of theR/3 screen.

Multiple ImagesIt is also possible to display multiple images using the Imagecommand 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:

ExampleImage (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 thenumber each time the user clicks on the image, and decreasing the

GuiXT Keywords 47

number with each right mouse click. The mouse cursor shows theimage number.

Data dependent imagesThe image file name can contain variables that are replaced by theirvalues before the image is loaded.

ExampleImage (4,80) "C:\products\img&[Material].jpg"If the user enters the material 00500187, the imageC:\products\img00500187.jpg will appear.

Dynamic image constructionSometimes it is not possible or does not make sense to store all imagesin the local file system. In this case you can specify an exe- or bat-Filein the Image command which copies the image file into the localdirectory 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. Exampleof an Image command:

ExampleImage (10,40) (18,74)"C:\tempimg\chart&[Account]\&[Date].gif"exe="C:\prog\getchart.exe"

Interaction with R/3 through imagesBy clicking on the image, you can call optional user inputs which willbe simulated within R/3. This is obtained by using the additionalparameter Input="string":Image (row,column) "Name of image file"Input="string"

• You can put values into R/3 input fields• You can call up menu functionsThe notations is as follows:Input="field1:value1;field2:value2;field3:value3;OK:fcode"

48 Synactive Documentation

The function code fcode can either be an internal code taken from thescreen 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 desiredfunction in the transaction menu and press F1 while the mouse cursorpoints to this function. Now the R/3 system displays the internalfunction code in a pop-up window.The Enter button, without any special function code, can be called upwith OK at the end of the SAP URL:Input="field1:value1;field2:value2;field3:value3;OK"

Starting an InputScriptIn conjunction with InputAssistant you can also start an InputScript.You have to add the process= attribute to the OK:fcode.

ExampleInput="field1:value1;field2:value2;field3:value3;OK:fcode,process=displaymaterial.txt"

"Using" parameters can be passed to the InputScript with thenotation U[name]:value. You can also set internal GuiXTvariables with V[name]:value and use this value in yourInputScript or in GuiXT scripts.

Example 1"Input=OK:PR03"Clicking on the image calls up the function PR03 in R/3.

Example 2Input="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 imagesBy clicking on the image, you can start PC applications. This isobtained by using the additional parameter Start="string":Image (row.column) "Name of image file"Start="string"

• You can display documents of all registered file types• You can start .exe or .bat files with parameters

GuiXT Keywords 49

ExampleStart="\\P00800\Doc12\me21.html"Clicking on the image displays the html file\\P00800\Doc12\me21.html in your standard browser.

TelephonyYou can pass a phone number to the TAPI component ("TelephonyApplication Programming Interface", outgoing calls), using theparameter dial=.

ExampleImage (10,24) "phone.gif"dial="&F[Phone number]"

If TAPI is installed and configured on this PC, clicking on the imageinitiates a phone call to the specified number.

Displaying help files in html formatComponent "Viewer" is required for this optionWhen the user clicks on the image, the help file ViewHelp="..."is displayed at the right hand side of the R/3 screen.Interactions with R/3 can be specified in the html file, as described forthe View-command (Setting values, calling functions).The help display disappears as soon as the user clicks on an R/3 field.Image (row,column) "Name of image file"ViewHelp="filename.html"

ExampleImage [toolbar] "help.gif"ViewHelp="doc_intorder.htm"

Options for ViewHelp

ViewHelpWidth=

Width of the help display (in pixel).If no width is specified, 40% of the totalwindow width is taken.It is also possible to specify the width inpercentage, e.g. ViewHelpWidth=60%

50 Synactive Documentation

ViewHelpHeight=

Height of the help display (in pixel). If noheight is specified, 40% of the total windowheight is taken.It is also possible to specify the height inpercentage, e.g. ViewHelpHeight=50%

ViewHelpPosition=

Position (upper left corner) of the help displayin the form (row,column), e.g.ViewHelpPosition=(10,50).Or relative to other screen elements, e.g.ViewHelpPosition="[Material]+(1,30)".If you specify a position without specifyingwidth and height, the whole window is used,starting at the specified position (lower rightpart of the window).

ExampleImage (toolbar) "help.gif"ViewHelp="doc_intorder.htm"ViewHelpWidth="200"

GuiXT Keywords 51

Include

PurposeWith Include you can include a further script file.

ExampleInclude "radiobuttons_company.txt"The file "radiobuttons_company.txt" is searched in the current scriptdirectory. It is then interpreted in the same manner as if its contentwere part of the original script.

FormatInclude "includename"The file "includename" is searched in the current script directory.If it is not found, a syntax error message is displayed in the GuiXTscript window, and the main script is continued.If it is found, first the lines of the include file are interpreted, and thenthe original script is continued.You can also specify the full path, e.g.Include "\\server12\guixt\inlcudes\r105.txt"

Files in the SAP Web Repository or on http/ftp servers can also beused, e.g.Include "http://www.synactive.com/incl/r15.txt"A nested Include is possible up to level 10.Please note that it is not possible to use Include in an InputScript.

Tips&Tricks• You may use variables in the include file name, e.g.

Include "inc&V[company].txt"

• With if...endif you can work with a conditional include, e.g.if Q[Transaction=IW33]

Include "IW33mainscript.txt"endif

52 Synactive Documentation

InputField

PurposeWith InputField you can create additional input fields. The valueentered into a new input field can be used in an InputScript.

ExampleInputField (10,1) "Reference number" (10,20)Size="10" Name="Refnr"

This defines an input field with up to 10 characters. The field label isdisplayed at (10,1), the field itself at position (10,20). Theinternal field name is Refnr, i.e. in the InputScript its value is writtenin the symbolic form &[Refnr] .

FormatInputField (row1,col1) "field text" (row2,col2)Size="..." Name="..."

Options-Numerical Only numerical input-Uppercase Only uppercase input

-NoLabelInput field without label. Both (row1,col1) and"field text" are omitted in this case.

-Invisible Invisible input (password)

-required

The field is displayed like a standard required (i.e.compulsory) input field. In the InputScript you cancheck that the user has entered a value. The checkingis not done automatically.

-intensified The field value is displayed with a different color(standard: red).

-alignright The field value is aligned right.-readonly No input possibilityDefault= Specification of a default value

MaxLength= Maximum input length.With this, a greater length than in Size= can be

GuiXT Keywords 53

specified; the field will then automatically becomescrollbar.

TechName=

SearchHelp=

shname=

Specification of a field name that refers to a field inthe R/3 repository,e.g. TechName="BSEG-GSBER".When the user presses F4 or clicks on the matchcodeicon, GuiXT processes the standard R/3 matchcodefor this field.Alternatively, the name of a search-help from R/3can be given directly by means ofSearchHelp="...".

If more than one field is exported by the matchcodemodule, GuiXT takes the first one. You can alsospecify the name of the desired field with theshname= option.

This function requires the installation of the ABAPprogram ZGUIXTF4 (available on the downloadpage of www.synactive.com).

shselname1=shselvalue1=

shselname2=shselvalue2=

shselname3=shselvalue3=

You can specify up to 9 selection criteria for thematchcode display. The names that you specify withshname, shname2, shname3,... must beexactly the same as in the definition of the searchhelp (transaction SE11). The valuesshselvalue1, shselvalue2,shselvalue3,... can either be constants orother entry fields [...] .

ExamplesInputField .... searchhelp="COCAN"shselname1="GJAHR"shselvalue1="2002"

Only cost centers for the year 2002 are displayed.InputField .... searchhelp="COCAN"shselname1="GJAHR"shselvalue1="[Year]"

The content of the entry field [Year] is set asselection for the year.InputField .... searchhelp="COCAN"shselname1="GJAHR"

54 Synactive Documentation

shselvalue1="[varname]"

The content of variable [varname] is set asselection for the year.Please note: For this function you need the ABAPprogram ZGUIXTF4 in version 2002 Q3 8 orupwards.

R/3Rel. 4.0 only

Please note: For R/3 Rel. 4.0 a special handling isneeded, since the SAP matchcode function did notyet support the parameterization that GuiXT useshere.

• In the data dictionary SE11, copy the searchhelp where you need additional valueselection, using your own name. Forexample, copy "BETRA" into "ZZBETRA".

• If you need constant values as additionalselection, enter them as default value, e.g.'0001' (including the ' ') .

• If you need variable values, use a parameterid, e.g. enter BUK . Use a valid parameterid according to table TPARA.

• Do not forget to activate the search helpbefore testing

• In the script, use the notation shselname1="$ xxx " shselvalue1= "..." where xxx is theparameter id. For example: shselname1="$BUK "

You need ZGUIXTF4 version 2003 Q4 1 andupwards.

shname1=shdest1=

shname2=shdest2=

shname2=shdest2=

You can specify up to 9 additional fields; they arefilled when the user selects a matchcode entry. Thenames that you specify with shname1,shname2, shname3,... must be exactly thesame as in the definition of the search help(transaction SE11). The target fields shdest1,shdest2, shdest3,... can either be entry fields[fieldname] or variables V[varname].Examples:InputField .... searchhelp="COCAN" shname1="LSTAR"

GuiXT Keywords 55

shdest1=[Activity type]

When the user selects a cost center, the cost centerkey is put into the InputField. In addition,the activity type contained in the selected matchcodeline is put into the entry field Activity type.InputField .... searchhelp="COCAN" shname1="LSTAR" shdest1=[Activity type] shname2="KTEXT_KOSTL" shdest2=V[CC_text]

The variable V[CC_text] is filled with the costcenter text, to be used in further processing.Please note: For this function you need the ABAPprogram ZGUIXTF4 in version 2002 Q3 6 orupwards.

SearchHelpProcess=

You can specify an InputScript that isprocessed after the user has selected a valuein the search help display.Some typical applications:

• Display a text in addition to theselected valueSpecify SearchHelpProcess="return.txt" , where the InputScriptreturn.txt consists of the statement" Return " only. This forces thescreen to be displayed again, andthe variables set by the matchcode(like V[CC_text] in the sectionabove ) are shown to the user.

• Display further data that dependson the selected valueThe specified InputScript readsadditional data (e.g. with a Callstatement) and then uses " Return "to display the screen again. Thenewly read data can be displayedin the GuiXT script.

56 Synactive Documentation

Programmed matchcode helpYou can also program a special matchcode function in ABAP andassign it to the InputField.

Notation: searchhelp= "exit.progname.formname"Here progname is the ABAP program name and formname is thesubroutine name The form routine has a standardized interface (seebelow). It returns the selected value. The special optionsshselname1=, shselvalue1=, ..., shname1=,shdest1= can be handled as well (see "Special Topics" for details).

Example 1Inputfield (18,1) "Bk" (18,20) name="buk"size="4" searchhelp="exit.zguixtmc1.mcbuk"

ABAP program:Program ZGUIXTMC1.

* Value tabledata: begin of t1 occurs 100, bukrs like t001-bukrs, butxt like t001-butxt, land1 like t001-land1, ort01 like t001-ort01,end of t1.

* Returned valuedata: begin of r1 occurs 1. include structure DDSHRETVAL.data: end of r1.

Form mcbuk tables sel "table with shselname1=,shselvalue1=, dest "table with shname1=, shdest1 using invalue changing selvalue.

GuiXT Keywords 57

* Select data Select bukrs butxt land1 ort01 from t001 into corresponding fields of table t1.

* SAP standard function to display table asmatchcode selectionCALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST' EXPORTING RETFIELD = 'BUKRS' WINDOW_TITLE = 'Please select a companycode' VALUE_ORG = 'S' TABLES VALUE_TAB = T1 RETURN_TAB = R1 EXCEPTIONS OTHERS = 1.

* Return selected valueif sy-subrc = 0. selvalue = r1-fieldval.endif.

endform.

58 Synactive Documentation

Example 2: Local file nameInputfield (6,1) "Filename" (6,20)name="filename" size="50"searchhelp="exit.zguixtmc1.mcfile"

ABAP-Program:Program ZGUIXTMC1.

Data: tmp_filename(80).

Form mcfile tables sel "table with shselname1=, shselvalue1=, dest "table with shname1=, shdest1 using invalue changing selvalue.

Call Function 'WS_FILENAME_GET' Exporting DEF_FILENAME = invalue DEF_PATH = 'C:\GuiXT' MASK = ',*.*,*.*.' MODE = 'O' TITLE = 'Please select a file ' Importing FILENAME = TMP_FILENAME Exceptions others = 1.

* Return selected valueIf sy-subrc = 0. selvalue = tmp_filename.Endif.

Endform.

GuiXT Keywords 59

Tips&Tricks• You can also specify a quickinfo for the new field, observing the

SAP standard convention for a text with a quickinfo. Example:"@0L\QPlease use the external documentnumber as reference number@Referencenumber"

• The InputAssistant displays the history for your new input fieldsas well.

• The technical field name required for the matchcode functionalitycan be found in standard R/3 help F1, "Technical information".

• Special search help modulesThe following special search help modules can also be specifiedin SearchHelp="...":

• ... searchhelp="GuiXT.ORGEH"Hierarchical view of organization

• ... searchhelp="GuiXT.ZTERM"Payment terms

• ... searchhelp="GuiXT.ZTERM.D"Payment terms, debitors only

• ... searchhelp="GuiXT.ZTERM.K"Payment terms, creditors only

• ... searchhelp="GuiXT.DATE"Calendar

• ... searchhelp="GuiXT.AKONT.D" shselname1="BUKRS" shselvalue1="&F[::Company code]"Control account debitor.The company code must be specified (constant or variable).

• ... searchhelp="GuiXT.AKONT.K" shselname1="BUKRS" shselvalue1="&F[::Company code]"Control account creditor.The company code must be specified (constant or variable).

60 Synactive Documentation

Leave

PurposeWith Leave you can stop the flow of an InputScript. The currentscreen is the one displayed. In contrast to Return, there is no returnto the initial (start) transaction.

ExampleLeave

FormatLeave

Tips&TricksIn general it only makes sense to use Leave if you have used Enter.If you use Leave to stop an InputScript, following a Screen-command without Enter, the current screen will be displayedwithout GuiXT Script execution, and this is not usually what youwant.

GuiXT Keywords 61

Link

PurposeWith Link you can link variables to entry fields. In contrast to Set,the variable is updated automatically with the value entered by theuser. For example, you can use it when you fill fields automatically,and assume that the user might enter some of the fields manually aswell. In particular, when you simplify transactions using your ownInputFields, it makes sense to use Link on the hidden screens, if theuser can call them up.There are 2 different formats, indicating 2 different directions of valuesetting when the screen is displayed: With one format the entry field ischanged, with the other format the variable is changed.

ExampleLink [Date] V[myDate]The entry field "Date" gets the value of the variable "myDate",identical to Set [Date] "&V[myDate]".In addition, after the user has entered a new date, the variable"myDate" is set to this value.

Link V[myDate] [Date]The variable "myDate" gets the value of the entry field "Date",identical to Set V[myDate] "&[Date]".In addition, after the user has entered a new date, the variable"myDate" is set to this value.

FormatLink [entry field] V[varname]The variable sets the entry field and receives newly entered values.Link V[varname] [entry field]The variable gets the entry field value and receives newly enteredvalues.Link cell[table,column,row] V[varname]The variable sets the table cell and receives newly entered values.Link V[varname] cell[table,column,row]The variable gets the table cell value and receives newly enteredvalues.

62 Synactive Documentation

ListImage

PurposeWith Listimage you can display image files in R/3 ABAP lists.All features of the Image command are available. You specify theposition of the image within the list via a suitable string that you canchoose in the Listimage command.

Restrictions:• The images are not included if you print the list• An image is only shown when the corresponding image string is

on the currently displayed part of the list. This means that if youscroll down the image vanishes completely as soon as the linecontaining the image string is no longer visible. On the otherhand, at the bottom of the page the upper part of an imageremains visible.

Please note:Attribute an interface status to your report by means of the ABAPcommand "Set PF-Status ...". The GuiXT script can then be called upunder the report name you have chosen, e.g. "ZIMGR000.D0120.txt".The Dynpronumber in lists is always 120.Failing the attribution of such a status the list will appear under theprogram name "SAPMSSY0" and the script would then be processedfor all reports which have no attributed interface status.

ExampleListimage "@Cs" (0,0) (20,50)"C:\GuiXT\Images\ffm.gif"

The image file C:\GuiXT\Images\ffm.gif is displayed in thelist instead of each occurence of the string @Cs. The imagecooordinates are evaluated relative to the position of the string.

Variable imagesIf you want to display variable images, depending on the value of acertain field within a list section, you specify the value immediately tothe right of the search string and within normal brackets, e.g.@Cs(12345678)

GuiXT Keywords 63

In this case the name of the image file is modified: the string &paris replaced with the given value.

ExampleListimage "@Cs" (0,0) (20,50)"\\p800\products\&par.gif"

The image file \\p800\products\12345678.gif isdisplayed. Both the search string @Cs and the value (12345678) aredeleted in the list.

FormatListmage "string" (row,column) "name of theimage file"

The coordinates (row,column) define the position of the top lefthand corner of the image relative to the "string" in question.

Listmage "string" (row1,column1) (row2,column2)"name of the image file"

Analagous to the Image command.

OptionsSame options as in the Image command; multiple images andinteractions are also possible.

Tips&Tricks• You should choose a unique search string, otherwise the image is

displayed at other positions as well. Use special charactercombinations, e.g. @%.

• Images can also be display at TOP-OF-PAGE or within thecolumn heading lines of the list.

64 Synactive Documentation

Mark

PurposeWith Mark you can mark entry fields with a small red cross.For example, you can mark all fields that should be entered by theuser.

ExamplesMark [Base unit of measure]Mark [Base unit of measure] "-green"Mark [Base unit of measure] Image="C:\help.gif"

FormatMark [entry field]A small red cross is displayed in front of the entry field

Options-red Color red (Default)-green Color green-blue Color blue-yellow Color yellow-black Color black-white Color white

Image=filenameInstead of a small cross the specified imagefile(e.g., .bmp, .gif) is displayed.The image size should be 8x8 pixels.

-Text The mark is displayed in front of the fielddesignation text

GuiXT Keywords 65

Displaying help files in html formatComponent "Viewer" is required for this option.When the user clicks on the small red cross, the help fileViewHelp="..." is displayed at the right hand side of the R/3screen. Interactions with R/3 can be specified in the html file, asdescribed for the View-command (Setting values, calling functions).The help display disappears as soon as the user clicks on an R/3 field.

ExampleMark [Base unit of measure] Image="help.gif"ViewHelp="doc_unit.htm"

FormatMark [entry field] ViewHelp="filename.html"

Options for ViewHelp

ViewHelpWidth=Width of the help display (in pixel).If no width is specified, 40% of the totalwindow width is taken.

ViewHelpHeight=Height of the help display (in pixel).If no height is specified, 40% of the totalwindow height is taken.

ViewHelpPosition=

Position (upper left corner) of the helpdisplay in the form (row,column),e.g.: ViewHelpPosition=(10,50).Or relative to other screen elements,e.g. ViewHelpPosition="[Material]+(1,30)".If you specify a position without specifyingwidth and height, the whole window isused, starting at the specified position(lower right part of the window).

ExampleMark [Base unit of measure] Image="help.gif"ViewHelp="doc_unit.htm" ViewHelpWidth="200"

66 Synactive Documentation

Tips&TricksIf you need the small cross icons separately, for example in orderto display a short explanation of the signs, you can use the Imagecommand and the filenames• "mark_red.res"• "mark_green.res"• "mark.blue.res"• ...

GuiXT Keywords 67

Message

PurposeWith Message you can display a special message in a separatepopup screen from a GuiXT script or an InputScript.

ExampleMessage "Price change starting &[AEDAT]"Title="Please note new prices"

FormatMessage "message text"Message "message text" Title="Title"The message "message text" which can be one or several lineslong will be shown with title "Title".

Options

-StatusLine

The message is displayed in the status line. An alreadyexisting SAP standard message is not shown in thiscase.If the message text starts with "S: " or "E: " or "W: ",the message is shown as information or error messageor warning message.

ExampleMessage "E: Amount &V[amount]exceeds the limit of 50,000" -StatusLine

• A title parameter is ignored in this case.

• The -statusline option is always assumed in"Sapgui for HTML" environment (ITS).

Tips&Tricks• As always you can use variables in the message text and title.• By inserting \n in your message you can create a carriage return

in your message, by inserting \t a tab.

68 Synactive Documentation

NoDropDownList

PurposeWith NoDropDownList you change a drop down list into a normalentry field

ExampleNoDropDownList [Order type]

FormatNoDropDownList [Order type]Changes a drop down list into a normal entry field

Tips&TricksThis makes sense if the displayed value list contains many orfrequently used entries, so that the users prefer a direct input.

GuiXT Keywords 69

NoInput

PurposeWith NoInput you can cancel a field group or field's possibility forinput.

ExampleNoInput [Company code]

FormatNoInput [Screen element]NoInput [Table,columnname]NoInput [Table,*, rownumber ]The input possibility is cancelled for fields, check boxes andradiobuttons. In the case of field groups the cancellation applies for allelements within them.You can also specify a table, a table column or a table row.

Options-SearchHelp F4 search help remains possible.

ExampleThe following script cancels the input possibility for the column"Description", and for all already existing table rows (componentInputAssistant required for variable handling):

70 Synactive Documentation

if Q[Transaction=VA02] and Q[Page=Sales]NoInput [All items,Description]// Row indexSet V[i] 1label NextItem// Position filled? Then no inputSet V[VA02_item] "&cell[Allitems,Item,&V[i]]"if V[VA02_item]

NoInput [All items,*,&V[i]]Set V[i] &V[i] + 1goto NextItem

endifendif

Tips&Tricks• It is possible to combine NoInput and Default.• Row numbers always refer to the visible part of the table, starting

with 1.

GuiXT Keywords 71

NoLeadingZeros

PurposeWith NoLeadingZeros you can suppress leading zeros in the fielddisplay. Example: instead of "000123" the number "123" is displayed,instead of "000000" a single "0".

ExampleNoLeadingZeros [House number]

FormatNoLeadingZeros [Screen element]NoLeadingZeros [Table,columnname]You can specify a single field or a table column.

72 Synactive Documentation

Numerical

PurposeWith Numerical you can restrict a field input to digits only.

ExampleNumerical [House number]

FormatNumerical [Screen element]Numerical [Table,columnname]You can specify a single field or a table column.

GuiXT Keywords 73

Offset

PurposeIn order to shift a group of screen elements en bloc, e.g. radiobuttons,you can use the Offset command. The given offset is then added toall subsequently specified numerical coordinates.

ExampleThe following possibilities are equivalent:Offset (10,21)Radiobutton (0,0) "..."Radiobutton (1,0) "..."Radiobutton (2,0) "..."andRadiobutton (10,21) "..."Radiobutton (11,21) "..."Radiobutton (12,21) "..."

FormatOffset (row,column)

Tips&TricksWith Offset (0,0) you can cancel the effect of a previousOffset .

74 Synactive Documentation

On

PurposeWith On an input script can be processed if the user presses Enter ora function key. On is used in a GuiXT script.

ExamplesOn "Enter" Process="nextproduct.txt"On "/11" Process="update.txt"

FormatOn "fc" Process="script"On "fc" Process="script" Fcode="newfc""fc" can be one of the following strings:

• "Enter"

• "/n" where n is the number of a function key

• "/Menu=i,j,k,l" where i,j,k,l represent a menu entry. Pleaseuse the Input Recording option in order to generate the correctmenu path

Fcode="newfc" the code newfc is invoked. This can be a codefrom the menu, e.g. SCMP, or a transaction code like /NFB01 or/OMM02.

Tips&TricksA combination of function keys with the Ctrl and Shift keys canbe represented by a number between 13 and 48: Shift = +12 Ctrl = +24The Enter key can be represented by /0.

ExampleOn "/39" Fcode="/0" Process="warning.txt"

ResultWhen the user presses Ctrl+Shift+F3, the Enter key is simulated andthe script warning.txt is processed.

GuiXT Keywords 75

OpenFile

PurposeWith OpenFile you can open a file and then read the file withReadFile or write records to file with AppendFile.

ExampleOpenFile "X:GuiXTFiles\MatDes.txt"The file is opened in read-only mode.OpenFile "X:GuiXTFiles\MatDes.txt" -OutputDelimiter=";"

FormatOpenFile "filename"

Options-Output

The file is deleted, if it exists, and you can nowinsert new records into the file with AppendFile.

-AppendThe file is not deleted and you can append newrecords with AppendFile.

Delimiter="x"

The delimiter that you specify here, e.g. ';', will beused in ReadFile and AppendFile in orderto separate the fields from each other in a record.Default delimiter is the tab.

Tips&Tricks• Opening and closing a file is valid for each R/3 mode separately.

• It is not necessary to open a file explicitly with OpenFile, sinceReadFile or AppendFile contain an implicit open. But it isgood practice to do it explicitly, since otherwise a missingCloseFile means that a ReadFile will read nothing at allthe next time.See "Special Topics" for a detailed example.

76 Synactive Documentation

Parameter

PurposeWith Parameter you can define a parameter for an InputScript.When you activate the InputScript you can specify a value for each ofits parameters.

ExamplesParameter AmountParameter Curr "USD"This defines two parameters: Amount and Curr. The parameterCurr obtains the value "USD" if no value is specified in theInputScript call.You can use a parameter in any of the InputScript lines with itssymbolic name &[Name], e.g. &[Amount] and &[Curr] .

FormatParameter NameParameter Name "Defaultvalue"

Tips&Tricks• You can query whether a parameter has a value different from

space, resulting either from using or from its default value:if U[Name]

• It is also possible to compare it with a fixed value:if U[Name=Value]

Example:if not U[Curr=USD] and not U[Curr=SFR] Return "Currency &[Curr] is not supportedhere"

endif

GuiXT Keywords 77

Pos

PurposeWith pos you can shift fields, field groups, pushbuttons, radiobuttons,check boxes and tables to new positions.

Examplespos [Business area.] (10,50)pos [Client specific configuration] [Clientspecific configuration]+(10,0)

pos #[12,60](12,50)pos T[ORDERS](10,20)

Formatpos [screen element] (position)In the case of fields both the field name and the value or the inputfield are shifted. In the case of field groups all elements within thegroup and the group box itself are shifted.

Options

-Triple Applicable for input/output fields with an additionaltext field behind the entry field. All 3 fields are shifted.

-Value Applicable for input/output fields.Only the field value (entry field) is shifted.

-Text Applicable for input/output fields.Only the field text is shifted.

Tips&Tricks• If you wish to move all fields of a field group except one, you can

first remove this field from the box using pos and then movethe rest.

• If you specify the position within a script command symbolicallyby another screen element and shift this screen element to a newposition using pos, then its old position is valid f/r all scriptlines before the pos command, and the new position for allfollowing script lines.

78 Synactive Documentation

Exampletext [Account]+(0,50) "Text 1"pos [Account] [Account]+(1,0)text [Account]+(0,50) "Text 2"The two text strings "Text 1" and "Text 2" appear intwo lines one under the other.

• If you want to swap over the position of two fields, it is notcorrect to do it in the following way:pos [Account] [Currency]pos [Currency] [Account]Instead you must use absolute coordinates in the 2nd poscommand, or refer to a fixed screen element.

GuiXT Keywords 79

ProcessingOption

PurposeWith ProcessingOption you can set special processing options.

ExampleProcessingOption ReturnOnError=OffContinueOnPopup=Off

FormatProcessingOption option=On/OffThe option is switched on or off or a certain value is set. Thedefault for each option is shown below as an example.All options that control the processing of an InputScript are reset totheir default value when the InputScript is started. The other optionsremain valid for the whole session; they should be set in the sessionscript esession.txt.

Options

ContinueOnPopup=On

On: If a popup screen is not foundin the InputScript, it is displayedand the InputScript is continued.Off: If a popup screen is notfound in the InputScript, theInputScript is terminated with thedisplay of the popup.Use in: InputScript

ReturnOnError=On

On: If the SAP application issuesan error message, the starttransaction is called again, all inputvalues are filled set again, and theerror message is displayed.Off: If the SAP application issuesan error message, the InputScript isterminated and the error message isshown on the current screen.Use in: InputScript

80 Synactive Documentation

TreatWarningAsErrors=Off

On: Warning messages are treatedas error messages .Off: Warning messages areskipped, but inserted in the statuswindow (see StatusMessage).Use in: InputScript

MaxWarnings=20

Number of warning messages to beprocessed automatically for eachscreen. A further warning messageis treated like an error message.Use in: InputScript

LeadingSpace=Off

On: In commands like Set V[x]"F[element]", leading space in thefield value is kept.Off: In commands like Set V[x]"F[element]", leading space in thefield value is deleted.Use in: session script

SearchHelpTransaction= "ZXF4"

Transaction code used for thesearch help function (F4) for yourown input fields.Use in: session script

GuiXT Keywords 81

Pushbutton

PurposeWith Pushbutton you can create your own pushbuttons within anR/3 screen or within the toolbar. You can make both the menufunctions and the navigation to other transactions directly accessiblewith your own pushbuttons.

ExamplePushbutton (10,50) "Split Screen Editor" "SCMP"You create a pushbutton at row 10, column 50 with textSplit Screen Editor. Clicking on the button invokes theinternal code SCMP which then starts the Split Screen Editor.

Internal codesHow do I find the internal codes?Choose the desired function in the transaction menu and press F1while the mouse cursor points to this function. Now the R/3 systemdisplays the internal function code in a pop-up window

Format• Pushbutton (row,column) "Pushbutton text"

"FCode" Process="..."

Adds a pushbutton on position (row,column). The pushbuttoninvokes the internal code FCode. This can be a code from themenu, e.g. SCMP, or a transaction code like /NFB01 or/OMM02."Process=..." relates to the InputScript file. You can omitthe "fcode" parameter if only "Enter" is needed in order tocontinue with the transaction.

• Pushbutton (Toolbar) "Pushbutton text" "FCode"Adds a pushbutton in the application toolbar. A free funtion keyis assigned automatically and displayed in the quickinfo.

82 Synactive Documentation

• Pushbutton (Toolbar) "Pushbutton text" "FCode" "Fkey"Optionally you can specify a function key of your choice as anadditional parameter Fkey using the formatF1,..F12, Shift+F1,...,Shift+F12,Ctrl+F1,...,Ctrl+F12,Shift+Ctrl+F1,...,Shift+Ctrl+F12.If this function key is already in use the system chooses the nextavailable number.example: Shift+F5 � F17, F3 � F3

Icon and quickinfoYou can also display an icon and a quickinfo. Use the following SAPnotation:Pushbutton (position) "@id\Qquickinfo@text"Here id is the short name of an SAP icon, quickinfo is thequickinfo string and text is the pushbutton text. You will find a list ofall R/3 icons in transaction ICON, and a list of all icon short names inthe ABAP program <ICON> (Transaction SE38, enter the programname <ICON> and press the Display button). Example:Pushbutton (10,50) "@3G\QInvoke the SplitScreen Editor@Split Screen" "SCMP"

Options

Size="x" The pushbutton is displayed in a larger size (x rows).The default size is 1, maximum 99.

Size=(x,y) The pushbutton is displayed in a larger size (x rows andy columns).

-separator In conjunction with (Toolbar) . The pushbutton isseparated from the existing ones by a small vertical line.

Tips&Tricks• You can delete pushbuttons from the toolbar using

del [Pushbutton text]• You can add a quickinfo to an existing pushbutton using

Tip [Pushbutton text] "Quickinfo".• New pushbuttons in the toolbar are added on the right hand side.

They are also displayed in the function key overview window(right mouse button); here the order corresponds to the assignedfunction keys.

GuiXT Keywords 83

Radiobutton

PurposeWith Radiobutton you can replace an input field with a series ofradiobuttons. Instead of having to enter a certain code, the user cansimply click on one of the radiobuttons. This will make the operationmuch easier for the untrained user and save time for the trained user.Instead of a single field you can also specify up to 6 fields and valuesfor one radiobutton. In this case clicking on the radiobutton means thateach of these fields gets the corresponding value when you press theEnter button.Please note: In addition, there is a RadioButton syntax if youwork with InputScripts and internal variables, see InputAssistantDocumentation Radiobutton next pages.

ExamplesRadiobutton (10,1) "Cash sale"[Order type] "CS"

Radiobutton (11,1) "Internet order"[Order type] "IO"

Radiobutton (12,1) "Returns"[Order type] "RE"

del [Order type]A radiobutton with text "Cash sale" will appear at row 10,

column 1. Clicking on the text or button is equivalent to enteringthe value "CS" in the field [Order type]. Similarly, whenthe system displays the screen with a value "CS" in the field[Order type], the radiobutton "Cash sale" is activated.

Radiobutton (10,50) "Foods" [Division] "05"[Sales office] "0001"

Radiobutton (11,50) "Cosmetics" [Division] "14"[Sales office] "0002"

del [Division]del [Sales office]

84 Synactive Documentation

FormatRadiobutton (position) "Text next toradiobutton" [Input field] "Value"

Radiobutton (position) "Text next toradiobutton" [F1] "V1" [F2] "V2" ...

Tips&Tricks• It is also possible to display both radiobuttons and the input field.

This can be of value if you cannot foresee all possible values,but you know that a small subset of values is used in most cases.If the user then clicks on a radiobutton, the corresponding valuewill be substituted, but if he chooses to directly enter a value,he may do so. Should both actions be performed, the radiobuttonchoice takes precedence.

• If the referenced field ([Order type] in our example)contains a value which does not correspond to any radiobutton, no radiobutton will be activated. As a rule, you should not deletethe reference field if you are not sure that you have covered allpossible values within the radiobutton group.

• Radiobuttons treat " " and "00" the same way. Capital/small letterwriting is also ignored. The reason for that is that "00" is shownas " " in several R/3 screens (variable between edit/show screens)and small letters are transformed into capital letters.By using option "==" in front of the value you can switch off thisautomatic feature, i.e.:Radiobutton (7,10) "Standard"[Abschlagszyklen] "== "

Radiobutton (7,35) "Keine Abschläge"[Abschlagszyklen] "==00"

• After an error message it might be that a certain subset of theinput fields that you specified is changed to read-only by the R/3system. In this case some of your radiobuttons are changed toread-only too.The exact condition is: The radiobutton state is changed to read-only if at least one of its fields is both read-only and its value isdifferent from the value that you specified.

GuiXT Keywords 85

Radiobutton (IA)

PurposeWith RadioButton you can create radio buttons that correspond tothe value of a variable. All radiobuttons with the same variable nameare considered to be a group, i.e. when the user clicks on one of them,the others are turned off.Please note: In addition, there is a RadioButton syntax forreplacing an input field with a series of radiobuttons.See GuiXT Documentation Radionbutton on previous pages.

Example// Set default office: Boston

if not V[SelOffice] Set V[SelOffice] "60"endif

// Office selection

Offset (8,0)Box (0,0) (4,30) "Select Office"RadioButton (1,1) "Boston" Name="SelOffice"Value="60"

RadioButton (2,1) "Paris" Name="SelOffice"Value="62"

RadioButton (3,1) "Roma" Name="SelOffice"Value="80"

This defines 3 radiobuttons.The internal variable V[SelOffice] is set to one of the values"60", "62", "80", according to the selected radiobutton.

FormatRadioButton (row,col) "text" Name="..."Value="..."

86 Synactive Documentation

ReadFile

PurposeWith ReadFile you can read a record from a file into GuiXTvariables. You can then use the values in an InputScript.

ExampleReadFile "X:GuiXTFiles\MatDes.txt" s_matnrs_text s_unit s_price

A new record is read from the file. Using the delimiter given in theOpenFile command (Delimiter=, default delimiter is the tab),the record fields are separated from each other and the variables arefilled with the field values.For example, if you read the record1000001;20;Bolt;ST;0.02then the variable values are&[s_matnr]= 10000120 &[s_text]= Bolt &[s_unit]= ST&[s_price]= 0.02

FormatReadFile "filename" var1 var2 var3 ...Currently up to 14 variables are possible.If you specify more variables than contained in the file record, then allremaining variables are cleared.If there are no more records in the file (end of file), then all variablesare cleared.

Options

-StripQuotationMarks

Removes the quotation marks around fieldvalues.

Example:ReadFile -stripQuotationMarks"X:GuiXTFiles\MatDes.txt"s_matnr s_text s_unit s_price

GuiXT Keywords 87

Tips&TricksYou can handle the "end of file" condition in an InputScript in thefollowing manner (example):if not V[s_matnr] goto script_endendif

See "Special Topics" for a detailed example

88 Synactive Documentation

RemoveFile

PurposeWith RemoveFile you can remove a file.

ExampleRemoveFile "X:GuiXTFiles\temp.txt"

The file is removed.

FormatRemoveFile "filename"

Tips& TricksWith OpenFile and option -output you can delete the file contentwithout deleting the directory entry. RemoveFile deletes thedirectory entry as well.

GuiXT Keywords 89

Retry on error

PurposeRetry on error repeatedly activates the "Enter" button(following the appearance of an error message) until the error messagedisappears from the current screen. This is particularly useful in anInputScript following a modifying or complementary transaction,when you call up a further transaction for which the completion of thecurrent transaction is a necessary condition. The system displays anerror message until the required modification has been confirmed. Ifyou are using Retry on error for the Screen in question, the"Enter" button will be automatically activated after a certain time.This automatic activating of "Enter" occurs up to 20 times inincreasing time intervals: 0.3, 0.6, 0.9, 1.2, ... seconds. If the errormessage still appears, the processing continues as if the error messagehad occurred without "Retry on error" applying.When using "Retry on error" you don't need any additionalScreen commands.

ExampleRetry on error

FormatRetry on error

Tips&TricksIf you execute the InputScript in "Visible auto processing" mode, theoption "Retry on error" will be ignored.

90 Synactive Documentation

Return

PurposeWith Return you can terminate the processing of an InputScript,and return to the calling screen

ExampleReturn "Only currency USD is supported for thefast posting mode"

FormatReturnReturn "message text"Return "message text" "title"After returning the message "message text" is displayed withtitle "Title".

Options

-StatusLine

The message is displayed in the status line. An alreadyexisting SAP standard message is not shown in thiscase.If the message text starts with "S: " or "E: " or "W: ",the message is shown as information or error messageor warning message.

ExampleReturn "E: Amount &V[amount] exceeds the limit of 50,000" -StatusLine• A title parameter is ignored in this case• The -statusline option is always assumed in"Sapgui for HTML" environment (ITS)

Tips&Tricks• As always you can use variables in the message text and title

• By inserting \n in your message you can create a carriage return inyour message, by inserting \t a tab

GuiXT Keywords 91

Returnvalues

PurposeWith Returnvalues you can return values from a new mode,opened with "/O...,process=... ", to the old mode. As target fields, bothentry fields and variables can be used. It is also possible to invoke afunction code and to start an InputScript.

ExamplesReturnvalues "Material:&V[mat];Amount:&V[amnt]"

The content of the variable V[mat] (new mode) is set into the entryfield Material (old mode), and the content of the variable V[amnt](new mode) is set into the entry field Amount (old mode).Returnvalues "V[mat]:&V[matnr]"

The content of V[matnr] (new mode) is set into variable V[mat](old mode).Returnvalues "U[MATNR]:&V[matnr];OK:/8,process=next.txt"

In the old mode, function key F8 is invoked and the InputScript"next.txt" is started. Parameter U[MATNR] of the InputScriptgets the value of variable V[matnr] (old mode).

FormatReturnvalues string

The string syntax is the same as documented in Image for theparameter Input="...".

92 Synactive Documentation

ScreenPurpose

With Screen you initiate the automatic processing of a screen in anInputScript.When the InputAssistant processes a transaction internally, the nextmatching Screen command in the InputScript is searched and thecorresponding script commands are performed. If no matchingScreen command can be found, the screen is displayed and the usercan complete the transaction.

ExampleScreen SAPMF05A.0300This initiates the processing of screen 0300 of program SAPMF05A.

FormatScreen program.screennumber

Tips&Tricks• For nested screens only the top screen is specified, i.e. the screen

where the user fills in the values.• Specify the screen number with 4 digits• You should not use Screen commands within if ...

endif, since this makes the script hard to understand, andsometimes the behavior will be quite unexpected.

Bad exampleScreen S1Set V[x] "a"Enter

if V[x=b]Screen S2Enter "xx"

elseScreen S2Enter "yy"

endif

GuiXT Keywords 93

Assume that we have Screen S1 and then Screen S2. Does GuiXTnow process Enter "xx" or Enter "yy"? In fact, in this example,Enter "xx" is executed, since GuiXT looks for the next matchingScreen command for Screen S2, without considering open ifstatements of previous screen blocks.

Insteadplease close all open "if" statements in each screen block:

Screen S1Set V[x] "a"Enter

Screen S2if V[x=b]Enter "xx"elseEnter "yy"

endif

In some casesit makes sense to use goto/label

Screen S1Set V[x] "a"Enter

if V[x=b]goto l_b

endif

Screen S2Enter "xx"goto l_next

label l_b

Screen S2Enter "yy"

label l_next

94 Synactive Documentation

Set

PurposeWith Set you can assign a value to an input field. The Setcommand is useful in the definition of an InputScript. In contrast toDefault, the Set command ignores any previous field value. Itdoes not make much sense to use Set in normal GuiXT scripts.You can also use set in order to assign a value to a global variable. Becareful to use unique names for your global variables.

ExampleSet [Order type] "CS"The value "CS" is assigned to the field [Order type].Often the value is specified as a parameter of the InputScript, or as apreviously defined input field, e.g.Parameter OType...Set [Order Type] "&[OType]"

The following line sets the value of a global variableMM01_current_material:

Set V[MM01_current_material] "&[Material]"

FormatSet [Input field] "Value"Sets an input field valueSet V[vname] "Value"Sets a global variableSet V[gnm*] "Value"Sets all global variables where the name starts with "gnm*"Set * V[vname](x-y) * "Value"Sets a substring of a global variable. If the former length of thevariable is less than x, it is filled with "Space" until position x.

GuiXT Keywords 95

Options

Search=

The specified string is searched in the given text(ignoring upper/lower case). If the string isfound, the following word is set into thevariable.

ExampleSet V[docno] "&V[_message]"Search="document"

Assume that the system variableV[_message] has the value "Document10004003 was posted".The variable V[docno] then gets the value"10004003".

-uppercase The value is put into upper case-lowercase The value is put into lower case

ComputationsSet allows computing with the operators +, -, *, /, using 2 operandsin each case. The result is put into a variable in edited format.Both operands can be either values (e.g. 1 or 5830), or can bereferenced by variable names ("&V[...]").

ExamplesSet V[value] 5830 / 365Set V[value] "&V[total]" / 365Set V[value] "&V[total]" / "&V[days]"Set V[total] "&V[amount1]" + "&V[amount2]"Set V[index] "&V[index]" + 1

The result is rounded to 2 decimal places.For logon language English a decimal point is used, otherwise acomma. See also the Options and the DecimalSeparatorcommand.If the result is an integer value, no decimal places are shown, e.g."12" instead of "12.00".

96 Synactive Documentation

decimals=Specifies the number of decimals places in theresult (0,1,2,3,...). Integer values are then alsodisplayed with decimal places, e.g. "12.00".

decimalseparator=

You can specify "." or ",".The decimal separator is used both forinterpreting the operands and for editing theresult.

groupseparator=You can specify "," or ".".Groups of 3 digits are separated by the specifiedcharacter.

ExampleSet V[x] 24682471 / 7 Decimals=3DecimalSeparator="." GroupSeparator=","

The variable V[x] obtains the value "3,526,067.286".The exact result is "3526067.285714...". It is rounded to 3 decimalplaces, and then edited according to the specified options.

Tips&Tricks• You can mark a checkbox with Set: use the values "X" or " ",

or a parameter which has one of these values.

• In a similar way you can use Set for radiobuttons.If you activate one radiobutton it is not necessary to deactivatethe other radiobuttons in this group; this is done automatically.For exampleSet [Documentation] "X"in transaction SE38 would deactivate the other radiobuttons[Source], [Variants], [Attributs],[Text elements].

GuiXT Keywords 97

SetCursor

PurposeWith SetCursor you can set the cursor into a certain input field,into a table cell or on a position in a list.

ExamplesSetCursor [Name]SetCursor cell[Table,Material,5]SetCursor (4,1)

FormatSetCursor [fieldname]Sets the cursor into the field.SetCursor cell[table,column,row]Sets the cursor into a table cell.SetCursor (row,col)List display: Sets the cursor on a certain position in the list.

OptionsOffset=x The cursor will be positioned x spaces from the left border

within the field (or table cell).

98 Synactive Documentation

StatusMessage

PurposeWith StatusMessage you can display status messages during theprocessing of an InputScript. With the first StatusMessagecommand, all system messages (including warnings and errormessages) are also automatically included in the status messagelistbox.

ExamplesStatusMessage Title="Creating material"A listbox with the title "Creating material" is displayed. All systemmessages and your own status messages are displayed during theprocessing of your InputScript.StatusMessage AddString="creating sales data.."Adds a new line "creating sales data..." to the listbox.

FormatStatusMessage

Options

Title=A title should be given in the firstStatusMessage command.You can change it later if necessary.

AddString= A new text to be added to the listbox

StopRequest=

Display of a text e.g. "Processing aborted".The text is shown in the system menu of thelistbox. As soon as the user clicks on the menuitem, an internal status "StopRequest" is setwhich can be questioned within the inputscriptbyif Q[StopRequest],for example after Enter or within data processingbefore reading a new line. The inputscript canprocess different ending procedures (e.g. closefiles) and finally stop processing.

GuiXT Keywords 99

Size=(Lines,Columns)

Size of the listbox in lines and columns.If one of the values is given as 0, the previousvalue will be retained.

Position=

Position of the listbox in lines and columns, or insymbolic form. Examples:... Position=(10,40)... Position=[Company code]+(2,10)

-ResetContent Resets the content of the listbox-Remove Removes the listbox from screen

SystemMessages=

Controls the inclusion of system messages intothe status message window. You select themessage types E (Error), W (Warning), or I(Information) , or On / Off.

Examples:SystemMessages=OnAll system messages (default)SystemMessages="E,W,I"same: all system messages (default)SystemMessages=OffNo system messagesSystemMessages=""same: no system messagesSystemMessages="W"Warnings only

Tips&TricksYou can include variables in the AddString= parameter.Example: withStatusMessage Title="&V[_title]"you can display the title of the screen that you are processing.

100 Synactive Documentation

Stop

PurposeWith Stop you can stop the interpretation of the remaining part of thescript.

ExampleStop

FormatStop

Tips&TricksThis command is useful for testing. You can leave a second version ofthe script in the same file and put a Stop before it.

GuiXT Keywords 101

Tab

PurposeWith Tab you can define the tab order of fields and table columns.For each field and each table column you can specify the cursorposition after pressing the tab key.

ExampleTab [Company code] [Booking date]

FormatTab [Screen element1] [Screen element2]Tab [Table,columnname1] [Table,columnname2]When you specify columns, and the new column is not on the righthand side of the previous one, the cursor is put into the next table row.Tab performs automatic "Enter" if a new row is required at the end ofthe table.

Tips&TricksWhen you specify the same column twice (origin and destination),the user can easily fill in this column for several table rows.Similarly, if you want to facilitate data entry into the first 3 columns,without using the mouse, you can jump from column 3 to column 1(next row).

102 Synactive Documentation

TableWidth

PurposeWith TableWidth you can change the table width in a tablecontrol.

ExampleTableWidth [All positions] 64

FormatTableWidth [tablename] nn is the new table width in the table display (number of characters).

GuiXT Keywords 103

Text

PurposeWith Text you can• display any given text on the R/3 screen• change a field name• change the name of a pushbutton, radiobutton or check box.

ExamplesText [Company code] "Regional office"Text (10,50) "Please use form M10A"Text (11,50) " for printout"

FormatText [Screen element] "text"Text (position) "text"

Options

-Border The text is displayed with a small border(like read-only fields)

-intensified The text is displayed in a different color.-fixedfont The text is displayed in a a fixed-pitchfont.

Size="n"The text is displayed in length n, padded withspace

Tips&Tricks• If you want to replace a field name throughout the entire R/3

system, you can do it by means of the R/3 repository or with thecommand GlobalTextReplace.

• If you want to display a text in a more esthetic way, you can usethe Image command or you can use the View command for thedisplay of an html file or an rtf text (e.g. as produced in MicrosoftWord) .

104 Synactive Documentation

TextBox

PurposeWith TextBox you can display and edit a text.

ExampleTextBox (10,20) (16,44) name="t1"A text edit box is displayed in the screen area (10,50) to(16,44). The content is assigned to a text variable "t1".

FormatTextBox (row1,column1) (row2,column2)name="textname"

Options-ReadOnly The text cannot be changed.

Tips&TricksWith CopyText you can copy texts between files, screen areas andtext variables

GuiXT Keywords 105

TextReplace

PurposeWith TextReplace you can replace a text in the display of theR/3 screen.

ExampleTextReplace "company code" "regional office"

FormatTextReplace "old" "new"The string is replaced in the following screen elements:• Field labels• Screen title• Group box title• Push button title and quickinfo• Message line• Menu texts• Column headers in tables• Table titleThe following rules apply for the text replacement:1. It is not case-sensitive, but the first character remains in upper case

or lower case2. Longer texts are replaced before shorter ones

Tips&TricksThe command GlobalTextReplace has the same effect, but forall R/3 screens

106 Synactive Documentation

Tip

PurposeWith Tip you can add a quickinfo (tooltip) to fields, field groupsand pushbuttons. When the user points the cursor to the field name,the tip appears in a small yellow box. With field groups, a special iconis on display at the upper right hand corner of the group box. Puttingthe cursor on the icon will display the quickinfo.

ExamplesTip [First name] "First name, e.g. Charles orRobert, generic search Ro* is also possible"

Tip [Contract] "Display contract data and priceagreements"

FormatTip [Screen element] "Quickinfo"Screen elements can be single fields, field groups and pushbuttons.With fields a small icon is on display to the left of the field name; withfield groups the icon is at the upper right hand corner of the groupbox.

Tips&Tricks• A few characteristic input values help the user more than abstract

definitions• You can choose the tip icon in the file guixt.ini from any of the

R/3 standard icons. The relevant profile parameters are:icon_tip_field for fields(Default is "icon_tip_field 0L")and icon_tip_box for field groups(Default is "icon_tip_box 35")

• A list of all R/3 icons can be found in transaction ICON; theinternal short names of the icons are contained in the ABAPprogram <ICON> .

• From Sapgui Release 4.0 and upwards you can also suppress thefield tip icon setting "icon_tip_field Space" in guixt.ini.However, it is then no longer obvious, at a glance, where the usercan display a quickinfo.

GuiXT Keywords 107

Title

PurposeWith Title you can change the title of an R/3 screen.You can also use Title in an InputScript. The new title is displayedas long as the InputScript is active.

ExampleTitle "Maintain user parameters for &[user]"

FormatTitle "text"

Tips&TricksNote that the same screen may be used for "Display", "Change" and"Create".Either you formulate the title text in a fairly general manner,for exampleTitle "User parameters for &[user]"

or you differentiate the title using an expression like"if Q[Status=xxxx]".

108 Synactive Documentation

TitlePrefix

PurposeWith the TitlePrefix command you can provide the titles of allR/3 screens with their own prefixes, e.g. a tag for a particular systemor for a particular client. The command is valid for the current screenand all the following ones.If the R/3 window happens to be minimised the modified title will beindicated in the taskbar, so that the user can easily distinguish betweenseveral systems, clients, etc.

ExampleTitlePrefix "&[_database]:"For a system with the tag TST, all its titles will begin with "TST:".

FormatTitlePrefix "text"

Tips&Tricks• It makes sense to put the TitlePrefix command in the

Session-Script ESession.txt

• You can use the variables &[_database] and &[_client]

• A conditional combination is also possible, e.g.if V[_database=TST] TitlePrefix "Training:"endif

• If a script's own title is replaced by Title, this will be indicated.

GuiXT Keywords 109

Uppercase

PurposeWith Uppercase you can restrict a field input to uppercasecharacters.

ExampleUppercase [Search term]

FormatUppercase [Screen element]Uppercase [Table,columnname]You can specify a single field or a table column.

110 Synactive Documentation

Using

PurposeWith Using you can assign a value to an InputScript parameter.Both a constant value and the name of a screen field are possible.

ExamplePushbutton (toolbar) "Create" "CRE1"Process="CreateOneStep.txt"

Using Currency = "USD" Using Amount = [Amount2]

On "Enter" "Create" "CRE1"Process="CreateOneStep.txt"

Using Currency = "USD" Using Amount = [Amount2]

On "/11" "Create" "CRE1"Process="CreateOneStep.txt"

Using Currency = "USD" Using Amount = [Amount2]Here Currency gets the value "USD", Amount gets the value ofthe field [Amount2].

FormatUsing pname = "Value"Using pname = [fieldname]

Tips&TricksPlease note the difference:

A: Using CC = "&[Company Code]"B: Using CC = [Company Code]C: Using CC = "Company Code"D: Using CC = &[Company Code]Assume that there is a field [Company Code] on the screen with the value"0001", and that the user entered the value "5800".The parameter CC then has the following values:A: CC = "0001"B: CC = "5800"C: CC = "Company Code"D: CC = "0001" (same meaning as variant A)Normally only variant B makes sense.

GuiXT Keywords 111

VersionNumber

PurposeWith the VersionNumber command you can reduce web traffic to asingle access-to-server operation per R/3 logon when using scriptsfrom the R/3 web repository or from ftp/http servers.By means of VersionNumber xxx you insert into the logonscript a freely assignable version nummer. The logon script will benewly loaded each time from the web repository or from the chosenftp/http server, never from the local cache. GuiXT will now seek outall further scripts directly from the local cache, the index names ofwhich have been gleaned from the GuiXT profile, and to which thechosen version number has been added. As a rule there will be nofurther cause for access to the scriptserver so long as the user calls upno further R/3 screens. Without VersionNumber, on the otherhand, each and every script would have to be newly cached for eachR/3 session.With 400 users, 30 different R/3 screens per user and 500 dialog stepsper user, the following numbers of access-to-server operations may becalculated for an integrated system:• without local cache: 400*500 = 200,000• with local cache: 400*30 = 12,000• with local cache and version number:400 * 1 = 400Later on, should you wish to carry out changes to the GuiXT scriptsand make them effective for all users, you simply increase the versionnumber. The next time R/3 is called up, GuiXT reads the new versionnumber, effaces the previous cache index and proceeds to fill a newcache under the new version number.

ExampleVersionNumber 0010

FormatVersionNumber stringPlease note that string is to contain only those symbols that arepermitted for index names in Windows, preferably just letters andnumbers.

112 Synactive Documentation

View

PurposeWith View you can display html and rtf files. In addition, the htmldisplay offers the possibility of interaction with R/3 screens (Settingfield values and calling up menu functions).It is possible to use a template file (rtf or html) which contains GuiXTvariables, e.g. field names. These variables are automatically replacedby their current value.The View command supports the standard image formats bmp, gifand jpg just as Image does. In contrast to the Image command theyare displayed in a separate scrollable screen area.

Note that the View command is part of the component GuiXTViewer (R/3 add-on by Synactive).It also requires Microsoft Explorer 4.0 or higher.

ExampleView (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).

FormatsThe following file formats are supported:• rtf• html• bmp• gif• jpg

Options

-floatingA new window is opened for the display.It can be resized and moved about independently of theR/3 screen.

-maximizeIn conjunction with -floating: the window ismaximized.

GuiXT Keywords 113

ReturnWindow=

Name of a variable that revives the internalwindow handle of the created view window. Pleaseobserve: This is only possible if View is usedwithin an InputScript.

CloseWindow=

Window handle from of an open view window (seeReturnWindow= option). The window isclosed.Example of an InputScript usingReturnWindow= and CloseWindow=:Parameter CLOSE

if U[CLOSE=X]ViewCloseWindow="&V[viewwindow]"return

endif

View (6,1) (30,120) template="form2.html" -floating ReturnWindow="viewwindow"

FormatView (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 theupper left hand and lower right hand corner; you may use decimalnumbers as coordinates. The file is searched for in the current GuiXTScript 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 filethat you specified first, and all GUiXT variables &[....] arereplaced by their current values.If you specify only the template file (3rd View format), thenGuiXT copies the template file into a temporary file, replaces thevariables and displays the file.

114 Synactive Documentation

Data dependent viewsThe file name can contain variables that are replaced by their valuesbefore the file is loaded.

ExampleView (4,80) (12,120)"C:\products\img&[Materialnummer].rtf"

If the user enters the product number 00500187, the fileC:\products\img00500187.rtf is displayed.

Interaction with the R/3 screenAs usual, you can click on URLs in the html display in order tonavigate to other documents in the local file system, the intranet orinternet. The "Back" button can be called up via a right mouse click.As a particularly handy feature you can define interactions with theR/3 screen via special SAP URLs:• You can put values into R/3 input fields• You can call up menu functionsThe SAP URLs start with the string "SAP://". You then specify thefield names and field values and, if desired, a menu function.

GuiXT Keywords 115

The notation 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 haveto 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 thesceen menu, e.g. SCMP, or a transaction code as for example /NFB01or /OMM02.

You will find the internal menu codes as follows:Choose the desired function in the transaction menu and press F1while the mouse cursor points to this function. Now the R/3 systemdisplays the internal function code in a pop-up window.The Enter button, without any special function code, can be called upwith OK at the end of the SAP URL:<A href="SAP://field1:value1;field2:value2;field3:value3;OK">

Starting an InputScriptIn 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; field3:value3;OK:fcode,process=displaymaterial.txt">"Using" parameters can be passed to the InputScript via the SAP-URLwith the notation U[name]:value. You can also set internal GuiXTvariables with V[name]:value and use this value in your InputScriptor in GuiXT scripts.

Using JavaScriptIf your html page contains a form with some entry fields, it mightmake sense to use JavScript in order to pass these values to R/3.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 R/3.

116 Synactive Documentation

Example 2<A HREF="SAP://Material:00012345;Plant:0021;OK"> Bolt 8x15mm</A>Clicking on the text "Bolt 8x15mm" completes the fields"Material" and "Plant" and then automatically activates theEnter button.

Example 3HTML page:<form name="form"><strong>Customer</strong><input type="text" size="20"name="Customer"value="&amp;[::Customer]"><input type="button" name="Display" value="Display "onclick="DisplayCustomer()"></form><script language="JavaScript"><!--function toGuiXT(string){window.location.replace("SAP://" + string);}

function DisplayCustomer(){toGuiXT("U[Customer]:" + document.form.Customer.value +";OK:/NVD03,process=ShowCustomerData.txt");}

//</script>

When the user clicks on the button "Display" you call up transactionVD03 with the InputScript "ShowCustomerData.txt" . You pass thecutomer number that the user entered to the InputScript withU[Customer]:...If you use the template= option of the View command, then thelast recently entered value in the R/3 field "Customer" is taken asinitial value in the html form.

GuiXT Keywords 117

Open documentsYou can open any document with View ; the document viewer isstarted as a separate application:View "file name"This will start the same application as if the user clicked on thedocument in Windows Explorer.Examples: .doc or .pdf files. You can also start .exe or .bat files.

Options

Operation=

Operation to be performed. Default operation is"Open". The other operations depend on the documenttype. Often the operations "Edit" and "Print" aredefined as well.

Parameters= For .exe and .bat files: string with parametersDirectory= Default directory

Tips&Tricks• You can use the technique described in Example 1 in order to

create an html form of the R/3 application menus, which is bothesthetic and quick to use.

• For end user training you can create special html documentscontaining various test input values and explanations.

• In combination with InputAssistant you can also display the htmldocument when the user presses a pushbutton, e.g.:

GuiXT Script:

Pushbutton (Toolbar) "Show documentation"Process="ActivateView.txt"

if V[GuiXT_Show_View=X] Set V[GuiXT_Show_View] "N" View (1,60) (20,100) "C:\GuiXT\html\docu100.html"

endif

InputScript ActivateView.txt:

Set V[GuiXT_Show_View] "X"

118 Synactive Documentation

ViewHelp(in combination with the commands Mark or Image.)

PurposeA variant of the View command can be invoked with the optionViewHelp= in the commands Mark and Image.With this option you can easily display your own help window, forexample for training purposes, or for presenting detailed productinformation. When the user clicks on your help icon (in the toolbar orsomewhere on screen), the help file is displayed at the upper righthand side of the screen.See also Help Views Directory in GuiXT Profile.

MARK with Option ViewHelpDisplaying help files in html format

Component "Viewer" is required for this optionWhen the user clicks on the small red cross, the help fileViewHelp="..." is displayed at the upper right hand side of theR/3 screen. Interactions with R/3 can be specified in the html file, asdescribed for the View-command (Setting values, calling functions).The help display disappears as soon as the user clicks on an R/3 field.

FormatMark [entry field] ViewHelp="filename.html"

ExampleMark [Base unit of measure] Image="help.gif"ViewHelp="doc_unit.htm"

IMAGE with Option ViewHelpDisplay your own html help

Component "Viewer" is needed for this functionWith ViewHelp= you specify an html file. Clicking on the imagewill display the html file in the upper right hand side of the window. Itcan contain interactions with the SAP window ("SAP://"-URL).When the user clicks on any other field, the help display is closed.

GuiXT Keywords 119

FormatImage (row,column) "image file"ViewHelp="docfilename.html"

ExampleImage (toolbar) "help.gif"ViewHelp="doc_order.htm"

Options for ViewHelp

ViewHelpWidth=

Width of the help display (in pixel).If no width is specified, 40% of the totalwindow width is taken.It is also possible to specify the width inpercentage, e.g. ViewHelpWidth=60%

ViewHelpHeight=

Height of the help display (in pixel).If no height is specified, the total windowheight is taken.It is also possible to specify the height inpercentage, e.g. ViewHelpHeight=50%

ViewHelpPosition=

Position (upper left corner) of the helpdisplay in the form (row,column), e.g.:ViewHelpPosition=(10,50).Or relative to other screen elements, e.g.ViewHelpPosition="[Material]+(1,30)".If you specify a position without specifyingwidth and height, the whole window is used,starting at the specified position (lower rightpart of the window).

ExamplesMark [Base unit of measure] Image="help.gif"ViewHelp="doc_unit.htm" ViewHelpWidth="200"

Image (toolbar) "help.gif"ViewHelp="doc_intorder.htm"ViewHelpWidth="200"

120 Synactive Documentation

WindowSize

PurposeWith Windowsize you can resize a popup screen. This isparticularly useful when you want to add new elements to a windowwhich is too small.

ExamplesWindowsize (12,60)

FormatWindowsize (rows,columns)Resizes the popup screen to the desired dimensions.

GuiXT Keywords 121

GuiXT system variables

variable content examplegeneral status information&[_user] user's name BAKER&[_client] client 001&[_transaction] transaction code MM03&[_title] name of SAP screen display material&[_database] name of R/3 system C11&[_ashost] name of host server pwdf0042

position of cursor&[_cursorrow]&[_cursorcol]

position of cursor: rowand columnavailable in anInputScript if the userhas placed the cursor inan input field

1230

&[_tabrow]&[_tabcol]

position of cursor:number of the table rowand number of the tablecolumn, in each casebeginning with 1available in anInputScript if the userhas placed the cursor in atable cell

56

&[_listcursorrow] position of cursor inlists: row (begins with 0)

7

&[_listcursorcol] position of cursor inlists: column (beginswith 0)

48

122 Synactive Documentation

indications&[_lastwarning] text of the last warning

during in the processingof an InputScript

W: date is in thefuture

&[_lasterror] text of the last errormessage during in theprocessing of anInputScript, withtransaction, program anddynpro number given inbrackets

E: booking codeX2 is notpermitted(FB01,SAPMF05A,0300)

&[_message] message text(information)

receipt100000444 wasrecorded inbooking number1000

contents in lists&[_listline(0)]&[_listline(1)]&[_listline(2)]...

contents of the lines in alistnote: vertical andhorizontal lines in thelist are representedinternally by numbers(4,5,..)

5M-06 10000 05

&[_listline] content of the list line inwhich the cursorcurrently is

5M-02 28000 09

&[_liststring] string within the list linein which the cursorcurrently is

28000

extra indications in lists and tables&[_listfirstvisiblerow] first filled row on current

screen in lists and tables252

&[_listlastvisiblerow] last filled row on currentscreen in lists and tables

280

&[_listlastrow] total count of rows inlists and tables

578

GuiXT Keywords 123

date and time&[today_ymd] actual date in the form:

year month day20021224

&[today_hms] time of day in the form:hour minute second

154810

&[today...] predefined variables andcalculatons withtoday+... or today-... arepossible.In the calculations,+ or - as well asd=day,h=hour,m=minute,s=secondmay be used.

&[today_m/d/y]� 12/24/2002&[today_h:m]� 15:48&[today_d.m.y h:m]� 24.12.2002 15:48&[today+1_m/d/y]� 12/25/2002&[today+14_m/d/y]� 1/7/2003&[today-1_m/d/y]� 12/23/2002&[today+6h_h:m]� 21:48&[today+12h_m/d/y]� 12/25/2002

variables in GuiXT script and history directories&user user's name BAKER&client client 001&database name of R/3 system C11&winuser windows user name

(in GuiXT scriptdirectory and historydirectory)

Smith