<?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: ABAP - arithematic overflow  error in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-arithematic-overflow-error/m-p/927500#M60200</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My first thought would be that you are stuck in an endless loop.  Without debugging myself,  I can't be certain.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

while l_flag eq c_true.

l_index = l_index - 1.

read table p_cell_otf into l_otfline index l_index.

if l_otfline-tdprintcom &amp;lt;&amp;gt; pc_id_codepage and
l_otfline-tdprintcom &amp;lt;&amp;gt; pc_id_call_font and
l_otfline-tdprintcom &amp;lt;&amp;gt; pc_id_space_width and
l_otfline-tdprintcom &amp;lt;&amp;gt; pc_id_uline and
l_otfline-tdprintcom &amp;lt;&amp;gt; pc_id_color_text and
l_otfline-tdprintcom &amp;lt;&amp;gt; pc_id_move_to and
l_otfline-tdprintcom &amp;lt;&amp;gt; pc_id_md_after_par.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this code(above), you are looping and decrenting L_INDEX by 1 untill some condition is satisfied.  How does L_FLAG become TRUE?  If it becomes true by the IF statement being satisfied, then I would check in the "printer settings" in which you said have been recently changed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, not sure why L_INDEX is showing 8 in debug mode.&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;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 Jun 2005 23:42:07 GMT</pubDate>
    <dc:creator>RichHeilman</dc:creator>
    <dc:date>2005-06-13T23:42:07Z</dc:date>
    <item>
      <title>ABAP - arithematic overflow  error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-arithematic-overflow-error/m-p/927494#M60194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi folks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am getting an error for arithematic overflow not in the main program but in one of the include programs. how to fix it. Any ideas...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Santhosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jun 2005 16:42:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-arithematic-overflow-error/m-p/927494#M60194</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-13T16:42:24Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP - arithematic overflow  error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-arithematic-overflow-error/m-p/927495#M60195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You will need to post the relevant code.  The exact section of code causing the error as well as the DATA statements for the variables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jun 2005 16:48:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-arithematic-overflow-error/m-p/927495#M60195</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-06-13T16:48:13Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP - arithematic overflow  error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-arithematic-overflow-error/m-p/927496#M60196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just check which code line is having the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then check the fields used in that .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;increase the field length of number ( P type I guess )type fileds.&lt;/P&gt;&lt;P&gt;or post the code line on SDN and get the exact answer from someone &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Ram&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jun 2005 16:51:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-arithematic-overflow-error/m-p/927496#M60196</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-13T16:51:28Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP - arithematic overflow  error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-arithematic-overflow-error/m-p/927497#M60197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Rich,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;he code goes like this in the include program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loop at p_cell_otf into  l_otfline&lt;/P&gt;&lt;P&gt;                       to    l_blockend&lt;/P&gt;&lt;P&gt;                       where tdprintcom = pc_id_color_text.&lt;/P&gt;&lt;P&gt;    endloop.&lt;/P&gt;&lt;P&gt;    if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;      append l_otfline to l_lastinfo.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;get corrected value for l_blockpos: should be the position&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;set by the command of 'positioning' (last in the block).&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;look for 'last' ST command&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; -&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt;&amp;gt; the error occurs    l_index = l_blockend.&lt;/P&gt;&lt;P&gt;    while l_flag eq c_true.&lt;/P&gt;&lt;P&gt;      l_index = l_index - 1.&lt;/P&gt;&lt;P&gt;      read table p_cell_otf into l_otfline index l_index.&lt;/P&gt;&lt;P&gt;      if l_otfline-tdprintcom &amp;lt;&amp;gt; pc_id_codepage    and&lt;/P&gt;&lt;P&gt;         l_otfline-tdprintcom &amp;lt;&amp;gt; pc_id_call_font   and&lt;/P&gt;&lt;P&gt;         l_otfline-tdprintcom &amp;lt;&amp;gt; pc_id_space_width and&lt;/P&gt;&lt;P&gt;         l_otfline-tdprintcom &amp;lt;&amp;gt; pc_id_uline       and&lt;/P&gt;&lt;P&gt;         l_otfline-tdprintcom &amp;lt;&amp;gt; pc_id_color_text  and&lt;/P&gt;&lt;P&gt;         l_otfline-tdprintcom &amp;lt;&amp;gt; pc_id_move_to     and&lt;/P&gt;&lt;P&gt;         l_otfline-tdprintcom &amp;lt;&amp;gt; pc_id_md_after_par.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The data variables include&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:customer_id type knc1-kunnr,&lt;/P&gt;&lt;P&gt;     scan_code type zzscan,&lt;/P&gt;&lt;P&gt;     scan_number type zzscan,&lt;/P&gt;&lt;P&gt;     icode1 type C value '0',&lt;/P&gt;&lt;P&gt;     nvalue_scancode type I,&lt;/P&gt;&lt;P&gt;     icode2 type knb1-xausz,&lt;/P&gt;&lt;P&gt;     icode(2) type C,&lt;/P&gt;&lt;P&gt;     w_date type d,&lt;/P&gt;&lt;P&gt;     from_date(8) type c,&lt;/P&gt;&lt;P&gt;     to_date(8) type c,&lt;/P&gt;&lt;P&gt;     fdate(12) type C,&lt;/P&gt;&lt;P&gt;     conversionstring type string,&lt;/P&gt;&lt;P&gt;     custno type knc1-kunnr,&lt;/P&gt;&lt;P&gt;     advertiserno type knc1-kunnr,&lt;/P&gt;&lt;P&gt;     amount(9) type C,&lt;/P&gt;&lt;P&gt;     numc_amount(9) type N,&lt;/P&gt;&lt;P&gt;     bpartner(10) type n,&lt;/P&gt;&lt;P&gt;     len type I,&lt;/P&gt;&lt;P&gt;     bdate(10) type c,&lt;/P&gt;&lt;P&gt;     addspace type I,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The program was running  fine till thursday evening and later on ftriday they changed on some printer settings  and stuff like that. Is that related to it because this includes in the smartform that I periodically print. &lt;/P&gt;&lt;P&gt;I go for the print preview and just it gets hanged there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any leads would be just great..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Santhosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jun 2005 18:22:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-arithematic-overflow-error/m-p/927497#M60197</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-13T18:22:37Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP - arithematic overflow  error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-arithematic-overflow-error/m-p/927498#M60198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is the line where the program abends?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;l_index = l_blockend.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How are the two fields above typed?  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jun 2005 19:36:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-arithematic-overflow-error/m-p/927498#M60198</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-06-13T19:36:50Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP - arithematic overflow  error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-arithematic-overflow-error/m-p/927499#M60199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Rich,&lt;/P&gt;&lt;P&gt;I am sorry ,the error occurs at &lt;/P&gt;&lt;P&gt;l_index = l_index - 1.&lt;/P&gt;&lt;P&gt;here the include program generates&lt;/P&gt;&lt;P&gt;l_index type sy-tabix and so is l_blend. From the code it looks like it's related to printer reading the data into some output table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In short the The error analysis shows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'whole number overflow on subtraction'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;he reason for termination in the current program is subtracting the number 1 from the number "-2147483648" (using operation - or 'SUBTRACT') RESULTED IN THE VALUE GREATER THAN 2147483647 or smaller than 2147483648. which results in a whole number overflow.&lt;/P&gt;&lt;P&gt;in the debugg mode if I check l_index has value 8 and how&lt;/P&gt;&lt;P&gt;"-2147483648" this came  no idea.&lt;/P&gt;&lt;P&gt;Thanks for your help in advance.&lt;/P&gt;&lt;P&gt;Santhosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jun 2005 21:52:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-arithematic-overflow-error/m-p/927499#M60199</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-13T21:52:10Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP - arithematic overflow  error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-arithematic-overflow-error/m-p/927500#M60200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My first thought would be that you are stuck in an endless loop.  Without debugging myself,  I can't be certain.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

while l_flag eq c_true.

l_index = l_index - 1.

read table p_cell_otf into l_otfline index l_index.

if l_otfline-tdprintcom &amp;lt;&amp;gt; pc_id_codepage and
l_otfline-tdprintcom &amp;lt;&amp;gt; pc_id_call_font and
l_otfline-tdprintcom &amp;lt;&amp;gt; pc_id_space_width and
l_otfline-tdprintcom &amp;lt;&amp;gt; pc_id_uline and
l_otfline-tdprintcom &amp;lt;&amp;gt; pc_id_color_text and
l_otfline-tdprintcom &amp;lt;&amp;gt; pc_id_move_to and
l_otfline-tdprintcom &amp;lt;&amp;gt; pc_id_md_after_par.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this code(above), you are looping and decrenting L_INDEX by 1 untill some condition is satisfied.  How does L_FLAG become TRUE?  If it becomes true by the IF statement being satisfied, then I would check in the "printer settings" in which you said have been recently changed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, not sure why L_INDEX is showing 8 in debug mode.&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;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jun 2005 23:42:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-arithematic-overflow-error/m-p/927500#M60200</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-06-13T23:42:07Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP - arithematic overflow  error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-arithematic-overflow-error/m-p/927501#M60201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Rich, Thanks for the information, &lt;/P&gt;&lt;P&gt;Yes you are right it's going into an endless loop. And the 'l_flag eq c_true' is becoming true and l_index  which starts with with 8 (Is it something spool retention days because in the printer settings that number is &lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt; it decrements and goes to the negative value that where it is getting the overflow condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;one more thing is there any otherway that I could send the entire code it is around 1000 lines. I think you could help me in this regard.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;because I am not able to understand whether it is due printer settings or some missing piece in the program from my side.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your help Rich.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jun 2005 13:20:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-arithematic-overflow-error/m-p/927501#M60201</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-14T13:20:44Z</dc:date>
    </item>
  </channel>
</rss>

