InputScripts

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
F[Amount]  "&V[Amount]"
  Set
F[Pstky]   "50"
  Set
F[Account] "&V[Account2]"
  Enter

Screen SAPMF05A.0300
  Set
F[Amount]  "&V[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. 

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 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 V[Title] “Maintenance plan”
 
Set V[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.

InputScripts