GET PARAMETER

Basic form 3

GET PARAMETER ID pid FIELD f.

In some cases, the syntax rules that apply to Unicode programs are different than those for non-Unicode programs. See ABAP Unicode - Other Changes

Effect

First, the value stored under the key pid is transferred from the local SAP memory into the field f. If this key is not available in the local SAP memory, the value stored under the same key pid is transferred from the global user-related SAP memory to the field f.
A parameter ID can have up to 20 characters. You can find an overview of the keys (parameters) used in the SAP system description or the appropriate function in the ABAP Workbench.

The Return Code is set as follows:

SY-SUBRC = 0: A value was read from SAP memory. SY-SUBRC = 4: No value was found in SAP memory under the specified key.

Notes

Example

Read the program name from SAP memory:

DATA : REPID LIKE SY-REPID.
GET PARAMETER ID 'RID' FIELD REPID.

Related

SET PARAMETER

Fill Initial Screens with SPA/GPA Parameters