Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Statics keyword

Statics can be used only within Form....EndForm. Is there any similar thing which can be used outside Form so that one can persist data between calls to the subroutine

Former Member

Hi Mala,

Static Local Data Objects

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.

But if you want to have a varibale outside the subroutines which persists their values between subroutine calls,it is better to define them as global variables and they will be available.

In case you have any further clarifications,do let me know.


Puneet Jhari.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question