<?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: Searching a dynamic table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/searching-a-dynamic-table/m-p/9444787#M1740663</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I totally agree with you Sir.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maria let us know what is the requirement, Usually a such a condition never occurs where you search without knowing the field name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Thanks and Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Pratheek &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 05 May 2013 05:25:56 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2013-05-05T05:25:56Z</dc:date>
    <item>
      <title>Searching a dynamic table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/searching-a-dynamic-table/m-p/9444776#M1740652</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;I have a dynamic table &amp;lt;table&amp;gt; and want to find select all matchings with the value &amp;lt;value&amp;gt;.&lt;/P&gt;&lt;P&gt;To better understand something like this.&lt;/P&gt;&lt;P&gt;loop at &amp;lt;table&amp;gt; assigning &amp;lt;wa&amp;gt;.&lt;/P&gt;&lt;P&gt; " find &amp;lt;value&amp;gt; in &amp;lt;wa&amp;gt;.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if found &amp;lt;value&amp;gt; should have the same type and value in the matching component in wa.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help. I have no clue. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestion is welcome.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 May 2013 20:54:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/searching-a-dynamic-table/m-p/9444776#M1740652</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-05-03T20:54:04Z</dc:date>
    </item>
    <item>
      <title>Re: Searching a dynamic table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/searching-a-dynamic-table/m-p/9444777#M1740653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are a few approaches.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you know the name of some of the fields, you can create a type with those fields. Then you can use.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;FIELD-SYMBOLS: &amp;lt;mytab&amp;gt; TYPE ANY TABLE,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;mywa&amp;gt;&amp;nbsp; TYPE ANY.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;DATA: myfields TYPE the_type_with_the_fields.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOOP AT &amp;lt;mytab&amp;gt; ASSIGNING &amp;lt;mywa&amp;gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; MOVE-CORRESPONDING &amp;lt;mywa&amp;gt; INTO myfields.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-family: 'courier new', courier;"&gt; " If you need to update the record with new values held in myfields.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;MOVE-CORRESPONDING myfields INTO &amp;lt;mywa&amp;gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;ENDLOOP.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: helvetica;"&gt;Alternatively, you can use this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;FIELD-SYMBOLS: &amp;lt;mytab&amp;gt; TYPE ANY TABLE,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;mywa&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TYPE ANY,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;field1&amp;gt; TYPE ANY. " &lt;EM&gt;You should type it if you know what the type will be&lt;/EM&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;DATA: r_data TYPE REF TO DATA.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;CREATE DATA r_data LIKE LINE OF &amp;lt;mytab&amp;gt;. " &lt;EM&gt;Create area in memory with same shape as a record of &amp;lt;mytab&amp;gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;ASSIGN r_data-&amp;gt;* TO &amp;lt;mywa&amp;gt;. " &lt;EM&gt;Link that area to &amp;lt;mywa&amp;gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;ASSIGN COMPONENT "&lt;EM&gt;fieldname"&lt;/EM&gt; OF STRUCTURE &amp;lt;mywa&amp;gt; TO &amp;lt;field1&amp;gt;. "&lt;EM&gt;Instead of the fieldname, you could use a variable.&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOOP AT &amp;lt;mytab&amp;gt; INTO &amp;lt;mywa&amp;gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-family: 'courier new', courier;"&gt; " You can now manipulate the fields of &amp;lt;mywa&amp;gt; via &amp;lt;field1&amp;gt; etc.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-family: 'courier new', courier;"&gt; " If you need to update the record &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;MODIFY TABLE &amp;lt;mytab&amp;gt; FROM &amp;lt;mywa&amp;gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;ENDLOOP.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: helvetica;"&gt;If you don't know the names of the fields, and you can't derive them, you can use&lt;STRONG&gt; ASSIGN COMPONENT position OF STRUCTURE...&lt;/STRONG&gt; where position is the number of the field in the structure - so 1 for the first etc.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: helvetica;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 May 2013 05:25:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/searching-a-dynamic-table/m-p/9444777#M1740653</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2013-05-04T05:25:27Z</dc:date>
    </item>
    <item>
      <title>Re: Searching a dynamic table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/searching-a-dynamic-table/m-p/9444778#M1740654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Maria,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you know the field name its very simple&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In LOOP Itself you can do this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA fieldname(20) TYPE c VALUE 'field'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT &amp;lt;table&amp;gt; ASSIGNING &amp;lt;wa&amp;gt; where &amp;lt;table&amp;gt;-(fieldname) = &amp;lt;value&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"Do the Required Operation&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP. to compare&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here the variable fieldname should contain the name of your field which you want to compare&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Pratheek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 May 2013 08:17:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/searching-a-dynamic-table/m-p/9444778#M1740654</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-05-04T08:17:24Z</dc:date>
    </item>
    <item>
      <title>Re: Searching a dynamic table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/searching-a-dynamic-table/m-p/9444779#M1740655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;LOOP AT WHERE with a dynamic where clause is not available in lower releases of ABAP. Also, the syntax would be &lt;STRONG&gt;LOOP AT ... ASSIGNING .... WHERE (fieldname) EQ &amp;lt;value&amp;gt;.&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 May 2013 09:01:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/searching-a-dynamic-table/m-p/9444779#M1740655</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2013-05-04T09:01:37Z</dc:date>
    </item>
    <item>
      <title>Re: Searching a dynamic table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/searching-a-dynamic-table/m-p/9444780#M1740656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Matthew,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Oh yes &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/1410/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt; thanks for pointing out the mistake.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards&lt;/P&gt;&lt;P&gt;Pratheek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 May 2013 09:14:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/searching-a-dynamic-table/m-p/9444780#M1740656</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-05-04T09:14:18Z</dc:date>
    </item>
    <item>
      <title>Re: Searching a dynamic table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/searching-a-dynamic-table/m-p/9444781#M1740657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your answer. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I still have a problem because I dont know the field name. I am also getting a synthax error when I use "LOOP ....WHERE". It says that the tables line must be static.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am getting the fields to search from another dynamic table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT &amp;lt;searchfieldtable&amp;gt; ASSIGNING &amp;lt;searchfield&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOOP AT &amp;lt;table&amp;gt; ASSIGNING &amp;lt;wa&amp;gt; where &amp;lt;table&amp;gt;-???? = &amp;lt;searchfield&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Append &amp;lt;wa&amp;gt; to &amp;lt;resulttable&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ENDLOOP.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know the get the type and the content of &amp;lt;searchfield&amp;gt; but I dont have a fields name.&lt;/P&gt;&lt;P&gt;The field found in &amp;lt;table&amp;gt; should have the same content and type than &amp;lt;searchfield&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;More like this: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT &amp;lt;searchfieldtable&amp;gt; ASSIGNING &amp;lt;searchfield&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOOP AT &amp;lt;table&amp;gt; ASSIGNING &amp;lt;wa&amp;gt; .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; " if &amp;lt;searchfield&amp;gt; is found in &amp;lt;wa&amp;gt; then (I dont know how to do the search in &amp;lt;wa&amp;gt; without knowing the fieldname)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Append &amp;lt;wa&amp;gt; to &amp;lt;resulttable&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ENDLOOP.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please give me your suggestions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tabl&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 May 2013 12:50:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/searching-a-dynamic-table/m-p/9444781#M1740657</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-05-04T12:50:17Z</dc:date>
    </item>
    <item>
      <title>Re: Searching a dynamic table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/searching-a-dynamic-table/m-p/9444782#M1740658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;So &amp;lt;searchfieldtable&amp;gt; contains a list of field names in &amp;lt;table&amp;gt;? That's easy then. Just do what I said above with ASSIGN COMPONENT...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOOP AT &amp;lt;searchfieldtable&amp;gt; ASSIGNING &amp;lt;searchfield&amp;gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; LOOP AT &amp;lt;table&amp;gt; ASSIGNING &amp;lt;wa&amp;gt; .&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ASSIGN COMPONENT &amp;lt;searchfield&amp;gt; OF STRUCTURE &amp;lt;wa&amp;gt; TO &amp;lt;foundfield&amp;gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CHECK sy-subrc IS INITIAL. "&lt;EM&gt;If it is, the field named in &amp;lt;searchfield&amp;gt; exists in wa.&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;&lt;EM style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...do stuff...&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; ENDLOOP.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;ENDLOOP.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN style="font-family: georgia, palatino;"&gt;Even if this isn't your specific scenario, somewhere the fieldnames must be being defined. If they're in the data dictionary, then you just look in table DD03L for the field names, for example. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN style="font-family: helvetica;"&gt;&lt;SPAN style="font-family: georgia, palatino;"&gt;Maybe you could give some examples of what these field symbols might contain at runttime, since this is what is critical.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 May 2013 13:49:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/searching-a-dynamic-table/m-p/9444782#M1740658</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2013-05-04T13:49:49Z</dc:date>
    </item>
    <item>
      <title>Re: Searching a dynamic table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/searching-a-dynamic-table/m-p/9444783#M1740659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have created the &lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;lt;searchfield&amp;gt; and assigned it a type and a value. There should be a field in the workarea &lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;lt;wa&amp;gt; with this same type and value.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;lt;searchfield&amp;gt; have a field name. I have created it with CREATE DATA... TYPE... and then assigned a value.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;May be I should go through all components of &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;lt;wa&amp;gt; and compare their type and value with the type and value of &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;lt;searchfield&amp;gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;I dont have any other clue.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 May 2013 16:31:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/searching-a-dynamic-table/m-p/9444783#M1740659</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-05-04T16:31:39Z</dc:date>
    </item>
    <item>
      <title>Re: Searching a dynamic table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/searching-a-dynamic-table/m-p/9444784#M1740660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Maria,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does Search Field contain Field Name? or is it just the value?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From what i understand, it is a Value and not field name. That doesn't make any sense why would you search like that? you should have a field name to compare with, cross check whether the &amp;lt;searchfieldtable&amp;gt; contains field name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now if what i understood is correct I think you can solve it. So as you said if you know to get type from &amp;lt;searchfield&amp;gt;, i can explain you the procedure. Do &lt;SPAN style="font-size: 10pt;"&gt;as follows&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;LOOP AT &amp;lt;searchfieldtable&amp;gt; ASSIGNING &amp;lt;searchfield&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;"Get the type of &amp;lt;searchfield&amp;gt; and store it in lv_searchfieldtype&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOOP AT &amp;lt;table&amp;gt; ASSIGNING &amp;lt;wa&amp;gt; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;do&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;ASSIGN &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;COMPONENT &lt;/SPAN&gt;sy&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;index &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;OF &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;STRUCTURE &lt;/SPAN&gt;&amp;lt;wa&amp;gt; &lt;SPAN class="L0S52"&gt;TO &lt;/SPAN&gt;&amp;lt;fs_field&amp;gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;IF &lt;/SPAN&gt;&amp;lt;fs_field&amp;gt; &lt;SPAN class="L0S52"&gt;IS &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;ASSIGNED&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "&amp;nbsp; Now here Get the type of &amp;lt;fs_field&amp;gt; store it in lv_fieldtype&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF lv_searchfieldtype = lv_fieldtype AND &amp;lt;searchfield&amp;gt; = &amp;lt;fs_field&amp;gt;.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Append &amp;lt;wa&amp;gt; to &amp;lt;resulttable&amp;gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ENDIF&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;ELSE&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;exit&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;endif&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; UNASSIGN &amp;lt;fs_field&amp;gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;enddo&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ENDLOOP.&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't recommend this method as this contains Loop inside Loop and will degrade performance, Check if there is any way to get the field name, that would be a better way to do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Pratheek&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 May 2013 16:34:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/searching-a-dynamic-table/m-p/9444784#M1740660</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-05-04T16:34:19Z</dc:date>
    </item>
    <item>
      <title>Re: Searching a dynamic table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/searching-a-dynamic-table/m-p/9444785#M1740661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm beginning to suspect that perhaps you're going about things the wrong way. Rather than tell us the technical stuff, what exactly are you trying to achieve? What are the inputs, what are the outputs? Perhaps then we can suggest a good, efficient, simple solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Often, if things start to get bogged down, you have to approach the problem from a different place.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 May 2013 19:45:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/searching-a-dynamic-table/m-p/9444785#M1740661</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2013-05-04T19:45:20Z</dc:date>
    </item>
    <item>
      <title>Re: Searching a dynamic table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/searching-a-dynamic-table/m-p/9444786#M1740662</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;My goal is to search a table and give the result as a table only with line that contains certain(s) value(s).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have received a field symbol table to search in. I have its structure ( different data types, not only CHAR). I get the values to search from another table and i am storing them in a field symbol table. The searchs values can be from different data types.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 May 2013 19:57:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/searching-a-dynamic-table/m-p/9444786#M1740662</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-05-04T19:57:05Z</dc:date>
    </item>
    <item>
      <title>Re: Searching a dynamic table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/searching-a-dynamic-table/m-p/9444787#M1740663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I totally agree with you Sir.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maria let us know what is the requirement, Usually a such a condition never occurs where you search without knowing the field name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Thanks and Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Pratheek &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 05 May 2013 05:25:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/searching-a-dynamic-table/m-p/9444787#M1740663</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-05-05T05:25:56Z</dc:date>
    </item>
    <item>
      <title>Re: Searching a dynamic table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/searching-a-dynamic-table/m-p/9444788#M1740664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So why do you need the field names? Also, somewhere the table structure must be being defined, so at some point the actual fields names are known. For example, one solution may be to pass the field names as well as the data in the tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How is that you have the data types? Where are these coming from?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm honestly trying to help, but really you're not giving enough information. I've been handling dynamic tables for years and have never had a problem with them I couldn't solve.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 05 May 2013 06:07:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/searching-a-dynamic-table/m-p/9444788#M1740664</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2013-05-05T06:07:39Z</dc:date>
    </item>
    <item>
      <title>Re: Searching a dynamic table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/searching-a-dynamic-table/m-p/9444789#M1740665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Matt,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just found out that I can also extract the fieldname of the searchfield from the table where I got the value and the type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Still the Loop at ... assigning .... where&amp;nbsp;&amp;nbsp; is not working. Syntax error: line type should be static.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maria&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 05 May 2013 06:08:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/searching-a-dynamic-table/m-p/9444789#M1740665</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-05-05T06:08:01Z</dc:date>
    </item>
    <item>
      <title>Re: Searching a dynamic table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/searching-a-dynamic-table/m-p/9444790#M1740666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, because as already established, WHERE does not allow dynamic conditions. (Except possibly in the most recent ABAP release).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is your desired WHERE clause. I'm still not clear on that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, you have to use something like:&lt;/P&gt;&lt;P&gt;ASSIGN COMPONENT fieldname OF STRUCTURE &amp;lt;wa&amp;gt; TO &amp;lt;field&amp;gt;.&lt;/P&gt;&lt;P&gt;LOOP AT &amp;lt;table&amp;gt; INTO &amp;lt;wa&amp;gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp; CHECK &amp;lt;field&amp;gt; EQ &lt;EM&gt;somevalue.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 05 May 2013 06:15:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/searching-a-dynamic-table/m-p/9444790#M1740666</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2013-05-05T06:15:31Z</dc:date>
    </item>
    <item>
      <title>Re: Searching a dynamic table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/searching-a-dynamic-table/m-p/9444791#M1740667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used in my loop:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ASSIGN COMPONENT fieldname OF STRUCTURE &amp;lt;wa&amp;gt; TO &amp;lt;field&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and it worked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you all for your support.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 05 May 2013 08:41:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/searching-a-dynamic-table/m-p/9444791#M1740667</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-05-05T08:41:09Z</dc:date>
    </item>
  </channel>
</rss>

