‎2007 Mar 12 10:38 AM
hi all,
what are classes and objects in ABAP ?
is there any docs regarding classes and objects
regards,
shailendra
‎2007 Mar 12 10:46 AM
Hi,
Classes are templates for objects. Conversely, you can say that the type of an object is the same as its class.
components of the class describe the state and behavior of objects.
Local and Global Classes: 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 R/3 Repository.
A complete class definition consists of a declaration part and, if required, an implementation part.
The declaration part of a class <class>
CLASS <class> DEFINITION. ... ENDCLASS.
It contains the declaration for all components (attributes, methods, events) of the class.
The declaration part belongs to the global program data.
If you declare methods in the declaration part of a class, you must also write an implementation part for it. This consists of a further statement block:
CLASS <class> IMPLEMENTATION. ... ENDCLASS
The implementation part of a local class is a processing block. Subsequent coding that is not itself part of a processing block is therefore not accessible.
Interfaces are independent structures that you can implement in a class to extend the scope of that class.
a universal point of contact.
They provide one of the pillars of polymorphism, since they allow a single method within an interface to behave differently in different classes.
Global & Local Interfaces
The definition of a local interface <intf> is enclosed in the statements:
INTERFACE <intf>.
...
ENDINTERFACE.
The definition contains the declaration for all components (attributes, methods, events) of the interface.
They automatically belong to the public section of the class in which the interface is implemented.
Can be declared globally or locally within a program.
Locally declared in the global portion of a program using:-
INTERFACE <intf>.
...
ENDINTERFACE.
The definition contains the declaration for all components (attributes, methods, events) of the interface.
Interfaces are included in the public section of a class.
Interfaces do not have an implementation part, since their methods are implemented in the class that implements the interface.
http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm http://www.geocities.com/victorav15/sapr3/abap_ood.html http://help.sap.com/saphelp_nw2004s/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm ...
check this thread.
https://www.sdn.sap.com/irj/sdn/profile?userid=1679524
Regards,
Sruthi
‎2007 Mar 12 10:41 AM
‎2007 Mar 12 10:41 AM
go through this link
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
/people/sap.user72/blog/2005/05/10/a-small-tip-for-the-beginners-in-oo-abap
/people/ravikumar.allampallam/blog/2005/02/11/abap-oo-in-action
/people/thomas.jung3/blog/2005/09/08/oo-abap-dynpro-programming
http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b6254f411d194a60000e8353423/frameset.htm
http://www.sapgenie.com/abap/OO/
http://www.sapgenie.com/abap/OO/index.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
http://www.sapgenie.com/abap/OO/
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
‎2007 Mar 12 10:42 AM
Hi,
Latest ABAP consists of (from 4.7Version onwards) this classes and Interfaces and objects, which are part of Java/OOP's concepts.
In ABAP we create these Classes and Interfaces from T Code SE24
we define methods like subroutines and write the code to do.
Go through the SAP doc for further details.
Regards,
Anji
‎2007 Mar 12 10:46 AM
Hi,
Classes are templates for objects. Conversely, you can say that the type of an object is the same as its class.
components of the class describe the state and behavior of objects.
Local and Global Classes: 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 R/3 Repository.
A complete class definition consists of a declaration part and, if required, an implementation part.
The declaration part of a class <class>
CLASS <class> DEFINITION. ... ENDCLASS.
It contains the declaration for all components (attributes, methods, events) of the class.
The declaration part belongs to the global program data.
If you declare methods in the declaration part of a class, you must also write an implementation part for it. This consists of a further statement block:
CLASS <class> IMPLEMENTATION. ... ENDCLASS
The implementation part of a local class is a processing block. Subsequent coding that is not itself part of a processing block is therefore not accessible.
Interfaces are independent structures that you can implement in a class to extend the scope of that class.
a universal point of contact.
They provide one of the pillars of polymorphism, since they allow a single method within an interface to behave differently in different classes.
Global & Local Interfaces
The definition of a local interface <intf> is enclosed in the statements:
INTERFACE <intf>.
...
ENDINTERFACE.
The definition contains the declaration for all components (attributes, methods, events) of the interface.
They automatically belong to the public section of the class in which the interface is implemented.
Can be declared globally or locally within a program.
Locally declared in the global portion of a program using:-
INTERFACE <intf>.
...
ENDINTERFACE.
The definition contains the declaration for all components (attributes, methods, events) of the interface.
Interfaces are included in the public section of a class.
Interfaces do not have an implementation part, since their methods are implemented in the class that implements the interface.
http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm http://www.geocities.com/victorav15/sapr3/abap_ood.html http://help.sap.com/saphelp_nw2004s/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm ...
check this thread.
https://www.sdn.sap.com/irj/sdn/profile?userid=1679524
Regards,
Sruthi
‎2007 Mar 12 11:06 AM
hi,
As in function group we will have
data variables declared in top,
functions....< function ...end function>
simillarly in class..
data variables are called as Attributes,
Functions as Methods..<method....end method>
methods are services provided to objects.
events are raised at their definition ...Raise event
...this will trigger a method which was defined .
regards,
Naresh.