Converting Char to raw

I have a password column of datatype raw.
I want to check if a password (typed in varchar2, length 8) is correct, so I need to convert the charstring to a raw. Can you tell me what to do?

Hi Neil,
I tried this but I'm still having problems. What I'm actually doing is converting a sapscript form to pdf which is used via the portal. 
I used CONVERT_OTF_2_PDF to get data into I_TLINE
      CALL FUNCTION 'CONVERT_OTF_2_PDF'
           IMPORTING
                bin_filesize   = v_iw18_binsize
           TABLES
                otf            = i_itcoo
                doctab_archive = i_docs
                lines          = i_tline.
I then move the data from I_TLINE into I_SOLI.
If I use the MOVE statement to assign data into XTAB, I get this error 'File does not begin with %PDF-.
  LOOP AT i_soli.
    move i_soli-line to xdata-adatar.
    APPEND xdata.
  ENDLOOP.
When I tried your suggestion, I get this error 'The specified document is not applicable to the current item'.
In 46C, even if I just
      xdata[] = i_soli[]
everything is working properly.

Similar Messages

  • Convert char to currency

    Hi all,
    i searched alot but couldn't find solution.
    i have l_value char(45) field value has 4560
    I need to convert this into vbak-netwr field in sales order user exit MV45AFZZ
    when i assign vbak-netwr = l_value.
    I am getting 45.60 in vbak-netwr field.
    when i try same login in report progam it is working fine but not in user exit.
    any suggestions?
    Giri

    Sample program to convert Char to Curr.
    data: curr type kna1-umsa1,
          char(254) type c.
    data: temp type p length 15 decimals 2.
    char = '1,405.25'.
    REPLACE ALL OCCURRENCES OF '.' IN char WITH space.
    REPLACE ALL OCCURRENCES OF ',' IN char WITH space.
    CONDENSE char NO-GAPS.
    temp = char.
    curr = temp / 100.
    write: 'CHAR = '.
    write :/ char.
    write:/ 'CURR = '.
    write: curr.
    << Removed by moderator >>
    Regards,
    Uttam Agrawal
    << Removed by moderator >>
    Edited by: uttamagrawal on Feb 22, 2011 9:21 AM
    Edited by: Neil Gardiner on Feb 22, 2011 9:01 PM

  • Convert Char to Date format - Evaluate

    Hi,
    Could anyone provide us the Evaluate formula to convert Char to Date format
    2009-06-20 should be converted to 06/20/2009
    Regards,
    Vinay

    Hi,
    Refer the below threads...
    Re: How to convert string to date format?
    how to convert character string into date format????
    Regards,
    Chithra Saravanan

  • Convert char to ascii code and vice versa

    HI
    Is there any function module to convert char to ascii code and vice versa.
    Thanks in advance

    Hi,
    be careful if you have unicode running in your system. URL_ASCII_CODE_GET is platform-dependent so it will return the internal HERX representation of the character in your system - which is hopefully and in most cases ASCII.
    Under unicode, we use double-byte characters here. I tried this function and the result CHAR_CODE is '00' regardless what character I specify for TRANS_CHAR. But the coding is so simple I corrected resultig in this sample code:
    [P]
    convert p_form to ASCII (internal) representation
      DATA:
        l_ofs TYPE syfdpos,
        l_len TYPE sy-linsz,
        l_ascii TYPE i.
      FIELD-SYMBOLS:
        <x> TYPE x.
      l_len = STRLEN( p_ascii ).
      DO l_len TIMES.
        l_ofs = sy-index - 1.
        ASSIGN p_ascii+l_ofs(1) TO <x> CASTING.
        l_ascii = <x>.
        WRITE: l_ascii.
      ENDDO.
    [/P]
    Here, for each character of string p_ascii, the internal (ASCII) representation is determined and written to the output list.
    Regards,
    Clemens

  • Convert Char to Date in SQL Server

    Hello Experts,
    I am trying to convert Char to Date but getting error in Universe designer. Can anybody advise please?
    Thanks,
    Ravi

    Hi,
    Try with CAST() and CONVERT() functions. For more information refer use this url : http://msdn.microsoft.com/en-us/library/ms187928.aspx.
    It is more easy to get solution if you can post your query.
    Cheers,
    Suresh Babu Aluri.

  • Convert char to dec

    Dear all ,
        I have to convert char to dec , my requirement is to covert  12344434 to 123444.34 .
    note i don't want 12344434 to 12344434.00 .
    Thanks in advance
    Debesh

    You can try like this.
    DATA : v_tot_len TYPE i,
            v_off_len TYPE i.
    DATA : v_off_text(50) TYPE c,
            v_dec_text(2)  TYPE c,
            v_fin_text(50) TYPE c.
    PARAMETERS : p_input TYPE text20 OBLIGATORY.
    START-OF-SELECTION.
    v_tot_len = STRLEN( p_input ).
    v_off_len = v_tot_len - 2.
    v_off_text = p_input+0(v_off_len).
    v_dec_text = p_input+v_off_len(2).
    CONCATENATE v_off_text v_dec_text INTO v_fin_text SEPARATED BY '.'.
    Here I am inputting the text to be converted.

  • Convert char * to LPCTSTR

    How I can convert char * to LPCTSTR.
    I reading msdn but I don't know nothing sensible to do.
    Thx for all hepl.

    If your program is not using Unicode as the default, then "char *" is the same thing as LPCTSTR; the compiler will see the same thing, the only difference is that the preprocessor replaces LPCTSTR with "char *".
    Your program however is probably using Unicode as the default. If so, then you need to convert the non-Unicode "char *" string to a Unicode string. There are many ways to do that and the most convenient solution for you depends on what your program is already using. If your program is using MFC then there is a MFC solution. If your program is using the CLI (.Net) then there is a different solution using that. If your program uses the C++ standard classes (std namespace) then there is a solution using that. There is also a solution using the C runtime and anotehr using the Windows SDK.

  • Function modules for converting Char value to hexadecimal value

    Hi All,
    Function modules for converting Char value to hexadecimal value.
    Thanks in advance

    Hi,
    use this function module:
    <b>RSS_UNIQUE_CONVERT_TO_HEX</b>
    regards
    Debjani
    Rewards point for helpful answer

  • How can I convert from Modbus raw data to engineering units using a formula?

    Within Lookout, I have several Modbus numerical input types that do not have a linear corespondence to the Engineering values they represent.  How can I display these values accurately using a formula to convert from the raw data to an engineering value?

    I don't quite understand your reply.  I'm using Lookout 6.0.2, logged in as Administrator, in Edit Mode.  The Modbus object is named RTU06_SAV.  The Active member is 30002 with an alias of SAVfmSMT_RSL.
    Following your instructions, I opened Object Explorer and right-clicked on RTU06_SAV. 
    This opened a menu containing:  Refresh, Cut, Copy, Rename, Delete, Edit connections..., Edit Data Member Configuration, Configure Network Security and Properties.
    I assumed that I should select Edit Data Member Configuration, but maybe I'm wrong. 
    Within Data Member Configuration I can set up Linear Scaling between Raw data and Engineering data.  I know how to do that, but what I need to know is how to convert Raw data to Engineering data using a formula representing a non-linear transformation (such as a converion to a logarithmic value or perhaps a formula derived by fitting the formula to a curve on a calibration chart).
    Once I have this my Engineering data can be represented on a control panel as both a numeric value AND as a correctly reading Gauge.  It can also be properly represented on a HyperTrend graph.
    What do you suggest?

  • Converting CHAR or CLOB to BLOB in Oracle9i

    Hi!
    I want to convert CHAR or CLOB to BLOB.
    I am working with Oracle9i Database.
    Oracle9i Supplied PL/SQL Package Release 2 (9.2) does'nt support DBMS_LOB.CONVERTTOBLOB procedure.
    How I can convert CHAR or CLOB to BLOB in Oracle9i?
    Valery

    Hi Valery,
    For conversion to blob, just try the utl_raw package.
    I use utl_raw.cast_to_raw quite often.
    Or have a look at:
    http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:437819871174
    Good luck,
    Jan-Marcel

  • How to convert char to curr ?

    Hi gurus.
    Forgive me for the silly question.
    I have a problem with data conversion from char to curr with 2 decimal places.
    This is the scenario, I have a Z transaction which receives an excel file containing data from invoices and when the field contains a value such as 35,0 the program records the value 3.50 in the destination variable. But when the value is 35,45, it works.
    Here is the piece of code:
    WHEN '0007 '.
            TRANSLATE USING ITAB-VALUE. " '.
            ITAB-VALUE USING TRANSLATE',.'.
            CONDENSE ITAB-VALUE NO-GAPS.
            WA_OPER_MENORES-VL_BRUTO = ITAB-VALUE.
    If I format the column in the excel file for numeric value with 2 decimal places also works, because when the value is formatted 35,0 change to 35,00. But I can not tell all the users hey formatt your files before upload to SAP.
    To test I generate a simple report that reads the excel file and makes the conversion of the columns, like the code above, so I had no problems. I think there should be some configuration that has been changed in the transaction, but I'm new in ABAP, I come from "Java World" and I have no idea that could be.
    I could just use a quick and dirty solution, adding a zero at the end of the column, when there is the 2 decimal places, but I prefer a clean solution.
    Guys, is there any function module or class that does that kind of data conversion? If not, you could tell me what is the best practice to solve this problem?
    thank you very much,
    Ronaldo S. Vieira

    Follow this example to convert Char to Curr and Vice-Versa
    DATA iamnt(17) TYPE c VALUE '243567.00'.
    DATA eamnt TYPE p DECIMALS 2.
    DATA oamnt(17) TYPE c.
    MOVE iamnt TO eamnt.
    WRITE eamnt TO oamnt.
    WRITE oamnt.

  • JNI: Converting char* to jstring

    Hello all, i was wondering if there is another alternative to
    env->NewStringUTF(ajstring);in converting char* to jstring as NewStringUTF causes my app to crash.
    thanks

    Have you tried debugging the application to see why exactly that method is crashing?
    Finding alternatives is not a solution, there is a problem here that you need to figure out. Are you sure env is valid? Are you sure ajstring is a valid string (null-terminated for example)?

  • How to convert char(1) to int32 datatype in pl/sql

    Hello,
    I am trying to convert char(1) to an integer data type to be put into an int32 variable in C#. I tried several options such as TO_NUMBER ,CAST(.. AS INTEGER), and CAST(.. AS SMALLINT) but they all return int64.
    Is there a way to ensure the casting into a datatype that is compatible with int32 ?
    Thanks

    Oracle's SQL Datatypes are limited to NUMBER, BINARY_FLOAT and BINARY_DOUBLE.
    There's a few others through PL/SQL including BINARY_INTEGER.
    If you look in USER_ARGUMENTS you can see it is defined slightly differently.
    Don't know whether / how .Net infers datatypes, but it is worth a shot.
    create or replace function v (p number) return  binary_integer is
    begin
    return p;
    end;
    /

  • Converting PDF to RAW for display in the portal

    Hi all,
    We have an application that took a pdf and converted it into a raw datastring to pass to the portal for display purposes.
    We have migrated this function to a unicode system and are now struggling to get this to work.
    Code in non-unicode system
    CALL FUNCTION 'CONVERT_OTF_2_PDF'
        IMPORTING
          bin_filesize   = e_filesize
        TABLES
          otf            = lt_otf
          doctab_archive = lt_doctab_archive
          lines          = lt_pdf.
      LOOP AT lt_pdf INTO wa_pdf.
        CLEAR et_pdf.
        MOVE wa_pdf TO et_raw.
        APPEND et_raw.
      ENDLOOP.
    Now in the unicode system.
    CALL FUNCTION 'CONVERT_OTF_2_PDF'
        IMPORTING
          bin_filesize   = e_filesize
        TABLES
          otf            = lt_otf
          doctab_archive = lt_doctab_archive
          lines          = lt_pdf.
        FIELD-SYMBOLS: <x_wrk_line> TYPE rmps_raw134,
                       <x_struc> TYPE xstring.
        DATA: buffer1 TYPE xstring,
              conv TYPE REF TO cl_abap_conv_out_ce.
    Convert PDF to RAW Type
      LOOP AT lt_pdf INTO ls_pdf.
        CLEAR et_raw.
        MOVE ls_pdf TO lv_pdf_line.
        ASSIGN buffer1 TO <x_struc> CASTING.
        ASSIGN et_raw-rawline TO <x_wrk_line> CASTING.
        conv = cl_abap_conv_out_ce=>create(
               encoding = 'UTF-8'
        conv->convert( EXPORTING data = lv_pdf_line
                       IMPORTING buffer = buffer1 ).
        <x_wrk_line> = <x_struc>.
        APPEND et_raw.
      ENDLOOP.
    If we simply download the pdf after we have tun the  'CONVERT_OTF_2_PDF' Fm the pdf created is fine.  However when we view the output in the portal of the pdf (as streamed in the raw format) we just get chinese looking (they may well not be any language) characters in the pdf. 
    With a non-unicode R/3 system the pdf was displayed without any issues in the portal.
    Any help appreciated.
    Thanks,
    Paul

    Hi, could you kindly share the complete set of this conversion? i also need similar requirement.
    thx so much.
    regards,
    Rudy.

  • Converting NEF (Nikon RAW) to DNG results in error message

    I'm trying to convert the NEF (raw) images off my Nikon d90 to DNG to import and work with in PS CS2. Using the DNG Converter tool, having made my settings and pressing "Convert", I get an error for all the 54 files in the selected folder. "An error occurred when the file was analyzed" (roughly translated).  DNG Converter settings: JPEG preview: Medium size Compression: Lossless compression Keep Raw image Do not embed Raw image  I tried with all the different settings though and get the same error message. I was able to convert the images to JPEG with Nikon's native tool, so I thought the NEF files were alright, but it seems something about them is corrupted?  I'm on a one year old Dell Inspiron 1721 with an ATD processor with Vista Home Premium (32bit) and a legal copy of Photoshop CS2.

    The DNG converter version was 3.7. I downloaded the version that was listed under Photoshop CS2 here: http://www.adobe.com/support/downloads/product.jsp?product=39&platform=Windows since that's the version I have.
    Tried downloading & installing 5.4 and everything works like a charm.
    Sorry for the trouble, it was that list that confused me, thought it wouldn't work with the later version.

Maybe you are looking for