<?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: Function Module move_char_to_num in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-move-char-to-num/m-p/3895103#M935050</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;Please check the type of the export parameter WA_CDPOS-VALNEW also what is the problrm you are getting.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Himanshu Verma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 May 2008 08:46:54 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-28T08:46:54Z</dc:date>
    <item>
      <title>Function Module move_char_to_num</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-move-char-to-num/m-p/3895102#M935049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is part of a program to trace changes done to Credit Limit. Value_new and Value_old fields are characters. I want to convert this to numeric. The following code is not working. Without the function module it is working fine. Kindly help. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Select Change document items&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    SELECT    OBJECTCLAS&lt;/P&gt;&lt;P&gt;              OBJECTID&lt;/P&gt;&lt;P&gt;              CHANGENR&lt;/P&gt;&lt;P&gt;              TABNAME&lt;/P&gt;&lt;P&gt;              TABKEY&lt;/P&gt;&lt;P&gt;              FNAME&lt;/P&gt;&lt;P&gt;              CHNGIND&lt;/P&gt;&lt;P&gt;              TEXT_CASE&lt;/P&gt;&lt;P&gt;              UNIT_OLD&lt;/P&gt;&lt;P&gt;              UNIT_NEW&lt;/P&gt;&lt;P&gt;              CUKY_OLD&lt;/P&gt;&lt;P&gt;              CUKY_NEW&lt;/P&gt;&lt;P&gt;              VALUE_NEW&lt;/P&gt;&lt;P&gt;              VALUE_OLD&lt;/P&gt;&lt;P&gt;          FROM CDPOS INTO CORRESPONDING FIELDS OF TABLE T_CDPOS&lt;/P&gt;&lt;P&gt;          FOR ALL ENTRIES IN T_CDHDR&lt;/P&gt;&lt;P&gt;          WHERE OBJECTCLAS = T_CDHDR-OBJECTCLAS&lt;/P&gt;&lt;P&gt;          AND   OBJECTID   = T_CDHDR-OBJECTID&lt;/P&gt;&lt;P&gt;          AND   CHANGENR   = T_CDHDR-CHANGENR&lt;/P&gt;&lt;P&gt;          AND   FNAME     IN S_FNAME AND&lt;/P&gt;&lt;P&gt;                FNAME = 'KLIMG' OR&lt;/P&gt;&lt;P&gt;                FNAME = 'KLIME' OR&lt;/P&gt;&lt;P&gt;                FNAME = 'KLIMK' OR&lt;/P&gt;&lt;P&gt;                FNAME = 'DBEKR'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF NOT T_CDPOS IS INITIAL.&lt;/P&gt;&lt;P&gt;      LOOP AT T_CDPOS INTO WA_CDPOS.&lt;/P&gt;&lt;P&gt;        CALL FUNCTION 'MOVE_CHAR_TO_NUM'&lt;/P&gt;&lt;P&gt;          EXPORTING&lt;/P&gt;&lt;P&gt;            CHR             = WA_CDPOS-VALUE_NEW&lt;/P&gt;&lt;P&gt;          IMPORTING&lt;/P&gt;&lt;P&gt;            NUM             = WA_CDPOS-VALNEW&lt;/P&gt;&lt;P&gt;          EXCEPTIONS&lt;/P&gt;&lt;P&gt;            CONVT_NO_NUMBER = 1&lt;/P&gt;&lt;P&gt;            CONVT_OVERFLOW  = 2&lt;/P&gt;&lt;P&gt;            OTHERS          = 3.&lt;/P&gt;&lt;P&gt;        IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;          MODIFY T_CDPOS FROM WA_CDPOS.&lt;/P&gt;&lt;P&gt;          CLEAR WA_CDPOS.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;      ENDLOOP.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 May 2008 08:41:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-move-char-to-num/m-p/3895102#M935049</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-28T08:41:11Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module move_char_to_num</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-move-char-to-num/m-p/3895103#M935050</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;Please check the type of the export parameter WA_CDPOS-VALNEW also what is the problrm you are getting.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Himanshu Verma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 May 2008 08:46:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-move-char-to-num/m-p/3895103#M935050</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-28T08:46:54Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module move_char_to_num</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-move-char-to-num/m-p/3895104#M935051</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 that WA_CDPOS-VALUE_NEW contains only numbers? pls. add the following line before the FM call:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CHECK WA_CDPOS-VALUE_NEW CO '0123456789'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the other hand the type of WA_CDPOS-VALNEW has to be P.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;ec&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 May 2008 08:48:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-move-char-to-num/m-p/3895104#M935051</guid>
      <dc:creator>JozsefSzikszai</dc:creator>
      <dc:date>2008-05-28T08:48:37Z</dc:date>
    </item>
  </channel>
</rss>

