<?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 Calling a R/3 Database Table from a local variable in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-r-3-database-table-from-a-local-variable/m-p/7961465#M1602847</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I cannot call a r/3 table out of a local variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA:      lv_test LIKE smoftables-r3tabname.

SELECT r3tabname FROM smoftables INTO lv_test WHERE objname = 'DNL_CUST_BASIS'.
  WRITE /. Write /. Write /. Write lv_test.
ENDSELECT.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I loop the r/3 table name into lv_test, but here comes my problem : I'd like to display the content of the original database table whose name was saved in lv_test. Is there any way to do so?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Jun 2011 14:53:45 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-06-07T14:53:45Z</dc:date>
    <item>
      <title>Calling a R/3 Database Table from a local variable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-r-3-database-table-from-a-local-variable/m-p/7961465#M1602847</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I cannot call a r/3 table out of a local variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA:      lv_test LIKE smoftables-r3tabname.

SELECT r3tabname FROM smoftables INTO lv_test WHERE objname = 'DNL_CUST_BASIS'.
  WRITE /. Write /. Write /. Write lv_test.
ENDSELECT.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I loop the r/3 table name into lv_test, but here comes my problem : I'd like to display the content of the original database table whose name was saved in lv_test. Is there any way to do so?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jun 2011 14:53:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-r-3-database-table-from-a-local-variable/m-p/7961465#M1602847</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-06-07T14:53:45Z</dc:date>
    </item>
    <item>
      <title>Re: Calling a R/3 Database Table from a local variable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-r-3-database-table-from-a-local-variable/m-p/7961466#M1602848</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;This can be done and some coding has to be done. Please search in SCN for creating dynamic internal table based on a dbtable name and retrieving the contents . You may find lot of threads. You can also check my reply here for a similar kind of question &lt;SPAN __jive_macro_name="thread" id="1856689"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jun 2011 15:10:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-r-3-database-table-from-a-local-variable/m-p/7961466#M1602848</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2011-06-07T15:10:51Z</dc:date>
    </item>
    <item>
      <title>Re: Calling a R/3 Database Table from a local variable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-r-3-database-table-from-a-local-variable/m-p/7961467#M1602849</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Paul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure that I follow your needs.  Can you explain further?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jun 2011 15:17:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-r-3-database-table-from-a-local-variable/m-p/7961467#M1602849</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-06-07T15:17:41Z</dc:date>
    </item>
    <item>
      <title>Re: Calling a R/3 Database Table from a local variable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-r-3-database-table-from-a-local-variable/m-p/7961468#M1602850</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If multiple records exist where objname = 'DNL...:" then you could use a simple Flag b/c you are using a SELECT... ENDSELECT.  Bear in mind that Select... endselect is not a recommended code technique.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: lv_First(1) value 'Y'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select ....&lt;/P&gt;&lt;P&gt;  if lv_First = 'Y'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    write out the tab name&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    lv_First = 'N'.&lt;/P&gt;&lt;P&gt;  endif.&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;Also - bear in mind that without an ORDER BY clause - that your OpenSQL could produce different results.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jun 2011 15:26:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-r-3-database-table-from-a-local-variable/m-p/7961468#M1602850</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-06-07T15:26:10Z</dc:date>
    </item>
    <item>
      <title>Re: Calling a R/3 Database Table from a local variable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-r-3-database-table-from-a-local-variable/m-p/7961469#M1602851</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Funny how the same kinds of question pop up in clusters. See this thread, started today. &lt;SPAN __jive_macro_name="thread" id="1970035"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jun 2011 15:33:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-r-3-database-table-from-a-local-variable/m-p/7961469#M1602851</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2011-06-07T15:33:55Z</dc:date>
    </item>
    <item>
      <title>Re: Calling a R/3 Database Table from a local variable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-r-3-database-table-from-a-local-variable/m-p/7961470#M1602852</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hm I think you didnt quite get me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lv_test is of the type r3table, there exist 8 of them (r3 database tables) within the adapter object "dnl_cust_basis".&lt;/P&gt;&lt;P&gt;For each loop of the select..endselect-statement I want to display one of them.&lt;/P&gt;&lt;P&gt;This is just a testing program because I need that functionality somewhere else.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jun 2011 11:36:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-r-3-database-table-from-a-local-variable/m-p/7961470#M1602852</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-06-08T11:36:42Z</dc:date>
    </item>
    <item>
      <title>Re: Calling a R/3 Database Table from a local variable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-r-3-database-table-from-a-local-variable/m-p/7961471#M1602853</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Paul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In that case, go with code like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: lv_test LIKE smoftables-r3tabname.&lt;/P&gt;&lt;P&gt;data:   lt_test type table of smoftables-r3tabname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT r3tabname INTO table lt_test &lt;/P&gt;&lt;P&gt;  FROM smoftables&lt;/P&gt;&lt;P&gt;  WHERE objname = 'DNL_CUST_BASIS'.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;loop at lt_test into lv_test.&lt;/P&gt;&lt;P&gt;skip 3.&lt;/P&gt;&lt;P&gt;write: / lv_test.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jun 2011 14:55:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-r-3-database-table-from-a-local-variable/m-p/7961471#M1602853</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-06-08T14:55:14Z</dc:date>
    </item>
    <item>
      <title>Re: Calling a R/3 Database Table from a local variable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-r-3-database-table-from-a-local-variable/m-p/7961472#M1602854</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Again though - if order IS important - then an ORDER BY will be required.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A RDBMS does not gaurantee any ordering of the returned results.  You must tell the RDBMS using an ORDER BY clause if that is necessary to meet your requirements.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jun 2011 14:57:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-r-3-database-table-from-a-local-variable/m-p/7961472#M1602854</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-06-08T14:57:54Z</dc:date>
    </item>
    <item>
      <title>Re: Calling a R/3 Database Table from a local variable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-r-3-database-table-from-a-local-variable/m-p/7961473#M1602855</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Paul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you check th link which I referred ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your question was&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd like to display the content of the original database table whose name was saved in lv_test.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have the solution in the link i referred.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Keshav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jun 2011 19:22:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-r-3-database-table-from-a-local-variable/m-p/7961473#M1602855</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2011-06-08T19:22:47Z</dc:date>
    </item>
  </channel>
</rss>

