Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Open Acrobat Reader with PDF table content

Former Member
0 Kudos

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

7 REPLIES 7

naimesh_patel
Active Contributor
0 Kudos

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

0 Kudos

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

Former Member
0 Kudos

hi Martin,

You can have a look at this SAP Demo Program SAP_PDF_VIEWER_DEMO.

May be you will get an idea.

0 Kudos

this sap_pdf_viewer_demo gives a dump  

any other ideas how to solve this issue ?

br Martin

0 Kudos

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.

0 Kudos

That does the same thing as what I proposed - -- Download the content in the local folder and call method EXECUTE to display ..

But I think, Martin is looking for something else ..

Regards,
Naimesh Patel

0 Kudos

downloading to a local folder is NOT allowed due to security issues. this is not an option