‎2008 Aug 26 1:37 PM
Hi,
I need the replacement for the keyword LOCAL......
some how i found the replacement (by my own) but it is not working properly...
the replacement is data declaration for the local...
Example program for local...
REPORT ZTEST_LOCAL_EXAMPLE.
DATA text TYPE string VALUE 'Global text'.
WRITE / text. " Global text
PERFORM subr1.
WRITE / text. " Global text
FORM subr1.
LOCAL text.
*data text type string. "replacement for local
text = 'Text in subr1'.
WRITE / text.
PERFORM subr2 USING text.
WRITE / text.
ENDFORM.
FORM subr2 USING para TYPE string.
LOCAL para.
para = 'Text in subr2'.
WRITE / text.
ENDFORM.
Here it is local statement and the replacement statement... but the replacement is not working properly....
Thanks
vishnu. R
‎2008 Aug 26 1:51 PM
Output
Global text
Text in subr1
Text in subr2
Text in subr1
Global text
Output with replacement
Global text
Text in subr1
Global text
Text in subr1
Global text
Looks fine to me. What do you expect?
matt
‎2008 Aug 27 9:18 AM
just look closely the output it gets varies.........
actually the local is obsoleted and i need the replacement for that...
if u use the replacement the output and the functionality should not get change...
got me................ !!!!!!!................
‎2008 Aug 27 9:25 AM
local is a keyword used instead of tables statement
it is mandatory to use that when the work areas of subroutine and the call programs are different
and u can use tables statements if the work areas are same.