<?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 Smartforms -Changed Default Printer still SPOOL has Default in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms-changed-default-printer-still-spool-has-default/m-p/1526825#M241154</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to Change network printer while setting up a background job for smartform output.When I go to SP02 and try to print It still takes Default Printer.&lt;/P&gt;&lt;P&gt;Attached is the code in Driver program.Let me know if I am doing wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: I tested it with other Programs it works fine.&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           = p_form&lt;/P&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;  ls_composer_param-tdnewid = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT t_header INTO wa_header.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    REFRESH item_itab.&lt;/P&gt;&lt;P&gt;    LOOP AT t_item WHERE kunrg = wa_header-kunnr.&lt;/P&gt;&lt;P&gt;      APPEND t_item TO item_itab.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;sort item_itab by fkdat.&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;        archive_index        = toa_dara&lt;/P&gt;&lt;P&gt;        archive_index_tab    = arc_ind_tab&lt;/P&gt;&lt;P&gt;        archive_parameters   = arc_params&lt;/P&gt;&lt;P&gt;        control_parameters   = ls_control_param&lt;/P&gt;&lt;P&gt;        mail_appl_obj        = ls_recipient&lt;/P&gt;&lt;P&gt;        mail_recipient       = ls_recipient&lt;/P&gt;&lt;P&gt;        mail_sender          = ls_sender&lt;/P&gt;&lt;P&gt;        output_options       = ls_composer_param&lt;/P&gt;&lt;P&gt;        user_settings        = space&lt;/P&gt;&lt;P&gt;        wa_itab              = wa_header&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        document_output_info = document_output_info&lt;/P&gt;&lt;P&gt;        job_output_info      = job_output_info&lt;/P&gt;&lt;P&gt;        job_output_options   = job_output_options&lt;/P&gt;&lt;P&gt;      TABLES&lt;/P&gt;&lt;P&gt;        wa_dep               = item_itab&lt;/P&gt;&lt;P&gt;      EXCEPTIONS&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;&lt;/P&gt;&lt;P&gt;    IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;      WRITE: / 'ERROR in passing vars to the smartforms '.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;    ls_composer_param-tdnewid = space.&lt;/P&gt;&lt;P&gt;    ls_control_param-no_dialog = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Prasad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 Jul 2006 14:53:38 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-07-27T14:53:38Z</dc:date>
    <item>
      <title>Smartforms -Changed Default Printer still SPOOL has Default</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms-changed-default-printer-still-spool-has-default/m-p/1526825#M241154</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to Change network printer while setting up a background job for smartform output.When I go to SP02 and try to print It still takes Default Printer.&lt;/P&gt;&lt;P&gt;Attached is the code in Driver program.Let me know if I am doing wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: I tested it with other Programs it works fine.&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           = p_form&lt;/P&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;  ls_composer_param-tdnewid = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT t_header INTO wa_header.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    REFRESH item_itab.&lt;/P&gt;&lt;P&gt;    LOOP AT t_item WHERE kunrg = wa_header-kunnr.&lt;/P&gt;&lt;P&gt;      APPEND t_item TO item_itab.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;sort item_itab by fkdat.&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;        archive_index        = toa_dara&lt;/P&gt;&lt;P&gt;        archive_index_tab    = arc_ind_tab&lt;/P&gt;&lt;P&gt;        archive_parameters   = arc_params&lt;/P&gt;&lt;P&gt;        control_parameters   = ls_control_param&lt;/P&gt;&lt;P&gt;        mail_appl_obj        = ls_recipient&lt;/P&gt;&lt;P&gt;        mail_recipient       = ls_recipient&lt;/P&gt;&lt;P&gt;        mail_sender          = ls_sender&lt;/P&gt;&lt;P&gt;        output_options       = ls_composer_param&lt;/P&gt;&lt;P&gt;        user_settings        = space&lt;/P&gt;&lt;P&gt;        wa_itab              = wa_header&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        document_output_info = document_output_info&lt;/P&gt;&lt;P&gt;        job_output_info      = job_output_info&lt;/P&gt;&lt;P&gt;        job_output_options   = job_output_options&lt;/P&gt;&lt;P&gt;      TABLES&lt;/P&gt;&lt;P&gt;        wa_dep               = item_itab&lt;/P&gt;&lt;P&gt;      EXCEPTIONS&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;&lt;/P&gt;&lt;P&gt;    IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;      WRITE: / 'ERROR in passing vars to the smartforms '.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;    ls_composer_param-tdnewid = space.&lt;/P&gt;&lt;P&gt;    ls_control_param-no_dialog = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Prasad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jul 2006 14:53:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms-changed-default-printer-still-spool-has-default/m-p/1526825#M241154</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-27T14:53:38Z</dc:date>
    </item>
    <item>
      <title>Re: Smartforms -Changed Default Printer still SPOOL has Default</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms-changed-default-printer-still-spool-has-default/m-p/1526826#M241155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi vara,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;control parameters shub be assigned as..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;ctrl_param-preview = space.&lt;/P&gt;&lt;P&gt;out_option-tddest = 'LP01'. " relevant printer name&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 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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jul 2006 15:28:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms-changed-default-printer-still-spool-has-default/m-p/1526826#M241155</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-27T15:28:04Z</dc:date>
    </item>
    <item>
      <title>Re: Smartforms -Changed Default Printer still SPOOL has Default</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms-changed-default-printer-still-spool-has-default/m-p/1526827#M241156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Vara,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ls_control_param-getotf = ' '.&lt;/P&gt;&lt;P&gt;    ls_control_param-preview = SPACE.&lt;/P&gt;&lt;P&gt;    ls_control_param-device = 'PRINTER'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ls_composer_param-tdimmed = 'X'.&lt;/P&gt;&lt;P&gt;    ls_composer_param-tddest = 'LOCL'.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;    ls_composer_param-rqposname = imp_printer_name.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;    ls_composer_param-no_dialog = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sandeep&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Sandeep Pulavarty&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jul 2006 15:36:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms-changed-default-printer-still-spool-has-default/m-p/1526827#M241156</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-27T15:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: Smartforms -Changed Default Printer still SPOOL has Default</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms-changed-default-printer-still-spool-has-default/m-p/1526828#M241157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I don't want to hard code my Printer name.&lt;/P&gt;&lt;P&gt;I just want to change it while executing this Job in backgorund.&lt;/P&gt;&lt;P&gt;As some times users may change their Printer names frequently.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Vara&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Vara K&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jul 2006 15:56:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms-changed-default-printer-still-spool-has-default/m-p/1526828#M241157</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-27T15:56:27Z</dc:date>
    </item>
  </channel>
</rss>

