1. ... DEFAULT f
2. ... TYPE typ
3. ... DECIMALS dec
4. ... LIKE g
5. ... MEMORY ID pid
6. ... MATCHCODE OBJECT mobj
7. ... MODIF ID key
8. ... NO-DISPLAY
9. ... LOWER CASE
10. ... OBLIGATORY
11. ... AS CHECKBOX
12 ... RADIOBUTTON GROUP radi
13. ... FOR TABLE dbtab
14. ... AS SEARCH PATTERN
15. ... VALUE-REQUEST
16. ... HELP-REQUEST
17. ... VISIBLE LENGTH
This statement only makes sense in report programs, i.e. in programs defined as type '1' in the attributes. You can execute report programs with the SUBMIT statement. When this takes place, the parameters and selection options ( SELECT-OPTIONS) specified in the report program shape the interface which determines what the user sees on the selection screen. These parameters and selection options are then presented to the user who can enter values (see the addition NO-DISPLAY or SUBMIT without the addition VIA SELECTION-SCREEN).
Creates internal fields like the DATA statement.
By making the appropriate entry in the attributes, you can assign a report to a logical database ldb. In this case, both the logical database ldb and the report can define parameters (and selection options). You define the database-specific parameters (i.e. those belonging to the logical database) in an ABAP/4 include program DBldbSEL (in the logical database maintenance transaction). Since the system then integrates this include program in the logical database access program SAPDBldb and (partially) in the report, the database-specific parameters (and selection options) are available to both.
The ("report-specific") parameters defined in the report are known only in the report (not in the SAPDBldb).
Some additions of PARAMETERS are allowed only in the DBldbSEL.
You must specify the default value f in internal format, e.g. PARAMETERS DATE LIKE SY-DATUM DEFAULT '19931224', not ... DEFAULT '24.12.1993'.
PARAMETERS: NUMBER(4) TYPE P DEFAULT '999'.
Assigns dec decimal places to the internal field. dec must be numeric.
You can only use the addition DECIMALS dec with the addition
TYPE P, i.e. it is only allowed with parameters of type P.
PARAMETERS: NUMBER (4) TYPE P DECIMALS 2 DEFAULT '123.45'.
Creates the field p with the same attributes as the field g
which is already defined. g can be either a database field or an
existing internal field.
You cannot use the addition ... LIKE g with the addition ...
TYPE typ. No explicit length may be specified for the parameter
(for example, a statement such as PARAMETERS p(len) LIKE g is not
PARAMETERS PROGRAM LIKE SY-REPID.
If g is an ABAP/4 Dictionary field of the type CHAR,
length 1 and default values 'X' and ' ' (according to the
relevant domain), the parameter is always displayed as a checkbox
on the selection screen (see also AS CHECKBOX).
On the selection screen, assigns the memory ID pid to the parameter, i.e. when you execute the report, the selection screen displays the last value which the user entered in a field with the memory ID pid.
The memory ID must be a constant, i.e. a value specified without quotation marks, and can be up to 20 characters long.
On the selection screen, assigns the matchcode object mobj to the parameter.
The name of the matchcode object must be a constant, i.e. a value specified without quotation marks, and can be up to 4 characters long.
The screen fields contain the specified modification group (SCREEN-GROUP1 ) which you can use for screen modifications (e.g. set to "not ready for input") under AT SELECTION-SCREEN OUTPUT.
Does not display the parameter on the selection screen. As with
"normal" parameters, the associated data object is created and the
parameter can be passed when SUBMIT
These parameters are the part of the report interface not presented to the user on the selection screen. You can set the parameter values either internally (with the routine INIT in the SAPDBldb or at INITIALIZATIONin the report) or pass them when SUBMIT is executed. These parameters are also stored along with the variants.
If, under certain circumstances (e.g. because of the values of other parameters or due to the selection options), you want to present the parameter to the user for input, you can do this in the PAI module of the database program SAPDBldb (for database-specific parameters) or under AT SELECTION-SCREEN (for report-specific parameters) by calling a function module ( CALL FUNCTION) or your own screen ( CALL SCREEN).
Since the parameter is not generated on the selection screen, the NO-DISPLAY parameters do not allow you to use any of the additions concerning the display and handling of parameters on the selection screen.
The parameter is not case-sensitive (i.e. allows both upper and lower case).
Displays the parameter as a checkbox on the selection
Since you are not allowed to specify type or length when defining this parameter, it always has the type C and the length 1.
The checkbox is displayed on the left and the associated text on its right. To define any order other than this, use the SELECTION-SCREEN statement.
If LIKE refers to an ABAP/4 Dictionary field, you cannot use the addition AS CHECKBOX. If the ABAP/4 Dictionary field has the type CHAR, a length of 1 and the fixed values 'X' and ' ' (according to the relevant domain), the parameter is always displayed as a checkbox on the selection screen.
Displays the parameter on the selection screen as a radio button
(selection field). All parameters assigned in this way to the same
group radi (which can be up to 4 characters long) form a group of
radio buttons on the selection screen, i.e. if the user presses one
of these buttons, the others are set to "not pressed".
When you define one of these parameters, you are not allowed to make type or length specifications. However, you can use LIKE to point to a field of length 1 and type C.
The addition has no effect on the ordering of the parameter (as is the case with the addition AS CHECKBOX). You can make changes to the order with the SELECTION-SCREEN statement.
A RADIOBUTTON group must contain at least two parameters. One of
these can have a DEFAULT addition and the DEFAULT value must be
In the database INCLUDE DBldbSEL, a RADIOBUTTON parameter must include the addition FOR TABLE dbtab just like any other parameter. All parameters in a group must belong to the same table dbtab.
A group name radi used in the DBldbSEL cannot be used in the report.
In contrast to "normal" parameters, the event AT SELECTION-SCREEN ON p is not executed (it is not even allowed syntactically). Instead, the event AT SELECTION-SCREEN ON RADIOBUTTON GROUP radi exists for the entire group. If an E message or a W message is output, all radio buttons in the group are ready for input.
Assigns the database-specific parameter p to the table
This addition only makes sense in a logical database access program.
With database-specific parameters, you need this addition to ensure that the selection screen for a report contains only database-specific parameters which belong to a table from the currently active report.
Creates the database-specific parameter p as a field string
according to the Dictionary structure MCPARAMS with the fields MCID
matchcode ID) and STRING (
Used for data selection through matchcode entry.
On the selection screen, both sub-fields are displayed in a box with the text "Matchcode selection".
You can get a list of possible entries for the
matchcode ID and the search string by pressing F4. If you choose a matchcode ID and press F4 in the field "Search string", you see a dialog box where you can enter a search criterion for each field of the matchcode ID. The system interprets what you enter generically for each sub-field.
The addition AS MATCHCODE STRUCTURE only makes sense in a logical database access program and must therefore be used together with the addition FOR TABLE. It can also be combined with the addition MODIF ID, but not with any other additions. The matchcode object to which the matchcode ID and the search string refer is determined when you define the logical database.
Matchcode ID: Customers
Search string: Daniel
The effect of this is to select all customers whose names begin
Matchcode selection can improve program performance considerably. This is because specifying a search string often describes the required set of data records more accurately than the key fields of the table. For example, it is easier to select by name ("Daniel") than by customer number ("000043010") and far fewer records are read from the database.
If a logical database (e.g. ldb) contains a parameter p defined
with AS MATCHCODE STRUCTURE, the system always creates an internal
table ldb_MC which includes all the key fields of the selected
records. The structure of ldb_MC is determined by the matchcode
object and generated automatically. In the maintenance transaction
for logical databases, the structure is displayed as a comment in
the database program.
Matchcode object for table T1 with key field
T1-K1. The table ldb_MC then has the following
DATA: BEGIN OF ldb_MC OCCURS 100,
T1_K1 LIKE T1-K1,
END OF ldb_MC.
If the user has entered values in the matchcode parameter
fields, the program reads the selected data from the matchcode
table after START-OF-SELECTION
and makes it available to the logical database program in the
internal table ldb_MC . Then, the database program processes the
records in the subroutine PUT_ldb_MATCHCODE and, with the help of
, triggers the appropriate GET
events in the report. Subsequent processing is exactly
the same as that for data selection direct from the
SELECT * FROM T1
WHERE K1 = ldb_MC-T1_K1
FOR ALL ENTRIES IN ldb_MC.
In matchcode selection, the system flags all fields in the
internal table MC_FIELDS which are filled with values by
the matchcode (the field name is in MC_FIELDS-FIELDNAME
and the flag is in MC_FIELDS-SUPPLIED).
A field F0 is supplied with a value by the matchcode if
the following condition is satisfied:
IF MC_FIELDS-FIELDNAME EQ 'F0'
AND MC_FIELDS-SUPPLIED NE SPACE.
This addition is only allowed for database-specific parameters
in the INCLUDE DBldbSEL. It permits self-programmed value help (for
report-specific parameters, this is achieved by specifying the
event key word AT
SELECTION-SCREEN ON VALUE-REQUEST FOR ... ). The
addition has the following effect:
* INCLUDE DBXYZSEL
PARAMETERS PL_TYPE LIKE SAPLANE-PLANETYPE VALUE-REQUEST.
REPORT SAPDBXYZ DEFINING DATABASE XYZ.
CALL FUNCTION ...
Like VALUE-REQUEST, this addition is only allowed for database-specific parameters in the INCLUDE DBldbSEL. It permits self-programmed value help (for report-specific parameters, this is achieved by specifying the event key word AT SELECTION-SCREEN ON VALUE-REQUEST FOR ... ). When the user presses F1, this starts the FORM routine p_HLP in the database access program SAPDBldb (if it exists). Then - even if the parameter with LIKE points to a Dictionary field - this FORM routine is processed rather than displaying the data element documentation of the Dictionary field. You can, for example, branch from the routine p_HLP to a function module which displays your own documentation.
The routine p_HLP is also executed when the user presses F1 on the text field of p or on a comment belonging to p ( SELECTION-SCREEN COMMENT ... FOR FIELD p).
* INCLUDE DBXYZSEL
PARAMETERS PL_TYPE LIKE SAPLANE-PLANETYPE HELP-REQUEST.
REPORT SAPDBXYZ DEFINING DATABASE XYZ.
CALL FUNCTION ...
Shortens the visible length of a parameter field on the selection screen to vlen.