While working with SAP, many times you would have noticed screen fields getting populated with values on its own. Want to know how? It’s all by the virtue of SET/GET parameters (also known as SPA/GPA parameters). In this post, we will make ourselves knowledgible enough to work with these.
What are SET/GET parameters or SPA/GPA Parameters?
SET/GET Parameters or SPA/GPA parameters are the means through which you can make use of SAP memory to pass data between different main ( external ) sessions of a teminal ( user ) session. To elaborate a little on the terms used above, when you logon to SAP system, you basically create a terminal or user session. This terminal session can have multiple main or external sessions within it, which you can relate to multiple screens opened withing one user logon. SAP Application server allocates a memory area dedicated to each user or terminal session which can then be shared between all the main sessions within this user session. This user-specific memory dedicated to a user session is called SAP memory. SET/GET parameters basically enable the exchange of data between these external sessions within the same user session through SAP memory.
How to create SET/ GET parameters?
Before you can make use of SET/GET parameter, you will have to create one, failing which you would get error while performing ‘Extended Check’ of your program. However, you wont get any compile time error or runtime error. SET/GET Parameters are also treated as repository objects and have normal Object directory entry (TADIR) similar to other repository objects. You can create SET/GET parameter using Object navigator (transaction SE80). Just select the package under which you want to create the SET/GET create parameter and follow the following path in the context menu obtained by right-clicking on the package. <Package/Development Class> -> Create -> Other(1) -> SET/GET Parameter ID

Create SET/GET Parameter ID
The definition of SET/GET parameters can be found in the transparent table TPARA.
How to transfer data from one external session to other using Parameter IDs? I mean, How to read / set values for the Parameter IDs in program?
After creating the parameter, the next step is setting the values to the created parameter ids. You can do this using the below mentioned ABAP command.
SET PARAMETER ID parameterid FIELD dobj.
Here, parameterid is the SET/GET Parameter ID whose name should not be of more than 20 characters. dobj is a flat character type data object whose value needs to be set to the parameter id mentioned earlier. You can read the value of any parameter id in the same or different main/external session of the same user/terminal session using a similar ABAP statement.
GET PARAMETER ID parameterid FIELD dobj.
Same as above, parameterid is the name of parameter id whose value needs to be fetched and dobj is the flat character type data object to which the fetched value will be assigned. A small example to illustrate the above statements:
REPORT ZAS04. DATA: lv_cocd TYPE bukrs. SET PARAMETER ID ‘BUK’ FIELD ‘0001′. GET PARAMETER ID ‘BUK’ FIELD lv_cocd. WRITE: ‘Value fetched from Parameter ID – BUK : ‘, lv_cocd.
On executing this small program, you will get the following output:

Example of ABAP Statement 'SET PARAMETER ID' & 'GET PARAMETER ID'
In my next posts ( Associating SET/GET Parameters to Screen elements & Persisting SET/GET Parameter values in User Profile ), we will continue to learn how to use SET/GET parameters to default the screen fields and how to set persist the value of parameter ids, so that user can continue to make use of these preset values in his next user/terminal sessions.

[...] September 9th, 2009 VN:F [1.6.2_892]please wait…Rating: 0.0/10 (0 votes cast)In my previous post, Using SET/GET Parameter ID in SAP, I discussed about how to create SET/GET parameters and then how to use them to transfer data from [...]
[...] [1.6.2_892]please wait…Rating: 0.0/10 (0 votes cast)In my previous posts on SET/GET Parameters, Using SET/GET Parameter ID in SAP & Associating SET/GET Parameters to Screen elements, I kept mentioning that SET/GET parameters [...]
hi,
i want to make id in sap
I can not imagine finding this information right on time, thank you.