in

SAP OO ABAP Class Definition, Objects, Types Of Class, Implementation

SAP OO ABAP Class Definition, Objects, Types Of Class, Implementation, OOPs ABAP step by step, Public, private, protected in SAP ABAP, SAP ABAP OOPs sample programs, OO ABAP example programs, How to create class in SAP ABAP, How to create global class in SAP ABAP, How to create class and methods in SAP ABAP, oops abap interview questions, SAP ABAP topic wise interview questions, sap abap interview questions for experienced candidates, SAP ABAP real time interview questions, OO ABAP Interview Questions, SAP ABAP fresher Interview Questions pdf, sap abap oops tutorial pdf, sap abap oops real time examples

Let us know here the OOPs ABAP step by step tutorial, SAP OO ABAP Class Definition, Objects, Types Of Class, Implementation, Public, private, protected in SAP ABAP, SAP ABAP OOPs sample example programs, How to create global and local class in SAP ABAP.

Class: – A class is a user-defined data type that is the collection of different types of components.

  • A class only provides a template it’s doesn’t allocate memory.

Object: – An instance of a class is called as an object.

  • Whenever we instance a class memory will be allocated.
    Access Specifies (Visibility Section): –

Types Of Class
1) Local Class -> Local class to program (SE38-ABAP Editor).
2) Global Class -> Class Builder Tool (SE24).

The syntax for creating local classes: –
1) Definition of class -> Declaration of components.
2) Implementation of class -> Implementation of method

Definition of class

Class <class name> definition.

Declaration of components.

Endclass.

Implementation class

Class <class name> implementation.

Implementation of methods.

Endclass.

Object Creation: –

1) Create reference for the class

Syntax: – Data <ref name> type ref to <class name>

Note: – Whenever an Object is created memory will be allocated for the attributes of the class and the attribute gets initialized to default values.

VDM in ABAP CDS view

Access specifiers in ABAP / Public, private, protected in SAP ABAP
1) Public Section
2) Protected Section
3) Private Section

SAP OO ABAP Class Definition, Objects, Types Of Class, Implementation, OOPs ABAP step by step, Public, private, protected in SAP ABAP, SAP ABAP OOPs sample programs, OO ABAP example programs, How to create class in SAP ABAP, How to create global class in SAP ABAP, How to create class and methods in SAP ABAP, oops abap interview questions, SAP ABAP topic wise interview questions, sap abap interview questions for experienced candidates, SAP ABAP real time interview questions, OO ABAP Interview Questions, SAP ABAP fresher Interview Questions pdf, sap abap oops tutorial pdf, sap abap oops real time examples

Application Of OOPS: –
1) BAPI’S
2) BADI’S
3) Enhancement Frame Work
4) Webdynpro
5) HR-ABAP
6) CRM-Technical
7) SRM
8) EP

CDS view core annotations

OOPs ABAP step by step tutorial

=========================LOCAL CLASS=========================

OO ABAP example programs / SAP ABAP OOPs sample programs

How to create local class in SAP ABAP?

REPORT Demo_oops.

CLASS EMP DEFINITION.
PUBLIC SECTION.
DATA EMPNO TYPE I. “instance attribute
DATA ENAME(20) TYPE C. “instance attribute
ENDCLASS. “emp DEFINITION

DATA K TYPE REF TO EMP.
CREATE OBJECT K.

WRITE :/ K->EMPNO,
K->ENAME.
K->EMPNO = 1.
K->ENAME = ‘abc’.
WRITE:/ K->EMPNO,
K->ENAME.

At any point of time, the object stores one set of values.
Note: – Only public components can be accessed outside of the class.

=========================GLOBAL CLASS SE24=========================

How to create global class in SAP ABAP?

REPORT Z915AM_OOPS2.

Data m type ref to z915am_class1.
CREATE OBJECT m.
write :/ m->empno,
m->ename.

What do you think?

Written by admin

Leave a Reply

Your email address will not be published. Required fields are marked *

ABAP Performance analysis Tools, SCI Code Inspector ST05 Performance Trace SE30 ABAP Runtime Analysis

ERP Software, the History of SAP, What is ABAP, Roles and responsibilities of ABAP or BASIS or Functional consultants, SAP System Landscape, and SAP R/3 Architecture.

What is ERP Software, ABAP history, SAP R3 System Landscape