ABAP Keyword Documentation → ABAP - Reference → Program Parameters → Parameters in the User Memory
Other versions: 7.31 | 7.40 | 7.54
SET PARAMETER ID pid FIELD dobj.
This statement sets the content of the SPA/GPA parameter specified in
user memory to the content of the data object
dobj. The ID
pid must be a
flat character-like field that
contains no more than 20 characters and does not consist solely of blanks.
dobj expects a flat character-like field whose binary content is passed in an unconverted format.
GET PARAMETER does not access the user memory directly. Instead, it accesses a local mapping of the SPA/GPA parameter in the
roll area, which is loaded when rolled in and saved in the user memory when rolled out (see
SPA/GPA Parameters and ABAP Programs). If the SPA/GPA parameter specified for the current user in
pid does not yet exist in the
user 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. If it can be determined statically that an ID
pid is not in the database table TPARA, the extended program check reports an error.
An SPA/GPA parameter specified in
pidcan match a name in the database table TPARA only if it is entered in uppercase letters.
GET PARAMETERdo not work directly with the SPA/GPA parameters of the user memory, which means that they are only suitable for passing data within a single ABAP session and not for passing data between two main sessions in parallel This is because programs that run in parallel can change the state of the parameters unpredictably.
If the user selects a flight displayed in the basic list, when the event
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
dynpro of the transaction DEMO_TRANSACTION, two input fields are associated with these SPA/GPA parameters and are displayed with the selected values as
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'.
Cause:: Key only contains blank characters
Cause: Key is longer than 20 characters
Cause: Value is longer than 255 characters
Cause: Memory limit of the user memory was reached