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: 

interface

Former Member
0 Kudos

hi explain me the interface concept

2 REPLIES 2

Former Member
0 Kudos

Hi

Interfaces

Interfaces only describe the external point of contact of a class (protocols), they do not contain any implementation.

Interfaces are usually defined by a user. The user describes in the interface which services (technical and semantic) it needs in order to carry out a task.

The user never actually knows the providers of these services, but communicates with them through the interface.

In this way the user is protected from actual implementations and can work in the same way with different classes/objects, as long as they provide the services required. This is known as polymorphism with interfaces.

Former Member
0 Kudos

Hi,

Interfaces

In ABAP interfaces are implemented in addition to, and independently of classes. An interface only has a declaration part,

and do not have visibility sections. Components (Attributes, methods, constants, types) can be defined the same way as in classes.

· Interfaces are listed in the definition part lof the class, and must always be in the PUBLIC SECTION.

· Operations defined in the interface atre impemented as methods of the class. All methods of the interface

must be present in the implementation part of the class.

· Attributes, events, constants and types defined in the interface are automatically available to the class

carrying out the implementation.

· Interface components are addressed in the class by display.

Reward if helpfull

rgds,

Prajith