<?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 output in HTML format in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms-output-in-html-format/m-p/7892583#M1595997</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;I want to save my smartforms in HTML format.Is there any Standard programe is available for it.&lt;/P&gt;&lt;P&gt;Like as RSTXPDFT4 for converting output in PDF format.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 30 Apr 2011 05:04:57 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-04-30T05:04:57Z</dc:date>
    <item>
      <title>smartforms output in HTML format</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms-output-in-html-format/m-p/7892583#M1595997</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;I want to save my smartforms in HTML format.Is there any Standard programe is available for it.&lt;/P&gt;&lt;P&gt;Like as RSTXPDFT4 for converting output in PDF format.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 Apr 2011 05:04:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms-output-in-html-format/m-p/7892583#M1595997</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-04-30T05:04:57Z</dc:date>
    </item>
    <item>
      <title>Re: smartforms output in HTML format</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms-output-in-html-format/m-p/7892584#M1595998</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rakesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can use smartforms to create HTML output directly:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;form send_smartform_html_email
tables et_return type bapiret2_t
receivers structure somlreci1 "receivers
using iv_smartform type tdsfname
send_partner type bu_partner "from address
mail_subject type so_obj_des.


  data: control_parameters type ssfctrlop,
  output_options type ssfcompop,
  document_output_info type ssfcrespd,
  job_output_info type ssfcrescl,
  job_output_options type ssfcresop,
  xsfparam_line type ssfxsfp,
  p_html type trfresult,
  p_graphics type tsf_xsf_gr,
  form_name type rs38l_fnam. " generated function


  data: wa_return type bapiret2.
  data: v_receiver type ad_smtpadr.
* "CLI20061030
  data: ls_orderadm_h type crmt_output_orderadm_h_com.
  select single * into corresponding fields of ls_orderadm_h
    from crmd_orderadm_h
    where object_id = p_zzma.


*SET SMARTFORM OUTPUT OPTIONS
  output_options-tdnoprev = 'X'.                            "#EC NOTEXT
  output_options-xsfcmode = 'X'.                            "#EC NOTEXT
  output_options-xsf = 'X'.                                 "#EC NOTEXT
  output_options-xsfoutmode = 'A'.                          "#EC NOTEXT
  output_options-xsfformat = 'X'.                           "#EC NOTEXT
  output_options-xsfaction = 'http://www.ashland.com'.
  clear output_options-xsfoutdev.


  xsfparam_line-name = 'GRAPHICS'.                          "#EC NOTEXT
  xsfparam_line-value = 'EXTRACT'.                          "#EC NOTEXT
  append xsfparam_line to output_options-xsfpars.


  xsfparam_line-name = 'GRAPHICS-DIRECTORY'.                "#EC NOTEXT
  xsfparam_line-value = c_gr_dir.
  append xsfparam_line to output_options-xsfpars.


  xsfparam_line-name = 'CONTENT-ID'.                        "#EC NOTEXT
  xsfparam_line-value = 'ENABLE'.                           "#EC NOTEXT
  append xsfparam_line to output_options-xsfpars.


* SILENT MODE ON
  output_options-tdimmed = space.
  output_options-tdnewid = space.
  control_parameters-no_dialog = 'X'.                       "#EC NOTEXT


* Get the generated function name of the smartform
  call function 'SSF_FUNCTION_MODULE_NAME'                  "#EC NOTEXT
    exporting
      formname = iv_smartform
    importing
      fm_name = form_name
    exceptions
      no_form = 1
      no_function_module = 2
    others = 3.
  if sy-subrc &amp;lt;&amp;gt; 0.
* Error receiving the generated function module
    clear wa_return.
    message e398 with iv_smartform into wa_return-message.
    wa_return-type = 'E'.                                   "#EC NOTEXT
    insert wa_return into table et_return.
    exit.
  endif.


* Get the smartform content
  call function form_name
    exporting
      control_parameters   = control_parameters
      output_options       = output_options
      orderadm_h           = ls_orderadm_h
    importing
      document_output_info = document_output_info
      job_output_info      = job_output_info
      job_output_options   = job_output_options
    exceptions
      formatting_error
      =1
      internal_error
      =2
      send_error
      =3
      user_canceled        = 4.


  if sy-subrc &amp;lt;&amp;gt; 0.
* FAILED TO GET CONTENT FROM SMARTFORM
    clear wa_return.
    message e398 with form_name sy-subrc into wa_return-message.
    insert wa_return into table et_return.
    exit.
  endif.


  p_html = job_output_info-xmloutput-trfresult.
  p_graphics[] = job_output_info-xmloutput-xsfgr[].&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;This is taken from Pavan Bayyapu's fantastic and still existing August 2005 blog [Sending HTML Email from SAP CRM/ERP|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/2273] &lt;B&gt;[original link is broken]&lt;/B&gt; &lt;B&gt;[original link is broken]&lt;/B&gt; &lt;B&gt;[original link is broken]&lt;/B&gt;;&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;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 Apr 2011 11:50:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms-output-in-html-format/m-p/7892584#M1595998</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2011-04-30T11:50:16Z</dc:date>
    </item>
  </channel>
</rss>

