SET PARAMETER

Short Reference

Syntax

SET PARAMETER ID pid FIELD dobj.

Effect:

This statement sets the content of the SPA/GPA parameter specified in pid to the content of the data object dobj. For pid, a flat character-type field is expected that can contain a maximum of 20 characters, which cannot be exclusively blank characters. pid is case-sensitive. For dobj, a flat, (as of release 6.10 character-type) field is expected, whose binary content is transferred in an unconverted format.

If the SPA/GPA parameter specified for the current user in pid does not yet exist in the SAP memory, it is created. If the SPA/GPA parameter has already been created for the current user, its value is overwritten.

In a program, SPA/GPA parameters can only be created or assigned values if a name exists for them in the table TPARA. The extended program check reports an error if it can statically determine that a name specified in pid is not contained in the database table TPARA. ist.

Note:

For a SPA/GPA parameter specified in pid to match a name in the database table TPARA, it must be entered in upper case.

Example:

If the user selects a flight displayed in the basic list, when the event ATLINE-SELECTION takes place, the SPA/GPA parameters CAR and CON are set to the ID of the airline and the connection number. The names of both parameters are defined in the table TPARA for this purpose. In the initial screen of the transaction DEMO_TRANSACTION, two input fields are linked with SPA/GPA these parameters and are displayed with the selected values as start values.

DATA: carrier     TYPE spfli-carrid,
      connection  TYPE spfli-connid.

START-OF-SELECTION.
  SELECT carrid connid
         FROM spfli
         INTO (carrier, connection).
    WRITE: / carrier HOTSPOT, connection HOTSPOT.
    HIDE:  carrier, connection.
  ENDSELECT.

AT LINE-SELECTION.
  SET PARAMETER ID: 'CAR' FIELD carrier,
                    'CON' FIELD connection.
  CALL TRANSACTION 'DEMO_TRANSACTION'.

Exceptions

Non-Catchable Exceptions