<?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: Filling dynamic table with dynamic structure en fields! in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/filling-dynamic-table-with-dynamic-structure-en-fields/m-p/6246507#M1382928</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Use fields symbols to achieve this.&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;shibu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 Sep 2009 12:55:38 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-09-28T12:55:38Z</dc:date>
    <item>
      <title>Filling dynamic table with dynamic structure en fields!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/filling-dynamic-table-with-dynamic-structure-en-fields/m-p/6246506#M1382927</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have written the following code. Which is okay according the syntax check. But when I run the abap code it will give a syntax error. I want to insert data from database table into internal table. Because the tables that have to read are so many I decided to make a dynamic statement which can be used for all tables. Except it won't work as I wish.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(LT_FIELDS) content is the dynamic fields which are defined earlier in the code and will change each loop.&lt;/P&gt;&lt;P&gt;(TAB_X) content is the dynamic internal table which is defined earlier in the code and will change each loop.&lt;/P&gt;&lt;P&gt; = structure of PA0002.&lt;/P&gt;&lt;P&gt;(TAB_N) = T_PA0002.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The code:&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          SELECT (LT_FIELDS) FROM (TAB_X) INTO CORRESPONDING FIELDS OF .&lt;/P&gt;&lt;P&gt;          ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;EM&gt;&lt;STRONG&gt;Can someone give me some advice how to solve this issue?&lt;/STRONG&gt;&lt;/EM&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;During the run at the line "INSERT (TAB_N) FROM . " SAP creates an error like below.&lt;/P&gt;&lt;P&gt;                                                                                K. tekst                                                                                &lt;/P&gt;&lt;P&gt;Ein in einem SQL-Befehl genannter Tabellenname ist unbekannt.                                                                                &lt;/P&gt;&lt;P&gt;Wat is er gebeurd?                                                                                &lt;/P&gt;&lt;P&gt;Error in ABAP application program.                                                                                &lt;/P&gt;&lt;P&gt;The current ABAP program "ZPF_R_MUTATIEOVERZICHT_MAIA" had to be terminated                  &lt;/P&gt;&lt;P&gt;     because one of the                                                                          &lt;/P&gt;&lt;P&gt;    statements could not be executed.                                                                                &lt;/P&gt;&lt;P&gt;This is probably due to an error in the ABAP program.                                                                                &lt;/P&gt;&lt;P&gt;Foutenanalyse                                                                                &lt;/P&gt;&lt;P&gt;Es ist eine Ausnahme aufgetreten, die weiter unten näher erläutert wird.                     &lt;/P&gt;&lt;P&gt;    Die Ausnahme, der die Klasse 'CX_SY_DYNAMIC_OSQL_SEMANTICS' zugeordnet ist,                  &lt;/P&gt;&lt;P&gt;    wurde nicht abgefangen und führte deshalb zu einem Laufzeitfehler.                           &lt;/P&gt;&lt;P&gt;    Der Grund für die Ausnahme ist:                                                                                &lt;/P&gt;&lt;P&gt;In einem SELECT-, UPDATE- oder DELETE-Befehl wurde ein ungültiger                            &lt;/P&gt;&lt;P&gt;    Tabellenname "T_PA0002" angegeben.                                                           &lt;/P&gt;&lt;P&gt;    Aus einem der folgenden Gründe tritt der Fehler erst zur Laufzeit auf:                       &lt;/P&gt;&lt;P&gt;    - der Tabellenname wurde dynamisch angegeben, oder                                           &lt;/P&gt;&lt;P&gt;    - die SELECT-Klausel, WHERE-Klausel, GROUP-BY-Klausel, HAVING-Klausel                        &lt;/P&gt;&lt;P&gt;      oder ORDER-BY-Klausel wurde dynamisch angegeben.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Sep 2009 10:07:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/filling-dynamic-table-with-dynamic-structure-en-fields/m-p/6246506#M1382927</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-28T10:07:24Z</dc:date>
    </item>
    <item>
      <title>Re: Filling dynamic table with dynamic structure en fields!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/filling-dynamic-table-with-dynamic-structure-en-fields/m-p/6246507#M1382928</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Use fields symbols to achieve this.&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;shibu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Sep 2009 12:55:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/filling-dynamic-table-with-dynamic-structure-en-fields/m-p/6246507#M1382928</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-28T12:55:38Z</dc:date>
    </item>
    <item>
      <title>Re: Filling dynamic table with dynamic structure en fields!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/filling-dynamic-table-with-dynamic-structure-en-fields/m-p/6246508#M1382929</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I use fieldsymbols. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See my code here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: TAB_N(12)   TYPE C,&lt;/P&gt;&lt;P&gt;      TAB_X(12)   TYPE C,&lt;/P&gt;&lt;P&gt;      L_TABREF    TYPE REF TO DATA,&lt;/P&gt;&lt;P&gt;      L_STRUCREF  TYPE REF TO DATA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS: &amp;lt;T1_TAB&amp;gt; TYPE STANDARD TABLE,&lt;/P&gt;&lt;P&gt;               &amp;lt;W1_TAB&amp;gt; TYPE ANY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        CREATE DATA L_TABREF   TYPE TABLE OF (TAB_X).&lt;/P&gt;&lt;P&gt;        CREATE DATA L_STRUCREF TYPE (TAB_X).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        ASSIGN L_TABREF-&amp;gt;*   TO &amp;lt;T1_TAB&amp;gt;.&lt;/P&gt;&lt;P&gt;        ASSIGN L_STRUCREF-&amp;gt;* TO &amp;lt;W1_TAB&amp;gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Sep 2009 13:54:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/filling-dynamic-table-with-dynamic-structure-en-fields/m-p/6246508#M1382929</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-28T13:54:33Z</dc:date>
    </item>
    <item>
      <title>Re: Filling dynamic table with dynamic structure en fields!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/filling-dynamic-table-with-dynamic-structure-en-fields/m-p/6246509#M1382930</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I look at the short dump text it states that table T_PA0002 is unknown. I guess that you do not want to update a table called T_PA0002, but probably the actual transparant table PA0002. Correct me if I'm wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One more thing though. If indeed, you want to update PA0002, I don't 'think' it would be wise to do a direct update on a Standard SAP database table. There are other ways, which I would strongly advice you to look into.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Sep 2009 14:00:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/filling-dynamic-table-with-dynamic-structure-en-fields/m-p/6246509#M1382930</guid>
      <dc:creator>Sm1tje</dc:creator>
      <dc:date>2009-09-28T14:00:18Z</dc:date>
    </item>
    <item>
      <title>Re: Filling dynamic table with dynamic structure en fields!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/filling-dynamic-table-with-dynamic-structure-en-fields/m-p/6246510#M1382931</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I Just want to insert data into internal table T_PA0002 from database table PA0002.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The internal table and database table can change during the runtime of the program. But Its always filling the internal table with data from database table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I made it this way because the data I need to extract from data base tables can change depending on the procedures in table T9VS2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I can't know the structure or the table which has to be selected each procedure. Or I have to make a big program with a lot of if or Case statements in it. I want to avoid that! Dynamic table is much quicker to write and understand when it works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It wil reduce a lot of code!  I hope someone can give me a hint to solve the problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Sep 2009 14:16:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/filling-dynamic-table-with-dynamic-structure-en-fields/m-p/6246510#M1382931</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-28T14:16:03Z</dc:date>
    </item>
  </channel>
</rss>

