<?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: Arithmetic opereations in sapscripts in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/arithmetic-opereations-in-sapscripts/m-p/1614586#M275387</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hund,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1)The routines in scripts needs only two parameters but you are using three in your FORM statement.&lt;/P&gt;&lt;P&gt;2)The form defintion should be like this&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;FORM X TABLES p_input STRUCTURE ITCSY&lt;/P&gt;&lt;P&gt;p_output STRUCTURE ITCSY.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;instead of&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM X TABLES p_input STRUCTURE ITCSY&lt;/P&gt;&lt;P&gt;p_input1 STRUCTURE ITCSY&lt;/P&gt;&lt;P&gt;p_output STRUCTURE ITCSY.&lt;/P&gt;&lt;P&gt;3) All your USING parameters will be in P_INPUT structure and CHANGING parameters will be in P_OUTPUT structure&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: Plz reward all helpful answers..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Sep 2006 19:24:16 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-09-14T19:24:16Z</dc:date>
    <item>
      <title>Arithmetic opereations in sapscripts</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/arithmetic-opereations-in-sapscripts/m-p/1614578#M275379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi: Im really fighting with sapscripts. I dont know if its possible to make arithmetic operations inside a sapscript. I've tried with the next sintaxis:&lt;/P&gt;&lt;P&gt;/: DEFINE &amp;amp;var1&amp;amp; = &amp;amp;var2&amp;amp; + &amp;amp;var3&amp;amp;.&lt;/P&gt;&lt;P&gt;and it says thas + is too long.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First of all Is possible to make arithmetic operactions in SAPSCRIPTS??????&lt;/P&gt;&lt;P&gt;If it's posssible, can u show me some sintaxis, cause don't  find any documentation about.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Sep 2006 18:57:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/arithmetic-opereations-in-sapscripts/m-p/1614578#M275379</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-14T18:57:51Z</dc:date>
    </item>
    <item>
      <title>Re: Arithmetic opereations in sapscripts</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/arithmetic-opereations-in-sapscripts/m-p/1614579#M275380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;      You cannot do any arithmetic operations like adding,subtracting etc in SAP scripts.You need to do that in the print program and pass the variable into the Sapscript.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Kalyan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Sep 2006 19:00:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/arithmetic-opereations-in-sapscripts/m-p/1614579#M275380</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-14T19:00:23Z</dc:date>
    </item>
    <item>
      <title>Re: Arithmetic opereations in sapscripts</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/arithmetic-opereations-in-sapscripts/m-p/1614580#M275381</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 create an Include program an define a Form into it. Then from sapscript invoke this form to make the atithmetic operations and return the value to sapscript.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alejandro&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Sep 2006 19:02:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/arithmetic-opereations-in-sapscripts/m-p/1614580#M275381</guid>
      <dc:creator>alejandro_lpez</dc:creator>
      <dc:date>2006-09-14T19:02:02Z</dc:date>
    </item>
    <item>
      <title>Re: Arithmetic opereations in sapscripts</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/arithmetic-opereations-in-sapscripts/m-p/1614581#M275382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hund,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You cant perform arithmetic operations directly in sapscripts.&lt;/P&gt;&lt;P&gt;You need to perform that operations in Driver program ang get the resultant values into script. (or)&lt;/P&gt;&lt;P&gt;Call a subroutine from your sap script by passing parameters and define the form in driver program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Sep 2006 19:02:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/arithmetic-opereations-in-sapscripts/m-p/1614581#M275382</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-14T19:02:31Z</dc:date>
    </item>
    <item>
      <title>Re: Arithmetic opereations in sapscripts</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/arithmetic-opereations-in-sapscripts/m-p/1614582#M275383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thaks to all..now my problem is..&lt;/P&gt;&lt;P&gt;I have this sintaxis inside de SAPSCRIPT&lt;/P&gt;&lt;P&gt;PERFORM MODIFY  IN PROGRAM ZMOD_PREC&lt;/P&gt;&lt;P&gt;USING   &amp;amp;EKPO-MWSKZ&amp;amp; &amp;amp;EKPO-NETWR&amp;amp;&lt;/P&gt;&lt;P&gt;CHANGING &amp;amp;W_TEMP&amp;amp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the program in my form starts like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM X TABLES               p_input    STRUCTURE  ITCSY&lt;/P&gt;&lt;P&gt;                            p_input1   STRUCTURE  ITCSY.&lt;/P&gt;&lt;P&gt;                            p_output   STRUCTURE  ITCSY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when I execute the smartforms show me a dump that says:&lt;/P&gt;&lt;P&gt;the program expected 6 parameters and you have 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea what it's wrong at my sintaxis??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Sep 2006 19:09:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/arithmetic-opereations-in-sapscripts/m-p/1614582#M275383</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-14T19:09:31Z</dc:date>
    </item>
    <item>
      <title>Re: Arithmetic opereations in sapscripts</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/arithmetic-opereations-in-sapscripts/m-p/1614583#M275384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;/: PERFORM GET_VALUE IN PROGRAM ZPROG&lt;/P&gt;&lt;P&gt;/: USING &amp;amp;V_VAR1&amp;amp;&lt;/P&gt;&lt;P&gt;/: CHANGING &amp;amp;V_VAR2&amp;amp;&lt;/P&gt;&lt;P&gt;/: ENDPERFORM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Coding of the calling ABAP program:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT ZPROG.
FORM GET_VALUE TABLES IN_PAR STUCTURE ITCSY
                     OUT_PAR STRUCTURE ITCSY.
data: l_field type i,
      l_field2 type i.
*-- if the date is in MM/DD/YYYY format


READ TABLE IN_PAR WITH KEY &amp;#145;MHNK-AUSDT&amp;#146;.

IF SY-SUBRC = 0.
l_field = IN_PAR-VALUE.

ENDIF.

l_field2 = l_field + l_field2.

READ TABLE OUT_PAR WITH KEY &amp;#145;V_VAR2&amp;#146;.
IF SY-SUBRC = 0.
  OUT_PAR-VALUE = l_field2.
ENDIF.

ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Sep 2006 19:15:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/arithmetic-opereations-in-sapscripts/m-p/1614583#M275384</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-14T19:15:31Z</dc:date>
    </item>
    <item>
      <title>Re: Arithmetic opereations in sapscripts</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/arithmetic-opereations-in-sapscripts/m-p/1614584#M275385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How can I send 3 or 4 parameters on the sapscript???&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Sep 2006 19:17:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/arithmetic-opereations-in-sapscripts/m-p/1614584#M275385</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-14T19:17:42Z</dc:date>
    </item>
    <item>
      <title>Re: Arithmetic opereations in sapscripts</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/arithmetic-opereations-in-sapscripts/m-p/1614585#M275386</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 send several parameters form sapscript like in a report program:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DEFINE &amp;amp;VSERNR(I77)&amp;amp; TYPE C                                            &lt;/P&gt;&lt;P&gt;/:   DEFINE &amp;amp;VSERNR2(I77)&amp;amp; TYPE C                                           &lt;/P&gt;&lt;P&gt;/:   PERFORM TOMARSERIES IN PROGRAM ZENS                                    &lt;/P&gt;&lt;P&gt;/:   USING &amp;amp;MKPF-MBLNR&amp;amp;                                                     &lt;/P&gt;&lt;P&gt;/:   USING &amp;amp;MKPF-MJAHR&amp;amp;                                                     &lt;/P&gt;&lt;P&gt;/:   USING &amp;amp;MSEG-MATNR&amp;amp;                                                             &lt;/P&gt;&lt;P&gt;/:   USING &amp;amp;MSEG-ZEILE&amp;amp;                                                             &lt;/P&gt;&lt;P&gt;/:   CHANGING &amp;amp;VSERNR&amp;amp;                                                              &lt;/P&gt;&lt;P&gt;/:   CHANGING &amp;amp;VSERNR2&amp;amp;                                                             &lt;/P&gt;&lt;P&gt;/:   ENDPERFORM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alejandro.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Sep 2006 19:22:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/arithmetic-opereations-in-sapscripts/m-p/1614585#M275386</guid>
      <dc:creator>alejandro_lpez</dc:creator>
      <dc:date>2006-09-14T19:22:57Z</dc:date>
    </item>
    <item>
      <title>Re: Arithmetic opereations in sapscripts</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/arithmetic-opereations-in-sapscripts/m-p/1614586#M275387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hund,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1)The routines in scripts needs only two parameters but you are using three in your FORM statement.&lt;/P&gt;&lt;P&gt;2)The form defintion should be like this&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;FORM X TABLES p_input STRUCTURE ITCSY&lt;/P&gt;&lt;P&gt;p_output STRUCTURE ITCSY.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;instead of&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM X TABLES p_input STRUCTURE ITCSY&lt;/P&gt;&lt;P&gt;p_input1 STRUCTURE ITCSY&lt;/P&gt;&lt;P&gt;p_output STRUCTURE ITCSY.&lt;/P&gt;&lt;P&gt;3) All your USING parameters will be in P_INPUT structure and CHANGING parameters will be in P_OUTPUT structure&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: Plz reward all helpful answers..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Sep 2006 19:24:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/arithmetic-opereations-in-sapscripts/m-p/1614586#M275387</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-14T19:24:16Z</dc:date>
    </item>
    <item>
      <title>Re: Arithmetic opereations in sapscripts</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/arithmetic-opereations-in-sapscripts/m-p/1614587#M275388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can any number of parameters in perform statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/: PERFORM &amp;lt;form&amp;gt; IN PROGRAM &amp;lt;prog&amp;gt;&lt;/P&gt;&lt;P&gt;/: USING &amp;amp;INVAR1&amp;amp;&lt;/P&gt;&lt;P&gt;/: USING &amp;amp;INVAR2&amp;amp;&lt;/P&gt;&lt;P&gt;......&lt;/P&gt;&lt;P&gt;/: CHANGING &amp;amp;OUTVAR1&amp;amp;&lt;/P&gt;&lt;P&gt;/: CHANGING &amp;amp;OUTVAR2&amp;amp;&lt;/P&gt;&lt;P&gt;......&lt;/P&gt;&lt;P&gt;/: ENDPERFORM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Coding of the calling ABAP program:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you need to &lt;/P&gt;&lt;P&gt;READ TABLE IN_PAR WITH KEY &amp;#145;INVAR1&amp;#146;.&lt;/P&gt;&lt;P&gt;to get the first passed value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE IN_PAR WITH KEY &amp;#145;INVAR2&amp;#146;.&lt;/P&gt;&lt;P&gt;to get the first passed value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;similarly to pass the value to the out table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE OUT_PAR WITH KEY &amp;#145;OUTVAR1&amp;#146;.&lt;/P&gt;&lt;P&gt;to get the first passed value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE OUT_PAR WITH KEY &amp;#145;OUTVAR2&amp;#146;.&lt;/P&gt;&lt;P&gt;to get the first passed value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and we need to modify the OUT_PAR table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Sep 2006 19:27:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/arithmetic-opereations-in-sapscripts/m-p/1614587#M275388</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-14T19:27:27Z</dc:date>
    </item>
  </channel>
</rss>

