2008 Jan 29 5:25 AM
Hi..
What do u mena by static methids and atributes?
Why v'll use these?
Whats the purpose?
Regards
sandeep.
2008 Jan 29 5:56 AM
Hi,
The methods are internal procedures that define the behavior of an object in a class. They can access all the attributes of a class.
Exam: METHOD <Meth1>
ENDMETHOD
Here Meth1 is method name.
You call the methods by using the CALL METHOD statement.
There are two types of methods.
1. Istance Method
2. Static Method.
You can declare instance methods by using the METHODS statement.
You can declare static methods by using the CLASS-METHODS statement.
Static Method can only access static attributes and trigger static events.
Static methods cannot be redefined. Redefining a method means creating a new implementation of the method in a subclass without changing the interface.
--Ranveer
Hi..
What do u mena by static methids and atributes?
Why v'll use these?
Whats the purpose?
Regards
sandeep.
2008 Jan 29 5:44 AM
Hi,
Static Attributes
The contents of static attributes define the state of the class that is valid for all instances of the class. Static attributes exist once for each class. You declare them using the CLASS-DATA statement. They are accessible for the entire runtime of the class.
All of the objects in a class can access its static attributes. If you change a static attribute in an object, the change is visible in all other objects in the class.
The technical properties of instance attributes belong to the static properties of a class. It is therefore possible to refer in a LIKE addition to the visible attributes of a class through the class component selector or through reference variables, without prior creation of an object.
Methods
Methods are internal procedures in a class that define the behavior of an object. They can access all of the attributes of a class. This allows them to change the data content of an object. They also have a parameter interface, with which users can supply them with values when calling them, and receive values back from them The private attributes of a class can only be changed by methods in the same class.
The definition and parameter interface of a method is similar to that of function modules. You define a method meth in the definition part of a class and implement it in the implementation part using the following processing block:
Static Methods
You declare static methods using the CLASS-METHODSstatement. They can only access static attributes and trigger static events.
Reward If Helpfull.
Regards Madhu.
2008 Jan 29 5:56 AM
Hi,
The methods are internal procedures that define the behavior of an object in a class. They can access all the attributes of a class.
Exam: METHOD <Meth1>
ENDMETHOD
Here Meth1 is method name.
You call the methods by using the CALL METHOD statement.
There are two types of methods.
1. Istance Method
2. Static Method.
You can declare instance methods by using the METHODS statement.
You can declare static methods by using the CLASS-METHODS statement.
Static Method can only access static attributes and trigger static events.
Static methods cannot be redefined. Redefining a method means creating a new implementation of the method in a subclass without changing the interface.
--Ranveer
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |