Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Get Parameter & Set Parameter

Former Member
0 Likes
1,094

Hi,

Can any one send me the sample code for get_Parameter & Set_Parameter .

Syntax For defining the Set & Get Parameter .

Vighnesh .

1 ACCEPTED SOLUTION
Read only

former_member404244
Active Contributor
0 Likes
1,018

Hi,

Have a look at the below thread,..

Regards,

nagaraj

3 REPLIES 3
Read only

former_member404244
Active Contributor
0 Likes
1,019

Hi,

Have a look at the below thread,..

Regards,

nagaraj

Read only

0 Likes
1,018

Theory.

To fill the input fields of a called transaction with data from the calling program, you can use the SPA/GPA technique. SPA/GPA parameters are values that the system stores in the global, user-specific SAP memory. SAP memory allows you to pass values between programs. A user can access the values stored in the SAP memory during one terminal session for all parallel sessions. Each SPA/GPA parameter is identified by a 20-character code. You can maintain them in the Repository Browser in the ABAP Workbench. The values in SPA/GPA parameters are user-specific.

ABAP programs can access the parameters using the SET PARAMETER and GET PARAMETER statements.

To fill one, use:

SET PARAMETER ID <pid> FIELD <f>.

This statement saves the contents of field <f> under the ID <pid> in the SAP memory. The code <pid> can be up to 20 characters long. If there was already a value stored under <pid>, this statement overwrites it. If the ID <pid> does not exist, double-click <pid> in the ABAP Editor to create a new parameter object.

To read an SPA/GPA parameter, use:

GET PARAMETER ID <pid> FIELD <f>.

Example

DATA REPID like sy-repid VALUE 'RSPFPAR'.

SET PARAMETER ID 'RID' FIELD REPID.

In another program

Data f like sy-repid.

GET PARAMETER ID rid FIELD f.

Message was edited by:

Madan Gopal Sharma

Read only

Former Member
0 Likes
1,018

Hi

First do a search in forum,

set parameter 'pid' field field_name.

GET PARAMETER ID 'AAI' FIELD ORDER_TYPE.

reward points to all helpful answers

kiran.M