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

Object-oriented + ABAP Objects

Former Member
0 Likes
1,253

Hello friends,

I would like to know, is it possible in ABAP Objects to do the followings:

Single Inheritance

Multiple Inheritance

Polymorphism

Data Abstration

Method Overloading, and method Overriding

Inner Classes ?

Would be nice if some one highlights some of the features of ABAP Objects, in comparision or in regards to JAVA or so...

Many thanks in advance...

13 REPLIES 13
Read only

Former Member
0 Likes
1,226

Single Inheritance -> Yes

Multiple Inheritance -> No

Polymorphism -> Yes

Data Abstration -> Interfacing ...

Method Overloading, and method Overriding -> Yes

Inner Classes ? -> Yes

More info <a href="http://www.sapgenie.com/abap/OO/index.htm">[ Here ]</a>

Read only

abdul_hakim
Active Contributor
0 Likes
1,226

Hi Syed.

You cannot have Multiple inheritence in ABAP or Java.

Other things you can have.

Just search for ABAP Objects for Java Developers in SDN you will a wonderful document of SAPTeched.

For more details on ABAP Objects you get a book of ABAP OBJECTS by Horst Keller which is available from SAP Press.

Abdul

Read only

0 Likes
1,226

Hello thanks for your replies,

In book ( ABAP Objects ) I did not came across for inner-classes, or method overloading, or method overriding concept...?

Do we have interface concept in ABAP Objects ??

Are u sure one can do metho-overloading in ABAP Objects ??

Read only

0 Likes
1,226

Yes - Yes - Yes !

<b>thanks for the reward!</b>

Message was edited by: Stephan Kaminski

Read only

0 Likes
1,226

Hello Stephan,

Thanks for your reply,

Can you pls help me to figure out, what are the dissimilarities between JAVA and ABAP Objects.....

Vielen Danke !

looking farward for your reply,

Read only

0 Likes
1,226

Here is a link :

ABAP Objects for Java Developers :

https://www.sdn.sap.com/irj/sdn/docs?rid=/webcontent/uuid/1693f0b7-0701-0010-8187-931b02a5fbfb [original link is broken]

Read only

0 Likes
1,226

Hello,

Yes I know this link, but the guy did not talked in language concept of the two object-oriented languages.

I am intrested more , programmically things which one can do in Java and cant be done in ABAP or so..e.g there is a concept of FINAL methods in java, and we dont have in ABAP Objects ( well I guess ) would be nice if you can add few things in this regards, ( the java have muilti-threading concept and we dont have in ABAP Objects ) stuff like that,.....

thanks,

Read only

0 Likes
1,226

Hi,

In ABAP : We do have final concept!

There are differencies between 'Local Classes' created in abap wihtin One program : for example Handler for ALV Grid

And Repository classes : Created in the repository available for any program!

Multi threading can be done via asynchronous Function module or with event!

greetz!

<b>Thanks for small-> Big reward!</b>

Read only

0 Likes
1,226

huum...

Do you know any thing for my knowledge, which one can do in ABAP Objects and cant be done in Java or vice-versa ?

Points are going to be rewards,

Thanks for your help and input...

Read only

0 Likes
1,226

Hi

The Best is REPOSitory objects

- Centralized

- Easy to maintain

- Easy UI to create

Transaction code is SE24 -> Class Builder !

http://help.sap.com/saphelp_nw04/helpdata/en/ca/c035baa6c611d1b4790000e8a52bed/content.htm

Read only

Former Member
0 Likes
1,226

Shah

ABAP OO supports polymorphism through inheritance (override) but not overloading. If you try to overload a method you will get a compile error saying the method already exists.

ABAP OO does not support inner classes - you cannot nest one class within another.

Your other questions have already been answered by other members.

Regards

Kurt

Read only

Former Member
0 Likes
1,226

In sap delegated inherintance is supported ,that is when a parent is called or executed ,automatically the child gets executed .

Read only

0 Likes
1,226

Lakshmanan

How is "delegated inheritance" different from the ABAP OO single inheritance model?

If you say that a "child" method is executed when a "parent" method is called, then that sounds like a regular method override.

Am I missing something? Can you be more specific or perhaps provide an example?

Regards

Kurt