<?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>Question Re: BODS while loop in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/bods-while-loop/qaa-p/10611121#M3863293</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check this &lt;A __default_attr="38951" __jive_macro_name="document" class="jive_macro_document jive_macro" data-orig-content="Dynamic folder creation " href="https://community.sap.com/"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Sep 2014 13:48:53 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2014-09-17T13:48:53Z</dc:date>
    <item>
      <title>BODS while loop</title>
      <link>https://community.sap.com/t5/technology-q-a/bods-while-loop/qaq-p/10611120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp; I am trying to use a while loop to execute a (dataflow to write into a template table)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a counter from another template table, say ROW_NO. I have to execute the dataflow in increments of 50 rows until all the ROW_NO are executed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I do that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also how can I write to the same template table or append the data without losing the data during the while loop execution?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using BODS 14.1.1.210.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2014 13:14:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/bods-while-loop/qaq-p/10611120</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-09-17T13:14:34Z</dc:date>
    </item>
    <item>
      <title>Re: BODS while loop</title>
      <link>https://community.sap.com/t5/technology-q-a/bods-while-loop/qaa-p/10611121#M3863293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check this &lt;A __default_attr="38951" __jive_macro_name="document" class="jive_macro_document jive_macro" data-orig-content="Dynamic folder creation " href="https://community.sap.com/"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2014 13:48:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/bods-while-loop/qaa-p/10611121#M3863293</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-09-17T13:48:53Z</dc:date>
    </item>
    <item>
      <title>Re: BODS while loop</title>
      <link>https://community.sap.com/t5/technology-q-a/bods-while-loop/qaa-p/10611122#M3863294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;using a sql statement in a script, set a global variable to a count of your table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set another variable =&amp;nbsp; -1 * ( floor( -1 * &amp;lt;var_count&amp;gt; / 50))&lt;/P&gt;&lt;P&gt;(this will be your max count for your while loop iterator)&amp;nbsp; while counter &amp;lt;= max count&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create a current iter global variable, assign it a starting value of 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you'll need a side table to join to your source table, which has a sequence number and some index to join to source.&amp;nbsp; Counter starts at zero, so you where off counter &amp;gt;= counter * 50 + 1 and var_counter_iter &amp;lt;= (var_counter_iter + 1) * 50&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;left outer join on sequence table - source table(on index),&amp;nbsp; then where off on sequence table index is not null.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import your temp table as a perm table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then after the dataflow, inside the while loop ... increment your var_counter_iter.&amp;nbsp; ($var_counter_iter = $var_counter_iter + 1;)&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;If you followed that... &lt;SPAN __jive_emoticon_name="shocked" __jive_macro_name="emoticon" class="jive_macro_emoticon jive_macro jive_emote" src="https://community.sap.com/1024/images/emoticons/shocked.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2014 19:40:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/bods-while-loop/qaa-p/10611122#M3863294</guid>
      <dc:creator>former_member106536</dc:creator>
      <dc:date>2014-09-17T19:40:02Z</dc:date>
    </item>
  </channel>
</rss>

