<?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: Dynamic selection in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection/m-p/2877070#M675358</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check the fm &amp;lt;b&amp;gt;RH_DYNAMIC_WHERE_BUILD&amp;lt;/b&amp;gt; to specify a WHERE clause dynamically&lt;/P&gt;&lt;P&gt;and the below extract from SAP help, helps to specify the database table dynamically&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Specifying Database Tables Dynamically&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;To specify the name of a database table dynamically, use the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT... FROM (&amp;lt;name&amp;gt;) &amp;lt;options&amp;gt; . ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The field &amp;lt;name&amp;gt; must contain the name of a database table in the ABAP Dictionary. The table name must be written in uppercase. When you specify the name of a database table dynamically, you cannot use an empty INTO clause to read all of the columns into the work area &amp;lt;dbtab&amp;gt;. It is also not possible to use alternative table names.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Rajesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Sep 2007 06:45:15 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-09-21T06:45:15Z</dc:date>
    <item>
      <title>Dynamic selection</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection/m-p/2877069#M675357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi frnds,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my selection screen I have threefields like tablename, fieldname and date.&lt;/P&gt;&lt;P&gt;For eg: mkpf  in Tablename&lt;/P&gt;&lt;P&gt;           budat  in  field(it can be bldat, cpudt anything)&lt;/P&gt;&lt;P&gt;           10.09.2007  in date fileds&lt;/P&gt;&lt;P&gt;For this selection, I have to write a select query dynamically..(i.e) tablename and fieldname are dynamic parameters...&lt;/P&gt;&lt;P&gt;How to pass these in select query..&lt;/P&gt;&lt;P&gt;select * from (tabname)&lt;/P&gt;&lt;P&gt;            into  wa&lt;/P&gt;&lt;P&gt;            where (fieldname) in date.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Sep 2007 06:40:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection/m-p/2877069#M675357</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-21T06:40:41Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic selection</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection/m-p/2877070#M675358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check the fm &amp;lt;b&amp;gt;RH_DYNAMIC_WHERE_BUILD&amp;lt;/b&amp;gt; to specify a WHERE clause dynamically&lt;/P&gt;&lt;P&gt;and the below extract from SAP help, helps to specify the database table dynamically&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Specifying Database Tables Dynamically&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;To specify the name of a database table dynamically, use the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT... FROM (&amp;lt;name&amp;gt;) &amp;lt;options&amp;gt; . ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The field &amp;lt;name&amp;gt; must contain the name of a database table in the ABAP Dictionary. The table name must be written in uppercase. When you specify the name of a database table dynamically, you cannot use an empty INTO clause to read all of the columns into the work area &amp;lt;dbtab&amp;gt;. It is also not possible to use alternative table names.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Rajesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Sep 2007 06:45:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection/m-p/2877070#M675358</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-21T06:45:15Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic selection</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection/m-p/2877071#M675359</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi nivetha&lt;/P&gt;&lt;P&gt;         &lt;/P&gt;&lt;P&gt;              if your requirement is urgent , you could do this below way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If conditon = '01'.&lt;/P&gt;&lt;P&gt;select x1 x2. ....from tab1..&lt;/P&gt;&lt;P&gt;elseif condtion = '02'.&lt;/P&gt;&lt;P&gt;select x3 x4 from tab2.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Wiboon&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Wiboon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Sep 2007 06:47:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection/m-p/2877071#M675359</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-21T06:47:32Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic selection</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection/m-p/2877072#M675360</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;Check the following link:&lt;/P&gt;&lt;P&gt;&lt;A href="http://sap-img.com/abap/how-can-we-give-dynamic-table-name-in-select-statement.htm" target="test_blank"&gt;http://sap-img.com/abap/how-can-we-give-dynamic-table-name-in-select-statement.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bhaskar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Sep 2007 07:19:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection/m-p/2877072#M675360</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-21T07:19:22Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic selection</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection/m-p/2877073#M675361</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;tables mara.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data itab type table of mara with header line.&lt;/P&gt;&lt;P&gt;data table(4) type c value 'MARA' .&lt;/P&gt;&lt;P&gt;data wh_codn type string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select-options  s_date for mara-ersda.&lt;/P&gt;&lt;P&gt;parameter       p_fname1(5) type c.&lt;/P&gt;&lt;P&gt;concatenate p_fname1&lt;/P&gt;&lt;P&gt;            ' in s_date'&lt;/P&gt;&lt;P&gt;            into wh_codn.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from (table)&lt;/P&gt;&lt;P&gt;         into table itab&lt;/P&gt;&lt;P&gt;         where  (wh_codn) .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at itab.&lt;/P&gt;&lt;P&gt;WRITE: itab-mandt,&lt;/P&gt;&lt;P&gt;       itab-matnr,&lt;/P&gt;&lt;P&gt;       itab-ersda,&lt;/P&gt;&lt;P&gt; endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This dynamic select query works well in 4.7..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But in 4.6 C it is throwing a syntax error " wa_cond" is not an inttable.&lt;/P&gt;&lt;P&gt;How to do this in 4.6C&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Sep 2007 11:34:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection/m-p/2877073#M675361</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-21T11:34:37Z</dc:date>
    </item>
  </channel>
</rss>

