<?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: Problem with SO_DOCUMENT_SEND_API1 in txt attachment with '#' in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-so-document-send-api1-in-txt-attachment-with/m-p/431048#M12224</link>
    <description>&lt;P&gt;Thanks for the answer Pablo, but I don't find any solution for my problem in this link.&lt;/P&gt;&lt;P&gt;María&lt;/P&gt;</description>
    <pubDate>Mon, 06 Mar 2017 14:36:09 GMT</pubDate>
    <dc:creator>maria_merino</dc:creator>
    <dc:date>2017-03-06T14:36:09Z</dc:date>
    <item>
      <title>Problem with SO_DOCUMENT_SEND_API1 in txt attachment with '#'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-so-document-send-api1-in-txt-attachment-with/m-p/431046#M12222</link>
      <description>&lt;P&gt;Hi experts,&lt;/P&gt;&lt;P&gt;I have a report that was going well until some weeks ago, I don't know if it's due to migration to hana or to unicode. &lt;/P&gt;&lt;P&gt;We we're using fm SO_DOCUMENT_SEND_API1 to send a mail with an attachment .TXT. We used&lt;/P&gt;&lt;P&gt; CONSTANTS: crlf TYPE c VALUE cl_abap_char_utilities=&amp;gt;cr_lf.&lt;/P&gt;&lt;P&gt;to separate lines and it was working fine but now it doesn't work anymore. When I debug the code I see in each line '#' indicating the new line. When I open the file attached to the mail there is no format as you can see in my attach. &lt;/P&gt;&lt;P&gt;&lt;A href="https://answers.sap.com/storage/attachments/23892-contrato.jpg"&gt;contrato.jpg&lt;/A&gt;&lt;/P&gt;&lt;P&gt;That's how I call the fm &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;  call function 'SO_DOCUMENT_SEND_API1'&lt;BR /&gt;  exporting&lt;BR /&gt;  DOCUMENT_DATA  = W_DOC_DATA&lt;BR /&gt;  PUT_IN_OUTBOX  = 'X'&lt;BR /&gt;  SENDER_ADDRESS  = LD_SENDER_ADDRESS&lt;BR /&gt;  SENDER_ADDRESS_TYPE  = LD_SENDER_ADDRESS_TYPE&lt;BR /&gt;  COMMIT_WORK  = 'X'&lt;BR /&gt;  importing&lt;BR /&gt;  SENT_TO_ALL  = W_SENT_ALL&lt;BR /&gt;  tables&lt;BR /&gt;  PACKING_LIST  = T_PACKING_LIST&lt;BR /&gt;  CONTENTS_BIN  = T_ATTACHMENT&lt;BR /&gt;  CONTENTS_TXT  = IT_MESSAGE&lt;BR /&gt;  RECEIVERS  = T_RECEIVERS&lt;BR /&gt;  exceptions&lt;BR /&gt;  TOO_MANY_RECEIVERS  = 1&lt;BR /&gt;  DOCUMENT_NOT_SENT  = 2&lt;BR /&gt;  DOCUMENT_TYPE_NOT_EXIST  = 3&lt;BR /&gt;  OPERATION_NO_AUTHORIZATION = 4&lt;BR /&gt;  PARAMETER_ERROR  = 5&lt;BR /&gt;  X_ERROR  = 6&lt;BR /&gt;  ENQUEUE_ERROR  = 7&lt;BR /&gt;  others  = 8.&lt;/P&gt;&lt;P&gt;T_ATTACHMENT contains the text attached, should I convert this internal table to binary mode ? At this moment it looks like:&lt;/P&gt;&lt;P&gt;&lt;A href="https://answers.sap.com/storage/attachments/23893-atta.jpg"&gt;atta.jpg&lt;BR /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance !!&lt;/P&gt;&lt;P&gt;María&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2017 14:11:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-so-document-send-api1-in-txt-attachment-with/m-p/431046#M12222</guid>
      <dc:creator>maria_merino</dc:creator>
      <dc:date>2017-03-06T14:11:09Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with SO_DOCUMENT_SEND_API1 in txt attachment with '#'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-so-document-send-api1-in-txt-attachment-with/m-p/431047#M12223</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;check this blog:&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" href="https://blogs.sap.com/2014/09/20/abap-and-line-feeds/"&gt;ABAP and Line Feeds&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Pablo&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2017 14:17:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-so-document-send-api1-in-txt-attachment-with/m-p/431047#M12223</guid>
      <dc:creator>former_member182371</dc:creator>
      <dc:date>2017-03-06T14:17:59Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with SO_DOCUMENT_SEND_API1 in txt attachment with '#'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-so-document-send-api1-in-txt-attachment-with/m-p/431048#M12224</link>
      <description>&lt;P&gt;Thanks for the answer Pablo, but I don't find any solution for my problem in this link.&lt;/P&gt;&lt;P&gt;María&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2017 14:36:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-so-document-send-api1-in-txt-attachment-with/m-p/431048#M12224</guid>
      <dc:creator>maria_merino</dc:creator>
      <dc:date>2017-03-06T14:36:09Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with SO_DOCUMENT_SEND_API1 in txt attachment with '#'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-so-document-send-api1-in-txt-attachment-with/m-p/431049#M12225</link>
      <description>&lt;P&gt;I'd imagine Pablo is referring to the following passage from the blog:&lt;/P&gt;&lt;P&gt;First, where  to use it &lt;STRONG&gt;not&lt;/STRONG&gt;. You cannot use a line feed character or any other control character in classical list programming. The following line&lt;/P&gt;&lt;P&gt;WRITE |aaaa\nbbbbb|.&lt;/P&gt;&lt;P&gt;produces an output like aaaa#bbbbb. The classical list processor does not recognize the control character and it does not treat it as a whitespace. It is an unknown character that is displayed as #. In classical list programming you have to use two (chained) WRITE-Statements:&lt;/P&gt;&lt;P&gt;WRITE: |aaaa|, / |bbbbb|.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2017 15:56:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-so-document-send-api1-in-txt-attachment-with/m-p/431049#M12225</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-03-06T15:56:31Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with SO_DOCUMENT_SEND_API1 in txt attachment with '#'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-so-document-send-api1-in-txt-attachment-with/m-p/431050#M12226</link>
      <description>&lt;P&gt;Why are you passing a "text" via the "binary" parameter (reserved for images, PDFs, ZIPs, etc., but NOT text), why don't you use the "text" parameter? It used to work because in the past, before Unicode, a character was a byte and vice versa. If you pass your text as a text, make sure to pass packing_list-transf_bin = abap_false. Moreover, why not using CL_BCS? See the many sample programs BCS_EXAMPLE_*.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2017 20:24:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-so-document-send-api1-in-txt-attachment-with/m-p/431050#M12226</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2017-03-06T20:24:17Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with SO_DOCUMENT_SEND_API1 in txt attachment with '#'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-so-document-send-api1-in-txt-attachment-with/m-p/431051#M12227</link>
      <description>&lt;P&gt;Absolutely. SO_DOCUMENT_SEND_API1 is not only obsolete but was always problematical. The OP should take the time to redevelop the program using CL_BCS classes. &lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2017 07:20:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-so-document-send-api1-in-txt-attachment-with/m-p/431051#M12227</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2017-03-07T07:20:28Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with SO_DOCUMENT_SEND_API1 in txt attachment with '#'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-so-document-send-api1-in-txt-attachment-with/m-p/431052#M12228</link>
      <description>&lt;P&gt;This report has been working for years, it's not me who developped it, but it's me who has to solve the problem. I've been thinking on using CL_BCS but before doing that I want to understand the problem. &lt;/P&gt;&lt;P&gt;Sandra, I'll change the parameter and tell you if it works. Thanks !&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2017 09:26:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-so-document-send-api1-in-txt-attachment-with/m-p/431052#M12228</guid>
      <dc:creator>maria_merino</dc:creator>
      <dc:date>2017-03-07T09:26:38Z</dc:date>
    </item>
  </channel>
</rss>

