Entering content frameProcess documentation Processing Office Application Events Locate the document in its SAP Library structure

Purpose

You can interpret events triggered by the office application or users of the office application in your ABAP program and react to them. The following events exist:

Process flow

1. Register the events that you want to interpret in your program. You do this in the method call for init_control on the instance control.

  1. Create the processing logic for the registered events in a class of your own. You can use static methods or object methods here.
  2. After initializing the document (get_document_proxy method), define the event handling. You can use static methods and object methods to react to the events.

- Static methods

SET HANDLER c_event_handler=>close_event FOR document.

SET HANDLER c_event_handler=>custom_event FOR document.

- Object methods

DATA o_event_handler TYPE REF TO class_event_handler.

CREATE OBJECT o_event_handler.

SET HANDLER o_event_handler->close_event FOR document.

SET HANDLER o_event_handler->custom_event FOR document.

  1. In each PAI module of your program that can be called while the desktop application is active, include the following method call for dispatching control framework events:

CALL METHOD cl_gui_cfw=>dispatch
        IMPORTING return_code = return_code.

 

Leaving content frame