<?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: Using components of unknown table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-components-of-unknown-table/m-p/2938992#M692791</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, this helps a lot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In addition I will need the function 'DDIF_NAMETAB_GET' because I recognized that the component names are only similiar, not equal.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Oct 2007 14:19:34 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-24T14:19:34Z</dc:date>
    <item>
      <title>Using components of unknown table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-components-of-unknown-table/m-p/2938990#M692789</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;I have a form where I work with an unknown table. What I know is, that every table that is given to the function has i.e. the component PERNR. I want to do some things with these components (sorting the table, putting into another table etc.) but whether I use field symbols or data references I get the error that it has no structure (which is right).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For more specific information:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My tables are P2001 - P2012 (which is nice to work with, hence the numbers).&lt;/P&gt;&lt;P&gt;I want to pass a specific table of these to the form, but the form should treat them all the same (only in some special cases where I use a case on the string which contains the table).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have a solution please help me. I read most of the stuff about field symbols and data references so a short answer would help too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance, Christopher&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Oct 2007 12:28:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-components-of-unknown-table/m-p/2938990#M692789</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-24T12:28:56Z</dc:date>
    </item>
    <item>
      <title>Re: Using components of unknown table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-components-of-unknown-table/m-p/2938991#M692790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can try like this - &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
PARAMETERS: dbtab TYPE c LENGTH 10, 
            rows  TYPE i DEFAULT 100. 

DATA dref TYPE REF TO data. 

FIELD-SYMBOLS: TYPE ANY TABLE, 
               &amp;lt;wa&amp;gt;    TYPE ANY, 
                 TYPE ANY. 

TRY. 
    CREATE DATA dref TYPE STANDARD TABLE OF (dbtab) 
                          WITH NON-UNIQUE DEFAULT KEY. 
    ASSIGN dref-&amp;gt;* TO  . 
    SELECT * 
           FROM (dbtab) UP TO rows ROWS 
           INTO TABLE  . 
    LOOP AT  ASSIGNING &amp;lt;wa&amp;gt;. 
      DO. 
        ASSIGN COMPONENT sy-index 
               OF STRUCTURE &amp;lt;wa&amp;gt; TO . 
        IF sy-subrc = 0. 
          WRITE / . 
        ELSE. 
          EXIT. 
        ENDIF. 
      ENDDO. 
      ULINE. 
    ENDLOOP. 
  CATCH cx_sy_create_data_error. 
    WRITE 'Wrong Database!'. 
ENDTRY. 
 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Oct 2007 14:09:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-components-of-unknown-table/m-p/2938991#M692790</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-24T14:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: Using components of unknown table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-components-of-unknown-table/m-p/2938992#M692791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, this helps a lot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In addition I will need the function 'DDIF_NAMETAB_GET' because I recognized that the component names are only similiar, not equal.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Oct 2007 14:19:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-components-of-unknown-table/m-p/2938992#M692791</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-24T14:19:34Z</dc:date>
    </item>
  </channel>
</rss>

