‎2006 Mar 06 6:39 AM
Hi friends,
I need information on abap objects,i know oops concepts.
i need programes which u have done in real time.
it should be great if u provede good example programes on ABAP objects.
Thanks & Regards.
Madhu.
‎2006 Mar 06 6:42 AM
‎2006 Mar 06 6:50 AM
Hi Madhu,
1.ABAP Objects is a complete set of object-oriented statements that has been introduced into the ABAP language...
2. SAP Business Objects and GUI objects - already object-oriented themselves - will also profit from being incorporated in ABAP Objects..
have a look at this
<a href="http://www.sapgenie.com/abap/OO/eg.htm">sample code.</a>
regards
satesh
‎2006 Mar 06 7:02 AM
hi madhu,
check this blog ..this contains a lot of info..really a good one..
/people/sap.user72/blog/2005/05/10/a-small-tip-for-the-beginners-in-oo-abap
<b>reward if useful</b>
‎2006 Mar 06 7:17 AM
Hi Madhu,
There are lots of resources available on SDN in this topic.
The best one to read is <b>ABAP OBJECTS by Horst Keller</b>.
Regards,
Abdul Hakim
‎2006 Mar 06 7:54 AM
Hi,
Check this link and kindly reward points by clikcing the star on the left of reply,if it is useful.
‎2006 Mar 06 8:48 AM
Template for making a class
Delete the parts that should not be used
******************************************
Definition part
******************************************
CLASS xxx DEFINITION.
*----
-
Public section
*----
-
PUBLIC SECTION.
TYPES:
DATA:
Static data
CLASS-DATA:
Methods
METHODS:
Using the constructor to initialize parameters
constructor IMPORTING xxx type yyy,
Method with parameters
mm1 IMPORTING iii TYPE ttt.
Method without parameters
mm2.
Static methods
CLASS-METHODS:
*----
*
Protected section. Also accessable by subclasses
*----
-
PROTECTED SECTION.
*----
-
Private section. Not accessable by subclasses
*----
-
PRIVATE SECTION.
ENDCLASS.
******************************************
Implementation part
******************************************
CLASS lcl_airplane IMPLEMENTATION.
METHOD constructor.
ENDMETHOD.
METHOD mm1.
ENDMETHOD.
METHOD mm2.
ENDMETHOD.
ENDCLASS.
Template for calling a class
Create reference to class lcl_airplane
DATA: airplane1 TYPE REF TO lcl_airplane.
START-OF-SELECTION.
Create instance using parameters in the cosntructor method
CREATE OBJECT airplane1 exporting im_name = 'Hansemand'
im_planetype = 'Boing 747'.
Calling a method with parameters
CALL METHOD: airplane1->display_n_o_airplanes,
airplane1->display_attributes.
Subclass
CLASS xxx DEFINITION INHERITING FROM yyy.
Using af class as a parameter for a method
The class LCL_AIRPLANE is used as a parameter for method add_a_new_airplane:
METHODS:
add_a_new_airplane importing im_airplane TYPE REF to lcl_airplane.
Interfaces
In ABAP interfaces are implemented in addition to, and independently of classes. An interface only has a declaration part,
and do not have visibility sections. Components (Attributes, methods, constants, types) can be defined the same way as in classes.
· Interfaces are listed in the definition part lof the class, and must always be in the PUBLIC SECTION.
· Operations defined in the interface atre impemented as methods of the class. All methods of the interface
must be present in the implementation part of the class.
· Attributes, events, constants and types defined in the interface are automatically available to the class
carrying out the implementation.
· Interface components are addressed in the class by ]
U CAN GET MANY EXAMPLES IN THIS LINK
http://www.henrikfrank.dk/abapexamples/ABAP%20objects%20and%20controls/abap_objects.htm