<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: avoid print dialog in smartforms in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/avoid-print-dialog-in-smartforms/m-p/1359162#M178614</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Naren,&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt;.You need to remove SSF_OPEN and SSF_CLOSE.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;2&amp;lt;/b&amp;gt;.Define 2 variables &lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt;num_1 TYPE i,&lt;/P&gt;&lt;P&gt;num_2 TYPE sy-tabix. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DESCRIBE TABLE it_table LINES num_1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT it_table.&lt;/P&gt;&lt;P&gt;num_2 = sy-tabix.&lt;/P&gt;&lt;P&gt;CASE num_2.&lt;/P&gt;&lt;P&gt;WHEN 1.&lt;/P&gt;&lt;P&gt;control_parameters-no_open = ' '.&lt;/P&gt;&lt;P&gt;control_parameters-no_close = 'X'.&lt;/P&gt;&lt;P&gt;WHEN num_1.&lt;/P&gt;&lt;P&gt;control_parameters-no_open = 'X'.&lt;/P&gt;&lt;P&gt;control_parameters-no_close = space.&lt;/P&gt;&lt;P&gt;WHEN OTHERS.&lt;/P&gt;&lt;P&gt;control_parameters-no_open = 'X'.&lt;/P&gt;&lt;P&gt;control_parameters-no_close = 'X'.&lt;/P&gt;&lt;P&gt;ENDCASE.&lt;/P&gt;&lt;P&gt;IF num_1 = 1.&lt;/P&gt;&lt;P&gt;CLEAR: control_parameters.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;control_parameters-langu = sy-langu.&lt;/P&gt;&lt;P&gt;control_parameters-no_dialog = 'X'.&lt;/P&gt;&lt;P&gt;control_parameters-preview = 'X'.&amp;lt;b&amp;gt;with print priview&lt;/P&gt;&lt;P&gt;or&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;control_parameters-preview = 'X'.&amp;lt;b&amp;gt;Without print priview.This is direct printing&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION fm_name&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;    EXPORTING&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ARCHIVE_INDEX              =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ARCHIVE_INDEX_TAB          =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ARCHIVE_PARAMETERS         =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   control_parameters          = control_parameters&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  MAIL_APPL_OBJ              =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  MAIL_RECIPIENT             =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  MAIL_SENDER                =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   output_options             = gv_output&lt;/P&gt;&lt;P&gt;   user_settings              = space&lt;/P&gt;&lt;P&gt;   gv_agmt                    = p_agr&lt;/P&gt;&lt;P&gt;   gv_dist                    = gs_distributors-kunnr&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  DOCUMENT_OUTPUT_INFO       =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  JOB_OUTPUT_INFO            =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  JOB_OUTPUT_OPTIONS         =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;lt;b&amp;gt; EXCEPTIONS&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;   formatting_error           = 1&lt;/P&gt;&lt;P&gt;   internal_error             = 2&lt;/P&gt;&lt;P&gt;   send_error                 = 3&lt;/P&gt;&lt;P&gt;   user_canceled              = 4&lt;/P&gt;&lt;P&gt;   OTHERS                     = 5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;3&amp;lt;/b&amp;gt;. You dont need to call GET_PRINT_PARAMETERS for setting printer pararmeters .U can set those in control_parameters structure .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It solves ur problem.&lt;/P&gt;&lt;P&gt;Let me know ,if u have any problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Thanks.&lt;/P&gt;&lt;P&gt;Venkat.O&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 02 Jun 2006 03:18:39 GMT</pubDate>
    <dc:creator>venkat_o</dc:creator>
    <dc:date>2006-06-02T03:18:39Z</dc:date>
    <item>
      <title>avoid print dialog in smartforms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/avoid-print-dialog-in-smartforms/m-p/1359160#M178612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Folks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to avoid print dialog which comes up in smartforms. But my code is not working. Please help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
  EXPORTING
    formname                 = gv_form
*   VARIANT                  = ' '
*   DIRECT_CALL              = ' '
 IMPORTING
   fm_name                  = fm_name
 EXCEPTIONS
   no_form                  = 1
   no_function_module       = 2
   OTHERS                   = 3
          .
IF sy-subrc &amp;lt;&amp;gt; 0.
  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.

gv_control-no_dialog = 'X'.
gv_control-preview   = 'X'.
gv_control-no_open   = 'X'.
gv_control-no_close  = 'X'.
*gv_control-device    = 'LOCL'.

gv_output-tddest = 'LOCL'.

CALL FUNCTION 'SSF_OPEN'
  EXPORTING
*     ARCHIVE_PARAMETERS       =
*     USER_SETTINGS            = 'X'
*     MAIL_SENDER              =
*     MAIL_RECIPIENT           =
*     MAIL_APPL_OBJ            =
    output_options           = gv_output
    control_parameters       = gv_control
*   IMPORTING
*     JOB_OUTPUT_OPTIONS       =
  EXCEPTIONS
    formatting_error         = 1
    internal_error           = 2
    send_error               = 3
    user_canceled            = 4
    OTHERS                   = 5.

IF sy-subrc &amp;lt;&amp;gt; 0.
*   error handling
  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.

LOOP AT gt_distributors INTO gs_distributors.

  CALL FUNCTION fm_name
    EXPORTING
*   ARCHIVE_INDEX              =
*   ARCHIVE_INDEX_TAB          =
*   ARCHIVE_PARAMETERS         =
   control_parameters         = gv_control
*   MAIL_APPL_OBJ              =
*   MAIL_RECIPIENT             =
*   MAIL_SENDER                =
   output_options             = gv_output
   user_settings              = space
   gv_agmt                    = p_agr
   gv_dist                    = gs_distributors-kunnr
* IMPORTING
*   DOCUMENT_OUTPUT_INFO       =
*   JOB_OUTPUT_INFO            =
*   JOB_OUTPUT_OPTIONS         =
 EXCEPTIONS
   formatting_error           = 1
   internal_error             = 2
   send_error                 = 3
   user_canceled              = 4
   OTHERS                     = 5
            .
  IF sy-subrc &amp;lt;&amp;gt; 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.

ENDLOOP.

CALL FUNCTION 'SSF_CLOSE'
*   IMPORTING
*     JOB_OUTPUT_INFO        =
  EXCEPTIONS
    formatting_error       = 1
    internal_error         = 2
    send_error             = 3
    OTHERS                 = 4.

IF sy-subrc &amp;lt;&amp;gt; 0.
*   error handling
  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.

* analyse internal error table of Smart Forms
CALL FUNCTION 'SSF_READ_ERRORS'
  IMPORTING
    errortab = gv_errtab.
IF NOT gv_errtab IS INITIAL.
*   add your handling
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A message is coming at the bottom saying...please main output device in the user master data. How do I maintain?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Naren Somen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Jun 2006 22:27:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/avoid-print-dialog-in-smartforms/m-p/1359160#M178612</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-01T22:27:41Z</dc:date>
    </item>
    <item>
      <title>Re: avoid print dialog in smartforms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/avoid-print-dialog-in-smartforms/m-p/1359161#M178613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Naren,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can maintain the Printer defaults for a user in SU01 transaction. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can call the GET_PRINT_PARAMETERS function to get the defaults for the user and populate them in the SMART Form.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;Note :Please mark the helpful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jun 2006 01:03:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/avoid-print-dialog-in-smartforms/m-p/1359161#M178613</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-02T01:03:43Z</dc:date>
    </item>
    <item>
      <title>Re: avoid print dialog in smartforms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/avoid-print-dialog-in-smartforms/m-p/1359162#M178614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Naren,&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt;.You need to remove SSF_OPEN and SSF_CLOSE.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;2&amp;lt;/b&amp;gt;.Define 2 variables &lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt;num_1 TYPE i,&lt;/P&gt;&lt;P&gt;num_2 TYPE sy-tabix. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DESCRIBE TABLE it_table LINES num_1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT it_table.&lt;/P&gt;&lt;P&gt;num_2 = sy-tabix.&lt;/P&gt;&lt;P&gt;CASE num_2.&lt;/P&gt;&lt;P&gt;WHEN 1.&lt;/P&gt;&lt;P&gt;control_parameters-no_open = ' '.&lt;/P&gt;&lt;P&gt;control_parameters-no_close = 'X'.&lt;/P&gt;&lt;P&gt;WHEN num_1.&lt;/P&gt;&lt;P&gt;control_parameters-no_open = 'X'.&lt;/P&gt;&lt;P&gt;control_parameters-no_close = space.&lt;/P&gt;&lt;P&gt;WHEN OTHERS.&lt;/P&gt;&lt;P&gt;control_parameters-no_open = 'X'.&lt;/P&gt;&lt;P&gt;control_parameters-no_close = 'X'.&lt;/P&gt;&lt;P&gt;ENDCASE.&lt;/P&gt;&lt;P&gt;IF num_1 = 1.&lt;/P&gt;&lt;P&gt;CLEAR: control_parameters.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;control_parameters-langu = sy-langu.&lt;/P&gt;&lt;P&gt;control_parameters-no_dialog = 'X'.&lt;/P&gt;&lt;P&gt;control_parameters-preview = 'X'.&amp;lt;b&amp;gt;with print priview&lt;/P&gt;&lt;P&gt;or&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;control_parameters-preview = 'X'.&amp;lt;b&amp;gt;Without print priview.This is direct printing&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION fm_name&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;    EXPORTING&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ARCHIVE_INDEX              =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ARCHIVE_INDEX_TAB          =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ARCHIVE_PARAMETERS         =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   control_parameters          = control_parameters&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  MAIL_APPL_OBJ              =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  MAIL_RECIPIENT             =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  MAIL_SENDER                =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   output_options             = gv_output&lt;/P&gt;&lt;P&gt;   user_settings              = space&lt;/P&gt;&lt;P&gt;   gv_agmt                    = p_agr&lt;/P&gt;&lt;P&gt;   gv_dist                    = gs_distributors-kunnr&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  DOCUMENT_OUTPUT_INFO       =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  JOB_OUTPUT_INFO            =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  JOB_OUTPUT_OPTIONS         =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;lt;b&amp;gt; EXCEPTIONS&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;   formatting_error           = 1&lt;/P&gt;&lt;P&gt;   internal_error             = 2&lt;/P&gt;&lt;P&gt;   send_error                 = 3&lt;/P&gt;&lt;P&gt;   user_canceled              = 4&lt;/P&gt;&lt;P&gt;   OTHERS                     = 5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;3&amp;lt;/b&amp;gt;. You dont need to call GET_PRINT_PARAMETERS for setting printer pararmeters .U can set those in control_parameters structure .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It solves ur problem.&lt;/P&gt;&lt;P&gt;Let me know ,if u have any problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Thanks.&lt;/P&gt;&lt;P&gt;Venkat.O&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jun 2006 03:18:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/avoid-print-dialog-in-smartforms/m-p/1359162#M178614</guid>
      <dc:creator>venkat_o</dc:creator>
      <dc:date>2006-06-02T03:18:39Z</dc:date>
    </item>
    <item>
      <title>Re: avoid print dialog in smartforms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/avoid-print-dialog-in-smartforms/m-p/1359163#M178615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Naren,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is easy...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: ctrl_param type ssfctrlop,&lt;/P&gt;&lt;P&gt;      out_option type ssfcompop,&lt;/P&gt;&lt;P&gt;      fm_name type rs38l_fnam.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;ctrl_param-preview = 'X'.&lt;/P&gt;&lt;P&gt;out_option-tddest = 'LP01'. " in your case it is LOCL&lt;/P&gt;&lt;P&gt;ctrl_param-no_dialog = 'X'.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    formname                 = gv_form&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  VARIANT                  = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  DIRECT_CALL              = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; IMPORTING&lt;/P&gt;&lt;P&gt;   fm_name                  = fm_name&lt;/P&gt;&lt;P&gt; EXCEPTIONS&lt;/P&gt;&lt;P&gt;   no_form                  = 1&lt;/P&gt;&lt;P&gt;   no_function_module       = 2&lt;/P&gt;&lt;P&gt;   OTHERS                   = 3&lt;/P&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function fm_name&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;control_parameters = ctrl_param&lt;/P&gt;&lt;P&gt;output_options = out_option&lt;/P&gt;&lt;P&gt;user_settings = space&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;tables&lt;/P&gt;&lt;P&gt;itab = itab[]&lt;/P&gt;&lt;P&gt;exceptions&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;SP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jun 2006 04:06:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/avoid-print-dialog-in-smartforms/m-p/1359163#M178615</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-02T04:06:08Z</dc:date>
    </item>
    <item>
      <title>Re: avoid print dialog in smartforms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/avoid-print-dialog-in-smartforms/m-p/1359164#M178616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the replies. They are really helpful. Actually my code is working fine in one client and in other client it is not working. The reason being user01-spld is empty. My code looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT  zagreement                              .

TYPES: BEGIN OF ty_distributors,
         kunnr TYPE kunnr_v,
       END OF ty_distributors.

DATA: gt_distributors TYPE TABLE OF ty_distributors WITH HEADER LINE.
DATA: fm_name TYPE rs38l_fnam,
      gs_distributors TYPE ty_distributors.

DATA: gv_control TYPE ssfctrlop,
      gv_errtab  TYPE tsferror.

DATA: gv_form TYPE tdsfname VALUE 'ZAGREEMENT'.

SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME.
PARAMETER:  p_agr TYPE knuma_ag.
SELECTION-SCREEN: END OF BLOCK b1.

***distributors
PERFORM  get_distributors.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
  EXPORTING
    formname           = gv_form
  IMPORTING
    fm_name            = fm_name
  EXCEPTIONS
    no_form            = 1
    no_function_module = 2
    OTHERS             = 3.
IF sy-subrc &amp;lt;&amp;gt; 0.
  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.

gv_control-no_dialog = 'X'.
gv_control-preview   = 'X'.
gv_control-no_open   = 'X'.
gv_control-no_close  = 'X'.

CALL FUNCTION 'SSF_OPEN'
  EXPORTING
    control_parameters = gv_control
  EXCEPTIONS
    formatting_error   = 1
    internal_error     = 2
    send_error         = 3
    user_canceled      = 4
    OTHERS             = 5.

IF sy-subrc &amp;lt;&amp;gt; 0.
*   error handling
  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.

LOOP AT gt_distributors INTO gs_distributors.
  CALL FUNCTION fm_name
    EXPORTING
      control_parameters = gv_control
      gv_agmt            = p_agr
      gv_dist            = gs_distributors-kunnr
    EXCEPTIONS
      formatting_error   = 1
      internal_error     = 2
      send_error         = 3
      user_canceled      = 4
      OTHERS             = 5.

  IF sy-subrc &amp;lt;&amp;gt; 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.
ENDLOOP.

CALL FUNCTION 'SSF_CLOSE'
  EXCEPTIONS
    formatting_error = 1
    internal_error   = 2
    send_error       = 3
    OTHERS           = 4.

IF sy-subrc &amp;lt;&amp;gt; 0.
*   error handling
  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.

* analyse internal error table of Smart Forms
CALL FUNCTION 'SSF_READ_ERRORS'
  IMPORTING
    errortab = gv_errtab.
IF NOT gv_errtab IS INITIAL.
*   add your handling
ENDIF.

*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  get_distributors
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  --&amp;gt;  p1        text
*  &amp;lt;--  p2        text
*----------------------------------------------------------------------*
FORM get_distributors .

***distributors
  SELECT  kunnr
    FROM  a941
    INTO  TABLE gt_distributors
   WHERE  knuma_ag EQ p_agr.

  IF sy-subrc &amp;lt;&amp;gt; 0.
***no distributors found for this agreement
  ENDIF.

ENDFORM.                    " get_distributors&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your answers are really helpful and I am awarding points to all of them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jun 2006 15:30:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/avoid-print-dialog-in-smartforms/m-p/1359164#M178616</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-02T15:30:52Z</dc:date>
    </item>
  </channel>
</rss>

