05-27-2015 5:01 PM
Hi there,
i have an function module which returns a PDF as "binary content", see bolded export parameter..
FUNCTION ptrm_web_form_pdf_get.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*" IMPORTING
*" VALUE(I_EMPLOYEENUMBER) LIKE BAPIEMPL-PERNR
*" VALUE(I_TRIPNUMBER) LIKE BAPITRIP-TRIPNO
*" VALUE(I_PERIODNUMBER) LIKE BAPITRVXXX-PERIOD DEFAULT '000'
*" VALUE(IV_VERSION_TRIP_COMPONENT) TYPE PTRV_TRIP_COMPONENT
*" OPTIONAL
*" VALUE(IV_VERSION_NUMBER) TYPE PTRV_VERSION_NUMBER OPTIONAL
*" VALUE(I_TRIP_COMPONENT) TYPE PLAN_REQUEST DEFAULT SPACE
*" VALUE(I_TRIP_DATA_SOURCE) TYPE PTRV_WEB_SOURCE DEFAULT 'DB'
*" VALUE(I_DISPLAY_FORM) TYPE XFELD DEFAULT SPACE
*" VALUE(I_LANGUAGE) LIKE BAPITRVXXX-LANGU DEFAULT SY-LANGU
*" EXPORTING
*" VALUE(E_PDF_FORM) TYPE FPCONTENT
*" TABLES
*" ET_RETURN TYPE BAPIRETTAB
*"----------------------------------------------------------------------
Now to my question: is there a function module or method in some class where i can open acrobat reader and display the PDF inside acrobat reader ? (Like opening an PDF in the GOS (generic object services))
br Martin
05-27-2015 5:41 PM
You can simply download the PDF content on local temporary location ( C:\temp ) using CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD and display it using the CL_GUI_FRONTEND_SERVICES=>EXECUTE.
Another solution could be to integrate the PDF into WebDynpro - A Simple Web Dynpro Application to display a pdf file in the browser window - Web Dynpro ABAP - SCN ...
Regards,
Naimesh Patel
05-27-2015 6:56 PM
thanks for the hints, but:
The 2 methods you mentioned are not suitable due following reasons:
A GUI_DOWNLOAD to local directory is a big problem. I have thousands of citrix-Users, so i don't know where i should download the data temporary. and this is a security issue, as this pdf's are very sensible with sensible data. so i have thousands of temp. pdf files downloaded sometimes.
So the question is: is there a possibility to do this CL_GUI_FRONTEND_SERVICES=>EXECUTE WITHOUT downloading the file localy ? Or any other method/function module to open the pdf without downloading it before ?
Option 2 is not suitable. i don't want to code an Z-application for such an "simple" task, there has to be standard way
regards, Martin
05-27-2015 7:24 PM
hi Martin,
You can have a look at this SAP Demo Program SAP_PDF_VIEWER_DEMO.
May be you will get an idea.
06-01-2015 9:38 PM
this sap_pdf_viewer_demo gives a dump
any other ideas how to solve this issue ?
br Martin
06-01-2015 10:14 PM
Hi Martin,
Try using this class CL_GOS_DOCUMENT_SERVICE, there are methods, method display_attachment useful for you, probably!
Your can test method reading data from SRGBTBREL table.
Regards.
06-01-2015 10:30 PM
06-02-2015 8:33 AM
downloading to a local folder is NOT allowed due to security issues. this is not an option