Show TOC

Link ServerLocate this document in the navigation structure

Use

You define it with reference to the interface i_oi_link_server.

The link server manages the objects of the SAP system (internal tables, fields, documents, graphics,...) that are integrated in the office application when the program is executed. The link server also provides methods for managing and creating links to the office application.

The instance contains the SAP system objects that users can incorporate in the office documents. You also save a list of permitted objects on the link server.

Prerequisites

Before proceeding, you must create a central instance of type i_oi_container_control for Managing Desktop Office Integration.

Process
  1. Initialization

    Declare an instance with reference to interface i_oi_link_server:

    data: link_server type ref to i_oi_link_server.

  2. Use the method get_link_server on the central object for Desktop Office Integration control to create an instance for the link server.

  3. Start the link server with method start_link_server.

  4. Document Design Phase

    Use the methods add_string_item, add_table_item and add_binary_item to add items to the link server. Use the method remove_link_item to delete items from the link server.

    Caution

    Before opening the document, you must declare all of the links that you will use in it to the link server.

  5. The data in the link server is placed on the clipboard of the desktop application using the copy_link_item_to_clipboard method.

  6. Document Runtime

    If you have changed the data in your application program, and need to update it in the desktop application, use the methods add_string_item, add_table_item, and add_binary_item to update them.

  7. Before you leave your program, use the method stop_link_server to switch off the link server and release the memory area.

Note

The links are only updated when you pass the link that you want to update using one of the methods add_string_item, add_table_item2, add_table_item, and add_binary_item.

Note

Remember that you should include error handling after each method call.