GuiXT

Purpose of GuiXT With GuiXT you can add comfort, speed and intuition to your use of the R/3 system. Writing only a few lines, you integrate images and texts into the R/3 forms, you rearrange fields, you offer radio buttons instead of coded input, and you create push buttons for selected functions. 
Technology GuiXT is based on a simple scripting language. You define the layout of an R/3 screen in the form of a series of commands.
Example del [Translation dte]  
pos [First line item] (8,0) 

The entry field Translation dte is deleted and the field group First line item is shifted to row 8, column 0

Create and edit a GuiXT script How do I create and edit a GuiXT script?
Go to the R/3 screen that you wish to modify. Click on Edit->Script in the GuiXT Menu. Now the text editor (Notepad) for the corresponding script is started.
Calling for Help The documentation has to be installed if you wish to call for help, since Help is in fact  the Documentation.

When you install GuiXT (either after downloading it from our website or by installing the version delivered by SAP) you do not install the help files automatically. You can download the documentation from the download page of our website. Please note that the language of the help will depend on the language used for the logon (English/German/French). So, for example, if you logged on in English, the English version of documentation has to be installed. Please check in your GuiXT profile that the directory indicated for the documentation is correct.

Where are the GuiXT Scripts stored? GuiXT Scripts are stored as normal ASCII files on your PC or on a file server in a LAN. You define the directory for the GuiXT scripts with a profile parameter in guixt.ini: 

Directory1 directoryname 

For example, 
Directory1
"C:\GuiXT\Script1" 

Up to 4 directories can be specified: Directory1,...,Directory4. They are searched for a suitable script in reverse order Directory4,...,Directory1. For example Directory1 could contain company specific scripts and Directory2 could contain specific scripts for a certain user group. 

With GuiXT profile parameters you can assign different scripts for different user groups. If you are working in more than one R/3 system or in several client systems, you can use the following system variables in the directory names: 

&client is replaced by actual R/3 client 
&database is replaced by actual database (System Id) 

Example:

Directory1 "\\Server\GuiXT\scripts" 
Directory2
"F:\GuiXT\scripts\&database" 
Directory3
"C:\GuiXT\myscripts\&database"

Say we are working in R/3 system TST. GuiXT will first look for corresponding script indicated as Directory3 C:\GuiXT\myscripts\TST. If the script cannot be found there, GuiXT will then look for it in directory F:\GuiXT\scripts\TST and finally in directory \\Server\GuiXT\scripts.

On the R/3 Logon screen the variable &client will be replaced by the value 000 as client is not known at this stage.

Naming conventions for GuiXT Scripts Each GuiXT Script refers to exactly one R/3 screen (R/3 dynpro). In the R/3 repository the screens are identified using the ABAP program name and a 4-digit screen number, e.g. Screen 0100 for program SAPMF05A. Since GuiXT scripts are language specific (they contain field names, texts and images), their key also contains a language key, e.g. E for English, F for French, I for Italian, J for Japanese,... 

The name of a script file is constructed as follows: 

pppppppp.Lnnnn.txt 

pppppppp: ABAP program name 
L: Language key E, F, I, J, ... (1-character language key from the R/3 system) 
nnnn: 4-digit screen number 

Example:  

SAPMF05A.E0100.txt 

This holds with the following two exceptions: 

  • The logon screen script is stored under Elogon.txt, Flogon.txt,... Here the language key is the language in which the logon screen is displayed, since it is not yet known which language the user will choose.
  • The application menu scripts are stored using the names of the corresponding GUI programs MENUxxxx instead of SAPMSYST. This allows you to define a different screen layout for each of the application menu screens - screens that look relatively empty in the R/3 standard.. Examples are MENUS000.E0040.txt or MENUPR00.E0040.txt

You could use Image, View, Pushbutton in order to design your own graphical application menus.

Format of script commands
  • Each script command has its own line. 
  • Blank lines are ignored. 
  • Comments within a line are made possible with the sign //. 
  • Each line starts with the script command, e.g. pos
  • Screen elements are in square brackets, e.g. [Translation dte] 
  • Screen coordinates are in normal brackets, e.g. (8,0)
  • To use inverted commas " within strings in scripts use double inverted commas ""
  • GuiXT script lines can be up to 4000 characters long
How do I name the screen elements? Screen elements are: 
  • Fields
  • Field groups
  • Pushbuttons
  • Radiobuttons
  • Check boxes
  • Table controls
  • Tabstrips
  • R/3 controls
  • Menu items

They are named according to their text as displayed on the screen, in square brackets, e.g. [Translation dte] or [Account number].  

Please note that you have to enter the text exactly as it appears on the screen, with the following possible exceptions: 

  • They are not case sensitive, e.g. [ACCOUNT NUMBER] or [account number] instead of [Account number]
  • Spacing is not important, e.g. [Accountnumber] instead of [Account number]
  • You can abbreviate the text using an ending period, e.g. [Transl.] or [Translation d.]  instead of [Translation dte] 
  • You can use the quickinfo text (tooltip) for icon pushbuttons

Optionally you may specify the type of the screen element prior to its name, for example if a field and a field group have the same name. The following types are possible: 

  • F[...] Field
  • G[...] Field group
  • P[...] Pushbutton 
  • R[...] Radiobutton
  • C[...] Check box
  • S[...] Tabstrip
  • T[...] Table
  • X[...] R/3 control (e.g. image control)
  • M[...] Menu item

Examples:

del F[Translation dte]  
pos G[First line item] (8,0) 

You can also deal with screen elements without text using the notation:

  • #[x,y]
    where
    x is the row and y is the column (starting with 0 in both cases)
  • for tables without name: [table] or T[table]

If two ore more elements with the same name exist, e.g. [Account number], then the first field (from top left to bottom right) gets the normal name [Account number] and those following get a sequence number as suffix: [Account number.2], [Account number.3], ...

If two or more tables without names exist, then the first table is addressed with [table] or T[table] and those that follow get a sequence number as suffix: [table.2] or T[table.2], ...

Positions There are three ways to specify a screen position: 
  • (x,y) Here x is the row and y the column. For example, (4,60) means: row 4, column 60. The numbering begins with (0,0) unless you specified a different starting position using the offset command. x and y are positive whole numbers. Only two commands (image and view) allow us to specify the position using decimal numbers, e.g. (1.5,2.8)
  • [name] You name a screen element whose position is used
  • [name]+(x,y) You name a screen element plus an offset, which is then added to the position of the screen element. Negative values are also permitted for x and y, for example [Account number]+(1,-10): one below and 10 columns left of the field Account number.
Relative Positioning In order to shift a group of screen elements en bloc, e.g. radiobuttons, you can use the Offset command in the form (row,column). The given offset is then added to all subsequently specified numerical coordinates. For example, the following two possibilities are equivalent: 
 

Offset (10,21)  
Radiobutton (0,0) "..." 
Radiobutton (1,0) "..." 
Radiobutton (2,0) "..." 

and 

Radiobutton (10,21) "..." 
Radiobutton (11,21) "..." 
Radiobutton (12,21) "..."

Variables In all strings "..." within a script command line you can use variables that stand for field values of the current screen or of previous screens. Before the system interprets the script command, it replaces all variables by their corresponding values. The name of a variable consists of the &-sign followed by the field name within square brackets, e.g. &[Account]

Example: 

Title "Display account &[Account]"  

If the current value of [Account] is 113100, the Script command is equivalent to 

Title "Display account 113100"  

You can also extract substrings with the notation &[...](a-b) where a denotes the first character to be extracted and b the last one. Example: "&[Account](3-4)" is replaced with "31" if the whole account number is 113100.

It may sometimes be necessary to use input values from previous screens. For example, you might have entered a product number in the first screen of a transaction and you wish to use this product number in the second screen for displaying a product image. In this case you have to put two colons prior to the field name. Example: 

Image (4,80) "P:\products\img&[::Material number].jpg" 

If the user entered the product number 00500187 on the first screen, the image file P:\products\img00500187.jpg is displayed on the second screen. 

A special predefined variable is the current date &[today_...] in various formats. You can use the letters d=day, m=month and y=year in order to define the date format that you need. Examples for December 24th, 1999:

&[today_dmy] 24121999
&[today_mdy] 12241999
&[today_y] 1999
&[today_m/d/y] 12/24/1999

You can also add or subtract a given number of days from the current date. Examples for December 24th, 1999:

&[today+1_dmy] 25121999
&[today-1_dmy] 23121999
&[today+8_m/d/y] 01/01/2000

Tips
& Tricks
  • If you use SAP GUI below 4.6B, GuiXT has to be active before you start R/3 SAP GUI. A simple way to achieve this is to include guixt.exe in a saplogon.bat file which you then link to your R/3 logon desktop icon instead of saplogon.exe:
  • Start C:\guixt\guixt.exe 
    Start C:\sapgui\saplogon.exe 
  • The parameter StartHidden Yes in guixt.ini suppresses the GuiXT window completely. An alternative is StartMinimized Yes
  • If a script command seems to have no effect, the reason might be a wrong name for a screen element. For example, you might have written [Translation date] instead of [Translation dte]. When you open the script window in GuiXT, you can see the corresponding syntax error messages. In order to open the script window you click on View->Script.
  • Instead of your writing the script by hand, the R/3 add-on tool GuiXT Designer (a WYSIWYG Editor) will do it for you. Details can be found on Synactive's websites http://www.synactive.com (Synactive GmbH, Germany) and http://www.synactive.net (Synactive Inc., U.S.A.)