<?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: How to select data from the table structure in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-select-data-from-the-table-structure/m-p/609410#M25107</link>
    <description>&lt;P&gt;This code should work, however we can't see what input you are using. Check your 'Plant' and 'SLoc' input if you are not getting any data ...&lt;/P&gt;
  &lt;P&gt;Or are you just not 'seeing it correctly' in Debugging. As you are using a Table "WITH HEADER LINE" you should look at "IT_BILL[]" :&lt;/P&gt;
  &lt;P&gt;&lt;EM&gt;IT_BILL[1]-MBLNR = &amp;lt;first_value&amp;gt; ....&lt;BR /&gt;&lt;/EM&gt;&lt;EM&gt;IT_BILL[2]-MBLNR = &amp;lt;second_value&amp;gt; ...&lt;/EM&gt;&lt;/P&gt;
  &lt;P&gt;However, this code is not optimal and some pointers would be :&lt;/P&gt;
  &lt;UL&gt; 
   &lt;LI&gt;The use of "WITH HEADER LINE" isn't recommended anymore and is considered bad practise / &lt;A href="https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapdata_header_line.htm" target="_blank"&gt;obsolete&lt;/A&gt; ...&lt;/LI&gt; 
   &lt;LI&gt;If possible you should avoid using "INTO CORRESPONDING FIELDS" ...&lt;/LI&gt; 
   &lt;LI&gt;You are not using all of the KEYS of the Tables, which affects performance (for example : Table MSEG also holds "MJAHR" as an important Key ... (See &lt;A href="https://launchpad.support.sap.com/#/notes/821722" target="_blank"&gt;SAP-Note 821722&lt;/A&gt; on MSEG-MKPF join)&lt;/LI&gt; 
   &lt;LI&gt;This Query will possibly fetch huge amounts of data, as you are not using the other Keys or any Date-Range ... &lt;/LI&gt; 
  &lt;/UL&gt;
  &lt;P&gt;&lt;BR /&gt;Again, you should be able to get this to work, but it is far from optimal and I would suggest Optimizing the Query / Report. One resource would be the use of Trx."SLIN" to Evaluate your Development running all Checks ...&lt;/P&gt;</description>
    <pubDate>Tue, 13 Feb 2018 08:48:37 GMT</pubDate>
    <dc:creator>NTeunckens</dc:creator>
    <dc:date>2018-02-13T08:48:37Z</dc:date>
    <item>
      <title>How to select data from the table structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-select-data-from-the-table-structure/m-p/609409#M25106</link>
      <description>&lt;P&gt;Hi, All Expert Abap.&lt;/P&gt;
  &lt;P&gt;Help me, How to select data from the table structure then issued in the internal table with the conditions.&lt;/P&gt;
  &lt;P&gt;example :&lt;/P&gt;
  &lt;P&gt; &lt;BR /&gt; DATA: it_bill TYPE STANDARD TABLE OF ZRECEIPT WITH HEADER LINE,&lt;BR /&gt; wa_bill type ZRECEIPT.&lt;/P&gt;
  &lt;P&gt;SELECT &lt;/P&gt;
  &lt;P&gt;mseg~werks&lt;/P&gt;
  &lt;P&gt; mseg~lgort&lt;BR /&gt; mseg~mblnr&lt;BR /&gt; mseg~matnr&lt;BR /&gt; mseg~bwart&lt;BR /&gt; mseg~bwtar&lt;BR /&gt; mseg~menge&lt;BR /&gt; mseg~meins&lt;BR /&gt; mkpf~budat&lt;BR /&gt; makt~maktx&lt;BR /&gt; INTO CORRESPONDING FIELDS OF TABLE it_bill FROM mseg&lt;BR /&gt; INNER JOIN mkpf on mseg~mblnr = mkpf~mblnr&lt;BR /&gt; INNER JOIN makt on mseg~matnr = makt~matnr&lt;BR /&gt; WHERE mseg~werks = Plant and mseg~lgort = Sloc.&lt;/P&gt;
  &lt;P&gt;LOOP AT IT_BILL into wa_bill.&lt;BR /&gt; &lt;BR /&gt; WRITE &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; wa_bill-mblnr, wa_bill-matnr, wa_bill-bwart, wa_bill-bwtar, wa_bill-menge, wa_bill-meins, wa_bill-budat, wa_bill-maktx.&lt;BR /&gt; &lt;BR /&gt; ENDLOOP.&lt;/P&gt;
  &lt;P&gt;At the time of debugging does not appear its data. Plz help me......&lt;/P&gt;</description>
      <pubDate>Sun, 11 Feb 2018 07:38:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-select-data-from-the-table-structure/m-p/609409#M25106</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-02-11T07:38:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to select data from the table structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-select-data-from-the-table-structure/m-p/609410#M25107</link>
      <description>&lt;P&gt;This code should work, however we can't see what input you are using. Check your 'Plant' and 'SLoc' input if you are not getting any data ...&lt;/P&gt;
  &lt;P&gt;Or are you just not 'seeing it correctly' in Debugging. As you are using a Table "WITH HEADER LINE" you should look at "IT_BILL[]" :&lt;/P&gt;
  &lt;P&gt;&lt;EM&gt;IT_BILL[1]-MBLNR = &amp;lt;first_value&amp;gt; ....&lt;BR /&gt;&lt;/EM&gt;&lt;EM&gt;IT_BILL[2]-MBLNR = &amp;lt;second_value&amp;gt; ...&lt;/EM&gt;&lt;/P&gt;
  &lt;P&gt;However, this code is not optimal and some pointers would be :&lt;/P&gt;
  &lt;UL&gt; 
   &lt;LI&gt;The use of "WITH HEADER LINE" isn't recommended anymore and is considered bad practise / &lt;A href="https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapdata_header_line.htm" target="_blank"&gt;obsolete&lt;/A&gt; ...&lt;/LI&gt; 
   &lt;LI&gt;If possible you should avoid using "INTO CORRESPONDING FIELDS" ...&lt;/LI&gt; 
   &lt;LI&gt;You are not using all of the KEYS of the Tables, which affects performance (for example : Table MSEG also holds "MJAHR" as an important Key ... (See &lt;A href="https://launchpad.support.sap.com/#/notes/821722" target="_blank"&gt;SAP-Note 821722&lt;/A&gt; on MSEG-MKPF join)&lt;/LI&gt; 
   &lt;LI&gt;This Query will possibly fetch huge amounts of data, as you are not using the other Keys or any Date-Range ... &lt;/LI&gt; 
  &lt;/UL&gt;
  &lt;P&gt;&lt;BR /&gt;Again, you should be able to get this to work, but it is far from optimal and I would suggest Optimizing the Query / Report. One resource would be the use of Trx."SLIN" to Evaluate your Development running all Checks ...&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2018 08:48:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-select-data-from-the-table-structure/m-p/609410#M25107</guid>
      <dc:creator>NTeunckens</dc:creator>
      <dc:date>2018-02-13T08:48:37Z</dc:date>
    </item>
  </channel>
</rss>

