<?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: scripts- subtotals in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/scripts-subtotals/m-p/2393136#M532374</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;print your subtotals in the  footer window&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sooness&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Jun 2007 10:21:54 GMT</pubDate>
    <dc:creator>dev_parbutteea</dc:creator>
    <dc:date>2007-06-12T10:21:54Z</dc:date>
    <item>
      <title>scripts- subtotals</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/scripts-subtotals/m-p/2393130#M532368</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 subtotals on each page of a script?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;pritha.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2007 09:44:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/scripts-subtotals/m-p/2393130#M532368</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-12T09:44:48Z</dc:date>
    </item>
    <item>
      <title>Re: scripts- subtotals</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/scripts-subtotals/m-p/2393131#M532369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Declare a variable like&lt;/P&gt;&lt;P&gt;/: DEFINE &amp;amp;TOTAL&amp;amp;&lt;/P&gt;&lt;P&gt;/  total = total + &amp;lt;&amp;amp;itab-netwr&amp;amp;&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and display the TOTAL field for subtotals&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points for useful Answers&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2007 09:46:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/scripts-subtotals/m-p/2393131#M532369</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-12T09:46:34Z</dc:date>
    </item>
    <item>
      <title>Re: scripts- subtotals</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/scripts-subtotals/m-p/2393132#M532370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&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;To calculate totals and sub totals in sap scripts you have to use subroutines. &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;&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;&lt;/P&gt;&lt;P&gt;value1 = value1 + value. &lt;/P&gt;&lt;P&gt;&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;I have given a rough outline, please be aware of the variable conversions as Int_cond-value and outt_cond-value are characters. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sooness&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2007 09:49:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/scripts-subtotals/m-p/2393132#M532370</guid>
      <dc:creator>dev_parbutteea</dc:creator>
      <dc:date>2007-06-12T09:49:09Z</dc:date>
    </item>
    <item>
      <title>Re: scripts- subtotals</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/scripts-subtotals/m-p/2393133#M532371</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 already get the subtotals for each sales order no.&lt;/P&gt;&lt;P&gt;But for 1 order, there r about 200 records.&lt;/P&gt;&lt;P&gt;So they go on the next page.....the subtotlas gets printed after a sales order number.&lt;/P&gt;&lt;P&gt;but i want it on each page.&lt;/P&gt;&lt;P&gt;hope u r getting me......&lt;/P&gt;&lt;P&gt;plz reply&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2007 09:59:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/scripts-subtotals/m-p/2393133#M532371</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-12T09:59:10Z</dc:date>
    </item>
    <item>
      <title>Re: scripts- subtotals</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/scripts-subtotals/m-p/2393134#M532372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;good&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAP Printer commands in SAPScripts The command line in the editor must be as follows: /: PRINT-CONTROL xxxxx or /: PRINT-CONTROL 'xxxxx' where xxxxx stands for the five-character name of the print control. Example: /: PRINT-CONTROL ZM100 The complete printer command normally resides in the print control. If characters belonging to the print command follow after the print control in the text (only useful for the HPL2 printer driver for PCL-5 printers), the text line following after the PRINT-CONTROL command should begin with an equals sign (=) in the format column. Example: /: PRINT-CONTROL SESCP = *c5G If you do not use the equals sign, a space character is inserted between the print control SESCP and the character *c5G. Different font on the same line You can have different font on the same line by defining a character format. For example B for bold text and U for Underline. In your SAPScript apply like this : Underline Text&amp;lt;&amp;gt; Bold Text&amp;lt;&amp;gt; Print Footer notes only on the last page Command to used in your sapscripts :- /: IF &amp;amp;NEXTPAGE&amp;amp; EQ 0 whatever footer you want. /: ENDIF SAPscripts How to calculate Totals and Subtotals I have some doubs in BDC and SMART FORMS. I want to change the material number using the transaction code MM02 through BDC. In scripts and smartforms how to calculate totals and subtotals? To calculate totals and sub totals in sap scripts you have to use subroutines. Say if you have to add the unit price (KOMVD-KBERT) then in the main window whereever tat value is picked write this routine /: DEFINE &amp;amp;TOT_PRICE&amp;amp; /: 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 Then write the variable where ever you want it to be printed (mostly it will be in footer window) Then create subroutine pool program and you have to write the code. FORM F_GET_PRICE tables int_cond structure itcsy outt_cond structure itcsy. data : value type kbert. statics value1 type kbert. Read int_cond table index 1. value = int_cond-value. value1 = value1 + value. Read outt_cond table index 1. outt_cond-value = value1. Modify outt_cond index 1. ENDFORM. I have given a rough outline, please be aware of the variable conversions as Int_cond-value and outt_cond-value are characters&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;mrutyun^&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2007 10:01:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/scripts-subtotals/m-p/2393134#M532372</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-12T10:01:32Z</dc:date>
    </item>
    <item>
      <title>Re: scripts- subtotals</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/scripts-subtotals/m-p/2393135#M532373</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;To calculate totals and sub totals in sap scripts you have to use subroutines. &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;&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;&lt;/P&gt;&lt;P&gt;value1 = value1 + value. &lt;/P&gt;&lt;P&gt;&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;I have given a rough outline, please be aware of the variable conversions as Int_cond-value and outt_cond-value are characters. &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>Tue, 12 Jun 2007 10:04:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/scripts-subtotals/m-p/2393135#M532373</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-12T10:04:06Z</dc:date>
    </item>
    <item>
      <title>Re: scripts- subtotals</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/scripts-subtotals/m-p/2393136#M532374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;print your subtotals in the  footer window&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sooness&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2007 10:21:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/scripts-subtotals/m-p/2393136#M532374</guid>
      <dc:creator>dev_parbutteea</dc:creator>
      <dc:date>2007-06-12T10:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: scripts- subtotals</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/scripts-subtotals/m-p/2393137#M532375</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sooness,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I m printing it on main window at the bottom.&lt;/P&gt;&lt;P&gt;I need the subtotals on each page.&lt;/P&gt;&lt;P&gt;if i m having a sales order number with 200 records, it gets it's subtotal at last but i want the subtotals on each page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks inadvance.&lt;/P&gt;&lt;P&gt;Points will be awarded.&lt;/P&gt;&lt;P&gt;pritha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2007 10:33:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/scripts-subtotals/m-p/2393137#M532375</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-12T10:33:56Z</dc:date>
    </item>
    <item>
      <title>Re: scripts- subtotals</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/scripts-subtotals/m-p/2393138#M532376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;actually if you print it in the main window , it will be printed after aal displayed records.&lt;/P&gt;&lt;P&gt;So ,if you want to print it in all pages , try printing it in footer window instead.&lt;/P&gt;&lt;P&gt;You just have to update subtotal after each record or sales order using a perform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sooness&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2007 10:40:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/scripts-subtotals/m-p/2393138#M532376</guid>
      <dc:creator>dev_parbutteea</dc:creator>
      <dc:date>2007-06-12T10:40:09Z</dc:date>
    </item>
  </channel>
</rss>

