<?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 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select/m-p/4413178#M1048586</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could get clever with using a dynamic field list, and RTTS to have a dynamically defined table with the correct number and name of columns.  But I'd just select everything, and use the selection provided to drive the logic later in the program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why make it complicated?  Just ignore the data you don't want.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What are you doing with the data after you've selected it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Sep 2008 09:51:53 GMT</pubDate>
    <dc:creator>matt</dc:creator>
    <dc:date>2008-09-18T09:51:53Z</dc:date>
    <item>
      <title>Dynamic select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select/m-p/4413175#M1048583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i need a dynamical select on a table... The table is "COSL" and includes following fields:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LST001,LST002,LST003,LST004,LST005,LST006,LST007,LST008,LST009,LST010,LST011,&lt;/P&gt;&lt;P&gt;LST012,LST013,LST014,LST015,LST016&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now i have two input parameters "begin" and "end". The value can be from 001 to 016.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the user entery for espacialy 4 i only need the value of LST004, but if he enters 3-7 i need the values of LST003,LST004,LST005,LST006,LST007. Is it possible the handle this situation with abap?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Sep 2008 09:41:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select/m-p/4413175#M1048583</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-18T09:41:26Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select/m-p/4413176#M1048584</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;You can get the values by using&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO VArying from &amp;lt;field1&amp;gt; to &amp;lt;field2&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Enddo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This may help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sumit Agarwal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Sep 2008 09:46:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select/m-p/4413176#M1048584</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-18T09:46:59Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select/m-p/4413177#M1048585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;check this link...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="734719"&gt;&lt;/A&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Sep 2008 09:49:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select/m-p/4413177#M1048585</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-18T09:49:40Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select/m-p/4413178#M1048586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could get clever with using a dynamic field list, and RTTS to have a dynamically defined table with the correct number and name of columns.  But I'd just select everything, and use the selection provided to drive the logic later in the program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why make it complicated?  Just ignore the data you don't want.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What are you doing with the data after you've selected it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Sep 2008 09:51:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select/m-p/4413178#M1048586</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2008-09-18T09:51:53Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select/m-p/4413179#M1048587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes you should be able to code logic based off the user entry to build a dynamic search string using the following clause on your select statement: WHERE (source_text) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is F1 on help on that which is useful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assuming all fields are the same domain you could select into a generic work area containing 16 fields (or more to account for scalability). After your select statement you can use similar logic from the user entry to determine &lt;STRONG&gt;which&lt;/STRONG&gt; actual fields were retrieved and how to process them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps for starters&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Sep 2008 09:53:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select/m-p/4413179#M1048587</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-18T09:53:09Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select/m-p/4413180#M1048588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or as Matthew says &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just select all the fields but only process the ones based off the user entry by concatenating LST + number and using a field symbol&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Sep 2008 09:55:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select/m-p/4413180#M1048588</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-18T09:55:10Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select/m-p/4413181#M1048589</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;Try like this code.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
if not beginfieldvalue is initial
wa-fieldnum = beginfieldvalue.
append wa to itab.
endif.

if not endfieldvalue is initial and not beginfieldvalue is initial.
lv_difference = endfieldvalue - beginfieldvalue.

loop at lv_difference times.
wa-fieldnum = beginfieldvalue + 1.
append wa to itab.

endloop.
endif.
 

loop at itab into wa.

case wa-fieldnum.
  
    WHEN : 1.
	CONCATENATE 'lst001' lv_selectionfield
      INTO lv_selectionfield SEPARATED BY space.
    WHEN : 2.
	CONCATENATE 'lst002' lv_selectionfield
      INTO lv_selectionfield SEPARATED BY space.
    WHEN : 3.
	CONCATENATE 'lst003' lv_selectionfield
      INTO lv_selectionfield SEPARATED BY space.
    WHEN : 4.
	CONCATENATE 'lst004' lv_selectionfield
      INTO lv_selectionfield SEPARATED BY space.
    WHEN : 5.
	CONCATENATE 'lst005' lv_selectionfield
      INTO lv_selectionfield SEPARATED BY space.

endloop.


*select lv_selectionfield from cosl where &amp;lt;condition&amp;gt;*

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Hope it will helps&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Sep 2008 10:03:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select/m-p/4413181#M1048589</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-18T10:03:18Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select/m-p/4413182#M1048590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i think field symblols sounds good. I haven´t done something like that. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please can you help me:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;field-SYMBOLS: .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this doesn´t work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Sep 2008 10:52:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select/m-p/4413182#M1048590</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-18T10:52:43Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select/m-p/4413183#M1048591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; ASSIGN 'w_cosel-lst001' to &amp;lt;fs&amp;gt; CASTING.&lt;/P&gt;&lt;P&gt;&amp;gt; test = &amp;lt;fs&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;type C is probably not the correct one for &amp;lt;fs&amp;gt; though, better use ANY or one that fits w_cosel-lst001.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Sep 2008 10:55:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select/m-p/4413183#M1048591</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2008-09-18T10:55:44Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select/m-p/4413184#M1048592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this also doesn´t work. &lt;/P&gt;&lt;P&gt;There is an error that say: w_cosl doesn´t have a component with the name &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Sep 2008 11:17:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select/m-p/4413184#M1048592</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-18T11:17:12Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select/m-p/4413185#M1048593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Serves me right for jumping late into ongoing discussions. Can't even try out now since my sandbox here is down.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;ASSIGN ('w_cosel-lst001') to &amp;lt;fs&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;might work better. Also look at the ASSIGN COMPONENT ... OF STRUCTURE ... statement, there is very extensive ABAP online help available.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Sep 2008 11:29:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select/m-p/4413185#M1048593</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2008-09-18T11:29:07Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select/m-p/4413186#M1048594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I could be wrong, but don't the field names have to be in UPPER-CASE?  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i.e. ASSIGN ('W_COSEL-LST001') to &amp;lt;fs&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Sep 2008 11:44:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select/m-p/4413186#M1048594</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2008-09-18T11:44:16Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select/m-p/4413187#M1048595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, exactly &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now it works... than you for your help... i hope the points are ok:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the code if someone is interessted:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data string1(6) type c.&lt;/P&gt;&lt;P&gt;string1 = 'LST001'.&lt;/P&gt;&lt;P&gt;DATA string2 type LSTXX.&lt;/P&gt;&lt;P&gt;field-SYMBOLS:&lt;/P&gt;&lt;P&gt;&amp;lt;fs&amp;gt; TYPE C,&lt;/P&gt;&lt;P&gt;&amp;lt;fa&amp;gt; TYPE LSTXX,&lt;/P&gt;&lt;P&gt;&amp;lt;ft&amp;gt; type cosl.&lt;/P&gt;&lt;P&gt;data test TYPE string.&lt;/P&gt;&lt;P&gt;DATA wa_cosel TYPE  cosl .&lt;/P&gt;&lt;P&gt;LOOP at t_cosel into wa_cosel.&lt;/P&gt;&lt;P&gt;ASSIGN string2 to &amp;lt;fa&amp;gt;.&lt;/P&gt;&lt;P&gt;ASSIGN string1 to &amp;lt;fs&amp;gt;.&lt;/P&gt;&lt;P&gt;ASSIGN COMPONENT &amp;lt;fs&amp;gt; of STRUCTURE wa_cosel to &amp;lt;fa&amp;gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Sep 2008 11:59:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select/m-p/4413187#M1048595</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-18T11:59:21Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select/m-p/4413188#M1048596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just tried (box is back hurray), both variants work. Upper case looks tidier though.&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Sep 2008 12:23:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select/m-p/4413188#M1048596</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2008-09-18T12:23:53Z</dc:date>
    </item>
  </channel>
</rss>

