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: 

Is it possible to preview a smartform and simultaneously download the pdf?

Former Member
0 Kudos
380

Hello friends,

Is it possible to view the smartform (as in print/preview) and simultaneously download the pdf also?

I'm able to do only one of them.

if comment this statement, i'm able to view the SF directly but not able to download pdf.

LS_CONTROL_PARAMETERS-GETOTF = 'X'.

Anyone have a solution for this?

1 ACCEPTED SOLUTION

Former Member
0 Kudos
138

Hi Arun,

One Good Idea is call ur smartform 2 times. First One u call without setting LS_CONTROL_PARAMETERS-GETOTF. then u can preview ur smartform.

Now in event for back button u can call ur smartform for the second time with LS_CONTROL_PARAMETERS-GETOTF = 'X'. and other options like no_dialog or no_preview set.

Hope this solves ur problem.

Awrd Points if useful

Bhupal

7 REPLIES 7

Former Member
0 Kudos
138

Hi,

fisrt we just look the preview and then convert PDF format.

by using the standard program RSTXPDFT4.

it will convert the smartform inot pdf.

if it is helpful. please reward points,

regards,

satish.

0 Kudos
138

for RSTXPDFT4 to work, i need to create spool request, which i don't want to do..

thank you.

Former Member
0 Kudos
139

Hi Arun,

One Good Idea is call ur smartform 2 times. First One u call without setting LS_CONTROL_PARAMETERS-GETOTF. then u can preview ur smartform.

Now in event for back button u can call ur smartform for the second time with LS_CONTROL_PARAMETERS-GETOTF = 'X'. and other options like no_dialog or no_preview set.

Hope this solves ur problem.

Awrd Points if useful

Bhupal

0 Kudos
138

Cool, it works!

10 points to you!

Former Member
0 Kudos
138

for downloading smartform in to PDF use function module

'CONVERT_OTF_2_PDF'

Former Member
0 Kudos
138

Hi,

if we call the function module twice then u can c the PDF output and as well as send it to email as attachment.

Try it.

If u satisfy reward points.

Thank you,

chandu

Former Member
0 Kudos
138

hi arun,

do you mean that when ever print preveiw is activated, a .pdf file will be genrated?

-maharshi