<?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 Smartform saving in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartform-saving/m-p/1340916#M172515</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 working in a banking sector HR implementation, one of their requirement is that, they want to save the smartform output instead of printing ( actually they want both ). Can anybody suggest me how to do that.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Baiju&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 Jun 2006 10:00:51 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-06-01T10:00:51Z</dc:date>
    <item>
      <title>Smartform saving</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartform-saving/m-p/1340916#M172515</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 working in a banking sector HR implementation, one of their requirement is that, they want to save the smartform output instead of printing ( actually they want both ). Can anybody suggest me how to do that.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Baiju&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Jun 2006 10:00:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/smartform-saving/m-p/1340916#M172515</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-01T10:00:51Z</dc:date>
    </item>
    <item>
      <title>Re: Smartform saving</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartform-saving/m-p/1340917#M172516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;YOU can convert it into PDF and can save or print whenever you require.&lt;/P&gt;&lt;P&gt;&amp;lt;u&amp;gt;Convert SmartForm to PDF:&amp;lt;/u&amp;gt;&lt;/P&gt;&lt;P&gt;1.Print Smartform to spool .&lt;/P&gt;&lt;P&gt;2.Run RSTXPDFT4 program it will ask the spool number.&lt;/P&gt;&lt;P&gt;3.supply the spool number generated in step 1.&lt;/P&gt;&lt;P&gt;(or)&lt;/P&gt;&lt;P&gt;Use this program .&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Report  ZSMARTFORM_PDF                                              *
*&amp;amp;                                                                     *
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;                                                                     *
*&amp;amp;                                                                     *
*&amp;amp;---------------------------------------------------------------------*

report  zsmartform_pdf                          .

*SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME.
*PARAMETER: p_date LIKE sy-datum.
*PARAMETER: p_rea TYPE char255.
*SELECTION-SCREEN: END OF BLOCK b1.
data: p_date like sy-datum value '20060202'.
data: p_rea type char255 value 'Nothing Succeeds Like Success'.
data: ws_ucomm like sy-ucomm.
*
*INITIALIZATION.
*  SET PF-STATUS 'STANDARD' OF PROGRAM 'zsmartform_pdf'.
*
*AT SELECTION-SCREEN.
*  ws_ucomm = sy-ucomm.
*  CASE ws_ucomm.
*    WHEN '&amp;amp;PDF'.
*      PERFORM f1000_download_form.
*      EXIT.
*    WHEN '&amp;amp;BACK'.
*      SET SCREEN 0.
*      EXIT.
*    WHEN '&amp;amp;EXIT'.
*      SET SCREEN 0.
*      EXIT.
*    WHEN '&amp;amp;canc'.
*      SET SCREEN 0.
*      LEAVE TO SCREEN 0.
*  ENDCASE.
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Form F1000_DOWNLOAD_FORM
*&amp;amp;---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --&amp;gt; p1 text
* &amp;lt;-- p2 text
*----------------------------------------------------------------------*
*FORM f1000_download_form.
  data: form_name type rs38l_fnam.
  data: 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.
  data: w_filesize type i.
  data: w_bin_filesize type i.

  call function 'SSF_FUNCTION_MODULE_NAME'
  exporting
    formname = 'ZSMARTFORM_PDF'
* VARIANT = ' '
* DIRECT_CALL = ' '
  importing
    fm_name = form_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.

  wa_ctrlop-getotf = 'X'.
  wa_ctrlop-no_dialog = 'X'.
  wa_outopt-tdnoprev = 'X'.

  call function form_name
  exporting
* ARCHIVE_INDEX =
* ARCHIVE_INDEX_TAB =
* ARCHIVE_PARAMETERS =
    control_parameters = wa_ctrlop
* MAIL_APPL_OBJ =
* MAIL_RECIPIENT =
* MAIL_SENDER =
    output_options = wa_outopt
    user_settings = 'X'
    mydate = p_date
    reason = p_rea
  importing
* DOCUMENT_OUTPUT_INFO =
    job_output_info = t_otfdata
* 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.

  t_otf[] = t_otfdata-otfdata[].

  call function 'CONVERT_OTF'
  exporting
    format = 'PDF'
    max_linewidth = 132
* ARCHIVE_INDEX = ' '
  importing
    bin_filesize = w_bin_filesize
  tables
    otf = t_otf
    lines = t_pdf_tab
  exceptions
    err_max_linewidth = 1
    err_format = 2
    err_conv_not_possible = 3
  others = 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.

  call function 'WS_DOWNLOAD'
  exporting
    bin_filesize = w_bin_filesize
* CODEPAGE = ' '
    filename = 'c:test.PDF'
    filetype = 'BIN'
* MODE = ' '
* WK1_N_FORMAT = ' '
* WK1_N_SIZE = ' '
* WK1_T_FORMAT = ' '
* WK1_T_SIZE = ' '
* COL_SELECT = ' '
* COL_SELECTMASK = ' '
* NO_AUTH_CHECK = ' '
  importing
    filelength = w_filesize
  tables
    data_tab = t_pdf_tab
* FIELDNAMES =
  exceptions
    file_open_error = 1
    file_write_error = 2
    invalid_filesize = 3
    invalid_type = 4
    no_batch = 5
    unknown_error = 6
    invalid_table_width = 7
    gui_refuse_filetransfer = 8
    customer_error = 9
    others = 10.

  if sy-subrc &amp;lt;&amp;gt; 0.
    message i003(z00) with 'File not downloaded succesfully'.
  else.
    message i003(z00) with 'File Test.pdf downloaded succesfully '
    'under C drive'.
  endif.
*ENDFORM. " F1000_DOWNLOAD_FORM&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;lt;i&amp;gt;Hope This Info Helps YOU.&amp;lt;/i&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raghav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Jun 2006 10:02:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/smartform-saving/m-p/1340917#M172516</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-01T10:02:17Z</dc:date>
    </item>
    <item>
      <title>Re: Smartform saving</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartform-saving/m-p/1340918#M172517</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;Do you main to save the spool or create a pdf format?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Jun 2006 10:04:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/smartform-saving/m-p/1340918#M172517</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-01T10:04:03Z</dc:date>
    </item>
    <item>
      <title>Re: Smartform saving</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartform-saving/m-p/1340919#M172518</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;You can do both print and save the smartforms output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First prepare your data to print on the smartform layout.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Call the smartform, you will get generated function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assign the correponding parameters to the fucntion module. And here, this function module returns three parameters &lt;/P&gt;&lt;P&gt;DOCUMENT_OUTPUT_INFO&lt;/P&gt;&lt;P&gt;JOB_OUTPUT_INFO     &lt;/P&gt;&lt;P&gt;JOB_OUTPUT_OPTIONS  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;JOB_OUTPUT_INFO is type of structure SSFCRESCL. Look at SSFCRESCL for OTFDATA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Get OTFDATA into an internal table and call function module CONVERT_OTF_2_PDF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this function module having table parameter OTF. So assign our internal table to this parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Donot pass any information for the Archieve parameters of this function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me konw if you have any issues.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rama&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Jun 2006 10:16:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/smartform-saving/m-p/1340919#M172518</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-01T10:16:28Z</dc:date>
    </item>
  </channel>
</rss>

