Skip to Content
author's profile photo Former Member
Former Member

SATATIS of Procedural ABAP compared with CLASS-DATA of OO ABAP.


Is the STATICS statement in procedural ABAP synonymous to CLASS-DATA in OO ABAP.

Please help.



Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Jan 11, 2007 at 12:11 AM

    Hello Rajesh

    The strict answer is: no, they are different. However, they share things in common.

    That's what the SAP documentation says about STATICS:

    Local" target="_blank">">Local Data in the Subroutine

    <b>Static Local Data Objects</b>

    <i>If you want to keep the value of a local data object after exiting the subroutine, you must use the STATICS statement to declare it instead of the DATA statement. With STATICS you declare a data object that is globally defined, but only locally visible from the subroutine in which it is defined.</i>

    Class-data are also globally defined yet they are valid everywhere within your class. That is different from local static variables that are only visible within the FORM routine where they are declared.



    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.