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

why class defination and class implementaion separated in abap?

KiranJ
Active Participant
0 Likes
788

hai experts,

i hav doubt why class defination and class implementaion separated in abap. In know in C++ its possible

but in JAVA its not possible . what is the main reson behind this concept in ABAP.

thanks in adv.

3 REPLIES 3
Read only

former_member1161170
Participant
0 Likes
699

I don't know, but I could presume this separation provide you an help: it is clearer to read and it's easier to understand in local classes.

In global classes it could be faster finding single element (method, parameter, ...).

But it's only a suposition ....

Read only

gerd_rother
Active Participant
0 Likes
699

Hi,

Well, only those who designed ABAP OO can actually answer this.

But I think it might has to do with the need to define global classes in the repository, their attributes, methods and their parameters to be stored in DB tables. If you do not separate definition and implementation it is much harder to store those things in the DB and, for example, provide the where-used tool for this.

Regards, Gerd Rother

Read only

Former Member
0 Likes
699

Hi Sree,

As far as I feel, it's been done with a view of readability. As you know that ABAP is very well modularized and organized programing language. When you define a local ABAP Class, you define two seperate sections of it. You define the Class Definition and then you define the Implementations. This way you can really have a look at all the class definitions which are organized in the same section. Then you can have a look at the selected implementation.

But if this hasn't been the scenario, then as developer looking at the complex classes would have made life hell for you. You can very well figure it out how good to keep things organized for later class maintainance and readability.

Hope this would shed some light on your question.

Thanks,

Samantak.