Purpose
Embed a PDF into the SAP GUI window via a pushbutton

Solution

  1. Use Pushbutton ... process=... to add a button that starts an InputScript
  2. In the InputScript, set a status variable
  3. In the GuiXT script query the status variable and embed the PDF with Control



Example
We add a button in the initial screen of VA01 that makes work instructions available to the user, embedded into the SAP GUI screen:




GuiXT Script

if V[va01.showPDF]
  Pushbutton (toolbar) "@5E@Hide Instructions" process="display_pdf.txt"
      using showPDF = ""

  Control (0,67) (32,160) progID="file://va01.instructions.pdf" name="mypdf"

else

Pushbutton (toolbar) "@5E@Instructions" process="display_pdf.txt"
    using showPDF = "X"

endif

InputScript "display_pdf.txt"

Parameter showPDF

// X= Show PDF, else hide it
Set V[va01.showPDF] "&U[showpdf]"

Return

 

 

Remarks

You may specify an absolute path for the PDF, a web URL, a file from SAP Web or Mime Repository, or a relative path which then refers to the script directory.

Components
InputAssistant