Show TOC

Code Example Before ExecutionLocate this document in the navigation structure

CLASS cl_car_extract_constant DEFINITION PUBLIC CREATE PUBLIC . 
 PUBLIC SECTION . 
  DATA current_speed TYPE i. 
  METHODS: drive IMPORTING i_speed TYPE i. 
 PRIVATE SECTION . 
ENDCLASS. 
 
CLASS cl_car_extract_constant 
 METHOD drive. 
  IF i_speed > 240. 
   current_speed = 240. 
  ENDIF. 
 ENDMETHOD. 
ENDCLASS.