Using Screens with ActiveX Controls 

Use

The GUI Library offers a limited support for ActiveX controls on the SAP GUI screen.

If any of the controls on an R/3 application screen with which are working is an ActiveX control, you should use the SAPGUI_ACTIVEX flag of the connection functions. Using this flag allows screens with ActiveX controls to be displayed correctly to the end user. It also allows the R/3 application server to receive the correct information when the end user uses any of the ActiveX controls on such screens.

Note that you must use the SAPGUI_ACTIVEX flag consistently in one application: if you use it in one call to a connection function, you must use it in all connection function calls in your application.

Once you use this flag in your application, however, any ActiveX control data is communicated between the R/3 application server and the SAP GUI Front directly, bypassing the GUI Library (and as a result, bypassing the GUI Component). The data of other SAP GUI controls is still communicated to the GUI Library.

Notice that this may result in incomplete data in the event structure (and its related structures): the data for regular SAP GUI controls is included in the event structure, while ActiveX control data is not included in the event structure.

Because ActiveX control information is missing from the event structure, the data in the event structure may be sometimes inconsistent with the data that the R/3 application server and the GUI Front have.

As a result, an application using this flag can only get events from R/3 or from Front, but it cannot send events to R/3 or to Front.

Therefore, you should use this flag with caution, and only when necessary, that is only for R/3 applications that contain any ActiveX controls.

Requirements and Restrictions

Procedure

To work with screens that contain any ActiveX controls on them:

  1. Call the desired connection function using both the SAPGUI_FRONT and the SAPGUI_ACTIVEX connection flags.
  2. The SAPGUI_FRONT flag starts up the GUI Front when the connection establishes.

    The SAPGUI_ACTIVEX flag allows for screens with ActiveX controls information to pass between the R/3 application server and the SAP GUI Front (screens).

  3. You or the end user of your application must log onto the R/3 system manually, that is, using the SAP Logon dialog interactively.
  4. You can capture user actions at the SAP GUI screens, by getting the various events. Note, that data on any ActiveX controls on the screen is not captured. Only data of other controls is available to you through the event and related structures.
  5. You cannot send any of the events to R/3 or to Front.

  6. You or the end user must manually log off the session.