The SAP Memory is a user-specific memory area of the current application server, which is accessed by all main sessions of a user session at once. ABAP programs have access to SPA/GPA parameters stored in the SAP Memory (also called SET/GET parameters).
Each SPA/GPA parameter is identified by an ID of up to 20 characters. SPA/GPA parameters can either be created explicitly using the statement SET PARAMETER, or implicitly in a PAI event. They are then available to any programs and any sessions throughout the whole duration of a user session. SPA/GPA parameters are evaluated by the ABAP runtime environment. In ABAP programs, the parameters can be read using the statement GET PARAMETER.
One example of a program that uses SPA/GPA parameters is user maintenance (transaction SU01). In this transaction, on the Parameters tab page, you can enter user-specific parameters, which are then set when the user logs on to the ABAP-based SAP system, and are evaluated by other programs.
The names of SPA/GPA parameters are administrated in the database table TPARA. In the Object Navigator of the ABAP Workbench, the names of SPA/GPA parameters are created in the database table TPARA in upper case, and are linked to packages. The database table TPARA acts as a reservation table for SPA/GPA parameters. If you use SPA/GPA parameters in a program, you should ensure that the name of the parameter is contained in the PARAMID column of the database table TPARA. The SPA/GPA parameters of other applications should not be unintentionally overwritten.
If a name exists in the database table TPARA, this does not automatically mean that the corresponding parameter also exists in the SAP Memory. SPA/GPA parameters are exclusively created during execution of an ABAP program.
When defining input fields, you can link screen fields to SPA/GPA parameters by entering the name of an SPA/GPA parameter from the database table TPARA as an attribute PARAMETER ID. If the corresponding parameter GET PARAMETER is set and no other value is assigned to the input field, the input field is filled with the value of the SPA/GPA parameter when the screen is sent. If the corresponding attribute SET PARAMETER is set, the content of the input field is assigned to the SPA/GPA parameter at the PAI event. If the parameter does not yet exist in the SAP Memory, it is implicitly created at the PAI event. In selection screens, you can create this link by using the MEMORY ID addition to the statements PARAMETERS and SELECT-OPTIONS.