<?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 where in range in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-where-in-range/m-p/12372997#M1993796</link>
    <description>&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;jorgen_lindqvist41&lt;/SPAN&gt; It works perfectly.&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;P&gt;Hagit&lt;/P&gt;</description>
    <pubDate>Wed, 17 Mar 2021 09:55:34 GMT</pubDate>
    <dc:creator>hagit</dc:creator>
    <dc:date>2021-03-17T09:55:34Z</dc:date>
    <item>
      <title>Dynamic where in range</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-where-in-range/m-p/12372994#M1993793</link>
      <description>&lt;P&gt;Hello experts,&lt;/P&gt;
  &lt;P&gt;I need to loop on an internal table with a dynamic where. The where should contain 'in range'.&lt;/P&gt;
  &lt;P&gt;For example, Instead of writing&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;DATA: lrng TYPE RANGE OF bkpf-blart.
LOOP AT &amp;lt;lt_bkpf&amp;gt; ASSIGNING FIELD-SYMBOL(&amp;lt;ls_bkpf&amp;gt;) WHERE blart IN lrng.
&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;&lt;EM&gt;I want to write something like:&lt;/EM&gt;&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;rng_fld_name = 'LRNG'.
ASSIGN (rng_fld_name) TO FIELD-SYMBOL(&amp;lt;rng&amp;gt;).
DATA(lv_where) = 'BLART IN ' &amp;amp;&amp;amp; &amp;lt;rng&amp;gt;.
LOOP AT &amp;lt;lt_bkpf&amp;gt; ASSIGNING FIELD-SYMBOL(&amp;lt;ls_bkpf&amp;gt;) WHERE (lv_where).
&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;The problem is that the above raises a dump in runtime&lt;/P&gt;
  &lt;P&gt;&lt;A href="https://answers.sap.com/storage/temp/1903747-err.png"&gt;err.png&lt;/A&gt;&lt;/P&gt;
  &lt;P&gt;The dump is logical. But how can I write it correctly?&lt;/P&gt;
  &lt;P&gt;Thanks in advance,&lt;/P&gt;
  &lt;P&gt;Hagit&lt;/P&gt;</description>
      <pubDate>Sun, 14 Mar 2021 13:30:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-where-in-range/m-p/12372994#M1993793</guid>
      <dc:creator>hagit</dc:creator>
      <dc:date>2021-03-14T13:30:27Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic where in range</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-where-in-range/m-p/12372995#M1993794</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;In this case, given the rest of your example, you should simply write&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA(lv_where) = 'BLART IN LRNG'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Or a bit more dynamic, using a string template:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA(lv_where) = |BLART IN { rng_fld_name }|.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 14 Mar 2021 14:18:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-where-in-range/m-p/12372995#M1993794</guid>
      <dc:creator>joltdx</dc:creator>
      <dc:date>2021-03-14T14:18:33Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic where in range</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-where-in-range/m-p/12372996#M1993795</link>
      <description>&lt;P&gt;  &lt;SPAN class="mention-scrubbed"&gt;jorgen_lindqvist41&lt;/SPAN&gt; Thanks for your quick answer.&lt;/P&gt;&lt;P&gt;I will try it&lt;/P&gt;</description>
      <pubDate>Sun, 14 Mar 2021 15:03:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-where-in-range/m-p/12372996#M1993795</guid>
      <dc:creator>hagit</dc:creator>
      <dc:date>2021-03-14T15:03:57Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic where in range</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-where-in-range/m-p/12372997#M1993796</link>
      <description>&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;jorgen_lindqvist41&lt;/SPAN&gt; It works perfectly.&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;P&gt;Hagit&lt;/P&gt;</description>
      <pubDate>Wed, 17 Mar 2021 09:55:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-where-in-range/m-p/12372997#M1993796</guid>
      <dc:creator>hagit</dc:creator>
      <dc:date>2021-03-17T09:55:34Z</dc:date>
    </item>
  </channel>
</rss>

