Purpose Embed a PDF into the SAP GUI window via a pushbutton
Solution
Use Pushbutton ... process=...
to add a button that starts an InputScript
In the InputScript, set a status variable
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
GuiXT
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"
GuiXT
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.