cancel
Showing results for 
Search instead for 
Did you mean: 

print preview in smartform not working ?

former_member186143
Active Contributor
0 Kudos

I have to print a smartform from me9f or me22n. the mail with the smartform as attachment works but If I want to generate a print preview nothing gets visible ??

I get the pop up screen for printing where I can select the preview and then nothing

all the data is passed to the smartform but nothing gets into preview

here is the code that works perfectly


  ls_ssf_control-langu = 'N'.
  ls_ssf_options-tddest     = 'LO02'.
  ls_ssf_control-getotf = 'X'.
  ls_ssf_control-device = 'PRINTER'.

  IF xscreen = 'X'.
    ls_ssf_control-preview = 'X'.
    ls_ssf_control-no_dialog = ' '.
    ls_ssf_options-tdnoprev  = ' '.
    ls_ssf_options-tdimmed  = 'X'.
  ELSE.
    ls_ssf_control-preview = ''.
    ls_ssf_control-no_dialog = 'X'.
  ENDIF.

  CALL FUNCTION fm_name
    EXPORTING
*   ARCHIVE_INDEX              =
*   ARCHIVE_INDEX_TAB          =
*   ARCHIVE_PARAMETERS         =
    control_parameters         = ls_ssf_control
*   MAIL_APPL_OBJ              =
*   MAIL_RECIPIENT             =
*   MAIL_SENDER                =
    output_options             = ls_ssf_options

    USER_SETTINGS              = 'X'
    i_handtekening                = 'ZAUTOGRAPH_BA'
    i_handtekening2               = ''
    IMPORTING
*   DOCUMENT_OUTPUT_INFO       =
     job_output_info            = gs_otfdata
*   JOB_OUTPUT_OPTIONS         =
    TABLES
    it_text                   = gt_tekst
    it_footer_text            = gt_footer_tekst
* 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.

anybody got a clue ?

kind regards

arthur

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Try to add the statement "ls_ssf_control-getotf = ' '." along with the code for "xscreen = 'X'."


  IF xscreen = 'X'.

    ls_ssf_control-getotf       = ' '. 

    ls_ssf_control-preview    = 'X'.
    ls_ssf_control-no_dialog = ' '.
    ls_ssf_options-tdnoprev  = ' '.
    ls_ssf_options-tdimmed  = 'X'.
  ELSE.
    ls_ssf_control-preview = ''.
    ls_ssf_control-no_dialog = 'X'.
  ENDIF.

.

Harish

Answers (1)

Answers (1)

pawan_rai
Participant
0 Kudos

Hi,

Remove below part you will get the print preview option.

IF xscreen = 'X'.
    ls_ssf_control-preview = 'X'.
    ls_ssf_control-no_dialog = ' '.
    ls_ssf_options-tdnoprev  = ' '.
    ls_ssf_options-tdimmed  = 'X'.
  ELSE.
    ls_ssf_control-preview = ''.
    ls_ssf_control-no_dialog = 'X'.
  ENDIF.

regards,

pawan.

Edited by: saprocks123 on Apr 30, 2011 8:38 AM