cancel
Showing results for 
Search instead for 
Did you mean: 

Smartform generated in background, print preview problem

Former Member
0 Kudos

Hi,

I have a CALL TRANSACTION in mode 'E' to a program which calls smartforms.

When I run the program directly, the print preview works perfect.

When I run the program from another program by "CALL TRANSACTION" the print preview goes on the text mode, all the print is not formatted as normally and displayed just a text of a printout instead of white background and fonts.

The only difference I spotted is the sy-binpt variable which obviously is 'X' in CALL TRANSACTION mode.

How to solve that problem?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello ,


w_ctrlop-no_dialog = 'X'.
w_compop-tdnoprev  = 'X'.
 
call function v_form_name
  exporting
    control_parameters = w_ctrlop
    output_options = w_compop
    user_settings = 'X'
  importing
    job_output_info = w_return
  exceptions
    formatting_error = 1
    internal_error = 2
    send_error = 3
    user_canceled = 4
    others = 5.
  if sy-subrc  0.
    message id sy-msgid type sy-msgty number sy-msgno
    with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  endif.

Please pass this 2 parameters "control_parameters" and "output_options"

and mark " user_settings" as 'X'. and check whether the output comes or not.

Hope above discussion was helpful to you.

Cheers,

Suvendu

Answers (1)

Answers (1)

Former Member
0 Kudos

hi

try this

data : control type ssfctrlop

output_options type ssfcompop.

call FM 'SSF_FUNCTION_MODULE_NAME'.

control-preview = 'X'.

control-no_open = 'X'.

control-no_close = 'X'.

output_options-tddest = 'LP01' "Default Printer name

call FM 'SSF_OPEN'

exporting

output_options = output_options

control_parameters = control.

call fm 'v_formname'

call fm 'ssf_close.

Regards