<?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 select statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select-statement/m-p/1750237#M325291</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;do you also want to create a dynamic fill in screen ? since when you select a different field the conditions on the restrictions must change according to the fieldname&lt;/P&gt;&lt;P&gt;That is not possible in standard ABAP. what you want is a lot of work while you can also make a standard selection screen which does the same quite easily. &lt;/P&gt;&lt;P&gt;Or you must do it in webbased applications but even then it's a lot of work&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Dec 2006 13:56:16 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-12-12T13:56:16Z</dc:date>
    <item>
      <title>Dynamic select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select-statement/m-p/1750235#M325289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to create dynamic select statement I have following scenario&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a table with fields&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table name&lt;/P&gt;&lt;P&gt;Field name to select&lt;/P&gt;&lt;P&gt;Restriction&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Consider  I have following data in that which can change I mean users wish to enter data in it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT  (Field name to select)&lt;/P&gt;&lt;P&gt;INTO temp&lt;/P&gt;&lt;P&gt;FROM table name&lt;/P&gt;&lt;P&gt;WHERE Field name to select = restriction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem is how to build a select where I only have name of the field.&lt;/P&gt;&lt;P&gt;Please reply as soon as possible.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2006 13:52:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select-statement/m-p/1750235#M325289</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-12T13:52:40Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select-statement/m-p/1750236#M325290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can have the name of the table in a variable.&lt;/P&gt;&lt;P&gt;Have the fields you want to select in a internal table with one field in it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT (ITAB) FROM (TABLE) INTO CORRESPONDING FIELDS OF TABLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I am not sure if you can have a where clause as the name of the table is determined at runtime, the system will not be able compile the where clause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, you can make that also dynamic. Add the WHERE clause in a internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT (ITAB) FROM (TABLE) INTO CORRESPONDING FIELDS OF TABLE ITAB1 where (COND_TAB).&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;Note - Please mark all the helpful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2006 13:56:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select-statement/m-p/1750236#M325290</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-12T13:56:11Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select-statement/m-p/1750237#M325291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;do you also want to create a dynamic fill in screen ? since when you select a different field the conditions on the restrictions must change according to the fieldname&lt;/P&gt;&lt;P&gt;That is not possible in standard ABAP. what you want is a lot of work while you can also make a standard selection screen which does the same quite easily. &lt;/P&gt;&lt;P&gt;Or you must do it in webbased applications but even then it's a lot of work&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2006 13:56:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select-statement/m-p/1750237#M325291</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-12T13:56:16Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select-statement/m-p/1750238#M325292</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This helped but one more point want to clear as your statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT (ITAB) FROM (TABLE) INTO CORRESPONDING FIELDS OF TABLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(ITAB) like you mentioned here I have minimum 2 field.&lt;/P&gt;&lt;P&gt;consider&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT MATERIAL PROD_HIER FROM ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to make this dynamic&lt;/P&gt;&lt;P&gt;I mean &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT (ITAB1) (ITAB2) INTO (temp1,temp2) &lt;/P&gt;&lt;P&gt;FROM ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but this dose not work....&lt;/P&gt;&lt;P&gt;Could you please provide me the  format to do this&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2006 14:19:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select-statement/m-p/1750238#M325292</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-12T14:19:54Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select-statement/m-p/1750239#M325293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; You can make it dynamic as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; 

concatenate V_SEL_FIELDS 'MATERIAL' 'PROD_HIER ' separated  by space.

       SELECT (V_SEL_FIELDS) FROM (V_SEL_FROM)
                             UP TO V_MAX_RECS ROWS
                              INTO CORRESPONDING FIELDS OF TABLE &amp;lt;FS_INTO&amp;gt;
                             WHERE (V_SEL_WHERE).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Raja T&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2006 14:24:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select-statement/m-p/1750239#M325293</guid>
      <dc:creator>raja_thangamani</dc:creator>
      <dc:date>2006-12-12T14:24:42Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select-statement/m-p/1750240#M325294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ITAB is a table with one field, so you should append the name of the fields in one line each per field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fieldname = 'MATERIAL'.&lt;/P&gt;&lt;P&gt;APPEND FIELDNAME TO ITAB.&lt;/P&gt;&lt;P&gt;fieldname = 'PROD_HIER'.&lt;/P&gt;&lt;P&gt;APPEND FIELDNAME TO ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT (ITAB) INTO .... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;note - Please mark all the helpful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2006 14:25:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select-statement/m-p/1750240#M325294</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-12T14:25:37Z</dc:date>
    </item>
  </channel>
</rss>

