Application Development 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: 

Scope of GET PARAMETER

Former Member
0 Kudos

Hi,

I have created a SET/GET parameter the value of which comes from the user profile in transaction SU3. In the code, using GET PARAMETER, I fetch the value of this parameter into the attribute of a public class and then based on the value in this attribute execute the appropriate code.

I want to know what is the scope of the GET PARAMETER statement. If I am fetching the parameter value using GET PARAMETER and putting it into a class attribute in a particular Function Group, would it be available in other Function Groups also?

Please help.

Thank you.

3 REPLIES 3

matt
Active Contributor
0 Kudos

Parameter IDs are specific to an individual user and are retained throughout the login.

<i>available to any programs and any sessions throughout the whole duration of a user session</i> - from the ABAP help on SAP memory.

Hence your parameter id is available in all your programs, function modules and classes.

matt

Former Member
0 Kudos

Hi Matthew,

I think what you are saying is absolutely correct provided I fetch the value of the parameter in my code using GET PARAMETER statement. In my case, I have written the GET PARAMTER statement in one Function Group (let's say A) to transer the value of that PARAMETER ID into the attribute of a public Class. Once this is done, check is performed on the value on this attribute and execute the code appropriately.

Now, my question is will the value I captured in the Class attribute in Function Group A remain visible in other Function Groups also?

Thank you.

Former Member
0 Kudos

hi

For the statements GET PARAMETER ID pid FIELD f and GET PARAMETER ID pid FIELD f,

f must be character-type. You can use the EXPORT and IMPORT statements for storing

non-character-type fields and structures.

<b>

regards,

pavan