<?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 cond in loop - error in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-cond-in-loop-error/m-p/6829761#M1471359</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dynamic WHERE in LOOP is possible as of NW 7.02.&lt;/P&gt;&lt;P&gt;I think you can use field symbols to create kind of dynamic loop. Refer this for example:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: l_filter TYPE string VALUE 'CARRID',
      l_value  TYPE string VALUE 'LH'.

DATA: it_sflight TYPE TABLE OF sflight WITH HEADER LINE.

SELECT * FROM sflight INTO TABLE it_sflight  UP TO 10 ROWS  .

FIELD-SYMBOLS &amp;lt;fs&amp;gt; TYPE ANY.

LOOP AT it_sflight.
  ASSIGN COMPONENT l_filter OF STRUCTURE it_sflight TO &amp;lt;fs&amp;gt;.
  CHECK sy-subrc = 0.
  IF &amp;lt;fs&amp;gt; = l_value.
    WRITE / 'Found one'.
  ELSE.
    CONTINUE.
  ENDIF.
ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 Apr 2010 13:55:46 GMT</pubDate>
    <dc:creator>MarcinPciak</dc:creator>
    <dc:date>2010-04-07T13:55:46Z</dc:date>
    <item>
      <title>dynamic cond in loop - error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-cond-in-loop-error/m-p/6829758#M1471356</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 declaration as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
TYPES: BEGIN OF ty_filter,
         cond(72)  TYPE c,
       END OF ty_filter.

DATA: ta_filter TYPE STANDARD TABLE OF ty_filter.

...
...
    LOOP AT ta_tran_upd
      ASSIGNING &amp;lt;fx_tran&amp;gt;
      WHERE ( ta_filter ).
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the above one is issue an error message "Unable to inetpret ')' but when i replace the dynamic where with some condition it is working fine...any idea on it. couldnt get the source of the error.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Apr 2010 13:11:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-cond-in-loop-error/m-p/6829758#M1471356</guid>
      <dc:creator>prabhu_s2</dc:creator>
      <dc:date>2010-04-07T13:11:40Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic cond in loop - error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-cond-in-loop-error/m-p/6829759#M1471357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think you can use a dynamic WHERE in a LOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Apr 2010 13:20:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-cond-in-loop-error/m-p/6829759#M1471357</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-07T13:20:03Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic cond in loop - error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-cond-in-loop-error/m-p/6829760#M1471358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;is there a work around for this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Apr 2010 13:28:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-cond-in-loop-error/m-p/6829760#M1471358</guid>
      <dc:creator>prabhu_s2</dc:creator>
      <dc:date>2010-04-07T13:28:31Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic cond in loop - error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-cond-in-loop-error/m-p/6829761#M1471359</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dynamic WHERE in LOOP is possible as of NW 7.02.&lt;/P&gt;&lt;P&gt;I think you can use field symbols to create kind of dynamic loop. Refer this for example:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: l_filter TYPE string VALUE 'CARRID',
      l_value  TYPE string VALUE 'LH'.

DATA: it_sflight TYPE TABLE OF sflight WITH HEADER LINE.

SELECT * FROM sflight INTO TABLE it_sflight  UP TO 10 ROWS  .

FIELD-SYMBOLS &amp;lt;fs&amp;gt; TYPE ANY.

LOOP AT it_sflight.
  ASSIGN COMPONENT l_filter OF STRUCTURE it_sflight TO &amp;lt;fs&amp;gt;.
  CHECK sy-subrc = 0.
  IF &amp;lt;fs&amp;gt; = l_value.
    WRITE / 'Found one'.
  ELSE.
    CONTINUE.
  ENDIF.
ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Apr 2010 13:55:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-cond-in-loop-error/m-p/6829761#M1471359</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2010-04-07T13:55:46Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic cond in loop - error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-cond-in-loop-error/m-p/6829762#M1471360</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 think that you can't do dynamic where but if you use it you should declare it as (condition)&lt;/P&gt;&lt;P&gt;                                                                                and not ( condition ). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     SELECT ***&lt;/P&gt;&lt;P&gt;     FROM***&lt;/P&gt;&lt;P&gt;     INTO*********&lt;/P&gt;&lt;P&gt;     WHERE (ta_filter).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Yossi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Apr 2010 14:21:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-cond-in-loop-error/m-p/6829762#M1471360</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-07T14:21:13Z</dc:date>
    </item>
  </channel>
</rss>

