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: 

EXPORTING LIST TO MEMORY with PERFORM IN PROGRAM

titanium
Participant
0 Kudos

hello ,

how can I perform a FORM form another program and then get variables values that only know in the scope of that FORM .

I tried LIST_FROM_MEMORY but I guess this only works with submit prog EXPORTING LIST TO MEMORY .

so anyone have an idea ?

NOTICE : the FORM is in std program so I'm not supposed to change anything there .

4 REPLIES 4

former_member186746
Active Contributor

Hi you can use what is called a dirty assign to access memory from other stacks.

Check this blog on the subject https://blogs.sap.com/2013/05/30/using-dirty-assigns-in-practice-using-calling-variables-for-indirec...

Kind regards, Rob Dielemans

0 Kudos

Hi rob

this will work if the STD program is calling my Z program but its the other way around . I'm calling the STD FORM inside my Z program so after the execution is done I cant use dirty assign.

any other idea ?

0 Kudos

Hi,

What you can do is call the standard program twice. If this doesn't solve it then you have to look into enhancements.

Kind regards, Rob Dielemans

Jelena
Active Contributor

It's a bad idea to call a routine from a standard program and even worse is to rely on its local variables.

"How do I get to the local variables" is really like asking "how do I break into someone's house?" Clearly they don't want you there, otherwise they would've invited you or left the door open. If the routine authors wanted to expose that data then they would've designed the routine that way or created an API.

Short answer to your question is you can't do that without making a modification or enhancement in the standard routine. I.e. either breaking the lock or pushing someone through the window to let you in, following the house analogy.

If you could explain in more detail what are you trying to achieve exactly we might be able to advise of an alternative solution.