cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the print preview of smart forms.

Former Member
0 Kudos

When i am converting the smart form into pdf format and attaching it in a mail, i am not able to get the print preview.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Gaurav,

Before calling the function module for conversion to pdf, you need to declare in the following manner:

data: cparam type ssfctrlop,

out_op type ssfcompop.

now to enable the preview popup.

out_op-tddest = 'LP01'.

cparam-no_dialog = ' '.

cparam-preview = 'X'.

cparam-getotf = 'X'.

And perform the following operation:

calling the generated function module

call function fm_name

exporting

control_parameters = cparam

output_options = out_op

(......).

finally

call function 'CONVERT_OTF'.

*Reward Points.

Regards,

-Syed.

Former Member
0 Kudos

i have done the same thing , but still i am not able to see the preview.

it is fine with conversion of smartform in pdf format......and mail has been sent to outbox.

But my requirement is Print preview.

Former Member
0 Kudos

Hi Gaurav,

Did you tried placing a break point while debugging at

out_op-tddest = 'LP01'.

cparam-no_dialog = ' '.

cparam-preview = 'X'.

Under the debugging mode, try to check whether these parameters are getting passed to the function module "Call Function fm_name". Pls do activate the smartform, and also the driver program, everytime when you change the code.

Kindly lemme know what kind of message or information you r getting there.

Reward points if useful,

Regards,

-Syed.

Former Member
0 Kudos

Or else, you can also check in this way.

try to cparam-getotf = ' '. Make this parameter blank and activate and execute it.

Lemme know what is the result.

Regards,

-Syed.

Former Member
0 Kudos

Hi Syed,

I am writing my code plz tell wht's wrong with it.

************Parameters*************

g_params-no_dialog = 'X'.

g_params-preview = 'X'.

g_params-getotf = 'X'.

g_options-tddest = nast-tdreceiver.

g_options-tdnoprev = ' '.

**********Function Call**********

CALL FUNCTION lf_fm_name

EXPORTING

control_parameters = g_params

output_options = g_options

user_settings = 'X'

Importing

job_output_info = g_data

Now plz tell me where i am wrong.

Former Member
0 Kudos

Hi Gaurav,

Just make a correction:

***********Parameters*************

g_params-no_dialog = ' '. "You marked it 'X' to enable the suppressing of preview popup

g_params-preview = 'X'.

g_params-getotf = 'X'.

g_options-tddest = nast-tdreceiver.

g_options-tdnoprev = ' '.

      • If this does not work, then comment out "g_params-getotf = 'X'" and then check.

**********Function Call**********

CALL FUNCTION lf_fm_name

EXPORTING

control_parameters = g_params

output_options = g_options

user_settings = 'X'

Importing

job_output_info = g_data

And moreover, do not forget activating the program and the smartform.

Kindly let me know the result.

Regards,

-Syed.

Former Member
0 Kudos

Hi Syed,

its working now, thanks a lot.

Regards,

Gaurav

Answers (2)

Answers (2)

Former Member
0 Kudos

hi

good

while tesing the smartform enter the printer as lp01 and click the print preview button.

thanks

mrutyun^

Former Member
0 Kudos

hi gaurav,

just excute your smartforms<b> fm</b> to see the privew of smartforms.

regards,

seshu.