‎2007 Sep 07 3:42 PM
explain the span of these two kind of varaiables in subroutines..with a simple example
Thanks guyz
‎2007 Sep 07 4:09 PM
Check the following syntaxes to declare a static variable.
1. STATICS f.
2. STATICS f(len).
3. STATICS: BEGIN OF rec,
...
END OF rec.
4. STATICS: BEGIN OF itab OCCURS n,
...
END OF itab.
Static validity means that, unlike normal local variables, the life of static variables does not depend on the defining procedure, but on the program at runtime. Static variables are thus not redefined on the stack each time the defining procedure is called, but exist independently of this in the program and keep their value, regardless of calls to the defining procedure.
Global Variable:
global variable is a variable that is accessible in every scope.