<?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: dynamically select data with 20 input parameters in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-select-data-with-20-input-parameters/m-p/6107233#M1361519</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hai fang,&lt;/P&gt;&lt;P&gt;declare an internal table with soem fixed legth say 70 chars &lt;/P&gt;&lt;P&gt;then what ever u want to select write in line and append to internal table&lt;/P&gt;&lt;P&gt;and then use select query as below&lt;/P&gt;&lt;P&gt;select (itab) from table ( table) where condtions.&lt;/P&gt;&lt;P&gt;itab contains all the fields which u wan tto select &lt;/P&gt;&lt;P&gt;m.a&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 31 Aug 2009 03:14:40 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-08-31T03:14:40Z</dc:date>
    <item>
      <title>dynamically select data with 20 input parameters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-select-data-with-20-input-parameters/m-p/6107231#M1361517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now i have created a subscreen with more than 20 fields on it. these fields are defined by parameters, not select options. user can input any fileds for these input parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So now i should write codes to select data from database according the user input. Is there any easy way for me to write it? I heard about dynamically SQLs, but i don't know how to use it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Aug 2009 07:35:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-select-data-with-20-input-parameters/m-p/6107231#M1361517</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-30T07:35:16Z</dc:date>
    </item>
    <item>
      <title>Re: dynamically select data with 20 input parameters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-select-data-with-20-input-parameters/m-p/6107232#M1361518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you forgot to mention why you needed dynamic SQL : I guess that when user lets a field blank, you must not perform selection on it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The easiest is ( FIELD1 = P_FIELD1 OR FIELD1 = space ) AND ( FIELD2 = P_FIELD2 OR FIELD2 = space ) AND etc. Even if it seems repetitive, I advise you to keep the SQL static instead of dynamic, because in this latter case, I think the code will be a little bit less clear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Of course, if you argue that there are other requirements, then maybe it's worth re-evaluating the solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you need more information, just look at ABAP examples in your system (SE38, Environment, Examples, ABAP examples -&amp;gt; ... -&amp;gt; Dynamic conditions)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Aug 2009 09:56:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-select-data-with-20-input-parameters/m-p/6107232#M1361518</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2009-08-30T09:56:39Z</dc:date>
    </item>
    <item>
      <title>Re: dynamically select data with 20 input parameters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-select-data-with-20-input-parameters/m-p/6107233#M1361519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hai fang,&lt;/P&gt;&lt;P&gt;declare an internal table with soem fixed legth say 70 chars &lt;/P&gt;&lt;P&gt;then what ever u want to select write in line and append to internal table&lt;/P&gt;&lt;P&gt;and then use select query as below&lt;/P&gt;&lt;P&gt;select (itab) from table ( table) where condtions.&lt;/P&gt;&lt;P&gt;itab contains all the fields which u wan tto select &lt;/P&gt;&lt;P&gt;m.a&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Aug 2009 03:14:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-select-data-with-20-input-parameters/m-p/6107233#M1361519</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-31T03:14:40Z</dc:date>
    </item>
    <item>
      <title>Re: dynamically select data with 20 input parameters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-select-data-with-20-input-parameters/m-p/6107234#M1361520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Wei,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You Can try where clause for your select query like "where (cond_syntax)" . Here &lt;STRONG&gt;cond_syntax&lt;/STRONG&gt; will be data variable of type string. You can use If .. to check values of your parameters and accordingly use concatenate statemnt to write dynamic condition for where cluase of your query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will answer your question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Vaibhav Pendse&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Aug 2009 10:30:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-select-data-with-20-input-parameters/m-p/6107234#M1361520</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-31T10:30:54Z</dc:date>
    </item>
  </channel>
</rss>

