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 clear global variable

Former Member
0 Likes
3,273

Hi Experts,

How to clear global variable which was set by set parameter.

Thanks in advance.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,818

Hi Murali ,

You need to set a blank/initial value to the memory id.

So use the SET PARAMETER command for the same .

Regards

Arun

Hi Experts,

How to clear global variable which was set by set parameter.

Thanks in advance.

5 REPLIES 5
Read only

Former Member
0 Likes
1,818

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

<b>SAP global memory retains field value through out session.</b>

set parameter id 'MAT' field v_matnr.

get parameter id 'MAT' field v_matnr.

They are stored in table TPARA.

You have to come out of the session to clear the value of that parameter

or have to refresh that value in the Table TPARA.

Reward points for useful Answers

Regards

Anji

Read only

Former Member
0 Likes
1,818

Hi,

SPA/GPA parameters (or SET/GET parameters) are set using SET PARAMETER and read with GET PARAMETER. Input fields on Dynpro screens can be linked with SPA/GPA parameters. When a screen is called, the default values of such input fields are taken from the SAP Memory. When the screen is left, the field values are stored in SAP Memory (that’s why you always find the name of the last edited program in the input field of the ABAP Editor SE38).

<b>SPA/GPA parameters are managed in the database table TPARA.</b>

Delete the record from TPARA table to clear this Variables

Regards

Sudheer

Read only

Former Member
0 Likes
1,819

Hi Murali ,

You need to set a blank/initial value to the memory id.

So use the SET PARAMETER command for the same .

Regards

Arun

Read only

jayanthi_jayaraman
Active Contributor
0 Likes
1,818

Hi,

Try free memory.

or

try

set parameter id 'MAT' field space.

Read only

Former Member
0 Likes
1,818

Hi,

check with any of one.

SET PARAMETER ID 'MAT' FIELD space.

(OR)

SET PARAMETER ID 'MAT' value space.

don't forget to reward if useful......