For some
of your input fields it can make sense to display an additional text.
This is possible by means of GuiXT; you call up a function module that
reads the appropriate SAP table. You can use a general function module /guixt/select
for reading all tables;
see Function module /guixt/select
for a description of the function module. Alternatively, SAP-BAPIs or
self programmed function modules can be used. Let us assume that you have an input field "Customer" where the user enters a customer number: InputField (10,1) "Customer" (10,20) size=10 name="kunnr" techName="KNA1-KUNNR"
We want to display the customer name and city at the right hand side of the input field:
For the implementation we
essentially need the following two statements: Text (10,33) "&V[name], &V[city]" Some details still need to be added:
With these enhancements our script looks as follows:
Set
V[kunnr.description] ""
if
V[found] InputField (10,1)
"Customer" (10,20)
size=10
name="kunnr"
techName="KNA1-KUNNR" If you start an InputScript for some user actions, for example On "/11" process="save.txt" then the customer number should be checked at the beginning of the InputScript: InputScript "save.txt": // Customer number entered? if not V[kunnr] SetCursor V[kunnr] Return "E: Please enter the customer number" -statusline endif
// Valid
customer number? if not V[found]SetCursor V[kunnr] Return "E: Customer '&V[kunnr]' does not exist" -statusline endif // Start "Save"
|