Ansicht
Dokumentation
ABAPSET_PARAMETER - SET PARAMETER
Addresses (Business Address Services) BAL Application Log DocumentationThis documentation is copyright by SAP AG.
SET PARAMETER
SET PARAMETER ID pid FIELD dobj.
Effect
This statement sets the content of the SPA/GPA parameter specified in pid in the user memory to the content of the data object dobj. The ID pid expects a flat character-like field that can contain a maximum of 20 characters and not only blanks. pid is case-sensitive. dobj expects a flat character-like field whose binary content is passed unconverted.
The statement SET PARAMETER does not access the user memory directly. Instead, it accesses a local mapping of the SPA/GPA parameter in the session memory, which is loaded during rollup 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 already existed for the current user, its value is overwritten.
In a program, SPA/GPA parameters can only be created or filled with values that have a name in the table TPARA. If it is possible to statically determine that an ID specified pid is not in the database table TPARA, the extended program check reports an error.
Notes
- An SPA/GPA parameter specified in pid must be entered in uppercase to match a name in the database table TPARA.
- Since the statements SET PARAMETER and GET PARAMETER do not work directly with the SPA/GPA parameters of the user memory, they are only suitable for passing data within an
ABAP session
and not for passing data between parallel ABAP sessions because programs that run in parallel can affect the state of the parameters in an uncontrolled manner.
Example
If the user selects one of the flight connections displayed in the basic list, the SPA/GPA parameters
CAR and CON are set to the ID of the airline and the number of the connection at the event AT LINE-SELECTION. 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 linked to these SPA/GPA parameters and are displayed with the selected values as
start values.
Exceptions
Non-Catchable Exceptions
- Cause: Key only contains blank characters
Runtime Error: SET_PARAMETER_ID_SPACE
- Cause: Key is longer than 20 characters
Runtime Error: SET_PARAMETER_ID_TOO_LONG
- Cause: Value is longer than 255 characters
Runtime Error: SET_PARAMETER_VALUE_TOO_LONG
- Cause: Memory limit of the user memory was reached
Runtime Error: SET_PARAMETER_MEMORY_OVERFLOW
RFUMSV00 - Advance Return for Tax on Sales/Purchases CL_GUI_FRONTEND_SERVICES - Frontend Services
This documentation is copyright by SAP AG.
Length: 4530 Date: 20240328 Time: 234238 sap01-206 ( 95 ms )