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

SET/GET Parameters

Former Member
0 Likes
495

Hi

Could any one explain me the exact use of these parameters?

I know that these are used for storing/retriving values from SAP memory? But how to use them?

I tried like:

SET PARAMETER pid field var. Then I tried to get the value of var stored in SAP memory using : GET PARAMETER pid field var.

But i could not succeed. Could any one help me out for the same?

Thanks in advance.

Regards

Jigar

3 REPLIES 3
Read only

Former Member
0 Likes
462

Hi

SET/GET PARAMETER stataments are to set/get a value in ABAP MEMORY (not SAP MEMORY), they are often used to tranfer a value from calling program to called program:

REPORT ZREP1.

DATA: MY_NAME(3).

MY_NAME = 'MAX'.

SET PARAMETER ID 'ZMY' FIELD MY_NAME.

SUBMIT ZREP2 AND RETURN.

REPORT ZREP2.

DATA: MY_NAME(3).

GET PARAMETER ID 'ZMY' FIELD MY_NAME.

WRITE MY_NAME.

Max

Read only

Former Member
0 Likes
462

Hi

One of the use for SET PARAMETERS is that you can check the type of employee and set certain rules for them.

Goto SU01 and give a username. Check the PARAMETER settings for the user. Now execute any program logging as that user and when you GET the parameter id, the value that has been set will be populated.

SET PARAMETER ID pid FIELD f. is the correct syntax. You have missed ID in the declaration.

Example

DATA REPID like sy-repid VALUE 'RSPFPAR'.

SET PARAMETER ID 'RID' FIELD REPID.

use

GET PARAMETER ID 'RID' FIELD REPID. in another program and check the value.

Regards

Navneet

Read only

Former Member