Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

RE:ABAP objects

alex_georgek
Associate
Associate
0 Kudos
82

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.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
67

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

3 REPLIES 3

Former Member
0 Kudos
68

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

Former Member
0 Kudos
67

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 '=>'

Former Member
0 Kudos
67

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.