<?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: Smartforms in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms/m-p/9756120#M1774830</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Veena,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I really doubt that you will be able to achieve your req that easily. In your case there can be multiple deliveries with multiple line items and as per my understanding if first delivery had 13 line items and second as 8. you would be actually printing 5+5 on one page, 3+5 on second and remaining 3 on third page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is my suggsetion to it( not full proof but will work after some fine tuning):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create two loops in static window instead of using MAIN WINDOW and set them in layout as per your requirement. u can use two tables also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;before the first loop, in program lines, move the first five records from main table to temporary table. Check if these are for same delivery, if yes then delete five records from main table, if not then delete the records for second delivery from temporary table and delete only records of first delivery from main table. (i knw sounds confusing, but this means that 3 records of first dely are captured and next loop will process from first line item of second delivery)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;repeat the same logic in program lines before the second loop.&lt;/P&gt;&lt;P&gt;Loop at the temporary table, since we moved only 5 records it will print max of 5 records at a time. After each loop, we check for next 5 entries as per our logic and keep on repeating for even different deliveries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please revert if still in doubt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;DN.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Oct 2013 09:17:05 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2013-10-14T09:17:05Z</dc:date>
    <item>
      <title>Smartforms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms/m-p/9756116#M1774826</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 question regarding smartforms.&lt;/P&gt;&lt;P&gt;My requirement is label printing with multiple line items.&lt;/P&gt;&lt;P&gt;there will be 2 delivery numbers printed in the same page so that customer can tear the page in middle.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;condition is only 5 line items should be printed per delivery no.&lt;/P&gt;&lt;P&gt;If any delivery no. is having more than 5 line items it should go to below window.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for ex:&lt;/P&gt;&lt;P&gt;first half of page&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;delivery no.1 (if this delivery no has 15 line items)&lt;/P&gt;&lt;P&gt;header&lt;/P&gt;&lt;P&gt;details&lt;/P&gt;&lt;P&gt;table:&lt;/P&gt;&lt;P&gt;line item1&lt;/P&gt;&lt;P&gt;line item2&lt;/P&gt;&lt;P&gt;line item3&lt;/P&gt;&lt;P&gt;line item4&lt;/P&gt;&lt;P&gt;line item5&lt;/P&gt;&lt;P&gt;text1&lt;/P&gt;&lt;P&gt;text2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;second half of page&lt;/P&gt;&lt;P&gt;delivery no.1&lt;/P&gt;&lt;P&gt;header&lt;/P&gt;&lt;P&gt;details&lt;/P&gt;&lt;P&gt;table:&lt;/P&gt;&lt;P&gt;line item6&lt;/P&gt;&lt;P&gt;line item7&lt;/P&gt;&lt;P&gt;line item8&lt;/P&gt;&lt;P&gt;line item9&lt;/P&gt;&lt;P&gt;line item10&lt;/P&gt;&lt;P&gt;text1&lt;/P&gt;&lt;P&gt;text2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then it should go to next page for printing on second page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to do this by having a secondary window and a main window.&lt;/P&gt;&lt;P&gt;in secondary window i am printing first 5 line items and then deleting those&amp;nbsp; 5 line items &lt;/P&gt;&lt;P&gt;and looping the same table in main window again for next 5 line items.&lt;/P&gt;&lt;P&gt;But in the output i am able to see the first 5 line items but no data is being printed in main window except for text1 and text2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions on this will be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;VN.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Oct 2013 06:53:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms/m-p/9756116#M1774826</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-10-14T06:53:37Z</dc:date>
    </item>
    <item>
      <title>Re: Smartforms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms/m-p/9756117#M1774827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Veena,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before i provide any suggestions on this, can you please confirm that you are deleting correctly only first 5 records. Can you please check in debuging mode that data is present in the Main Window and still its not printing?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;DN.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Oct 2013 07:59:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms/m-p/9756117#M1774827</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-10-14T07:59:53Z</dc:date>
    </item>
    <item>
      <title>Re: Smartforms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms/m-p/9756118#M1774828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Deepak,&lt;/P&gt;&lt;P&gt; I am using below logic :&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;data &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;: &lt;/SPAN&gt;g_mod &lt;SPAN class="L0S52"&gt;type &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;i&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN class="L0S52"&gt;DESCRIBE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;TABLE &lt;/SPAN&gt;it_item &lt;SPAN class="L0S52"&gt;LINES &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;i&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; g_f_count &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;g_f_count + &lt;SPAN class="L0S32"&gt;1&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;. "count for every line item.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN class="L0S52"&gt;if &lt;/SPAN&gt;g_f_count &amp;gt; &lt;SPAN class="L0S32"&gt;5&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; g_mod &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;g_f_count / &lt;SPAN class="L0S32"&gt;5&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN class="L0S52"&gt;if &lt;/SPAN&gt;g_mod &amp;gt; &lt;SPAN class="L0S32"&gt;0&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;delete &lt;/SPAN&gt;it_item &lt;SPAN class="L0S52"&gt;from &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;1 &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;to &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;5&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;else&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;delete &lt;/SPAN&gt;it_final2 &lt;SPAN class="L0S52"&gt;index &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;1&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;endif&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;endif&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;it_item is item table and it_final2 is header table.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;And I am placing this code in first window table main area program lines.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;In debug mode I am able to see data ,with above code first 5 lines are getting deleted. but that data is not flowing into main window table.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is to exit secondary window after 5 lines and move to main window for next 5 lines.&lt;/P&gt;&lt;P&gt;That is not happening.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;VN.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Oct 2013 08:30:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms/m-p/9756118#M1774828</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-10-14T08:30:18Z</dc:date>
    </item>
    <item>
      <title>Re: Smartforms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms/m-p/9756119#M1774829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use the codes to check if you are treating an index which is a multiple of 5.&lt;/P&gt;&lt;P&gt;If yes, set a flag, else clear it.&lt;/P&gt;&lt;P&gt;Then use the command for next page with a condition (flag = x).&lt;/P&gt;&lt;P&gt;put the command after the after the item row&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;important: You should be in the main winfow for this to be possible !!!!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hpoe it helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Oct 2013 08:52:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms/m-p/9756119#M1774829</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-10-14T08:52:54Z</dc:date>
    </item>
    <item>
      <title>Re: Smartforms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms/m-p/9756120#M1774830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Veena,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I really doubt that you will be able to achieve your req that easily. In your case there can be multiple deliveries with multiple line items and as per my understanding if first delivery had 13 line items and second as 8. you would be actually printing 5+5 on one page, 3+5 on second and remaining 3 on third page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is my suggsetion to it( not full proof but will work after some fine tuning):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create two loops in static window instead of using MAIN WINDOW and set them in layout as per your requirement. u can use two tables also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;before the first loop, in program lines, move the first five records from main table to temporary table. Check if these are for same delivery, if yes then delete five records from main table, if not then delete the records for second delivery from temporary table and delete only records of first delivery from main table. (i knw sounds confusing, but this means that 3 records of first dely are captured and next loop will process from first line item of second delivery)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;repeat the same logic in program lines before the second loop.&lt;/P&gt;&lt;P&gt;Loop at the temporary table, since we moved only 5 records it will print max of 5 records at a time. After each loop, we check for next 5 entries as per our logic and keep on repeating for even different deliveries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please revert if still in doubt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;DN.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Oct 2013 09:17:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms/m-p/9756120#M1774830</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-10-14T09:17:05Z</dc:date>
    </item>
  </channel>
</rss>

