Skip to Content
author's profile photo Former Member
Former Member

BSP : open pdf file in new window from network folder

Hi all,

in BSP i need to open in a new window a PDF file situated in a network folder.

Any idea or sample code ?

Thank a lot for any help.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Sep 17, 2015 at 07:34 AM


    If you have a pdf file somewhere on the server running BSP (something like /tempdata/abcd.pdf),

    you can create in BSP a reference TAG that points directly to the file, with a full path declaration.

    When the user click on the reference tag (as in HTML), it will open the pdf file automatically in the local PC.

    Hope to help


    Add a comment
    10|10000 characters needed characters exceeded

    • Hi.

      You can try something like this


      data p_image type ref to cl_htmlb_image.

      data: p_image_string type string.

      create object p_image.

      p_image->id = `PDFLink`.

      p_image->src = cl_bsp_mimes=>sap_icon( `ICON*` ). "Put your image

      p_image->tooltip = ``.

      clear p_image_string.

      p_image_string = p_image->IF_BSP_BEE~RENDER_TO_STRING( page_context ).


      <htmlb:button id = "PDFLink"

      encode = "FALSE"

      text = "<%= p_image_string %> &nbsp <OTR>your referenced file</OTR>" />

      Hope to help

  • Posted on Sep 17, 2015 at 08:31 AM
    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.