<?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: smartform output in OTF Format error in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartform-output-in-otf-format-error/m-p/4535934#M1071805</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try including  w_control_param-tddest   = 'LOCL' &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;Darren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Sep 2008 10:38:00 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-09-24T10:38:00Z</dc:date>
    <item>
      <title>smartform output in OTF Format error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartform-output-in-otf-format-error/m-p/4535933#M1071804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;I want to get the smartform output as OTF format.This data later i will convert to PDF format. The problem now is even though i passed the following code to my smartform function module, still when i execute the program i am getting the popup to enter output device.if i give the printer name as LP01 and press print button,i am getting the the output in OTF format in the table.How to avoid this popup.if i close that popup without giving printer name,my smartform function module is not successful. That means i am not getting the data in the OTF table. Please help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  w_control_param-getotf = 'X'.&lt;/P&gt;&lt;P&gt;  w_control_param-no_dialog = 'X'.&lt;/P&gt;&lt;P&gt;  w_composer_param-tdnoprev = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION v_fm_name&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      control_parameters = w_control_param&lt;/P&gt;&lt;P&gt;      output_options     = w_composer_param&lt;/P&gt;&lt;P&gt;      user_settings      = 'X'&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      job_output_info    = v_job_info&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;      OTHERS             = 5.&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 E000 with 'Cannot convert to OTF Format'.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  i_otfdata[] = v_job_info-otfdata[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Shibin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Sep 2008 10:32:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/smartform-output-in-otf-format-error/m-p/4535933#M1071804</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-24T10:32:24Z</dc:date>
    </item>
    <item>
      <title>Re: smartform output in OTF Format error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartform-output-in-otf-format-error/m-p/4535934#M1071805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try including  w_control_param-tddest   = 'LOCL' &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;Darren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Sep 2008 10:38:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/smartform-output-in-otf-format-error/m-p/4535934#M1071805</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-24T10:38:00Z</dc:date>
    </item>
    <item>
      <title>Re: smartform output in OTF Format error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartform-output-in-otf-format-error/m-p/4535935#M1071806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Just now, i checked by adding  this code&lt;/P&gt;&lt;P&gt;  w_composer_param-tddest = 'LOCL'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But still Proplem exist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Shibin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Sep 2008 10:42:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/smartform-output-in-otf-format-error/m-p/4535935#M1071806</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-24T10:42:11Z</dc:date>
    </item>
    <item>
      <title>Re: smartform output in OTF Format error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartform-output-in-otf-format-error/m-p/4535936#M1071807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi shibin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA:
  form_name TYPE rs38l_fnam,
  wa_ctrlop TYPE ssfctrlop,
  wa_outopt TYPE ssfcompop.
DATA:
  t_otfdata TYPE ssfcrescl,
  t_pdf_tab LIKE tline OCCURS 0 WITH HEADER LINE.

DATA:
  t_otf TYPE itcoo OCCURS 0 WITH HEADER LINE,
  w_filesize TYPE i,
  w_bin_filesize TYPE i.


CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
  EXPORTING
    formname           = 'Z_FLIGHT_DETAILS'
  IMPORTING
    fm_name            = form_name
  EXCEPTIONS
    no_form            = 1
    no_function_module = 2.


wa_ctrlop-getotf = 'X'.
wa_ctrlop-no_dialog = 'X'.
wa_outopt-tdnoprev = 'X'.

CALL FUNCTION '/1BCDWB/SF00000482'
  EXPORTING
    control_parameters = wa_ctrlop
    output_options     = wa_outopt
    user_settings      = 'X'
  IMPORTING
    job_output_info    = t_otfdata
  EXCEPTIONS
    formatting_error   = 1
    internal_error     = 2
    send_error         = 3
    user_canceled      = 4.
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.

  t_otf[] = t_otfdata-otfdata[].

CALL FUNCTION 'CONVERT_OTF'
 EXPORTING
   FORMAT                      = 'PDF'
   MAX_LINEWIDTH               = 132
*   ARCHIVE_INDEX               = ' '
*   COPYNUMBER                  = 0
*   ASCII_BIDI_VIS2LOG          = ' '
*   PDF_DELETE_OTFTAB           = ' '
  IMPORTING
   BIN_FILESIZE                 = w_bin_filesize
*   BIN_FILE                    = BIN_FILE
  TABLES
    otf                         = t_otf
    lines                       = t_pdf_tab
 EXCEPTIONS
   ERR_MAX_LINEWIDTH           = 1
   ERR_FORMAT                  = 2
   ERR_CONV_NOT_POSSIBLE       = 3
   ERR_BAD_OTF                 = 4
          .
  .
  CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
      bin_filesize            = w_bin_filesize
      filename                = 'D:\test.PDF'
      filetype                = 'BIN'
    IMPORTING
      filelength              = w_filesize
    TABLES
      data_tab                = t_pdf_tab
    EXCEPTIONS
      file_write_error        = 1
      no_batch                = 2
      gui_refuse_filetransfer = 3
      invalid_type            = 4
      no_authority            = 5
      unknown_error           = 6
      header_not_allowed      = 7
      separator_not_allowed   = 8
      filesize_not_allowed    = 9
      header_too_long         = 10
      dp_error_create         = 11
      dp_error_send           = 12
      dp_error_write          = 13
      unknown_dp_error        = 14
      access_denied           = 15
      dp_out_of_memory        = 16
      disk_full               = 17
      dp_timeout              = 18
      file_not_found          = 19
      dataprovider_exception  = 20
      control_flush_error     = 21.
  IF sy-subrc NE 0.
    MESSAGE 'file is not downloaded' TYPE 'E'.
  ELSE.
    MESSAGE 'file downloaded' TYPE 'S'.
  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sravanthi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Sep 2008 10:43:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/smartform-output-in-otf-format-error/m-p/4535936#M1071807</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-24T10:43:00Z</dc:date>
    </item>
    <item>
      <title>Re: smartform output in OTF Format error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartform-output-in-otf-format-error/m-p/4535937#M1071808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shibin  ,&lt;/P&gt;&lt;P&gt;If u are getting POP-UP even after setting the the configurations &lt;/P&gt;&lt;P&gt;w_control_param-getotf = 'X'.&lt;/P&gt;&lt;P&gt;w_control_param-no_dialog = 'X'.&lt;/P&gt;&lt;P&gt;w_composer_param-tdnoprev = 'X'. &lt;/P&gt;&lt;P&gt;Then the issue could well be with the user configuration .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do the following steps from the menu :&lt;/P&gt;&lt;P&gt;System -&amp;gt; user profile --&amp;gt;Own Data &lt;/P&gt;&lt;P&gt;Select Defaults Tab  , then check if u have given OutputDevice .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once u give this detail , your code will work fine .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think this will solve your problem &lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Arun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Sep 2008 11:25:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/smartform-output-in-otf-format-error/m-p/4535937#M1071808</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-24T11:25:06Z</dc:date>
    </item>
    <item>
      <title>Re: smartform output in OTF Format error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartform-output-in-otf-format-error/m-p/4535938#M1071809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arun,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I have done same thing using tcode SU3.In that output device not configured for my user.And it working fine now. Thanks a lot to all helped me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Shibin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Sep 2008 11:33:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/smartform-output-in-otf-format-error/m-p/4535938#M1071809</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-24T11:33:00Z</dc:date>
    </item>
  </channel>
</rss>

