<?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: Char to Hex Conversion in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/char-to-hex-conversion/m-p/6595880#M1436585</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 the below function module which will convert the string to hexadeciaml.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NLS_STRING_CONVERT_FROM_SYS &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FM SCMS_STRING_TO_FTEXT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Feb 2010 16:54:10 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-02-19T16:54:10Z</dc:date>
    <item>
      <title>Char to Hex Conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/char-to-hex-conversion/m-p/6595877#M1436582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Am using the following logic to convert the customer name into Hexadecimal format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      DATA : l_name    TYPE name1_gp,&lt;/P&gt;&lt;P&gt;                   l_value    TYPE zhex36.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          l_name = kunstruk-name1.&lt;/P&gt;&lt;P&gt;          PERFORM   hex_conversion USING   l_name&lt;/P&gt;&lt;P&gt;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lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;          FORM hex_conversion  USING    p_l_name&lt;/P&gt;&lt;P&gt;                     CHANGING p_l_value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                     FIELD-SYMBOLS: &amp;lt;dummy&amp;gt;.&lt;/P&gt;&lt;P&gt;                     ASSIGN p_l_name TO &amp;lt;dummy&amp;gt; TYPE 'X'.&lt;/P&gt;&lt;P&gt;                       p_l_value = &amp;lt;dummy&amp;gt;.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;          ENDFORM.        &lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="48" type="ul"&gt;&lt;P&gt;  &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          MOVE  l_value TO bytekna1-name1.   "bytekna1-name1. has the same length as of l_value .&lt;/P&gt;&lt;P&gt;when customer name is ESW Customer 6,the result is 00450053005700200043007500730074006F006D00650072002000360020002000200020.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This value is used in JAVA at the front end &amp;amp; when ther are converting it in string the result is :&lt;/P&gt;&lt;P&gt;#E#S#W# #C#u#s#t#o#m#e#r# #6# # # #.&lt;/P&gt;&lt;P&gt;They are getting extra # in the output,whihc should not come.&lt;/P&gt;&lt;P&gt;Please suggest if any one has faced this type issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Najmuddin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Feb 2010 14:19:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/char-to-hex-conversion/m-p/6595877#M1436582</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-19T14:19:03Z</dc:date>
    </item>
    <item>
      <title>Re: Char to Hex Conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/char-to-hex-conversion/m-p/6595878#M1436583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;the hex string you gave for example suggests, that you have unicode active on your system. Thus every character is represented by a 16bit value or 4 hex nibbles. Your java application shows '#' whenever a non printable character shows up. Obviously Java expects a single byte character and therefor interprets every second byte with '00' value as non printable.&lt;/P&gt;&lt;P&gt;Take care of the differnt expectations and your problem should be solved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Jörg&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Jörg Wulf on Feb 19, 2010 5:09 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Feb 2010 16:09:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/char-to-hex-conversion/m-p/6595878#M1436583</guid>
      <dc:creator>jrg_wulf</dc:creator>
      <dc:date>2010-02-19T16:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: Char to Hex Conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/char-to-hex-conversion/m-p/6595879#M1436584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jorg, do you  want me to handle the exceptions by code?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Feb 2010 16:44:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/char-to-hex-conversion/m-p/6595879#M1436584</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-19T16:44:21Z</dc:date>
    </item>
    <item>
      <title>Re: Char to Hex Conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/char-to-hex-conversion/m-p/6595880#M1436585</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 the below function module which will convert the string to hexadeciaml.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NLS_STRING_CONVERT_FROM_SYS &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FM SCMS_STRING_TO_FTEXT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Feb 2010 16:54:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/char-to-hex-conversion/m-p/6595880#M1436585</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-19T16:54:10Z</dc:date>
    </item>
    <item>
      <title>Re: Char to Hex Conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/char-to-hex-conversion/m-p/6595881#M1436586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This sample code converts a integer in an hexadecimal string:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FORM convert_int_to_hex  USING    pe_entero
                         CHANGING ps_hex.
  DATA: l_mod TYPE i,
        l_div TYPE i,
        l_letra.

  l_mod = pe_entero MOD 16.
  l_div = pe_entero DIV 16.


  CASE l_mod.
    WHEN 10. l_letra = 'A'.
    WHEN 11. l_letra = 'B'.
    WHEN 12. l_letra = 'C'.
    WHEN 13. l_letra = 'D'.
    WHEN 14. l_letra = 'E'.
    WHEN 15. l_letra = 'F'.
    WHEN OTHERS. l_letra = l_mod.
  ENDCASE.

  CONCATENATE l_letra ps_hex INTO ps_hex.
  IF l_div &amp;gt; 0.
    PERFORM convert_int_to_hex  USING   l_div
                             CHANGING ps_hex.
  ENDIF.

ENDFORM.                    " CONVERT_INT_TO_HEX
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: andrespicazo on Feb 19, 2010 7:17 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Feb 2010 18:16:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/char-to-hex-conversion/m-p/6595881#M1436586</guid>
      <dc:creator>andrs_picazo</dc:creator>
      <dc:date>2010-02-19T18:16:56Z</dc:date>
    </item>
  </channel>
</rss>

