Purpose Many SAP transactions are multi-screen transactions, i.e. they consist of several screens. A typical transaction begins with a relatively empty first screen with some key data; this is followed by one or several more complex screens that describe the business case being dealt with. 

Commonly one needs to fill in only a few fields on each of these screens. This means that
  • the relevant fields have to be identified in each screen
  • the user has to wait until the next screen is displayed 
  • he has to adjust his personal working style to a fixed sequence of screens and to variable response times

With GuiXT+InputAssistant you can now transform these multi-screen transactions into single-screen transactions. The user stays on one screen where he can enter all relevant data directly.

Internally the original transaction is processed with all its screens. The application logic and all integrity checks are performed in exactly the same way.

How to proceed
  • With GuiXT you create additional input fields on the first screen of the transaction, or on a menu screen. You define a new pushbutton which activates the fast single-screen processing of the transaction.
  • You define how the new fields are mapped to the subsequent screens in a special "InputScript". The InputAssistant processes all screens internally (hidden) and fills in the field values. If any error message is issued on one of the hidden screens, the user gets the message on the first screen, where he can correct the data.
Examples
General Single-screen transactions can be defined either on the first screen of a transaction or on one of the menu screens. It is also possible to call a different transaction (or a series of transactions) via an InputScript. A third possibility is to process only some screens internally and to let the user complete the transaction.
You can also add your own integrity checks and set values depending on the value of input data.
Input fields Normal input fields as well as checkbuttons and radiobuttons are supported:

InputField (row1,col1)   "Text" (row2,col2) Size="..."  Name="..." Default="..." 
Checkbox (row,col) "Text"    Name="..." "Default=..." 
Radiobutton (row,col) "text"     Name="group.name" "Default=..." 

Examples: 

InputField (10,40) "Material text" (10,48) Size="3" Name="Mt"  
Checkbox   (11,40) "Only basic data"  Name="DBonly" Default="X"  
Radiobutton (14,20) "USD" Name="currency.usd" Default"=X"  
Radiobutton (15,20) "SFR" Name="currency.sfr"  
Radiobutton (16,20) "DEM" Name="currency.dem"  
 

  • The internal name of the input field can be different from the field label; use the Name="iname..."  parameter.
  • "X" and " " are the only possible values for checkboxes and radiobuttons . 
  • The name of a radiobutton consists of a group name, e.g. "currency", and a field name, e.g. "usd", separated by '.'. The group name defines which radiobuttons are logically grouped together, i.e. if you click on one button of a group, all other buttons are automatically deactivated.
  • F1 Help is not supported for new input fields. You can define a 1-line quickinfo for each label. Or you can use the Image command in order to display a help symbol; when the user clicks on the help symbol, you can use the "start=" option of the image command in order to display a .doc or .html file.
  • F4 Value help is not supported for new fields. But the InputAssistant shows the history for these fields as well, and you can generate a local value help file that contains the standard SAP value list; see documentation on the InputAssistant.
  • For  SAP releases 3.0 and 3.1 it is necessary to specify the current transaction in the GuiXT Script with a "Transaction" command. Otherwise the error handling does not return to the the first screen of the transaction but the previous menu. It is not necessary to use the "Transaction" command on menu screens or for Rel. 4 and upwards. Example:

Transaction "FB01"

Pushbutton Pushbutton (row,col) "Text" "fcode" Process="..." 

Process="..."  relates to the InputScript file. You can omit the "fcode" prameter if only "Enter" is needed in order to continue with the transaction.
Examples: 

Pushbutton (10,40) "Create material"      Process="CreateMaterialSimple.txt" 
Pushbutton (toolbar) "Create material" "/nmm01" Process="CreateMaterialSimple.txt" 

With using you can set parameters of the InputScript: 

Example:

Pushbutton (toolbar) "Create material" Process="CreateMaterialSimple.txt" 
    
using BasicData   = [BDonly] 
    
using currUSD     = [currency.USD]
     using currSFR     = [currency.SFR] 

InputScript   
An InputScript is a textfile with a name of your choice, e.g.. C:\GuiXT\Scripts\CreateMaterialSimple.txt. It contains the names of the screens that you want to process (
Screen-command), Set-commands to fill in the values, and Enter-commands that define the navigation from one screen to the next one. If no path is specified in the Process= parameter the InputScript is searched in the current GuiXT Script directory.

Example:

Screen SAPMF05A.0300
  Set
[Amount]  &[Amount]
  Set
[Pstky]   &[Pstk2]
  Set
[Account]   &[Account2]
  Enter

Screen SAPMF05A.0300
  Set
[Amount]  &[Amount2]
  Enter
"BU"

While the InputAssistant processes the transactions internally, it looks for the next matching Screen command and then executes the corresponding commands. If no matching Screen command is found, the internal processing is terminated, the screen is displayed and the user can complete the transaction. The same happens if no Enter command is specified for this screen.

Error messages are displayed on the first screen, where the user can correct the input data.

Warnings are ignored.

It is a good idea to work with parameters in InputScripts. The InputScripts can then be used in a more flexible way, and in addition you are able to use the parameter values in if-commands in order to set values or to navigate in different ways.

Syntax:

Parameter  pname
or
Parameter pname  "defaultvalue"

Example:
Parameter Curr  "USD"

The names are not case-sensitive.

The value of a parameter (specified with the using command or as default value) can be used in if-expression:

if U[pname=value]
...
endif

Example:

if U[Language=E] and U[Stdname=X]
 
Set [Title] "Maintenance plan"
 
Set [Text] " "
endif

The expression:

U[pname]

is fulfilled if the parameter has a non-space value.

You can also define your own integrity checks. Use the Return command in order to return to the basic screen with an error message. Example:

if not U[cc]
   Return "Please enter a company code"
endif

if U[CC=0001] and not U[currency=USD]
 
Return "Only currency USD is supported in company code 0001"  "Please correct currency/company code"
endif

Tips
& Tricks
  • It is easy to test your InputScripts if you activate Options->Visible Auto Processing
  • The defining of InputScripts is easy if you use the InputScript Recorder (Options->Record InputScript and Edit->Recorded InputScript)
  • You can also set radiobuttons and checkboxes with the Set command; use "X" and " " as values
  • When you set a radiobutton all other buttons in the same radiobutton group are automatically deactivated