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: 

Displaying a PDF File 'In Place'

Former Member
0 Kudos

Hi,

Can SAP display a PDF 'in place' like it can display an Excel spreadsheet 'in place?'

Thanks,

Malini.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Create an SAP Smartform. When you call the Smartfrom you can return OTF data. There is a function module that converts OTF data to PDF format - 'CONVERT_OTF'.

Then you can create a screen that has a container on it. Using the following methods, you can display the PDF:

1. Create a container

2. Create a control that is reference type cl_gui_html_viewer

3. Call method control->load_data

4. Call method control->show data

You can probably do this without the Smartform if you need to. You would just need to figure out how to load the PDF data into SAP.

Reward points if found helpfull...

Cheers,

Siva.

2 REPLIES 2

Former Member
0 Kudos

Hi,

Create an SAP Smartform. When you call the Smartfrom you can return OTF data. There is a function module that converts OTF data to PDF format - 'CONVERT_OTF'.

Then you can create a screen that has a container on it. Using the following methods, you can display the PDF:

1. Create a container

2. Create a control that is reference type cl_gui_html_viewer

3. Call method control->load_data

4. Call method control->show data

You can probably do this without the Smartform if you need to. You would just need to figure out how to load the PDF data into SAP.

Reward points if found helpfull...

Cheers,

Siva.

Former Member
0 Kudos

Hi,

You can use the class CL_GUI_PDFVIEWER to view the pdf.

Regards,

Renjith Michael.