‎2008 Feb 24 10:13 AM
‎2008 Feb 24 10:58 AM
Hi,
class is nothing but combination of data and function.. These functionsor methods perform the operation on data of the object.. Method will change the state of the object..
look this link once..
http://abapprogramming.blogspot.com/2007/10/oops-abap-15.html
Thanks and Regards,
surya
‎2008 Feb 24 12:13 PM
hi,
Classes are templates for objects. Conversely, you can say that the type of an object is the same as its class. A class is an abstract description of an object. You could say that it is a set of instructions for building an object. The attributes of objects are defined by the components of the class, which describe the state and behavior of objects.
Classes in ABAP Objects can be declared either globally or locally. You define global classes and interfaces in the Class Builder (Transaction SE24) in the ABAP Workbench. They are stored centrally in class pools in the class library in the Repository. All ABAP programs have access to these global classes. Local classes are defined within an ABAP program. Local classes and interfaces can only be used in the program in which they are defined. When you use a class in an ABAP program, the system first searches for a local class with the specified name. If it does not find one, it then looks for a global class. Apart from the visibility question, there is no difference between using a global class and using a local class.
There is, however, a significant difference in the way that local and global classes are designed. If you are defining a local class that is only used in a single program, it is usually sufficient to define the outwardly visible components so that it fits into that program. Global classes, on the other hand, must be able to be used anywhere. This means that certain restrictions apply when you define the interface of a global class, since the system must be able to guarantee that any program using an object of a global class can recognize the data type of each interface parameter.
Structure of a Class
The following statements define the structure of a class:
A class contains components
Each component is assigned to a visibility section
Classes implement methods
Hope this helps, Do reward.
‎2008 Feb 24 12:17 PM
class is group of variables and group of methods.
is that is one variable or more variables and one or more methods..with out single variable and with out single method also possible.
in method we do the processing logic.
we call that method where ever we want that logic