<?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: Convert string to integer in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-to-integer/m-p/3246344#M774833</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rich, you hit the nail on the head, I have commas and decimal points in the string.  I will make the change which you posted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Davis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 Jan 2008 17:40:03 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-01-15T17:40:03Z</dc:date>
    <item>
      <title>Convert string to integer</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-to-integer/m-p/3246342#M774831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to convert a string (it is a packed number stored in a string variable) into an integer.  I tried just saying integer = string but it throws a run-time error.  Then I tried to use fm convert_string_to_integer but that FM isn't at all what it sounds like (it doesn't' accept a string of numbers).  How can I do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Davis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jan 2008 17:32:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-to-integer/m-p/3246342#M774831</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-15T17:32:00Z</dc:date>
    </item>
    <item>
      <title>Re: Convert string to integer</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-to-integer/m-p/3246343#M774832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what's the problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

data: str type string value '123456'.
data: i type i.

i = str.

write:/ i.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what is the value in your string?  Does it contain something other than numbers?  If so you would need to get rid of those.  For example, say that your string contained a number with a thousand separator like ','.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

data: str type string value '123,456'.
data: i type i.

translate str using ', '.    "&amp;lt; get rid of the comma
condense str no-gaps.
i = str.

write:/ i.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&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>Tue, 15 Jan 2008 17:35:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-to-integer/m-p/3246343#M774832</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2008-01-15T17:35:36Z</dc:date>
    </item>
    <item>
      <title>Re: Convert string to integer</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-to-integer/m-p/3246344#M774833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rich, you hit the nail on the head, I have commas and decimal points in the string.  I will make the change which you posted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Davis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jan 2008 17:40:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-to-integer/m-p/3246344#M774833</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-15T17:40:03Z</dc:date>
    </item>
    <item>
      <title>Re: Convert string to integer</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-to-integer/m-p/3246345#M774834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;
report  zars no standard page heading
        line-size 170
        line-count 65(4).

data : int type i.
data : char(10) type c value '123'.

class cl_abap_container_utilities definition load.

call method cl_abap_container_utilities=&amp;gt;read_container_c
  exporting
    im_container           = char
  importing
    ex_value               = int
  exceptions
    illegal_parameter_type = 1
    others                 = 2.

write : int.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jan 2008 17:40:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-to-integer/m-p/3246345#M774834</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2008-01-15T17:40:29Z</dc:date>
    </item>
  </channel>
</rss>

