<?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: inserting into a database table using field symbols? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-into-a-database-table-using-field-symbols/m-p/2900555#M682064</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Kian Keong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Oct 2007 10:56:02 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-19T10:56:02Z</dc:date>
    <item>
      <title>inserting into a database table using field symbols?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-into-a-database-table-using-field-symbols/m-p/2900553#M682062</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;If I have a database table that I do not know the name at design-time, how do i insert records into that database table at run-time?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;****************************************************************************************&lt;/P&gt;&lt;P&gt;Do i use field-symbols, as follow:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS &amp;lt;TABLE_NAME&amp;gt; TYPE TABLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INSERT &amp;lt;TABLE_NAME&amp;gt; FROM ITAB.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2007 10:40:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-into-a-database-table-using-field-symbols/m-p/2900553#M682062</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-19T10:40:37Z</dc:date>
    </item>
    <item>
      <title>Re: inserting into a database table using field symbols?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-into-a-database-table-using-field-symbols/m-p/2900554#M682063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I dont think this will work.&lt;/P&gt;&lt;P&gt;You have to put the DB table's name into the fieldsymbol. Maybe you have to try the next code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: l_dbname(30) type c value 'VBAK'.&lt;/P&gt;&lt;P&gt;field-symbols: &amp;lt;fs&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;assign (l_dbname) to &amp;lt;fs&amp;gt;.&lt;/P&gt;&lt;P&gt;check sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;insert &amp;lt;fs&amp;gt; from itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;hans&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2007 10:45:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-into-a-database-table-using-field-symbols/m-p/2900554#M682063</guid>
      <dc:creator>h_senden2</dc:creator>
      <dc:date>2007-10-19T10:45:53Z</dc:date>
    </item>
    <item>
      <title>Re: inserting into a database table using field symbols?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-into-a-database-table-using-field-symbols/m-p/2900555#M682064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Kian Keong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2007 10:56:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-into-a-database-table-using-field-symbols/m-p/2900555#M682064</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-19T10:56:02Z</dc:date>
    </item>
    <item>
      <title>Re: inserting into a database table using field symbols?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-into-a-database-table-using-field-symbols/m-p/2900556#M682065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, thanks for the prompt reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did something similar to your codes, but it got a syntax error:&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS: &amp;lt;DTAB&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: DTABNAME(20) TYPE C VALUE 'ZTABLE'. &lt;/P&gt;&lt;P&gt;"ZTABLE = SAP Database Table Name&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ASSIGN (DTABNAME) TO &amp;lt;DTAB&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INSERT &amp;lt;TRYOUT1&amp;gt; FROM TABLE UPITAB.&lt;/P&gt;&lt;P&gt;"ITAB = Internal Table with same type as ZTABLE&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;I got the error message: Field "FROM" is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2007 10:56:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-into-a-database-table-using-field-symbols/m-p/2900556#M682065</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-19T10:56:40Z</dc:date>
    </item>
    <item>
      <title>Re: inserting into a database table using field symbols?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-into-a-database-table-using-field-symbols/m-p/2900557#M682066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;strange !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;according to the F1 for the INSERT statement you can use&lt;/P&gt;&lt;P&gt;INSERT dbtab FROM TABLE itab. or &lt;/P&gt;&lt;P&gt;INSERT (dbtabname) FROM TABLE itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the 2nd solution can also be used in stead of field-symbol.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Hans&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2007 11:00:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-into-a-database-table-using-field-symbols/m-p/2900557#M682066</guid>
      <dc:creator>h_senden2</dc:creator>
      <dc:date>2007-10-19T11:00:59Z</dc:date>
    </item>
    <item>
      <title>Re: inserting into a database table using field symbols?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-into-a-database-table-using-field-symbols/m-p/2900558#M682067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;while declaring field symbol try : &lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS &amp;lt;TABLE_NAME&amp;gt; TYPE ANY.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2007 11:09:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-into-a-database-table-using-field-symbols/m-p/2900558#M682067</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-19T11:09:35Z</dc:date>
    </item>
    <item>
      <title>Re: inserting into a database table using field symbols?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-into-a-database-table-using-field-symbols/m-p/2900559#M682068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hans, thanks a million for the last post.&lt;/P&gt;&lt;P&gt;It solved my problem! All I need to do is to change &amp;lt;DTAB&amp;gt; to (DTABNAME) in the INSERT statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i.e. INSERT &amp;lt;DTAB&amp;gt; FROM TABLE UPITAB. ==&amp;gt; WRONG&lt;/P&gt;&lt;P&gt;INSERT (DTABNAME) FROM TABLE UPITAB. ==&amp;gt; CORRECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help, points given &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;######################################################&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did something similar to your codes, but it got a syntax error:&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS: &amp;lt;DTAB&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: DTABNAME(20) TYPE C VALUE 'ZTABLE'. &lt;/P&gt;&lt;P&gt;"ZTABLE = SAP Database Table Name&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ASSIGN (DTABNAME) TO &amp;lt;DTAB&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INSERT &amp;lt;DTAB&amp;gt; FROM TABLE UPITAB.&lt;/P&gt;&lt;P&gt;"ITAB = Internal Table with same type as ZTABLE&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;I got the error message: Field "FROM" is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2007 11:09:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-into-a-database-table-using-field-symbols/m-p/2900559#M682068</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-19T11:09:37Z</dc:date>
    </item>
    <item>
      <title>Re: inserting into a database table using field symbols?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-into-a-database-table-using-field-symbols/m-p/2900560#M682069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you're welcome &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2007 11:13:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-into-a-database-table-using-field-symbols/m-p/2900560#M682069</guid>
      <dc:creator>h_senden2</dc:creator>
      <dc:date>2007-10-19T11:13:00Z</dc:date>
    </item>
  </channel>
</rss>

