07-01-2015 12:57 PM
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
07-01-2015 1:11 PM
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.
07-01-2015 1:11 PM
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.
07-01-2015 1:16 PM
Praveer,
please read my posting i mentioned that i know that ! The question is about how to open the PDF ?
br Martin
07-01-2015 1:24 PM
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.
07-01-2015 1:35 PM
hi ,
this demo program is not working, it dumps.
what do you mean by "local System" ?
br Martin
07-01-2015 1:41 PM
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.
07-01-2015 3:36 PM
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