This defines an input field with
up to 10
characters. The field label is displayed at
(10,1),
the field itself at position
(10,20).
The internal field name is
Refnr,
i.e. in the InputScript its value is written in the symbolic form
&[Refnr]
Input field without label. Both
(row1,col1)
and
"field text"
are omitted in this case.
-dynamicLabel
In conjunction with
techName=:
The specified text is replaced with the field text stored in the
SAP Repository. Depending on the space that is available the short,
middle or long label text is used.
A valid
RFC user name and password are necessary
for this function (GuiXT profile).
-invisible
Invisible input (password)
-required
The field is displayed like a standard required (i.e. compulsory)
input field. In the InputScript you can check that the user has
entered a value. The checking is not done automatically.
-intensified
The field value is displayed with a different colour (standard:
red)
-alignRight
The field value is aligned right
-leadingSpace
Leading space characters are kept
-readOnly
No input possibility
default=
Specification of a default value
maxLength=
Maximum input length. With this, a greater length than in
size=
can be specified; the field will then automatically become a scrollbar.
techName=
searchHelp=
Specification of a field name that refers to a field in the SAP
repository, e.g.
techName="BSEG-GSBER".
When the user presses F4 or clicks on the matchcode icon, GuiXT
processes the standard SAP matchcode for this field. With F1 the
user can display the standard field help.
Alternatively, the name of a search-help from SAP can be given directly
by means of
searchHelp="...".
This function requires the installation of the ABAP program ZGUIXTF4.
-noSearchHelp
shName=
If you specify
techName=
for the F1 field help, but do not want to assign an F4 search help,
you can use the option
-noSearchHelp.
If more than one field
is exported by the matchcode module, GuiXT takes the first one.
You can also specify the name of the desired field with the
shName=
option.
searchHelpModal=
If you specify
searchHelpModal="X",
the search help is displayed as a modal popup window, independent
of the user's F4 settings.
shSelName1=
shSelValue1=
shSelName2=
shSelValue2= ... ...
shSelName12=
shSelValue12=
You can specify up to 12 selection criteria for the matchcode display.
The names that you specify with
shName1,
shName2,
shName3,...
must be exactly the same as in the definition of the search help
(transaction SE11). The values
shSelValue1,
shSelValue2,
shSelValue3,...
can either
be constants or other entry fields [...] . Examples:
The content of variable
V[varName]
is set as selection
for the year.
shName1=
shDest1=
shName2=
shDest2= ... ...
shName12=
shDest12=
You can specify up to 12 additional fields; they are filled
when the user selects a matchcode entry. The names that you specify
with
shName1,
shName2,
shName3,...
must be exactly the same
as in the definition of the search help (transaction SE11). The
target fields
shDest1,
shDest2,
shDest3,...
can either be entry fields
[fieldname]
or variables
V[varname].
Examples:
When the user selects
a cost center, the cost center key is put into the InputField. In
addition, the activity type contained in the selected matchcode
line is put into the entry field
Activity type.
The variable
V[CC_text]
is filled with the cost center text, to be used in further
processing.
searchHelpProcess=
You can specify an InputScript that is processed after the user
has selected a value in the search help display.
Some typical applications:
Display a text
in addition to the selected value
Specify
searchHelpProcess="return.txt",
where the InputScript
return.txt
consists of the statement "Return"
only. This forces the screen to be displayed again,
and the variables set by the matchcode (like
V[CC_text]
in the
section above) are shown to the user.
Display further
data that depends on the selected value
The specified InputScript reads additional data (e.g. with a
Call statement) and then uses "Return"
to display the screen again. The newly read data can be displayed
in the GuiXT script.
Programmed
matchcode help
You can
also program a special matchcode function in ABAP and assign it to the InputField.
Notation: searchHelp="exit.progname.formname" Here
progname
is the ABAP program name and
formname
is the subroutine name The form routine has a standardized interface
(see below). It returns the selected value. The special options
shSelName1=,
shSelValue1=,
...,shName1=,
shDest1=
can be handled as well.
Program ZGUIXTMC1.
* Value table
data: begin of t1 occurs 100,
bukrs like t001-bukrs,
butxt like t001-butxt,
land1 like t001-land1,
ort01 like t001-ort01,
end of t1.
* Returned value
data: begin of r1 occurs 1.
include structure DDSHRETVAL.
data: end of r1.
Form mcbuk
tables
sel "table with shSelName1=, shSelvalue1=,
dest "table with shName1=, shdest1
using invalue
changing selvalue.
* Select data
Select bukrs butxt land1 ort01 from t001
into corresponding fields of table t1.
* SAP standard function to display table as matchcode selection
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'BUKRS'
WINDOW_TITLE = 'Please select a company code'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = T1
RETURN_TAB = R1
EXCEPTIONS
OTHERS = 1.
* Return selected value
if sy-subrc = 0.
selvalue = r1-fieldval.
endif.
endform.