Entering content frameBackground documentation Strategies for Working with the Link Server Locate the document in its SAP Library structure

Remember that when you work with the link server, it is entered in the list of services in Windows. Since all services must be unique, you cannot insert the link server twice with the same name.

This Causes the Following Problems:

When you generate an instance of a link server (start_link_server method), the system checks whether a link server with the same name is already registered. If this is the case, the call fails, and the system returns an error message.

This means that problems can arise with the link server if a user is using several transactions at once that use SAP Desktop Office Integration (and hence the link server).

Solution 1

When you call the method start_link_server, always use the parameter link_server_mode = link_server->link_server_custname and assign an application-related parameter <server_name_suffix>.

Example

CALL METHOD link_server->START_LINK_SERVER

     EXPORTING LINK_SERVER_MODE = link_server->link_server_custname

               SERVER_NAME_SUFFIX = 'FI'

     RECEIVING RETCODE            = retcode.

This means that that the links from the document must have the following format: {LINK SAP.OLELinkServer.ItemObject.<n> "SAPOLELinkServerFI" "<field>" \<format>}

This solution has the restriction that the user cannot run the same transaction twice simultaneously, since in this case, the same name would be assigned to the memory area twice.

Solution 2

When you call the method start_link_server, always use the parameter link_server_mode = link_server->link_server_custname and assign a unique name (for example, GUID or ID of the document in the central repository) to the parameter server_name_suffix.

This solution has the disadvantage that existing links in an initial document must be adapted: {LINK SAP.OLELinkServer.ItemObject.<n> "SAPOLELinkServer<GUID>" "<field>" \<format>}.

The unique name must also be saved with the document, since the same suffix must be used when you subsequently restart the link server to display the document again.

Leaving content frame