Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A


Hi All,

I'm trying to understand the concept behind abap class/interface/methods.

1. Is it mandatory to have an interface in every class?

2. Once a class is created is it right to define methods as static and public and use them without reference to the interface?

Any help appreciated.


Former Member
Former Member replied

hi meghna,

interfaces in ABAP Objects play the same role as classes. Just like classes, interfaces are object types that reside in the namespace of all types. While a class describes all aspects of a class, an interface only describes a partial aspect

The syntax for declaring a local interface is:


DATA ...






Basically, the declaration of an interface corresponds to the declaration part of a class, where instead of CLASSu2014ENDCLASS, you simply use INTERFACEu2014ENDINTERFACE. Interfaces can contain exactly the same components as classes. Unlike classes, however, interfaces don't need to be divided into different visibility sections because interface components are always integrated in the public visibility section of classes.

i dont want to confuse you .

please go to the below link to know more about... interface and classes.


0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question