<?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: Using Sum field in Sap script in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-sum-field-in-sap-script/m-p/1348907#M175329</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi...&lt;/P&gt;&lt;P&gt;If you need to summ numbers or do any operation, in your SAP Script you can call subritunes and do all the operations you need.&lt;/P&gt;&lt;P&gt;On your SAP script write:&lt;/P&gt;&lt;P&gt;/: PERFORM subrutine IN PROGRAM Zprogram &lt;/P&gt;&lt;P&gt;/: USING &amp;amp;PAR1&amp;amp;&lt;/P&gt;&lt;P&gt;/: CHANGING &amp;amp;PAR2&amp;amp;&lt;/P&gt;&lt;P&gt;/: ENDPERFORM&lt;/P&gt;&lt;P&gt;PS: You can use as many USING AND CHANGING as you need.&lt;/P&gt;&lt;P&gt;And the zprogram goes;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM subrutine TABLES t_in STRUCTURE itcsy&lt;/P&gt;&lt;P&gt;t_out STRUCTURE itcsy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: par1 type n.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Read the value on PAR1&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;READ TABLE t_in WITH KEY 'PAR1'.&lt;/P&gt;&lt;P&gt;CHECK sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PAR1 = t_IN-value.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;DO WHATEVER YOU NEED TO DO&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ADD 1 TO PAR1.&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;SEND THE VALUES BACK&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;READ TABLE t_OUT WITH KEY 'PAR2'.&lt;/P&gt;&lt;P&gt;t_sal-value = PAR1 .&lt;/P&gt;&lt;P&gt;MODIFY t_OUT INDEX sy-tabix.&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;Hope this helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gabriel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 May 2006 13:44:09 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-05-05T13:44:09Z</dc:date>
    <item>
      <title>Using Sum field in Sap script</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-sum-field-in-sap-script/m-p/1348906#M175328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I am trying to add content of field (Tax VAT) in sap script and put into another symbol using following command&lt;/P&gt;&lt;P&gt;/:SUMMING program symbol INTO sum symbol&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but after running me22n tcode to display the PO error occured &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Overwriting a protected field&amp;lt;/b&amp;gt;Error analysis&lt;/P&gt;&lt;P&gt;    The program tried to assign a new value to the field "&amp;lt;SM_SUM&amp;gt;" even though&lt;/P&gt;&lt;P&gt;    it is protected against changes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am modifying medruck std PO script and using standard prog. for it i.e. SAPFM06P.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please tell me wheather it is necessary to make sum symbol dynamically define in SAPFM06P and how to do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with regards&lt;/P&gt;&lt;P&gt;Rajvinder Sahni&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 May 2006 06:52:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-sum-field-in-sap-script/m-p/1348906#M175328</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-05T06:52:23Z</dc:date>
    </item>
    <item>
      <title>Re: Using Sum field in Sap script</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-sum-field-in-sap-script/m-p/1348907#M175329</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi...&lt;/P&gt;&lt;P&gt;If you need to summ numbers or do any operation, in your SAP Script you can call subritunes and do all the operations you need.&lt;/P&gt;&lt;P&gt;On your SAP script write:&lt;/P&gt;&lt;P&gt;/: PERFORM subrutine IN PROGRAM Zprogram &lt;/P&gt;&lt;P&gt;/: USING &amp;amp;PAR1&amp;amp;&lt;/P&gt;&lt;P&gt;/: CHANGING &amp;amp;PAR2&amp;amp;&lt;/P&gt;&lt;P&gt;/: ENDPERFORM&lt;/P&gt;&lt;P&gt;PS: You can use as many USING AND CHANGING as you need.&lt;/P&gt;&lt;P&gt;And the zprogram goes;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM subrutine TABLES t_in STRUCTURE itcsy&lt;/P&gt;&lt;P&gt;t_out STRUCTURE itcsy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: par1 type n.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Read the value on PAR1&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;READ TABLE t_in WITH KEY 'PAR1'.&lt;/P&gt;&lt;P&gt;CHECK sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PAR1 = t_IN-value.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;DO WHATEVER YOU NEED TO DO&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ADD 1 TO PAR1.&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;SEND THE VALUES BACK&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;READ TABLE t_OUT WITH KEY 'PAR2'.&lt;/P&gt;&lt;P&gt;t_sal-value = PAR1 .&lt;/P&gt;&lt;P&gt;MODIFY t_OUT INDEX sy-tabix.&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;Hope this helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gabriel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 May 2006 13:44:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-sum-field-in-sap-script/m-p/1348907#M175329</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-05T13:44:09Z</dc:date>
    </item>
  </channel>
</rss>

