Character equivalent of Hexadicimal '07'

Hi,
   I need to check if the character encountered is comma. if so the replace it by
hexadecimal '07'. How do we work with hexadecimal values?
is there any utility present in CL_CHAR_ABAP_UTILITIES for Hexa 07?
It would be helpful if anyone can let me know what hexadecimal '07' is used for.

Hi,
try like this
  FIELD-SYMBOLS: <FS>.
  DATA:
    L_HEXCHAR(1) TYPE X VALUE '07',
    L_CHAR(10) TYPE C VALUE 'ABC,ABC,AB',
    OF TYPE I,
    L_LEN TYPE I,
   L_REPLACE TYPE C.
  DESCRIBE FIELD L_CHAR LENGTH L_LEN.
  ADD -1 TO L_LEN.
  ASSIGN L_HEXCHAR TO <FS> TYPE 'C'.
  L_REPLACE = <FS>.
  DO L_LEN TIMES.
    IF L_CHAR+OF(1) EQ ','.
      L_CHAR+OF(1) = L_REPLACE.
    ENDIF.
    ADD 1 TO OF.
  ENDDO.
Kostas
Message was edited by:
        Kostas Tsioubris

Similar Messages

  • Prevent XI from converting & #163;  to pound character

    The requirement is  in input XML  file & #163; comes..by default in output file xml it is converting  the above grouped of characters to £ sign.
    how do I retain  & # 163; in output xml file without writing any adapter module for solution
    Points will be awarded.
    Edited by: gvs kiran on Nov 7, 2008 6:46 AM
    Edited by: gvs kiran on Nov 7, 2008 6:46 AM
    Edited by: gvs kiran on Nov 7, 2008 6:47 AM

    I do not see a chance. It seems that all & #xxx; are replaced by their character equivalent.
    You have to replace the £ by a Java mapping or adapter module after the graphical mapping again.
    Regards
    Stefan

  • Converting UNICODE to regular text

    I don't know if the subject line really explains my problem. I'm reading some content from a URL and would like to write that content back to a database. This all works fine except when the Html of that URL contains character codes.
    As an example: "Effects on blood lipids of a blood pressure & #8211; lowering....."
    As you can see from this, it put � instead of putting the dash (-). What I would like to write to my database is:
    "Effects on blood lipids of a blood pressure?lowering diet..."
    instead of
    "Effects on blood lipids of a blood pressure & #8211; lowering....."
    Does anyone have any ideas? Is there a way to transform all codes to there character equivalent?
    Thanks for your help
    (By the way, the html isn't quite right. I had to put it in brackets and insert a space for it to display correctly in the forum)

    Hi again,
    if you get wrong characters from the URL.openStream it is because the encoding set on your HTML page (probably in the header) is not the same as the default encoding used by your JVM on the client. If you know what encoding is on the HTML page you can set the same encoding for your stream. Use InputStreamReader(inputStream, encoding) for it. If you want to check the encoding of the page programaticaly you can use URLConnection.getContentEncoding() for it.
    Hope it helps you,
    Regards,
    Martin

  • Caesar Cipher and non printing ascii

    I am writing a program to implements the caesar cipher. For the program I am using ASCII code so my encryption algorithm is:
    c = (p + k) mod 128
    The only problem is, is that depending on the characters being encrypted and depending on the key I use some of the characters are encrypted to non-printing ascii characters such as 'del'.
    So my code reads in the plain text from a file converts each character to ascii, encrypts each character using the key. It then writes the encrypted ascii values to a file as text (i.e. the character equivalent of the ascii).
    If I do then encounter a non-printing ascii value it is written to the file as a square shape. Is there any way I can get around this?
    Thanks for your help on the matter.
    Wallace

    Modify your encryption function so that it only covers those ASCII values that print, i.e. you need to implement the mod and + function yourself so that only good ASCII characters are considered.

  • Mapping XML tags to paragraph styles that contain nested styles

    I am importing XML into InDesign (CS5.5) and the tag mapping to styles is working fine until I get to a paragraph style that contains a nested style.
    I have a sentence that starts with a number:
    1the dog runs fast.
    In InDesing properly styled looks like this:
         1  The dog runs fast.
    (tab)1(tab)The dog runs fast.
    The number is styled with a character style (Number) and the whole sentence is styled with a paragraph style (Sentence). In order to get the tabs in between the number, I have a nested style within the paragraph style (Sentence). This triggers the tabs when it hits the character style (Number) like this:
    Number up to 2 Tab Characters
    In XML, it looks like this
    <sentencetag><numbertag>1</numbertag>The dog runs fast.</sentencetag>
    Sentencetag is mapped to Sentence paragrph style and Numbertag is mapped to Number character style, but the nested style for the tabs are not displaying. I just get this in IND.
    1the dog runs fast.
    Everything works beautifully until I hit the nested styles, which I do need to get to work somehow. Any help would be much appreciated.
    Thanks in advance!

    It sounds like your tab characters are actually disappearing from content in the XML. Jeff was responding to the fact that they need to be there, and you state that you originally had them in your document, but they are not showing up once imported through the XML.
    The tabs may be disappearing in the XML document due to the "TAB" character in your text editor not being a tab, or at least not properly-formed XML TAB equivalent, OR because you are not "importing whitespace elements" when you import your XML.
    Importing whitespace elements can wreak havoc on other things in your XML structure and styled layout within the Indesign document, so I would put the XML quivalent of TAB everywhere a tab should be in your XML, and make sure NOT to import whitespace (when importing XML using "Merge Content", select not to import whitespace items from the import options).
    I believe the XML friendly character code for a TAB character is "&#9;" or "&#09;" but have not tested this. Don't include quotes when adding the character code, just the ampersand, semicolon, and everything in-between.
    Also, sounds like your tags are mapping ok for you, so your XML should look something like:
    <sentencetag>&#9;<numbertag>1</numbertag>&#9;The dog runs fast</sentencetag>.
    It should't matter where you put the TAB character equivalent in relation to your nested tag.

  • Creating Powershell script to run against Multiple XML Files: Correcting Nordic characters. Renaming only the files that were corrected.

    Greetings,
    I am new to powershell and scripting and would like to create a powershell script to do the following to XML files.
    I would like to change the data received in XML files that contains special Nordic characters: such as 
    ä, Ä, é, ö, Ö, ü, Ü, and ß respectfully.
    The file names that gets drop to me come in with the following naming convention: C54ABC_111120140500_1, C54ABC_111120140500_2, C54ABC_111120140500_3, C54ABC_111120140500_4 all the way to C54ABC_111120140500_12.
    By automating the script, I would like the script to look into a directory containing these files and access the data within it and change the the data that has the special characters to the English Dictionary character equivalent.
    e.g. ä for a, Ä for A, é for e, ö for o, Ö for O, ü for u, Ü for U, and ß for ss.
    Once that step is complete. I would like to rename the file from C54ABC_111120140500_1.xml to C54ABC_111120140500_1_rctf.xml (adding an additional 5 characters to the end of a file that was corrected) if the file did not need any correction then renaming is
    not needed.
    the working directory (Source and destination) will remain in the same location. e.g. C:\Temp\
    Currently I was able to come up with the following, however I am stuck when it comes to the renaming part since, it requires "IF and Else" statments .... I think.
    $Source = "C:\Temp"
    $Destination = "C:\Temp"
    $regex33 = "\*.xml"
    (Get-Content $regex33) |
    ForEach-Object {$_ -replace "ä", "a" -replace "Ä", "A" -replace "é", "e" -replace "ö", "o" -replace "Ö", "O" -replace "ü", "u" -replace "Ü", "U" -replace "ß", "ss"}
    #Rename-Item -NewName {$_.name -replace -whatif}
    Your Assistance and Expertise is greatly appreciated.
    Thank you in advance KC.

    Hi KC
    You could try something like this.
    Let me know how you get on and if you've any questionds.
    cheers, Tim
    $Source = 'C:\Temp'
    Set-Location $source
    $xmlFiles = Get-ChildItem -Path $source -Filter *.xml
    ForEach ($xmlFile in $xmlFiles)
      $content = Get-Content -Path $xmlFile.FullName
      $renameFile = $false
      Switch -Wildcard ($content) {
        '*ä*'
          $renameFile = $true
          $content = $content -creplace 'ä', 'a'
        '*Ä*'
          $renameFile = $true
          $content = $content -creplace 'Ä', 'A'
        '*é*'
          $renameFile = $true
          $content = $content -creplace 'é', 'e'
        '*ö*'
          $renameFile = $true
          $content = $content -creplace 'ö', 'o'
        '*Ö*'
          $renameFile = $true
          $content = $content -creplace 'Ö', 'O'
        '*ü*'
          $renameFile = $true
          $content = $content -creplace 'ü', 'u'
        '*Ü*'
          $renameFile = $true
          $content = $content -creplace 'Ü', 'U'
        '*ß*'
          $renameFile = $true
          $content = $content -creplace 'ß', 'ss'
      If ($renameFile)
        $newFileName = "$($xmlFile.BaseName)_rctf.xml"
        $content | Out-File -FilePath $xmlFile.FullName -Force
        Rename-Item -Path $xmlFile.PSChildName -NewName $newFileName

  • Keyboard characters : "character map" equivalent ?

    I have a localized Mac keyboard which doesn't have certain charachters, such as square brackets and the ~ (tilde) symbol.
    On a windows machine I can use the character map to get to certain symbols, is there any equivalent in Leopard ?
    Thanks, Tom.

    I have a localized Mac keyboard which doesn't have certain charachters, such as square brackets and the ~ (tilde) symbol.
    They are no doubt there somewhere, accessible via the Option or Option + Shift modifiers. To see where, you use Keyboard Viewer, which you activate by going to system prefs/international/input menu and checking its box (plus the box for "show input menu in Finder") and then selecting it from the "flag" menu at the top right of the Finder.
    In the Belgian layout, [] are at Option + Shift () and tilde is at Option + n.

  • Convert integers to equivalent characters in string - NOT ASCII code character

    I have to output my data and associated string information to a string array and then to a spreadsheet file.
    I want to do this by converting integers (and other numbers) to an identical string of characters.
    I have tried Type Cast with a string constant as the type input but it DOES NOT WORK.  Instead, I get the ASCII character whose numerical designation matches the integer, e.g. integer "50" become capital "P".
    I want integer "50" to be string "50".
    Please advise and no, I do not want to make arrays of clusters.
    Solved!
    Go to Solution.

    I found my answer but only after searching for "Number" conversion rather than "Integer" conversions.
    In the Programming palette  - String Functions - String/Number Conversion - Number to Decimal String:
    "Converts number to a string of decimal digits at least width characters wide or wider if necessary. If number is floating-point, it is rounded to a 64-bit integer before conversion."

  • Problem in replacing with the unicode equivalent character ?

    Hello,
    I have a situation wherein i must replace
    m with \u3005
    n with \u3006
    o with \u3041
    etc ...,
    I get the codepoint value from the multibyte represenation .
    But the problem is
    I can not replace
    String temp="ename";
    temp.replace('m','\u3005');
    I am not allowed to hard code the value 3005, rather i am suppose to get the code point value from the multibyte representation.
    I have no problem in getting the code point value from the multibyte represenation.
    After i get the code point value i must concatenate the codepoint value with "\u"
    Currently i am following this implementation to do the replacement,
    String rp=null,snd;
    String tmp="ename";
    String hh="";
    for(int i=0;i<tmp.length();i++)
    snd=getCodepoint(tmp.charAt(i));
    if(snd!=null)
    rp=replace(String.valueOf(tmp.charAt(i)),
    String.valueOf(tmp.charAt(i)),"\\u"+snd);
    hh=hh+rp;
    else
    hh=hh+String.valueOf(tmp.charAt(i));
    //The replace method
    public static String replace(String source, String pattern, String replace)
    if (source!=null)
    final int len = pattern.length();
    StringBuffer sb = new StringBuffer();
    int found = -1;
    int start = 0;
    while( (found = source.indexOf(pattern, start) ) != -1)
    sb.append(source.substring(start, found));
    sb.append(replace);
    start = found + len;
    sb.append(source.substring(start));
    return sb.toString();
    else return "";
    Please tell me how to do the replacement
    Because when i display after the replacement is done i get
    e\u3006a\u3005e for the string "ename"
    where as i should be getting special characters in place of 'm' and 'n' in the string
    or i must atleast get e?a?e for the string "ename"
    Please do offer some suggesstions in this regard
    Your suggesstions would be very useful
    NOTE:
    I am not suppose to make use of the method replaceAll( ) to do the replacements
    Thanks and regards
    khurram

    I am getting these errors
    i am not able to understand why
    i looked into the java2 complete reference text
    ther is no method called isHexDigit( ) in it
    pleasae do help
    the errors are as follows
    [systpe@Agni ~]$ javac C1.java
    C1.java:9: cannot resolve symbol
    symbol : method isHexDigit (char)
    location: class java.lang.Character
    if(!Character.isHexDigit(ch))
    ^
    C1.java:11: cannot resolve symbol
    symbol : method digitValue (char,int)
    location: class java.lang.Character
    v |= Character.digitValue(ch, 16);
    ^
    C1.java:15: replace(char,char) in java.lang.String cannot be applied to (java.lang.String,j
    ava.lang.String)
    String subs = "ename".replace("m", String.valueOf(cv));
    ^
    3 errors
    Thanks & Regards
    khurram

  • How to eliminate hexadicimal character # in ABAP program ?

    Hello,
    I want to eliminate the hexadecimal character '#' within my ABAP program ('#' is the first character in a table). Can anyone help me in building the logic ?
    Thanks for the help.
    Regards,
    Janardhan
    Edited by: Janardhan N on Aug 12, 2009 8:42 AM

    frequently asked question.
    locked

  • Equivalent of inputting an Integer but a character instead?

    Hi,
    If I wanted to input a number/integer i could use the following:
    Scanner s = new Scanner(System.in);
    int time= s.nextInt();
    How would I do the same if I wanted to input a character?
    If I wanted to input a string what do i change?
    many thanks for your help..
    Yash

    Doesn't that convert the integer into character or something using the ASCII tables?
    I probably misunderstood what you're trying to say. Basically I want to enter the character 'B' and assign it to a varialbe at the command prompt and then afterwards I want to enter the String 'Hello' at the prompt and have it assigned to a variable. How would I do that?
    System.out.println("please enter character");
    System.out.println("please enter String");
    I'm reading through the Java book by Walter Savith and the guy uses his own way of reading them in (Savitch.readLine() ), but I want to use the real Java method, which is why i'm stuck;)
    thanks again..
    Yash

  • Please remove remaining 255 character API limitations

    I develop a library for creating .xll add-ins using the Excel C API (as described in the Excel SDK:
    http://msdn.microsoft.com/en-us/library/office/bb687883(v=office.15).aspx ). However, this discussion also applies to the COM Automation interfaces, as used from VBA or VSTO.
    Since Excel 2007, the 255 character limitation for strings in Excel C APIs have been lifted. In particular, the C API supports long Unicode strings up to 32767 characters in most places. However, there are
    a number of C API calls where the 255 character string limitation remains. Typically, the corresponding COM Automation call has the same limitation, so these seem to be inherent in Excel at some level.
    I highlight two cases:
    * the C API call xlcFormulaConvert is used to convert formulas between A1 and R1C1-style references. If the resulting converted formula would be longer than 255 characters, the API call fails. Likewise, the corresponding
    COM call is Application.ConvertFormula, and has the same limitation of 255 character strings and returns Error 2105 for strings that would be longer than 255 characters. see the Remark in the documentation here: http://msdn.microsoft.com/en-us/library/office/ff822751(v=office.15).aspx
    * the C API call xlcFormulaArray has a similar limitation, as does the COM Automation equivalent,Range.FormulaArray, as documented here: http://support.microsoft.com/kb/213181
    (first noted in Excel 2000, but still present in Excel 2013) and here:
    http://msdn.microsoft.com/en-us/library/office/ff837104(v=office.15).aspx. Workarounds for this bug are very hard to implement, an example is this extensive discussion from 2005: http://dailydoseofexcel.com/archives/2005/01/10/entering-long-array-formulas-in-vba/
    Various other function have similar limitations, e.g. Match
    and Replace, RTD topic strings.
    I am posting here, in hopes that there is some way for this issue to make its way to the Excel team. These limitations still remaining from previous versions cause ongoing pain, and I would like to plead that they get some attention for future Excel
    releases.
    -Govert
    Excel-DNA - Free and easy .NET for Excel

    Another place where this limitation is present (still in Excel 2013), is in the strings passed with a C API call to
    xlfRegister, used to register a UDF. While the C API has supported long Unicode strings since Excel 2007, calls to xlfRegister will fail if any of the strings are longer than 255 characters.
    The limitation is particularly inconvenient in this call, since one of the strings represents the concatenation of parameter names displayed in the Insert Function dialog. So the total length of parameter names (including separator characters between parameters)
    cannot be more than 255 characters - a limit that is quite easily bumped into.
    This affects any add-in based on the C API, whether developed in C/C++ or a managed helper library like Excel-DNA.
    -Govert
    Excel-DNA - Free and easy .NET for Excel

  • Biztalk error if "&" special character is used from Oracle Database

    There is an error when system was received data form Oracle database. The data format is including "&"....etc special character. Becuase of the error appear between Oracle database and receive port. I can't do anything in Biztalk program to
    encode the message. Does any way to do encoding when biztalk receive data?
    xlang/s engine event log entry: Uncaught exception (see the 'inner exception' below) has suspended an instance of service 'ECT.TOSToEDB.orcWorkingTable(7e2c77ec-adb6-5790-29ad-835ec8374c1d)'.
    The service instance will remain suspended until administratively resumed or terminated.
    If resumed the instance will continue from its last persisted state and may re-throw the same unexpected exception.
    InstanceId: 8eb4cb36-82b2-4d34-9b45-64b8aba23758
    Shape name:
    ShapeId: 09bc980e-3040-4238-a838-f3606294effe
    Exception thrown from: segment 1, progress 84 Inner exception: An error occurred while parsing EntityName. Line 4, position 112.
    Exception type: XmlException
    Source: System.Xml
    Target Site: Void Throw(System.Exception) The following is a stack trace that identifies the location where the exception occured
       at System.Xml.XmlTextReaderImpl.Throw(Exception e)
       at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
       at System.Xml.XmlTextReaderImpl.ParseEntityName()
       at System.Xml.XmlTextReaderImpl.ParseEntityReference()
       at System.Xml.XmlTextReaderImpl.Read()
       at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)
       at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
       at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
       at System.Xml.XmlDocument.Load(XmlReader reader)
       at System.Xml.XmlDocument.LoadXml(String xml)
       at ECT.TOSToEDB.orcWokingTableCheck.segment1(StopConditions stopOn)
       at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s, StopConditions stopCond, Exception& exp)
    For more information, see Help and Support Center at
    http://go.microsoft.com/fwlink/events.asp.

    There are 5 special characters which in xml   & < > "  '  if the Oracle fields contain any of those characters it will cause invaild xml.
    This can be solved at the oracle side be replacing the special characters by it's  html encode equivalent, so  & becomes &amp; , I think the best way to solve it
    is to make a custom pipeline component and translate the special characters there.
    There is my Send Port Properties. Do you mean the default biztalk pipeline component ("XML Receive") cannot translate any special characters?

  • Multibyte Character handling in Upload

    Hi Everyone,
    We had handled the multibyte character on uploading a CSV file converting BLOB to NCLOB instead of earlier BLOB to CLOB.  This worked fine as per our requirement but issue arised with the performance.  A file that was loading in 20 seconds, was loading in more than 7 minutes.
    Please let us know if there are any equivalent of NCLOB usage to handle multibyte character without compromising on the performance of the upload.
    Any suggestions appreciated
    DB Version used is 11g
    Regards,
    Sunil

    Hi Sunil,
    Even I am facing the same problem.
    Using BLOB to NCLOB is degrading the Performance.
    Can anyone help here.
    DB version is 11G.
    Regards,
    Animesh

  • Replace special characters in xml to its HTML equivalent

    Hello All,
    I did a small xml processor which will parse the given xml document and retrieves the necessary values. I used XPath with DocumentBuilder to implement the same.
    The problem which had faced initially was, i could not able parse the document when the value comes with the '&' special character. For example,
    <description>a & b</description>I did some analysis and found that the '&' should be replaced with its corresponding HTML equivalent
    &amp; So the problem had solved and i was able to process the xml document as expected. I used the replaceAll() method to the entire document.
    Then i thought, there would be some other special character which may cause the same error in future. I found '<' is also will cause the same kind of error. For example,
    <description>a < b</description>Here i couldn't able to use the replaceAll(), because even the '<' in the xml element tags was replaced. So i was not able to parse the xml document.
    Did anyone face this kind of issue? Can anyone help me to get rid of this issue.
    Thanks
    kms

    Thats the thing about XML. It has to be correct, or it doesn't pass the gate. This is nothing really, seen it many times before. It becomes funny when you start to run into character set mismatches.
    In this case the XML data should have either been escaped already, or the data should have been wrapped in cdata blocks, as described here:
    http://www.w3schools.com/xml/xml_cdata.asp
    Manually "fixing" files is not what you want to be doing. The file has to be correct according to the very simple yet strict XML specifications, or it isn't accepted.

Maybe you are looking for

  • Assign ECC logical component

    I have a problem to assign logical component to my ECC system in t-code SMSY. Every other system works fine... Please help me with some new things to try!

  • Cut, copy,and paste on nokia n97

    can someone please help me. I dont know how to cut, copy,and paste on my nokia n97 6680,n70,n73,n80,n80ie,n82,n95,innov8,n85, n97, N8, lumia 920

  • Eclipselink JPA error

    Hi, I'm using Oracle JDeveloper 11.1.2.2.0 and the eclipselink JPA provider (integrated in Toplink library). I can run my web application in IDE. However, when I deployed my application to the embedded WLS via a WAR file, I got the following error: E

  • Different Trays in Adobe

    Hi , i have problem in Adobe form printing . The first page should get display from the Tray 01 and the 2nd page from diffent tray . How should i control this in Adobe form ? Thanks&regards Srinivas

  • 870A-G54 No USB from 3 headers?

    Ok so I tried to plug in a flash drive last night to my front USB and nothing happened. This is a new build but the front ports had worked previously. So I plugged it in the back figuring maybe the plug came off. Well this morning I checked it and th