<?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: Adding a new entry in table TSOTD in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/adding-a-new-entry-in-table-tsotd/m-p/7858707#M1592754</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be you could add but try what the other one said.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 May 2011 20:27:57 GMT</pubDate>
    <dc:creator>former_member191735</dc:creator>
    <dc:date>2011-05-13T20:27:57Z</dc:date>
    <item>
      <title>Adding a new entry in table TSOTD</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/adding-a-new-entry-in-table-tsotd/m-p/7858705#M1592752</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;&lt;/P&gt;&lt;P&gt;I'm using the FM SO_NEW_DOCUMENT_ATT_SEND_API1 to send an email from an program abap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The program is working perfectly, but need to send a txt file as an attachment in this email.&lt;/P&gt;&lt;P&gt;When I execute the FM has an error in the execution of another FM: SBCOMS_SEND_REQUEST_CREATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm debuging the FM and found that the error is because there is no entry TXT in the table TSOTD.&lt;/P&gt;&lt;P&gt;How do I add a new entry? Or, I'm using the FM correctly?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PACKING_LIST-DOC_TYPE = 'TXT'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards, &lt;/P&gt;&lt;P&gt;Rafael Sá&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 May 2011 18:26:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/adding-a-new-entry-in-table-tsotd/m-p/7858705#M1592752</guid>
      <dc:creator>RJSA</dc:creator>
      <dc:date>2011-05-13T18:26:46Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a new entry in table TSOTD</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/adding-a-new-entry-in-table-tsotd/m-p/7858706#M1592753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use document type 'EXT' which is for PC document&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 May 2011 20:21:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/adding-a-new-entry-in-table-tsotd/m-p/7858706#M1592753</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-13T20:21:16Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a new entry in table TSOTD</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/adding-a-new-entry-in-table-tsotd/m-p/7858707#M1592754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be you could add but try what the other one said.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 May 2011 20:27:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/adding-a-new-entry-in-table-tsotd/m-p/7858707#M1592754</guid>
      <dc:creator>former_member191735</dc:creator>
      <dc:date>2011-05-13T20:27:57Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a new entry in table TSOTD</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/adding-a-new-entry-in-table-tsotd/m-p/7858708#M1592755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rafael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First of all: Do not use FM SO_NEW_DOCUMENT_ATT_SEND_API1 but CL_BCS.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FORM mail .
  DATA:
    lo_bcs                    TYPE REF TO cl_bcs,
    lt_soli                   TYPE TABLE OF soli,
    lo_document_bcs           TYPE REF TO cl_document_bcs,
    lo_sapuser_bcs            TYPE REF TO cl_sapuser_bcs,
    lo_recipient_bcs          TYPE REF TO if_recipient_bcs,
    lv_soli                   TYPE soli,
    lx_bcs                    TYPE REF TO cx_bcs,
    lv_string                 TYPE string,
    lv_done                   TYPE flag,
    lv_len                    TYPE sy-linsz,
    lv_strlen                 TYPE int4,
    lv_ofs                    TYPE sy-fdpos.
  FIELD-SYMBOLS:
    &amp;lt;soli&amp;gt;                      TYPE soli.
  TRY.
      CONCATENATE:
        'Hi.'
        'I created a program before (which runs dialog and save local TXT file) that worked fine to store up to 240 characters.'
        'But now, I create a new program to run in BACKGROUND and built a TXT file and send it attached by mail.'
        'When inside a form preparing the table lines, I use CONCATENATE statement to concatenate all fields (type c) into ls_line type text2048.'
        'Table also has type text2048.'
        'It''s truncating this text line to 255 characters.'
        'PS: When debugguing I can see all variables filled in concatenate statement, but its result is a line size truncated to 255. Even the result variable having size of 2048.'
        'What is wrong with program or concatenate ?'
        'thanks.'
        'Glauco' INTO lv_string SEPARATED BY cl_abap_char_utilities=&amp;gt;cr_lf.
      lv_strlen = strlen( lv_string ).
      APPEND INITIAL LINE TO lt_soli ASSIGNING &amp;lt;soli&amp;gt;.
      DESCRIBE FIELD &amp;lt;soli&amp;gt; LENGTH lv_len IN CHARACTER MODE.
      WHILE lv_done IS INITIAL.
        IF lv_ofs + lv_len &amp;gt; lv_strlen.
          lv_len = lv_strlen - lv_ofs.
        ENDIF.
        &amp;lt;soli&amp;gt; = lv_string+lv_ofs(lv_len).
        ADD lv_len TO lv_ofs.
        IF lv_ofs &amp;gt;= lv_strlen.
          lv_done = abap_true.
        ELSE.
          APPEND INITIAL LINE TO lt_soli ASSIGNING &amp;lt;soli&amp;gt;.
        ENDIF.
      ENDWHILE.
      lo_bcs = cl_bcs=&amp;gt;create_persistent( ).
 
*     -------- create and set lo_document_bcs -------------------------------
*     create lo_document_bcs from internal table with text
      lo_document_bcs = cl_document_bcs=&amp;gt;create_document(
                      i_type    = 'RAW'
                      i_text    = lt_soli
                      i_subject = 'More than 255 characters mail' ).
 
      lo_document_bcs-&amp;gt;add_attachment(
           i_attachment_type     = 'TXT'
          i_attachment_subject  = 'Attachment 1'
           i_att_content_text    = lt_soli
             ).
      lo_document_bcs-&amp;gt;add_attachment(
           i_attachment_type     = 'TXT'
          i_attachment_subject  = 'Attachment 2'
           i_att_content_text    = lt_soli
             ).
*     add lo_document_bcs to send request
      lo_bcs-&amp;gt;set_document( lo_document_bcs ).
 
*     --------- set lo_sapuser_bcs -------------------------------------------
*     note: this is necessary only if you want to set the lo_sapuser_bcs
*           different from actual user (SY-UNAME). Otherwise lo_sapuser_bcs is
*           set automatically with actual user.
 
      lo_sapuser_bcs = cl_sapuser_bcs=&amp;gt;create( sy-uname ).
      lo_bcs-&amp;gt;set_sender( i_sender = lo_sapuser_bcs ).
 
*     --------- add lo_recipient_bcs (e-mail address) -----------------------
*     create lo_recipient_bcs - please replace e-mail address !!!
      lo_recipient_bcs = cl_cam_address_bcs=&amp;gt;create_internet_address(
                                        'mail_ID_at_subdomain.domain' ).
 
*     add lo_recipient_bcs with its respective attributes to send request
      lo_bcs-&amp;gt;add_recipient(
          i_recipient = lo_recipient_bcs
          i_express   = abap_true ).
      lo_bcs-&amp;gt;set_send_immediately( abap_true ).
*     ---------- send lo_document_bcs ---------------------------------------
      lo_bcs-&amp;gt;send( abap_true ).
 
      COMMIT WORK.
    CATCH cx_send_req_bcs cx_document_bcs cx_address_bcs .
      MESSAGE 'Mail sending failed' TYPE 'E' .
  ENDTRY.
ENDFORM.                    " MAIL&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Here I sent a mail with two text attachments. Once you tried CL_BCS you'll never again have questions about mail from ABAP - never again will use SO_NEW_DOCUMENT....&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;Clemen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 May 2011 22:57:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/adding-a-new-entry-in-table-tsotd/m-p/7858708#M1592755</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2011-05-13T22:57:18Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a new entry in table TSOTD</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/adding-a-new-entry-in-table-tsotd/m-p/7858709#M1592756</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use SO_DOCUMENT_SEND_API1 for sending an attachment along with Email.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 May 2011 23:04:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/adding-a-new-entry-in-table-tsotd/m-p/7858709#M1592756</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-13T23:04:54Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a new entry in table TSOTD</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/adding-a-new-entry-in-table-tsotd/m-p/7858710#M1592757</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Clemens is right, and as he said, don't use SO_NEW_DOCUMENT_ATT_SEND_API1&lt;/P&gt;&lt;P&gt;nor SO_DOCUMENT_SEND_API1&lt;/P&gt;&lt;P&gt;nor SO_NEW_DOCUMENT_SEND_API1&lt;/P&gt;&lt;P&gt;nor SO_OLD_DOCUMENT_SEND_API1&lt;/P&gt;&lt;P&gt;nor SO_OBJECT_SEND&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ONLY USE CL_BCS&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(did you see that the forum questions were only about SO* function modules, there must be a reason!)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 May 2011 11:58:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/adding-a-new-entry-in-table-tsotd/m-p/7858710#M1592757</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2011-05-14T11:58:51Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a new entry in table TSOTD</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/adding-a-new-entry-in-table-tsotd/m-p/7858711#M1592758</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 another problem concerning CL_BCS :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How is it possible to send new extension Office documents by FAX with this class ?&lt;/P&gt;&lt;P&gt;I always get the error message "Unsupported attachment filetype detected! " &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to send DOCX or XSLX document by FAX....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Feb 2012 09:31:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/adding-a-new-entry-in-table-tsotd/m-p/7858711#M1592758</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-22T09:31:23Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a new entry in table TSOTD</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/adding-a-new-entry-in-table-tsotd/m-p/7858712#M1592759</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 another problem concerning CL_BCS :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How is it possible to send new extension Office documents by FAX with this class ?&lt;/P&gt;&lt;P&gt;I always get the error message "Unsupported attachment filetype detected! " &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to send DOCX or XSLX document by FAX....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Feb 2012 09:36:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/adding-a-new-entry-in-table-tsotd/m-p/7858712#M1592759</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-22T09:36:00Z</dc:date>
    </item>
  </channel>
</rss>

