<?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: Smartform Subtotal Issue in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartform-subtotal-issue/m-p/6935935#M1486546</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are right. I checked it. It's printing the subtotal adding the first item in second page in first page and similarly it's ignoring the last item in last page while printing subtotal. It can be resolved using the calculations tab in TABLE. Follow the steps given below.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Create a table. Print the item lines in main area and in footer print the subtotal variable using text elements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. In footer initialize the subtotal after printing it. Also, check page break and at end table checkboxes for footer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Now, instead of calculating the subtotal inside main area do it in calculations tab of the table with the following options&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   OPERATION          TOTAL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   FIELDNAME           YOUR WORKAREA-FIELD TO BE SUMMED&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   TARGET FIELD      SUBTOTAL FIELD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   TIME                      AFTER LOOP&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Apr 2010 12:58:45 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-04-27T12:58:45Z</dc:date>
    <item>
      <title>Smartform Subtotal Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartform-subtotal-issue/m-p/6935931#M1486542</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 an issue with smartform subtotals. In each page 5 lines are printed now. i.e if i have 20 lines in my internal table, its printing in 4 pages. The issue is with subtotals, I need to calculate subtotals for each page if its not the last page and in last page the grand total should be printed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Right now i am calculating subtotals using program lines in main area of my table. The issue is my page break getting triggered after the 6 line but in form its printing only 5 lines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lets say if my subtotal up to 5 lines is 100 and my total up to 6 lines is 120. Its printing 5 lines in my form but the subtotal is 120.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i have only 6 lines in my internal table, in first page 5 lines are printed but sub total is 120 in next page 1 line is printed and (sub)total is zero.&lt;/P&gt;&lt;P&gt;I am not printing the subtotal in footer part of the table, instead iam using a different window and template.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please suggest a solution to fix this issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance..&lt;/P&gt;&lt;P&gt;Rajesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Apr 2010 15:56:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/smartform-subtotal-issue/m-p/6935931#M1486542</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-26T15:56:46Z</dc:date>
    </item>
    <item>
      <title>Re: Smartform Subtotal Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartform-subtotal-issue/m-p/6935932#M1486543</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 don't see how that's its possible to get subtotals wrong if you know the EXACT number of lines printed on each page. You just add THAT many lines to get the subtotal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;B P&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Apr 2010 23:44:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/smartform-subtotal-issue/m-p/6935932#M1486543</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-26T23:44:30Z</dc:date>
    </item>
    <item>
      <title>Re: Smartform Subtotal Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartform-subtotal-issue/m-p/6935933#M1486544</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's hard to comment without seeing the smartform coding.  I'll suggest to create a separate variable for subtotal and print it in footer part of the table at page break. The subtotal variable must be initialized after printing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Apr 2010 10:50:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/smartform-subtotal-issue/m-p/6935933#M1486544</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-27T10:50:44Z</dc:date>
    </item>
    <item>
      <title>Re: Smartform Subtotal Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartform-subtotal-issue/m-p/6935934#M1486545</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your replies!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Coding is very simple i am just adding my work area field to a new variable i.e &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Subtotal = subtotal + wa-field6.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After printing Subtotal in the form, i am clearing the variable subtotal so that every page will have the correct subtotal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The actual issue was My code is executing before the page break is triggered. i.e The smartform is only able to decide after executing the code for 6 th line in my internal table that it cannot print the 6th line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have No page break checked  for line type in my table. My issue is exactly as in the below thread. I am trying to implement the same solution provided in this thread. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="2991173"&gt;&lt;/A&gt;]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Apr 2010 12:23:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/smartform-subtotal-issue/m-p/6935934#M1486545</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-27T12:23:21Z</dc:date>
    </item>
    <item>
      <title>Re: Smartform Subtotal Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartform-subtotal-issue/m-p/6935935#M1486546</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are right. I checked it. It's printing the subtotal adding the first item in second page in first page and similarly it's ignoring the last item in last page while printing subtotal. It can be resolved using the calculations tab in TABLE. Follow the steps given below.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Create a table. Print the item lines in main area and in footer print the subtotal variable using text elements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. In footer initialize the subtotal after printing it. Also, check page break and at end table checkboxes for footer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Now, instead of calculating the subtotal inside main area do it in calculations tab of the table with the following options&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   OPERATION          TOTAL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   FIELDNAME           YOUR WORKAREA-FIELD TO BE SUMMED&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   TARGET FIELD      SUBTOTAL FIELD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   TIME                      AFTER LOOP&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Apr 2010 12:58:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/smartform-subtotal-issue/m-p/6935935#M1486546</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-27T12:58:45Z</dc:date>
    </item>
    <item>
      <title>Re: Smartform Subtotal Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartform-subtotal-issue/m-p/6935936#M1486547</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the answer. It worked.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Apr 2010 14:20:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/smartform-subtotal-issue/m-p/6935936#M1486547</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-27T14:20:43Z</dc:date>
    </item>
    <item>
      <title>Re: Smartform Subtotal Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartform-subtotal-issue/m-p/6935937#M1486548</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the same issue as rajesh's except that iam not displaying total at the end of everypage( it gets disaplyed at the end).&lt;/P&gt;&lt;P&gt;If I have 20 items on my page, the footer gets called for the 20th item only, but only 19 items get printed on the first page and 20th Item goes to the next page. Can someone help?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Dec 2010 17:04:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/smartform-subtotal-issue/m-p/6935937#M1486548</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-12-24T17:04:19Z</dc:date>
    </item>
    <item>
      <title>Re: Smartform Subtotal Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartform-subtotal-issue/m-p/6935938#M1486549</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have tried same method you have mentioned, I have created table in main area I printed headers and in footer I have initialized Subtotal with carry forward and Brought forward separate and done my calculation in calculation tab in loop of main area. But still I am getting same issue. I have also removed loop in main area and tried in main window table still same issue and also tried different other methods but first page total and 3rd page sub total are coming correctly except 2nd page total, last item is added with third page first item and displaying in 2nd page. The grand total coming correct only issue in 2nd page subtotal.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2022 03:51:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/smartform-subtotal-issue/m-p/6935938#M1486549</guid>
      <dc:creator>former_member45163</dc:creator>
      <dc:date>2022-08-26T03:51:09Z</dc:date>
    </item>
  </channel>
</rss>

