cancel
Showing results for 
Search instead for 
Did you mean: 

OTF Module: Failed to output print data

veeranjaneyulub
Explorer
0 Kudos

hi all,

while seeing output on the screen i am getting this error on the status bar:

"OTF Module: Failed to output print data"

any one can help me in this regard why this error is coming i am working on ECC.6

Accepted Solutions (1)

Accepted Solutions (1)

former_member196280
Active Contributor
0 Kudos

Check this may give you some idea to solve your issue...

Rough idea

**Set printer parameters

control_param-no_dialog = 'X'.

control_param-preview = ''.

control_param-getotf = 'X'.

output_opt-tddest = 'LOCL'.

output_opt-tdimmed = ''.

output_opt-tdnewid = ''.

output_opt-tdnoprint = ''.

output_opt-tdnoprev = 'X'.

      • Get smartform name

call function 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = formname

variant = ' '

direct_call = ' '

IMPORTING

fm_name = fm_name

EXCEPTIONS

no_form = 1

no_function_module = 2

others = 3.

if sy-subrc <> 0.

message id sy-msgid type sy-msgty number sy-msgno

with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

endif.

Call smartform

call function fm_name

EXPORTING

control_parameters = control_param

output_options = output_opt

user_settings = ' '

wa_head = wa_head

IMPORTING

job_output_info = job_info

TABLES

int_detail = int_detail

EXCEPTIONS

formatting_error = 1

internal_error = 2

send_error = 3

user_canceled = 4

others = 5.

Note pass the job info file you got from above function module

data: int_docs type standard table of docs,

int_line type standard table of tline.

call function 'CONVERT_OTF_2_PDF'

IMPORTING

bin_filesize = filesize

TABLES

otf = job_info-otfdata

doctab_archive = int_docs

lines = int_line

EXCEPTIONS

err_conv_not_possible = 1

err_otf_mc_noendmarker = 2

others = 3.

USE below function module

all method cl_gui_frontend_services=>gui_download

exporting

bin_filesize = filesize

filename = filename

filetype = 'BIN'

changing

data_tab = int_line

Regards,

SaiRam

Answers (0)