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

How to create a parameter id on screen element

Former Member
0 Likes
4,445

How to create a parameter id on screen element

reply urgent

How to create a parameter id on screen element

reply urgent

7 REPLIES 7
Read only

Former Member
0 Likes
2,160

Hi Madan,

Check this info.

Parametere Id is the one which holds the memory for the particular field. when we need to pass the the field from one screen to another use the parameter Id.

The SAP Memory is a user-specific memory area of the application server, which is accessed by all main sessions of a user session at once. ABAP programs have access to SPA/GPA parameters stored in the SAP Memory (also called SET/GET parameters).

Eg. Of how to use Set parameter

you can give value of variable (dobj) to parameter ID 'pid'. This will store value in SAP memory

SET PARAMETER ID pid FIELD dobj.

When you want to use that value stored in SAP memory

you can use GET parameter.

GET PARAMETER ID pid FIELD dobj.

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.

Check this link.

http://help.sap.com/saphelp_47x200/helpdata/en/f5/6a853c61c5140ee10000000a11405a/frameset.htm

Hope this resolves your query.

Reward all the helpful answers.

Regards

Read only

Former Member
0 Likes
2,160

Hi,

Take the Paramter ID of that screen field from the DATA ELEMENT of that field.

from SE11 enter field name in FURTHER CHARACTERISTICS tab you will find it.

reward if useful

regards,

Anji

Read only

Former Member
0 Likes
2,160

Hi,

1st get the data element for that screen element. Then go to se11. Put that Data element. Now click on Further Characterstics tabs. There u can assign the Parameter ID.Any Name u can give there.

Then in the screen u have to check the boxes for Set Parameter and Get parameter. Then It will wrk.

Read only

Former Member
0 Likes
2,160

Hi,

1st get the data element for that screen element. Then go to se11. Put that Data element. Now click on Further Characterstics tabs. There u can assign the Parameter ID.Any Name u can give there.

Then in the screen u have to check the boxes for Set Parameter and Get parameter. Then It will wrk.

Dinesh

Pls give the pnt for usefull ans.

Read only

Former Member
0 Likes
2,160

Hi,

1st get the data element for that screen element. Then go to se11. Put that Data element. Now click on Further Characterstics tabs. There u can assign the Parameter ID.Any Name u can give there.

Then in the screen u have to check the boxes for Set Parameter and Get parameter. Then It will wrk.

Dinesh

Pls give the pnt for usefull ans.

Read only

Former Member
0 Likes
2,160

Hi,

1st get the data element for that screen element. Then go to se11. Put that Data element. Now click on Further Characterstics tabs. There u can assign the Parameter ID.Any Name u can give there.

Then in the screen u have to check the boxes for Set Parameter and Get parameter. Then It will wrk.

Dinesh

Pls give the pnt for usefull ans.

Read only

Former Member
0 Likes
2,160

SET PARAMETER ID pid FIELD dobj.

Maintain the PID at DataElement level.

In a program, SPA/GPA parameters can only be created or assigned values if a PID name exists for them in the table TPARA.