<?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 ABAP 7.4 FILTER in SELECT - Core Dump in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-7-4-filter-in-select-core-dump/m-p/12270516#M1987774</link>
    <description>&lt;P&gt;Dear ABAP Community,&lt;/P&gt;
  &lt;P&gt;Wanted to ask here, if this is just a conceptional error on my side or some real kernel error&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;SELECT * FROM estr INTO TABLE @DATA(lt_estrh) PACKAGE SIZE 100.
  lt_invalid_status = &amp;lt;br&amp;gt;    get_spc_status( it_recn = VALUE #( FOR &amp;lt;fs_estrh&amp;gt; IN lt_estrh ( &amp;lt;fs_estrh&amp;gt;-recn ) ) ).                
  lt_invalid_status_sort = lt_invalid_status.

  lt_estrh = FILTER #( lt_estrh EXCEPT IN lt_invalid_status_sort WHERE recn = recn ).
  APPEND LINES OF lt_estrh TO et_estrh.
  CLEAR: lt_invalid_status, lt_invalid_status_sort, lt_estrh.
ENDSELECT.&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;My coding is not 100% this, but the cornerstones i deem relevant are included.&lt;BR /&gt;I have a SELECT statement, packaged. Inside the SELECT statement I execute another Method which gets me all recns with specification status that are invalid (e.g. status obsolete).&lt;BR /&gt;Now I use the FILTER Statement to reduce my initial selected entries by those invalid spec recns.&lt;BR /&gt;This all works - but in the second cycle of the packaged SELECT a system-core dump occurs.&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1863619-coredump.png" /&gt;&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1863618-coredumpplace.png" /&gt;&lt;/P&gt;
  &lt;P&gt;I assume, that the SELECT-Target Table lt_estrh is in some way modified when being used as return target of the FILTER Statement. And then, in the second cycle there is some mismatch between the types of lt_estrh ( although this explanation seems like a stretch... )&lt;BR /&gt;The fix in this case was simply to define a new table 'lt_estrh_filtered' and use this in place of lt_estrh in the last lines.&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;lt_estrh_filtered = FILTER #( lt_estrh EXCEPT IN lt_invalid_status_sort WHERE recn = recn ).
APPEND LINES OF lt_estrh_filtered TO et_estrh.
CLEAR: lt_invalid_status, lt_invalid_status_sort, lt_estrh, lt_estrh_filtered.&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;What also worked as temporary fix was to just increase the package-size in debugger so only one cycle is run.&lt;BR /&gt;&lt;BR /&gt;Primarily wanted to know if this is something known? Is it just bad practise to use the filter-statement in this way ( same table as argument and returning )&lt;BR /&gt;I didn't find anything similiar to this problem.&lt;/P&gt;
  &lt;P&gt;(System Kernel Release is 753)&lt;/P&gt;
  &lt;P&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Julian Horn&lt;/P&gt;</description>
    <pubDate>Tue, 24 Nov 2020 06:53:52 GMT</pubDate>
    <dc:creator>julian_horn</dc:creator>
    <dc:date>2020-11-24T06:53:52Z</dc:date>
    <item>
      <title>ABAP 7.4 FILTER in SELECT - Core Dump</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-7-4-filter-in-select-core-dump/m-p/12270516#M1987774</link>
      <description>&lt;P&gt;Dear ABAP Community,&lt;/P&gt;
  &lt;P&gt;Wanted to ask here, if this is just a conceptional error on my side or some real kernel error&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;SELECT * FROM estr INTO TABLE @DATA(lt_estrh) PACKAGE SIZE 100.
  lt_invalid_status = &amp;lt;br&amp;gt;    get_spc_status( it_recn = VALUE #( FOR &amp;lt;fs_estrh&amp;gt; IN lt_estrh ( &amp;lt;fs_estrh&amp;gt;-recn ) ) ).                
  lt_invalid_status_sort = lt_invalid_status.

  lt_estrh = FILTER #( lt_estrh EXCEPT IN lt_invalid_status_sort WHERE recn = recn ).
  APPEND LINES OF lt_estrh TO et_estrh.
  CLEAR: lt_invalid_status, lt_invalid_status_sort, lt_estrh.
ENDSELECT.&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;My coding is not 100% this, but the cornerstones i deem relevant are included.&lt;BR /&gt;I have a SELECT statement, packaged. Inside the SELECT statement I execute another Method which gets me all recns with specification status that are invalid (e.g. status obsolete).&lt;BR /&gt;Now I use the FILTER Statement to reduce my initial selected entries by those invalid spec recns.&lt;BR /&gt;This all works - but in the second cycle of the packaged SELECT a system-core dump occurs.&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1863619-coredump.png" /&gt;&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1863618-coredumpplace.png" /&gt;&lt;/P&gt;
  &lt;P&gt;I assume, that the SELECT-Target Table lt_estrh is in some way modified when being used as return target of the FILTER Statement. And then, in the second cycle there is some mismatch between the types of lt_estrh ( although this explanation seems like a stretch... )&lt;BR /&gt;The fix in this case was simply to define a new table 'lt_estrh_filtered' and use this in place of lt_estrh in the last lines.&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;lt_estrh_filtered = FILTER #( lt_estrh EXCEPT IN lt_invalid_status_sort WHERE recn = recn ).
APPEND LINES OF lt_estrh_filtered TO et_estrh.
CLEAR: lt_invalid_status, lt_invalid_status_sort, lt_estrh, lt_estrh_filtered.&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;What also worked as temporary fix was to just increase the package-size in debugger so only one cycle is run.&lt;BR /&gt;&lt;BR /&gt;Primarily wanted to know if this is something known? Is it just bad practise to use the filter-statement in this way ( same table as argument and returning )&lt;BR /&gt;I didn't find anything similiar to this problem.&lt;/P&gt;
  &lt;P&gt;(System Kernel Release is 753)&lt;/P&gt;
  &lt;P&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Julian Horn&lt;/P&gt;</description>
      <pubDate>Tue, 24 Nov 2020 06:53:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-7-4-filter-in-select-core-dump/m-p/12270516#M1987774</guid>
      <dc:creator>julian_horn</dc:creator>
      <dc:date>2020-11-24T06:53:52Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP 7.4 FILTER in SELECT - Core Dump</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-7-4-filter-in-select-core-dump/m-p/12270517#M1987775</link>
      <description>&lt;P&gt;Kernel error. You can find corrections in the SAP notes or by asking SAP support.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Nov 2020 07:47:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-7-4-filter-in-select-core-dump/m-p/12270517#M1987775</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-11-24T07:47:17Z</dc:date>
    </item>
  </channel>
</rss>

