How to convert character to ascii

Hi i need to check the value of the character less than space so need to make calc based on ASCII values
can some one tell me how can i convert chars & numbers to ASCII

Hi,
Please check this code:
Below logic is for convert from character to ascii value :
report test.
*going from A to 65
data : c value 'A'.
field-symbols : <n> type x.
data : rn type i.
assign c to <n> casting.
move <n> to rn.
write rn.
Below logic is for convert from ascii tocharacter value :
*going from 66 to B
data : i type i value 66.
data : x type x.
field-symbols : <fc> type c.
move i to x.
assign x to <fc> casting type c.
move <fc> to c.
write c.
May it gives you some idea.
I hope it helps you.
Thanks.
Deepak Sharma.

Similar Messages

  • How to convert character into numeric

    Pls suggest me how to convert character value into numeric value.

    If you are looking for some FM then
    USE
    CALL FUNCTION 'CHAR_NUMC_CONVERSION'
    EXPORTING
    INPUT = 0
    IMPORTING
    NUMCSTR =
    or use
    Sample code below:
    codeDATA: lv_chr(4) type c,
    lv_num type p.
    CALL FUNCTION 'MOVE_CHAR_TO_NUM'
    EXPORTING
    CHR = lv_chr
    IMPORTING
    NUM = lv_num
    EXCEPTIONS
    CONVT_NO_NUMBER = 1
    CONVT_OVERFLOW = 2
    OTHERS = 3.
    IF SY-SUBRC 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.[/code]
    or USE
    CONVERT_STRING_TO_INTEGER
    or USE THESE FMs
    MOVE_CHAR_TO_NUM
    C14W_CHAR_NUMBER_CONVERSION
    CHAR_NUMC_CONVERSION
    reward if helpful

  • How to convert character string into ascii format correctly

    dear all
    I'm using encryption technique in my application(oracle formas 6i). character stream convert to the ascii format and add some numeric value and again convert to the character format
    >>>>
    here I'm using ASCII and CHR functions.
    >>>>
    .net program also using same algorithm to encrypt this password.....finally both the character strings are not equel.(This happens if the character string's ascii value greater than 127. otherwise both are equel).
    pls give me a solution for this
    thanks and regards
    buddhike

    hir dear
    do u want to encrypt & dcrypt your password.which version of oracle you are using
    first store these procedure in Oracle Databases: dbms_obfuscation_toolkit, dbms_crypto, Transparent Data Encryption
    now u can use these procedure to encrypt & dcrypt your password
    if you any query about those procedures you can ask me
    best regard
    amk

  • Convert Character to ASCII Number

    Hello.
    I would greatly apprectiate if someone could tell me how to convert a Number or Character to its ASCII decimal representation. For example if I have the number 9 I would like to save its ASCII decimal number 39 instead.
    Thank YOU!!

    By the way, getNumericValue doesn't return the unicode value of the character but the numeric value - for instance it returns the int 9 for the character '9' and the int 15 for the character 'F' (since 15 is F in hex).

  • How to convert character sets???

    I need to load a CLOB from a BFile, the BFile is in an (HP-UX) US7ASCII character set and the database is UTF8. I need to load the CLOB using dbms_lob.loadfromfile but can't find any info on how to convert the US7ASCII file into a UTF8 CLOB.
    HELP!!!
    --Joan Armstrong                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Joan,
    I don't know if this will help with conversion of you BFILE, but at
    http://www.xml.com/lpt/a/2000/04/26/encodings/xmlparser.html
    and at
    http://xmlsoft.org/encoding.html
    there is some information on conversion to UTF8.
    Hope it helps. Let us know.
    Dave

  • How to convert character streams to byte streams?

    Hi,
    I know InputStreamReader can convert byte streams to character streams? But how to convert the character streams back to byte streams? Is there a Java class for that?
    Thanks in advance.

    When do you have to do this? There's probably another way. If you just start out using only InputStreams you shouldn't have that problem.

  • How to convert tdms to ascii files?

    Hello,
    I need to convert *.tdms files to an ascii file.  I have 16 channels and scalling coefficient information in the tdms file, With the TDMS-Image Viewer i can see the 1-D array waveform perfectly, but I cant write it to an ascii file. When I use a signalexpress.vi or the spreetsheat.vi for writing an LVM/ascii file,  information gets lost. (Red symbol at INPUT!!!!)
    Please answer me, because I dont have lots of experience with labview and an ascii file is more easier to handle for me! I found only export to matlab and exel, but i just want it in an ascii file.  Reading the tdms and opening it is no problem, but connecting the right blocks to the 1D array waveform without dataloss doesnt work.
    thank you for reading
    danny

    Thank you for reply,
    i have the new version 8.5.   With signalexpress.vis  i can do asciis but the red symbol (at input) is there so i dont want to get information lost.
    The tdms file has header information for scalling factors and unscalled data for 16 channels.
    so because tdms files are faster for writing i want to convert them to ascii with a Convertion Vi, but it seems that with an express vi he stops because it cant handle handle with the headerinformation.
    now i use the signalexess vi to write tdms data, before i did it manully by setting channel and group information.
    Please tell me if the red symbol AT input of a Signalexpress VI does matter?   its a 1D array wavefrom that goes in to the input.
    thank you for this discussion, i hope that i dont need to use the matlab import option for tdms!!
    greetings danny

  • 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')

  • How to convert ## - character ?

    Hello experts,
    I'm reading the text of an incoming emai with method pdf_table = document->get_body_part_content( 1 )
    where pdf_table is type bcss_dbpc  with CONT_TEXT-Line  of type SO_TEXT255 char.
    But when I now have a look into this pdf_table I see a lot of this #### - characters.
    How I can convert this character into space character  ?
    Thanks for help,
    G.

    Hello again,
    this # - characters seems to be control chracters from  line break in the email.
    I've changed code settings in my gui, but this didn't help. (we also use unicode).
    But the problem is still there.
    How to change this # - control characters ?
    Any ideas ?
    Thanks G

  • How to convert Character string to individual Numbers for IN clause?

    Hi,
    I'm using the following query but its throwing the error shown below. Please help.
    declare
    ln_UID VARCHAR2(200) := '21,24';
    ln_NUM NUMBER;
    begin
    dbms_output.put_line('ln_UID ' || ln_UID);
       SELECT COUNT(USAGE_RESOURCE_PERMISSION_ID)
          INTO ln_NUM
        FROM  S_USAGE_RESOURCE_PERMISSIONS SURP,
          S_USAGE_PROFILE SUP,
          S_RESOURCE_PERMISSIONS SRP,
          S_RESOURCE SR,
          S_RESOURCE_GROUP SRG
        WHERE SUP.USAGE_PROFILE_ID = SURP.USAGE_PROFILE_ID
          AND SURP.RESOURCE_PERMISSION_ID = SRP.RESOURCE_PERMISSION_ID
          AND SUP.USAGE_PROFILE_ID IN (ln_UID)
          AND SRP.RESOURCE_PERMISSION_VAL <> 3 --view
          AND SRP.RESOURCE_ID = SR.RESOURCE_ID
          AND SR.RESOURCE_GROUP_ID = SRG.RESOURCE_GROUP_ID
          AND SRG.PRODUCT_ID = (SELECT PRODUCT_ID FROM S_PRODUCTS WHERE PRODUCT_NAME='RBPS');
    dbms_output.put_line('ln_NUM ' || ln_NUM);
    end;
    error-
    Error starting at line 1 in command:
    declare
    ln_UID VARCHAR2(200) := '(21,24)';
    ln_NUM NUMBER;
    begin
    dbms_output.put_line('ln_UID ' || ln_UID);
       SELECT COUNT(USAGE_RESOURCE_PERMISSION_ID)
          INTO ln_NUM
        FROM  S_USAGE_RESOURCE_PERMISSIONS SURP,
          S_USAGE_PROFILE SUP,
          S_RESOURCE_PERMISSIONS SRP,
          S_RESOURCE SR,
          S_RESOURCE_GROUP SRG
        WHERE SUP.USAGE_PROFILE_ID = SURP.USAGE_PROFILE_ID
          AND SURP.RESOURCE_PERMISSION_ID = SRP.RESOURCE_PERMISSION_ID
          AND SUP.USAGE_PROFILE_ID IN ln_UID
          AND SRP.RESOURCE_PERMISSION_VAL <> 3 --view
          AND SRP.RESOURCE_ID = SR.RESOURCE_ID
          AND SR.RESOURCE_GROUP_ID = SRG.RESOURCE_GROUP_ID
          AND SRG.PRODUCT_ID = (SELECT PRODUCT_ID FROM S_PRODUCTS WHERE PRODUCT_NAME='RBPS');
    dbms_output.put_line('ln_NUM ' || ln_NUM);
    end;
    Error report:
    ORA-01722: invalid number
    ORA-06512: at line 6
    01722. 00000 -  "invalid number"
    *Cause:   
    *Action:Thanks.

    u cant use ln_UID like that in IN. when you do that it checks for SUP.USAGE_PROFILE_ID = '21,24'
    so you can try some thing like this.
    Note: Code not tested as i dont have the required data structure.
      WITH T AS
      (select to_number(substr(','||ln_UID||',',val,val1-val)) col
        from (select instr(','||ln_UID||',',',',1,level)+1 val, instr(','||ln_UID||',',',',1,level+1) val1
                  from dual
            connect by level <= length(replace(translate(ln_UID,'0123456789',' '),' ',''))+1))
      SELECT COUNT(USAGE_RESOURCE_PERMISSION_ID)
          INTO ln_NUM
        FROM  S_USAGE_RESOURCE_PERMISSIONS SURP,
          S_USAGE_PROFILE SUP,
          S_RESOURCE_PERMISSIONS SRP,
          S_RESOURCE SR,
          S_RESOURCE_GROUP SRG
        WHERE SUP.USAGE_PROFILE_ID = SURP.USAGE_PROFILE_ID
          AND SURP.RESOURCE_PERMISSION_ID = SRP.RESOURCE_PERMISSION_ID
          AND SUP.USAGE_PROFILE_ID IN (SELECT COL FROM T)
          AND SRP.RESOURCE_PERMISSION_VAL <> 3 --view
          AND SRP.RESOURCE_ID = SR.RESOURCE_ID
          AND SR.RESOURCE_GROUP_ID = SRG.RESOURCE_GROUP_ID
          AND SRG.PRODUCT_ID = (SELECT PRODUCT_ID FROM S_PRODUCTS WHERE PRODUCT_NAME='RBPS');Thanks,
    Karthick.

  • Convert CHARACTER in Oracle to TIMESTAMP

    Hi,
    One of the mapping in which our team works has one of the source columns from Oracle with Data type as timestamp.One of the sample data looks like
    13-OCT-06 03.10.52.448000 PM.
    When we pull in the data structure of source in Informatica, this column appears as a 'LONG RAW'. And it is moved forward in transformation as 'BINARY'.
    This mapping fails if we do no modification to the data types in Informatica. We manually edited it to 'DATE', it worked but the data comes out with no Millisecond value in the target; I.e. the data is truncated. We need to retain the milliseconds portion of the date as well.
    can anyone guide us how to convert CHARACTER in Oracle to TIMESTAMP, as we find the conversion can help us if we can not do it within Informatica
    thx

    TO_TIMESTAMP('13-OCT-06 03.10.52.448000 PM', 'DD-MON-RR HH12.MI.SS.FF AM')Regards...

  • May i use nls_charset12 to convert character set before executeQuery()?

    i got a problem for the db nls character set
    isn't us7ascii, so while retreiving data from database the data stored in ResultSet is changed to UTF-8 format. thus, my question is - how to convert character set before my executuing the method
    executeQuery() or any other methods would be appreciated.
    thanks in advice,

    This is Tommy. I saw your post on Oracle Forum. Can you give me the classes12.zip, classes12_g.zip, and nls_charset12.zip ?!
    Thx in advance !!
    Tommy fromTaiwan ( July 3, 2001 )

  • How to convert ascii to character

    how to convert ascii to character is there any function module or any code.plz help me in finding this.

    Hi,
    please go through this
    If I give input as 65 (ascill value) I want display 'A'.
    Below logic is for convert from character to ascii value.
    report Ascii_convert.
    *Going from A to 65
    data : c value 'A'.
    field-symbols : <n> type x.
    data : rn type i.
    assign c to <n> casting.
    move <n> to rn.
    write rn.
    *Going from 66 to B
    data : i type i value 66.
    data : x type x.
    field-symbols : <fc> type c.
    move i to x.
    assign x to <fc> casting type c.
    move <fc> to c.
    write c.
    i hope this will help you ,
    Raja T

  • How to convert the character value to currency/numeric

    Hi,
    See the sample code here
    data: v_qtr_field(7).
    data: w_low_limit like glt0-kslvt,
          w_amount like glt0-hslvt.
    w_low_limit = 02.
    w_max_period = 3.
    concatenate 'HSL' w_low_limit into v_qtr_field.
    *comment
    *I am looking for a field formation thru above code like in GLT0 table like HSL02,HSL03 *etc based on the value user entered in the selection *screen
    DO w_max_period TIMES
      VARYING w_amount FROM v_qtr_field NEXT v_qtr_field + 1.
       t_trans_values-dmbe2 = t_trans_values-dmbe2 + w_amount.
      ENDDO.
    I am facing problem in the Do loop as it wont allows multiple data types. can you suggest me how to convert the v_qtr_field whose data type is character to currency?

    Hi,
    Please check this code .
    PERFORM write_currency
                  USING buf_anla-urwrt t_dates-waers t_txw_anla-urwrt.
    *       FORM WRITE_CURRENCY                                           *
    *       convert currency amount to string                             *
    *       - use decimal point                                           *
    *       - remove separator characters                                 *
    *  -->  P_AMOUNT                                                      *
    *  -->  P_CURRENCY_UNIT                                               *
    *  -->  P_STRING                                                      *
    FORM WRITE_CURRENCY
         USING P_AMOUNT        TYPE P
               P_CURRENCY_UNIT LIKE TCURC-WAERS
               P_STRING        TYPE C.
      DATA: DEC2POINT(2) TYPE C VALUE ',.'.
    * convert separator to decimal point
      WRITE P_AMOUNT TO P_STRING CURRENCY P_CURRENCY_UNIT
            NO-GROUPING
            NO-SIGN
            LEFT-JUSTIFIED.
      TRANSLATE P_STRING USING DEC2POINT.
    * put minus sign before number
      IF p_amount < 0.
        SHIFT P_STRING RIGHT.
        P_STRING(1) = '-'.
      ENDIF.
    ENDFORM.
    <i>Hope This Info Helps YOU.</i>
    Regards,
    Lakshmi

  • How to convert an ascii file into dBase .dbf file type

    Does any one out there know how to convert an ascii file(which is generated from PL/SQL script) into a .dbf (dBaseIII) file type? Thanks in advance.

    I haven't worked with dBase for about 20 years, but I seem to recall it having an IMPORT command for that purpose. But maybe I'm wrong...

Maybe you are looking for