<?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: Type conversion problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/type-conversion-problem/m-p/1113746#M106829</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ateeq,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should use conversion exit insted of moving directly.&lt;/P&gt;&lt;P&gt;for converting use this FM HRCM_STRING_TO_AMOUNT_CONVERT&lt;/P&gt;&lt;P&gt;pass your currency, decimal separator asa '.' and thousand separator as ',' it will give you the correct(converted) value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Vijay Babu Dudla&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Dec 2005 09:34:37 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-12-28T09:34:37Z</dc:date>
    <item>
      <title>Type conversion problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/type-conversion-problem/m-p/1113743#M106826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am doing a upload from excel file using FM 'ALSM_EXCEL_TO_INTERNAL_TABLE'. In this there are several currency fields. i am populating the values of excel into an itab of char type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when i am trying to convert the char type to currency type it is going to dump.&lt;/P&gt;&lt;P&gt;i had declared my currency field of domain WERTV8.&lt;/P&gt;&lt;P&gt;while debugging i observed that amount '9,000.00' is not converted to amount type.&lt;/P&gt;&lt;P&gt;in dump i got a message saying: " unable to interpret '9,000.00' as number.&lt;/P&gt;&lt;P&gt;i had used 'move' stmt for conversion of c type to amount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope my problem is clear to you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Dec 2005 09:26:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/type-conversion-problem/m-p/1113743#M106826</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-28T09:26:13Z</dc:date>
    </item>
    <item>
      <title>Re: Type conversion problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/type-conversion-problem/m-p/1113744#M106827</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 suggest you to use FM 'GUI_UPLOAD' instead of 'ALSM_EXCEL_TO_INTERNAL_TABLE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or use the following Bapi's for conversion&lt;/P&gt;&lt;P&gt;BAPI_CURRENCY_CONV_TO_EXTERNAL&lt;/P&gt;&lt;P&gt;BAPI_CURRENCY_CONV_TO_EXTERN_9&lt;/P&gt;&lt;P&gt;BAPI_CURRENCY_CONV_TO_INTERNAL&lt;/P&gt;&lt;P&gt;BAPI_CURRENCY_CONV_TO_INTERN_9&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lokesh.&lt;/P&gt;&lt;P&gt;Pls. reward appropriate points&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Dec 2005 09:30:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/type-conversion-problem/m-p/1113744#M106827</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-28T09:30:23Z</dc:date>
    </item>
    <item>
      <title>Re: Type conversion problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/type-conversion-problem/m-p/1113745#M106828</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 have to delete the , from your char number, it has always this format: '9000.00'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CHAR_NUMBER = '9,000.00'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPLACE ',' WITH SAPCE INTO CHAR_NUMBER.&lt;/P&gt;&lt;P&gt;CONDENSE CHAR_NUMBER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MOVE CHAR_NUMBER TO WERTV8.&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 Dec 2005 09:32:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/type-conversion-problem/m-p/1113745#M106828</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-28T09:32:32Z</dc:date>
    </item>
    <item>
      <title>Re: Type conversion problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/type-conversion-problem/m-p/1113746#M106829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ateeq,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should use conversion exit insted of moving directly.&lt;/P&gt;&lt;P&gt;for converting use this FM HRCM_STRING_TO_AMOUNT_CONVERT&lt;/P&gt;&lt;P&gt;pass your currency, decimal separator asa '.' and thousand separator as ',' it will give you the correct(converted) value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Vijay Babu Dudla&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Dec 2005 09:34:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/type-conversion-problem/m-p/1113746#M106829</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-28T09:34:37Z</dc:date>
    </item>
    <item>
      <title>Re: Type conversion problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/type-conversion-problem/m-p/1113747#M106830</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 using 'KCD_EXCEL_OLE_TO_INT_CONVERT'.Kindly reward points by clicking the star on the left of reply,if it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; DATA : lt_intern TYPE STANDARD TABLE OF kcde_cells WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'KCD_EXCEL_OLE_TO_INT_CONVERT'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      filename                = p_file&lt;/P&gt;&lt;P&gt;      i_begin_col             = p_scol&lt;/P&gt;&lt;P&gt;      i_begin_row             = p_srow&lt;/P&gt;&lt;P&gt;      i_end_col               = p_ecol&lt;/P&gt;&lt;P&gt;      i_end_row               = p_erow&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      intern                  = lt_intern&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      inconsistent_parameters = 1&lt;/P&gt;&lt;P&gt;      upload_ole              = 2&lt;/P&gt;&lt;P&gt;      OTHERS                  = 3.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    FORMAT COLOR COL_BACKGROUND INTENSIFIED.&lt;/P&gt;&lt;P&gt;    WRITE:/ text-004."Error Uploading file or Path Not Found.&lt;/P&gt;&lt;P&gt;    EXIT.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Dec 2005 09:36:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/type-conversion-problem/m-p/1113747#M106830</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2005-12-28T09:36:08Z</dc:date>
    </item>
    <item>
      <title>Re: Type conversion problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/type-conversion-problem/m-p/1113748#M106831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ateeq,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. As already suggested, &lt;/P&gt;&lt;P&gt;   we can REPLACE comma with ''&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  (Because COMMA is creating the main problem,&lt;/P&gt;&lt;P&gt;   the string having comma cannot be&lt;/P&gt;&lt;P&gt;   converted to number )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. try this code (just copy paste)&lt;/P&gt;&lt;P&gt;   Try with/without commenting REPLACE statement.&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;REPORT abc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : cr TYPE wertv8.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : s(20) TYPE c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;s = '9,000.00'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="------" /&gt;&lt;P&gt; If we don't use replace, error&lt;/P&gt;&lt;P&gt;REPLACE ',' IN s WITH ''.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cr = s.&lt;/P&gt;&lt;P&gt;WRITE : s , cr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amit M.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Dec 2005 10:05:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/type-conversion-problem/m-p/1113748#M106831</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-28T10:05:02Z</dc:date>
    </item>
    <item>
      <title>Re: Type conversion problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/type-conversion-problem/m-p/1113749#M106832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi take one local vairable whose type is of any currency field.&lt;/P&gt;&lt;P&gt;then use the write to statement and&lt;/P&gt;&lt;P&gt;write value to local_variable.&lt;/P&gt;&lt;P&gt;then use this local_variable in ur program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;satish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Dec 2005 10:56:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/type-conversion-problem/m-p/1113749#M106832</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-28T10:56:24Z</dc:date>
    </item>
  </channel>
</rss>

