cancel
Showing results for 
Search instead for 
Did you mean: 

Print preview doesn't show up

snursalim
Participant
0 Kudos

Hi all,

To suppress the print dialog when printing multiple forms in one program, i do this:

 
DATA: ld_size_pernr TYPE i.
  DESCRIBE TABLE t_pernr LINES ld_size_pernr.

  LOOP AT t_pernr INTO wa_pernr.
    "Control spool parameter.
    IF sy-tabix = 1.
      d_control_parameters-no_open = space.
      d_control_parameters-no_close = 'X'.
      d_control_parameters-preview = 'X'.
    ELSEIF sy-tabix EQ ld_size_pernr.
      d_control_parameters-no_open = 'X'.
      d_control_parameters-no_close = space.
      d_control_parameters-preview = 'X'.
    ELSE.
      d_control_parameters-no_open = 'X'.
      d_control_parameters-no_close = 'X'.
      d_control_parameters-preview = 'X'.
    ENDIF.

.
      PERFORM f_print_report.

    PERFORM f_clear_variable.
  ENDLOOP.

Later on the d_control_parameters is passed to the smartforms

But because of this thing, print preview shows nothing and return to my selection screen after I pressed that. I've set the preview dialog as 'X' so it would shows up, but it stills doesn't shows up. I could still see the print request from sp01 though.

is there any solution for this problem?

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

hi,

i have one dought, why u are using print statements in the loop.

in smartforms we can pass all tables at a time.

avoid to call smartform for several times by passing in loop. u can write ur conditions inside the smartform. that time you need not to give print parameters, the print program automaticlly calls only one one dialog box before print, because ur calling the smart form at a time make loop conditions inside the smart form by passing all tables into smart form.

regds:

rajesh.k

Former Member
0 Kudos

Hi Suwardi,

data:
   w_ctrlop type ssfctrlop,
   w_compop type ssfcompop,
   w_return type ssfcrescl.

w_ctrlop-getotf = 'X'.
w_ctrlop-no_dialog = 'X'.
w_compop-tdnoprev = 'X'.

Regards,

Sravanthi

snursalim
Participant
0 Kudos

Hi sravanthi,

are you sure, because when i look at the structure and tdnoprev means no print preview? :S

Edited by: Suwardi Nursalim on Feb 9, 2009 5:59 AM

Former Member
0 Kudos

Hi... first check whether data is available to for printing. if available then no need to pass all this output parameters. Default it'll show u print preview option.

Regards,

KP

snursalim
Participant
0 Kudos

Hi,

I think you misunderstood my problem.

I need to pass all those control parameter especially:

no_open and no_close to control the spool output. But now as I tried to control them, i'm missing my print preview functionality. Then i tried to put the control parameters-preview as 'X' trying to branch the program to print preview. But it still doesn't work.

What do I have to do to make the print preview function works.