Application Development 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: 

class explanition

Former Member
0 Kudos

i developed in abap alv,fm,bapi ext....

for what i need to use class?

is there is conection between dialog and class

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi liat,

1. for what i need to use class?

Normally, without classes much

of the work can be accomplished.

2. Only when certain things,

like.

GRID control on screen,

abap character utilities,

docking container on screen,

some facilitieys provided only in classes

etc,

is required,

do we need classes.

3. Why class is required in dialog.

Its required only when

some SPECIAL/COMPLEX controls are required

on the screen.

eg. tree control

grid control

docking container etc.

regards,

amit m.

4 REPLIES 4

former_member188685
Active Contributor
0 Kudos

Hi,

all the things can't be done using normal ABAP, so in that case we can go for Classes, in dialog we will go for classes when we use controls .

in latest additions usining classes most of the transactions are imnplemented.

Regards

vijay

Former Member
0 Kudos

Class is the object oriented approach in ABAP.

You can do the same functionality what you do in normal ABAP with classes.

Classes have the advantages of :

Encapsulation

Inheritance

Reusability etc..

Former Member
0 Kudos

Hi liat,

1. for what i need to use class?

Normally, without classes much

of the work can be accomplished.

2. Only when certain things,

like.

GRID control on screen,

abap character utilities,

docking container on screen,

some facilitieys provided only in classes

etc,

is required,

do we need classes.

3. Why class is required in dialog.

Its required only when

some SPECIAL/COMPLEX controls are required

on the screen.

eg. tree control

grid control

docking container etc.

regards,

amit m.

Former Member
0 Kudos

Hi Liat,

In Object Oriented techniques, importance is given to data,which has to be made secure.So we create methods, by which we can access the data. Classes can be global(which can be used by many programs and can be defined using the T-code SE24) or local(used local to a program written in SE38). It has been found that by using OO ABAP,execution becomes faster compared to conventional ABAP.

Regarding the connection between dialog and class, we can create dialogs using classes also. For eg. ALV, HTML Viewer, Tree Control, Toolbar control etc. For getting them, in the screen painter, you have to define a custom control,which is the container for holding the above mentioned controls.Then you have to create objects of the specified control and the container of the control.For eg. If it is ALV, then you have to create objects for container(CL_GUI_CUSTOM_CONTAINER) and for ALV(CL_GUI_ALV_GRID). Then you can access the methods of the relevent classes for displaying those controls.

I hope you got some idea out of this.

Regards,

Sylendra