<?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: Applying substring to internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/applying-substring-to-internal-table/m-p/12292800#M1989586</link>
    <description>&lt;P&gt;I don't understand the question. SOBID is 45 characters. Maybe your question is:&lt;/P&gt;&lt;UL&gt;
&lt;LI&gt;Remove all characters from 11th character included (to remove "9999" in your example)
&lt;/LI&gt;&lt;LI&gt;Then remove leading zeroes&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;If yes, that would be: (read &lt;A href="https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abensql_functions_string.htm"&gt;ABAP doc SQL String Functions&lt;/A&gt; for more information)&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT SINGLE ltrim( left( sobid, 10 ) , '0' ) AS sobid ...&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;NB: don't you have native ABAP functions to operate directly on SOBID value? (like WRITE or a function module) It seems that there are many questions around HRP1001-SOBID, did your read the answers?&lt;/P&gt;</description>
    <pubDate>Sun, 04 Oct 2020 07:55:40 GMT</pubDate>
    <dc:creator>Sandra_Rossi</dc:creator>
    <dc:date>2020-10-04T07:55:40Z</dc:date>
    <item>
      <title>Applying substring to internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/applying-substring-to-internal-table/m-p/12292798#M1989584</link>
      <description>&lt;P&gt;Hello, &lt;/P&gt;
  &lt;P&gt;I have the following selection into internal table. &lt;/P&gt;
  &lt;P&gt;SELECT SINGLE sobid &lt;/P&gt;
  &lt;P&gt; FROM hrp1001 &lt;/P&gt;
  &lt;P&gt;INTO @wa_hrp1001-var_sobid &lt;/P&gt;
  &lt;P&gt; WHERE otype = 'O' &lt;/P&gt;
  &lt;P&gt;AND plvar = '01' AND relat = '011' &lt;/P&gt;
  &lt;P&gt;AND endda GE '99991231' &lt;/P&gt;
  &lt;P&gt;AND subty = 'A011' &lt;/P&gt;
  &lt;P&gt;AND sclas = 'K' AND objid = @wa_hrp1001-var_objid.&lt;/P&gt;
  &lt;P&gt;This produces the output: 0000555559999.&lt;/P&gt;
  &lt;P&gt;I would like to remove the leading 0 and 9999. I have removed leading 0 by SHIFT wa_hrp1001-var_sobid LEFT DELETING LEADING '0'. I can remove the 9999, in a test, by giving a value with:&lt;/P&gt;
  &lt;P&gt;DATA: str TYPE string VALUE '555559999. &lt;/P&gt;
  &lt;P&gt; str = substring( val = str off = 0 len = strlen( str ) - 4 ). write: str.&lt;/P&gt;
  &lt;P&gt;My question is, how do I loop or incorporate this into that column of data. &lt;/P&gt;</description>
      <pubDate>Sat, 03 Oct 2020 17:35:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/applying-substring-to-internal-table/m-p/12292798#M1989584</guid>
      <dc:creator>former_member559196</dc:creator>
      <dc:date>2020-10-03T17:35:54Z</dc:date>
    </item>
    <item>
      <title>Re: Applying substring to internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/applying-substring-to-internal-table/m-p/12292799#M1989585</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;use LIKE '%555%' this will help your requirment&lt;/P&gt;</description>
      <pubDate>Sun, 04 Oct 2020 02:26:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/applying-substring-to-internal-table/m-p/12292799#M1989585</guid>
      <dc:creator>Abinathsiva</dc:creator>
      <dc:date>2020-10-04T02:26:24Z</dc:date>
    </item>
    <item>
      <title>Re: Applying substring to internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/applying-substring-to-internal-table/m-p/12292800#M1989586</link>
      <description>&lt;P&gt;I don't understand the question. SOBID is 45 characters. Maybe your question is:&lt;/P&gt;&lt;UL&gt;
&lt;LI&gt;Remove all characters from 11th character included (to remove "9999" in your example)
&lt;/LI&gt;&lt;LI&gt;Then remove leading zeroes&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;If yes, that would be: (read &lt;A href="https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abensql_functions_string.htm"&gt;ABAP doc SQL String Functions&lt;/A&gt; for more information)&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT SINGLE ltrim( left( sobid, 10 ) , '0' ) AS sobid ...&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;NB: don't you have native ABAP functions to operate directly on SOBID value? (like WRITE or a function module) It seems that there are many questions around HRP1001-SOBID, did your read the answers?&lt;/P&gt;</description>
      <pubDate>Sun, 04 Oct 2020 07:55:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/applying-substring-to-internal-table/m-p/12292800#M1989586</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-10-04T07:55:40Z</dc:date>
    </item>
    <item>
      <title>Re: Applying substring to internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/applying-substring-to-internal-table/m-p/12292801#M1989587</link>
      <description>&lt;P&gt;Thank you Sandra and S Abinath.  Information provided was very helpful. &lt;/P&gt;&lt;P&gt;Brian&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2020 14:19:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/applying-substring-to-internal-table/m-p/12292801#M1989587</guid>
      <dc:creator>former_member559196</dc:creator>
      <dc:date>2020-10-08T14:19:31Z</dc:date>
    </item>
  </channel>
</rss>

