Office Integration Implementation 
When you program office applications to start in the R/3 window, the interface i_oi_container_control is used to create and manage any further objects for Desktop Office Integration. To create an instance for this object:
Declaration
1. Your data declaration section must begin with the following declarations:
TYPE-POOLS soi.
CLASS c_oi_errors DEFINITION LOAD.
The type pool contains important constants and type definitions. The class definition is used for error handling from the method calls of the Desktop Office Integration.
DATA control TYPE REF TO i_oi_container_control.
DATA: document TYPE REF TO i_oi_document_proxy.
If you are working with the Link Server:
DATA: link_server TYPE REF TO i_oi_link_server.
If you are working with the Table Collection:
DATA: table_coll TYPE REF TO i_oi_table_collection.
Initialization

The following steps must only occur once in your program.
CALL METHOD c_oi_container_control_creator=>get_container_control
IMPORTING control = control
retcode = retcode.
container:
DATA: container TYPE REF TO cl_gui_custom_container.
CREATE OBJECT container
EXPORTING container_name = 'CONTAINER'.
CALL METHOD control->init_control
EXPORTING r3_application_name = 'Demo Document Container'
inplace_enabled = 'X'
parent = container
IMPORTING retcode = retcode.
CALL METHOD control->get_document_proxy
EXPORTING document_type = document_type
document_format = document_format
IMPORTING document_proxy = document
retcode = retcode.
·
The Word Processor Interface·
The Form Interface·
The Mail Merge Interface·
The Script Collection·
The Table InterfaceProcessing
Closing
CALL METHOD container->free.

Remember that you should include
When you destroy object and interface instances in Desktop Office Integration, remember that ABAP Objects, unlike other object-oriented languages, has no destructors. This means that when you release the i_oi_container_control instance using the FREE statement, only the memory space on the application server is released. The SAPgui controls and documents on the presentation server are not destroyed. For this reason, you should always call the methods that destroy the SAPgui controls and close the documents.

Any parameters not contained in the individual method descriptions are listed under
Generic Parameters.