PRIVATE

Basic form

PRIVATE SECTION.

Effect

You can only use this statement in the declaration part of a classe in ABAP Objects. It opens the private section of the class definition, which ends at the ENDCLASS statement.

The private section is one of the visibility sections of a class, which define the external visibility of the components of the class.

A class definition need not contain a private section. However, if it does, the private section must be the last visibility section to be defined (after the public and protected sections).

All of the components of the private section can access the components of the public and private sections.

Example

CLASS C1 DEFINITION.
  PUBLIC SECTION.
    DATA A1.
    ...
  PROTECTED SECTION.
    DATA A2.
    ...
  PRIVATE SECTION.
    DATA: A3 LIKE A1,
          A4 LIKE A2.
    ...
ENDCLASS.

Related

CLASS

PUBLIC SECTION

PROTECTED SECTION

PRIVATE SECTION

ENDCLASS

CLASS-DATA

CLASS-METHODS

CLASS-EVENTS

METHODS

EVENTS

INTERFACES

ALIASES

METHOD

ENDMETHOD

INTERFACE

ENDINTERFACE

CREATE OBJECT

CALL METHOD

RAISE EVENT

SET HANDLER

Special variants of other keywords

Additional help

Classes