<?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 'HR_KR_XSTRING_TO_STRING' in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-hr-kr-xstring-to-string/m-p/5653874#M1286341</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Avinash Kodarapu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to solve my problem with your suggestion but it didn't work. I mean, it continues showing ### instead 0.20.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have any idea about what can I do?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Leo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 May 2009 17:57:27 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-05-14T17:57:27Z</dc:date>
    <item>
      <title>Function 'HR_KR_XSTRING_TO_STRING'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-hr-kr-xstring-to-string/m-p/5653870#M1286337</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 need to convert a hexadecimal value to String. Then, I used the following function module HR_KR_XSTRING_TO_STRING. However, what I get as result is: ###.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: &lt;/P&gt;&lt;P&gt;in_xstring TYPE xstring,&lt;/P&gt;&lt;P&gt;out_string TYPE string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in_xstring = '00020C'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'HR_KR_XSTRING_TO_STRING'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FROM_CODEPAGE       = '8500'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      in_xstring          = in_xstring&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OUT_LEN             =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   importing&lt;/P&gt;&lt;P&gt;     out_string          = out_string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write out_string. " Result: ###&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone knows, how can I do to se correctly this result?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&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;Leo&lt;/P&gt;&lt;P&gt;Leitooo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2009 15:56:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-hr-kr-xstring-to-string/m-p/5653870#M1286337</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-14T15:56:03Z</dc:date>
    </item>
    <item>
      <title>Re: Function 'HR_KR_XSTRING_TO_STRING'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-hr-kr-xstring-to-string/m-p/5653871#M1286338</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;*   Convert XString to String
    data: loc_conv type ref to CL_ABAP_CONV_IN_CE,
            loc_xstring type xstring,
            loc_string type string.
    CALL METHOD CL_ABAP_CONV_IN_CE=&amp;gt;CREATE
      EXPORTING
        INPUT       = loc_xstring
        ENCODING    = 'UTF-8'
        REPLACEMENT = '?'
        IGNORE_CERR = ABAP_TRUE
      RECEIVING
        CONV        = loc_CONV.

    TRY.
        CALL METHOD loc_CONV-&amp;gt;READ
          IMPORTING
            DATA = loc_string.
      CATCH CX_SY_CONVERSION_CODEPAGE.
*-- Should ignore errors in code conversions
      CATCH CX_SY_CODEPAGE_CONVERTER_INIT.
*-- Should ignore errors in code conversions
      CATCH CX_PARAMETER_INVALID_TYPE.
      CATCH CX_PARAMETER_INVALID_RANGE.
    ENDTRY.&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; Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2009 16:01:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-hr-kr-xstring-to-string/m-p/5653871#M1286338</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-14T16:01:11Z</dc:date>
    </item>
    <item>
      <title>Re: Function 'HR_KR_XSTRING_TO_STRING'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-hr-kr-xstring-to-string/m-p/5653872#M1286339</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;Check this FM HR_RU_CONVERT_HEX_TO_STRING&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refer to this link..&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="6898595"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2009 16:02:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-hr-kr-xstring-to-string/m-p/5653872#M1286339</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-14T16:02:19Z</dc:date>
    </item>
    <item>
      <title>Re: Function 'HR_KR_XSTRING_TO_STRING'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-hr-kr-xstring-to-string/m-p/5653873#M1286340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sudheer Junnuthula,&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;I tried with CL_ABAP_CONV_IN_CE but I still having same problem. I mean, value of LOC_STRING is equal than ###.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't fnd the way to see ### as decimal value. For example: 0.20&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have any idea about what can I do?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for your help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Leo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2009 17:54:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-hr-kr-xstring-to-string/m-p/5653873#M1286340</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-14T17:54:19Z</dc:date>
    </item>
    <item>
      <title>Re: Function 'HR_KR_XSTRING_TO_STRING'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-hr-kr-xstring-to-string/m-p/5653874#M1286341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Avinash Kodarapu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to solve my problem with your suggestion but it didn't work. I mean, it continues showing ### instead 0.20.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have any idea about what can I do?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Leo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2009 17:57:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-hr-kr-xstring-to-string/m-p/5653874#M1286341</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-14T17:57:27Z</dc:date>
    </item>
    <item>
      <title>Re: Function 'HR_KR_XSTRING_TO_STRING'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-hr-kr-xstring-to-string/m-p/5653875#M1286342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Leonardo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is because your hex value contains only special characters. As SAP uses unicode UTF-16 so in your byte sequence &lt;EM&gt;00020C&lt;/EM&gt; each "character" is stored in two bytes. &lt;/P&gt;&lt;P&gt;First: '00', second '02', third '0C'. These are all special ASCII characters, that's why they appear as ### after conversion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Put correct byte value in xstring and you will get desired results. Example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CALL FUNCTION 'HR_KR_XSTRING_TO_STRING'
  EXPORTING
    in_xstring = '302E3230'   "0.20"
  IMPORTING
    out_string = out_string.

write: out_string.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2009 18:13:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-hr-kr-xstring-to-string/m-p/5653875#M1286342</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2009-05-14T18:13:41Z</dc:date>
    </item>
    <item>
      <title>Re: Function 'HR_KR_XSTRING_TO_STRING'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-hr-kr-xstring-to-string/m-p/5653876#M1286343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your answer. In fact, you are right. However, my main problem is that I receive a file created in  4.6c version, which include these characters ### (00020C).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this version (4.6c), I can move these characters to a dec field without problems. In fact, I see then its value like 0.20. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the other hand, if I use the same file in ECC 6.0, I can't assign these characters to a dec field. Even by using functions/methods.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any way to convert these character to dec value? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyways, thanks for your help. It has been quite useful.&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;Leo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2009 19:23:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-hr-kr-xstring-to-string/m-p/5653876#M1286343</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-14T19:23:25Z</dc:date>
    </item>
    <item>
      <title>Re: Function 'HR_KR_XSTRING_TO_STRING'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-hr-kr-xstring-to-string/m-p/5653877#M1286344</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 Value of 00020C is &lt;/P&gt;&lt;P&gt;00 - Null&lt;/P&gt;&lt;P&gt;02 - Start of text&lt;/P&gt;&lt;P&gt;0C - Form Feed  .. so it is converting these values as #..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to use the FM and get the char value of these hexa values and using this replace the values with space.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 May 2009 02:40:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-hr-kr-xstring-to-string/m-p/5653877#M1286344</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-15T02:40:16Z</dc:date>
    </item>
    <item>
      <title>Re: Function 'HR_KR_XSTRING_TO_STRING'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-hr-kr-xstring-to-string/m-p/5653878#M1286345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you please explain how do I replace these 00 (Nulls) which has automatically been inserted after each and every character for a working 4.5B file which fails in ECC6?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;BGaurav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jan 2013 08:45:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-hr-kr-xstring-to-string/m-p/5653878#M1286345</guid>
      <dc:creator>former_member228783</dc:creator>
      <dc:date>2013-01-02T08:45:25Z</dc:date>
    </item>
  </channel>
</rss>

