<?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: multiple line items in smartform using template in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-line-items-in-smartform-using-template/m-p/11453028#M1929147</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arpit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess the last page will be containing only the hard-code values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To avoid this kindly do the following steps.&lt;/P&gt;&lt;P&gt;1.&amp;nbsp; Before the loop, store the count of Table-size(internal table on which you are iterating) into one global variable(say GV_COUNT) using&amp;nbsp; &lt;SPAN style="font-size: 10pt;"&gt;program-logic&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; In the 2nd tab[Conditions] of the Command-Line, write the condition as &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #333333; font-size: 12px;"&gt;SFSY-PAGE LT &lt;/SPAN&gt; &lt;SPAN style="font-size: 13.3333px;"&gt;GV_COUNT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Doing so, the command-Line will not trigger at the last iteration and page-break will not happen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if this wont work out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gupta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 02 Jan 2016 14:53:21 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2016-01-02T14:53:21Z</dc:date>
    <item>
      <title>multiple line items in smartform using template</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-line-items-in-smartform-using-template/m-p/11453010#M1929129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a smartform, in which I have used only templates.&lt;/P&gt;&lt;P&gt;In multiple line item case it only takes last line item and prints.&lt;/P&gt;&lt;P&gt;I have also searched web where experts advice to use tables for multiple line items.&lt;/P&gt;&lt;P&gt;Still , is there any other way out that without changing my SF design same can be achieved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am attaching screen shot of output where part no, item and quantity changes in line item (plz see screen shot).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so please help me to solve this issue.&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;Arpit R&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Dec 2015 07:39:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-line-items-in-smartform-using-template/m-p/11453010#M1929129</guid>
      <dc:creator>arpitr</dc:creator>
      <dc:date>2015-12-28T07:39:58Z</dc:date>
    </item>
    <item>
      <title>Re: multiple line items in smartform using template</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-line-items-in-smartform-using-template/m-p/11453011#M1929130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arpit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you want to display multiple line item details table is the best way to display.&lt;/P&gt;&lt;P&gt;But if you still want to use template for that , use that template inside the loop so the template will be repeated and display data like wise.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jaydeep Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Dec 2015 07:47:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-line-items-in-smartform-using-template/m-p/11453011#M1929130</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-12-28T07:47:39Z</dc:date>
    </item>
    <item>
      <title>Re: multiple line items in smartform using template</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-line-items-in-smartform-using-template/m-p/11453012#M1929131</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;templates are used when the output is known to us, templates have fixed structure i.e when we display fixed data as it does not grow with dynamic data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so you must use tables as number of the line items(dynamic data) are not known to you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Dec 2015 07:58:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-line-items-in-smartform-using-template/m-p/11453012#M1929131</guid>
      <dc:creator>Chintu6august</dc:creator>
      <dc:date>2015-12-28T07:58:11Z</dc:date>
    </item>
    <item>
      <title>Re: multiple line items in smartform using template</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-line-items-in-smartform-using-template/m-p/11453013#M1929132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Jaydeep,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I changed it as u suggested but it is not working.&lt;/P&gt;&lt;P&gt;also as per my SF design is it possible to use tables?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Arpit&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/858473" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Dec 2015 08:05:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-line-items-in-smartform-using-template/m-p/11453013#M1929132</guid>
      <dc:creator>arpitr</dc:creator>
      <dc:date>2015-12-28T08:05:00Z</dc:date>
    </item>
    <item>
      <title>Re: multiple line items in smartform using template</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-line-items-in-smartform-using-template/m-p/11453014#M1929133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;except main window, no window grows with dynamic data. I believe you are using secondary windows with template inside loop.&lt;/P&gt;&lt;P&gt;therefore you need to use table in the main window to display line items.&lt;/P&gt;&lt;P&gt;thanks!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Dec 2015 08:09:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-line-items-in-smartform-using-template/m-p/11453014#M1929133</guid>
      <dc:creator>Chintu6august</dc:creator>
      <dc:date>2015-12-28T08:09:22Z</dc:date>
    </item>
    <item>
      <title>Re: multiple line items in smartform using template</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-line-items-in-smartform-using-template/m-p/11453015#M1929134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Aprit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;first thing your line item wise data should be display in main window as secondary window have static height. secondly you can use table and you have to create different&amp;nbsp; lines types according to your requirement , here you require 3-4 different line type .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can you share the format that you want with multiple record ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jaydeep Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Dec 2015 09:26:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-line-items-in-smartform-using-template/m-p/11453015#M1929134</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-12-28T09:26:38Z</dc:date>
    </item>
    <item>
      <title>Re: multiple line items in smartform using template</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-line-items-in-smartform-using-template/m-p/11453016#M1929135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Go with Table, its ultimate solution, remove Template. I agree with Above chintu sharma reply.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Dec 2015 10:32:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-line-items-in-smartform-using-template/m-p/11453016#M1929135</guid>
      <dc:creator>former_member1228842</dc:creator>
      <dc:date>2015-12-28T10:32:26Z</dc:date>
    </item>
    <item>
      <title>Re: multiple line items in smartform using template</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-line-items-in-smartform-using-template/m-p/11453017#M1929136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Jaydeep,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have made changes and now format is as shown in screenshot.&lt;/P&gt;&lt;P&gt;Now req is to print whole smartform for each line item.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example in current document there are 3 line items.&lt;/P&gt;&lt;P&gt;So three pages should be generated where only table data will be changed.&lt;/P&gt;&lt;P&gt;Table has 5 columns :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;part no&amp;nbsp;&amp;nbsp;&amp;nbsp; Item&amp;nbsp;&amp;nbsp; cha quan&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; R qua&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; acc quan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so how can I proceed now ?&lt;/P&gt;&lt;P&gt;SF is getting printed rightly for only 1 line item&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Arpit&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/858608" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Dec 2015 11:15:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-line-items-in-smartform-using-template/m-p/11453017#M1929136</guid>
      <dc:creator>arpitr</dc:creator>
      <dc:date>2015-12-28T11:15:09Z</dc:date>
    </item>
    <item>
      <title>Re: multiple line items in smartform using template</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-line-items-in-smartform-using-template/m-p/11453018#M1929137</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;you can use command for page break.&lt;/P&gt;&lt;P&gt;refer below pic for reference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/858695" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jaydeep Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Dec 2015 13:04:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-line-items-in-smartform-using-template/m-p/11453018#M1929137</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-12-28T13:04:47Z</dc:date>
    </item>
    <item>
      <title>Re: multiple line items in smartform using template</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-line-items-in-smartform-using-template/m-p/11453019#M1929138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arpit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Make use of events(Sort begin or sort end) to create different pages of smartforms for every line item.&lt;/P&gt;&lt;P&gt;Let me know if you need anymore help.&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;Shadab.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Dec 2015 13:05:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-line-items-in-smartform-using-template/m-p/11453019#M1929138</guid>
      <dc:creator>shadab_maldar</dc:creator>
      <dc:date>2015-12-28T13:05:58Z</dc:date>
    </item>
    <item>
      <title>Re: multiple line items in smartform using template</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-line-items-in-smartform-using-template/m-p/11453020#M1929139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jaydeep,&lt;/P&gt;&lt;P&gt;as suggested by you I used command under row, but it create problem after all line item.&lt;/P&gt;&lt;P&gt;For example, in a document there are 3 line items so 3 pages are generating which is correct, but additional 4 page is also generated and there is a gap bet main window and next window.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also checked upper margin and window layout and didn't get the reason.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Arpit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Dec 2015 15:41:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-line-items-in-smartform-using-template/m-p/11453020#M1929139</guid>
      <dc:creator>arpitr</dc:creator>
      <dc:date>2015-12-29T15:41:09Z</dc:date>
    </item>
    <item>
      <title>Re: multiple line items in smartform using template</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-line-items-in-smartform-using-template/m-p/11453021#M1929140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shadab,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you guide me to use events?&lt;/P&gt;&lt;P&gt;I am getting this(screenshot) where 2 line items are getting printed on a single page , but when item name is big enough to occupy all space, I get correct output.&lt;/P&gt;&lt;P&gt;So please guide me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards Shadab,&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/859340" width="450" /&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/859341" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Dec 2015 15:53:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-line-items-in-smartform-using-template/m-p/11453021#M1929140</guid>
      <dc:creator>arpitr</dc:creator>
      <dc:date>2015-12-29T15:53:50Z</dc:date>
    </item>
    <item>
      <title>Re: multiple line items in smartform using template</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-line-items-in-smartform-using-template/m-p/11453022#M1929141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arpit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/859607" width="450" /&gt;&lt;/P&gt;&lt;P&gt;This will reduce your extra page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jaydeep Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Dec 2015 05:35:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-line-items-in-smartform-using-template/m-p/11453022#M1929141</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-12-30T05:35:34Z</dc:date>
    </item>
    <item>
      <title>Re: multiple line items in smartform using template</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-line-items-in-smartform-using-template/m-p/11453023#M1929142</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arpit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check out the below example, Here one document number from BKPF has multiple line items in BSEG which has to display in multiple smartforms(Each document on single page with correcponding line items on same page).&lt;/P&gt;&lt;P&gt;Check The screen shot for each step.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Steps&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Define a loop with event sort begin(Here you can use your internal table which contains the line&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; item and use the part No. in event as i have used BELNR here).&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/859694" width="450" /&gt;&lt;/P&gt;&lt;P&gt;In your case whenever the new part No. will come this event will fire and the inner loop gets executed, and after displaying the line item it will again&amp;nbsp; call the new page with the help of command.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.Put the validation for table in a loop to have the relation between BKPF and BSEG(In you case the internal table at loop and at main table is same i,e. internal which contains line items partno = wa_itab-partno).&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/859695" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.And the final step is to call new page(By using Command) when all the corresponding lines are printed on one page.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/859696" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if you have any doubts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Shadab.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Dec 2015 07:11:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-line-items-in-smartform-using-template/m-p/11453023#M1929142</guid>
      <dc:creator>shadab_maldar</dc:creator>
      <dc:date>2015-12-30T07:11:48Z</dc:date>
    </item>
    <item>
      <title>Re: multiple line items in smartform using template</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-line-items-in-smartform-using-template/m-p/11453024#M1929143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Shadab for the help, u gave clear idea and it helped me a lot.&lt;/P&gt;&lt;P&gt;I have passed all 3 fields (partno, item, qty) in events as adviced by you.&lt;/P&gt;&lt;P&gt;I want little bit help more.&lt;/P&gt;&lt;P&gt;I have a document having 4 line items . All four line items could be seen in debug (screenshot)&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/859927" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but when I checked output all 4 pages are genereted but with different combination of Item(MAKTX)&amp;nbsp; Part no (MATNR) and Chal Qty(menge).&lt;/P&gt;&lt;P&gt;screenshots are in orderd as they appear in ouput.&lt;/P&gt;&lt;P&gt;pg1&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/860105" width="450" /&gt;&lt;/P&gt;&lt;P&gt;pg2&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/860106" width="450" /&gt;&lt;/P&gt;&lt;P&gt;pg3&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/860107" width="450" /&gt;&lt;/P&gt;&lt;P&gt;pg4&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/860108" width="450" /&gt;&lt;/P&gt;&lt;P&gt;I also debugged the program for getting reason but didn't get it.&lt;/P&gt;&lt;P&gt;So if you have any clue please advice me.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Arpit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Dec 2015 16:52:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-line-items-in-smartform-using-template/m-p/11453024#M1929143</guid>
      <dc:creator>arpitr</dc:creator>
      <dc:date>2015-12-30T16:52:32Z</dc:date>
    </item>
    <item>
      <title>Re: multiple line items in smartform using template</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-line-items-in-smartform-using-template/m-p/11453025#M1929144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arpit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry for the late reply, I am not clear about your query, will you please explain me what exactly you want??&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;shadab.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Dec 2015 11:55:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-line-items-in-smartform-using-template/m-p/11453025#M1929144</guid>
      <dc:creator>shadab_maldar</dc:creator>
      <dc:date>2015-12-31T11:55:16Z</dc:date>
    </item>
    <item>
      <title>Re: multiple line items in smartform using template</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-line-items-in-smartform-using-template/m-p/11453026#M1929145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arpit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One more thing I need to add here, Instead of using part no, Item and quantity in event make use of only ZEILE(Which I can see in first screen shot) in a event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&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;Shadab.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Dec 2015 12:02:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-line-items-in-smartform-using-template/m-p/11453026#M1929145</guid>
      <dc:creator>shadab_maldar</dc:creator>
      <dc:date>2015-12-31T12:02:18Z</dc:date>
    </item>
    <item>
      <title>Re: multiple line items in smartform using template</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-line-items-in-smartform-using-template/m-p/11453027#M1929146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shadab,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I already tried it, also I tried it with combination of partno, Item and Quantity, but still there are problems.&lt;/P&gt;&lt;P&gt;Now I have changed the whole structure again and I am using templates only inside main window by looping them .&lt;/P&gt;&lt;P&gt;Now Item wise pages are generated, but It generates extra page after all line items&lt;/P&gt;&lt;P&gt;( total no.page = line item + 1), I have also used command inside the loop which is necessary.&lt;/P&gt;&lt;P&gt;So do you have any suggestion to avoid that last page ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Arpit&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/860667" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Jan 2016 09:27:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-line-items-in-smartform-using-template/m-p/11453027#M1929146</guid>
      <dc:creator>arpitr</dc:creator>
      <dc:date>2016-01-02T09:27:25Z</dc:date>
    </item>
    <item>
      <title>Re: multiple line items in smartform using template</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-line-items-in-smartform-using-template/m-p/11453028#M1929147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arpit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess the last page will be containing only the hard-code values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To avoid this kindly do the following steps.&lt;/P&gt;&lt;P&gt;1.&amp;nbsp; Before the loop, store the count of Table-size(internal table on which you are iterating) into one global variable(say GV_COUNT) using&amp;nbsp; &lt;SPAN style="font-size: 10pt;"&gt;program-logic&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; In the 2nd tab[Conditions] of the Command-Line, write the condition as &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #333333; font-size: 12px;"&gt;SFSY-PAGE LT &lt;/SPAN&gt; &lt;SPAN style="font-size: 13.3333px;"&gt;GV_COUNT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Doing so, the command-Line will not trigger at the last iteration and page-break will not happen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if this wont work out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gupta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Jan 2016 14:53:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-line-items-in-smartform-using-template/m-p/11453028#M1929147</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-01-02T14:53:21Z</dc:date>
    </item>
    <item>
      <title>Re: multiple line items in smartform using template</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-line-items-in-smartform-using-template/m-p/11453029#M1929148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arpit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try the below to restrict the blank page coming at last.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.Define two global variables as below with default value for M.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/861435" width="450" /&gt;&lt;/P&gt;&lt;P&gt;2.Define the program lines after the event and get the value of itab(Of first loop and delete adjacent&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; Duplicates).&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/861436" width="450" /&gt;&lt;/P&gt;&lt;P&gt;3.Define a condition at command line to restrict calling last page.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/861440" width="450" /&gt;&lt;/P&gt;&lt;P&gt;Here you go its done, let me know if you are still facing any issues.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Shadab.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jan 2016 14:29:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-line-items-in-smartform-using-template/m-p/11453029#M1929148</guid>
      <dc:creator>shadab_maldar</dc:creator>
      <dc:date>2016-01-04T14:29:43Z</dc:date>
    </item>
  </channel>
</rss>

