You are on page 1of 30

Lets start with SAP GuiXT

Applies to:
SAP 4.6 and above. For more information, visit the ABAP homepage.

Summary
This tutorial explains about using SAP GuiXT tool which comes installed with SAP. With SAP GuiXT, we can modify any SAP transaction and change its look and feel without changing the standard SAP coding.
Author: Ribhu Ahuja Company: TCS Tata Consultancy Services Created on: 22 April 2009

Author Bio
Ribhu Ahuja is working as a SAP HR ABAP and Workflow consultant for TCS since August 2006.

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 1

Lets start with SAP GuiXT

Table of Contents
To start with: .......................................................................................................................................................3 Configuring GuiXT Tool ......................................................................................................................................8 Putting custom image on Logon Screen...........................................................................................................13 Changing look and feel of logon screen and defaulting certain values ............................................................15 Modifying SAP Easy Access Screen ................................................................................................................17 Adding a button on logon screen and calling a transaction on click of the same.............................................17 Changing look and feel of transaction SE11 ....................................................................................................21 Graying or disabling of certain input fields........................................................................................................27 Displaying Custom HTML help .........................................................................................................................27 Related Content................................................................................................................................................29 Disclaimer and Liability Notice..........................................................................................................................30

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 2

Lets start with SAP GuiXT

Lets start with SAP GUIXT


GuiXT is a client-server based software technology that provides user interface customization solutions to SAP applications. SAP GUIXT is a tool provided with SAP that enables firms to tailor SAP transaction screens to the narrower requirements of specific jobs within the organization while leaving essential SAP coding (ABAP and Dynpros) untouched. This technology design significantly reduces development and testing. Users of GuiXT Solutions report greatly improved productivity and accuracy, while at the same time reducing training and support costs. It takes existing functionality in SAP t-codes and allows us to redesign the layout and business process to match the customer needs. One important thing to be noted is that it already comes installed with SAP GUI. Since it comes with SAP GUI, GuiXT can help us customize just about any transaction in SAP.

To start with:
First of all, we need to enable scripting on front end and on the server in order to use the GUIXT tool. To enable scripting on the front end, use the transaction RZ11. Logon to R3 and open transaction RZ11 and put the value sapgui/user_scripting in the parameter box and click on the button as shown:

On the next screen, click on the

button:

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 3

Lets start with SAP GuiXT

A pop up box appears. Change the value of the last field New value to TRUE as shown and click on the save button.

We are done with enabling scripting on front end. Now we will proceed for enabling scripting on server. Come back to the SAP easy access screen and click on the corner and choose options. icon on the right hand

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 4

Lets start with SAP GuiXT

Click on the scripting tab and check all the check boxes in user settings and then click on OK button as shown:

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 5

Lets start with SAP GuiXT

Once all this is done, we may activate the GUIXT. The standard GuiXT tool comes as a feature in SAP system installations. There are actually 4 components which come in GuiXT tool GuiXT, Input Assistant, Viewer and Designer, out of which, licenses have to be purchased for viewer and Designer tools in order to use them. This tutorial teaches about the GUIXT tool only. It is to be noted that these scripts run on individual machines. That means on each user machine, we have to activate the GUIXT, in order to run these scripts as shown below: Click on the icon on the main screen

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 6

Lets start with SAP GuiXT

After

this,

click

on

the

Activate

GuiXT

link

so

that

it

is

checked

The moment we activate the GuiXT, it opens the GuiXT tool window.

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 7

Lets start with SAP GuiXT

Configuring GuiXT Tool


When running the GuiXT for the first time, we have to make the profile settings. Click on the profile button on the GuiXT tool:

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 8

Lets start with SAP GuiXT

It opens a popup, where we have to define the locations of various scripts:

The first box is Scripts 1 box Scripts 2, Scripts 3 and Scripts 4 boxes.

. Similarly there are

Here we specify various directories. They can be on our personal PC, on the local network, on http-servers, ftp-servers or in the SAP Web Repository Directory.

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 9

Lets start with SAP GuiXT

These are the directories that are searched for GuiXT scripts. The search sequence is always Scripts4, then Scripts3, then Scripts2, then Scripts1. We can, for example, have company-wide scripts in Scripts1, and some scripts of our own in Scripts2. For this tutorial, let us create a directory named guixt in c drive and place it in Scripts 1 box as shown above.

The History box, is the directory used by the Input Assistant. The history directory should be on the user's personal pc. For this tutorial, let us create a directory named guixt history in c drive and place it in History box as shown above. Rest all other settings of the profile can be made by pressing F1 help button. After making these necessary settings, let us click on OK button on the popup and let us log off from the system. and see the options, the Script Before logging off, let us note one thing when we click on Recording and Playback option is currently grayed or inactive as shown:

Let us log off and again open the r3 logon screen. As we do that, we notice the following:

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 10

Lets start with SAP GuiXT

First, the GuiXT tool opens automatically along with the various screen elements present on the screen which are client, language, Password and User. Secondly, we see a scripting button on the screen, which is an indication that the scripting is now enabled and working. Let us now again click on the button on the right hand top of the screen. Doing so, we notice the following:

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 11

Lets start with SAP GuiXT

We notice that the Script Recording and Playback option is no more grayed out and is active. We can use it to record any sequence of screens.

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 12

Lets start with SAP GuiXT

Putting custom image on Logon Screen


Let us modify the logon screen using the GuiXT scripting tool. Let us put an image on the logon screen and let us change the layout of login and password. First of all let us put an image say ribz.jpg in the root directory c:\guixt:

Now we will call this image in our script. Open the GuiXT tool and click on the Script button:

As we click on the script button, it opens up a notepad file for scripting and gives a popup:

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 13

Lets start with SAP GuiXT

Cannot find C:\guixt\elogon.txt file. Click on the yes button in order to create the script file for the logon screen. It creates the file named elogon.txt. Now, in the notepad file named elogon.txt, write the following command line. Image (4,40) (10,65) "ribz.jpg" It would look like this:

Save the file and close it. Now, on the GuiXT tool, click on the refresh button:

As we do that, our image appears on the screen as shown below:

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 14

Lets start with SAP GuiXT

If the image do not appears, just logoff, close all the screens and reopen the R/3 logon screen. The image would show up then.

Changing look and feel of logon screen and defaulting certain values
Now, let us change the look and feel of the logon screen. In the GuiXT tool, click on the Script button and paste the following code in the elogon.txt file: Image (4,40) (10,65) "ribz.jpg" box (1,0) (4,39) "Please enter user id and password" pos F[User] (2,1) pos F[Password] (3,1) set F[Client] "800" set F[Language] "EN" del F[Client] del F[Language] The screen elements available to us were User, Password, Client and language. We have rearranged the fields User and Password in the above script and defaulted the values of Client and Language and deleted them from the screen after defaulting them. It results in the following logon screen:

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 15

Lets start with SAP GuiXT

Let us now give the username and password and login into the R3 system:

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 16

Lets start with SAP GuiXT

Modifying SAP Easy Access Screen


Let us now modify the SAP Easy Access screen. On the GuiXT tool, click on the Script button again. It gives a warning again after opening the notepad file for SAP Easy access screen. GuiXT writes a notepad file for every screen in SAP so for the Easy access, it is saplsmrt_navigation.e0100.txt. Click on yes button on the warning:

Now, we see that the only screen element available to us is [IMAGE_CONTAINER]. Let us reposition this image container and insert an image on the screen. Write the following script: pos X[IMAGE_CONTAINER] X[IMAGE_CONTAINER]+(0,15) Image (1,1) (5,10) "ribz.jpg" After refreshing, we see the following SAP Easy Access screen:

Adding a button on logon screen and calling a transaction on click of the same
Now, Let us put a button on the screen and call a particular transaction on the click of the same:

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 17

Lets start with SAP GuiXT

For this, write the following script for SAP Easy Access Screen: pos X[IMAGE_CONTAINER] X[IMAGE_CONTAINER]+(0,30) Image (1,1) (5,10) "ribz.jpg" pushbutton (12,1) "abap dictionary" "/NSE11" As we refresh the GuiXT tool, we see the following modification in the SAP Easy Access Menu:

Once we click on this

button, it opens SE11 transaction code.

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 18

Lets start with SAP GuiXT

Let us slightly change the button layout. Let us modify the size of the button and add an icon on the same. We write the following script: pos X[IMAGE_CONTAINER] X[IMAGE_CONTAINER]+(0,30) Image (1,1) (5,10) "ribz.jpg" pushbutton (12,1) "@3B\QOpen SE11@abap dictionary" Hence we see the following screen: "/NSE11" size=(3,14)

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 19

Lets start with SAP GuiXT

The 2-letter code for the icons can be found in transaction ICON.

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 20

Lets start with SAP GuiXT

Changing look and feel of transaction SE11


Let us now proceed to SE11 screen. Suppose we have a requirement that we want to give the user, the options to open tables MARA and PA0001 only. This can be very well achieved by writing a script for SE11 screen. Let us first of all see the screen elements available in the GuiXT tool:

We would want to delete all the fields and just give the user the option of table MARA and PA0001 in the form of radio buttons. This can be achieved by the following script:
// create a box offset (0,1) box (0,0) (5,60) "Table to be displayed" // set radio buttons for database table radiobutton (2,2) "MARA" F[RSRD1-TBMA_VAL] "MARA" radiobutton (3,2) "PA0001" F[RSRD1-TBMA_VAL ] "PA0001" // Default the table name as MARA Default F[RSRD1-TBMA_VAL] "MARA" // Delete unnecessary fields del F[RSRD1-DDTYPE_VAL] del F[RSRD1-TBMA_VAL] del F[RSRD1-TYMA_VAL] del F[RSRD1-SHMA_VAL] del F[RSRD1-VIMA_VAL] del F[RSRD1-DOMA_VAL] del F[RSRD1-ENQU_VAL] del R[Database table] del R[View] del R[Data Type] del R[Domain] del R[Lock object] del R[Search help] del R[Type Group]

Thus when we run this script, we see the following screen modification in SE11:

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 21

Lets start with SAP GuiXT

When user chooses radio button MARA and clicks on the display button, table MARA is shown:

When he chooses PA0001 and clicks display, Table PA0001 is shown:

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 22

Lets start with SAP GuiXT

Let us now come back on SE11 main screen and let us put Images instead of buttons (Display, Change and Create). In our requirement, we will create an image link for Display and delete the other two buttons so the user can only display the tables and he does not have the option of change and create. For this, let us first of all see the OK Code of Display button. Click on the Display button on the screen and while keeping the button clicked, press the F1 key and it shows us the ok code of Display which is SHOW:

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 23

Lets start with SAP GuiXT

Now, let us add the following code to our script:


Box (20,30) (28,50) Image (20.5,30.5) (28,50) del P[Create] del P[Change] del P[Display] "Display Table" "ribz.jpg" "Input=OK:SHOW"

So the complete script becomes like:


// create a box offset (0,1) box (0,0) (5,60) "Table to be displayed" // set radio buttons for database table radiobutton (2,2) "MARA" F[RSRD1-TBMA_VAL] "MARA" radiobutton (3,2) "PA0001" F[RSRD1-TBMA_VAL ] "PA0001" // Default the table name as MARA Default F[RSRD1-TBMA_VAL] "MARA" // Delete unnecessary fields del F[RSRD1-DDTYPE_VAL] del F[RSRD1-TBMA_VAL] del F[RSRD1-TYMA_VAL] del F[RSRD1-SHMA_VAL] del F[RSRD1-VIMA_VAL] del F[RSRD1-DOMA_VAL] del F[RSRD1-ENQU_VAL] del R[Database table] del R[View] del R[Data Type] del R[Domain] del R[Lock object] del R[Search help] del R[Type Group] // Create a box and add an image + display the table when user clicks the image Box (20,30) (28,50) "Display Table" Image (20.5,30.5) (28,50) "ribz.jpg" "Input=OK:SHOW" // Delete the buttons del P[Create] del P[Change] del P[Display]

The output of the script is as below:

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 24

Lets start with SAP GuiXT

When the user clicks the image, it opens the particular table chosen (MARA or PA0001). Now, let us add some informative text on the screen. For this, add the following to our script:
// Inserting Text box (10,20) (18,50) "User service" text (11,22) "SAP GuiXT is very simple"

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 25

Lets start with SAP GuiXT

This results in the following screen output:

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 26

Lets start with SAP GuiXT

Graying or disabling of certain input fields


Let us delete the complete script and refresh the screen so we get back our original SE11 screen. Now, suppose we want to make the input field Lock Object grayed. For this, write the following code in the script: NoInput F[RSRD1-ENQU_VAL] This results in the following output:

There are various other features and options available.

Displaying Custom HTML help


Let us display a custom made html page as a help on Lock object. For this, first of all, place an html file named SAP guixt Tutorial.html in C:/guixt folder. After this, write the following code in the script of SE11 screen: mark F[RSRD1-ENQU_VAL] viewHelp="C:\guixt\SAP Guixt Tutorial.html" After this, our screen is like as below:

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 27

Lets start with SAP GuiXT

When we click on the

link, we see the HTML help page SAP guixt tutorial.html:

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 28

Lets start with SAP GuiXT

Related Content
http://service.sap.com www.sdn.sap.com www.help.sap.com www.synactive.com For more information, visit the ABAP homepage.

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 29

Lets start with SAP GuiXT

Disclaimer and Liability Notice


This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade. SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document, and anyone using these methods does so at his/her own risk. SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample, including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this document.

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 30

You might also like