cancel
Showing results for 
Search instead for 
Did you mean: 

Smartform to PDF problem.

Former Member
0 Kudos

Hi experts,

I am having problem in converting my Custom smartform to PDF.I have developed a custom Smartform and a custom print program for the PO.

GT_OTF = GT_OTFDATA-OTFDATA.

CLEAR GT_PDF_TAB.

GT_OTFDATA i get from the smartform function module from the import parameter "JOB_OUTPUT_INFO"..

CALL FUNCTION 'CONVERT_OTF'

EXPORTING

FORMAT = 'PDF'

MAX_LINEWIDTH = 132

IMPORTING

BIN_FILESIZE = GV_BIN_SIZE

TABLES

OTF = GT_OTF

LINES = GT_PDF_TAB

EXCEPTIONS

ERR_MAX_LINEWIDTH = 1

ERR_FORMAT = 2

ERR_CONV_NOT_POSSIBLE = 3

ERR_BAD_OTF = 4

OTHERS = 5.

IF SY-SUBRC <> 0.

ENDIF.

The problem is ..When i use the FM "CONVERT_OTF" to convert my smartform to PDF, GT_OTF field is blank. I checked the function module that triggers the smartform, GT_OTFDATA is empty.So not able to convert the smartform to PDF.

Please help.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

c_par-no_dialog = 'X'.

c_par-preview = space.

c_par-getotf = 'X'----


>check it out(if this is passed only ur o/p will be in otf table)

out_opt-tddest = 'EPSON-COMMON'.

CALL FUNCTION fm_name

EXPORTING

control_parameters = c_par

output_options = out_opt

user_settings = space

vbeln = it_vbeln-vbeln

pdf = r2

rbiclear = c3

IMPORTING

job_output_info = opt

einv = einv.

i_otf = opt-otfdata.

Former Member
0 Kudos

Hi Shan,

Thanks a lot.