Static and instance components in ABAP Objects
Page 1 of 1
Static and instance components in ABAP Objects
The class components that have been declared fall under two category static and instance.
Now what do we mean by this actually? As we know class is only a logical modelling of an
object .It does not occupies any memory space during program execution only the instance of
an class (objects) occupies memory space. We know a class can have multiple instance i.e
multiple object can refer to same class. And in oop separate memory are allocated for all
different objects and these memory area are not shareable by other objects . But it is
possible to have only one common memeory area for all instance of a class.
The class components that share a common memory area for all the class instance are
static components. The class components that have separate memory area for separate
instance are instance components.
A point of note that a class can have static as well as instance components. Only static
methods can access static attribute and static event can be raised by static methods and
the same is true for instance methods attributes and events
Now what do we mean by this actually? As we know class is only a logical modelling of an
object .It does not occupies any memory space during program execution only the instance of
an class (objects) occupies memory space. We know a class can have multiple instance i.e
multiple object can refer to same class. And in oop separate memory are allocated for all
different objects and these memory area are not shareable by other objects . But it is
possible to have only one common memeory area for all instance of a class.
The class components that share a common memory area for all the class instance are
static components. The class components that have separate memory area for separate
instance are instance components.
A point of note that a class can have static as well as instance components. Only static
methods can access static attribute and static event can be raised by static methods and
the same is true for instance methods attributes and events
Uma_ABAP- Posts : 56
Join date : 2012-03-31
Similar topics
» declaring static and instance components in ABAP Objects
» Accessibility of components by use of super in ABAP Objects
» Static and instance constructor in ABAP Objects
» Creating multiple Objects in ABAP Objects
» Difference between Procedural ABAP and ABAP Objects
» Accessibility of components by use of super in ABAP Objects
» Static and instance constructor in ABAP Objects
» Creating multiple Objects in ABAP Objects
» Difference between Procedural ABAP and ABAP Objects
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|
Mon Aug 20, 2012 4:37 pm by Admin
» Difference between Type and Like
Thu Jun 07, 2012 2:40 pm by Admin
» How to handle table control fields in Module Pool program?
Wed May 09, 2012 2:41 am by govind
» Three tables inner join in SAP
Thu May 03, 2012 4:47 pm by Uma_ABAP
» Creating table type in ABAP
Sat Apr 28, 2012 9:03 pm by Uma_ABAP
» Creating user defined types and structures in ABAP
Sat Apr 28, 2012 8:55 pm by Uma_ABAP
» Creating Dynamic Internal Table and Dynamic Field catalog in SAP-ABAP
Fri Apr 27, 2012 11:00 am by Admin
» Copy Custom PF-Status from Standard program to Custom Program in ALV
Thu Apr 26, 2012 9:52 pm by Uma_ABAP
» Calculate/find number of working days between two dates in SAP
Tue Apr 24, 2012 2:06 pm by Uma_ABAP