<?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 Regarding SO_DOCUMENT_SEND_API1 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-so-document-send-api1/m-p/3832383#M921564</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 have a requirement to send an Email to CSS as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Subject line: xxxxxxxxxxxxxxx&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Body of the Email:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Material Number: xxxxxxxxxxx&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Material Description:xxxxxxxxxxx&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can any body tell me what are the required input parameters need to use for   SO_DOCUMENT_SEND_API1 to show above details in email?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Urgent. Reward points will be there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sk.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 18 May 2008 11:16:12 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-18T11:16:12Z</dc:date>
    <item>
      <title>Regarding SO_DOCUMENT_SEND_API1</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-so-document-send-api1/m-p/3832383#M921564</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 have a requirement to send an Email to CSS as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Subject line: xxxxxxxxxxxxxxx&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Body of the Email:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Material Number: xxxxxxxxxxx&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Material Description:xxxxxxxxxxx&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can any body tell me what are the required input parameters need to use for   SO_DOCUMENT_SEND_API1 to show above details in email?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Urgent. Reward points will be there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sk.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 May 2008 11:16:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-so-document-send-api1/m-p/3832383#M921564</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-18T11:16:12Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding SO_DOCUMENT_SEND_API1</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-so-document-send-api1/m-p/3832384#M921565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi dude,&lt;/P&gt;&lt;P&gt;         Read documentation of the function module, it has a simple example program also. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Srikanth M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 May 2008 11:29:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-so-document-send-api1/m-p/3832384#M921565</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-18T11:29:20Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding SO_DOCUMENT_SEND_API1</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-so-document-send-api1/m-p/3832385#M921566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Srikanth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       Thanks for your reply. Right now i do not have PC to check the FM. If you have any idea, please let me know. Otherwise i will check previous blogs in forums. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, &lt;/P&gt;&lt;P&gt;Sk.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 May 2008 11:47:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-so-document-send-api1/m-p/3832385#M921566</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-18T11:47:13Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding SO_DOCUMENT_SEND_API1</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-so-document-send-api1/m-p/3832386#M921567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Suresh,&lt;/P&gt;&lt;P&gt;Check below code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FORM mail_body.
  DATA:  l_l1 TYPE i.
  CONSTANTS: lc_0 VALUE '0',
             lc_1 VALUE '1',
             lc_raw(3) TYPE c VALUE 'RAW'.
  REFRESH: i_objtxt[],
           i_objpack[].
  CLEAR: wa_objtxt.
  SORT i_fail BY type.

* MAIL BODY
* Customer Number
  CONCATENATE text-t18
              w_kunnr
              INTO wa_objtxt
              SEPARATED BY space.
  APPEND wa_objtxt TO i_objtxt.
  CLEAR wa_objtxt.                        "blank line
  APPEND wa_objtxt TO i_objtxt.
*  Complete Payment Doc Nos
     wa_objtxt = text-t16.
    APPEND wa_objtxt TO i_objtxt.
    CLEAR: wa_fail, wa_objtxt.
    APPEND wa_objtxt TO i_objtxt.
    MOVE: text-t23   TO wa_objtxt,
          text-t24   TO wa_objtxt+17(5),
          text-t25   TO wa_objtxt+22(6),
          text-t26   TO wa_objtxt+40(18).
    APPEND wa_objtxt TO i_objtxt.
    CLEAR wa_objtxt.
 
    LOOP AT i_fail INTO wa_fail WHERE type EQ c_comp.
      DIVIDE wa_fail-disper BY 100.
      MOVE: wa_fail-belnr   TO wa_objtxt,
            wa_fail-buzei   TO wa_objtxt+17(5),
            wa_fail-wrbtr   TO wa_objtxt+22(16),
            wa_fail-disper  TO wa_objtxt+40(18).
      APPEND wa_objtxt TO i_objtxt.
      CLEAR: wa_fail, wa_objtxt.
    ENDLOOP.
  
* MAIL BODY-LENGTH
  DESCRIBE TABLE i_objtxt LINES l_l1.
  CLEAR wa_objpack-transf_bin.
  wa_objpack-head_start = lc_1.
  wa_objpack-head_num = lc_0.
  wa_objpack-body_start = lc_1.
  wa_objpack-body_num = l_l1.
  wa_objpack-doc_type = lc_raw.
  APPEND wa_objpack TO i_objpack.
 
*SUBJECT
  CLEAR wa_doc_chng.
  wa_doc_chng-obj_name  = text-t15.
  wa_doc_chng-obj_descr = text-t15.
ENDFORM.                    " mail_body
 
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  send_mail
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
FORM send_mail.
  CONSTANTS: lc_c       TYPE so_escape VALUE 'C',
             lc_mode(3) TYPE c         VALUE 'INT'.
  CLEAR: wa_reclist, i_reclist[].
*Recipient list
  wa_reclist-receiver = text-t14.       "DL
  wa_reclist-rec_type = lc_c.
  APPEND wa_reclist TO i_reclist.
 
  CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
      EXPORTING
        document_data                    = wa_doc_chng
        put_in_outbox                    = c_x
*     IMPORTING
*       SENT_TO_ALL                      =
*       NEW_OBJECT_ID                    =
      TABLES
        packing_list                     = i_objpack
*       OBJECT_HEADER                    =
*       CONTENTS_BIN                     =
        contents_txt                     = i_objtxt
*       CONTENTS_HEX                     =
*       OBJECT_PARA                      =
*       OBJECT_PARB                      =
        receivers                        = i_reclist
     EXCEPTIONS
       too_many_receivers               = 1
       document_not_sent                = 2
       document_type_not_exist          = 3
       operation_no_authorization       = 4
       parameter_error                  = 5
       x_error                          = 6
       enqueue_error                    = 7
       OTHERS                           = 8.
*    IF SY-SUBRC  0.
*    ENDIF.
  IF sy-subrc IS INITIAL.
*Send mail immediately
    SUBMIT rsconn01 USING SELECTION-SET lc_mode AND RETURN.
    CALL FUNCTION 'SO_DEQUEUE_UPDATE_LOCKS'.
  ELSE.
    RAISE mail_not_sent.
  ENDIF.
ENDFORM.                    " send_mail

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinod.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 May 2008 12:05:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-so-document-send-api1/m-p/3832386#M921567</guid>
      <dc:creator>vinod_vemuru2</dc:creator>
      <dc:date>2008-05-18T12:05:22Z</dc:date>
    </item>
  </channel>
</rss>

