Start of Content Area

Procedure documentation Implementing Output Using the KPro PHIO-URL

Use

For every PHIO, the KPro uses the function module SDOK_PHIO_GET_URL_FOR_GET to provide one or more URLs which provide the PHIO’s content. If this URL is used on an HTML page as a link, make sure that this URL does not refer to the BSP application’s HTTP handler. If the WEB_APPLIC_SERVER_URL_ONLY is set, the URL always points to an HTTP handler of the system on which the BSP application is running.

Caution

This does not apply to default users defined for the BSP application.

Procedure

  1. In your BSP application, create a page with flow logic.
  2. In the example, we have used the name fileLink.htm.

  3. Define the two page attributes that are required for the page:
  4. Attribute

    Auto

    Typing Type

    Reference Type

    Description

    urls

     

    TYPE

    SDOKCOMPURLS

    URLs of all PHIO files

    phio_guid

    x

    TYPE

    STRING

    Unique ID of PHIO

  5. Create the coding for initializing the page:
  6. data: id type SDOKOBJECT.

     

    id-class = 'SAMPLEPHIO'.

    id-objid = phio_guid.

     

    CALL FUNCTION 'SDOK_PHIO_GET_URL_FOR_GET'

    EXPORTING

    OBJECT_ID = id

    WEB_APPLIC_SERVER_URL_ONLY = 'X'

    STANDARD_URL_ONLY = 'X'

    IMPORTING

    URLS = urls.

    In exceptional cases, for performance reasons the indicator cannot be set so that it receives the most direct URL to the content. In the case of an external content server, this points to a completely different server, however, which must then also be directly available from the browser and must not require any signed URLs with limited validity. The advantage of this is that data is not forwarded by the application server and large files can be streamed.

  7. Create the coding for the layout for the page:
  8. <%@ page language="abap" %>

    <html>

    <body>

    <% data: wa like line of urls.

    loop at urls into wa.%>

    Click on this <a href="<%=wa-url%>"> File </a> ! <br>

    <% endloop. %>

    </body>

    </html>

  9. Save, activate and test your page.

 

 

 

End of Content Area