<?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: How to send smartforms through e-mail in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-send-smartforms-through-e-mail/m-p/4789581#M1121789</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;There is a function module i cant't remember it now i think it will starts with so_* check it out with se37 ..&lt;/P&gt;&lt;P&gt;let's wait for other's response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Thiru. R&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 24 Nov 2008 06:57:20 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-11-24T06:57:20Z</dc:date>
    <item>
      <title>How to send smartforms through e-mail</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-send-smartforms-through-e-mail/m-p/4789580#M1121788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    I have to send printed smartforms to vendors/customers .Their e-mail id i can get from the usermaster.But please tell me how to attach the smartforms to send through e-mail.Is there any functional module for this purpose?If so please tell me which FM.Please reply asap.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Nov 2008 06:53:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-send-smartforms-through-e-mail/m-p/4789580#M1121788</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-24T06:53:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to send smartforms through e-mail</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-send-smartforms-through-e-mail/m-p/4789581#M1121789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;There is a function module i cant't remember it now i think it will starts with so_* check it out with se37 ..&lt;/P&gt;&lt;P&gt;let's wait for other's response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Thiru. R&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Nov 2008 06:57:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-send-smartforms-through-e-mail/m-p/4789581#M1121789</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-24T06:57:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to send smartforms through e-mail</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-send-smartforms-through-e-mail/m-p/4789582#M1121790</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;Use function module: &lt;STRONG&gt;SO_NEW_DOCUMENT_ATT_SEND_API1&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Nov 2008 06:58:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-send-smartforms-through-e-mail/m-p/4789582#M1121790</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-24T06:58:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to send smartforms through e-mail</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-send-smartforms-through-e-mail/m-p/4789583#M1121791</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;Hope the following Thread will help you regarding your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_document" href="https://community.sap.com/" __jive_macro_name="document" modifiedtitle="true" __default_attr="8731"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Nitesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Nov 2008 06:58:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-send-smartforms-through-e-mail/m-p/4789583#M1121791</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-24T06:58:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to send smartforms through e-mail</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-send-smartforms-through-e-mail/m-p/4789584#M1121792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Before posting this u do a search in SDN. U will see lot many results for this.&lt;/P&gt;&lt;P&gt;Anyways check the below links.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.uber-goober.com/forums/showthread.php?t=103107" target="test_blank"&gt;http://www.uber-goober.com/forums/showthread.php?t=103107&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/scn/forums" target="test_blank"&gt;https://www.sdn.sap.com/irj/scn/forums&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/scn/forums" target="test_blank"&gt;https://www.sdn.sap.com/irj/scn/forums&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Nov 2008 07:00:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-send-smartforms-through-e-mail/m-p/4789584#M1121792</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-24T07:00:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to send smartforms through e-mail</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-send-smartforms-through-e-mail/m-p/4789585#M1121793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Narendra,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just go through the following link:&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="151084"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nitin.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Nov 2008 07:01:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-send-smartforms-through-e-mail/m-p/4789585#M1121793</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-24T07:01:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to send smartforms through e-mail</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-send-smartforms-through-e-mail/m-p/4789586#M1121794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you please provide me an example regarding how to use this function module.Some piece of codes.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Nov 2008 07:03:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-send-smartforms-through-e-mail/m-p/4789586#M1121794</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-24T07:03:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to send smartforms through e-mail</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-send-smartforms-through-e-mail/m-p/4789587#M1121795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi narendra ,&lt;/P&gt;&lt;P&gt;i hve worked on similar problem ,&lt;/P&gt;&lt;P&gt;my issue was sending smartform as an attacment in Email , i have created a custom func module fr the same .&lt;/P&gt;&lt;P&gt;hope the  code helps in solving ur issue....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import parameters &lt;/P&gt;&lt;P&gt;param name	 type	associated type		 shrt text&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I_TID		 LIKE 	THEAD-TDID	                   Text ID of text to be read&lt;/P&gt;&lt;P&gt;I_LAN		 LIKE	THEAD-TDSPRAS	                   Language of text to be read&lt;/P&gt;&lt;P&gt;I_L_NAME	LIKE	THEAD-TDNAME	                   Name of text to be read&lt;/P&gt;&lt;P&gt;I_OID		LIKE	THEAD-TDOBJECT	                   Object of text to be read&lt;/P&gt;&lt;P&gt;W_RETURN	TYPE	SSFCRESCL	                   Smart Forms: Return value at end of form printing&lt;/P&gt;&lt;P&gt;I_POTITLE	TYPE	EBELN	                     	purchase order number&lt;/P&gt;&lt;P&gt;W_DOC_CHNG	TYPE	SODOCCHGI1	                  data of an object which can be changed&lt;/P&gt;&lt;P&gt;I_ADDRNUM	LIKE	ADR6-ADDRNUMBER               Address number of Vendor&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;source code :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FUNCTION /fir/rip2p0bgs_mailsend.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;"Local Interface:&lt;/P&gt;&lt;P&gt;*"  IMPORTING&lt;/P&gt;&lt;P&gt;*"     REFERENCE(I_TID) LIKE  THEAD-TDID&lt;/P&gt;&lt;P&gt;*"     REFERENCE(I_LAN) LIKE  THEAD-TDSPRAS&lt;/P&gt;&lt;P&gt;*"     REFERENCE(I_L_NAME) LIKE  THEAD-TDNAME&lt;/P&gt;&lt;P&gt;*"     REFERENCE(I_OID) LIKE  THEAD-TDOBJECT&lt;/P&gt;&lt;P&gt;*"     REFERENCE(W_RETURN) TYPE  SSFCRESCL&lt;/P&gt;&lt;P&gt;*"     REFERENCE(I_POTITLE) TYPE  EBELN&lt;/P&gt;&lt;P&gt;*"     REFERENCE(W_DOC_CHNG) TYPE  SODOCCHGI1&lt;/P&gt;&lt;P&gt;*"     REFERENCE(I_ADDRNUM) LIKE  ADR6-ADDRNUMBER&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*data declaration&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Internal Table declaration&lt;/P&gt;&lt;P&gt;  DATA : it_otf     TYPE STANDARD TABLE OF  itcoo ,&lt;/P&gt;&lt;P&gt;         it_tline   TYPE STANDARD TABLE OF  tline ,&lt;/P&gt;&lt;P&gt;         it_record  TYPE STANDARD TABLE OF  solisti1,&lt;/P&gt;&lt;P&gt;         it_objpack TYPE STANDARD TABLE OF  sopcklsti1,&lt;/P&gt;&lt;P&gt;         it_objtxt  TYPE STANDARD TABLE OF  solisti1 ,&lt;/P&gt;&lt;P&gt;         it_objbin  TYPE STANDARD TABLE OF  solisti1 ,&lt;/P&gt;&lt;P&gt;         it_reclist TYPE STANDARD TABLE OF  somlreci1 ,&lt;/P&gt;&lt;P&gt;         it_tdline  TYPE STANDARD TABLE OF  tline,&lt;/P&gt;&lt;P&gt;*Work Area declarations&lt;/P&gt;&lt;P&gt;         wa_objhead     TYPE  soli_tab,&lt;/P&gt;&lt;P&gt;         wa_buffer      TYPE  string,       "To convert from 132 to 255&lt;/P&gt;&lt;P&gt;         wa_it_objtxt   TYPE  solisti1,&lt;/P&gt;&lt;P&gt;         wa_it_objpack  TYPE  sopcklsti1,&lt;/P&gt;&lt;P&gt;         wa_it_record   TYPE  solisti1,&lt;/P&gt;&lt;P&gt;         wa_it_reclist  TYPE  somlreci1,&lt;/P&gt;&lt;P&gt;         wa_it_tline    TYPE  tline,&lt;/P&gt;&lt;P&gt;         wa_tdline      TYPE  tline,&lt;/P&gt;&lt;P&gt;*variable declaration&lt;/P&gt;&lt;P&gt;         v_lines_bin    TYPE  i,&lt;/P&gt;&lt;P&gt;         v_lines_txt    TYPE  i,&lt;/P&gt;&lt;P&gt;         v_len_in       TYPE  sood-objlen,         "#EC NEEDED&lt;/P&gt;&lt;P&gt;         v_mailaddr     TYPE  adr6-smtp_addr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*constant declaration&lt;/P&gt;&lt;P&gt;  CONSTANTS : c_msgtype TYPE c VALUE 'E',    " for declaring masseage type as error msg&lt;/P&gt;&lt;P&gt;              c_X TYPE c VALUE 'X',&lt;/P&gt;&lt;P&gt;              c_U TYPE c VALUE 'U'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  it_otf[] = w_return-otfdata[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*calling function module to convert otf format of smartform to pdf format&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'CONVERT_OTF'&lt;/P&gt;&lt;P&gt;   EXPORTING&lt;/P&gt;&lt;P&gt;     format                      = text-001     "PDF&lt;/P&gt;&lt;P&gt;     max_linewidth               = 132&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;    COPYNUMBER                 =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    ASCII_BIDI_VIS2LOG         =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    PDF_DELETE_OTFTAB          =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   IMPORTING&lt;/P&gt;&lt;P&gt;     bin_filesize                = v_len_in&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    BIN_FILE                   =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      otf                        = it_otf&lt;/P&gt;&lt;P&gt;      lines                      = it_tline&lt;/P&gt;&lt;P&gt;   EXCEPTIONS&lt;/P&gt;&lt;P&gt;     err_max_linewidth           = 1&lt;/P&gt;&lt;P&gt;     err_format                  = 2&lt;/P&gt;&lt;P&gt;     err_conv_not_possible       = 3&lt;/P&gt;&lt;P&gt;     err_bad_otf                 = 4&lt;/P&gt;&lt;P&gt;     OTHERS                      = 5  .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;    sy-msgid = text-002.     "/fir/rp2p0bgsi_msg&lt;/P&gt;&lt;P&gt;    sy-msgty = c_msgtype.    " E&lt;/P&gt;&lt;P&gt;    sy-msgno = 040.&lt;/P&gt;&lt;P&gt;    sy-msgv1 = ' '.&lt;/P&gt;&lt;P&gt;    sy-msgv2 = ' '.&lt;/P&gt;&lt;P&gt;    sy-msgv3 = ' '.&lt;/P&gt;&lt;P&gt;    sy-msgv4 = ' '.&lt;/P&gt;&lt;P&gt;    EXIT.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Convert PDF from 132 to 255.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    LOOP AT it_tline INTO wa_it_tline.&lt;/P&gt;&lt;P&gt;      TRANSLATE wa_it_tline USING ' ~'.      " Replacing space by ~&lt;/P&gt;&lt;P&gt;      CONCATENATE wa_buffer wa_it_tline INTO wa_buffer.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    TRANSLATE wa_buffer USING '~ '.         " Replacing space by ~&lt;/P&gt;&lt;P&gt;    DO.&lt;/P&gt;&lt;P&gt;      wa_it_record = wa_buffer.&lt;/P&gt;&lt;P&gt;      APPEND wa_it_record TO it_record.     " Appending 255 characters as a record&lt;/P&gt;&lt;P&gt;      SHIFT wa_buffer LEFT BY 255 PLACES.&lt;/P&gt;&lt;P&gt;      IF wa_buffer IS INITIAL.&lt;/P&gt;&lt;P&gt;        EXIT.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;    ENDDO.&lt;/P&gt;&lt;P&gt;    REFRESH:it_objbin.&lt;/P&gt;&lt;P&gt;    CLEAR wa_objhead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Object with PDF.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    it_objbin[] = it_record[].&lt;/P&gt;&lt;P&gt;    DESCRIBE TABLE it_objbin LINES v_lines_bin.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*calling a function module read_text to get the text for the mail body&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'READ_TEXT'&lt;/P&gt;&lt;P&gt;     EXPORTING&lt;/P&gt;&lt;P&gt;        id                            = i_tid&lt;/P&gt;&lt;P&gt;        language                      = i_lan&lt;/P&gt;&lt;P&gt;        name                          = i_l_name&lt;/P&gt;&lt;P&gt;        object                        = i_oid&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;    HEADER                          =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;     TABLES&lt;/P&gt;&lt;P&gt;        lines                         = it_tdline&lt;/P&gt;&lt;P&gt;     EXCEPTIONS&lt;/P&gt;&lt;P&gt;       id                             = 1&lt;/P&gt;&lt;P&gt;       language                       = 2&lt;/P&gt;&lt;P&gt;       name                           = 3&lt;/P&gt;&lt;P&gt;       not_found                      = 4&lt;/P&gt;&lt;P&gt;       object                         = 5&lt;/P&gt;&lt;P&gt;       reference_check                = 6&lt;/P&gt;&lt;P&gt;       wrong_access_to_archive        = 7&lt;/P&gt;&lt;P&gt;     OTHERS                           = 8&lt;/P&gt;&lt;P&gt;              .&lt;/P&gt;&lt;P&gt;    IF sy-subrc &amp;lt;&amp;gt; 0.    "#EC&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF it_tdline IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;      LOOP AT it_tdline INTO wa_tdline.&lt;/P&gt;&lt;P&gt;        wa_it_objtxt = wa_tdline-tdline.&lt;/P&gt;&lt;P&gt;        APPEND wa_it_objtxt TO it_objtxt.&lt;/P&gt;&lt;P&gt;        CLEAR: wa_tdline,&lt;/P&gt;&lt;P&gt;               wa_it_objtxt.&lt;/P&gt;&lt;P&gt;      ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      DESCRIBE TABLE it_objtxt LINES v_lines_txt.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Pack to main body as RAW.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    CLEAR wa_it_objpack-transf_bin.        "Obj. to be transported not in binary form&lt;/P&gt;&lt;P&gt;    wa_it_objpack-head_start = 1.          "Start line of object header in transport packet&lt;/P&gt;&lt;P&gt;    wa_it_objpack-head_num = 0.            "Number of lines of an object header in object packet&lt;/P&gt;&lt;P&gt;    wa_it_objpack-body_start = 1.          "Start line of object contents in an object packet&lt;/P&gt;&lt;P&gt;    wa_it_objpack-body_num = v_lines_txt.  "Number of lines of the object contents in an object packet&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Code for document class&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    wa_it_objpack-doc_type = text-004.        "RAW&lt;/P&gt;&lt;P&gt;    APPEND wa_it_objpack TO it_objpack.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Packing as PDF.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    wa_it_objpack-transf_bin = c_X.           " X&lt;/P&gt;&lt;P&gt;    wa_it_objpack-head_start = 1.&lt;/P&gt;&lt;P&gt;    wa_it_objpack-head_num = 1.&lt;/P&gt;&lt;P&gt;    wa_it_objpack-body_start = 1.&lt;/P&gt;&lt;P&gt;    wa_it_objpack-body_num = v_lines_bin.&lt;/P&gt;&lt;P&gt;    wa_it_objpack-doc_type = text-001.        "PDF&lt;/P&gt;&lt;P&gt;    wa_it_objpack-obj_name = text-006.        "SmartForm&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CONCATENATE i_potitle '.pdf' INTO wa_it_objpack-obj_descr.&lt;/P&gt;&lt;P&gt;    wa_it_objpack-doc_size = v_lines_bin * 255.&lt;/P&gt;&lt;P&gt;    APPEND wa_it_objpack TO it_objpack.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Document information.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    CLEAR wa_it_reclist.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;e-mail receivers.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    SELECT SINGLE smtp_addr FROM adr6 INTO v_mailaddr    "#EC *&lt;/P&gt;&lt;P&gt;     WHERE addrnumber = i_addrnum.&lt;/P&gt;&lt;P&gt;    wa_it_reclist-receiver = v_mailaddr.&lt;/P&gt;&lt;P&gt;    wa_it_reclist-express = c_X.                        " X&lt;/P&gt;&lt;P&gt;    wa_it_reclist-rec_type = c_U.                       "U -&amp;gt; Internet address&lt;/P&gt;&lt;P&gt;    APPEND wa_it_reclist TO it_reclist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Sending Mail&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'&lt;/P&gt;&lt;P&gt;     EXPORTING&lt;/P&gt;&lt;P&gt;      document_data                  = w_doc_chng&lt;/P&gt;&lt;P&gt;      put_in_outbox                  = c_X            "X&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    COMMIT_WORK                    =&lt;/P&gt;&lt;/LI&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;    SENT_TO_ALL                    =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    NEW_OBJECT_ID                  =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;     TABLES&lt;/P&gt;&lt;P&gt;      packing_list                   = it_objpack&lt;/P&gt;&lt;P&gt;      object_header                  = wa_objhead&lt;/P&gt;&lt;P&gt;      contents_bin                   = it_objbin&lt;/P&gt;&lt;P&gt;      contents_txt                   = it_objtxt&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    CONTENTS_HEX                   =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    OBJECT_PARA                    =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    OBJECT_PARB                    =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        receivers                    = it_reclist&lt;/P&gt;&lt;P&gt;     EXCEPTIONS&lt;/P&gt;&lt;P&gt;       too_many_receivers            = 1&lt;/P&gt;&lt;P&gt;       document_not_sent             = 2&lt;/P&gt;&lt;P&gt;       document_type_not_exist       = 3&lt;/P&gt;&lt;P&gt;       operation_no_authorization    = 4&lt;/P&gt;&lt;P&gt;       parameter_error               = 5&lt;/P&gt;&lt;P&gt;       x_error                       = 6&lt;/P&gt;&lt;P&gt;       enqueue_error                 = 7&lt;/P&gt;&lt;P&gt;       OTHERS                        = 8 .&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;      sy-msgid = text-008.      "/fir/rp2p0bgsi_msg&lt;/P&gt;&lt;P&gt;      sy-msgty = c_msgtype.     " E&lt;/P&gt;&lt;P&gt;      sy-msgno = 041.&lt;/P&gt;&lt;P&gt;      sy-msgv1 = ' '.&lt;/P&gt;&lt;P&gt;      sy-msgv2 = ' '.&lt;/P&gt;&lt;P&gt;      sy-msgv3 = ' '.&lt;/P&gt;&lt;P&gt;      sy-msgv4 = ' '.&lt;/P&gt;&lt;P&gt;      EXIT.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDFUNCTION.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Nov 2008 07:06:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-send-smartforms-through-e-mail/m-p/4789587#M1121795</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-24T07:06:52Z</dc:date>
    </item>
  </channel>
</rss>

