<?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: &amp;quot;ABAP Basics&amp;quot; Book - arithmetic expression error in the sample code in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/quot-abap-basics-quot-book-arithmetic-expression-error-in-the-sample-code/m-p/6157619#M1369615</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;*"IMPORTING
*" VALUE(I_KM) TYPE REF TO I
*" EXPORTING
*" VALUE(E_AMOUNT) TYPE REF TO F&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;this is where the error stays.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;define them as:&lt;/P&gt;&lt;P&gt;I_KM TYPE I .&lt;/P&gt;&lt;P&gt;E_AMOUNT TYPE F.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dont use type  ref to&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 Sep 2009 07:47:26 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-09-18T07:47:26Z</dc:date>
    <item>
      <title>"ABAP Basics" Book - arithmetic expression error in the sample code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/quot-abap-basics-quot-book-arithmetic-expression-error-in-the-sample-code/m-p/6157610#M1369606</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 have just started learning ABAP on mini SAP system (NW7.01) by following "ABAP Basics" book.&lt;/P&gt;&lt;P&gt;This question might be a FAQ, but I have spent a few days searching a right answer without success.&lt;/P&gt;&lt;P&gt;I appreciate if you could help me on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the page 162, there is a function module sample, which contains the line as following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e_amount = i_km * '0.3'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here l_km (import) is type of i, and e_amount (export) is type of f.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Though I do not think of any problem with this line, it throws an arithmetic expression error when executed directly for testing as well as when called from a program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I tried a similar thing in a program, it was fine.&lt;/P&gt;&lt;P&gt;However within a function module it throws this error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Terry&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Sep 2009 07:09:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/quot-abap-basics-quot-book-arithmetic-expression-error-in-the-sample-code/m-p/6157610#M1369606</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-18T07:09:48Z</dc:date>
    </item>
    <item>
      <title>Re: "ABAP Basics" Book - arithmetic expression error in the sample code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/quot-abap-basics-quot-book-arithmetic-expression-error-in-the-sample-code/m-p/6157611#M1369607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;which FM is that?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Sep 2009 07:13:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/quot-abap-basics-quot-book-arithmetic-expression-error-in-the-sample-code/m-p/6157611#M1369607</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-18T07:13:16Z</dc:date>
    </item>
    <item>
      <title>Re: "ABAP Basics" Book - arithmetic expression error in the sample code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/quot-abap-basics-quot-book-arithmetic-expression-error-in-the-sample-code/m-p/6157612#M1369608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is zptb00_calculate_travel_expens .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Sep 2009 07:15:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/quot-abap-basics-quot-book-arithmetic-expression-error-in-the-sample-code/m-p/6157612#M1369608</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-18T07:15:19Z</dc:date>
    </item>
    <item>
      <title>Re: "ABAP Basics" Book - arithmetic expression error in the sample code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/quot-abap-basics-quot-book-arithmetic-expression-error-in-the-sample-code/m-p/6157613#M1369609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;first let me welcome you to SDN,.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now,its a custom FM, so you have to show us what code you have for that FM. could you?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Sep 2009 07:18:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/quot-abap-basics-quot-book-arithmetic-expression-error-in-the-sample-code/m-p/6157613#M1369609</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-18T07:18:25Z</dc:date>
    </item>
    <item>
      <title>Re: "ABAP Basics" Book - arithmetic expression error in the sample code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/quot-abap-basics-quot-book-arithmetic-expression-error-in-the-sample-code/m-p/6157614#M1369610</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;Are you sure this line is causing error?? I executed only this line in a test FM ..and I got the following output:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Import parameters               Value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I_KM                            1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Export parameters               Value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; E_AMOUNT                        2,9999999999999999E-01&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Sep 2009 07:18:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/quot-abap-basics-quot-book-arithmetic-expression-error-in-the-sample-code/m-p/6157614#M1369610</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-18T07:18:50Z</dc:date>
    </item>
    <item>
      <title>Re: "ABAP Basics" Book - arithmetic expression error in the sample code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/quot-abap-basics-quot-book-arithmetic-expression-error-in-the-sample-code/m-p/6157615#M1369611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Like I said before, I do not think any problem about the code itself.&lt;/P&gt;&lt;P&gt;I suspect some environmental things?&lt;/P&gt;&lt;P&gt;I should have mentioned SAP mini system NW7.01 is running on Vista Business?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To be specifc, I receive this message:&lt;/P&gt;&lt;P&gt;Arithmetic operations are only expected for operands that can be converted to numbers.&lt;/P&gt;&lt;P&gt;(numeric operands). - (numeric operands). - - - -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with the following function module:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[code]&lt;/P&gt;&lt;P&gt;FUNCTION ZPTB00_CALCULATE_TRAVEL_EXPENS.&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;"Local Interface:&lt;/P&gt;&lt;P&gt;*"  IMPORTING&lt;/P&gt;&lt;P&gt;*"     VALUE(I_KM) TYPE REF TO  I&lt;/P&gt;&lt;P&gt;*"  EXPORTING&lt;/P&gt;&lt;P&gt;*"     VALUE(E_AMOUNT) TYPE REF TO  F&lt;/P&gt;&lt;P&gt;*"  EXCEPTIONS&lt;/P&gt;&lt;P&gt;*"      FAILED&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;e_amount = i_km * '0.3'.&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;  RAISE failed.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDFUNCTION.&lt;/P&gt;&lt;P&gt;[/code]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Sep 2009 07:30:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/quot-abap-basics-quot-book-arithmetic-expression-error-in-the-sample-code/m-p/6157615#M1369611</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-18T07:30:07Z</dc:date>
    </item>
    <item>
      <title>Re: "ABAP Basics" Book - arithmetic expression error in the sample code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/quot-abap-basics-quot-book-arithmetic-expression-error-in-the-sample-code/m-p/6157616#M1369612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi it throws no error for me while executing function module.&lt;/P&gt;&lt;P&gt;May be you would have done a mistake some where. please check.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Sep 2009 07:36:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/quot-abap-basics-quot-book-arithmetic-expression-error-in-the-sample-code/m-p/6157616#M1369612</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2009-09-18T07:36:50Z</dc:date>
    </item>
    <item>
      <title>Re: "ABAP Basics" Book - arithmetic expression error in the sample code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/quot-abap-basics-quot-book-arithmetic-expression-error-in-the-sample-code/m-p/6157617#M1369613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;"TYPE REF TO "&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of this use "TYPE" for both export and import.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I tried a similar thing in a program, it was fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How did it happen ? I dont think so it will be correct in program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Keshu Thekkillam on Sep 18, 2009 1:17 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Sep 2009 07:39:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/quot-abap-basics-quot-book-arithmetic-expression-error-in-the-sample-code/m-p/6157617#M1369613</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2009-09-18T07:39:04Z</dc:date>
    </item>
    <item>
      <title>Re: "ABAP Basics" Book - arithmetic expression error in the sample code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/quot-abap-basics-quot-book-arithmetic-expression-error-in-the-sample-code/m-p/6157618#M1369614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well use correct code..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the first post you mentioned type, while actually you are using Type Ref.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Keshu is correct, do not use Type Ref To.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Sep 2009 07:47:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/quot-abap-basics-quot-book-arithmetic-expression-error-in-the-sample-code/m-p/6157618#M1369614</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-18T07:47:22Z</dc:date>
    </item>
    <item>
      <title>Re: "ABAP Basics" Book - arithmetic expression error in the sample code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/quot-abap-basics-quot-book-arithmetic-expression-error-in-the-sample-code/m-p/6157619#M1369615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;*"IMPORTING
*" VALUE(I_KM) TYPE REF TO I
*" EXPORTING
*" VALUE(E_AMOUNT) TYPE REF TO F&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;this is where the error stays.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;define them as:&lt;/P&gt;&lt;P&gt;I_KM TYPE I .&lt;/P&gt;&lt;P&gt;E_AMOUNT TYPE F.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dont use type  ref to&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Sep 2009 07:47:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/quot-abap-basics-quot-book-arithmetic-expression-error-in-the-sample-code/m-p/6157619#M1369615</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-18T07:47:26Z</dc:date>
    </item>
    <item>
      <title>Re: "ABAP Basics" Book - arithmetic expression error in the sample code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/quot-abap-basics-quot-book-arithmetic-expression-error-in-the-sample-code/m-p/6157620#M1369616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you guys all.&lt;/P&gt;&lt;P&gt;I feel as if I were so stupid......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Terry&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Sep 2009 07:49:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/quot-abap-basics-quot-book-arithmetic-expression-error-in-the-sample-code/m-p/6157620#M1369616</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-18T07:49:47Z</dc:date>
    </item>
    <item>
      <title>Re: "ABAP Basics" Book - arithmetic expression error in the sample code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/quot-abap-basics-quot-book-arithmetic-expression-error-in-the-sample-code/m-p/6157621#M1369617</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 am making the exercises of the book. Do you have the source code anywhere available. It would be nice to have it for speeding up the learning process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2011 13:13:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/quot-abap-basics-quot-book-arithmetic-expression-error-in-the-sample-code/m-p/6157621#M1369617</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-23T13:13:08Z</dc:date>
    </item>
    <item>
      <title>Re: "ABAP Basics" Book - arithmetic expression error in the sample code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/quot-abap-basics-quot-book-arithmetic-expression-error-in-the-sample-code/m-p/6157622#M1369618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;plz note that if u do a arithmatic on f type and i no issues as long as the var to hold res is also f type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Plz go thru SAP HELP AND SAP online materials alongwith ur books &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2011 13:55:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/quot-abap-basics-quot-book-arithmetic-expression-error-in-the-sample-code/m-p/6157622#M1369618</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-23T13:55:15Z</dc:date>
    </item>
  </channel>
</rss>

