cancel
Showing results for 
Search instead for 
Did you mean: 

Smartform to PDF format

Former Member
0 Kudos

Hi All,

i have a requirement to convert the smartform into a PDF file.

So far this is what I have

w_cparam-no_dialog = 'X'.

W_CPARAM-PREVIEW = SPACE. "

W_CPARAM-GETOTF = 'X'.

w_outoptions-tddest = 'LP01'.

CALL FUNCTION W_FMODULE

EXPORTING

  • ARCHIVE_INDEX =

  • ARCHIVE_INDEX_TAB =

  • ARCHIVE_PARAMETERS =

CONTROL_PARAMETERS = W_CPARAM

  • MAIL_APPL_OBJ =

  • MAIL_RECIPIENT =

  • MAIL_SENDER =

OUTPUT_OPTIONS = W_OUTOPTIONS

  • USER_SETTINGS = 'X'

IMPORTING

  • DOCUMENT_OUTPUT_INFO =

JOB_OUTPUT_INFO = T_OTF_FROM_FM

  • JOB_OUTPUT_OPTIONS =

TABLES

TBL_AMT = FINAL_TAB

EXCEPTIONS

FORMATTING_ERROR = 1

INTERNAL_ERROR = 2

SEND_ERROR = 3

USER_CANCELED = 4

OTHERS = 5

and then i have the convert OTF func module and GUI download to download the pdf.

The smartform is getting downloaded in pdf format BUT

i want to be able to do a print preview also. With the code above, I am not able to do it.

i am also unable to print the smartform. When the print screen popup comes up, i hit the print button but immediately, the file dialog box came up and asked me for the destination of the file.

The only way I am able to print is by opening the pdf file and hitting the print button.

Cn you please suggest me some modifications so as to be able to get a print preview and print option.

Thanks!

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos
Former Member
0 Kudos

hi Narayana,

I want to be able to do it within the program and not externally.

Download is working fine but id like the print preview option as well.

thanks!

Sandeep

Former Member
0 Kudos

Hi,

when you give for printing prit preview will not available, And when you give for print preview you will not get spool n umber and you can't down,lolad the attachment. If you want to see the preview when you give for printing then agian call the FM immediately after downloded the form by passing print preview = 'X' and W_CPARAM-GETOTF = ' '..

Reward points if useful.

Regards,

Nageswar

Edited by: Nageswar Vattikuti on Mar 26, 2008 10:01 AM

Former Member
0 Kudos

Hi ,

A simple way of converting smartforms to PDF can be find at the following link.

[http://help.sap.com/saphelp_nw2004s/helpdata/en/16/a369b1800e4bdda978ee0fe3b7bd2c/content.htm]

<REMOVED BY MODERATOR>

thanks and rewards.

Edited by: Alvaro Tejada Galindo on Mar 25, 2008 7:23 PM