<?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 Syntax for table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-for-table/m-p/3912118#M937939</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One simple question maybe.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my selection screen i am getting input as one of the standard table say 'SE11'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now in my code i want to make a standard table or internal type/like the input given table name, in this case "SE11".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this possible? If yes can you give a hint on the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regds,&lt;/P&gt;&lt;P&gt;Shashank&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 Jun 2008 07:30:05 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-06T07:30:05Z</dc:date>
    <item>
      <title>Syntax for table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-for-table/m-p/3912118#M937939</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One simple question maybe.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my selection screen i am getting input as one of the standard table say 'SE11'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now in my code i want to make a standard table or internal type/like the input given table name, in this case "SE11".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this possible? If yes can you give a hint on the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regds,&lt;/P&gt;&lt;P&gt;Shashank&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jun 2008 07:30:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-for-table/m-p/3912118#M937939</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-06T07:30:05Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax for table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-for-table/m-p/3912119#M937940</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes it is you need to use réferences and field symbols. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a sample code that select all data of a given table and print it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  PARAMETERS: p_tab TYPE tabname16.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: ls_tab TYPE REF TO data.
  FIELD-SYMBOLS: &amp;lt;ft&amp;gt; TYPE ANY TABLE,
                 &amp;lt;fs&amp;gt; TYPE ANY.

  TRY.
" Create the internal table 
      CREATE DATA ls_tab TYPE TABLE OF (p_tab).
" To access the reference data you need to assign it to a field symbol
      ASSIGN ls_tab-&amp;gt;* TO &amp;lt;ft&amp;gt;.                                
      IF sy-subrc NE 0.
        MESSAGE 'Error' TYPE 'E'.
      ENDIF.
" 
      SELECT * FROM (p_tab) INTO TABLE &amp;lt;ft&amp;gt;.

      LOOP AT &amp;lt;ft&amp;gt; ASSIGNING &amp;lt;fs&amp;gt;.
        WRITE : / &amp;lt;fs&amp;gt;.
      ENDLOOP.
    CATCH cx_root.
      MESSAGE 'Error' TYPE 'E'.
  ENDTRY.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jun 2008 08:57:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-for-table/m-p/3912119#M937940</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-06T08:57:22Z</dc:date>
    </item>
  </channel>
</rss>

