Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

smartform output in OTF Format error

Hi,

I want to get the smartform output as OTF format.This data later i will convert to PDF format. The problem now is even though i passed the following code to my smartform function module, still when i execute the program i am getting the popup to enter output device.if i give the printer name as LP01 and press print button,i am getting the the output in OTF format in the table.How to avoid this popup.if i close that popup without giving printer name,my smartform function module is not successful. That means i am not getting the data in the OTF table. Please help me.

w_control_param-getotf = 'X'.

w_control_param-no_dialog = 'X'.

w_composer_param-tdnoprev = 'X'.

CALL FUNCTION v_fm_name

EXPORTING

control_parameters = w_control_param

output_options = w_composer_param

user_settings = 'X'

IMPORTING

job_output_info = v_job_info

EXCEPTIONS

formatting_error = 1

internal_error = 2

send_error = 3

user_canceled = 4

OTHERS = 5.

IF sy-subrc <> 0.

Message E000 with 'Cannot convert to OTF Format'.

ENDIF.

i_otfdata[] = v_job_info-otfdata[].

Regards

Shibin

Tags:
Former Member
Former Member replied

Hi Shibin ,

If u are getting POP-UP even after setting the the configurations

w_control_param-getotf = 'X'.

w_control_param-no_dialog = 'X'.

w_composer_param-tdnoprev = 'X'.

Then the issue could well be with the user configuration .

Do the following steps from the menu :

System -> user profile -->Own Data

Select Defaults Tab , then check if u have given OutputDevice .

Once u give this detail , your code will work fine .

I think this will solve your problem

Regards

Arun

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question