‎2007 Aug 21 8:34 AM
Hi,
Can any one send me the sample code for get_Parameter & Set_Parameter .
Syntax For defining the Set & Get Parameter .
Vighnesh .
‎2007 Aug 21 8:41 AM
‎2007 Aug 21 8:41 AM
‎2007 Aug 21 8:43 AM
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
‎2007 Aug 21 8:46 AM
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