<?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: Loop in SMARTFORMS in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-in-smartforms/m-p/2439504#M545918</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think it's not possible to not use internal table in LOOP.&lt;/P&gt;&lt;P&gt;You can just pass internal table with one field from your print program, and then LOOP into that internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Populating that internal table should be something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*For ascending:&lt;/P&gt;&lt;P&gt;loop = 1.&lt;/P&gt;&lt;P&gt;DO n TIMES.&lt;/P&gt;&lt;P&gt;  CLEAR wa_loop.&lt;/P&gt;&lt;P&gt;  wa_loop = loop.&lt;/P&gt;&lt;P&gt;  loop = loop + 1.&lt;/P&gt;&lt;P&gt;  APPEND wa_loop TO t_loop.    &lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*For descending:&lt;/P&gt;&lt;P&gt;loop = n.&lt;/P&gt;&lt;P&gt;DO n TIMES.&lt;/P&gt;&lt;P&gt;  CLEAR wa_loop.&lt;/P&gt;&lt;P&gt;  wa_loop = loop.&lt;/P&gt;&lt;P&gt;  loop = loop - 1.&lt;/P&gt;&lt;P&gt;  APPEND wa_loop TO t_loop.    &lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it'll do.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Jul 2007 05:43:48 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-04T05:43:48Z</dc:date>
    <item>
      <title>Loop in SMARTFORMS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-in-smartforms/m-p/2439499#M545913</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 need to run a loop in smartforms. I'm not using any internal tables. Based on the value of a variable, the loop should run.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For eg. the variable VAR1 = 5. The loop should run 5 times and display 5 pages and in each page the VAR1 values should be decreased by 1 ie 5, 4, 3, 2, 1 or any order ascending or descending.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you got my requirement. Do revert in case of any clarifications.&lt;/P&gt;&lt;P&gt;Any help would be rewarded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Senthil Kumar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jul 2007 05:29:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-in-smartforms/m-p/2439499#M545913</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-04T05:29:14Z</dc:date>
    </item>
    <item>
      <title>Re: Loop in SMARTFORMS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-in-smartforms/m-p/2439500#M545914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check the below code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Calling Smartform&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        formname           = g_form&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        fm_name            = g_fm_name&lt;/P&gt;&lt;P&gt;      EXCEPTIONS&lt;/P&gt;&lt;P&gt;        no_form            = 1&lt;/P&gt;&lt;P&gt;        no_function_module = 2&lt;/P&gt;&lt;P&gt;        OTHERS             = 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    LOOP AT VARI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Calling FM generated from the smartform&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      CALL FUNCTION g_fm_name&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;          control_parameters = g_control&lt;/P&gt;&lt;P&gt;          output_options     = g_output&lt;/P&gt;&lt;P&gt;          user_settings      = ' '&lt;/P&gt;&lt;P&gt;          var                     = vari&lt;/P&gt;&lt;P&gt;        EXCEPTIONS&lt;/P&gt;&lt;P&gt;          formatting_error   = 1&lt;/P&gt;&lt;P&gt;          internal_error     = 2&lt;/P&gt;&lt;P&gt;          send_error         = 3&lt;/P&gt;&lt;P&gt;          user_canceled      = 4&lt;/P&gt;&lt;P&gt;          OTHERS             = 5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    vari = vari - 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jul 2007 05:34:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-in-smartforms/m-p/2439500#M545914</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-04T05:34:12Z</dc:date>
    </item>
    <item>
      <title>Re: Loop in SMARTFORMS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-in-smartforms/m-p/2439501#M545915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai,&lt;/P&gt;&lt;P&gt;You just try this, &lt;/P&gt;&lt;P&gt;Right click on the window node -&amp;gt; Create -&amp;gt; Flow logic -&amp;gt; Program lines&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You apply your logic like &amp;lt;b&amp;gt;Do 5 times... Enddo&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if found helpfull,&lt;/P&gt;&lt;P&gt;Regards ,&lt;/P&gt;&lt;P&gt;Rakesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jul 2007 05:36:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-in-smartforms/m-p/2439501#M545915</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-04T05:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: Loop in SMARTFORMS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-in-smartforms/m-p/2439502#M545916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi senthil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the smartform,&lt;/P&gt;&lt;P&gt;add a LOOP element into your main window.&lt;/P&gt;&lt;P&gt;In the DATA tab of your loop element uncheck the internal table option.&lt;/P&gt;&lt;P&gt;Then in the conditions tab,&lt;/P&gt;&lt;P&gt;put the name of your variable (VAR1) and its value. put less than equal to(&amp;lt;=) in the comparision column.&lt;/P&gt;&lt;P&gt;then in your LOOP element add a program line element by right clciking on it.&lt;/P&gt;&lt;P&gt; Write your logic to increase of decrease the value of your variable accordingly.&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;Ravish Garg&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS: Reward points if useful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jul 2007 05:37:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-in-smartforms/m-p/2439502#M545916</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-04T05:37:01Z</dc:date>
    </item>
    <item>
      <title>Re: Loop in SMARTFORMS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-in-smartforms/m-p/2439503#M545917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; This one u can write code in Program lines and check the page no according to u can pass value to the given variable&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nandha&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if it helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jul 2007 05:38:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-in-smartforms/m-p/2439503#M545917</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-04T05:38:43Z</dc:date>
    </item>
    <item>
      <title>Re: Loop in SMARTFORMS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-in-smartforms/m-p/2439504#M545918</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think it's not possible to not use internal table in LOOP.&lt;/P&gt;&lt;P&gt;You can just pass internal table with one field from your print program, and then LOOP into that internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Populating that internal table should be something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*For ascending:&lt;/P&gt;&lt;P&gt;loop = 1.&lt;/P&gt;&lt;P&gt;DO n TIMES.&lt;/P&gt;&lt;P&gt;  CLEAR wa_loop.&lt;/P&gt;&lt;P&gt;  wa_loop = loop.&lt;/P&gt;&lt;P&gt;  loop = loop + 1.&lt;/P&gt;&lt;P&gt;  APPEND wa_loop TO t_loop.    &lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*For descending:&lt;/P&gt;&lt;P&gt;loop = n.&lt;/P&gt;&lt;P&gt;DO n TIMES.&lt;/P&gt;&lt;P&gt;  CLEAR wa_loop.&lt;/P&gt;&lt;P&gt;  wa_loop = loop.&lt;/P&gt;&lt;P&gt;  loop = loop - 1.&lt;/P&gt;&lt;P&gt;  APPEND wa_loop TO t_loop.    &lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it'll do.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jul 2007 05:43:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-in-smartforms/m-p/2439504#M545918</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-04T05:43:48Z</dc:date>
    </item>
  </channel>
</rss>

