<?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: Internal Table dynamic query in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-dynamic-query/m-p/1587458#M264756</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think one of the simplest way is to define ranges for the variables a, b, c, d and e.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ranges : r_a for a, r_b for b...r_e for e.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;refresh : r_a, r_b, r_c, r_d, r_e.  &lt;/P&gt;&lt;P&gt;clear :  r_a, r_b, r_c, r_d, r_e.  &lt;/P&gt;&lt;P&gt;if a is not initial.&lt;/P&gt;&lt;P&gt;   r_a-sign = 'I'.&lt;/P&gt;&lt;P&gt;   r_a-option = 'EQ'.&lt;/P&gt;&lt;P&gt;   r_a-low = value.&lt;/P&gt;&lt;P&gt;   append r_a.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;....similarly build for b, c, d and e.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at itab.&lt;/P&gt;&lt;P&gt;  check itab-a in r_a.&lt;/P&gt;&lt;P&gt;  check itab-b in r_b.&lt;/P&gt;&lt;P&gt; ...&lt;/P&gt;&lt;P&gt;  check itab-e in r_e.&lt;/P&gt;&lt;P&gt;  move-corresponding itab to &amp;lt;b&amp;gt;urval&amp;lt;/b&amp;gt;.&lt;/P&gt;&lt;P&gt;  exit.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Sep 2006 12:22:54 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-09-26T12:22:54Z</dc:date>
    <item>
      <title>Internal Table dynamic query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-dynamic-query/m-p/1587457#M264755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an internal table which needs to be queried with set of attributes which change dynamically. How can I do it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eg: Internal Table i_tab contains attributes a,b,c,d,e etc... Now I should extract a single line from the table based based on the values I supply for the attributes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Say if I give a=23 b='' c='abc' d='' e=''. Then the query should be able to return be the line where all the initial field attributes (here in this case b,d, and e) should not be considered for the query.&lt;/P&gt;&lt;P&gt;It shoud be &lt;/P&gt;&lt;P&gt;read table i_tab with key a= 23 c='abc'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The next time a query can be shooted with the foll values&lt;/P&gt;&lt;P&gt;a='' b='SAP' c='ERP' d='' e=''.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then the query shd be &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table i_tab with key b= 'SAP' c='ERP'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In short can I get the functionality of the "select statement dynamic search string"?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from tab where ( search string ) .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and search string would be generated dynamically based on the inputs?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would be really thankful if you can provide me an immediate answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Sandhya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Sep 2006 12:13:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-dynamic-query/m-p/1587457#M264755</guid>
      <dc:creator>sandhya_hariharan</dc:creator>
      <dc:date>2006-09-26T12:13:39Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table dynamic query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-dynamic-query/m-p/1587458#M264756</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think one of the simplest way is to define ranges for the variables a, b, c, d and e.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ranges : r_a for a, r_b for b...r_e for e.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;refresh : r_a, r_b, r_c, r_d, r_e.  &lt;/P&gt;&lt;P&gt;clear :  r_a, r_b, r_c, r_d, r_e.  &lt;/P&gt;&lt;P&gt;if a is not initial.&lt;/P&gt;&lt;P&gt;   r_a-sign = 'I'.&lt;/P&gt;&lt;P&gt;   r_a-option = 'EQ'.&lt;/P&gt;&lt;P&gt;   r_a-low = value.&lt;/P&gt;&lt;P&gt;   append r_a.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;....similarly build for b, c, d and e.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at itab.&lt;/P&gt;&lt;P&gt;  check itab-a in r_a.&lt;/P&gt;&lt;P&gt;  check itab-b in r_b.&lt;/P&gt;&lt;P&gt; ...&lt;/P&gt;&lt;P&gt;  check itab-e in r_e.&lt;/P&gt;&lt;P&gt;  move-corresponding itab to &amp;lt;b&amp;gt;urval&amp;lt;/b&amp;gt;.&lt;/P&gt;&lt;P&gt;  exit.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Sep 2006 12:22:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-dynamic-query/m-p/1587458#M264756</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-26T12:22:54Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table dynamic query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-dynamic-query/m-p/1587459#M264757</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;good&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;go through these links, which ll give you brief idea abou the dynamic internal table creation.&lt;/P&gt;&lt;P&gt;/people/rich.heilman2/blog/2005/07/27/dynamic-internal-tables-and-structures--abap&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;mrutyun^&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Sep 2006 12:23:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-dynamic-query/m-p/1587459#M264757</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-26T12:23:00Z</dc:date>
    </item>
  </channel>
</rss>

