2007 Aug 04 8:39 AM
2007 Aug 04 8:42 AM
Hi Mahesh,
Its as simple as declaring normal variables. We will use STATICS instead of DATA Keyword.
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.
Thanks,
Vinay
2007 Aug 04 8:42 AM
Hi Mahesh,
Its as simple as declaring normal variables. We will use STATICS instead of DATA Keyword.
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.
Thanks,
Vinay
2007 Aug 04 8:51 AM
Hi,
STATICS: To declare variables with static validity in procedures
variables defined with STATICS are static attributes that are only visible in the corresponding method
Regards
Sudheer