<?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: Read Table With Key syntax - why cannot use 'EQ'? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-syntax-why-cannot-use-eq/m-p/11856382#M1958656</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pranay, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe, parser first hits the db table and then compare what are records have the same fields which are passed as a parameter using EQ and returns only those records.&lt;/P&gt;&lt;P&gt;But in case of read table, since parser doesn't hit db table, it first assigns value to the field of internal table using '=' and then with the assigned field value, a record is returned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, &lt;/P&gt;&lt;P&gt;Anil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 08 Aug 2016 07:20:02 GMT</pubDate>
    <dc:creator>former_member202771</dc:creator>
    <dc:date>2016-08-08T07:20:02Z</dc:date>
    <item>
      <title>Read Table With Key syntax - why cannot use 'EQ'?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-syntax-why-cannot-use-eq/m-p/11856379#M1958653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Hello,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I know that the &lt;SPAN style="color: #0000ff; font-family: 'courier new', courier;"&gt;READ TABLE&lt;/SPAN&gt; statement can only return a single row, and for that reason the &lt;SPAN style="color: #0000ff; font-family: 'courier new', courier;"&gt;WITH (TABLE) KEY&lt;/SPAN&gt; addition cannot accept anything but comparison ('&lt;SPAN style="color: #800080;"&gt;=&lt;/SPAN&gt;').&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;The question is, why can't I type '&lt;SPAN style="color: #0000ff; font-family: 'courier new', courier;"&gt;EQ&lt;/SPAN&gt;' instead of '&lt;SPAN style="color: #800080;"&gt;=&lt;/SPAN&gt;'?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;For example,&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;This is the possible syntax:&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;READ TABLE&lt;/SPAN&gt; lt_materials[] &lt;SPAN style="color: #0000ff;"&gt;INTO&lt;/SPAN&gt; ls_material &lt;SPAN style="color: #0000ff;"&gt;WITH KEY&lt;/SPAN&gt; material_type &lt;SPAN style="color: #800080;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #008000;"&gt;'FOOD'&lt;/SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;This is my desired syntax:&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;READ TABLE&lt;/SPAN&gt; lt_materials[] &lt;SPAN style="color: #0000ff;"&gt;INTO&lt;/SPAN&gt; ls_material &lt;SPAN style="color: #0000ff;"&gt;WITH KEY&lt;/SPAN&gt; &lt;SPAN style="font-family: 'courier new', courier;"&gt;material_type &lt;/SPAN&gt;&lt;SPAN style="; color: #0000ff;"&gt;&lt;STRONG&gt;EQ&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #008000;"&gt;'FOOD'&lt;/SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #575757; font-family: arial, helvetica, sans-serif; font-size: 10pt;"&gt;I always use only '&lt;SPAN style="color: #0000ff; font-family: 'courier new', courier;"&gt;EQ&lt;/SPAN&gt;' whenever I compare - in &lt;SPAN style="color: #0000ff; font-family: 'courier new', courier;"&gt;WHERE&lt;/SPAN&gt; clauses of &lt;SPAN style="color: #0000ff; font-family: 'courier new', courier;"&gt;SELECT&lt;/SPAN&gt;s and &lt;SPAN style="color: #0000ff; font-family: 'courier new', courier;"&gt;LOOP AT&lt;/SPAN&gt;s, in &lt;SPAN style="color: #0000ff; font-family: 'courier new', courier;"&gt;IF&lt;/SPAN&gt;s and &lt;SPAN style="color: #0000ff; font-family: 'courier new', courier;"&gt;CHECK&lt;/SPAN&gt;s. So why does &lt;SPAN style="color: #0000ff; font-family: 'courier new', courier;"&gt;READ TABLE WITH KEY&lt;/SPAN&gt; have to be different?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"&gt;In my opinion, the '&lt;SPAN style="color: #800080;"&gt;=&lt;/SPAN&gt;' operator should only be used for assignments. When I go through my code quickly, I can easily see exactly where there are assignments and where there are comparisons, except this case of &lt;SPAN style="color: #0000ff; font-family: 'courier new', courier;"&gt;READ TABLE WITH KEY&lt;SPAN style="color: #000000; font-family: arial, helvetica, sans-serif;"&gt;. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #333333; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN style="color: #333333; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;Does anyone have an explanation for this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Aug 2016 14:27:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-syntax-why-cannot-use-eq/m-p/11856379#M1958653</guid>
      <dc:creator>cuky</dc:creator>
      <dc:date>2016-08-07T14:27:15Z</dc:date>
    </item>
    <item>
      <title>Re: Read Table With Key syntax - why cannot use 'EQ'?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-syntax-why-cannot-use-eq/m-p/11856380#M1958654</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;&lt;SPAN style="color: #444444; font-family: Arial, sans-serif; font-size: 13px;"&gt;Relational operators (EQ,NE,GT,LT ,etc) represent conditions that are applied to data. &lt;SPAN style="color: #444444; font-family: Arial, sans-serif; font-size: 13px;"&gt;The purposes of these conditions are to determine the result of a comparison between two data values. A condition result can only be of two possible values.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Aug 2016 06:09:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-syntax-why-cannot-use-eq/m-p/11856380#M1958654</guid>
      <dc:creator>pranay570708</dc:creator>
      <dc:date>2016-08-08T06:09:10Z</dc:date>
    </item>
    <item>
      <title>Re: Read Table With Key syntax - why cannot use 'EQ'?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-syntax-why-cannot-use-eq/m-p/11856381#M1958655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your answer.&lt;/P&gt;&lt;P&gt;I know all that, and I know there are two version of each operator, for example '&lt;SPAN style="color: #0000ff; font-family: 'courier new', courier;"&gt;NE&lt;SPAN style="color: #000000; font-family: arial, helvetica, sans-serif;"&gt;'&lt;/SPAN&gt;&lt;/SPAN&gt; and '&lt;SPAN style="color: #993366; font-family: 'courier new', courier;"&gt;&amp;lt;&amp;gt;&lt;/SPAN&gt;' are the same, and '&lt;SPAN style="color: #0000ff; font-family: 'courier new', courier;"&gt;GT&lt;/SPAN&gt;' and '&lt;SPAN style="color: #993366; font-family: 'courier new', courier; font-size: 13.3333px;"&gt;&amp;gt;&lt;/SPAN&gt;' are the same. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm asking: why is '&lt;SPAN style="color: #0000ff; font-family: 'courier new', courier;"&gt;WITH KEY&lt;/SPAN&gt;' exceptional? Why is it possible to use only the &lt;SPAN style="font-size: 13.3333px;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 13.3333px; font-family: 'courier new', courier;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;' &lt;/SPAN&gt;operator but not &lt;SPAN style="font-size: 13.3333px;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 13.3333px; font-family: 'courier new', courier;"&gt;EQ&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;'&lt;/SPAN&gt;?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Aug 2016 06:19:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-syntax-why-cannot-use-eq/m-p/11856381#M1958655</guid>
      <dc:creator>cuky</dc:creator>
      <dc:date>2016-08-08T06:19:51Z</dc:date>
    </item>
    <item>
      <title>Re: Read Table With Key syntax - why cannot use 'EQ'?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-syntax-why-cannot-use-eq/m-p/11856382#M1958656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pranay, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe, parser first hits the db table and then compare what are records have the same fields which are passed as a parameter using EQ and returns only those records.&lt;/P&gt;&lt;P&gt;But in case of read table, since parser doesn't hit db table, it first assigns value to the field of internal table using '=' and then with the assigned field value, a record is returned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, &lt;/P&gt;&lt;P&gt;Anil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Aug 2016 07:20:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-syntax-why-cannot-use-eq/m-p/11856382#M1958656</guid>
      <dc:creator>former_member202771</dc:creator>
      <dc:date>2016-08-08T07:20:02Z</dc:date>
    </item>
    <item>
      <title>Re: Read Table With Key syntax - why cannot use 'EQ'?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-syntax-why-cannot-use-eq/m-p/11856383#M1958657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;Best practice is use comaparison operator (=,&amp;lt;,&amp;gt;,&amp;lt;&amp;gt;) instead of EQ,GT,LT,NE.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;THANKS&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Aug 2016 07:53:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-syntax-why-cannot-use-eq/m-p/11856383#M1958657</guid>
      <dc:creator>waqasalikhan</dc:creator>
      <dc:date>2016-08-08T07:53:25Z</dc:date>
    </item>
    <item>
      <title>Re: Read Table With Key syntax - why cannot use 'EQ'?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-syntax-why-cannot-use-eq/m-p/11856384#M1958658</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;Can you please point me to some official documentation about this statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Aug 2016 09:17:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-syntax-why-cannot-use-eq/m-p/11856384#M1958658</guid>
      <dc:creator>rosenberg_eitan</dc:creator>
      <dc:date>2016-08-08T09:17:53Z</dc:date>
    </item>
  </channel>
</rss>

