Listing 6.2  berblick ber die Definition und Implementation von Klassen mit Attributen und Methoden
REPORT SimpleProgram.
CLASS lcl_category DEFINITION.
  PUBLIC SECTION.
    DATA:
     title TYPE string.
    CONSTANTS:
     vat TYPE f VALUE '0.16'.
ENDCLASS.             "lcl_category DEFINITION

CLASS lcl_product DEFINITION.
  PUBLIC SECTION.
    METHODS:
      constructor IMPORTING _category TYPE REF TO 
         lcl_category,
      get_price RETURNING value(_price) TYPE f,
      set_price IMPORTING _price TYPE f.
    DATA:
      title TYPE string,
      description TYPE string,
      category TYPE REF TO lcl_category,
      unit TYPE string.
  PROTECTED SECTION.
    DATA:
      price TYPE f.
ENDCLASS.                    "lcl_product DEFINITION