Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

abap objects

Former Member
0 Likes
347

Hello experts,

I am a new the concept of abap objects..

1.i want programs regarding to polymorphism,inheitance like each and every abap objects.

2.i want to how can i use alv in abap objects and what type-pools can i use....

help me please.....

2 REPLIES 2
Read only

Former Member
0 Likes
320

Hi,

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://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.allsaplinks.com/

http://www.sap-img.com/

http://www.sapgenie.com/

http://help.sap.com

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

Regards,

Priyanka.

Read only

Former Member
0 Likes
320

Hi,

1. Inheritance

CLASS super_class DEFINITION.
	PUBLIC SECTION.
		Public components
	PROTECTED SECTION.
		Protected components
	PRIVATE SECTION.
		Private components
ENDCLASS.
CLASS sub_class DEFINITION INHERITING FROM super_class.
	PUBLIC SECTION.
		Public components
		Public components (super_class)
	PROTECTED SECTION.
		Protected components
		Protected components (super_class)
	PRIVATE SECTION.
		Private section
ENDCLASS.

The public and protected components of the super class are visible in the subclass.

Private section of the super class is not visible in the sub classes.

Private components of the sub class can have same name as the private component of the super class.

Public and Protected components of the sub class can not have the same name as that have been used in super class.

Polymorphism

CLASS super_class DEFINITION.
	. . . . . . . . . . 
	METHODS test_method.
ENDCLASS.
CLASS sub_class_one DEFINITION INHERITING FROM super_class.
	. . . . . . . . . 
	METHODS test_method REDEFINTION.
ENDCLASS.
CLASS sub_class_two DEFINITION INHERITING FROM super_class.
	. . . . . . . . . 
	METHODS test_method REDEFINTION.
ENDCLASS. 
DATA: supr_obj type ref to super_class,
	 sub1_obj type ref to sub_class_one,
	 sub2_obj type ref to sub_class_two.
START-OF-SELECTION.
	CREATE OBJECT sub1_obj.
	CREATE OBJECT sub2_obj.
	supr_obj = sub1_obj.
CALL METHOD  supr_obj->test_method.
	supr_obj = sub2_obj.
CALL METHOD  supr_obj->test_method. 

Reference variables declared with static reference to a super class can dynamically point to an object of a subclass of this super class and access the components known to the super class. Methods inherited from super class may be redefined in one or more of the subclasses. This is the basis of polymorphism using inheritance.

Polymorphism here means using the same name via same interface to address differently implemented methods, belonging to different objects of different classes in the inheritance tree.

2. ALV

Step 1 : First create a program using SE80 (Object Navigator)

Step 2 : Create a Screen for the program using :

SE80 ->Program->Right click on program name->select Screen

Step 3 : Create an Input Field and a Custom Control in the Screen

Step 4 : Create GUI Status to add the exit capability

Step 5 : Create a transaction code to execute the dialog program

Step 6 : Define a class to perform the data retrieval and formatting to the screen

Step 7 : Create Object for the Class to Implement the methods and displaying the ALV Grid Control with desired functionality.

Regards,

Richa