‎2007 Jun 27 10:37 AM
hi gurus,
i am very new to object oriented concept and i dont have any idea about the same.
so please provide me all related document and link of the same
please give mevery basic explaination of the same under topics such as
what is class
how to create it
what is method or function module and how to create the same
what is instant how to create the same and how to make use of it
please help me with a simple sample report also
piont ll be surely awarded
thanks and regrads.
anuj
‎2007 Jun 27 10:57 AM
HI
ABAP
(Advanced Business Application Programming) is a programming language for developing applications for the SAP R/3 system, a widely-installed business application subsystem.
The latest version, ABAP Objects, is object-oriented programming. SAP will run applications written using ABAP/4, the earlier ABAP version, as well as applications using ABAP Objects.
SAP's original business model for R/3 was developed before the idea of an object-oriented model was widespread. The transition to the object-oriented model reflects an increased customer demand for it. ABAP Objects uses a single inheritance model and full support for object features such as encapsulation, polymorphism, and persistence.
ABAP Objects
ABAP Objects is a new concept in R/3 System and you can find its two distinct meanings --- one is for the entire ABAP runtime environment and the other represents the new object-oriented generation of this language.
The Runtime Environment
ABAP Objects, for the entire ABAP runtime environment, are an indication of how SAP has, for sometime, been moving towards object orientation. Object-oriented techniques have been used exclusively in system design. The ABAP language did not support these techniques earlier.
The ABAP Workbench will allow creating R/3 Repository objects in this regard. These objects are programs, authorization objects, lock objects, customizing objects, and so on and so forth. By using function modules, one can also encapsulate functions in separate programs with a defined lnterface. The Business Object Repository (BOR) allows you to create SAP Business Objects for internal and external use.
The Object-Oriented Language Extension
ABAP Objects support object-oriented programming. The ABAP Objects is a complete set of object-oriented statements, which has been introduced into the ABAP language. This object-oriented extension of ABAP builds on the existing language and is fully compatible with it.
The Object Orientation (OO), also known as the object-oriented paradigm, is a programming model that unites data and functions in objects. You can not only use ABAP Objects in existing programs, but also work with and use a conventional ABAP in new ABAP Objects programs. The rest of the ABAP language is primarily intended for structured programming, where data is stored in a structured form in database tables and function-oriented programs access and work with it.
Moreover, we should know that the object-oriented enhancement of ABAP is based on the models of Java and C++. It is compatible with external object interfaces such as DCOM and CORBA. The implementation of object-oriented elements in the kernel of the ABAP language has considerably increased response times when you work with ABAP Objects. Some other objects, such as SAP Business Objects and GUI objects, which are already object-oriented by themselves, are also benefiting from being incorporated into ABAP Objects.
About Classes
The classes are templates for objects. An abstract description of an object is the class. You could say 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.
Local and Global Classes
In ABAP Objects, classes can be declared either globally or locally. You define global classes and interfaces in the Class Builder (Transaction SE24.} in the ABAP Workbench. In the R/3 Repository, they are stored centrally in class pools in the class library. In an R/3 System, all of the ABAP programs can access the global classes. The 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, then it looks for a global class. Apart from the visibility question, there is no difference between using a global class and using a local class.
However, there is 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, then to define the outwardly visible components so that it fits into that program is usually sufficient. On the other hand, global classes must be able to be used anywhere. Since the system must be able to guarantee any program using an object of a global class, it can recognize the data type of each interface parameter and then certain restrictions are applied at the time of defining the interface of a global class.
Defining Local Classes
Local classes consist of ABAP source code, where the ABAP statements CLASS...ENDCLASS are enclosed. A complete class definition consists of the following parts, a declaration part and, if required, an implementation part. It is found that the declaration part of a class . The new class is called the subclass of the class from which it is derived. The original class is called the superclass of the new class. It contains the same components as the superclass if you do not add any new declarations to the subclass. However, in the subclass only the public and protected components of the superclass are visible. The private components of the superclass are not visible though they exist in the subclass. You can declare private components in a subclass that have the same names as private components of the superclass. It is seen that each class works with its own private components. The another point that we note is that methods which a subclass inherits from a superclass use the private attributes of the superclass and not any private components of the subclass with the same names.
The subclass is an exact replica of the superclass if the superclass does not have any private visibility section. However, you can add a new component to the subclass because it allows you to turn the subclass into a specialized version of the superclass. If a subclass is itself the superclass of further classes, then you can introduce a new level of specialization.
Polymorphism
Reference variables are defined with reference to a superclass or an interface defined with reference to it can also contain references to any of its subclasses. A reference variable defined with reference to a superclass or an interface implemented by a superclass can contain references to instances of any of its subclasses, since subclasses contain all of the components of all of their superclasses and also convey that the interfaces of methods cannot be changed. In particular, you can define the target variable with reference to the generic class OBJECT.
Using the CREATE OBJECT statement, when you create an object and a reference variable typed with reference to a subclass then you can use the TY PE addition to which the reference in the reference variable will point.
A reference variable can be used by a static user to address the components visible to it in the superclass to which the reference variable refers. However, any specialization implemented in the subclass cannot be addressed by it.
Depending on the position in the inheritance tree at which the referenced object occurs, you can use a single reference variable to call different implementations of the method. This is possible only if you redefine an instance method in one or more subclasses. This concept is called polymorphism, in which different classes can have the same interface and, therefore, be addressed using reference variables with a single type.
Conclusion
I have explained object orientation which is such an important aspect in SAP. The discussion began with the features of Object Orientation and includes the runtime environment, the language extension, the classes and the class components. Apart from that I have also discussed for new first time readers event handling, inheritance encapsulation and polymorphism.
Refer these basics
OO ABAP
http://www.sapgenie.com/abap/OO/eg.htm
http://www.sapgenie.com/abap/OO/syntax.htm
http://www.sapgenie.com/abap/OO/index.htm
http://www.sapgenie.com/abap/OO/defn.htm
Detailed
OOPS OO ABAP
http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt
http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf
http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt
http://www.amazon.com/gp/explorer/0201750805/2/ref=pd_lpo_ase/102-9378020-8749710?ie=UTF8
http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt
You can refer these docs for more information...
check the below links lot of info and examples r there
http://www.sapgenie.com/abap/OO/index.htm
http://www.geocities.com/victorav15/sapr3/abap_ood.html
http://www.brabandt.de/html/abap_oo.html
Check this cool weblog:
/people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
/people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b6254f411d194a60000e8353423/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt
http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
http://www.sapgenie.com/abap/OO/
http://www.sapgenie.com/abap/OO/index.htm
http://www.sapgenie.com/abap/controls/index.htm
http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
http://www.sapgenie.com/abap/OO/index.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
these links
http://help.sap.com/saphelp_47x200/helpdata/en/ce/b518b6513611d194a50000e8353423/content.htm
For funtion module to class
http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5954f411d194a60000e8353423/content.htm
for classes
http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5c54f411d194a60000e8353423/content.htm
for methods
http://help.sap.com/saphelp_47x200/helpdata/en/08/d27c03b81011d194f60000e8353423/content.htm
for inheritance
http://help.sap.com/saphelp_47x200/helpdata/en/dd/4049c40f4611d3b9380000e8353423/content.htm
for interfaces
http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b6254f411d194a60000e8353423/content.htm
For Materials:
1) http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf -- Page no: 1291
2) http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
3) http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
4) http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
5) http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt
6) http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf
7) http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt
😎 http://www.amazon.com/gp/explorer/0201750805/2/ref=pd_lpo_ase/102-9378020-8749710?ie=UTF8
1) http://www.erpgenie.com/sap/abap/OO/index.htm
2)http://help.sap.com/saphelp_nw04/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
class builder
http://help.sap.com/saphelp_nw2004s/helpdata/en/ee/e440a670a111d1b44c0000e8a52bed/content.htm
function builder
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db98fc35c111d1829f0000e829fbfe/content.htm
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/abap/objectOrientedABAP+(OO-ABAP)&
******please reward points if the information is helpful to you*********
‎2007 Jul 04 6:54 AM
hi all,
i need object oriented concept related to abap
please help me with the same
anuj
‎2007 Jun 27 11:10 AM
Hi,
OOPs concept is very importantconcept ..I will tell in simple words
Class are the collection of methods which will be accessed by the objects which are the basic runtime entities....
Function modules are the concept of functions used in C language..Each function module will do some particular work...
Function groups will be the container of the similar functn modules...
REWARD IF USEFUL
‎2007 Jun 27 11:10 AM
Hi Anuj,
Object orientation (OO), or to be more precise, object-oriented programming, is a problem-solving method in which the software solution reflects objects in the real world.
It supports code reuasbility,polymorphism,encapsulation.It helps to handle exceptions & memory management issues effectively.
Refer to the below links.They give a detailed explanation on OOPs concept in ABAP.
/people/sap.user72/blog/2005/05/10/a-small-tip-for-the-beginners-in-oo-abap
http://help.sap.com/saphelp_47x200/helpdata/en/d3/2e974d35c511d1829f0000e829fbfe/frameset.htm
Search for ABAP objects in the below link
http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
Hope this helps you.
All the best.
Sayee
‎2007 Jun 27 11:15 AM
Hi,
Give me your mail id, i will send the Docuements.
Thanks,
Anitha
‎2007 Jun 27 11:44 AM
hi anitha,
my email id is
anuj_arch@yahoo.com
thanks for the help
anuj
‎2007 Jul 04 6:36 AM
hi anitha,
my e-mail id is anuj_arch@yahoo.com plz send the related document as soon as possble.
thanks and regrad
point will be award fot the same
thanks
anuj
‎2007 Jun 27 11:48 AM
hi anuj
<b>OOP </b> <b> Traditional Programming</b>
class description of data + processing
object (instance) actual data + processing
attribute actual data (a field)
method function that processes a particular structure
message function call
instantiate allocate a structure
class:
In object-oriented programming, a class is a programming language construct that is used to group related instance variables and methods. A method, called a function in some languages, is a set of instructions that are specific to a class. Depending on the language, classes may support multiple inheritance or may require the use of interfaces to extend other classes. A class may indicate either specifically or abstractly what methods exist when the program is executed. The latter is known as an 'abstract class'.
A class must be defined with a constructor if it is to be used as an object, that is, instantiated. However some classes, especially those containing factory methods, are defined as static classes with no constructor merely to organize data hierarchically (e.g. the Math class may contain the static constant PI and the static method abs). A pseudocode example resembling Java syntax is shown below to show the hierarchy:
// Import statements
import package.class.*;
class MainClass
{
// Global Variables (int denotes integer)
int variable1;
int variable2;
...
// Global Constants (final denotes constant)
final CONST1;
final CONST2;
...
// Default Constructor
public MainClass()
{
// Body
}
// Constructor
public MainClass(Parameter1, Parameter2, ...)
{
// Body
}
// Method (void denotes return type)
void Method()
{
// variables
int var1
int var2
...
}
// Inner Class
class InnerClass
{
// Methods, Variables, etc.
}
}
<b>Methods:</b>
In object-oriented programming, the term method refers to a subroutine that is exclusively associated either with a class (called class methods, static methods, or factory methods) or with an object (called instance methods). Like a procedure in procedural programming languages, a method usually consists of a sequence of statements to perform an action, a set of input parameters to customize those actions, and possibly an output value (called return value) of some kind. The purpose of methods is to provide a mechanism for accessing (for both reading and writing) the private data stored in an object or a class.
Kinds of methods
As stated above, instance methods are associated with a particular object, while class or static methods (also called shared methods) are instead associated with a class. In typical implementations, instance methods are passed a hidden reference (e.g. this or self or Me) to the object (whether a class or class instance) they belong to, so that they can access the data associated with it. A typical example of a class method would be one that keeps count of the number of created objects within a given class.
Constructors are similar to methods, but in truth they are blocks of statements that are called automatically upon the creation of an instance of a class. In Java, [[C++]], C# and PHP they are distinguished by having the same name as the class of the object they're associated with; in Visual Basic the constructor is called New, and in Object Pascal constructors can have user-defined names (but are mostly called Create). Constructors have some similarities with methods, but plenty of differences, so they aren't usually considered methods.
Destructors are special instance methods that are called automatically upon the destruction of an instance of a class. In C++, they are distinguished by having the same name as the class of the object they're associated with, but with the addition of a tilde (~) in front. In Object Pascal destructors can have user-defined names (but are mostly called Destroy).
An abstract method is a dummy code method which has no implementation. It is often used as a placeholder to be overridden later by a subclass of or an object prototyped from the one that implements the abstract method. In this way, abstract methods help to partially specify a framework.
An accessor method is a method that is usually small, simple and provides the means for the state of an object to be accessed from other parts of a program. Although it introduces a new dependency, use of the methods are preferred to directly accessing state data because they provide an abstraction layer. For example, if a bank-account class provides a getBalance() accessor method to retrieve the current balance (rather than directly accessing the balance data fields), then later revisions of the same code can implement a more complex mechanism balance retrieval (say, a database fetch) without the dependent code needing to be changed. An accessor method that changes the state of an object is often called an update method or, sometimes, mutator method. Objects that provide such methods are considered mutable objects.
Isolation levels
Whereas a C programmer might push a value onto a stack data-structure by calling:
stackPush(&myStack, value);
a [[C++]] programmer would write:
myStack.push(value);
The difference is the required level of isolation. In C, the stackPush procedure could be in the same source file as the rest of the program and if it was, any other pieces of the program in that source file could see and modify all of the low level details of how the stack was implemented, completely bypassing the intended interface. In C+, regardless of where the class is placed, only the functions which are part of myStack will be able to get access to those low-level details without going through the formal interface functions. Languages such as C can provide comparable levels of protection by using different source files and not providing external linkage to the private parts of the stack implementation but this is less neat and systematic than the more cohesive and enforced isolation of the C+ approach.
Some recommended usages
A method should preserve the class invariants of the object it is associated with, and should always assume that they are valid when it commences execution. To this effect, preconditions are used to constrain the method's parameters, and postconditions to constrain method's output, if it has one. If any one of either the preconditions or postconditions is not met, a method may raise an exception. If the object's state does not satisfy its class invariants on entry to or exit from any method, the program is considered to have a bug.
The difference between a procedure and a method is that the latter, being associated with a particular object, may access or modify the data private to that object in a way consistent with the intended behavior of the object. Consequently, rather than thinking "a method is just a sequence of commands", a programmer using an object-oriented language will consider a method to be "an object's way of providing a service" (its "method of doing the job", hence the name); a method call is thus considered to be a request to an object to perform some task.
Consequently, method calls are often modeled as a means of passing a message to an object. Rather than directly performing an operation on an object, a message (most of the time accompanied by parameters) is sent to the object telling it what it should do. The object either complies or raises an exception describing why it cannot do so. Applied to our stack example, rather than pushing a value onto the stack, a value is sent to the stack, along with the message "Push!".
Static (Shared/Class) methods
As mentioned above, a method may be declared as static (or shared in Visual Basic and class in Object Pascal), meaning that it acts at the class level rather than at the instance level. A static method cannot refer to a specific instance of the class (i.e. it cannot refer to this, self, Me, etc.) An example of a static member and its consumption in C# code:
public class ExampleClass
{
public static void StaticExample()
{
// static method code
}
public void InstanceExample()
{
// instance method code here
// can use THIS
}
}
/// Consumer of the above class:
// Static method is called -- no instance is involved
ExampleClass.StaticExample();
// Instance method is called
ExampleClass objMyExample = new ExampleClass();
objMyExample.InstanceExample();
<b>class:</b>
In object-oriented programming, a class is a programming language construct that is used to group related instance variables and methods. A method, called a function in some languages, is a set of instructions that are specific to a class. Depending on the language, classes may support multiple inheritance or may require the use of interfaces to extend other classes. A class may indicate either specifically or abstractly what methods exist when the program is executed. The latter is known as an 'abstract class'.
A class must be defined with a constructor if it is to be used as an object, that is, instantiated. However some classes, especially those containing factory methods, are defined as static classes with no constructor merely to organize data hierarchically (e.g. the Math class may contain the static constant PI and the static method abs). A pseudocode example resembling Java syntax is shown below to show the hierarchy:
// Import statements
import package.class.*;
class MainClass
{
// Global Variables (int denotes integer)
int variable1;
int variable2;
...
// Global Constants (final denotes constant)
final CONST1;
final CONST2;
...
// Default Constructor
public MainClass()
{
// Body
}
// Constructor
public MainClass(Parameter1, Parameter2, ...)
{
// Body
}
// Method (void denotes return type)
void Method()
{
// variables
int var1
int var2
...
}
// Inner Class
class InnerClass
{
// Methods, Variables, etc.
}
}
<b>Methods:</b>
In object-oriented programming, the term method refers to a subroutine that is exclusively associated either with a class (called class methods, static methods, or factory methods) or with an object (called instance methods). Like a procedure in procedural programming languages, a method usually consists of a sequence of statements to perform an action, a set of input parameters to customize those actions, and possibly an output value (called return value) of some kind. The purpose of methods is to provide a mechanism for accessing (for both reading and writing) the private data stored in an object or a class.
Kinds of methods
As stated above, instance methods are associated with a particular object, while class or static methods (also called shared methods) are instead associated with a class. In typical implementations, instance methods are passed a hidden reference (e.g. this or self or Me) to the object (whether a class or class instance) they belong to, so that they can access the data associated with it. A typical example of a class method would be one that keeps count of the number of created objects within a given class.
Constructors are similar to methods, but in truth they are blocks of statements that are called automatically upon the creation of an instance of a class. In Java, [[C++]], C# and PHP they are distinguished by having the same name as the class of the object they're associated with; in Visual Basic the constructor is called New, and in Object Pascal constructors can have user-defined names (but are mostly called Create). Constructors have some similarities with methods, but plenty of differences, so they aren't usually considered methods.
Destructors are special instance methods that are called automatically upon the destruction of an instance of a class. In C++, they are distinguished by having the same name as the class of the object they're associated with, but with the addition of a tilde (~) in front. In Object Pascal destructors can have user-defined names (but are mostly called Destroy).
An abstract method is a dummy code method which has no implementation. It is often used as a placeholder to be overridden later by a subclass of or an object prototyped from the one that implements the abstract method. In this way, abstract methods help to partially specify a framework.
An accessor method is a method that is usually small, simple and provides the means for the state of an object to be accessed from other parts of a program. Although it introduces a new dependency, use of the methods are preferred to directly accessing state data because they provide an abstraction layer. For example, if a bank-account class provides a getBalance() accessor method to retrieve the current balance (rather than directly accessing the balance data fields), then later revisions of the same code can implement a more complex mechanism balance retrieval (say, a database fetch) without the dependent code needing to be changed. An accessor method that changes the state of an object is often called an update method or, sometimes, mutator method. Objects that provide such methods are considered mutable objects.
Isolation levels
Whereas a C programmer might push a value onto a stack data-structure by calling:
stackPush(&myStack, value);
a [[C++]] programmer would write:
myStack.push(value);
The difference is the required level of isolation. In C, the stackPush procedure could be in the same source file as the rest of the program and if it was, any other pieces of the program in that source file could see and modify all of the low level details of how the stack was implemented, completely bypassing the intended interface. In C+, regardless of where the class is placed, only the functions which are part of myStack will be able to get access to those low-level details without going through the formal interface functions. Languages such as C can provide comparable levels of protection by using different source files and not providing external linkage to the private parts of the stack implementation but this is less neat and systematic than the more cohesive and enforced isolation of the C+ approach.
Some recommended usages
A method should preserve the class invariants of the object it is associated with, and should always assume that they are valid when it commences execution. To this effect, preconditions are used to constrain the method's parameters, and postconditions to constrain method's output, if it has one. If any one of either the preconditions or postconditions is not met, a method may raise an exception. If the object's state does not satisfy its class invariants on entry to or exit from any method, the program is considered to have a bug.
The difference between a procedure and a method is that the latter, being associated with a particular object, may access or modify the data private to that object in a way consistent with the intended behavior of the object. Consequently, rather than thinking "a method is just a sequence of commands", a programmer using an object-oriented language will consider a method to be "an object's way of providing a service" (its "method of doing the job", hence the name); a method call is thus considered to be a request to an object to perform some task.
Consequently, method calls are often modeled as a means of passing a message to an object. Rather than directly performing an operation on an object, a message (most of the time accompanied by parameters) is sent to the object telling it what it should do. The object either complies or raises an exception describing why it cannot do so. Applied to our stack example, rather than pushing a value onto the stack, a value is sent to the stack, along with the message "Push!".
Static (Shared/Class) methods
As mentioned above, a method may be declared as static (or shared in Visual Basic and class in Object Pascal), meaning that it acts at the class level rather than at the instance level. A static method cannot refer to a specific instance of the class (i.e. it cannot refer to this, self, Me, etc.) An example of a static member and its consumption in C# code:
public class ExampleClass
{
public static void StaticExample()
{
// static method code
}
public void InstanceExample()
{
// instance method code here
// can use THIS
}
}
/// Consumer of the above class:
// Static method is called -- no instance is involved
ExampleClass.StaticExample();
// Instance method is called
ExampleClass objMyExample = new ExampleClass();
objMyExample.InstanceExample();
‎2007 Jul 04 9:00 AM
Hi,
Classes in ABAP are either local or global
Global classes are declared in class builder (SE24 )
Local classes are declared within programs
Components of a class
Attributes : Internal data fields of class
Attributes can be either instance attributes specific to each instance of the class ( object ) or static attributes which are common to all instances
Methods :
Subroutines /procedures in a class that define the behavior of the object. Methods can also be instance methods or static methods
A ppt on ABAB OBJECTS BASICS:
SAMPLE CODE FOR ABAP OBJECTS:
General Tutorial for OOPS
http://www.henrikfrank.dk/abapuk.html
http://www.erpgenie.com/abap/OO/
Have a look at these links for OO ABAP:
http://www.sapgenie.com/abap/OO/
http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt
http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
http://www.sapgenie.com/abap/controls/index.htm
http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
SDN Series:
https://www.sdn.sap.com/irj/sdn/developerareas/abap?rid=/webcontent/uuid/35eaef9c-0b01-0010-dd8b-e3b... [original link is broken]
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf
Basic concepts of OOPS
steps of creating ALV OOPs
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/abap/7stepstocreateOOPS+ALV&
Thanks
‎2007 Jul 04 9:04 AM
Hi,
see this link
here u can down load.introduction to abap objects book completely.
reward all helpful answers.
rgds,
bharat.