2005 Jul 04 8:14 AM
Hi all,
We can use a variable from calling programs using field-symbols like:
data: str(30) type c value '(prog)var'.
field-symbols:
<fs> type any.
assign str to <fs>.
The variable var is global in the program.
Can I use a variable if it defines inside of the calling form/function as a local variable.
Ivan.
Hi all,
We can use a variable from calling programs using field-symbols like:
data: str(30) type c value '(prog)var'.
field-symbols:
<fs> type any.
assign str to <fs>.
The variable var is global in the program.
Can I use a variable if it defines inside of the calling form/function as a local variable.
Ivan.
2005 Jul 04 8:38 AM
No.
I have checked it with forms, it has no reference possible to 'local' variables. I assume it to be the same for functions.
cheers,
2005 Jul 04 8:44 AM
Hi,
try that:
var1 is your local variable in Program zprog1.
in zprog2 you assign above-named variable :
ASSIGN ('(ZPROG1)VAR1') TO <fs>.
this code is from the foll. link
<a href="http://www.abapforum.com/forum/viewtopic.php?t=573&highlight=dirty+assign">dirty assign</a>
regards Andreas
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |