Register Login

Introduction to GuiXt

Updated Jun 14, 2018

This tutorial explains

  1. GuiXt Overview
  2. Installation
  3. Script Commands
  4. System variables
  5. The GuiXt screen
  6. About pushbuttons
  7. GuiXT Example
  8. The modified screen

1) GuiXT Overview

GuiXt gives you more flexible way to redesign screens than transaction and screen variants. GuiXt is based on a simple scripting language. From version, 4.x GuiXt is included with SapGui free of charge. For ealier versions, you have to buy it from Synactive.

Uses of SAP GuiXt:

  • Move or delete fields, table columns and pushbuttons
  • Modify field texts, headings and pushbutton labels
  • Add texts, tips and group boxes
  • Display images
  • Simultaneously modify texts on all R/3 screens
  • Add your own pushbutton functions
  • Set default values
  • Offer radiobuttons instead of coded input
  • Restrict input to capital letters or numbers
  • Change the length of input fields
  • Display of data dependent images (e.g. product images)
  • Start PC applications by clicking on an image in list displays

 


2. GuiXt Installation

GuiXt must be activated when the SapGui is started. To activate it automatically whenever the SapGui is started press button Customizing of local layout (Alt + F12) from the sap main screen and tick Activate GuiXt.

The documentation for GuiXt can be downloaded from Synactive at http://www.synactive.com

3. GuiXt Script Commands

Please refer to the documentation from Synactive for examples of how to use the commands.

Some important SAP GuiXt Script Commands are:

del Deletes a screen element
pos Shifts a screen element to new position
box Draws a box with or without title
boxsize Changes the size of a box
buttonsize Changes the size of a pushbutton

columnheader Changes a column header
columnorder Changes the column order
columnsize Changes the column width
columnwidth Changes the column width (visualization only)
comment Includes a comment text
compress Eliminates empty lines
default Assigns a default value for an input field
fieldsize Reduces the size of an input or output field
globaltextreplace Replaces a text string in all R/3 screens
icon Replaces R/3 icon by another specified one
if/else/endif Conditional scripting
image Displays an image (.bmp, .gif or .jpg-format)
include Includes a script file

listimage Displays an image in a list (.bmp, .gif or .jpg-format)
mark Marks an entry field
message Shows a message
nodropdownlist Changes a drop down box into a normal entry field
noInput Cancels a field's possibility for input
noleadingzeros Suppresses leading zeros
numerical Numerical input only
offset Relative positioning
pushbutton Inserts a new pushbutton
radiobutton Inserts a radiobutton
stop Stops interpretation of a script
tablewidth Changes the width of a table display
text Changes field texts and adds new texts

textreplace Replaces a text string
tip Adds a quickinfo (tooltip)
title Changes the R/3 screen title
titleprefix Changes the R/3 screen title
uppercase Uppercase input only
versionnumber Sets a version number (script server)
view Displays html and rtf files; connects URLs with R/3 input (only available with GuiXT Viewer)
windowsize Resizes a popup screen

4. System variables

GuiXt also contains system varibles suchs as User name, transaction code, text of last warning etc.. Please refere to the documentation for a complete list of system variables.

5. The GuiXt screen

When GuiXt is started the GuiXt screen is activated (If you have not choosen to hide it in the GuiXt options). The GuiXt screen

is a very helpfull tool when you are developing the GuiXt script.

E.g you can use the GuiXt screen to:


View your script and error messages generated by the script ( Menu View -> Script)
View the screen elements and their position ( Menu View -> Screen Eelements )
View trace with error messages. remember to activate trace in thwe GuiXt options ( Menu View -> Trace )

Tip: when you are in transaktion SHD0, press F8 or the Test button to view the result of your script

6. About pushbuttons

The example below (part 7) shows how to add and delete pushbuttons.

You find the internal "FCODE" by choosing the desired function in the transaction menu and press F1 while the mouse cursor points to this function. Now the R/3 system displays the internal function code in a pop-up window. The FCODE parameter can also be a transaction code
e.g. VD03.

Add a pushbutton to the toolbar

Syntax: Pushbutton (Toolbar) "Pushbutton text" "FCode"

Example: Pushbutton (Toolbar) "Change salesorder" "AEN"


This button will send you to the Change salesorder screen.

Add a pushbutton to the screen

Syntax: Pushbutton (row,column) "Pushbutton text" "FCode"

Example: pushbutton (15,20) "Goto Customer initial screen" "/nVD03"

Delete a pushbutton

Syntax: del [Pushbutton text]

Example: del "Create with reference"


7. Example

This example demonstrates how to modify transaction VA01 Creates salesorder: Initial screen

Modifications:


Change the title to Modified Create Salesorder screen
In the top of the screen show the User name and Transaction code as a comment
How to add a box
Move the Order type (Se Tip) field and the Organizational data fields down and to the right
Set default order type to OR
Hide the Division., Sales office and salesgroup fields
Add a Create salesorder to the toolbar
Add a "Goto Customer initial screen" button on the screen which calls transaction VD03.
Remove the buttons Create with reference, Sales, Item overview and Ordering party from the toolbar.

Tip: If you will move the Order type text behind the Order type field, you must use the option -Triple
Example: pos F[Order type] (5,11) -Triple

Step 1 - Create a screen variant

The first step is to create a screen variant for VA01. See also Transaction variants / Screen variants


Go to transaction SHD0 and enter VA01 in the Transaction field. Press the Create button.

Now transaction VA01 is shown. Selct OR as order type and press Enter. Do not enter anything in the other fields, because we want to make all modifications in the GuiXt script.

The Confirm entries screen is shown. Enter ZVA01in the Name of screen variant field and press Exit and save.

Now the Field values screen is shown. Press the GuiXt Script button to enter the script.

Step 2 - Enter the script

Enter the follwing script:

title "Modified Create Salesorder screen"

box (1,1) (3,50)

comment (2,2) "User:"
comment (2,11) &[_user]
comment (2,26) "Transaction:"
comment (2,41) &[_transaction]

pos F[Order type] (5,11) -Triple
pos G[Organizational data] (7,10)

Image (1,100) "D:DATADOKUMENTERMY PICTURESIMAGE-000.JPG"

Default [Order type] "OR"

del [Division]
del [Sales office]
del [Sales group]


pushbutton (Toolbar) "Change order" "AEND"
del [Create with reference]
del [Sales]
del [Item overview]

del [Ordering party]

pushbutton (15,20) "Goto Customer initial screen" "/nVD03"

Step 3 - Create a variant transaction code to display the modified screen

Goto transaction SHD0

Select menu Goto->Create variant transaction

Transaction code is the name of the new transaction you want to create e.g. ZVA01A

Transaction is the original transaction VA01

Transaction variant is the name of the screen variant you has created ZVA01

Note: You can also create the variant transaction from SE93 Maintain Transaction


Comments

  • 11 Aug 2010 8:25 am Guest
    hi this is harika.Few of our friends are working on a project in which we require the concept of this GUIXT.thanks alot for explaining with an example along with the detailed steps.thanks alot.Not only we all of us need this kind of support.thanks alot

×