String to Hex conversion

Good morning,
I need advice please - we have obtained a piece of code from another SAP customer as we urgently had to use a formula to generate some data.
ws_seedno = '123456789ABCDEF123456789ABCDEF12'.
ws_length = STRLEN( ws_seedno ).
ASSIGN ws_seedno(ws_length) TO <fs> TYPE 'X'.
MOVE <fs> TO ws_khex.
The first step is to convert a seed number to hexadecimal - the customer that gave us the code obtains this result out of that code :
3132333435 3637383941 4243444546 3132333435 3637383941 4243444546
3132000000 0000000000 0000000000 0000000000 0000000000 0000000000 00000000
we on the other hand get this result :
0031003200 3300340035 0036003700 3800390041 0042004300 4400450046
0031003200 3300340035 0036003700 3800390041 0042004300 4400450046 00310032
Would someone know why the results differ? We are on different SPs and operating systems but both are ECC6,
Any advice would be greatly appreciated.
Anette

Thank-you Jay and Vishal,
Unfortunately both the suggested solutions delivers the same result as the code I posted
0031003200 3300340035 0036003700 3800390041 0042004300 4400450046
0031003200 3300340035 0036003700 3800390041 0042004300 4400450046 00310032
what is VERY interesting is that the person that supplied us the code is on ECC5, we also have an ECC5 SAP HR installation and this supplies the correct string :
3132333435 3637383941 4243444546 3132333435 3637383941 4243444546
3132000000 0000000000 0000000000 0000000000 0000000000 0000000000 00000000
This does not seem to be an ABAP issue - quite possible a basis?
Anette

Similar Messages

  • Character to hex conversion

    Hi,
    How can i convert character into hex string , for example if i have the data as "testing data", how can i get the hex coded output? Ive tried out using first string to number vi and thennumber to hex conversion vi but i get the answer as 0, can u help me in this?
    In short my data is " testing1234okokok" , i want a hex coded output which would be something as  "AD87BA......."
    Please help
    From Subhash

    What coercion dots? There are no coercion dots even without the loop:
    Message Edited by smercurio_fc on 02-13-2008 03:12 PM
    Attachments:
    Example_VI.png ‏1 KB

  • Interger to hex conversion ???

    Hi
    Is there a easy way to make interger (unsigned 32 bit ) to HEX
    conversion ??

    Kristian,
    It depends on what you want to do with the hex conversion. To view a
    number in hex in a control, right click on the control, select Format &
    Precision. As long as the format is set to numeric, you can select
    between decimal, hex, octal and binary from the other drop-down list.
    If you want to change an unsigned 32-bit number to a hex value to be
    written to a file, you can use the String->Format Into String VI. Wire
    your U32 into input 1, and set the format string to %4x (which will show
    a 4 digit hex value). The output will be a string which contains the
    hex value.
    Hope that helped.
    Mark
    In article <[email protected]>,
    [email protected] wrote:
    >
    >
    > Hi
    >
    > Is there a easy way to make interger (unsigned 32 bit ) to H
    EX
    > conversion ??
    >
    Sent via Deja.com http://www.deja.com/
    Before you buy.

  • Non ASCII String to Hex

    Hi,
    I am writing an algorithm that first encrypts a String, and then converts that String to Hex String. I can successfully parse Hex Strings into Ascii Strings and vice versa, but when I encrypt I cannot do this anymore. Is there a way to convert a non-ascii character to Hexadecimal and vice versa?
    Thanks in advance

    Maybe so....
    The encrypted value when printed does not format on my screen, and appears as boxes and such.
    The values that I am passing in are a very simple encryption....XOR against a key. Here is that algorithm.
    public byte[] encrypt(byte[] value) {
              byte[] encrypted = new byte[value.length];
              byte[] adjustedKey = getKey();
              while (adjustedKey.length < encrypted.length) {
                   String temp = new String(adjustedKey) + new String(key);
                   adjustedKey = temp.getBytes();
              for (int i = 0; i < value.length; i++) {
                   encrypted[i] = (byte)(adjustedKey[i] ^ value);
              return encrypted;          
    Since this is an XOR, I can use the same method to decrypt as well. This is what produces my non-Ascii characters.
    Is there a way for me to get the byte value of a 1 digit hex value then? this may help some.

  • Missing charsets in STring to FontSet conversion

    Hi,
    After installed SUn OS 10, I am trying to install SMC and I got a warning error: Missing Charsets in String to FontSet conversion. Cannot convert string "-monotype_arrial-regular-r-normal --*-140-*-*-p-*-iso8859-2" to type FonsStruct
    and so on, with different font types. etc....
    How can I find out which fontset in the Unix box? How can I permanent set it back to UTF-8 w/o re install OS again?
    Thanks
    HS

    Too bad Lily didn't follow up on TommyReynolds' suggestion. I'm also having the same problem ( I think ).
    TommyReynolds does say how to get the installed list, but doesn't say how to find out what's missing.
    My settings:
    [root@OEL5u4DB11gR2 X11]# rpm -qa 'xorg*font*' | /bin/sort
    xorg-x11-fonts-100dpi-7.1-2.1.el5
    xorg-x11-fonts-75dpi-7.1-2.1.el5
    xorg-x11-fonts-base-7.1-2.1.el5
    xorg-x11-fonts-ISO8859-1-100dpi-7.1-2.1.el5
    xorg-x11-fonts-ISO8859-1-75dpi-7.1-2.1.el5
    xorg-x11-fonts-misc-7.1-2.1.el5
    xorg-x11-fonts-truetype-7.1-2.1.el5
    xorg-x11-fonts-Type1-7.1-2.1.el5
    xorg-x11-font-utils-7.1-2
    [root@OEL5u4DB11gR2 X11]# uname -a
    Linux OEL5u4DB11gR2 2.6.18-164.el5 #1 SMP Thu Sep 3 02:16:47 EDT 2009 i686 i686 i386 GNU/Linux
    [root@OEL5u4DB11gR2 X11]# xclock &
    [1] 5950
    [root@OEL5u4DB11gR2 X11]# Warning: Missing charsets in String to FontSet conversion
    I would greatly appreciate any input.
    Kind regards,
    UFP1701

  • Error Warning: Missing charsets in String to FontSet conversion

    Hi
    I was installed aqualogic BPM version 6.0 MP4 for weblogic on solaris 10 SPARC
    when i ran albpmadmcenter i got an error
    bash-3.00$./albpmadmcenter
    Warning: Missing charsets in String to FontSet conversion
    Warning: Missing charsets in String to FontSet conversion
    any solution?
    thanks.

    I just found this on the web at http://www-01.ibm.com/support/docview.wss?uid=swg21146408.
    When I ran "export LC_ALL=C" and then ran xclock, I did not get the message. This might work for you.
    Paul

  • DECIMAL = HEX CONVERSION PACKAGE 생성 SCRIPT

    제품 : SQL*PLUS
    작성날짜 : 2002-04-12
    DECIMAL <=> HEX CONVERSION PACKAGE 생성 SCRIPT
    ==============================================
    Purpose
    Oracle내에서는 여러가지 값을 HEX 값으로 보여주는 경우가 있다.
    이런 경우 DB내에서 decimal 값으로 변환하기 위한 방법을 알아보자.
    Explanation
    다음은 decimal <=> hexa 의 conversion을 위한 package 생성문으로서
    system user로 수행하여 사용한다.
    create or replace package support as
    function dectohex (a number) return varchar2;
    pragma restrict_references
    (dectohex, WNDS, WNPS, RNDS, RNPS);
    function hextodec (a varchar2) return number;
    pragma restrict_references
    (hextodec, WNDS, WNPS, RNDS, RNPS);
    end support;
    create or replace package body support as
    FUNCTION hextodec(a IN VARCHAR2) RETURN NUMBER IS
    x NUMBER := 0;
    y NUMBER;
    z VARCHAR2(1);
    BEGIN
    IF length(a) > 8 THEN
    RAISE invalid_number;
    END IF;
    FOR i IN 1..length(a) LOOP
    z := upper(substr(a,i,1));
    IF z = 'A' THEN
    y := 10;
    ELSIF z = 'B' THEN
    y := 11;
    ELSIF z = 'C' THEN
    y := 12;
    ELSIF z = 'D' THEN
    y := 13;
    ELSIF z = 'E' THEN
    y := 14;
    ELSIF z = 'F' THEN
    y := 15;
    ELSE
    y := to_number(z,9);
    END IF;
    x := x * 16;
    x := x + y;
    END LOOP;
    RETURN x;
    END hextodec;
    FUNCTION dectohex(a IN NUMBER) RETURN VARCHAR2 IS
    x VARCHAR2(8) := '';
    y VARCHAR2(1);
    z NUMBER;
    w NUMBER;
    BEGIN
    IF a > power(2,32) OR a < 0 THEN
    RAISE invalid_number;
    END IF;
    w := a;
    WHILE w > 0 LOOP
    z := w mod 16;
    IF z = 10 THEN
    y := 'A';
    ELSIF z = 11 THEN
    y := 'B';
    ELSIF z = 12 THEN
    y := 'C';
    ELSIF z = 13 THEN
    y := 'D';
    ELSIF z = 14 THEN
    y := 'E';
    ELSIF z = 15 THEN
    y := 'F';
    ELSE
    y := to_char(z);
    END IF;
    w := trunc(w / 16);
    x := concat(y,x);
    END LOOP;
    RETURN x;
    END dectohex;
    END support;
    drop public synonym support;
    create public synonym support for system.support;
    grant execute on support to public;

    FYI: The new xf86-video-intel (2.9) has just been released:
    http://article.gmane.org/gmane.comp.fre … xorg/40733
    According to the release announcement, the new driver fixes the backlight issue with KMS:
    * Add support for BACKLIGHT property when using kernel modesetting
      (KMS). This allows backlight adjustment with programs such as
      "xbacklight -set <percentage>" or "xrandr --set BACKLIGHT <value>".

  • Problem with String to Int conversion

    Dear Friends,
    Problem with String to Int conversion
    I am having a column where most of the values are numeric. Only 4 values are non numeric.
    I have replaces those non numeric values to numeric in order to maintain the data type.
    CASE Grade.Grade  WHEN 'E4' THEN '24'  WHEN 'E3' THEN '23'  WHEN 'E2' THEN '22' WHEN 'E1' THEN '21' ELSE Grade.Grade  END
    This comes the result as down
    Grade
    _0_
    _1_
    _10_
    _11_
    _12_
    _13_
    _14_
    _15_
    _16_
    _17_
    _18_
    _19_
    _2_
    _20_
    _21_
    _22_
    _23_
    _24_
    _3_
    _4_
    _5_
    _6_
    _7_
    _8_
    _9_
    Refresh
    Now I want to convert this value to numeric and do some calculation
    So I changed the formula as below
    cast (CASE Grade.Grade  WHEN 'E4' THEN '24'  WHEN 'E3' THEN '23'  WHEN 'E2' THEN '22' WHEN 'E1' THEN '21' ELSE Grade.Grade  END as INT)
    Now I get the following error
    View Display Error
    _     Odbc driver returned an error (SQLExecDirectW)._
    Error Details
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    _State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 17001] Oracle Error code: 1722, message: ORA-01722: invalid number at OCI call OCIStmtFetch. [nQSError: 17012] Bulk fetch failed. (HY000)_
    SQL Issued: SELECT cast ( CASE Grade.Grade WHEN 'E4' THEN '24' WHEN 'E3' THEN '23' WHEN 'E2' THEN '22' WHEN 'E1' THEN '21' ELSE Grade.Grade END as Int) saw0 FROM "Human Capital - Manpower Costing" WHERE LENGTH(CASE Grade.Grade WHEN 'E1' THEN '20' WHEN 'E2' THEN '21' WHEN 'E3' THEN '22' WHEN 'E4' THEN '23' ELSE Grade.Grade END) > 0 ORDER BY saw_0_
    Refresh
    Could anybody help me
    Regards
    Mustafa
    Edited by: Musnet on Jun 29, 2010 5:42 AM
    Edited by: Musnet on Jun 29, 2010 6:48 AM

    Dear Kart,
    This give me another hint, Yes you are right. There was one row which returns neither blank nor any value.
    I have done the code like following and it works fine
    Thanks again for your support
    Regards
    Code: cast (CASE (CASE WHEN Length(Grade.Grade)=0 THEN '--' ELSE Grade.Grade END) WHEN 'E4' THEN '24' WHEN 'E3' THEN '23' WHEN 'E2' THEN '22' WHEN 'E1' THEN '21' when '--' then '-1' ELSE Grade.Grade END as Int)

  • I have proubleam with string to date conversion, i out put date fromat is 2012-04-30T23:48:55.727-07:00 . so please help me the format conversion

    i have proubleam with string to date conversion, i out put date fromat is 2012-04-30T23:48:55.727-07:00 . so please help me the format conversion.
    i wrote the method but it not workig
    My method is
    -(NSDate *)dateformstr:(NSString *)str
    NSString *date = [str stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
        NSDateFormatter *dateFormate = [[NSDateFormatter alloc] init];
      [dateFormate setDateFormat:@"yyyy-MM-dd'T'HH:mm:sssZZZZ"]
    // NSDate *formatterDate = [dateFormate  dateFromString:str];
        return formatterDate;
    but i did not the value and if i try othere formate i is working but my requiremet format is 2012-04-30T23:48:55.727-07:00.
    can any help it out in this senario.

    Sorry Butterbean, but I'm interested in the answer to your question myself.
    I've spent a few hours transfering my library from one computer to another and then find out that my ratings didn't transfer. Like you, I've spent many hours rating my 2000+ songs. I'm sure you have more, nevertheless, I want to find out how to get those ratings. They still show in my iTunes on my laptop but, when I go to the iTunes folder and display the details of at song, no rating is there. If you find out how to get them to display there in the iTunes folder, it seems that would be the key.
    Hope you get your answer soon.

  • Warning: Missing charsets in String to FontSet conversion

    Hi ,
    I just installed eclipse on a linux box abd while running eclipse i get the folowwing error -
    Warning: Missing charsets in String to FontSet conversion
    and the font looks distorted with blocks between alphabets

    did you fix this problem? I'm getting the same error :
    [bmollett@hextall ~]$ Warning: Missing charsets in String to FontSet conversion
    Warning: Cannot convert string "-*-*-medium-r-*-*-*-120-*-*-*-*-*-*" to type FontSet
    Warning: Missing charsets in String to FontSet conversion
    Warning: Unable to load any usable fontset
    Warning:
    Name: FONTLIST_DEFAULT_TAG_STRING
    Class: XmRendition
    Conversion failed. Cannot load font.
    Warning:
    Name: FONTLIST_DEFAULT_TAG_STRING
    Class: XmRendition
    Conversion failed. Cannot load font.
    Warning:
    Name: FONTLIST_DEFAULT_TAG_STRING
    Class: XmRendition
    Conversion failed. Cannot load font.
    Warning: No font found.
    Warning:
    Name: FONTLIST_DEFAULT_TAG_STRING
    Class: XmRendition
    Conversion failed. Cannot load font.
    Warning:
    Name: FONTLIST_DEFAULT_TAG_STRING
    Class: XmRendition
    Conversion failed. Cannot load font.
    Warning:
    Name: FONTLIST_DEFAULT_TAG_STRING
    Class: XmRendition
    Conversion failed. Cannot load font.
    JVMDG217: Dump Handler is Processing Signal 11 - Please Wait.
    JVMDG303: JVM Requesting Java core file
    JVMDG304: Java core file written to /home/bmollett/javacore.20050804.102118.11000.txt
    JVMDG215: Dump Handler has Processed Exception Signal 11.
    I've tried both motif and gtk2 versions ...

  • How can I convert a string of hex values to a hex format string programatically?

    Is there a way to convert a string of the following format:
    1400010107070D0305006A01 ........           ("Normal display" string)
    programatically to:
    1400 0101 0707 0D03 05006A01 ..........      ("Hex display" striing)
    I need to do this in order to calculate a CRC16 value.
    See attached VIs
    Thank you.
    Solved!
    Go to Solution.
    Attachments:
    CMM_SN_MULTI.vi ‏50 KB
    CMM_CRC16_Calculator.vi ‏23 KB

    You can iterate over the string and use the String to Hex VI. If you work with two bytes of the string at a time you can get a U8 array of the desired binary values. Then when you are complete you can either work with the byte array of convert it back to a string using Byte Array to String.
    EDIT: GerdW typed faster than I did.
    Message Edited by Mark Yedinak on 03-18-2010 02:55 PM
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • Problem with EPC URI to Hex conversion

    Hi Forum,
    I am getting strange EPC URI to hex conversion result in tx:/ain/http_test . Could you please confirm if this result is not expected.
    1.URI : urn:autoid:tag:sgtin-96:3.0066800.054321.70     
    hex is :  30740413C00000D431000000
    2.URI:  URN:AUTOID:TAG:SGTIN-96:3.0066800.054321.71
    hex is: 30740413C00000D431000000
    thus is both case HEX is same!!!
    i am using EPC_1.24  as active EPC version.
    could you please suggest some round about way.
    thanks in advance,
    regards,
    Ashit

    hi,
    i think problem is with EPC_1.24. i changed to
    EPC_1.27
    and it works fine.
    regards,
    Ashit

  • BIG ASCII string to HEX string

    Hello guys,
    I know that is already a lot of posts regarding this issue, but I couldn't find exactly what I need and also couldn't manage to solve it myself...
    I need to convert a string with ASCII characters to a string containing HEX representation of these characters.
    What I did was: 
    Apparently it works very well, but only for a limited numbers of characters, defined by data representation of the 0 constant (U64). It allows me to convert only 8 ASCII characters, as you can see on the image below:
    So, it converted from 0 to 7, but not the remaining characters (8 and 9).
    Any ideas??
    Thanks in advance!
     

    What is the data type of the constant wired into the typecast.  My guess is it is a U64.  So it will only typecast the first 8 bytes of your string to a number, then you are doing hex on those 8 numbers.
    Use the function String to Byte Array.  Or you could also typecast where an array of U8 integers is wired into the typecast function.

  • How conversion a string to Hex?

    my string's length is 27.

    You could try something like..
        char[] hex = {'0','1','2',  /*etc*/ , 'E','F'};
        String str;
        for (int i = 0; i < str.length(); i++) {
            int ch = (int)str.charAt(i);
            for (int j = 4096; j > 0; j >> 4) {
                System.out.print(hex[(ch >> j) && 0x0F]);
        }That should (untested though..) output 108 hex digits for a 27-character string.

  • Convers ascii string to hex string

    I need to send a hex string such as 5051525354A5A6A7A8A9 to a DSP across a serial port.  The string is read in from a file.
    When I send this string to the DSP, it does not recognize the correct hex values.
    If I enter the hex value, 5051525354A5A6A7A8A9, in to a string control that is set to hex display and then change the control to normal display, I get PQRST¥¦§¨©.  When I send this string,  PQRST¥¦§¨©, to the DSP, it recognizes the correct hex values. 
    How can I change the hex string read from the text file to this type of ASCII character conversion?  I've used type cast and the other functions available in LabVIEW with no success.
    This is only one of many strings I need to send so I don't want to hard code PQRST¥¦§¨© or some such string for each message.

    Here's a slightly simpler way.
    Message Edited by altenbach on 08-23-2007 12:17 PM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    HexStringtoBinaryString.png ‏10 KB
    HexStringtoBinaryString.vi ‏11 KB

Maybe you are looking for

  • ITunes media on a NAS, libraries locally?

    Hello, all, I've been browsing search results on hosting iTunes on a NAS, and I had a couple of questions and perhaps someone has some wisdom to share. My girlfriend and I have separate iTunes libraries that we would like to combine. We are each on a

  • Libattr.so.1 cannot open shared object file [solved]

    Updating my system and was getting lots of file conflicts; I believe I deleted something during that process that gives me this error.  System will not list any files, and pacman seems nonfunctional. What, if anything, can I do to restore what I mess

  • Next page problem

    Hi , I am having three pages in my service invoice layout first,next,summary . it is like this : page : first nextpage : next                     page: next  nextpage : summary                     page : summary  nextpage : summary my req: there is h

  • Posting March 2011 & April 2011 Transactions in parallel

    Hi, During some month-end process in the Legacy System, we could not complete the Transactions for the month of March 2011 in SAP. We have a pressure of opening the New Financial Year (April 2011) on 1st or 2nd of April. Can we open April 2011 withou

  • Regarding value updates in Table V_T559D

    Hello, Can you please let me know, how to update a value in table V_T559D. The scenerio is like this :- We have to update the expiry of probation under no of deduction in Table V_T559D(Deliminate validity and deduction periods). Plz explain me the st