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: 

ALV Grid -> PDF -> open in acrobat reader

Former Member
0 Kudos

hi,

i have some z-programs where i need to Change this:

Output is an ALV grid. I want to create a button in this reports which should do the following:

the ALV Output should be converted to PDF-Format Acrobat Reader should be opened (or Acrobat Reader plugin in IE) in separate window where this PDF is displayed to do further things with it (print, Mailing, copy local Version,.......)

Of course i know how to create the button, i know that there are function modules for converting to PDF, etc.... But how can i handle that this window is opened automatic ?

br Martin

1 ACCEPTED SOLUTION

ipravir
Active Contributor
0 Kudos

Hi Martin,

You can add a new button in status bar or in tool bar of the ALV grid.

And you can write the code on click event of the same.

Regards,

Praveer.

6 REPLIES 6

ipravir
Active Contributor
0 Kudos

Hi Martin,

You can add a new button in status bar or in tool bar of the ALV grid.

And you can write the code on click event of the same.

Regards,

Praveer.

Former Member
0 Kudos

Praveer,

please read my posting i mentioned that i know that ! The question is about how to open the PDF ?

br Martin

ipravir
Active Contributor
0 Kudos

Hi Martin,

If you are able to store the PDF file in your local system, then

You can check the SAP_PDF_VIEWER_DEMO program in your system.

Which contains the functionality to displat PDF.

You can use the same way to display PDF.

Regards,

Praveer.

Former Member
0 Kudos

hi ,

this demo program is not working, it dumps.

what do you mean by "local System" ?

br Martin

ipravir
Active Contributor
0 Kudos

Hi Martin,

Actually due to file not found, dump is coming.

could you provide you function module to change ALV to PDF?

If you are getting information in binary table, try to store the PDF file in your working system (Local system) by provide to SAVE AS window. after generate the file you can use cl_gui_pdfviewer class to open PDF file in SAP screen.

or you can use CL_GUI_FRONTEND_SERVICES->EXECUTE method to open the created file (not in SAP screen).

Regards,

Praveer.

Juwin
Active Contributor
0 Kudos
could you provide you function module to change ALV to PDF?

As far as I know, you can't directly convert ALV to PDF. You will have to trigger a spool output from ALV and then convert that spool to PDF. Then download the PDF to frontend and then open that PDF file to view in Acrobat reader.

Thanks,

Juwin