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 and program name

Step 2: Selection conditions



Step 3: L
ist display

Perform all steps manually

Display recorded script

// SAP Easy Access
Screen SAPLSMTR_NAVIGATION.0100
  Enter "/nsa38"
 
// ABAP Editor: Initial Screen
Screen SAPLWBABAP.0100
  Set F[Program]                      "RMMVRZ00"
  Enter "/8"
 
// Materials List
Screen RMMVRZ00.1000
  Set F[Material]                      "M-*"
  Set F[Plant]                      "1000"
  Enter "/8"

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.