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

Use field from diffrent FM

Former Member
0 Likes
428

HI ,

There is FM that called to proxy instance during FM run-time lot of time and i want to do singleton to this instance

I.e. create the object proxy just one time and send the proxy instance to the FM .

the problem is that the i cant change the FM's signature and i need to move the instance object in global parameter but there is another problem that the FM dont have the same top .

what i think is to use the memory to export the parameter but i am not sure if this is the only way

any diffrent idea ?

if the export to mem is the only way please provide an example .

Thanks

James

e.g.

Main FM <---Called one time

Sub FM <---- called multiple times with create instance

1 ACCEPTED SOLUTION
Read only

Sandra_Rossi
Active Contributor
0 Likes
399

you may store the object in a class as a static attribute, then you'll be able to access it from anywhere, provided that it's in the same internal session of course (I can't know if it's your case).

about memory, you may use the EXPORT/IMPORT "family" (choose whether you want to use the abap memory or the shared memory) and also use the shared objects (shared memory too), or use ASSIGN ('(prog)globvar') TO <var> (though it is an internal SAP statement). See sap library and forum for more information.

HI ,

There is FM that called to proxy instance during FM run-time lot of time and i want to do singleton to this instance

I.e. create the object proxy just one time and send the proxy instance to the FM .

the problem is that the i cant change the FM's signature and i need to move the instance object in global parameter but there is another problem that the FM dont have the same top .

what i think is to use the memory to export the parameter but i am not sure if this is the only way

any diffrent idea ?

if the export to mem is the only way please provide an example .

Thanks

James

e.g.

Main FM <---Called one time

Sub FM <---- called multiple times with create instance

2 REPLIES 2
Read only

Sandra_Rossi
Active Contributor
0 Likes
400

you may store the object in a class as a static attribute, then you'll be able to access it from anywhere, provided that it's in the same internal session of course (I can't know if it's your case).

about memory, you may use the EXPORT/IMPORT "family" (choose whether you want to use the abap memory or the shared memory) and also use the shared objects (shared memory too), or use ASSIGN ('(prog)globvar') TO <var> (though it is an internal SAP statement). See sap library and forum for more information.

Read only

0 Likes
399

HI ,

I solve it with creation of new class with set and get functionality with static member .

Thanks