Character Value!!

How do I display the character value of a particular character in a string?

I tried to make a sample code, both charAt(index) and charValue() methods returned the same thing. So, I guess my earlier suggestion was wrong...
What therefore do you mean when you say character value? Is it for example String "Hello" is composed of character values 'H', 'e', 'l', 'l', and 'o'?

Similar Messages

  • Error while assigning a character value to a numeric variable.

    I fire a sql statement and check the number of rows returned by the sql.
    I check this result with the application logs.
    The application logs keeps the sqls fired by the application and the no of rows returned, in the example below the sql returned 8454 rows.
    My script compares the two results.
    ***********Application Log***********
    4/14/2008 11:15:01 AM: 0059 SQL SELECT "CLUSTER_CD",
    4/14/2008 11:15:01 AM: 0060 "PRODUCT_DESC",
    4/14/2008 11:15:01 AM: 0061 "TEAM_CD"
    4/14/2008 11:15:01 AM: 0062 FROM "OPS$TMS"."MAP_CLUSTER_TEAM_PROD"
    4/14/2008 11:15:01 AM:      3 fields found: CLUSTER_CD, PRODUCT_DESC, TEAM_CD, 8,454 lines fetched
    ***********Application Log***********
    My script:
    #!/bin/ksh
    typeset -i resA
    typeset -i resB
    opstms_conn_string="abc/[email protected]"
    set `sqlplus -s $opstms_conn_string << EOF
    set pages 0
    WHENEVER SQLERROR CONTINUE
    SELECT count(*)
    FROM MAP_CLUSTER_TEAM_PROD;
    exit
    EOF`
    resA=$1 ##returns 8454
    resB=`grep '3 fields found: CLUSTER_CD, PRODUCT_DESC, TEAM_CD,' BCVP_Main_Loader.qvw.log | awk '{print $10}'`
    ##resB returns 8,454
    ## here i get syntax error
    if [ $resA -eq $resB ]; then
    echo "QA passed for sql1"
    else
    echo "QA failed for sql1"
    fi
    The problem is as resB is integer variable it does not accept character value: 8,454 so returns a syntax error:
    How do I change the value assigned to resB into a numeric variable?
    error:
    + grep 3 fields found: CLUSTER_CD, PRODUCT_DESC, TEAM_CD, BCVP_Main_Loader.qvw.log
    run.ksh[52]: 8,454: syntax error

    Change:
    resB=`grep '3 fields found: CLUSTER_CD, PRODUCT_DESC, TEAM_CD,' BCVP_Main_Loader.qvw.log | awk '{print $10}'`
    to this:
    resB=`grep '3 fields found: CLUSTER_CD, PRODUCT_DESC, TEAM_CD,' BCVP_Main_Loader.qvw.log | awk '{print $10}' | tr -d ,`
    to drop the comma. Or you could do it in awk(1):
    resB=`grep '3 fields found: CLUSTER_CD, PRODUCT_DESC, TEAM_CD,' BCVP_Main_Loader.qvw.log | awk '{ gsub( /,/, "", $10 ); print $10}'`
    Or you could to it all in awk(1):
    resB=`awk '
    /3 fields found: CLUSTER_CD, PRODUCT_DESC, TEAM_CD/ {
    gsub( /,/, "", $10 )
    print $10
    ' BCVP_Main_Loader.qvw.log`
    (This example was not tested, it's just for a model.)
    Someone more of an SQL guru than I can probably tell you how to change your numeric locale to avoid presenting those commas in the first place and avoid the problem.
    HTH

  • How 2 assgin a character value to the auxillary cell

    Hi,
         I'm assigning a character value to the auxiliary cell in the macro. But it gives me a dump. So do let me know can I assign a character value to the auxiliary cell ( I need to display this value for the alert text).
    Thanks,
    Siva.

    Why are you trying to use a character in the planning book - why not a representative value in numbers
    but if you HAVE to use characteristic then you can also try to use the notes functionality (right click on a cell and go to notes if you have not seen this )
    These notes are usually anchored to a cell. These notes are stored in a table (check in se 16 with wildcard on notes ) and is associated to the value of a cell
    So if you can reference a cell value and put in the conditons to the values on it you might be able to manipulate the values in the table for notes and this will cause the notes in the interactive planning boo to change accoring to the value of the cell

  • Problem with display of a character (value 65533)

    Hi all, sorry for my english but i don't speak it very well.
    I have a big problem with the visualization of a character.
    I have a binary text that i have to analyze with java. With my utility all works fine, but when i get the character (binary 81) and i analayze this character i obtain an int 65533 or a byte -3 , and after a casting to char i see that java doesn't display correctly this char, infact i obtain a char like this a question mark in a square. Even if a try to write this into a text file, i can see correctly all the other char, but instead of this char i see a question mark.
    Someone know why i obtain this?i have to set some specific character encoding or something like this?
    I don't know if this is usefull, but these are Hebrew char.
    Thanks,bye.

    A character value of 65533 in not in the Unicode range for Hebrew and Java characters are Unicode encoded as UTF16. See http://www.unicode.org/charts/ .
    65533 is not a byte value since bytes have a range -128 to +127 .
    0x81 is not the same as 65533 decimal.
    How are you converting the bytes of the file to characters?
    Edited by: sabre150 on Oct 9, 2008 8:51 AM

  • Passing multiple character values from parameter form to PL/SQL

    Hi,
    I am passing multiple character values from parametr form into
    the report query and a PL/SQL procedure. It works fine with the
    query, when I use &variable. But, it doesn't compile in PL/SQL,
    so I just used the :variable, but not getting any records in the
    PL/SQL procedure. Any suggestions?
    sincerely,
    gj

    gj / Fedro,
    Only using the &referecne, you can pas a string / multiple character values and this would work for query only.
    The bind parameter in PL/SQL wouls support only single value
    Thanks
    The Oracle Reports Team

  • XML Report Excel Output Numeric & Character value left aligned

    Hi,
    I want the XML Report Excel ouput both numberic and character values to be left aligned in the report ouput. Currently my report excel ouput prints the number value right aligned and character value left aligned.
    I have tried to concat a space to the value to make that as a character value, but this gives a extra space in the report output, which shld not happen..
    Please could anyone help me with a solution.
    Thanks

    Hi Uday,
    You are making number as a string, by adding a character :) , so it will be displayed as string with space and not as number.

  • Function module to convert character value of month into numeric value?

    Hi Experts,
                     I need to convert a character value of a month in three alphabets to its numeric value.
    e.g. 'jun' should be converted into '06' and 'jan' into '01' using a function module.Can anybody please provide me a similar function module?
    TIA
    Abhishek

    try this code:
    DATA: text(20) TYPE c,
    date TYPE sy-datum.
    text = '06. Jul 06'.
    TRANSLATE text TO UPPER CASE.
    TRANSLATE text USING '. '.
    CONDENSE text NO-GAPS.
    CALL FUNCTION 'CONVERSION_EXIT_SDATE_INPUT'
    EXPORTING
    input = text
    IMPORTING
    output = date.
    WRITE date USING EDIT MASK '__.__.____'.
    Regards,
    Dara.

  • How to convert character value to_date?

    I want to change the time (hours) in sysdate to '10' and then save this new date into a date column for that i've written the following command
    (TO_CHAR(SYSDATE,'DD-MON-RRRR')||' 10:'||TO_CHAR(SYSDATE,'MI:SS AM'))this command will remove the actual hours in sysdate and change it with the value '10'. but the result of this command is a character value. and i want a date value to insert into a date column. for that i've converted this command to_date as follows
    TO_DATE(TO_CHAR(SYSDATE,'DD-MON-RRRR')||' 10:'||TO_CHAR(SYSDATE,'MI:SS AM'))but it gives the following error
    ORA-01830: date format picture ends before converting entire input string
    how to do this?

    Gul wrote:
    I want to change the time (hours) in sysdate to '10' and then save this new date into a date column for that i've written the following command
    (TO_CHAR(SYSDATE,'DD-MON-RRRR')||' 10:'||TO_CHAR(SYSDATE,'MI:SS AM'))this command will remove the actual hours in sysdate and change it with the value '10'. but the result of this command is a character value. and i want a date value to insert into a date column. for that i've converted this command to_date as follows
    TO_DATE(TO_CHAR(SYSDATE,'DD-MON-RRRR')||' 10:'||TO_CHAR(SYSDATE,'MI:SS AM'))but it gives the following error
    ORA-01830: date format picture ends before converting entire input string
    how to do this?TO_DATE(TO_CHAR(SYSDATE,'DD-MON-YYYY')||' 10:'||TO_CHAR(SYSDATE,'MI:SS AM'),'DD-MON-YYYY HH:MI:SS AM')

  • Passing 900 character value into a Single line

    Hi Experts,
    I have a scenario that i have to pass 900 character value to a single field. After that i need to download this internal table into an text file.
    What happening after some characters the values are not getting passed into my varaibale.
    So please help me how to accomodate all the 900 character values in a single field.
    With Regards,
    Sumodh.P

    Hi,
       Chk this ...
    DATA : BEGIN OF IT_ITAB900 OCCURS 0,
             VAL(900) TYPE C,
           END OF IT_ITAB900.
    INITIALIZATION.
    CONCATENATE 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz'
    'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz'
    'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz'
    'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz'
    'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz'
    'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz'
    'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz'
    'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz'
    'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz'
    'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz'
    'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz'
    'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz'
    INTO
    IT_ITAB900-VAL.
    APPEND IT_ITAB900.
    START-OF-SELECTION.
    DATA : P_FILENAME TYPE  STRING.
    P_FILENAME = 'C:\Documents and Settings\testingis on.txt'.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
      BIN_FILESIZE                    = BIN_FILESIZE
        FILENAME                        = P_FILENAME
      TABLES
        DATA_TAB                        = IT_ITAB900 .
    This writes all the characters ....
    Regards,
    Srini.

  • [Microsoft][ODBC SQL Server Driver]Invalid character value for cast specifi

    [Microsoft][ODBC SQL Server Driver]Invalid character value for cast specification
    An you help me with this error?
    This is the problemativ query:
    Search QUERY : SELECT DISTINCT theK_files.fileid, theK_files.name, theK_files.t
    itle, theK_files.description, theK_users1.name AS AuthorName, theK_users1.surn
    ame AS AuthorSurname, [theK_file-extensions].name AS Extension, theK_files.publ
    ished, theK_files.updated FROM theK_users INNER JOIN [theK_users-to-groups] ON
    theK_users.userid = [theK_users-to-groups].userid INNER JOIN theK_usergroups
    ON [theK_users-to-groups].groupid = theK_usergroups.groupid INNER JOIN [theK_g
    roups-to-files] ON theK_usergroups.groupid = [theK_groups-to-files].groupid INN
    ER JOIN theK_files ON [theK_groups-to-files].fileid = theK_files.fileid INNER
    JOIN theK_users theK_users1 ON theK_files.authorid = theK_users1.userid INNER
    JOIN [theK_file-extensions] ON theK_files.extensionid = [theK_file-extensions]
    .extensionid WHERE theK_users.userid = '1' AND theK_files.extensionid = '1' AN
    D ( theK_files.name LIKE '%a%' OR theK_users1.name LIKE '%a%' OR theK_files.de
    scription LIKE '%a%' )

    are these columns character/string/varchar:
    theK_users.userid = '1'
    theK_files.extensionid = '1'
    if these are number columns, change them to
    theK_users.userid = 1
    theK_files.extensionid = 1
    Jamie

  • Character value can display automatically

    Dear Experts,
    i have a question for character value.
    In BW, we have master data for PH1-PH6.
    And if you know the PH6, there is unique value for PH1-PH5.
    For example, if PH6 = 111111, PH1 = 1, PH2 = 11, PH3 = 111,etc.
    This value is unique.
    Now we have a excel layout for user to key in.
    User only key in PH6, we want that the value for Ph1-Ph5 can fill-in automatically.
    Just like user key in ph6 = 111111, ph1 = 1, ph2 = 11, ect.
    I think characteritic relationship can achieve this requirment.
    But question is that we must use the exit type for this requriment, am I right.
    Can we use attribute or reference data or hierarchy ,etc to achieve this target?
    If we use exit, we must create a function to support this requirement.
    Thanks and best regards
    Alex yang

    Hi Alex,
    you can do that easily with standard relationship, you need to have in the master data of PH6 the others PH as attrubutes, this way you can use char relationship based on master data. A similar way is to have a DSO with PH6 as a key and all the others PH and you can use C R with DSO. again hier is the same, if you have the hier you can easily set C R based on hier.
    if you don't want to create such relations then you need exit relat.
    hope this helps
    Mike

  • Include character value variable processed by customer exit in the report

    I have defined a character value variable' processed by 'customer exit'. i am troubleshooting a problem so I need to see the value of this variable. Is there a way to display this variable in the report. If so, what section, rows or columns? And how to configure?
    Thanks,
    Sharon

    Hi,
    You can add directly the variable, in BEx Analyzer 7.0 you can add variables in the Excel Cell that you would.
    Steps:
    - Select the Excel Cell
    - In the BEx Design Toolbox, select Insert text
    - When you are in Design Mode - click over the text element
    - Go to Constants tab and select the Custom Exit Variable
    - Save the workwook
    Regards,
    Dani

  • How 2 convert numeric value to character value?

    Hi friends,
    I want to convert numeric value to the character value.
    Is there any FM available?
    Points rewared soon.
    Regards
    Ronn

    REPORT ZSPELL.
    TABLES SPELL.
    DATA : T_SPELL LIKE SPELL OCCURS 0 WITH HEADER LINE.
    DATA : PAMOUNT LIKE SPELL-NUMBER  VALUE '1234510'.
    SY-TITLE = 'SPELLING NUMBER'.
    PERFORM SPELL_AMOUNT USING PAMOUNT 'USD'.
    WRITE: 'NUMBERS', T_SPELL-WORD, 'DECIMALS ', T_SPELL-DECWORD.
    FORM SPELL_AMOUNT USING PWRBTR PWAERS.
      CALL FUNCTION 'SPELL_AMOUNT'
           EXPORTING
                AMOUNT    = PAMOUNT
                CURRENCY  = PWAERS
                FILLER    = SPACE
                LANGUAGE  = 'E'
           IMPORTING
                IN_WORDS  = T_SPELL
           EXCEPTIONS
                NOT_FOUND = 1
                TOO_LARGE = 2
                OTHERS    = 3.
    ENDFORM.                               " SPELL_AMOUNT

  • Restricting character values in Editable field in ALV

    Hi ,
    I am working on Editable ALV ..,
    Editable field is net amount field ,
    can you tell me how to restrict the user to enter the
    character values before he is going for saving.
    can i restrict the user while entering it self b'coz
    while saving message is getting but client want at user entry level itself..,
    code ::
      WA_FIELDCAT-FIELDNAME   = 'NETPR'.
      WA_FIELDCAT-SCRTEXT_M   = 'Net Price'.
      WA_FIELDCAT-EDIT        = 'X'. "sets whole column to be editable
      WA_FIELDCAT-COL_POS     = 7.
      WA_FIELDCAT-OUTPUTLEN   = 15.
      WA_FIELDCAT-REF_TABLE = 'EKPO'.
      WA_FIELDCAT-REF_FIELD  = 'NETPR'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR  WA_FIELDCAT.
    regards,
    abdul

    Hi,
    Yes, you can ristrict the data entered by user.
    1. declare the field of type P for net price, if will not accept character values. and  if user entered char value and press enter it 
        will through error.
    2. check in loop, if net price is of P type, etc....
    3. u cas pass routine to your REUSE_ALV_grid_display.
    i_callback_user_command           = 'USER_COMM'  
    in user_comm you can write ur logic.
    Ex: when Save.
           check ur fiels etc...
    4. remove the given reference table and field name.
    EX :   LS_FIELDCAT-REF_FIELDNAME = 'NAME1'.
                LS_FIELDCAT-REF_TABNAME = 'ZCYLI_QUAN'.
    hope this will solve your problem.

  • No charact. values combinations relevant for planning exist!

    Dear all
    I have maintained all the class 300 and the relevant characteristics, together with the relevant maintenance such as Configuraiton Profile (CU41) and etc.
    Previously, I am able to use the LSMW I created for Tcode: MDPH (Create Planning Profile for Manufacturing Material) to perform the mass upload for the Planning Profile.
    However, until today during my upload, I face the following error:
    "No charact. values combinations relevant for planning exist
    Message no. 6P569"
    Please advise.
    Thanks

    Hi Diamos,
    I'm having scenario of characteristic values planning. I maintained 300 variant in Material master. I created planning table in MDP1 and i maintained values in MDP4. While doing the transaction MDPH it is showing warning as
    No Characteristic values combination relavant for planning exist. Message No.6P569
    with executing tick mark i maintained planning profile.
    While in PIR i need to select the characteristic values as per the requirement. Its not happening in the PIR. How to select the Characteristic values.
    Kindly provide information on this.
    Naren

Maybe you are looking for

  • Need a little help with placing divs?

    I am wanting to know How I can place three divs exactly like the picture shown. I am sure this is pretty easy for most of you so I am going to just leave this picture! Thanks for your help in advance!

  • Finder file size on external drive

    When I do Finder->File->Get Info, I get total size of contents of current folder in the window. But when I do the same thing on an external drive, I do not. Is there a way to make that info show up? Thanks.

  • Why are there folders on my mac that i can't open. says i don't have permission! its is mine

    There is a folder I have found on my HD. called user templates. It tells me I don't have permission to open this? This is my computer! Why can't i open it?

  • Rule set Version

    Hi ,   How to find out , rules set version a particular RAR( CC) system have , If a logged into RAR( Or CC) of some one else system, To be specific I wanted to know which Rule Set Version?( Rules)  they are using (Like Q1 2007 , Q3 2007, Q2 2008 or Q

  • EBCC inconsistant behavior

    I copied the security.wf from the OOTB stockportal application (portal 4.0 sp2) and added into my own project. Open it the first time in EBCC, the login node has an empty stub called button.login which is not linked to anywhere. Second time open it i