<?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 sap script in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/subtotal-in-sap-script/m-p/2803687#M654970</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;Check the following link:&lt;/P&gt;&lt;P&gt;&lt;A href="http://sap-img.com/sapscripts/sapscript-how-to-calculate-totals-and-subtotals.htm" target="test_blank"&gt;http://sap-img.com/sapscripts/sapscript-how-to-calculate-totals-and-subtotals.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bhaskar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 17 Sep 2007 07:10:10 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-09-17T07:10:10Z</dc:date>
    <item>
      <title>subtotal in sap script</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/subtotal-in-sap-script/m-p/2803684#M654967</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 do we code for subtotal in sap script. The scenario is i have to total the extended price field (dmbtr) and that is subtotal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another doubt: how do i code division operator . ie. dividing quantity by extended price? in sap script i know i have to introduce a variable. kindly give me how do i code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Sep 2007 06:44:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/subtotal-in-sap-script/m-p/2803684#M654967</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-17T06:44:09Z</dc:date>
    </item>
    <item>
      <title>Re: subtotal in sap script</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/subtotal-in-sap-script/m-p/2803685#M654968</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;Actually you cannot code division operator directly in the SAP Script form.SAP Script consists of two things i) SAP Script form(use SE71 to explore it) and ii) Driver program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Script form(or) Layout set:&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="------------------------------------" /&gt;&lt;P&gt;   It specifies the layout of the output(where to put what).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Driver program:&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="--------------------" /&gt;&lt;P&gt;It will have all the logic(for example selecting records from required tables for displaying the layout set and processing logic, for eg: Multiplication, division etc).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so, in your case you need to calculate the sub total in the driver program using a global variable and use the same variable name in the Layout set at the required position for printing the subtotal in output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For eg: For your case consider w_qty(quantity variable), w_ext_prc(extended price) and if w_sub_tot is the subtotal field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can code the following logic in the driver program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;w_sub_tot = w_ext_prc / w_qty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the Layout set, you can use the &amp;amp;w_qty&amp;amp; to print the subtotal value in the output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Sep 2007 06:59:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/subtotal-in-sap-script/m-p/2803685#M654968</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-17T06:59:32Z</dc:date>
    </item>
    <item>
      <title>Re: subtotal in sap script</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/subtotal-in-sap-script/m-p/2803686#M654969</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;u can use SUM keyword in script.&lt;/P&gt;&lt;P&gt;as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/: If &amp;amp;itab-pernr&amp;amp;.&lt;/P&gt;&lt;P&gt;/:        sum.&lt;/P&gt;&lt;P&gt;/:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and to declare a variable use &amp;amp;&amp;amp; as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for ex: &amp;amp;&amp;amp;suresh = 13.&lt;/P&gt;&lt;P&gt;/: write &amp;amp;&amp;amp;suresh.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if helpful reward some points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with regards,&lt;/P&gt;&lt;P&gt;Suresh Aluri.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Sep 2007 07:00:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/subtotal-in-sap-script/m-p/2803686#M654969</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-17T07:00:12Z</dc:date>
    </item>
    <item>
      <title>Re: subtotal in sap script</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/subtotal-in-sap-script/m-p/2803687#M654970</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;Check the following link:&lt;/P&gt;&lt;P&gt;&lt;A href="http://sap-img.com/sapscripts/sapscript-how-to-calculate-totals-and-subtotals.htm" target="test_blank"&gt;http://sap-img.com/sapscripts/sapscript-how-to-calculate-totals-and-subtotals.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bhaskar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Sep 2007 07:10:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/subtotal-in-sap-script/m-p/2803687#M654970</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-17T07:10:10Z</dc:date>
    </item>
  </channel>
</rss>

