<?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 Extracting material from a string in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/extracting-material-from-a-string/m-p/11436948#M1927894</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am selecting from workflow table (swwwihead). In the field&amp;nbsp; wi_text, there is a detailed description of the workflow message. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Examples:&lt;/P&gt;&lt;P&gt;317837-0010: US10: Ready for Dchain 03&lt;/P&gt;&lt;P&gt;17627 : IN10 : System Error - DChain 10 Not Set&lt;/P&gt;&lt;P&gt;358094-045 : AU10 : System Error - DChain 10 Not Set&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you notice, we have material numbers of all different lengths. Does anyone know if SAP has any standard functionality (FM or BAPI or built in function) to pass a string and extract the material number in that string? Or know of a workflow table other than &lt;SPAN style="font-size: 13.3333px;"&gt;swwwihead that may have this information?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am currently parsing the string first assuming it is a 10 digit material. &lt;/P&gt;&lt;P&gt;I then am using the BAPI BAPI_MATERIAL_EXISTENCECHECK to see if the material exists in our system&lt;/P&gt;&lt;P&gt;If it doesn't I parse the string down 1 character and run the BAPI again, etc. &lt;/P&gt;&lt;P&gt;This is obviously not an ideal solution so was wondering if anyone had any better ideas. &lt;/P&gt;&lt;P&gt;I have searched around but haven't had any luck. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Nov 2015 16:15:58 GMT</pubDate>
    <dc:creator>former_member447950</dc:creator>
    <dc:date>2015-11-18T16:15:58Z</dc:date>
    <item>
      <title>Extracting material from a string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/extracting-material-from-a-string/m-p/11436948#M1927894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am selecting from workflow table (swwwihead). In the field&amp;nbsp; wi_text, there is a detailed description of the workflow message. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Examples:&lt;/P&gt;&lt;P&gt;317837-0010: US10: Ready for Dchain 03&lt;/P&gt;&lt;P&gt;17627 : IN10 : System Error - DChain 10 Not Set&lt;/P&gt;&lt;P&gt;358094-045 : AU10 : System Error - DChain 10 Not Set&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you notice, we have material numbers of all different lengths. Does anyone know if SAP has any standard functionality (FM or BAPI or built in function) to pass a string and extract the material number in that string? Or know of a workflow table other than &lt;SPAN style="font-size: 13.3333px;"&gt;swwwihead that may have this information?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am currently parsing the string first assuming it is a 10 digit material. &lt;/P&gt;&lt;P&gt;I then am using the BAPI BAPI_MATERIAL_EXISTENCECHECK to see if the material exists in our system&lt;/P&gt;&lt;P&gt;If it doesn't I parse the string down 1 character and run the BAPI again, etc. &lt;/P&gt;&lt;P&gt;This is obviously not an ideal solution so was wondering if anyone had any better ideas. &lt;/P&gt;&lt;P&gt;I have searched around but haven't had any luck. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Nov 2015 16:15:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/extracting-material-from-a-string/m-p/11436948#M1927894</guid>
      <dc:creator>former_member447950</dc:creator>
      <dc:date>2015-11-18T16:15:58Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting material from a string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/extracting-material-from-a-string/m-p/11436949#M1927895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jess,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the material value&amp;nbsp; will be stored&amp;nbsp; as first in the entries then you fix the size to be 14 (mara-matnr length), separate the special symbols(:) using&amp;nbsp; split&amp;nbsp; or&lt;/P&gt;&lt;P&gt;use. &lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;TABLES&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;: &lt;/SPAN&gt;mara&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;DATA&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;: &lt;/SPAN&gt;lv_text &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;string &lt;SPAN class="L0S52"&gt;VALUE &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;'317837-0010: US10: Ready for Dchain 03'&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; itab&amp;nbsp; &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;TABLE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;OF &lt;/SPAN&gt;string&lt;SPAN class="L0S55"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wa&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;LIKE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;LINE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;OF&amp;nbsp; &lt;/SPAN&gt;itab&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;SPLIT &lt;/SPAN&gt;lv_text &lt;SPAN class="L0S52"&gt;AT &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;':' &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;INTO &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;TABLE &lt;/SPAN&gt;itab&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;loop &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;at &lt;/SPAN&gt;itab &lt;SPAN class="L0S52"&gt;INTO &lt;/SPAN&gt;wa&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;CONDENSE &lt;/SPAN&gt;wa &lt;SPAN class="L0S52"&gt;NO&lt;/SPAN&gt;&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;GAPS&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;SELECT &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;SINGLE &lt;/SPAN&gt;matnr &lt;SPAN class="L0S52"&gt;FROM &lt;/SPAN&gt;mara &lt;SPAN class="L0S52"&gt;INTO &lt;/SPAN&gt;mara&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;matnr &lt;SPAN class="L0S52"&gt;WHERE &lt;/SPAN&gt;matnr &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;wa&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;IF &lt;/SPAN&gt;sy&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;subrc&amp;nbsp; &lt;SPAN class="L0S52"&gt;IS &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;INITIAL&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;MESSAGE &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;'Material Exit' &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;'S'&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;EXIT&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;ENDIF&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;ENDLOOP&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;Hope it helpful,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;Venkat.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Nov 2015 16:39:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/extracting-material-from-a-string/m-p/11436949#M1927895</guid>
      <dc:creator>VenkatRamesh_V</dc:creator>
      <dc:date>2015-11-18T16:39:43Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting material from a string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/extracting-material-from-a-string/m-p/11436950#M1927896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, this worked great!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Nov 2015 17:04:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/extracting-material-from-a-string/m-p/11436950#M1927896</guid>
      <dc:creator>former_member447950</dc:creator>
      <dc:date>2015-11-18T17:04:28Z</dc:date>
    </item>
  </channel>
</rss>

