<?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 Selection using not the full keys in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-using-not-the-full-keys/m-p/1397899#M192590</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Abap experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am new to abap. So, hope you can help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to select from  table where it has 3 keys and 5 data fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The record I need to find is such that I have the value of the data field which is unique in the table although a non-key. There will only always be 1 unique value for this field in this table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the same time, the problem is, I do not have the last key value to select from the table. But I know it must not be '0'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can I still select and find the record that I want from the table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, can I do this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from table where key1 = 'A' AND key2 = 'B' AND key3 &amp;lt;&amp;gt; '0' AND data1 = 100? Can data field be part of a select statement selection condition?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Seeking your advise please.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mirella&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 17 Jun 2006 17:28:45 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-06-17T17:28:45Z</dc:date>
    <item>
      <title>Selection using not the full keys</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-using-not-the-full-keys/m-p/1397899#M192590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Abap experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am new to abap. So, hope you can help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to select from  table where it has 3 keys and 5 data fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The record I need to find is such that I have the value of the data field which is unique in the table although a non-key. There will only always be 1 unique value for this field in this table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the same time, the problem is, I do not have the last key value to select from the table. But I know it must not be '0'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can I still select and find the record that I want from the table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, can I do this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from table where key1 = 'A' AND key2 = 'B' AND key3 &amp;lt;&amp;gt; '0' AND data1 = 100? Can data field be part of a select statement selection condition?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Seeking your advise please.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mirella&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Jun 2006 17:28:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-using-not-the-full-keys/m-p/1397899#M192590</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-17T17:28:45Z</dc:date>
    </item>
    <item>
      <title>Re: Selection using not the full keys</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-using-not-the-full-keys/m-p/1397900#M192591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your where condition can check for any fields in the table and there is no restriction.  In your case I would suggest creating an index on the Field4 so that the access time would be fast.  Even otherwise since you are using the two keys fields, the access should be fast as SAP creates indexes for the key fields of the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hith&lt;/P&gt;&lt;P&gt;Sunil Achyut&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Jun 2006 17:38:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-using-not-the-full-keys/m-p/1397900#M192591</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-17T17:38:26Z</dc:date>
    </item>
    <item>
      <title>Re: Selection using not the full keys</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-using-not-the-full-keys/m-p/1397901#M192592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mirella,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the main function of the index is to make database access fast.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The more components you specify in the where clause, the faster the access will be. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may use all fields you like in the where clause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Jun 2006 17:59:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-using-not-the-full-keys/m-p/1397901#M192592</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2006-06-17T17:59:10Z</dc:date>
    </item>
    <item>
      <title>Re: Selection using not the full keys</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-using-not-the-full-keys/m-p/1397902#M192593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mirella&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select statement you have written is correct. To select an unique record, you have to give all the key fields in the where condition with AND. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you have mentioned that the non-key field have unique records, then you can have this one condition and this will give you the result. You dont have to mention the key fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Navneet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Jun 2006 18:11:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-using-not-the-full-keys/m-p/1397902#M192593</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-17T18:11:30Z</dc:date>
    </item>
  </channel>
</rss>

