<?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/1512083#M236071</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the table, in which you are displaying the items, &lt;/P&gt;&lt;P&gt;1.Give the field name for which you want the sort criteria(based on which the subtotal is needed). Then click on the radio button u2018event on sort endu2019. ( For eg: you are looping the internal table it_sflight into wa_sflight which contains the fields carrid , connid and price. And you want to print the subtotal on the basis of connid. In the table, in the data tab give the sort criteria field as connid and click on event on sort end  )&lt;/P&gt;&lt;P&gt;2.An event node will be created.&lt;/P&gt;&lt;P&gt;3.Create two table lines in the event node.&lt;/P&gt;&lt;P&gt;            a.One for displaying the items&lt;/P&gt;&lt;P&gt;            b.Other for displaying the subtotal.&lt;/P&gt;&lt;P&gt;4.Create program lines in the table and write the code as  Subtotal = subtotal + wa_sflight-price.&lt;/P&gt;&lt;P&gt;5.Create a text in the subtotal tableline and drag the subtotal  variable there.&lt;/P&gt;&lt;P&gt;6.After the subtotal variable is displayed, clear the variable subtotal.(Clear: subtotal in a program line)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Shiny S Krishna on Jun 30, 2008 5:06 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 Jun 2008 03:03:01 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-30T03:03:01Z</dc:date>
    <item>
      <title>subtotal in smartforms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/subtotal-in-smartforms/m-p/1512079#M236067</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;how to get subtotal in smartforms.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;kathir.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Aug 2006 17:40:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/subtotal-in-smartforms/m-p/1512079#M236067</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-23T17:40:53Z</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/1512080#M236068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;please award points if found helpful&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="1438579"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;more specifically &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SF_EXAMPLE_01 &lt;/P&gt;&lt;P&gt;Simple example; invoice with table output of flight booking for one customer &lt;/P&gt;&lt;P&gt;SF_EXAMPLE_02 &lt;/P&gt;&lt;P&gt;Similar to SF_EXAMPLE_01 but with subtotals&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Aug 2006 17:47:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/subtotal-in-smartforms/m-p/1512080#M236068</guid>
      <dc:creator>rahulkavuri</dc:creator>
      <dc:date>2006-08-23T17:47:03Z</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/1512081#M236069</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 thread the sfsy-page field.&lt;/P&gt;&lt;P&gt;This field give the current page number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can, for example add a code block with :&lt;/P&gt;&lt;P&gt;if sfsy-page ne w_sfsy_init.&lt;/P&gt;&lt;P&gt;clear w_sum.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I Think you can also count your number of line in a page. ( works only if different pages have the same line number )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;go through this link:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://sappoint.com/abap/" target="test_blank"&gt;http://sappoint.com/abap/&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Aug 2006 03:37:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/subtotal-in-smartforms/m-p/1512081#M236069</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-24T03:37:53Z</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/1512082#M236070</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 think there is no automated way of putting subtotals in smartform.&lt;/P&gt;&lt;P&gt;What you should do is add a new edit mask after the items loop, and have the totals prepared in advance in the print program of your smartform. Pass the totals to the form though another structure. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The other thing you could do, is add abap code in the items loop, summing data as you go in a separate global field defined in the smartform, and display the result in a separate structure after the loop. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Aug 2006 04:24:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/subtotal-in-smartforms/m-p/1512082#M236070</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-24T04:24:23Z</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/1512083#M236071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the table, in which you are displaying the items, &lt;/P&gt;&lt;P&gt;1.Give the field name for which you want the sort criteria(based on which the subtotal is needed). Then click on the radio button u2018event on sort endu2019. ( For eg: you are looping the internal table it_sflight into wa_sflight which contains the fields carrid , connid and price. And you want to print the subtotal on the basis of connid. In the table, in the data tab give the sort criteria field as connid and click on event on sort end  )&lt;/P&gt;&lt;P&gt;2.An event node will be created.&lt;/P&gt;&lt;P&gt;3.Create two table lines in the event node.&lt;/P&gt;&lt;P&gt;            a.One for displaying the items&lt;/P&gt;&lt;P&gt;            b.Other for displaying the subtotal.&lt;/P&gt;&lt;P&gt;4.Create program lines in the table and write the code as  Subtotal = subtotal + wa_sflight-price.&lt;/P&gt;&lt;P&gt;5.Create a text in the subtotal tableline and drag the subtotal  variable there.&lt;/P&gt;&lt;P&gt;6.After the subtotal variable is displayed, clear the variable subtotal.(Clear: subtotal in a program line)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Shiny S Krishna on Jun 30, 2008 5:06 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jun 2008 03:03:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/subtotal-in-smartforms/m-p/1512083#M236071</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-30T03:03:01Z</dc:date>
    </item>
  </channel>
</rss>

