SAP Help How to set and get parameter id values









Parameter ID - ABAP code to demonstrate how to set and get a parameter ID

A parameter id allows you to store and retrieve values for a specific user, see below for syntax on how to perform these operations.
The program displays a report containing what the value of the parameter id is before you run the SAP program and what it is after wards. Before will contain blank or what ever you entered last time the program was executed, and the after value will be the value you entered onto the ABAP selection screen this time.

*Code to demonstrate how to set and get a parameter ID 
*&-------------------------------------------------------------*
*& Report PARAMID *
*& *
*&-------------------------------------------------------------*
*& *
*& *
*&-------------------------------------------------------------*
REPORT PARAMID .
data: gd_valuein(10) type c,
gd_valueout(10) type c.
PARAMETERS: p_value(10) type c.
********************
*start-of-selection.
start-of-selection.
get parameter ID 'ZMESS' field gd_valuein.
set parameter ID 'ZMESS' field p_value.
get parameter ID 'ZMESS' field gd_valueout.
******************
*end-of-selection.
end-of-selection.
write:/ 'value at start of program:', gd_valuein,
/ 'value at end of program:', gd_valueout.