<?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>Question Re: Remove last carriage return from address string in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/remove-last-carriage-return-from-address-string/qaa-p/12257581#M4590700</link>
    <description>&lt;P&gt;Hey  &lt;SPAN class="mention-scrubbed"&gt;dell.stinnett-christy&lt;/SPAN&gt;y,&lt;/P&gt;&lt;P&gt;No luck with that, it didnt change it at all, still the full address block with all carriage returns.&lt;/P&gt;&lt;P&gt;(also you missed a closing bracket in the code i had to add in &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; )&lt;/P&gt;</description>
    <pubDate>Mon, 10 Aug 2020 23:46:15 GMT</pubDate>
    <dc:creator>lsauser</dc:creator>
    <dc:date>2020-08-10T23:46:15Z</dc:date>
    <item>
      <title>Remove last carriage return from address string</title>
      <link>https://community.sap.com/t5/technology-q-a/remove-last-carriage-return-from-address-string/qaq-p/12257579</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
  &lt;P&gt;I have an address block like such;&lt;/P&gt;
  &lt;P&gt;123 Fake St&lt;BR /&gt;Suburb, VIC&lt;BR /&gt;4512&lt;/P&gt;
  &lt;P&gt;I want to only remove the last carriage return so it looks like;&lt;/P&gt;
  &lt;P&gt;123 Fake St&lt;BR /&gt;Suburb VIC 4512&lt;/P&gt;
  &lt;P&gt;I know i can use the following to get rid of all the carriage returns which does put it all on one line and i have played around with this with no luck getting it right. I have a feeling i need to use a combination of instr, strreverse and right but havent been able to get the logic to work.&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;replace({Header.Address},chrw(13),'')&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;As always, any help is greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 04:13:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/remove-last-carriage-return-from-address-string/qaq-p/12257579</guid>
      <dc:creator>lsauser</dc:creator>
      <dc:date>2020-08-10T04:13:06Z</dc:date>
    </item>
    <item>
      <title>Re: Remove last carriage return from address string</title>
      <link>https://community.sap.com/t5/technology-q-a/remove-last-carriage-return-from-address-string/qaa-p/12257580#M4590699</link>
      <description>&lt;P&gt;Try something like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;If Right({Header.Address}, 1) = chrw(13) then
  left({Header.Address}, len({Header.Address}) - 1
else
  {Header.Address}&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;-Dell&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 13:47:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/remove-last-carriage-return-from-address-string/qaa-p/12257580#M4590699</guid>
      <dc:creator>DellSC</dc:creator>
      <dc:date>2020-08-10T13:47:42Z</dc:date>
    </item>
    <item>
      <title>Re: Remove last carriage return from address string</title>
      <link>https://community.sap.com/t5/technology-q-a/remove-last-carriage-return-from-address-string/qaa-p/12257581#M4590700</link>
      <description>&lt;P&gt;Hey  &lt;SPAN class="mention-scrubbed"&gt;dell.stinnett-christy&lt;/SPAN&gt;y,&lt;/P&gt;&lt;P&gt;No luck with that, it didnt change it at all, still the full address block with all carriage returns.&lt;/P&gt;&lt;P&gt;(also you missed a closing bracket in the code i had to add in &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; )&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 23:46:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/remove-last-carriage-return-from-address-string/qaa-p/12257581#M4590700</guid>
      <dc:creator>lsauser</dc:creator>
      <dc:date>2020-08-10T23:46:15Z</dc:date>
    </item>
    <item>
      <title>Re: Remove last carriage return from address string</title>
      <link>https://community.sap.com/t5/technology-q-a/remove-last-carriage-return-from-address-string/qaa-p/12257582#M4590701</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I believe you are using the crystal report for SAP Business One, I suggest you directly pick the address from the BP Master address lines in order to avoid this issue.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2020 02:13:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/remove-last-carriage-return-from-address-string/qaa-p/12257582#M4590701</guid>
      <dc:creator>msundararaja_perumal</dc:creator>
      <dc:date>2020-08-11T02:13:15Z</dc:date>
    </item>
    <item>
      <title>Re: Remove last carriage return from address string</title>
      <link>https://community.sap.com/t5/technology-q-a/remove-last-carriage-return-from-address-string/qaa-p/12257583#M4590702</link>
      <description>&lt;P&gt;Actually, if you're dealing with Windows text, the end of line is two characters - CR/LF (carriage return, line feed)  In that case, you can change the formula to this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;If Right({Header.Address}, 2) = (chrw(13) + chrw(10)) then
  left({Header.Address}, len({Header.Address})) - 2
else
  {Header.Address}&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 11 Aug 2020 13:56:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/remove-last-carriage-return-from-address-string/qaa-p/12257583#M4590702</guid>
      <dc:creator>DellSC</dc:creator>
      <dc:date>2020-08-11T13:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: Remove last carriage return from address string</title>
      <link>https://community.sap.com/t5/technology-q-a/remove-last-carriage-return-from-address-string/qaa-p/12257584#M4590703</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Please try with below code but condition is you know the last some characters from data.&lt;/P&gt;&lt;P&gt;With using below coding I differentiate on two parts, part 1 is for left side all data and part 2 is for replace chr(13) to ' ').&lt;/P&gt;&lt;P&gt;Part 1&lt;/P&gt;&lt;P&gt;left ("123 Fake St" &amp;amp; chr(13) &amp;amp; "Suburb, VIC" &amp;amp; chr(13) &amp;amp; "4512",len("123 Fake St" &amp;amp; chr(13) &amp;amp; "Suburb, VIC" &amp;amp; chr(13) &amp;amp; "4512")-5 ) &lt;/P&gt;&lt;P&gt;Part 2&lt;/P&gt;&lt;P&gt;Replace ("123 Fake St" &amp;amp; chr(13) &amp;amp; "Suburb, VIC" &amp;amp; chr(13) &amp;amp; "4512",chr(13), ' ', len("123 Fake St" &amp;amp; chr(13) &amp;amp; "Suburb, VIC" &amp;amp; chr(13) &amp;amp; "4512")-4)&lt;/P&gt;&lt;P&gt;Whole query&lt;/P&gt;&lt;P&gt;left ("123 Fake St" &amp;amp; chr(13) &amp;amp; "Suburb, VIC" &amp;amp; chr(13) &amp;amp; "4512",len("123 Fake St" &amp;amp; chr(13) &amp;amp; "Suburb, VIC" &amp;amp; chr(13) &amp;amp; "4512")-5 ) &amp;amp;
Replace ("123 Fake St" &amp;amp; chr(13) &amp;amp; "Suburb, VIC" &amp;amp; chr(13) &amp;amp; "4512",chr(13), ' ', len("123 Fake St" &amp;amp; chr(13) &amp;amp; "Suburb, VIC" &amp;amp; chr(13) &amp;amp; "4512")-4)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If any further query please inform.&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;- Rajkumar Mane&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2020 14:00:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/remove-last-carriage-return-from-address-string/qaa-p/12257584#M4590703</guid>
      <dc:creator>former_member308222</dc:creator>
      <dc:date>2020-08-11T14:00:25Z</dc:date>
    </item>
    <item>
      <title>Re: Remove last carriage return from address string</title>
      <link>https://community.sap.com/t5/technology-q-a/remove-last-carriage-return-from-address-string/qaa-p/12257585#M4590704</link>
      <description>&lt;P&gt;Thanks for your input  &lt;SPAN class="mention-scrubbed"&gt;rajkumar.mane&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;Wont this only work with that example address i provided?&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nick&lt;/P&gt;</description>
      <pubDate>Wed, 12 Aug 2020 05:18:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/remove-last-carriage-return-from-address-string/qaa-p/12257585#M4590704</guid>
      <dc:creator>lsauser</dc:creator>
      <dc:date>2020-08-12T05:18:37Z</dc:date>
    </item>
    <item>
      <title>Re: Remove last carriage return from address string</title>
      <link>https://community.sap.com/t5/technology-q-a/remove-last-carriage-return-from-address-string/qaa-p/12257586#M4590705</link>
      <description>&lt;P&gt;Error: A number, currency, amount, date, time or date-time is required here.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Aug 2020 23:50:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/remove-last-carriage-return-from-address-string/qaa-p/12257586#M4590705</guid>
      <dc:creator>lsauser</dc:creator>
      <dc:date>2020-08-12T23:50:33Z</dc:date>
    </item>
    <item>
      <title>Re: Remove last carriage return from address string</title>
      <link>https://community.sap.com/t5/technology-q-a/remove-last-carriage-return-from-address-string/qaa-p/12257587#M4590706</link>
      <description>&lt;P&gt;I missed a closing parenthesis:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;IfRight({Header.Address},1)= chrw(13)then
  left({Header.Address},len({Header.Address})-1)
else
  {Header.Address}&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 13 Aug 2020 13:29:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/remove-last-carriage-return-from-address-string/qaa-p/12257587#M4590706</guid>
      <dc:creator>DellSC</dc:creator>
      <dc:date>2020-08-13T13:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: Remove last carriage return from address string</title>
      <link>https://community.sap.com/t5/technology-q-a/remove-last-carriage-return-from-address-string/qaa-p/12257588#M4590707</link>
      <description>&lt;P&gt;Hey  &lt;SPAN class="mention-scrubbed"&gt;dell.stinnett-christy&lt;/SPAN&gt; ,&lt;/P&gt;&lt;P&gt;This didnt change it at all, it still looks like the original&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nick&lt;/P&gt;</description>
      <pubDate>Thu, 13 Aug 2020 23:22:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/remove-last-carriage-return-from-address-string/qaa-p/12257588#M4590707</guid>
      <dc:creator>lsauser</dc:creator>
      <dc:date>2020-08-13T23:22:55Z</dc:date>
    </item>
    <item>
      <title>Re: Remove last carriage return from address string</title>
      <link>https://community.sap.com/t5/technology-q-a/remove-last-carriage-return-from-address-string/qaa-p/12257589#M4590708</link>
      <description>&lt;P&gt;Hi Nick,&lt;/P&gt;&lt;P&gt;Perhaps you can make the STRING_SPLIT function work for you:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT value 
FROM STRING_SPLIT('123 Fake St
Suburb, VIC
4512', (CHRW(13)+CHRW(10)));&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Johan&lt;/P&gt;&lt;P&gt;P.S. If this is for use with SAP Business One, you should look into using the RDR12, DLN12, INV12 tables. These tables hold the separated address components.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Aug 2020 12:30:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/remove-last-carriage-return-from-address-string/qaa-p/12257589#M4590708</guid>
      <dc:creator>Johan_Hakkesteegt</dc:creator>
      <dc:date>2020-08-14T12:30:38Z</dc:date>
    </item>
    <item>
      <title>Re: Remove last carriage return from address string</title>
      <link>https://community.sap.com/t5/technology-q-a/remove-last-carriage-return-from-address-string/qaa-p/12257590#M4590709</link>
      <description>&lt;P&gt;Sorry...  I meant to do this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;If Right({Header.Address},2)=(chrw(13)+ chrw(10)) then
  left({Header.Address},len({Header.Address})-2)
else
  {Header.Address}&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The second close parenthesis in the second line needed to be at the end of the line.&lt;/P&gt;&lt;P&gt;-Dell&lt;/P&gt;</description>
      <pubDate>Fri, 14 Aug 2020 13:25:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/remove-last-carriage-return-from-address-string/qaa-p/12257590#M4590709</guid>
      <dc:creator>DellSC</dc:creator>
      <dc:date>2020-08-14T13:25:28Z</dc:date>
    </item>
    <item>
      <title>Re: Remove last carriage return from address string</title>
      <link>https://community.sap.com/t5/technology-q-a/remove-last-carriage-return-from-address-string/qaa-p/12257591#M4590710</link>
      <description>&lt;P&gt;Hey  &lt;SPAN class="mention-scrubbed"&gt;dell.stinnett-christy&lt;/SPAN&gt; ,&lt;/P&gt;&lt;P&gt;Still no luck with this code, i modified it to check the condition and to give me a "Yes" or "No" answer whether a chrw(13) or (10) was picked up but it only ever returned "No" regardless of which number i used for the character.&lt;/P&gt;&lt;P&gt;This is weird considering if i use the replace function in my original post, it does actually replace all of them, including the one between state and postcode i am trying to target...&lt;/P&gt;</description>
      <pubDate>Tue, 18 Aug 2020 02:25:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/remove-last-carriage-return-from-address-string/qaa-p/12257591#M4590710</guid>
      <dc:creator>lsauser</dc:creator>
      <dc:date>2020-08-18T02:25:26Z</dc:date>
    </item>
    <item>
      <title>Re: Remove last carriage return from address string</title>
      <link>https://community.sap.com/t5/technology-q-a/remove-last-carriage-return-from-address-string/qaa-p/12257592#M4590711</link>
      <description>&lt;P&gt;Hey Johan,&lt;/P&gt;&lt;P&gt;Thanks for the input on this one. Unfortunately i would prefer if this could be done with a crystal formula. I didnt write this particular report myself and the way they have done the commands and table joins is a bit beyond me.&lt;/P&gt;&lt;P&gt;A crystal formula will be the most efficient way for this one.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nick&lt;/P&gt;</description>
      <pubDate>Tue, 18 Aug 2020 02:28:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/remove-last-carriage-return-from-address-string/qaa-p/12257592#M4590711</guid>
      <dc:creator>lsauser</dc:creator>
      <dc:date>2020-08-18T02:28:33Z</dc:date>
    </item>
    <item>
      <title>Re: Remove last carriage return from address string</title>
      <link>https://community.sap.com/t5/technology-q-a/remove-last-carriage-return-from-address-string/qaa-p/12257593#M4590712</link>
      <description>&lt;P&gt;I even made a formula to give me right({Header.Address},6) which returned a blank character, i then made another formula to give me the ASCII code for the returned character and it was 13..&lt;/P&gt;&lt;P&gt;Now when i went to check IF right({Header.Address},6) was = chr(13) it came back "No"&lt;/P&gt;&lt;P&gt;I dont know why this is proving so difficult.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nick&lt;/P&gt;</description>
      <pubDate>Tue, 18 Aug 2020 03:18:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/remove-last-carriage-return-from-address-string/qaa-p/12257593#M4590712</guid>
      <dc:creator>lsauser</dc:creator>
      <dc:date>2020-08-18T03:18:04Z</dc:date>
    </item>
    <item>
      <title>Re: Remove last carriage return from address string</title>
      <link>https://community.sap.com/t5/technology-q-a/remove-last-carriage-return-from-address-string/qaa-p/12257594#M4590713</link>
      <description>&lt;P&gt;Let's try something different...&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;StrReverse(Replace(Replace(StrReverse({Header.Address}), chr(10), "", 1, 1), chr(13), "", 1, 1))&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This will reverse the string so that the last characters are now the first.  Then it will replace the first occurrence of chr(10) and chr(13) with blanks, then it will reverse the string back to its original order.&lt;/P&gt;&lt;P&gt;-Dell&lt;/P&gt;</description>
      <pubDate>Tue, 18 Aug 2020 15:17:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/remove-last-carriage-return-from-address-string/qaa-p/12257594#M4590713</guid>
      <dc:creator>DellSC</dc:creator>
      <dc:date>2020-08-18T15:17:01Z</dc:date>
    </item>
    <item>
      <title>Re: Remove last carriage return from address string</title>
      <link>https://community.sap.com/t5/technology-q-a/remove-last-carriage-return-from-address-string/qaa-p/12257595#M4590714</link>
      <description>&lt;P&gt;That worked! Thanks so much Dell, ive been scratching my head over this for a while now. I tried applying this logic but couldnt get the code right myself.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nick&lt;/P&gt;</description>
      <pubDate>Tue, 18 Aug 2020 23:13:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/remove-last-carriage-return-from-address-string/qaa-p/12257595#M4590714</guid>
      <dc:creator>lsauser</dc:creator>
      <dc:date>2020-08-18T23:13:38Z</dc:date>
    </item>
  </channel>
</rss>

