Get Example source ABAP code based on a different SAP table
Standard SAP Help for GET_PARAMETER
GET PARAMETER
Short Reference • GET PARAMETER ABAP Statement • ID GET PARAMETER • FIELD GET PARAMETER
ABAP_BASIC_FORM_3 GET PARAMETER ID pid FIELD dobj.
What does it do? This statement sets the content of the data object dobj to the content of the SPA/GPA parameter specified in pid. The identification pid must be a flat character-like field that contains no more than 20 characters and does not consist solely of blanks. The field is case-sensitive. The binary content of the SPA/GPA parameter is passed to dobj without being converted. The following can be specified for dobj: An existing flat character-like variable. An inline declaration DATA(var), where a variable of type XUVALUE is declared.
The statement GET PARAMETER does not access the SAP 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 SAP Memory when rolled out (see SPA/GPA Parameters and ABAP Programs). If the SPA/GPA parameter specified in pid does not yet exist in the SAP Memory for the current user, the data object dobj is initialized and sy-subrc is set to 4.
A program can only read those SPA/GPA parameters for which there is a name 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.
System Fieldssy-subrcMeaning 0The SPA/GPA parameter specified in pid exists for the current user in the SAP Memory and its value was passed o the target field. 4The SPA/GPA parameter specified in pid does not exist for the current user in the SAP Memory.
Latest notes:An SPA/GPA parameter that is readable using GET PARAMETER can either have been created previously in the SAP Memory using the SET PARAMETER statement or created automatically in the event PAI of a dynpro or selection screen. An SPA/GPA parameter specified in pid can match a name in the database table TPARA only if it is entered in uppercase letters. The statements SET PARAMETER and GET PARAMETER do not work directly with the SPA/GPA parameters of the SAP Memory, which means that they are only suitable for passing data within a single main 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.