2008 Jan 28 9:13 AM
Hi,
CLASS c_bicycle DEFINITION.
PUBLIC SECTION.
CLASS-DATA team TYPE bikes_team.
ENDCLASS.
What do u mean by this in OOP ABAP.
c_bicycle=>team = 'Fuzzy Wheels'.
Thanks in advance,
Alex.
2008 Jan 28 10:42 AM
Hai.
class-data is used for static data variables.
=> used for accessing static data.staticdata is constant througout the program.static classes containsonly static variables.
Regards.
Sowjanya.B
2008 Jan 28 10:42 AM
Hai.
class-data is used for static data variables.
=> used for accessing static data.staticdata is constant througout the program.static classes containsonly static variables.
Regards.
Sowjanya.B
2008 Jan 29 3:19 AM
You can access static attributes directly using the class name. You need not create an instance of the class to do that (for non static attributes, you have to create instances to access them).
The operator for assigning public and static attributes is '=>'.
In the above case, you are assigning the value of the static attribute outside the class definition using the assignment operator '=>'
2008 Jan 29 6:08 AM
Hi,
class-data --- points to a static attribute.
c_bicycle=>team -- this statement points to
the static attribute 'team'.
c_bicycle=>team = 'Fuzzy Wheels'
This statement assigns a value 'Fuzzy Wheels' to the static attribute.
Regards Madhu.