<?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: Why does FILTER-Statement with secondaray key on table_line not work? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/why-does-filter-statement-with-secondaray-key-on-table-line-not-work/m-p/437916#M12771</link>
    <description>&lt;P&gt;I see the  behavior described by you in release 7.51 too. Until convinced otherwise I'd say it's a bug (especially since the syntax warning says that the keys k1 and k2 are identical). &lt;/P&gt;&lt;P&gt;There have been issues with FILTER and table_line before, but I hope there aren't many any more.&lt;/P&gt;</description>
    <pubDate>Tue, 21 Mar 2017 13:33:55 GMT</pubDate>
    <dc:creator>retired_member</dc:creator>
    <dc:date>2017-03-21T13:33:55Z</dc:date>
    <item>
      <title>Why does FILTER-Statement with secondaray key on table_line not work?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/why-does-filter-statement-with-secondaray-key-on-table-line-not-work/m-p/437913#M12768</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;we expected that the following code always results with a table size of 1. But the filter for "my_tab_f2" returns an empty table.&lt;/P&gt;&lt;P&gt;Something i am missing here? Or is this some kind of bug?&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  TYPES:
    BEGIN OF ty_my_struct,
      k1 TYPE char1,
      k2 TYPE char1,
      f1 TYPE char1,
    END OF ty_my_struct,
    ty_my_tab1 TYPE STANDARD TABLE OF ty_my_struct WITH DEFAULT KEY
      WITH NON-UNIQUE SORTED KEY k1 COMPONENTS k1 k2 f1
      WITH NON-UNIQUE SORTED KEY k2 COMPONENTS table_line.


  DATA(my_tab1) = VALUE ty_my_tab1(
    ( k1 = 'a' k2 = 'a' f1 = 'a' )
    ( k1 = 'b' k2 = 'b' f1 = 'b' )
  ).

  DATA(my_tab2) = VALUE ty_my_tab1(
    ( k1 = 'a' k2 = 'a' f1 = 'a' )
  ).

  DATA(my_tab_f1) = FILTER #( 
     my_tab1 IN my_tab2 USING KEY k1 
     WHERE k1 = k1 AND k2 = k2 AND f1 = f1 ).

  DATA(my_tab_f2) = FILTER #( 
     my_tab1 IN my_tab2 USING KEY k2 
     WHERE k1 = k1 AND k2 = k2 AND f1 = f1 ).

  DATA(my_tab_f3) = FILTER #( 
     my_tab1 IN my_tab2 USING KEY k2 
     WHERE table_line = table_line ).

  WRITE: / lines( my_tab_f1 ). " Result: 1
  WRITE: / lines( my_tab_f2 ). " Result: 0
  WRITE: / lines( my_tab_f3 ). " Result: 1&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 21 Mar 2017 12:39:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/why-does-filter-statement-with-secondaray-key-on-table-line-not-work/m-p/437913#M12768</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-03-21T12:39:52Z</dc:date>
    </item>
    <item>
      <title>Re: Why does FILTER-Statement with secondaray key on table_line not work?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/why-does-filter-statement-with-secondaray-key-on-table-line-not-work/m-p/437914#M12769</link>
      <description>&lt;P&gt;Lo and behold!&lt;/P&gt;&lt;P&gt;I even get an &lt;/P&gt;&lt;P&gt;ABAP_ASSERT&lt;/P&gt;&lt;P&gt;Internal error: Unexpected state in ABAP runtime environment&lt;/P&gt;&lt;P&gt;for that expression in my 7.52 development system.&lt;/P&gt;&lt;P&gt;That promptly goes to DEV ...&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2017 12:56:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/why-does-filter-statement-with-secondaray-key-on-table-line-not-work/m-p/437914#M12769</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2017-03-21T12:56:34Z</dc:date>
    </item>
    <item>
      <title>Re: Why does FILTER-Statement with secondaray key on table_line not work?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/why-does-filter-statement-with-secondaray-key-on-table-line-not-work/m-p/437915#M12770</link>
      <description>&lt;P&gt;Thanks for the quick check!&lt;/P&gt;&lt;P&gt;Do you assume that other statements or combinations with "table_line" are affected?&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2017 13:02:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/why-does-filter-statement-with-secondaray-key-on-table-line-not-work/m-p/437915#M12770</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-03-21T13:02:06Z</dc:date>
    </item>
    <item>
      <title>Re: Why does FILTER-Statement with secondaray key on table_line not work?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/why-does-filter-statement-with-secondaray-key-on-table-line-not-work/m-p/437916#M12771</link>
      <description>&lt;P&gt;I see the  behavior described by you in release 7.51 too. Until convinced otherwise I'd say it's a bug (especially since the syntax warning says that the keys k1 and k2 are identical). &lt;/P&gt;&lt;P&gt;There have been issues with FILTER and table_line before, but I hope there aren't many any more.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2017 13:33:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/why-does-filter-statement-with-secondaray-key-on-table-line-not-work/m-p/437916#M12771</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2017-03-21T13:33:55Z</dc:date>
    </item>
    <item>
      <title>Re: Why does FILTER-Statement with secondaray key on table_line not work?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/why-does-filter-statement-with-secondaray-key-on-table-line-not-work/m-p/437917#M12772</link>
      <description>&lt;P&gt;Solved with SAP Note 2451130.&lt;/P&gt;&lt;P&gt;Community -&amp;gt; SAP Note, yay!&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2017 15:52:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/why-does-filter-statement-with-secondaray-key-on-table-line-not-work/m-p/437917#M12772</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2017-04-03T15:52:42Z</dc:date>
    </item>
  </channel>
</rss>

