Skip to Content

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


can anybody explain what is the main difference between static and instance components of a class in all aspects.

Former Member
Former Member replied

Hello Sandeep

There are two major differences:

1. Static components are "always" there meaning it is not required to create an instance of the class. Example: public static attribute CL_GUI_CFW=>FALSE.

2. Instance attributes are not visible in static method (whereas static attributes are visible in instance methods). Example: If you try to reference ME within a static class you get a syntax error.



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