<?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: It cannot reference the dynamic internal table in memory as an object. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/it-cannot-reference-the-dynamic-internal-table-in-memory-as-an-object/m-p/5284354#M1219465</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;use this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: v_where type string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;v_where = '&amp;amp; = &amp;amp; '.
REPLACE '&amp;amp;' WITH 'knumh' INTO v_where.
REPLACE '&amp;amp;' WITH  '&amp;lt;dyn_table&amp;gt;-knumh' INTO v_where.

select * into table ikonp
  from KONP for all entries in &amp;lt;dyn_table&amp;gt;
  where (v_where).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Mar 2009 08:17:56 GMT</pubDate>
    <dc:creator>former_member222860</dc:creator>
    <dc:date>2009-03-05T08:17:56Z</dc:date>
    <item>
      <title>It cannot reference the dynamic internal table in memory as an object.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/it-cannot-reference-the-dynamic-internal-table-in-memory-as-an-object/m-p/5284352#M1219463</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 am getting the syntax error in the second select. I guest it cannot reference the dynamic internal table in memory as an object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The internal table contains different fields from multiple tables and it gets created OK. Then the first select within the loop executes OK allowing me to read the multiple tables in ITABLES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

* Create dynamic internal table and assign to FS
  call method cl_alv_table_create=&amp;gt;create_dynamic_table
    EXPORTING
      it_fieldcatalog = ifc
    IMPORTING
      ep_table        = dy_table.

***OK, the dynamic tables is created here
  assign dy_table-&amp;gt;* to &amp;lt;dyn_table&amp;gt;.

* Create dynamic work area and assign to FS
  create data dy_line like line of &amp;lt;dyn_table&amp;gt;.
  assign dy_line-&amp;gt;* to &amp;lt;dyn_wa&amp;gt;.

loop at ITABLES.

***OK, no syntax errors in this select here
  select * appending corresponding fields of table &amp;lt;dyn_table&amp;gt;
             from (ITABLES-TABNAME).

endloop.

data: ikonp like konp occurs 0 with header line.

***NOT OK, there is syntax errors
  select * into table ikonp
  from KONP for all entries in &amp;lt;dyn_table&amp;gt;
  where knumh = &amp;lt;dyn_table&amp;gt;-knumh.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some of the tables in ITABLES are pooled tables which does not allow me to use INNER JOINS. Therefore I need a second select in order to read the pricing table KONP. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for any hint.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Mar 2009 06:13:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/it-cannot-reference-the-dynamic-internal-table-in-memory-as-an-object/m-p/5284352#M1219463</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-05T06:13:22Z</dc:date>
    </item>
    <item>
      <title>Re: It cannot reference the dynamic internal table in memory as an object.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/it-cannot-reference-the-dynamic-internal-table-in-memory-as-an-object/m-p/5284353#M1219464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Abel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You must be getting the syntax error that &amp;lt;dyn_table&amp;gt; does not contain the field knumh.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try putiing the entire where clause in a char type variable say wa_char and then use in ur query as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where (wa_char) .. it may work..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
concatenate 'knumh' '=' '&amp;lt;dyn_table&amp;gt;-knumh' INTO wa_char SEPARATED BY SPACES.

SELECT ... from konp...
where (wa_char).
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Revert if it doesnt work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Mar 2009 06:29:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/it-cannot-reference-the-dynamic-internal-table-in-memory-as-an-object/m-p/5284353#M1219464</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-05T06:29:25Z</dc:date>
    </item>
    <item>
      <title>Re: It cannot reference the dynamic internal table in memory as an object.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/it-cannot-reference-the-dynamic-internal-table-in-memory-as-an-object/m-p/5284354#M1219465</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;use this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: v_where type string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;v_where = '&amp;amp; = &amp;amp; '.
REPLACE '&amp;amp;' WITH 'knumh' INTO v_where.
REPLACE '&amp;amp;' WITH  '&amp;lt;dyn_table&amp;gt;-knumh' INTO v_where.

select * into table ikonp
  from KONP for all entries in &amp;lt;dyn_table&amp;gt;
  where (v_where).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Mar 2009 08:17:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/it-cannot-reference-the-dynamic-internal-table-in-memory-as-an-object/m-p/5284354#M1219465</guid>
      <dc:creator>former_member222860</dc:creator>
      <dc:date>2009-03-05T08:17:56Z</dc:date>
    </item>
    <item>
      <title>Re: It cannot reference the dynamic internal table in memory as an object.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/it-cannot-reference-the-dynamic-internal-table-in-memory-as-an-object/m-p/5284355#M1219466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mahesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please explain why &lt;/P&gt;&lt;P&gt;v_where = '&amp;amp; = &amp;amp; '.&lt;/P&gt;&lt;P&gt;REPLACE '&amp;amp;' WITH 'knumh' INTO v_where.&lt;/P&gt;&lt;P&gt;REPLACE '&amp;amp;' WITH  '&amp;lt;dyn_table&amp;gt;-knumh' INTO v_where.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;will not result in knumh = knumh ... !!!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Mar 2009 09:59:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/it-cannot-reference-the-dynamic-internal-table-in-memory-as-an-object/m-p/5284355#M1219466</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-05T09:59:13Z</dc:date>
    </item>
    <item>
      <title>Re: It cannot reference the dynamic internal table in memory as an object.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/it-cannot-reference-the-dynamic-internal-table-in-memory-as-an-object/m-p/5284356#M1219467</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ankesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My code gives:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;knumh = &amp;lt;dyn_table&amp;gt;-knumh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Mar 2009 12:39:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/it-cannot-reference-the-dynamic-internal-table-in-memory-as-an-object/m-p/5284356#M1219467</guid>
      <dc:creator>former_member222860</dc:creator>
      <dc:date>2009-03-05T12:39:39Z</dc:date>
    </item>
  </channel>
</rss>

