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: 

How to make a 'SET PARAMETER" GLOBAL

Former Member
0 Kudos

I am using SET PARAMETER ID. I have created it in TPARA. It is being set with the correct value. however, in certain instances, the value gets set twice. ( I know this because I look in SAP MEMORY in debugger and notice that is has two values. One global and One local.

I want to be able to force that parm id to be global when I first set it as I think it will not create a second one at that point.

The first SET PARAMETER ID creates in SAP memory but there is not setting of 'global or local' on it. How can I force it to be a global to begin with

4 REPLIES 4

Former Member
0 Kudos

Hi,

Do like this :

SET PARAMETER ID pid FIELD f.

Example

DATA: REPID(8) VALUE 'RFSCHU01'.

SET PARAMETER ID 'RID' FIELD REPID.

This will Writes the contents of the field f to the global SAP memory under the key pid . If the key already contains a value, it is overwritten.

The key pid must consist of three characters. You can find a list of the keys (parameters) used in the SAP system description or in the ABAP/4 Development Workbench.

Notes

The global SAP memory remains available to the user during the entire terminal session. This means that set values are retained when you leave a program.

You should not use the SAP memory for temporary storage of values because other modes use the same global memory.

If you need a new key (parameter), you can create this in the ABAP/4 Development Workbench.

Sets the program name, e.g. for transfer to another program.

Hope this helps.

Thanks,

Greetson

BMEIJS
Active Participant
0 Kudos

Hi J J,

We are running into the same problem with global and local parameter id's. We have no clue what the purpose is and can not find any sap docu on it. I had hoped to find the answer in this thread, but the answers only describe how to use parameter id's. Did you solve your problem or find the answer somewhere else?

Regards,

Ben Meijs

0 Kudos

Hello,

I got the same problem as you mentioned...

'SET PARAMETER ID creates in SAP memory but there is not setting of 'global or local' '.

Intially, i only created TPARA entry. It shown me two things like one for Global and another for local in debug memory analysis..

So when i try to set value, it was assigned only to local memory and it hasn't reflected(not carried to next session and no return value from Get parameter)  when i try to retrieve sometimes. I was unable to find the exact case, when it was carrying the SAP memory(set to local memory in debug)..

So, I read the F1 help.. It only depends on Roll area and Set/Get parameters do not access SAP Memorys directly but from its local roll area..

then i created a Data element and assigned the same parameter ID..

Now, the local/global differentiation gone from debug and passing exact values across the session(It has to carry to a BAdI)..

Hope this helps...


Regards,

Raghu