<?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: Dynamic table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table/m-p/12552063#M2006936</link>
    <description>&lt;P&gt;With SELECT * and a dynamic table (FROM (tablename)), although there's "into corresponding fields", is the SELECT sent to the database really limited to only the components of the internal table?&lt;/P&gt;</description>
    <pubDate>Mon, 28 Feb 2022 15:05:26 GMT</pubDate>
    <dc:creator>Sandra_Rossi</dc:creator>
    <dc:date>2022-02-28T15:05:26Z</dc:date>
    <item>
      <title>Dynamic table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table/m-p/12552057#M2006930</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;
  &lt;P&gt;I have created a dynamic table and i have given SELECT * FROM … Up to 20 rows and i got the data of 20 rows of the selected table but i only want first five fields how can i get it.&lt;/P&gt;
  &lt;P&gt;Regards,&lt;/P&gt;
  &lt;P&gt;Prateex&lt;/P&gt;</description>
      <pubDate>Mon, 28 Feb 2022 08:01:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table/m-p/12552057#M2006930</guid>
      <dc:creator>former_member1230623</dc:creator>
      <dc:date>2022-02-28T08:01:51Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table/m-p/12552058#M2006931</link>
      <description>&lt;P&gt;Thank you for visiting SAP Community to get answers to your questions. Since you're asking a question here for the first time, I recommend that you familiarize yourself with: &lt;A rel="noreferrer noopener" href="https://community.sap.com/resources/questions-and-answers" target="_blank"&gt;https://community.sap.com/resources/questions-and-answers&lt;/A&gt;, as it provides tips for preparing questions that draw responses from our members.  &lt;BR /&gt;For example, you can: &lt;BR /&gt;- outline what steps you took to find answers (and why they weren't helpful) &lt;BR /&gt;- share screenshots of what you've seen/done &lt;BR /&gt;- make sure you've applied the appropriate tags &lt;BR /&gt;- use a more descriptive subject line &lt;/P&gt;&lt;P&gt;The more details you provide, the more likely it is that members will be able to respond. Feel free to also take our Q&amp;amp;A tutorial at: &lt;A rel="noreferrer noopener" href="https://developers.sap.com/tutorials/community-qa.html" target="_blank"&gt;https://developers.sap.com/tutorials/community-qa.html&lt;/A&gt;. Should you wish, you can revise your question by selecting Actions, then Edit. By adding a picture to your profile you encourage readers to respond:  &lt;A rel="noreferrer noopener" href="https://www.youtube.com/watch?v=46bt1juWUUM" target="_blank"&gt;https://www.youtube.com/watch?v=46bt1juWUUM&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Mon, 28 Feb 2022 08:02:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table/m-p/12552058#M2006931</guid>
      <dc:creator>lenastodal</dc:creator>
      <dc:date>2022-02-28T08:02:33Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table/m-p/12552059#M2006932</link>
      <description>&lt;P&gt;Hi &lt;SPAN class="mention-scrubbed"&gt;prateex&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt; Select required fields which we want to fetch from table we will get required fields data from table.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; data: lt_mara type STANDARD TABLE OF mara,&lt;BR /&gt;       ls_mara type mara.&lt;BR /&gt;&lt;BR /&gt; select matnr&lt;BR /&gt;        mbrsh&lt;BR /&gt;        matkl&lt;BR /&gt;        mtart&lt;BR /&gt;   from mara into CORRESPONDING FIELDS OF table lt_mara UP TO 20 rows.&lt;BR /&gt;&lt;BR /&gt;write: 'Material Number',&lt;BR /&gt;       'Industry Sector',&lt;BR /&gt;       'Material Group',&lt;BR /&gt;       'Material type'.&lt;BR /&gt;&lt;BR /&gt;loop at lt_mara into ls_mara.&lt;BR /&gt;  write: / ls_mara-matnr,&lt;BR /&gt;           ls_mara-mbrsh,&lt;BR /&gt;           ls_mara-matkl,&lt;BR /&gt;           ls_mara-mtart.&lt;BR /&gt;endloop.&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Now, we will get only required fields from table and 20rows of data.&lt;/P&gt;&lt;P&gt;Reward points if helpful,&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Preetha&lt;/P&gt;</description>
      <pubDate>Mon, 28 Feb 2022 08:49:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table/m-p/12552059#M2006932</guid>
      <dc:creator>Preetha33</dc:creator>
      <dc:date>2022-02-28T08:49:49Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table/m-p/12552060#M2006933</link>
      <description>&lt;P&gt;check the FM RFC_READ_TABLE&lt;/P&gt;</description>
      <pubDate>Mon, 28 Feb 2022 09:02:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table/m-p/12552060#M2006933</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2022-02-28T09:02:32Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table/m-p/12552061#M2006934</link>
      <description>&lt;P&gt;hi preetha, &lt;/P&gt;&lt;P&gt;here the table is dynamic we don't know which table we will use to fetch data, we enter table name in selection screen . &lt;/P&gt;&lt;P&gt;so we don't know the field names then how can we write them in select query.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Feb 2022 11:56:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table/m-p/12552061#M2006934</guid>
      <dc:creator>former_member1230623</dc:creator>
      <dc:date>2022-02-28T11:56:54Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table/m-p/12552062#M2006935</link>
      <description>&lt;P&gt;Hi Shiva,&lt;/P&gt;&lt;P&gt;please try this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: lr_tab_ref TYPE REF TO data,
      lr_struct  TYPE REF TO cl_abap_structdescr.
FIELD-SYMBOLS: &amp;lt;lt_tab&amp;gt; type any table.

lr_struct ?= cl_abap_structdescr=&amp;gt;describe_by_name( 'SFLIGHTS' ).

DATA(lt_comp) = lr_struct-&amp;gt;get_components( ).

delete lt_comp from 6.

lr_struct = cl_abap_structdescr=&amp;gt;create( p_components = lt_comp ).


DATA(lr_tab) = cl_abap_tabledescr=&amp;gt;create( p_line_type  = lr_struct ).
CREATE DATA lr_tab_ref TYPE HANDLE lr_tab.
ASSIGN LR_TAB_REF-&amp;gt;* to &amp;lt;lt_tab&amp;gt;.
SELECT *
  FROM ('SFLIGHTS')
  INTO CORRESPONDING FIELDS OF table @&amp;lt;lt_tab&amp;gt;
  up to 20 rows.&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 Feb 2022 13:01:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table/m-p/12552062#M2006935</guid>
      <dc:creator>ThorstenHoefer</dc:creator>
      <dc:date>2022-02-28T13:01:11Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table/m-p/12552063#M2006936</link>
      <description>&lt;P&gt;With SELECT * and a dynamic table (FROM (tablename)), although there's "into corresponding fields", is the SELECT sent to the database really limited to only the components of the internal table?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Feb 2022 15:05:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table/m-p/12552063#M2006936</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2022-02-28T15:05:26Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table/m-p/12552064#M2006937</link>
      <description>&lt;P&gt;Hi Sandra,&lt;/P&gt;&lt;P&gt;this is a working example.I have tried it.&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Thorsten&lt;/P&gt;</description>
      <pubDate>Tue, 01 Mar 2022 06:58:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table/m-p/12552064#M2006937</guid>
      <dc:creator>ThorstenHoefer</dc:creator>
      <dc:date>2022-03-01T06:58:54Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table/m-p/12552065#M2006938</link>
      <description>&lt;P&gt;I didn't doubt that your code works fine, I was asking whether the SAP Database Interface does optimize the SQL request sent to the database.&lt;/P&gt;&lt;P&gt;Just checked with 7.52 + kernel 753 + S/4HANA, it successfully selects only the 5 columns which are in the internal table:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT
  /* FDA READ */
  "MANDT" , "CARRID" , "CARRNAME" , "CONNID" , "COUNTRYFR"
FROM
  "SFLIGHTS"
WHERE
  "MANDT" = ?
LIMIT  20
  WITH RANGE_RESTRICTION('CURRENT')&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 01 Mar 2022 08:44:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table/m-p/12552065#M2006938</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2022-03-01T08:44:34Z</dc:date>
    </item>
  </channel>
</rss>

