Architecture 

R/3 Architecture

Explanation

All desktop applications to be controlled by ABAP must be registered in the R/3 system. In this case, they are stored in table TOLE. To maintain the registration table, use transaction SOLE. Table TOLE also tells whether type information exists for an application. Type information describes all objects of an application and can be loaded into the R/3 system using transaction SOLI. The system then stores it in table OLELOAD.

The ABAP program uses OLE keywords to access the desktop application. Internally, these ABAP statements are calls to function modules, passed on to the SAPGUI.

The ABAP program communicates with the SAPGUI via RFC.

Thus, the SAPGUI is the actual OLE client. In the SAPGUI, special C functions are implemented that can be accessed from within ABAP using RFC calls with the destination "SAPGUI". These functions form an RFC library within the SAPGUI.

Finally, WINDOWS starts the Automation server application: MS EXCEL in our case.

Architecture à Steps to Perform

For the program example, these steps are required:

  1. Using transaction SOLE to check whether the desktop application is registered.
  2. Defining local OLE objects.
  3. Calling function module RFC_CUSTOMER_GET and filling an internal table with output values.
  4. Initializing the OLE objects according to the object hierarchy.
  5. Starting the EXCEL application.
  6. Filling the table with output values from the internal table.
  7. Closing EXCEL and returning to ABAP.
  8. Releasing the OLE objects.