SAP StackFICOHRMMSDPMPSABAPNetWeaverTablesTcodes ☰MENU

CLASS in ABAP Objects

Classes in ABAP are used for specifying the templates for ABAP objects, with an abstract description and building instructions for that object.

Two types of classes are there

Global Class: These types of classes are created using class builder tool and will be available globally for all ABAP programs.

Local Class: These types of classes are created in an ABAP program and will ba available only to that program where it defined.

 

The main components of Classes are

 

Encapsulation Methods

It specifies the external visibility for the class components.

 

Now let us look into the statements and its syntax for dealing local classes in ABAP programs.

 

Declaring a CLASS

CLASS <class> DEFINITION [PUBLIC]

[INHERITING FROM <superclass>]

[ABSTRACT]

[FINAL]

[CREATE PUBLIC|PROTECTED|PRIVATE]

[FRIENDS <cif1> <cif 2> …]

[DEFERRED]

[LOAD].

 

Implementing a class.

CLASS <class> IMPLEMENTATION.

 

Declare static attributes

CLASS-DATA <a>

 

Declare Class methods

CLASS-METHODS

 

Declare Class events

CLASS-EVENTS <evt>

Also Read : View Other ABAP Keywords & Syntax -> ABAP Transaction codes

SAP ALECRMSCMSRMSAP Solutions SAP ReferencesSAP BasicsPP ModuleWMSAP Partners
HomeContact & Privacy PolicyTwitter
All of the product names here are trademarks of their respective companies. The site sapstack.com is not affiliated with SAP AG.
©2018 sapstack.com