<?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: converting character to numeric in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/converting-character-to-numeric/m-p/2588091#M592397</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;Please try FM HRCM_STRING_TO_AMOUNT_CONVERT.&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;Ferry Lianto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 03 Aug 2007 14:34:11 GMT</pubDate>
    <dc:creator>ferry_lianto</dc:creator>
    <dc:date>2007-08-03T14:34:11Z</dc:date>
    <item>
      <title>converting character to numeric</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/converting-character-to-numeric/m-p/2588083#M592389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I have a character field that contains only numbers how do I convert this so it moves into a numeric field.  I thought it would accept it automatically if it had only numbers but we get a mismatch.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can I just create another datatype like this&lt;/P&gt;&lt;P&gt;a  type char.&lt;/P&gt;&lt;P&gt;b type numeric.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;b= a&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Aug 2007 13:00:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/converting-character-to-numeric/m-p/2588083#M592389</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-03T13:00:20Z</dc:date>
    </item>
    <item>
      <title>Re: converting character to numeric</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/converting-character-to-numeric/m-p/2588084#M592390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If it does not work try the instruction MOVE :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MOVE a TO b.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mathieu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Aug 2007 13:02:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/converting-character-to-numeric/m-p/2588084#M592390</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-03T13:02:46Z</dc:date>
    </item>
    <item>
      <title>Re: converting character to numeric</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/converting-character-to-numeric/m-p/2588085#M592391</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;try this&lt;/P&gt;&lt;P&gt;data: a(10) type c,&lt;/P&gt;&lt;P&gt;   b(10) type n.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   a = '123'.&lt;/P&gt;&lt;P&gt;   b = a.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write:/ b.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;b = 0000000123.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points if helpful,&lt;/P&gt;&lt;P&gt;thanks &amp;amp; regards,&lt;/P&gt;&lt;P&gt;venkatesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Aug 2007 13:03:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/converting-character-to-numeric/m-p/2588085#M592391</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-03T13:03:41Z</dc:date>
    </item>
    <item>
      <title>Re: converting character to numeric</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/converting-character-to-numeric/m-p/2588086#M592392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what if I wnat it to have 3 decimals.  how would that work?  It is 17 places&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Aug 2007 13:06:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/converting-character-to-numeric/m-p/2588086#M592392</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-03T13:06:14Z</dc:date>
    </item>
    <item>
      <title>Re: converting character to numeric</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/converting-character-to-numeric/m-p/2588087#M592393</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;while converting one data type into another data type you must maintain the same length.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: par1(10) type c value '1234',
        par2 type n.

  MOVE para1 TO para2.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if the source field para1 contains any decimal values in that case you declare target variable of type Integer or Packed type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The source field must contain the representation of a decimal number, that is, a sequence of digits with an optional sign and no more than one decimal point. The source field can contain blanks. If the target field is too short, an overflow may occur. This may cause the system to terminate the program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA:    par1(10) type c value '1234',
             par2 type i.    " 

  MOVE para1 TO para2.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;or&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA:  par1(10) TYPE C,
           par2       TYPE P DECIMALS 2. " specifies the decemal positions
     
         MOVE par1 TO par2. &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Ashok Reddy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Aug 2007 13:56:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/converting-character-to-numeric/m-p/2588087#M592393</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-03T13:56:43Z</dc:date>
    </item>
    <item>
      <title>Re: converting character to numeric</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/converting-character-to-numeric/m-p/2588088#M592394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;u r going right..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;just make sure.. to have same size for both variable..&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA:   v_char(10) type c,
            v_numc(10) type c.

v_char = '1234'.

v_numc = v_char.

write:/ v_numc.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Result will be :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;0000001234&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward useful answers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pradeep&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Aug 2007 14:02:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/converting-character-to-numeric/m-p/2588088#M592394</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-03T14:02:44Z</dc:date>
    </item>
    <item>
      <title>Re: converting character to numeric</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/converting-character-to-numeric/m-p/2588089#M592395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Use the standard function module MOVE_CHAR_TO_NUM&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; Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Aug 2007 14:06:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/converting-character-to-numeric/m-p/2588089#M592395</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-03T14:06:34Z</dc:date>
    </item>
    <item>
      <title>Re: converting character to numeric</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/converting-character-to-numeric/m-p/2588090#M592396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How do I get this to then be a packed with decimials&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Aug 2007 14:28:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/converting-character-to-numeric/m-p/2588090#M592396</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-03T14:28:14Z</dc:date>
    </item>
    <item>
      <title>Re: converting character to numeric</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/converting-character-to-numeric/m-p/2588091#M592397</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;Please try FM HRCM_STRING_TO_AMOUNT_CONVERT.&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;Ferry Lianto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Aug 2007 14:34:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/converting-character-to-numeric/m-p/2588091#M592397</guid>
      <dc:creator>ferry_lianto</dc:creator>
      <dc:date>2007-08-03T14:34:11Z</dc:date>
    </item>
    <item>
      <title>Re: converting character to numeric</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/converting-character-to-numeric/m-p/2588092#M592398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this program.&lt;/P&gt;&lt;P&gt;(invert . and , if you are using period as decimal point)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: zchar(15) VALUE '123.456.789,12'.
DATA: znum(8) TYPE p DECIMALS 3.
CALL FUNCTION 'MOVE_CHAR_TO_NUM'
  EXPORTING
    chr             = zchar
  IMPORTING
    num             = znum
  EXCEPTIONS
    convt_no_number = 1
    convt_overflow  = 2
    OTHERS          = 3.
IF sy-subrc &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  WRITE: / 'error', sy-subrc.
ENDIF.

WRITE: / 'znum =', znum.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Aug 2007 14:36:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/converting-character-to-numeric/m-p/2588092#M592398</guid>
      <dc:creator>former_member194797</dc:creator>
      <dc:date>2007-08-03T14:36:58Z</dc:date>
    </item>
  </channel>
</rss>

