Skip to Content
avatar image
Former Member

Open Acrobat Reader with PDF table content

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • May 27, 2015 at 04: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 Wiki

    Regards,
    Naimesh Patel

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

  • avatar image
    Former Member
    May 27, 2015 at 06: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.

    Add comment
    10|10000 characters needed characters exceeded