<?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 code snipped SO_DOCUMENT_SEND_API1, send message to BWP in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-snipped-so-document-send-api1-send-message-to-bwp/m-p/4566466#M1077677</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't get my fm SO_DOCUMENT_SEND_API1 running to send "just" a text message to a sap office user.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could someone provide me with a code snipped for this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I always get the error mesage "Document not sent"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Thomas Roithmeier on Oct 2, 2008 11:23 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Oct 2008 09:17:09 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-10-02T09:17:09Z</dc:date>
    <item>
      <title>code snipped SO_DOCUMENT_SEND_API1, send message to BWP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-snipped-so-document-send-api1-send-message-to-bwp/m-p/4566466#M1077677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't get my fm SO_DOCUMENT_SEND_API1 running to send "just" a text message to a sap office user.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could someone provide me with a code snipped for this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I always get the error mesage "Document not sent"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Thomas Roithmeier on Oct 2, 2008 11:23 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Oct 2008 09:17:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-snipped-so-document-send-api1-send-message-to-bwp/m-p/4566466#M1077677</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-02T09:17:09Z</dc:date>
    </item>
    <item>
      <title>Re: code snipped SO_DOCUMENT_SEND_API1, send message to BWP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-snipped-so-document-send-api1-send-message-to-bwp/m-p/4566467#M1077678</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 this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: ls_body    type solisti1,
        ls_ctrl    type zzsd_return_ctrl,
        ls_doc     type sodocchgi1,
        ls_dtyp    type zzsd_dtyp,
        ls_pack    type sopcklsti1,
        ls_rec     type somlreci1,
        lt_body    type table of solisti1,
        lt_pack    type table of sopcklsti1,
        lt_pdf     type table of solisti1,
        lt_rec     type table of somlreci1,
        lv_adrnr   type lfa1-adrnr,
        lv_size    type i,
        lv_sender  type soextreci1-receiver.

*----------------------------------------------------------------------
* Set the receiver
*----------------------------------------------------------------------
  clear ls_rec.
  ls_rec-receiver = sy-uname.
  ls_rec-rec_type = 'B'.
  ls_rec-express  = 'X'.
  append ls_rec to lt_rec.

*----------------------------------------------------------------------
* Fill the email object details
*----------------------------------------------------------------------
  clear ls_doc.
  ls_doc-obj_descr = 'Test Descr'.

*----------------------------------------------------------------------
* Build the email body
*----------------------------------------------------------------------
  clear ls_body.
  ls_body = 'Test text'.
  append ls_body to lt_body.
  clear ls_body.
  append ls_body to lt_body.

*----------------------------------------------------------------------
* Declare the email body format
*----------------------------------------------------------------------
  describe table lt_body lines sy-tfill.
  clear ls_pack.
  ls_pack-head_start = 1.
  ls_pack-head_num   = 0.
  ls_pack-body_start = 1.
  ls_pack-body_num   = sy-tfill.
  ls_pack-doc_type   = 'RAW'.
  append ls_pack to lt_pack.

  lv_sender = sy-uname.

*----------------------------------------------------------------------
* Send the email
*----------------------------------------------------------------------
  call function 'SO_DOCUMENT_SEND_API1'
    exporting
      document_data              = ls_doc
      sender_address             = lv_sender
      sender_address_type        = 'B'
    tables
      packing_list               = lt_pack
      contents_txt               = lt_body
      receivers                  = lt_rec
    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 &amp;lt;&amp;gt; 0 ).
    write: / 'Error', sy-subrc.
  else.
    write: 'Doc sent'.
  endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Darren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Oct 2008 09:31:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-snipped-so-document-send-api1-send-message-to-bwp/m-p/4566467#M1077678</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-02T09:31:22Z</dc:date>
    </item>
    <item>
      <title>Re: code snipped SO_DOCUMENT_SEND_API1, send message to BWP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-snipped-so-document-send-api1-send-message-to-bwp/m-p/4566468#M1077679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Look at FM ZCSS_SEND_EMAIL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or a this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; CALL FUNCTION 'SO_DOCUMENT_SEND_API1'                   "#EC FB_OLDED&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      document_data                    = document_data&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      PUT_IN_OUTBOX                    = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      sender_address                   = sender_address&lt;/P&gt;&lt;P&gt;      sender_address_type              = sender_address_type&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;      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                     = plist&lt;/P&gt;&lt;P&gt;      object_header                    = object_header&lt;/P&gt;&lt;P&gt;      contents_bin                     = so_ali&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      CONTENTS_TXT                     =&lt;/P&gt;&lt;/LI&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                        = rec_tab&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;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Oct 2008 09:32:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-snipped-so-document-send-api1-send-message-to-bwp/m-p/4566468#M1077679</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-02T09:32:48Z</dc:date>
    </item>
  </channel>
</rss>

