<?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: Page-total in script in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/page-total-in-script/m-p/1452550#M214182</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;u must be looping at the internal table and u write_form fm to print the main window content. in the loop use a variable (for eg : sum) and sum up the values in each iteration. Then in the main window , in the text element which u use to display the data write&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/: BOTTOM&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; &amp;amp;SUM&amp;amp;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;/: ENDBOTTOM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this will be exeuted before the next page is called.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 17 Jul 2006 10:23:47 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-07-17T10:23:47Z</dc:date>
    <item>
      <title>Page-total in script</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/page-total-in-script/m-p/1452546#M214178</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 am working on a script.&lt;/P&gt;&lt;P&gt;in my output i  have 3 pages in form&lt;/P&gt;&lt;P&gt;for each page i have to display page total &lt;/P&gt;&lt;P&gt;and on last page i have display the grand total.&lt;/P&gt;&lt;P&gt;Can any one tell me how shud i do it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;Fattesingh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Jul 2006 08:53:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/page-total-in-script/m-p/1452546#M214178</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-17T08:53:59Z</dc:date>
    </item>
    <item>
      <title>Re: Page-total in script</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/page-total-in-script/m-p/1452547#M214179</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Gaikwad,&lt;/P&gt;&lt;P&gt; Try using &amp;lt;b&amp;gt;&amp;amp;sum&amp;amp;&amp;lt;/b&amp;gt; statement in the footer of each page...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Jul 2006 08:56:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/page-total-in-script/m-p/1452547#M214179</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-17T08:56:01Z</dc:date>
    </item>
    <item>
      <title>Re: Page-total in script</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/page-total-in-script/m-p/1452548#M214180</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just have a separated element for your total. You are probably looping a table in the print program and writing some detail lines. After that loop just write the Totals element. Doing this will put the totals on the last page of the sapscript.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at itab.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;      call function 'WRITE_FORM'&lt;/P&gt;&lt;P&gt;         EXPORTING&lt;/P&gt;&lt;P&gt;              element = 'ITEMS'&lt;/P&gt;&lt;P&gt;              window  = 'MAIN'&lt;/P&gt;&lt;P&gt;         EXCEPTIONS&lt;/P&gt;&lt;P&gt;              others  = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Now write the SUB totals.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    call function 'WRITE_FORM'&lt;/P&gt;&lt;P&gt;         EXPORTING&lt;/P&gt;&lt;P&gt;              element = 'SUBTOTALS'&lt;/P&gt;&lt;P&gt;              window  = 'MAIN'&lt;/P&gt;&lt;P&gt;         EXCEPTIONS&lt;/P&gt;&lt;P&gt;              others  = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; endloop.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Now write the totals.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    call function 'WRITE_FORM'&lt;/P&gt;&lt;P&gt;         EXPORTING&lt;/P&gt;&lt;P&gt;              element = 'TOTALS'&lt;/P&gt;&lt;P&gt;              window  = 'MAIN'&lt;/P&gt;&lt;P&gt;         EXCEPTIONS&lt;/P&gt;&lt;P&gt;              others  = 1.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Jul 2006 09:05:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/page-total-in-script/m-p/1452548#M214180</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-17T09:05:36Z</dc:date>
    </item>
    <item>
      <title>Re: Page-total in script</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/page-total-in-script/m-p/1452549#M214181</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gaikwad,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What you can do is in the sap script write an if condition on page no storing the  page no and continuously keep on checking the page no condition before printing each line item.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Whenever you observe any change in the page no it means that the main window is complete, in the meanwhile keep adding the total in a variable and thus for each page change you will have page total calculated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use system variable &amp;amp;page&amp;amp; for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please Reward points if helpful.&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;Sunmit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Jul 2006 10:18:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/page-total-in-script/m-p/1452549#M214181</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-17T10:18:16Z</dc:date>
    </item>
    <item>
      <title>Re: Page-total in script</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/page-total-in-script/m-p/1452550#M214182</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;u must be looping at the internal table and u write_form fm to print the main window content. in the loop use a variable (for eg : sum) and sum up the values in each iteration. Then in the main window , in the text element which u use to display the data write&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/: BOTTOM&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; &amp;amp;SUM&amp;amp;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;/: ENDBOTTOM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this will be exeuted before the next page is called.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Jul 2006 10:23:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/page-total-in-script/m-p/1452550#M214182</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-17T10:23:47Z</dc:date>
    </item>
  </channel>
</rss>

