Liquid UI - WS Reference Library

1.2.5 Integration with External Documents

Offline has the capability of opening external documents. The supported formats include .TXT and .DOC as well as HTML documents. Documents to be opened must be available within the user's network in order to be opened. Users can create links to documents in SAP. These documents are then available for consultation and use in Offline. This section will cover how Offline works with external documents and how it integrates data with such documents.

External documents should be enabled from a SCR_LABEL using an HREF attribute. In the SAP UI, a link will then be displayed. The link will be used in the SR3GenericFunctionKeyF2DocumentOpen function. The syntax would be as follows:


The syntax for the SCR_ONFKEY is as follows:

{type:SCR_LABEL,label:"Navigate to GuiXT",href:"",position:{row:5,col: 5},fieldname:"guixt_website"},
{type: SCR_ONFKEY,keyid:EVENT_FKEY_DBLCLK,keytooltip:"Open",callback:SR3GenericFunctionKeyF2DocumentOpen}

The callback function for the document event that actually opens the document in question is the SR3GenericFunctionKeyF2DocumentOpen function as shown in the preceding example.

After adding a document link to a screen, the screen in questions would appear as shown below:


As previously stated, in order to achieve the screen shown above, a user would first enter the following code into the relevant script file:

objSelWkdr.addScreen( [
{type:SCR_LABEL,label:"Navigate to GuiXT",label:"Navigate to GuiXT",href:"",position:{row:5,col:5},fieldname:"guixt_website"},
{type:SCR_ONFKEY,keyid:EVENT_FKEY_DBLCLK, keytooltip:"Open",callback:SR3GenericFunctionKeyF2DocumentOpen}
] );

The code can be explained as follows:

  • We created an object named 'objSelWkdr' and used the method 'addScreen' to make our edits to the screen.
  • Using the 'SCR_LABEL' type, we defined the on-screen label, the internal field name, the
    external file to be linked and the on-screen position of the link.
  • Using the 'SCR_ONFKEY' type, we then defined the keyID, the associated tooltip and the
    callback function that actually does the work.