Get Example source ABAP code based on a different SAP table
ID GET-PARAMETER • GET PARAMETER ABAP Statement • ID GET PARAMETER • FIELD GET PARAMETER
GET PARAMETER> Short Reference >
ABAP_SYNTAX 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> in the user memory >. The ID pid> expects a flat> character-like field that contains a maximum of 20 characters and not only 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)>> or FINAL(var)>>, where a variable of type XUVALUE>> is declared. The statement GET 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 roll-in and saved in the user 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 user 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 is possible to statically determine that an ID specified pid> is not in the database table TPARA>>, the extended program check reports an error. System Fields> sy-subrc>Meaning> 0The SPA/GPA parameter specified in pid> exists for the current user in the user memory and its value was passed to the target field. 4The SPA/GPA parameter specified in pid> does not exist for the current user in the user memory.
Latest notes:
An SPA/GPA parameter that can be read using GET PARAMETER> can either have been created previously using the statement SET PARAMETER>> or created automatically in the PAI> event of a dynpro> or selection screen> in the user memory.