This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Let’s 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.
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
Let’s 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
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 icon on the right hand corner and choose options.
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:
It opens a popup, where we have to define the locations of various scripts:
The first box is Scripts 1 box - . Similarly there are Scripts 2, Scripts 3 and Scripts 4 boxes.
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.
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.
Before logging off, let us note one thing – when we click on and see the options, the ‘Script 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:
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:
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:
“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:
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:
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:
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:
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’:
Box (20,30) (28,50) "Display Table" Image (20.5,30.5) (28,50) "ribz.jpg" "Input=OK:SHOW" del P[Create] del P[Change] del P[Display]
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]
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"
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.