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

OOABAP

Former Member
0 Likes
720

What is the difference between C++ , ABAp & OOABAP?

Why we are going for OOABAP? When we can go for classical abap & ooabap?

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
653

C++ is altogether different than ABAP or ABAP Object(ABAP OO). ABAP and ABAP Objects are really one in the same, all ABAP coding is now referred to as ABAP Objects, but to be clear, ABAP OO commonly referrs to the OO implmenetation within ABAP, meaning the use of classes, interfaces, and so on. You can use either classical or OO concepts in ABAP as you see fit and you can even mix a little bit. But I would suggest that you learn the OO concepts of ABAP(if you are an ABAPer) because that will be the future direction moving forward. You can already see this with the Web Dynpro implemenation, which is based and tightly integrated into the OO framework.

REgards,

Rich Heilman

5 REPLIES 5
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
654

C++ is altogether different than ABAP or ABAP Object(ABAP OO). ABAP and ABAP Objects are really one in the same, all ABAP coding is now referred to as ABAP Objects, but to be clear, ABAP OO commonly referrs to the OO implmenetation within ABAP, meaning the use of classes, interfaces, and so on. You can use either classical or OO concepts in ABAP as you see fit and you can even mix a little bit. But I would suggest that you learn the OO concepts of ABAP(if you are an ABAPer) because that will be the future direction moving forward. You can already see this with the Web Dynpro implemenation, which is based and tightly integrated into the OO framework.

REgards,

Rich Heilman

Read only

Former Member
0 Likes
653

Unlike C++ Multiple inheritance is not allowed .

ABAP allowed .

So handle such situations where multiple inheritance is required ABAP has come up with a concept called Interface. Interface is just a class that has only definition/declaration and has not been implemented. It is like an abstract class... Interfaces are implemented in classes.

Abstract classes can be inherited only once while using interfaces we can have multiple inheritance.

ABAP Objects, the same components (attributes, methods, constants, types, alias names) can be defined in an interface in largely the same way as in classes. However, interfaces do not have component visibility sections.

Interfaces are implemented in classes.

The interface name is listed in the definition part of the class. Interfaces can only be implemented ‘publicly’ and are therefore always in the PUBLIC SECTION (this is only valid as of Release 4.6).

When to use Class and when interface largely depends on the design part.

these things are not simple.. you need to read in much detail to have a good understanding... give me ur mail Id.. I will mail you a document about OO ABAP.

Read only

Former Member
0 Likes
653

hi

C++ is entirely different concept, while ABAP is used for ERP, C++ is used for more trivial applications like designing windows. Not much to compare between the two.

Object Oriented prg

A programming technique in which solutions reflect real world objects

What are objects ?

An object is an instantiation of a class. E.g. If “Animal” is a class, A cat

can be an object of that class .

With respect to code, Object refers to a set of services ( methods /

attributes ) and can contain data

What are classes ?

A class defines the properties of an object. A class can be instantiated

as many number of times

Advantages of Object Orientated approach

Easier to understand when the system is complex

Easy to make changes

Encapsulation - Can restrict the visibility of the data ( Restrict the access to the data )

Polymorphism - Identically named methods behave differently in different classes

Inheritance - You can use an existing class to define a new class

Polymorphism and inheritance lead to code reuse

Have a look at these good links for OO ABAP-

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.

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/

Hope this helps

if it helped, you can acknowledge the same by rewarding

regards

dinesh

Read only

0 Likes
653

OOABAP is OBJECT BASED.

ABAP Objects only allows <b>single inheritance</b>.However, you can simulate multiple inheritance in ABAP Objects using <b>interfaces</b>

ABAP Objects: Design Aims

As simple as possible

Only object-oriented concepts, that have proved

themselves in other object-oriented programming

languages.

<b>Reward all helpful replies</b>

Read only

marcelo_ramos1
SAP Mentor
SAP Mentor
0 Likes
653

Hi,

You can see more information on:

<a href="https://sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/37c5db90-0201-0010-3a9b-d0a5288f3c15">Eight Reasons Why Every ABAP Developer Should Give ABAP Objects a Second Look</a>

<a href="https://sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/3e59b790-0201-0010-88aa-bc8a7f95f6fb">Why use ABAP Objects</a>

Addition Information:

<a href="https://media.sdn.sap.com/public/eclasses/teched04/ABAP151_files/Default.htm#nopreload=1">ABAP Objects for Java Developers</a>

<a href="/people/dirk.feeken/blog/2007/07/06/abap-trial-version-for-newbies-part-17--your-first-abap-object Trial Version for Newbies: Part 17 - Your first ABAP Object</a>

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/1591ec90-0201-0010-3ba8-cdcd500b17cf">ABAP Code Sample for Objects</a>

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/2503f09c-0801-0010-dc89-80bab376e4b8">Object Oriented ABAP - Local and Global classes</a>

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b6cae890-0201-0010-ef8b-f970a9c41d47">ABAP Code Sample to Learn Basic Concept of Object-Oriented Programming</a>

<a href="https://wiki.sdn.sap.com/wiki/display/ABAP/ABAP+Objects">ABAP Objects</a>

Regards.

Marcelo Ramos