Creating a Global Class To make our class usable in any program we create, we'll go through the Class Constructor corresponding to transaction SE24. Entering Transaction SE24: Navigate to transaction SE24. In the Object Type field, type 'Z_CL_VEHICLE' and create. Selecting Class Option: In the next window, select the 'Class' option and proceed. Setting Description: In the subsequent window, input the description "Global class for vehicles", then save and create a local object. Defining Class Attributes: Now, let's define the attributes of the class in their respective tab. Defining Methods: For the method 'DISPLAY_WRITE', let's create parameters. Establishing Exceptions: For the same method, set exceptions by clicking on 'Exceptions'. Creating Events: In the Events tab, create the event. Creating Types: Under the Types tab, create the types for use within our global class. Save and Activate: Finally, save and activate the class. E.g CLASS z_cl_vehiculo DEFINITION PUBLIC FINAL CREATE PUBLIC . PUBLIC SECTION. TYPES marca_vehiculo TYPE char30 . DATA speed TYPE i . DATA max_speed TYPE i . DATA stop TYPE i . DATA write TYPE i . EVENTS cambio_estado_vehiculo . METHODS increase_speed . METHODS calculate_stop . METHODS display_write IMPORTING !p_parametro TYPE p !p_resultado TYPE p EXCEPTIONS vehiculo_no_existe . PROTECTED SECTION. PRIVATE SECTION. ENDCLASS. CLASS z_cl_vehiculo IMPLEMENTATION. * ---------------------------------------------------------------------------------------+ * | Instance Public Method Z_CL_VEHICULO->CALCULATE_STOP * +-------------------------------------------------------------------------------------------------+ * +-------------------------------------------------------------------------------------- METHOD calculate_stop. ENDMETHOD. * ---------------------------------------------------------------------------------------+ * | Instance Public Method Z_CL_VEHICULO->DISPLAY_WRITE * +-------------------------------------------------------------------------------------------------+ * | [--->] P_PARAMETRO TYPE P * | [--->] P_RESULTADO TYPE P * | [EXC!] VEHICULO_NO_EXISTE * +-------------------------------------------------------------------------------------- METHOD display_write. ENDMETHOD. * ---------------------------------------------------------------------------------------+ * | Instance Public Method Z_CL_VEHICULO->INCREASE_SPEED * +-------------------------------------------------------------------------------------------------+ * +-------------------------------------------------------------------------------------- METHOD increase_speed. ENDMETHOD. ENDCLASS.