1. SELECTION-SCREEN
INCLUDE PARAMETERS p.
2.
SELECTION-SCREEN INCLUDE SELECT-OPTIONS sel.
3.
SELECTION-SCREEN INCLUDE COMMENT fmt name.
4. SELECTION-SCREEN INCLUDE PUSHBUTTON fmt name.
5. SELECTION-SCREEN INCLUDE BLOCKS block.
Objects declared using SELECT-OPTIONS,
PARAMETERS
and SELECTION-SCREEN
on another selection screen
are copied into the current selection
screen
.
Both the source and target screen can be either the
standard selection screen 1000 or
one defined using SELECTION-SCREEN
BEGIN/END OF SCREEN. All that is important is that source and target are different screens.
The effect of this statement is as if the "original coding" of the copied portion appeared on the target screen.
SELECTION-SCREEN INCLUDE PARAMETERS p.
1a. ...
OBLIGATORY
1b. ...
OBLIGATORY OFF
2. ... MODIF ID modid.
3. Within the selection include: ID id.
The parameter par is copied onto the current screen.
Since the data object defined in the PARAMETERS
statement only exists once (it is not copied), you cannot change its technical attributes (type, length,
reference field).
The parameter par can also only
contain one value at runtime, that is, the content entered on the selection screen. This means that
this value appears on every other screen containing the parameter par.
... OBLIGATORY
... OBLIGATORY OFF
You can use the
OBLIGATORY addition to the PARAMETERS
statement to make the parameter a required field on the screen on which it is defined. You can set this
attribute (or remove it, using OBLIGATORY OFF) for each
copy of the parameter. If you do not use either of the additions, the attribute is derived from the 'original' parameter definition.
If you specify a MODIF-ID,
you can assign the comment to a modification group. This is also supported even if you did not specify
a modification group (or specified a different group) when you defined par
using the PARAMETERS
statement. If you do not use the addition, any modification group specified in the 'original' definition is used.
All further attributes of par that are set using additions
to the PARAMETERS statement, are copied from the 'original'. In other words, you cannot set them separately for a copy.
SELECTION-SCREEN INCLUDE SELECT-OPTIONS sel.
1a. ...
OBLIGATORY
1b. ...
OBLIGATORY OFF
2a. ...
NO INTERVALS
2b. ...
NO INTERVALS OFF
3a.
... NO-EXTENSION
3b.
... NO-EXTENSION OFF
4.
... MODIF ID modid
5. Within the selection include: ID id.
The select-option sel is copied onto the current screen.
Since the data object defined in the SELECT-OPTIONS
statement only exists once (it is not copied), you cannot change its technical attributes (type, length,
reference field).
The select-option sel
can also only have one content at runtime, namely the contents entered on the selection screen. These
contents appear on every screen that uses the select-option sel.
... OBLIGATORY
... OBLIGATORY OFF
As in INCLUDE PARAMETERS.
... NO INTERVALS
... NO INTERVALS OFF
... NO-EXTENSION
... NO-EXTENSION OFF
As with OBLIGATORY and OBLIGATORY
OFF, you can enable and disable the attribtes set using NO
INTERVALS
and
NO-EXTENSION in the SELECT-OPTIONS
statement separately for each copy. If you do not use these additions, the corresponding attribute is determined by the 'original' setting.
All further attributes of sel, set using additions to
the SELECT-OPTIONS statement, are copied from the 'original' settings. You cannot set them separately for individual copies.
SELECTION-SCREEN INCLUDE COMMENT fmt name.
1. ...
FOR FIELD f
2. ... MODIF ID modid.
3. Within the selection include: ID id.
The comment
name is copied to the position given in the format specification fmt.
This is only useful, and only supported, for comments whose contents are set
at runtime, that is, where name is not a text element with the form TEXT-xxx.
... FOR FIELD f
The comment is assigned to the parameter or select-option
f (see also the FOR
FIELD option in SELECTION-SCREEN
COMMENT). If you do not use the addition, the assignment from the 'original' is used, if one exists.
As in INCLUDE PARAMETERS.
SELECTION-SCREEN INCLUDE PUSHBUTTON fmt name.
1. ...
USER-COMMAND ucom
2.
... MODIF ID modid
3. Within the selection include: ID id.
The pushbutton
name is copied onto the screen at the position given in
the format specification fmt.
As with ... INCLUDE COMMENT, this only makes sense, and
is only supported, for pushbuttons whose text is set
at runtime, that is, where it is not a text element with the form TEXT-xxx.
... USER-COMMAND ucom
Clicking the pushbutton triggers the function code ucom.
You can change this from the original definition (see
SELECTION-SCREEN PUSHBUTTON). If you do not use the addition, the function code from the 'original' definition is used.
As in INCLUDE PARAMETERS.
SELECTION-SCREEN INCLUDE BLOCKS block.
The entire block
block is copied to the current screen, along with all objects contained in it.
Within the selection include: ID id.
TABLES SPFLI.
SELECT-OPTIONS SEL0 FOR SY-TABIX.
PARAMETERS PAR0(5).
SELECTION-SCREEN BEGIN OF SCREEN 123 AS WINDOW TITLE TEXT-456.
SELECTION-SCREEN
BEGIN OF BLOCK BL1 WITH FRAME TITLE TEXT-BL1
NO
INTERVALS.
SELECT-OPTIONS SEL1 FOR SY-SUBRC.
PARAMETERS
PAR1 LIKE SPFLI-CARRID.
SELECTION-SCREEN INCLUDE PARAMETERS PAR0.
SELECTION-SCREEN
COMMENT /10(20) TEXT-COM.
SELECTION-SCREEN COMMENT /10(20) COMM01.
SELECTION-SCREEN
END OF BLOCK BL1.
SELECTION-SCREEN END OF SCREEN 123.
SELECTION-SCREEN ULINE.
SELECTION-SCREEN
INCLUDE: SELECT-OPTIONS SEL1,
COMMENT
/5(15) COMM01.
SELECTION-SCREEN PUSHBUTTON 15(25) PUBU
USER-COMMAND US01.
SELECTION-SCREEN BEGIN OF SCREEN 99.
SELECTION-SCREEN INCLUDE
PUSHBUTTON 20(20) PUBU
USER-COMMAND US02.
SELECT-OPTIONS SEL2 FOR SPFLI_WA-CONNID.
SELECTION-SCREEN
INCLUDE BLOCKS BL1.
PARAMETERS PAR2 TYPE I.
SELECTION-SCREEN END OF SCREEN 99.
This example is only syntactically correct if the program has type 1, since this is the only case in
which SELECT-OPTIONS,
PARAMETERS
and SELECTION-SCREEN
statements may occur outside a SELECTION-SCREEN BEGIN/END OF SCREEN block.
In the example, the report would have three selection screens:
Defining Selection Screens