cancel
Showing results for 
Search instead for 
Did you mean: 

Print Preview in smartforms

Former Member
0 Kudos

Hi All,

I have a requirement to preview the smartform converted pdf before downloading it into the specified location.

I have used the FM CONVERT_OTF and GUI_DOWNLOAD to convert the smartform into the PDF and download the same.

Kindly help.

Regards,

Manjusha S

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi,

Get the spool request and use the program 'RSTXPDFT4' to download the data into PDF format.

Hope this will help you.

Regards,

Venkat.

Former Member
0 Kudos

Hi,

Get the OTF data from Smartform Function Module & pass it to the below FM...

call function 'SSFCOMP_PDF_PREVIEW'

exporting

i_otf = otf[]

exceptions

convert_otf_to_pdf_error = 1

cntl_error = 2

others = 3.

Hope it helps!!

Rgds,

Pavan

Former Member
0 Kudos

Hi,

In your requirement you do one condition check like the following. Write the below code in driver program.

If sy-ucomm = 'PROC'.

  • PDF Convertion code & saving to the location.

elseif sy-ucomm = 'VIEW'.

  • call the smartform function module.

endif.

PROC --> function code of print button in VF31

VIEW --> function code of preview button in VF31

But while you are seeing preview , you have to set the control parameter of smart form function module.

i.e., wa_ctrl-preview = 'X'.

This control parameter you have to pass to smart form function module call.

Thanks and regards,

Venkat

Former Member
0 Kudos

Hi,

if u want to view the smartform than put a break-point just before the FM CONVERT_OTF and view your smartform.

or use the FM PRS_GET_PRINTPREVIEW

RSRAS_DISPLAY_PREVIEW

let me know the output...

thanks

Ravi

Former Member
0 Kudos

Hi,

use the below method --

call method cl_gui_frontend_services=>execute
  exporting
    document               = full_path

Regards,

Pankaj

Former Member
0 Kudos

Hi,

Try using function module SSFCOMP_PDF_PREVIEW. Pass the OTF data sa input

Regards