<?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: Dump overflow convt_overflow in a function in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dump-overflow-convt-overflow-in-a-function/m-p/8240803#M1630107</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;Yes Manu is right&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's not clear the logic of your algoritm, so which result you need to get, all we can say it's use a number type float in order to avoid the dump.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Sep 2011 17:40:07 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-09-27T17:40:07Z</dc:date>
    <item>
      <title>Dump overflow convt_overflow in a function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dump-overflow-convt-overflow-in-a-function/m-p/8240792#M1630096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello master.&lt;/P&gt;&lt;P&gt;I created a function that calculate a number from a string of numbers.&lt;/P&gt;&lt;P&gt;I checked and it works, but the string that needs to use the function is long&lt;/P&gt;&lt;P&gt;cadena = 0200000005500002133200000154700076945190&lt;/P&gt;&lt;P&gt;cadena that i need to work with is 40 lenght. I checked it with 30 lenght and it worked. how can i make it work with a lenght of 40???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FUNCTION zcalculo_dv.
*"----------------------------------------------------------------------
*"*"Interfase local
*"  IMPORTING
*"     REFERENCE(CADENA) TYPE  STRING
*"  EXPORTING
*"     REFERENCE(DV) TYPE  C
*"----------------------------------------------------------------------
* Toma una cadena de numeros, solo numeros (sin .,"·%!$) y calcula el DV

  DATA: suma TYPE i,
        mult TYPE i,
        num  TYPE string.

  num = cadena.

  mult = 2.
  suma = 0.

  WHILE num &amp;lt;&amp;gt; 0.
    suma = suma + num MOD 10 * mult.
    num = num DIV 10.
    mult = mult + 1.
    IF mult &amp;gt; 7.
      mult = 2.
    ENDIF.
  ENDWHILE.

  num = 11 - suma MOD 11.
  IF num = 10.
    dv ='K'.
  ELSEIF num = 11.
    dv = '0'.
  ELSE.
    MOVE num TO dv.
  ENDIF.

ENDFUNCTION.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It should return a number. I guess that i got a dump in the MOD. How can i solve that problem?? Any ideas??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Miguel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Sep 2011 15:48:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dump-overflow-convt-overflow-in-a-function/m-p/8240792#M1630096</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-27T15:48:54Z</dc:date>
    </item>
    <item>
      <title>Re: Dump overflow convt_overflow in a function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dump-overflow-convt-overflow-in-a-function/m-p/8240793#M1630097</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 use the float number (type F) instead of integer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Sep 2011 16:01:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dump-overflow-convt-overflow-in-a-function/m-p/8240793#M1630097</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-27T16:01:38Z</dc:date>
    </item>
    <item>
      <title>Re: Dump overflow convt_overflow in a function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dump-overflow-convt-overflow-in-a-function/m-p/8240794#M1630098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, it doesnt work with type F.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Sep 2011 17:05:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dump-overflow-convt-overflow-in-a-function/m-p/8240794#M1630098</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-27T17:05:30Z</dc:date>
    </item>
    <item>
      <title>Re: Dump overflow convt_overflow in a function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dump-overflow-convt-overflow-in-a-function/m-p/8240795#M1630099</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've tried to run this and it seems to work fine:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA:   SUMA TYPE F,
        MULT TYPE F,
        NUM  TYPE STRING.

DATA: NUM_F  TYPE F.

DATA: DV TYPE  C.

NUM = '0200000005500002133200000154700076945190'.

MOVE NUM TO NUM_F.

MULT = 2.
SUMA = 0.

WHILE NUM_F &amp;lt;&amp;gt; 0.
  SUMA = SUMA + NUM_F MOD 10 * MULT.
  NUM_F = NUM_F DIV 10.
  MULT = MULT + 1.
  IF MULT &amp;gt; 7.
    MULT = 2.
  ENDIF.
ENDWHILE.

NUM_F = 11 - SUMA MOD 11.
IF NUM_F = 10.
  DV ='K'.
ELSEIF NUM_F = 11.
  DV = '0'.
ELSE.
  MOVE NUM_F TO DV.
ENDIF.

WRITE DV.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Sep 2011 17:12:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dump-overflow-convt-overflow-in-a-function/m-p/8240795#M1630099</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-27T17:12:10Z</dc:date>
    </item>
    <item>
      <title>Re: Dump overflow convt_overflow in a function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dump-overflow-convt-overflow-in-a-function/m-p/8240796#M1630100</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;PRE&gt;&lt;CODE&gt;
  DATA: suma TYPE f,
        num  TYPE f.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; does work...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kr,&lt;/P&gt;&lt;P&gt;m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Sep 2011 17:16:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dump-overflow-convt-overflow-in-a-function/m-p/8240796#M1630100</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-27T17:16:28Z</dc:date>
    </item>
    <item>
      <title>Re: Dump overflow convt_overflow in a function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dump-overflow-convt-overflow-in-a-function/m-p/8240797#M1630101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;look&lt;/P&gt;&lt;P&gt;check the result with this data:&lt;/P&gt;&lt;P&gt;value = '011004455010010010116000005670', result is = 4&lt;/P&gt;&lt;P&gt;value = '021704490010010120516000005000', result is = 3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;more easy&lt;/P&gt;&lt;P&gt;value = '15292975', result is = 7&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need the string up to 40 numbers, with 30 is working and with less also. But a big number get dumps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i changed the program..everything, it doest work, thanks anyway, trying to fix this issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Sep 2011 17:19:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dump-overflow-convt-overflow-in-a-function/m-p/8240797#M1630101</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-27T17:19:21Z</dc:date>
    </item>
    <item>
      <title>Re: Dump overflow convt_overflow in a function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dump-overflow-convt-overflow-in-a-function/m-p/8240798#M1630102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;thanks, but it doesnt work&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Sep 2011 17:19:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dump-overflow-convt-overflow-in-a-function/m-p/8240798#M1630102</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-27T17:19:44Z</dc:date>
    </item>
    <item>
      <title>Re: Dump overflow convt_overflow in a function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dump-overflow-convt-overflow-in-a-function/m-p/8240799#M1630103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes,&lt;/P&gt;&lt;P&gt;and with '0200000005500002133200000154700076945190', it gives 0...&lt;/P&gt;&lt;P&gt;and with '02000000055000021332000001547000769451908711234001' it gives 5...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it even works with a 80 len string &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;kr,&lt;/P&gt;&lt;P&gt;m.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Manu D'Haeyer on Sep 27, 2011 7:26 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Sep 2011 17:25:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dump-overflow-convt-overflow-in-a-function/m-p/8240799#M1630103</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-27T17:25:36Z</dc:date>
    </item>
    <item>
      <title>Re: Dump overflow convt_overflow in a function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dump-overflow-convt-overflow-in-a-function/m-p/8240800#M1630104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Manu.&lt;/P&gt;&lt;P&gt;When i changed the data as you said&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  DATA: suma TYPE f,
        mult TYPE i,
        num  TYPE f.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the result of value = '011004455010010010116000005670' it gives me DV =   5.0000000000000000E+00&lt;/P&gt;&lt;P&gt;And it should be DV = 4&lt;/P&gt;&lt;P&gt;Am I doing sth wrong???&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;Edited by: Miguel Alvear on Sep 27, 2011 7:30 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Sep 2011 17:29:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dump-overflow-convt-overflow-in-a-function/m-p/8240800#M1630104</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-27T17:29:35Z</dc:date>
    </item>
    <item>
      <title>Re: Dump overflow convt_overflow in a function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dump-overflow-convt-overflow-in-a-function/m-p/8240801#M1630105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: RESULT TYPE I.

DATA: DV(10) TYPE  C.

NUM = '11004455010010010116000005670'.

MOVE NUM TO NUM_F.

MULT = 2.
SUMA = 0.

WHILE NUM_F &amp;lt;&amp;gt; 0.
  SUMA = SUMA + NUM_F MOD 10 * MULT.
  NUM_F = NUM_F DIV 10.
  MULT = MULT + 1.
  IF MULT &amp;gt; 7.
    MULT = 2.
  ENDIF.
ENDWHILE.

NUM_F = 11 - SUMA MOD 11.
IF NUM_F = 10.
  DV ='K'.
ELSEIF NUM_F = 11.
  DV = '0'.
ELSE.
  MOVE NUM_F TO RESULT.
  MOVE RESULT TO DV.
ENDIF.

WRITE DV.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've changed the program in order to convert the result in a integer number before moving it into a char.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now if I run the program 011004455010010010116000005670, the result is 2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Sep 2011 17:34:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dump-overflow-convt-overflow-in-a-function/m-p/8240801#M1630105</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-27T17:34:05Z</dc:date>
    </item>
    <item>
      <title>Re: Dump overflow convt_overflow in a function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dump-overflow-convt-overflow-in-a-function/m-p/8240802#M1630106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well I guess you loose some precision with your DIV statement...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try with:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
num = num / 10.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then, after looping:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
num = 11 - suma MOD 11.
num = ceil( num ).
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I must say I don't really understand what you are trying to do here &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;kr,&lt;/P&gt;&lt;P&gt;m.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Manu D'Haeyer on Sep 27, 2011 7:36 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Sep 2011 17:35:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dump-overflow-convt-overflow-in-a-function/m-p/8240802#M1630106</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-27T17:35:42Z</dc:date>
    </item>
    <item>
      <title>Re: Dump overflow convt_overflow in a function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dump-overflow-convt-overflow-in-a-function/m-p/8240803#M1630107</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;Yes Manu is right&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's not clear the logic of your algoritm, so which result you need to get, all we can say it's use a number type float in order to avoid the dump.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Sep 2011 17:40:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dump-overflow-convt-overflow-in-a-function/m-p/8240803#M1630107</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-27T17:40:07Z</dc:date>
    </item>
    <item>
      <title>Re: Dump overflow convt_overflow in a function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dump-overflow-convt-overflow-in-a-function/m-p/8240804#M1630108</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys.&lt;/P&gt;&lt;P&gt;The logic of the algoritm is ok, it is working with data type i. The result DV is also ok.&lt;/P&gt;&lt;P&gt;But the problem is that the value if bigger 40 lenght numbers and then&lt;/P&gt;&lt;P&gt;1.- get dump overflow&lt;/P&gt;&lt;P&gt;2.- if i changed to type F, the result is different than if i do it with type i...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that's my issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Sep 2011 17:45:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dump-overflow-convt-overflow-in-a-function/m-p/8240804#M1630108</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-27T17:45:51Z</dc:date>
    </item>
    <item>
      <title>Re: Dump overflow convt_overflow in a function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dump-overflow-convt-overflow-in-a-function/m-p/8240805#M1630109</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With '011004455010010010116000005670' and a CEIL statement it gives 4. Is that correct?&lt;/P&gt;&lt;P&gt;Damn I want to understand now...:)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kr,&lt;/P&gt;&lt;P&gt;m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Sep 2011 17:48:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dump-overflow-convt-overflow-in-a-function/m-p/8240805#M1630109</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-27T17:48:03Z</dc:date>
    </item>
    <item>
      <title>Re: Dump overflow convt_overflow in a function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dump-overflow-convt-overflow-in-a-function/m-p/8240806#M1630110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Yes correct&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;value=011004455010010010116000005670, DV = 4&lt;/P&gt;&lt;P&gt;value=011157638010010093416000005000, DV = 0&lt;/P&gt;&lt;P&gt;value=010037221010010102116000008050, DV = 1&lt;/P&gt;&lt;P&gt;value=021704490010010120516000005000, DV = 3&lt;/P&gt;&lt;P&gt;value=021706259010010111516000005000, DV = 4&lt;/P&gt;&lt;P&gt;value=041979446010010133316000005000, DV = 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All of those are ok with the type i, if you change it to float F, it changes...it doesnt have to change.&lt;/P&gt;&lt;P&gt;but the number that the logic will use is longer than 30 as i can use with type i, &lt;/P&gt;&lt;P&gt;if i put a value long 40, using type i, death....and if i change it to type F, also death, the result is not OK&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;Trhanks for the help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Sep 2011 17:52:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dump-overflow-convt-overflow-in-a-function/m-p/8240806#M1630110</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-27T17:52:26Z</dc:date>
    </item>
    <item>
      <title>Re: Dump overflow convt_overflow in a function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dump-overflow-convt-overflow-in-a-function/m-p/8240807#M1630111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;this issue i thought that it was simple to solve, but it gets more and more complicated...&lt;/P&gt;&lt;P&gt;heheeh&lt;/P&gt;&lt;P&gt;check the first code that i put, the original with type i, use it with the values that i put as samples.&lt;/P&gt;&lt;P&gt;then change the data with type F, use the values...the result is wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Sep 2011 17:55:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dump-overflow-convt-overflow-in-a-function/m-p/8240807#M1630111</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-27T17:55:54Z</dc:date>
    </item>
    <item>
      <title>Re: Dump overflow convt_overflow in a function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dump-overflow-convt-overflow-in-a-function/m-p/8240808#M1630112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes indeed results are different... strange algorithmn you've built up! &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;Anyway, a last idea perhaps, could you not split the string to work on them separately...?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Well, which you luck!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kr,&lt;/P&gt;&lt;P&gt;m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Sep 2011 18:06:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dump-overflow-convt-overflow-in-a-function/m-p/8240808#M1630112</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-27T18:06:18Z</dc:date>
    </item>
    <item>
      <title>Re: Dump overflow convt_overflow in a function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dump-overflow-convt-overflow-in-a-function/m-p/8240809#M1630113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try with type DECFLOAT34...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit: oh no... not correct either... different however... That's crasy, a result different per type &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kr,&lt;/P&gt;&lt;P&gt;m.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Manu D'Haeyer on Sep 27, 2011 8:09 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Sep 2011 18:09:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dump-overflow-convt-overflow-in-a-function/m-p/8240809#M1630113</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-27T18:09:12Z</dc:date>
    </item>
    <item>
      <title>Re: Dump overflow convt_overflow in a function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dump-overflow-convt-overflow-in-a-function/m-p/8240810#M1630114</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;The problem is type F doesn't save all integer part, but always the first 16 or 17 number, I means so the result will be different, but probably (you need to use only integer number) you can simple use the type N.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've changed my code using a type N long 50 char:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PARAMETERS: P(50) TYPE C.

DATA:   SUMA(50)  TYPE N,
        MULT(50)  TYPE N,
        NUM_C(50) TYPE N,
        NUM      TYPE STRING.

DATA:  DV TYPE STRING.

NUM = P.

MOVE NUM   TO NUM_C.

MULT = 2.
SUMA = 0.

WHILE NUM_C &amp;lt;&amp;gt; 0.
  SUMA = SUMA + NUM_C MOD 10 * MULT.
  NUM_C = NUM_C DIV 10.
  MULT = MULT + 1.
  IF MULT &amp;gt; 7.
    MULT = 2.
  ENDIF.
ENDWHILE.

NUM_C = 11 - SUMA MOD 11.
IF NUM_C = 10.
  DV ='K'.
ELSEIF NUM_C = 11.
  DV = '0'.
ELSE.
  MOVE NUM_C TO DV.
ENDIF.

WRITE DV.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've run it with all values you've have posted:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;value=011004455010010010116000005670, DV = 4&lt;/P&gt;&lt;P&gt;value=011157638010010093416000005000, DV = 0&lt;/P&gt;&lt;P&gt;value=010037221010010102116000008050, DV = 1&lt;/P&gt;&lt;P&gt;value=021704490010010120516000005000, DV = 3&lt;/P&gt;&lt;P&gt;value=021706259010010111516000005000, DV = 4&lt;/P&gt;&lt;P&gt;value=041979446010010133316000005000, DV = 1&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I get the result expected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now the problem could be to delete the leading zero in the result stored in DV, but this is simple to be solved&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Sep 2011 08:14:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dump-overflow-convt-overflow-in-a-function/m-p/8240810#M1630114</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-28T08:14:55Z</dc:date>
    </item>
    <item>
      <title>Re: Dump overflow convt_overflow in a function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dump-overflow-convt-overflow-in-a-function/m-p/8240811#M1630115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Max,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Was the first thing I tested... It works yes, but not for a 40 length string, which was the issue...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've nearly gone crazy with this, don't think there is a solution without changing the logic &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kr,&lt;/P&gt;&lt;P&gt;m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Sep 2011 08:28:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dump-overflow-convt-overflow-in-a-function/m-p/8240811#M1630115</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-28T08:28:23Z</dc:date>
    </item>
  </channel>
</rss>

