You are on page 1of 8

Create Input Screen

InputScripts allow us to automatically carry out user actions in the

SAP-System. Just about every user transaction (reading field values, data entry, pushbutton operations, etc) can be carried out automatically using an InputScript. Instead of carrying out each operation separately the user simply starts an InputScript. This can cover as many screens as the user wants, and even several transactions.

As our first example we want to offer the user a pushbutton that displays a given list. The
normal steps used to display the list (e.g. calling up transaction SA38, entering a given report-name, pressing F8, entering a given selection, pressing F8) are defined by means of an InputScript which is then started (whenever we want) by means of a pushbutton all its own.

This is how we proceed:


Record the user's actions using the function "InputRecording" in GuiXT Save the InputScript you have created under a name of your choosing Define a new pushbutton by means of which the user can start the InputScript

If desired, you can also: Replace fixed, existing values (e.g. a product number or a text, etc.) by variables that the user enters into the initial screen Deal directly with certain error situations directly in your InputScript. In the case of errors, GuiXT normally calls up the same transaction again, enters the initial values and displays the original error message. The user can then correct his own input data and start the procedure again. Define search-helps for the newly introduced fields, e.g. with reference to SAP Matchcode, or by means of local value help

These three extras are explained in later tutorials. Here we set out the simplest case.

Layout of the procedure

Switch on the Recording-Function in GuiXT

Step 1: Transaction code SA38

Step 2: Program names

Step 3: Selection conditions Perform all steps manually

List display

Display recorded script

Save the recorded script under a name of your choice e.g. "matlist1.txt". In the GuiXT script
on the screen in which you wish to offer the user the new button. Now add the instruction Pushbutton (2,1) "Materials Plant London" process="matlist1.txt"

Should you wish to add the pushbutton to the initial screen of the SAP-Systems, you must make room, e.g. by slightly shifting the navigation menu, thus: pos X[IMAGE_CONTAINER] X[IMAGE_CONTAINER]+(0,30)

By simply clicking the new button the user can display the required list

By clicking "end" (F15) you exit from the list and return to the navigation menu. Tip: Explanations on how to work with InputScripts are to be found in our Documentation under InputScripts.

Test InputScript

There are two ways you can test InputScripts:


Switch on a Trace Run the InputScript screen by screen

We will show both possibilities using the example from Tutorial 1.

To switch on Trace, click the "Trace"-Button (or in Menu click Tools->Trace) while in GuiXT.

Now start the InputScript. In the "Trace" window in GuiXT all the statements in the InputScripts are now traced. By switching Trace off and on you can delete the contents of the Trace window for a further test.

Switching on the Trace-Function in GuiXT

Run InputScript

Trace output

Activate the option "Visible" and run the InputScript in order to display all the automatically

processed screens. GuiXT displays all the screens, and by pressing the "enter" button you can continue the processing. The options "Visible" and "Trace" are independent of each other; they can be activated separately or together.

Switch on the Visible-Function in GuiXT

You might also like