<?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: INVALID_SRC_TYPE with Corresponding # in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/invalid-src-type-with-corresponding/m-p/12716216#M2019475</link>
    <description>&lt;P&gt;Any variable name corresponding to a SELECT-OPTIONS (S_KUNNR in your case) may express both a Ranges Table (internal table with components SIGN, OPTION, LOW, HIGH) AND a &lt;A href="https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenheader_line_glosry.htm"&gt;Header Line&lt;/A&gt; (a structure with type same as one line of the internal table).&lt;/P&gt;&lt;UL&gt;
&lt;LI&gt;In positions of ABAP statements where ONLY an internal table is accepted (like WHERE ... IN &amp;lt;name&amp;gt;), mentioning the name will be considered as an &lt;STRONG&gt;internal table&lt;/STRONG&gt;.&lt;/LI&gt;&lt;LI&gt;At all other places, it will be considered as the &lt;STRONG&gt;header line&lt;/STRONG&gt;.&lt;/LI&gt;&lt;LI&gt;If you want to force the ABAP compiler/program to consider the internal table, you must append 2 square brackets [] at the end of the name&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;kunnr_input = CORRESPONDING #( s_kunnr[] MAPPING kunnr = low ).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The header lines are obsolete because it's prone to errors. SELECT-OPTIONS and TABLES parameters (when seen from inside the procedure) are the only non-obsolete cases where a header line is generated by the kernel.&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenheader_line_glosry.htm"&gt;Header Line&lt;/A&gt;:&lt;/P&gt;&lt;UL&gt;
&lt;LI&gt;Obsolete work area of an internal table whose type is the line type and has the same name as the internal table. When an internal table with a header line is used in an operand position, the header line is usually addressed. To force access to the table body, square brackets [] can be specified after the table name.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;More information: &lt;A href="https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenitab_header_line.htm"&gt;Internal Tables with a Header Line&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 19 Jan 2023 07:06:57 GMT</pubDate>
    <dc:creator>Sandra_Rossi</dc:creator>
    <dc:date>2023-01-19T07:06:57Z</dc:date>
    <item>
      <title>INVALID_SRC_TYPE with Corresponding #</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/invalid-src-type-with-corresponding/m-p/12716213#M2019472</link>
      <description>&lt;P&gt;why do I get above runtime error with below code?&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;DATA: gv_kunnr TYPE kunnr.
SELECT-OPTIONS: s_kunnr FOR gv_kunnr.                          "Passed 5 Customer Nos here

TYPES: BEGIN OF kunnr_type,
         kunnr TYPE kunnr,
       END OF kunnr_type.
DATA: kunnr_input TYPE STANDARD TABLE OF kunnr_type.
&lt;BR /&gt;START-OF-SELECTION&lt;BR /&gt;kunnr_input = VALUE #( FOR l_kunnr IN s_kunnr
                        ( kunnr = l_kunnr-low )
                        ).                                     "Works well
kunnr_input = CORRESPONDING #( s_kunnr MAPPING kunnr = low ).  "&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;RUNTIME ERROR&lt;/CODE&gt;&lt;/PRE&gt; I believe something due to type mismatch but I need clarity. 
  &lt;BR /&gt; 
  &lt;BR /&gt;Thanks.</description>
      <pubDate>Wed, 18 Jan 2023 21:01:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/invalid-src-type-with-corresponding/m-p/12716213#M2019472</guid>
      <dc:creator>sh4il3sh</dc:creator>
      <dc:date>2023-01-18T21:01:55Z</dc:date>
    </item>
    <item>
      <title>Re: INVALID_SRC_TYPE with Corresponding #</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/invalid-src-type-with-corresponding/m-p/12716214#M2019473</link>
      <description>&lt;P&gt;Corresponding Hash one errors!&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2023 21:04:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/invalid-src-type-with-corresponding/m-p/12716214#M2019473</guid>
      <dc:creator>sh4il3sh</dc:creator>
      <dc:date>2023-01-18T21:04:57Z</dc:date>
    </item>
    <item>
      <title>Re: INVALID_SRC_TYPE with Corresponding #</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/invalid-src-type-with-corresponding/m-p/12716215#M2019474</link>
      <description>&lt;P&gt;Hi Shailesh,&lt;/P&gt;&lt;P&gt;Use the square bracket [] after S_KUNNR while doing corresponding, it will work. See the below code snippet.&lt;/P&gt;DATA: gv_kunnr TYPE kunnr.&lt;BR /&gt;SELECT-OPTIONS: s_kunnr FOR gv_kunnr.                          "Passed 5 Customer Nos here&lt;BR /&gt;&lt;BR /&gt;TYPES: BEGIN OF kunnr_type,&lt;BR /&gt;         kunnr TYPE kunnr,&lt;BR /&gt;       END OF kunnr_type.&lt;BR /&gt;DATA: kunnr_input TYPE STANDARD TABLE OF kunnr_type.&lt;BR /&gt;&lt;BR /&gt;START-OF-SELECTION.&lt;BR /&gt;kunnr_input = VALUE #( FOR l_kunnr IN s_kunnr&lt;BR /&gt;                        ( kunnr = l_kunnr-low )&lt;BR /&gt;                        ).                                     "Works well&lt;BR /&gt;&lt;P&gt;kunnr_input = CORRESPONDING #( s_kunnr[] MAPPING kunnr = low ).  "&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;RUNTIME ERROR&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sunil Mani&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2023 02:09:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/invalid-src-type-with-corresponding/m-p/12716215#M2019474</guid>
      <dc:creator>sunil_mani</dc:creator>
      <dc:date>2023-01-19T02:09:32Z</dc:date>
    </item>
    <item>
      <title>Re: INVALID_SRC_TYPE with Corresponding #</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/invalid-src-type-with-corresponding/m-p/12716216#M2019475</link>
      <description>&lt;P&gt;Any variable name corresponding to a SELECT-OPTIONS (S_KUNNR in your case) may express both a Ranges Table (internal table with components SIGN, OPTION, LOW, HIGH) AND a &lt;A href="https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenheader_line_glosry.htm"&gt;Header Line&lt;/A&gt; (a structure with type same as one line of the internal table).&lt;/P&gt;&lt;UL&gt;
&lt;LI&gt;In positions of ABAP statements where ONLY an internal table is accepted (like WHERE ... IN &amp;lt;name&amp;gt;), mentioning the name will be considered as an &lt;STRONG&gt;internal table&lt;/STRONG&gt;.&lt;/LI&gt;&lt;LI&gt;At all other places, it will be considered as the &lt;STRONG&gt;header line&lt;/STRONG&gt;.&lt;/LI&gt;&lt;LI&gt;If you want to force the ABAP compiler/program to consider the internal table, you must append 2 square brackets [] at the end of the name&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;kunnr_input = CORRESPONDING #( s_kunnr[] MAPPING kunnr = low ).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The header lines are obsolete because it's prone to errors. SELECT-OPTIONS and TABLES parameters (when seen from inside the procedure) are the only non-obsolete cases where a header line is generated by the kernel.&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenheader_line_glosry.htm"&gt;Header Line&lt;/A&gt;:&lt;/P&gt;&lt;UL&gt;
&lt;LI&gt;Obsolete work area of an internal table whose type is the line type and has the same name as the internal table. When an internal table with a header line is used in an operand position, the header line is usually addressed. To force access to the table body, square brackets [] can be specified after the table name.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;More information: &lt;A href="https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenitab_header_line.htm"&gt;Internal Tables with a Header Line&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2023 07:06:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/invalid-src-type-with-corresponding/m-p/12716216#M2019475</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2023-01-19T07:06:57Z</dc:date>
    </item>
    <item>
      <title>Re: INVALID_SRC_TYPE with Corresponding #</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/invalid-src-type-with-corresponding/m-p/12716217#M2019476</link>
      <description>&lt;P&gt;Very Nicely explained. Everything is clear now!&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2023 10:34:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/invalid-src-type-with-corresponding/m-p/12716217#M2019476</guid>
      <dc:creator>sh4il3sh</dc:creator>
      <dc:date>2023-01-19T10:34:25Z</dc:date>
    </item>
  </channel>
</rss>

