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

Parameter Id

Former Member
0 Likes
2,268

Hi,

Can anyone tell me what is parameter id?

How can we create it?What is its use?

Thanks & Regards,

Deepak.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,749

hi,

You can define memory areas (parameters) in the SAP memory in various ways:

By creating input/output fields with reference to the ABAP Dictionary. These take the parameter name of

the data element to which they refer.

Alternatively, you can enter a name in the attributes of the input/output fields. Then, you can also choose

whether the entries from the field should be transferred to the parameter (SET), or whether the input field should be filled with the value from the parameter (GET).

To find out about the names of the parameters assigned to input fields, display the field help for the field (F1), then choose Technical info.

You can also fill a memory area directly using the statement

SET PARAMETER ID '<PAR_ID>' FIELD <var>.

and read it using the statement

GET PARAMETER ID '<PAR_ID>' FIELD <var>.

Hope this helps, Do reward.

5 REPLIES 5
Read only

Former Member
0 Likes
1,749

Hi,

read this

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>.

This statement fills the value stored under the ID <pid> into the variable <f>. If the system does not find a value for <pid> in the SAP memory, it sets SY-SUBRC to 4, otherwise to 0.

To fill the initial screen of a program using SPA/GPA parameters, you normally only need the SET PARAMETER statement.

The relevant fields must each be linked to an SPA/GPA parameter.

On a selection screen, you link fields to parameters using the MEMORY ID addition in the PARAMETERS or SELECT-OPTIONS statement. If you specify an SPA/GPA parameter ID when you declare a parameter or selection option, the corresponding input field is linked to that input field.

Hope this will help

Regards

Shibin

Read only

Former Member
0 Likes
1,749

Hi,

SAP memory is a memory area to which all main sessions within a SAPgui have access. You can use SAP memory either to pass data from one program to another within a session, or to pass data from one session to another. Application programs that use SAP memory must do so using SPA/GPA parameters (also known as SET/GET parameters). These parameters can be set either for a particular user or for a particular program using the SET PARAMETER statement. Other ABAP programs can then retrieve the set parameters using the GET PARAMETER statement. The most frequent use of SPA/GPA parameters is to fill input fields on screens

ex:

SET PARAMETER ID 'FP' FIELD p_name.

where FP is the id..u can give watever u want...and p_name is a variable..here it is a parameter..

Hope this helps u,

Arunsri

Read only

Former Member
0 Likes
1,749

Parameters are stored in table TPARA.

Parameter are predefined values for particular user.these are used for populating certain field which are frequently used by the user.

In order to find the parameter id we have go to techinal property for particular field.And give parameter value(what value you want to use frequently).

Check this Wiki Link for more info.

https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/userProfileParameters&

Read only

Former Member
0 Likes
1,750

hi,

You can define memory areas (parameters) in the SAP memory in various ways:

By creating input/output fields with reference to the ABAP Dictionary. These take the parameter name of

the data element to which they refer.

Alternatively, you can enter a name in the attributes of the input/output fields. Then, you can also choose

whether the entries from the field should be transferred to the parameter (SET), or whether the input field should be filled with the value from the parameter (GET).

To find out about the names of the parameters assigned to input fields, display the field help for the field (F1), then choose Technical info.

You can also fill a memory area directly using the statement

SET PARAMETER ID '<PAR_ID>' FIELD <var>.

and read it using the statement

GET PARAMETER ID '<PAR_ID>' FIELD <var>.

Hope this helps, Do reward.

Read only

Former Member
0 Likes
1,749

Hi,

In simple words Parameter Id is like address for storing a value in SAP memory.

set parameter id '<parameter id say ADDR1>' field v_var.

now contents of field v_var is stored in SAP memory with address addr1.

get parameter id 'ADDR1' field v_var_target.

now the value in SAP memory with Address ADDR1 is moved into v_var_target variable..........

Note : SAP memory gets cleaned off when u logoff..........

Cheers,

jose.