<?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: Subtotal in smartforms in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/subtotal-in-smartforms/m-p/1678679#M299198</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt; you create a program line in the table and calculate the sum by using &lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;var = var + wa-netwr&amp;lt;/b&amp;gt;.then write the var in the window below the main window.&lt;/P&gt;&lt;P&gt;after writing create another program line and clear the variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will do.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Nov 2006 11:32:07 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-11-23T11:32:07Z</dc:date>
    <item>
      <title>Subtotal in smartforms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/subtotal-in-smartforms/m-p/1678677#M299196</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 facing problem in calculating subtoal of all the line items on separate pages.My Requirement is i have to calculate subtotal of line item on the first page at the first page end after that on the second page i need subtotal of all the amount(NETWR) present on all the line items on the second page subsequently.No of line items are not fixed on all the pages.It may be 4 on 1st page and 5 on second page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mukesh Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Nov 2006 11:28:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/subtotal-in-smartforms/m-p/1678677#M299196</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-23T11:28:37Z</dc:date>
    </item>
    <item>
      <title>Re: Subtotal in smartforms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/subtotal-in-smartforms/m-p/1678678#M299197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can use the sort option and use the SORT BEGIN and SORT END events in the table.After the event node is created,under the node add a code section to calculate the subtotals and output it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Nov 2006 11:30:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/subtotal-in-smartforms/m-p/1678678#M299197</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-23T11:30:29Z</dc:date>
    </item>
    <item>
      <title>Re: Subtotal in smartforms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/subtotal-in-smartforms/m-p/1678679#M299198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt; you create a program line in the table and calculate the sum by using &lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;var = var + wa-netwr&amp;lt;/b&amp;gt;.then write the var in the window below the main window.&lt;/P&gt;&lt;P&gt;after writing create another program line and clear the variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will do.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Nov 2006 11:32:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/subtotal-in-smartforms/m-p/1678679#M299198</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-23T11:32:07Z</dc:date>
    </item>
    <item>
      <title>Re: Subtotal in smartforms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/subtotal-in-smartforms/m-p/1678680#M299199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try to use condn....&lt;/P&gt;&lt;P&gt;sfsy-page ne sfsy-formpages&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in  coding node just sum on the basis of  cond.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ex---&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;loop at itab.
w_sum = w_sum  + itab-netwr.
endloop.
if sfsy-page ne sfsy-formpages.
clear: w_sum.
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;where w_sum is sum of line item...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;kishan negi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Nov 2006 11:33:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/subtotal-in-smartforms/m-p/1678680#M299199</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-23T11:33:39Z</dc:date>
    </item>
    <item>
      <title>Re: Subtotal in smartforms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/subtotal-in-smartforms/m-p/1678681#M299200</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;try this code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;In scripts and smartforms how to calculate totals and subtotals?&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Say if you have to add the unit price (KOMVD-KBERT) then in the main window whereever tat value is picked write this routine &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/: DEFINE &amp;amp;TOT_PRICE&amp;amp; &lt;/P&gt;&lt;P&gt;/: PERFORM F_GET_PRICE IN PROGRAM &amp;lt;subroutine prog name&amp;gt; /:USING &amp;amp;KOMVD-KBERT&amp;amp; /:CHANGING &amp;amp;TOT_PRICE&amp;amp; /:ENDPERFORM &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then write the variable where ever you want it to be printed (mostly it will be in footer window) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then create subroutine pool program and you have to write the code. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM F_GET_PRICE tables int_cond structure itcsy &lt;/P&gt;&lt;P&gt;                                    outt_cond structure itcsy. data : value type kbert. &lt;/P&gt;&lt;P&gt;statics   value1 type kbert. &lt;/P&gt;&lt;P&gt;Read int_cond table index 1. &lt;/P&gt;&lt;P&gt;value = int_cond-value. &lt;/P&gt;&lt;P&gt;value1 = value1 + value. &lt;/P&gt;&lt;P&gt;Read outt_cond table index 1. &lt;/P&gt;&lt;P&gt;outt_cond-value = value1. &lt;/P&gt;&lt;P&gt;Modify outt_cond index 1. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if this helps u ,reward the points,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;shan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Nov 2006 11:40:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/subtotal-in-smartforms/m-p/1678681#M299200</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-23T11:40:29Z</dc:date>
    </item>
  </channel>
</rss>

