<?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: looping the tables in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping-the-tables/m-p/2636732#M606711</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ram upto table lines it is working properly .&lt;/P&gt;&lt;P&gt;no of times i have given 3 .so it goes 3 times and counter also becomes 3 .but the window is displaying only once .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pls tell me what to do in command line .&lt;/P&gt;&lt;P&gt;in condition tab i have given &lt;/P&gt;&lt;P&gt;fieldname  =  c(my counter variable)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;comparison value = times (the number i have given in selection screen )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in general attributes i have ticked the options for next page .&lt;/P&gt;&lt;P&gt;i have copied first page and pasted as second page .&lt;/P&gt;&lt;P&gt;whjat else to do?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Jul 2007 07:59:59 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-27T07:59:59Z</dc:date>
    <item>
      <title>looping the tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping-the-tables/m-p/2636726#M606705</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi experts,&lt;/P&gt;&lt;P&gt;I have a typical requiremnt .i need to get some numbers during section screen .i have created a smartform with a table in it .according to the number i have selected at selection screen .the tables should be printed that much times .how to do this.?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jul 2007 07:08:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping-the-tables/m-p/2636726#M606705</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-27T07:08:17Z</dc:date>
    </item>
    <item>
      <title>Re: looping the tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping-the-tables/m-p/2636727#M606706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use DO-ENDDO loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO # OF TIMES VARYING info-ocd&lt;/P&gt;&lt;P&gt;FROM MY-ocd01&lt;/P&gt;&lt;P&gt;NEXT MY-ocd02&lt;/P&gt;&lt;P&gt;VARYING info-odt&lt;/P&gt;&lt;P&gt;FROM MY-odT01&lt;/P&gt;&lt;P&gt;NEXT MY-odT02&lt;/P&gt;&lt;P&gt;VARYING info-otm&lt;/P&gt;&lt;P&gt;FROM MY-otm01&lt;/P&gt;&lt;P&gt;NEXT MY-otm02 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward all helpful replies.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jul 2007 07:12:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping-the-tables/m-p/2636727#M606706</guid>
      <dc:creator>amit_khare</dc:creator>
      <dc:date>2007-07-27T07:12:13Z</dc:date>
    </item>
    <item>
      <title>Re: looping the tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping-the-tables/m-p/2636728#M606707</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;While looping for smart form write the condition as follows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;IF &amp;lt;Value from selection screen&amp;gt; = SY_TABIX.&lt;/P&gt;&lt;P&gt;EXIT.&lt;/P&gt;&lt;P&gt;ENDIF.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will exit from the loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ranjit Thakur.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Please Mark The Helpful Answer.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jul 2007 07:12:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping-the-tables/m-p/2636728#M606707</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-27T07:12:39Z</dc:date>
    </item>
    <item>
      <title>Re: looping the tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping-the-tables/m-p/2636729#M606708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;where to write this code ranjith .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in table DATA or&lt;/P&gt;&lt;P&gt;in table conditions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jul 2007 07:15:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping-the-tables/m-p/2636729#M606708</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-27T07:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: looping the tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping-the-tables/m-p/2636730#M606709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;WHERE I HAVE TO WRITE THIS CODE AMIT?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jul 2007 07:28:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping-the-tables/m-p/2636730#M606709</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-27T07:28:31Z</dc:date>
    </item>
    <item>
      <title>Re: looping the tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping-the-tables/m-p/2636731#M606710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Manikandan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While you are calling the SMARTFORM, you can pass the Number that you select in the selection screen as one of the parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now in SMARTFORMS, display the TABLE. &lt;/P&gt;&lt;P&gt;Use PROGRAM LINES.&lt;/P&gt;&lt;P&gt;Initialize a counter variable. Put a DO ENDDO loop for the Number selected in selection screen of your program.&lt;/P&gt;&lt;P&gt;Introduce COMMAND where you can set a condition like IF Counter &amp;lt;= (Number selected in selection scren), call NEXT PAGE.&lt;/P&gt;&lt;P&gt;This would help you print the table, number of times according to the n umber selected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward points for useful answers.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Ram.&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;Hope this solves your issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward for informatory answers.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Ram.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jul 2007 07:30:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping-the-tables/m-p/2636731#M606710</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-27T07:30:39Z</dc:date>
    </item>
    <item>
      <title>Re: looping the tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping-the-tables/m-p/2636732#M606711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ram upto table lines it is working properly .&lt;/P&gt;&lt;P&gt;no of times i have given 3 .so it goes 3 times and counter also becomes 3 .but the window is displaying only once .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pls tell me what to do in command line .&lt;/P&gt;&lt;P&gt;in condition tab i have given &lt;/P&gt;&lt;P&gt;fieldname  =  c(my counter variable)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;comparison value = times (the number i have given in selection screen )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in general attributes i have ticked the options for next page .&lt;/P&gt;&lt;P&gt;i have copied first page and pasted as second page .&lt;/P&gt;&lt;P&gt;whjat else to do?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jul 2007 07:59:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping-the-tables/m-p/2636732#M606711</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-27T07:59:59Z</dc:date>
    </item>
    <item>
      <title>Re: looping the tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping-the-tables/m-p/2636733#M606712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Manikandan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The flow would be like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MAIN WINDOW&lt;/P&gt;&lt;P&gt;  FIRST PAGE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Print the Table lines - First Time&lt;/P&gt;&lt;P&gt;2. Once you print the table, in PROGRAM LINES - Increment the counter (Initialized variable) by ONE. Here check if it less than or Equal to Varaible(Selection screen number) before initializing.&lt;/P&gt;&lt;P&gt;3. Now using COMMAND LINES - in condition tab check if Counter &amp;lt;= Variable(Selection screen number). If yes, then GOTO NEXT PAGE.&lt;/P&gt;&lt;P&gt;4. In MAIN WINDOW or FIRST PAGE Attributes (Am not sure), the NEXT PAGE option is available. Here also you need to default it to the same page again, So that the same page appears again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This would be the object flow. Try few things out here and you should be able to print the tables with out any issues.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are still not very clear about the flow, please try SFTRACE - this will help you to DEBUG the smartform which would help you inturn to know whats happening exactly (Object Flow) when it is getting executed.&lt;/P&gt;&lt;P&gt;For help on SFTRACE&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2004/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_erp2004/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you solve the issue. &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&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;&lt;P&gt;&amp;lt;b&amp;gt;Reward points for helpful answers.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Ram.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jul 2007 08:25:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping-the-tables/m-p/2636733#M606712</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-27T08:25:04Z</dc:date>
    </item>
  </channel>
</rss>

