<?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: Select on string in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-on-string/m-p/2007909#M409458</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How do I do that if v_sqtxt is really a field in an internal table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; data: v_vgbel like itab-vgbel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  move itab-vgbel+2(8) to v_vgbel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select bukrs belnr gjahr dmbtr sgtxt&lt;/P&gt;&lt;P&gt;               into (bsik-bukrs, bsik-belnr, bsik-gjahr, bsik-dmbtr,&lt;/P&gt;&lt;P&gt;bsik-sgtxt)&lt;/P&gt;&lt;P&gt;               from bsik&lt;/P&gt;&lt;P&gt;                where bukrs = '0010'&lt;/P&gt;&lt;P&gt;                and sgtxt eq v_vgbel.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 Mar 2007 18:48:47 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-03-19T18:48:47Z</dc:date>
    <item>
      <title>Select on string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-on-string/m-p/2007905#M409454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The information below is contained in bsak-sgtxt.  I need to find all the entries in bsak that are associated with delivery  80022016.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;80022016, DED $15 DETENTION &amp;amp; 25 FRO POD  (is in field bsak-sgtxt)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If v_sgtxt = '80022016'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select belnr into bsak-belnr from bsak where sgtxt ca v_sgtxt. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get a syntax error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How should this be done?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2007 18:37:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-on-string/m-p/2007905#M409454</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-19T18:37:22Z</dc:date>
    </item>
    <item>
      <title>Re: Select on string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-on-string/m-p/2007906#M409455</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;Please try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: lv_sgtxt like bsak-sgtxt.

If v_sgtxt = '80022016'.

  lv_sgtxt = '80022016%'.

  select belnr into bsak-belnr from bsak where sgtxt like lv_sgtxt. 

endif.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ferry Lianto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2007 18:40:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-on-string/m-p/2007906#M409455</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-19T18:40:59Z</dc:date>
    </item>
    <item>
      <title>Re: Select on string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-on-string/m-p/2007907#M409456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;data: begin of i_belnr occurs 0,&lt;/P&gt;&lt;P&gt;         belnr like bsak-belnr,&lt;/P&gt;&lt;P&gt;      end of i_belnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/b&amp;gt;If v_sgtxt = '80022016'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;select belnr &lt;/P&gt;&lt;P&gt;       into table i_belnr &lt;/P&gt;&lt;P&gt;       from bsak where sgtxt ca v_sgtxt.&lt;/P&gt;&lt;P&gt;&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;endif&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2007 18:41:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-on-string/m-p/2007907#M409456</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-19T18:41:19Z</dc:date>
    </item>
    <item>
      <title>Re: Select on string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-on-string/m-p/2007908#M409457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Janet,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We may get more than one entry from BSAK table, so it needs an internal table to stroe all those values.So, Use internal table to get the result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA:
BEGIN OF ITAB OCCURS 0,
BELNR TYPE BSAK-BELNR,
END OF ITAB.

SELECT BELNR 
FROM BSAK
INTO TABLE ITAB
WHERE SGTXT LIKE '8022016%'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2007 18:42:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-on-string/m-p/2007908#M409457</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-19T18:42:16Z</dc:date>
    </item>
    <item>
      <title>Re: Select on string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-on-string/m-p/2007909#M409458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How do I do that if v_sqtxt is really a field in an internal table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; data: v_vgbel like itab-vgbel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  move itab-vgbel+2(8) to v_vgbel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select bukrs belnr gjahr dmbtr sgtxt&lt;/P&gt;&lt;P&gt;               into (bsik-bukrs, bsik-belnr, bsik-gjahr, bsik-dmbtr,&lt;/P&gt;&lt;P&gt;bsik-sgtxt)&lt;/P&gt;&lt;P&gt;               from bsik&lt;/P&gt;&lt;P&gt;                where bukrs = '0010'&lt;/P&gt;&lt;P&gt;                and sgtxt eq v_vgbel.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2007 18:48:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-on-string/m-p/2007909#M409458</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-19T18:48:47Z</dc:date>
    </item>
    <item>
      <title>Re: Select on string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-on-string/m-p/2007910#M409459</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;Please try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: v_vgbel like itab-vgbel.

move itab-vgbel+2(8) to v_vgbel.

data: v_sgtxt like bsik-sgtxt.

concatenate v_vgbel '%' into v_sgtxt.

select bukrs belnr gjahr dmbtr sgtxt
into (bsik-bukrs, bsik-belnr, bsik-gjahr, bsik-dmbtr,
bsik-sgtxt)
from bsik
where bukrs = '0010'
and sgtxt like v_sgtxt.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ferry Lianto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2007 18:56:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-on-string/m-p/2007910#M409459</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-19T18:56:24Z</dc:date>
    </item>
  </channel>
</rss>

