10-18-2017 8:58 AM
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 .
10-18-2017 11:20 AM
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
10-18-2017 2:13 PM
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 ?
10-18-2017 2:24 PM
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
10-18-2017 5:28 PM
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.