<?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: ABAP Trim Statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-trim-statement/m-p/3494028#M840360</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just for correctness&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in ABAP&lt;/P&gt;&lt;P&gt;field&lt;EM&gt;n(m) extracts m characters starting from the the character at position n&lt;/EM&gt;1&lt;/P&gt;&lt;P&gt;e.g. if field contains the string 'ABCDEFG' the statement field+2(3) returns the string 'CDE'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in VB&lt;/P&gt;&lt;P&gt;the statement Mid$(string,n,m) extracts m characters starting from the n-th character, &lt;/P&gt;&lt;P&gt;e.g. if string is 'ABCDEFG' the statement Mid$(string,2,3) returns the string 'BCD'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bye, Antonino&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 09 Mar 2008 08:34:28 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-09T08:34:28Z</dc:date>
    <item>
      <title>ABAP Trim Statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-trim-statement/m-p/3494026#M840358</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;&lt;/P&gt;&lt;P&gt;Have an issue where special characters you can't see via se16 are at the end of a character field. I need a way to strip them off via abap. Is there a good way to do this? New to abap, so be gentle. Have tried about everything including shift. Is there a trim command that can be used?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Mar 2008 06:42:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-trim-statement/m-p/3494026#M840358</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-09T06:42:16Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Trim Statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-trim-statement/m-p/3494027#M840359</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;The VB "trim" sentence is CONDENSE in ABAP. But CONDENSE drops all spaces before and after the string. I think you are looking for something like mid$, Left$ or Right$ (in VB again).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use substrings to do that, like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;    DATA: chars TYPE I.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;chars = strlen( yourstring ) - 1.&lt;/P&gt;&lt;P&gt;IF yourstring+chars = yourspecialchar.&lt;/P&gt;&lt;P&gt;  yourstring = yourstring(chars).&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That mini-code sample takes the lenght of your string (minus the last character), and checks that last character. If that last one is the special one you are trying to drop, the sentence between IF-ENDIF drops it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Substrings are used like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;        string+pos1(pos2)&lt;/P&gt;&lt;P&gt;where pos1 is the amount of characters displaced from the beguinning and pos2 the number of characters taken.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IE: string+pos1(pos2) would be the same than VB's Mid$(string, pos1, pos2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wish it helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Cheers,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Chandra Sekhar.&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Mar 2008 08:17:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-trim-statement/m-p/3494027#M840359</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-09T08:17:57Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Trim Statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-trim-statement/m-p/3494028#M840360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just for correctness&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in ABAP&lt;/P&gt;&lt;P&gt;field&lt;EM&gt;n(m) extracts m characters starting from the the character at position n&lt;/EM&gt;1&lt;/P&gt;&lt;P&gt;e.g. if field contains the string 'ABCDEFG' the statement field+2(3) returns the string 'CDE'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in VB&lt;/P&gt;&lt;P&gt;the statement Mid$(string,n,m) extracts m characters starting from the n-th character, &lt;/P&gt;&lt;P&gt;e.g. if string is 'ABCDEFG' the statement Mid$(string,2,3) returns the string 'BCD'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bye, Antonino&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Mar 2008 08:34:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-trim-statement/m-p/3494028#M840360</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-09T08:34:28Z</dc:date>
    </item>
  </channel>
</rss>

