<?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: substring select in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/substring-select/m-p/3755064#M903382</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;Just copy the following code &amp;amp; execute it. This pgm selects all records from MAKT where 3rd character of the description is 'E'. You may run &amp;amp; see. This is the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF t_makt.&lt;/P&gt;&lt;P&gt;        INCLUDE STRUCTURE makt.&lt;/P&gt;&lt;P&gt;TYPES: END OF t_makt.&lt;/P&gt;&lt;P&gt;DATA: t_makt TYPE TABLE OF t_makt,&lt;/P&gt;&lt;P&gt;      t_makt_wa TYPE t_makt.&lt;/P&gt;&lt;P&gt;  data: w_ii type i.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;tables makt.&lt;/P&gt;&lt;P&gt;Select * from makt into table t_makt&lt;/P&gt;&lt;P&gt;where maktx like '__E%'.&lt;/P&gt;&lt;P&gt;break-point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Raju Chitale&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 May 2008 07:26:16 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-07T07:26:16Z</dc:date>
    <item>
      <title>substring select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/substring-select/m-p/3755061#M903379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi all&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameters : p_fam(3) type c.&lt;/P&gt;&lt;P&gt;Select single Prodh&lt;EM&gt;8(3) from t179 into gv_family where prodh&lt;/EM&gt;8(3) = p_fam.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write : gv_family.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to validation like this.&lt;/P&gt;&lt;P&gt;But this code is not working, let anybody know how to solve this substring.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any keyword help is appreciable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Madhavi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 May 2008 13:36:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/substring-select/m-p/3755061#M903379</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-06T13:36:52Z</dc:date>
    </item>
    <item>
      <title>Re: substring select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/substring-select/m-p/3755062#M903380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can't use the substring directly in the select query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try to get all relevent records into an internal table and than do the substring processing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 May 2008 13:40:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/substring-select/m-p/3755062#M903380</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2008-05-06T13:40:02Z</dc:date>
    </item>
    <item>
      <title>Re: substring select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/substring-select/m-p/3755063#M903381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: gv_fam_pattern TYPE prodh,
      gv_prodh TYPE prodh.

CONCATENATE '________' p_fam '%' INTO gv_fam_pattern.
SELECT SINGLE prodh 
         INTO gv_prodh 
         FROM t179 
        WHERE prodh LIKE gv_fam_pattern.
gv_family = gv_prodh+8(3).
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: above code was not checked or tested, use at your own risk. For one, it will not handle families of less than 3 characters nicely.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or use native SQL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Oh, and tell your analysts to not put smarts or meaning into object ID's.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gert.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 May 2008 13:51:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/substring-select/m-p/3755063#M903381</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-06T13:51:40Z</dc:date>
    </item>
    <item>
      <title>Re: substring select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/substring-select/m-p/3755064#M903382</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;Just copy the following code &amp;amp; execute it. This pgm selects all records from MAKT where 3rd character of the description is 'E'. You may run &amp;amp; see. This is the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF t_makt.&lt;/P&gt;&lt;P&gt;        INCLUDE STRUCTURE makt.&lt;/P&gt;&lt;P&gt;TYPES: END OF t_makt.&lt;/P&gt;&lt;P&gt;DATA: t_makt TYPE TABLE OF t_makt,&lt;/P&gt;&lt;P&gt;      t_makt_wa TYPE t_makt.&lt;/P&gt;&lt;P&gt;  data: w_ii type i.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;tables makt.&lt;/P&gt;&lt;P&gt;Select * from makt into table t_makt&lt;/P&gt;&lt;P&gt;where maktx like '__E%'.&lt;/P&gt;&lt;P&gt;break-point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Raju Chitale&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 May 2008 07:26:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/substring-select/m-p/3755064#M903382</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-07T07:26:16Z</dc:date>
    </item>
  </channel>
</rss>

