<?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 How to solve this error? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-solve-this-error/m-p/12679159#M2016830</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
  &lt;P&gt;I have added this select query in my report:&lt;/P&gt;
  &lt;P&gt;select matnr&lt;BR /&gt; aufnr&lt;BR /&gt; from mseg&lt;BR /&gt; client specified into table it_mseg2&lt;BR /&gt; where matnr eq it_mseg-matnr and&lt;BR /&gt; charg eq it_mseg-charg and&lt;BR /&gt; werks eq it_mseg-werks and&lt;BR /&gt; bwart in ('262').&lt;/P&gt;
  &lt;P&gt;I am getting an error that says "IT_MSEG" is a table without a header line and therefore has no component called MATNR"&lt;/P&gt;
  &lt;P&gt;I have declared the internal table and the structure as MSEG2. Also, the report already has two select queries of MSEG. Please suggest a solution &lt;/P&gt;
  &lt;P&gt;Warm Regards,&lt;/P&gt;
  &lt;P&gt;Uzair&lt;/P&gt;</description>
    <pubDate>Sat, 26 Nov 2022 05:52:06 GMT</pubDate>
    <dc:creator>uzair_1234</dc:creator>
    <dc:date>2022-11-26T05:52:06Z</dc:date>
    <item>
      <title>How to solve this error?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-solve-this-error/m-p/12679159#M2016830</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
  &lt;P&gt;I have added this select query in my report:&lt;/P&gt;
  &lt;P&gt;select matnr&lt;BR /&gt; aufnr&lt;BR /&gt; from mseg&lt;BR /&gt; client specified into table it_mseg2&lt;BR /&gt; where matnr eq it_mseg-matnr and&lt;BR /&gt; charg eq it_mseg-charg and&lt;BR /&gt; werks eq it_mseg-werks and&lt;BR /&gt; bwart in ('262').&lt;/P&gt;
  &lt;P&gt;I am getting an error that says "IT_MSEG" is a table without a header line and therefore has no component called MATNR"&lt;/P&gt;
  &lt;P&gt;I have declared the internal table and the structure as MSEG2. Also, the report already has two select queries of MSEG. Please suggest a solution &lt;/P&gt;
  &lt;P&gt;Warm Regards,&lt;/P&gt;
  &lt;P&gt;Uzair&lt;/P&gt;</description>
      <pubDate>Sat, 26 Nov 2022 05:52:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-solve-this-error/m-p/12679159#M2016830</guid>
      <dc:creator>uzair_1234</dc:creator>
      <dc:date>2022-11-26T05:52:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to solve this error?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-solve-this-error/m-p/12679160#M2016831</link>
      <description>&lt;P&gt;1. If you are referring to any table then for all entries is needed.&lt;/P&gt;&lt;P&gt;2. For best performance use joins instead of multiple selection referring to the foreign key.&lt;/P&gt;&lt;P&gt;If still want to use it then go for below SELECT query with initial check to IT_MSEG and use FOR ALL ENTRIES &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;select matnr
aufnr
from mseg
client specified into table it_mseg2
FOR ALL ENTRIES IN it_mseg
where matnr eq it_mseg-matnr and
charg eq it_mseg-charg and
werks eq it_mseg-werks and
bwart in ('262')

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;USING HEADER table is obsolete. Do avoid. &lt;/P&gt;&lt;P&gt;You can use STANDARD, SORTED and HASHED table. Best is SORTED and HASHED.&lt;/P&gt;&lt;P&gt;Why MSEG is selected multiple time. The Material document table has huge data and create performance issue. Better to get all the data at once.&lt;/P&gt;&lt;P&gt;Try to find standard I_* CDS view for the data selection. The data fetch will be faster. Best for S4 HANA system.&lt;/P&gt;</description>
      <pubDate>Sat, 26 Nov 2022 06:27:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-solve-this-error/m-p/12679160#M2016831</guid>
      <dc:creator>sagarprusty1988</dc:creator>
      <dc:date>2022-11-26T06:27:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to solve this error?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-solve-this-error/m-p/12679161#M2016832</link>
      <description>&lt;P&gt;Please edit your question, select your code and click the button CODE so that it's nicely displayed and people can read it easily. &lt;/P&gt;</description>
      <pubDate>Sat, 26 Nov 2022 08:05:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-solve-this-error/m-p/12679161#M2016832</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2022-11-26T08:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to solve this error?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-solve-this-error/m-p/12679162#M2016833</link>
      <description>&lt;P&gt;Please edit your answer, select your code and click the button CODE so that it's nicely displayed and people can read it easily. &lt;/P&gt;</description>
      <pubDate>Sat, 26 Nov 2022 08:05:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-solve-this-error/m-p/12679162#M2016833</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2022-11-26T08:05:40Z</dc:date>
    </item>
  </channel>
</rss>

