on ‎2005 Nov 30 5:15 AM
Hi all,
When we declare the data declaration using STATICS and DATA.
What are the advantages using STATICS. why we use when we are creating generic extractors using FM.
Please let me.
Thanks and Regards
Satish
Request clarification before answering.
Hi Satish,
from SAP-Docu:
Example
The subroutine add_1 gets the same result for the variable local for each call as this is instanced again each time. The static variable static is already available and its value increased by one during each call.
DO 10 TIMES.
PERFORM add_one.
ENDDO.
FORM add_one.
DATA local TYPE i VALUE 10.
STATICS static TYPE i VALUE 10.
local = local + 1.
static = static + 1.
WRITE: / local, static.
ENDFORM.
/manfred
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.