<?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: summing in scripts in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/summing-in-scripts/m-p/1106020#M104812</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can sum the total in the program that calls the script and print it in the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lets say you have an internal table and you writing as lines in the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;01  10 usd&lt;/P&gt;&lt;P&gt;02  20 usd&lt;/P&gt;&lt;P&gt;etc...&lt;/P&gt;&lt;P&gt;99  10 usd&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call funtion 'open_form'&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 funtion 'write_form&lt;/P&gt;&lt;P&gt; element = '100' (for lines)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;g_total = g_total + itab-value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at last.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call funtion 'write_form&lt;/P&gt;&lt;P&gt; element = '101' (for total)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so at the end of all the line items printed, the element 101 will be called and the total is printed there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For subtotals and totals on each page you have to come with a logic to sum in the wrapper program and pass it on to the SAP script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kannan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 Dec 2005 20:12:31 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-12-19T20:12:31Z</dc:date>
    <item>
      <title>summing in scripts</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/summing-in-scripts/m-p/1106016#M104808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi friends,&lt;/P&gt;&lt;P&gt;can plz some one help me with summing in scripts. like, printing customer orders sub total, and grand total. i have gone throgh the documentation, iam not really ok with that.&lt;/P&gt;&lt;P&gt;with regards,&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Dec 2005 16:06:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/summing-in-scripts/m-p/1106016#M104808</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-19T16:06:52Z</dc:date>
    </item>
    <item>
      <title>Re: summing in scripts</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/summing-in-scripts/m-p/1106017#M104809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;/:SUMMING program symbol INTO sum symbol
As SAP script cannot define sum fields dynamically, the sum symbol must be in a structure of the calling program, which was declared with TABLES.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;instead of that you populate in driver program and pass it to layout.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Dec 2005 16:11:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/summing-in-scripts/m-p/1106017#M104809</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-19T16:11:55Z</dc:date>
    </item>
    <item>
      <title>Re: summing in scripts</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/summing-in-scripts/m-p/1106018#M104810</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi vijay thanks very much for ur reply, could u plz explain that step by step in detail.&lt;/P&gt;&lt;P&gt;with regards,&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Dec 2005 16:46:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/summing-in-scripts/m-p/1106018#M104810</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-19T16:46:52Z</dc:date>
    </item>
    <item>
      <title>Re: summing in scripts</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/summing-in-scripts/m-p/1106019#M104811</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;/:SUMMING &amp;amp;NETPR&amp;amp; INTO V_TOTAL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop &lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;write form for main window&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;for every time(loop pass) the value will be added to v_total ,this will be defined in script.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Dec 2005 16:53:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/summing-in-scripts/m-p/1106019#M104811</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-19T16:53:10Z</dc:date>
    </item>
    <item>
      <title>Re: summing in scripts</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/summing-in-scripts/m-p/1106020#M104812</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can sum the total in the program that calls the script and print it in the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lets say you have an internal table and you writing as lines in the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;01  10 usd&lt;/P&gt;&lt;P&gt;02  20 usd&lt;/P&gt;&lt;P&gt;etc...&lt;/P&gt;&lt;P&gt;99  10 usd&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call funtion 'open_form'&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 funtion 'write_form&lt;/P&gt;&lt;P&gt; element = '100' (for lines)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;g_total = g_total + itab-value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at last.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call funtion 'write_form&lt;/P&gt;&lt;P&gt; element = '101' (for total)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so at the end of all the line items printed, the element 101 will be called and the total is printed there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For subtotals and totals on each page you have to come with a logic to sum in the wrapper program and pass it on to the SAP script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kannan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Dec 2005 20:12:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/summing-in-scripts/m-p/1106020#M104812</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-19T20:12:31Z</dc:date>
    </item>
  </channel>
</rss>

