Converting Char  type  structure to Hex type structure

Hello ,
         In unicode system how to convert char type structure to hex type structure . I am having structures as follows :
DATA: BEGIN OF HEXBYTE,
  X TYPE X,
  END OF HEXBYTE.
DATA: BEGIN OF CHARBYTE,
  C TYPE C,
  END OF CHARBYTE.
HEXBYTE-X = CHARFIELD.
CHARBYTE = HEXBYTE.
But error coming is Charbyte and HexByte are not compatible . Plz suggest!!
Thanks ,
Keith

Hi,
These function modules are:
NLS_STRING_CONVERT_TO_SYS (hex to char)
NLS_SRING_CONVERT_FROM_SYS (char to hex)
Regards,
Nikhil

Similar Messages

  • Converting char type to numeric

    hi,
    is there any Function Module that converts char type to numeric.
    thanks.

    hi,
    data : w_num type i,
             w_char type char10.
    Use can asign character to numeric in PGM by using the statement try endtry.
    try .
    w_num = w_char.
    endtry.
    Regards,
    Prabhudas

  • Converting CHAR type to other data types

    Dear SDN users,
    would any of you know how to convert a CHAR data type to other data types for example hexadecimal etc., and convert them back? I suspect there must be some standard FMs available.
    Thankyou for your responses.
    Regards,
    Smitha

    Hello smitha ,
        I suppose you are assigning some  variable of char type to a variable of integer type it will automaticaly (implicitly ) convert the type .
    in some case we need to change the type explicitly like the above mentiioned .
    Thanks and regards ..
      Priyank

  • Jni: converting char* to JNI type?

    In my native C++ code I have to call a function through another dll. This function has an OUT parameter which is of type: char *.
    I need to return this parameter to the calling Java method through the native C++ code using JNI ...is the corresponding JNI type that i should be returning jcharArray or jstring??
    If so, how do I convert char * to the jcharArray/jstring type.

    Things may not be that simple. Beware that this function dos not expect any kind of char* . It expects UTF-8-encoded string.
    it means that if your C string is all basic (i.e <127) chars, it is ok.
    but if you have some special characters ( where ascii code > 128), it may not be interpreted the way you want.
    see the end of http://java.sun.com/j2se/1.3/docs/guide/jni/spec/types.doc.html
    for more details.

  • Convert decimal to char type

    Hi all,
    How to convert decimal type length 3(e.g:25.0) to char type.......
    Thanks in advance

    hi,
       data : var_dec type p decimals 3,
              var_char(10).   
    <b>move var_dec to var_char.</b>
    else use FM
          CALL FUNCTION <b>'CEVA_CONVERT_FLOAT_TO_CHAR'</b>
               EXPORTING
                    FLOAT_IMP  = P_ORIGEN
                    FORMAT_IMP = CAMPO_FLOAT
               IMPORTING
                    CHAR_EXP   = C_DESTINO.
    Regards,
    Santosh

  • Convert p type into c type

    hii experts,
    i have a structure.
    In that i use
    V(8) TYPE P.
    but when i save the file it gives dump.
    it needs TYPE C.
    so how i convert tthat PACKED type inco CHAR type.
    Please provide me the code.
    thanks
    babbal

    Hi,
    do like this.
    data : v_num(8)  type p,
              v_num1(8) type N,
             v_num2(8) type c.
    v_num1 = v_num.
    v_num2  = v_num1.
    Regards
    Sandeep REddy

  • Problem with converting data types

    Hi Experts,
    I am stuck up with a little problem, i need your help
    i am converting all the data types to CHAR but i am not getting the expected data out.........
    My code is as below...where do i go wrong...
    LOOP AT <T_ITAB> ASSIGNING <FIELD>.
    DO.
       ASSIGN COMPONENT SY-INDEX OF STRUCTURE <FIELD> TO <RECORD>.
       IF SY-SUBRC = 0.
          LV_FIELD = <RECORD>.
          N = STRLEN( LV_FIELD ).
          IF N = '8'.
               IF LV_FIELD IS NOT INITIAL.
                      LV_DATE = LV_FIELD.
                      CALL FUNCTION 'DATE_CHECK_PLAUSIBILITY'
                              EXPORTING
                              DATE                     = LV_DATE
                             EXCEPTIONS
                                    PLAUSIBILITY_CHECK_FAILED = 1
                                    OTHERS                     = 2.
                             IF SY-SUBRC <> 0.
                                     MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                                     WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
                             ENDIF.
                         IF SY-SUBRC EQ 0.
                            CONCATENATE LV_FIELD+6(2) LV_FIELD+4(2) LV_FIELD+0(4) INTO LV_FIELD SEPARATED BY '.'.
                        ENDIF.
                ENDIF.
             ENDIF.
                IF LV_RECORD IS INITIAL.
                         LV_RECORD = LV_FIELD.
                ELSE.
                       CONCATENATE LV_RECORD LV_FIELD INTO LV_RECORD SEPARATED BY '  * '.
               ENDIF.
           ELSE.
         EXIT." DO
        ENDIF.
       ENDDO.
      APPEND LV_RECORD TO LT_OUTPUT.
    CLEAR LV_RECORD.
    ENDLOOP.
    THE TABLE LT_OUTPUT     LIKE     THENV(CHAR 255)
    My output looks some thing like this:
    04  36876   15.09.2011  39600   1999
    06  36960   15.09.2011  39600   2632
    07  36874   15.09.2011  39541   9232
    My expected output
    04    36.876  15.09.2011    39.600  1.999
    06    36.960  15.09.2011    39.600  2.632
    07    36.874  15.09.2011    39.541  9.232
    Regards
    sam

    At run time you can see all the data........ like what i have shown...
    but if you clearly see, DATE will be in the internal format..but if you print it, it will be in dd:mm:yyyy
    can you suggest me if i have a dynamic field symbol (table data) ,,,, How can i convert data types dynamically..
    if it is a static internal table i am achieving with WRITE TO statement.....but i have huge data in field symbols...
    Instead of all these , please specify the exact problem your are facing . What is it with date field ? . In SAP while printing the internal format will be converted to external. What is your requirement with this date field?
    My output looks some thing like this:
    04 36876 15.09.2011 39600 1999
    06 36960 15.09.2011 39600 2632
    07 36874 15.09.2011 39541 9232
    My expected output
    04 36.876 15.09.2011 39.600 1.999
    06 36.960 15.09.2011 39.600 2.632
    07 36.874 15.09.2011 39.541 9.232
    I dont see any problems mentioned in your date field. Both your actual and expected outputs reflects the same in date field.
    In SCN you will only get solutions if your question is precise.
    Kesav

  • Unicode Program : # is appearing for data types declared as char type

    Hi friends,
    I have copied one program on unicode system to unicode system. As only char type data types are allowed, i converted structure EP to char type only. Now during execution it is giving dump because it is showing value as '#' for 2 fields whos original data type was P and currency. How shall i convert them? Any suggession will helpful.
    Abhijit

    Hi Sandeep,
    This is my piece of code : Initially structure EP was used in read dataset which is of different datatypes. so i created similar structure ep_c with data type as char. As u suggested, i  tried to declare field BETRG as type currency. Then also it gave dump. (Runtime errors: UC_OBJECTS_NOT_CHARLIKE). For 2 fields BETRG and POHRS which is of currency and dec type originally, i am getting values as '#' causing in dump. In non unicode program both fields have values as '0.00' If i put these values in debugging then after execution, program comes to selection screen! Kindly advise.
    Data : komok(2) type c,
           betrg(18) TYPE c,
             betrg type betrg,
             pohrs(10) type c.
    open dataset seq-in for input in text mode encoding default ignoring conversion errors.
          if sy-subrc = 0.
            do.
              read dataset seq-in into ep_c.
              case sy-subrc.
                when 0.
                  move :ep_c-id to ep-id,
                        ep_c-text to ep-text,
                        ep_c-abkrs to ep-abkrs,

  • Field UMSA1 cannot be converted in type CURR - long Text

    Hi All,
    I am getting the following error
    Error records written to application log
    Error in an arithmetic operation in record 489
    Record 489:Contents 四川省长江滥曝扇备总 from field UMSA1 cannot
    Record 489 :Contents 四川省长江滥曝扇备总 from field UMSA1 cannot be converted in type CURR ->lo
    This happened for the customized master data Z********(customer number). Data source; 0CUSTOMER_ATTR
    I have undertaken the following actions but all failed.
    1. Replicated the data source, activated the transfer structure through a program and the load was run but the load failed with the same issue.
    2. Pushed the data till PSA and tried to edit it in the PSA, but here too the load failed with the same issue.
    It is understood that the data source 0CUSTOMER_ATTR is obtained from the Funtion Module: MDEX_CUSTOMER_MD
    Out of 5 data packages, I could find only 3 data packages in PSA which are successful, the remaining had error and could not be found in PSA. Checked in R/3 but could not catch the correct record, since, did not had proper info. UMSA1 refers to Annual Sales, which are empty in R/3 and BW as well.
    The UMSA1 field in data source 0CUSTOMER_ATTR in BW.
    Data Type: CURR, Length: 15, Decimal: 2, curr/unit: UWAER
    The UMSA1 field in R/3
    Data Type: CURR, Length: 15, Decimal: 2
    Request your timely suggestions.
    Raj

    Dear Veerandra,
    I have already checked in R/3 as you had mentioned. But as I said earlier, could not catch the correct record, since, did not had proper info. UMSA1 refers to Annual Sales, which are empty in R/3 and BW as well.
    I have undertaken the following actions but all failed.
    1. Replicated the data source, activated the transfer structure through a program and the load was run but the load failed with the same issue.
    2. Pushed the data till PSA and tried to edit it in the PSA, but here too the load failed with the same issue.
    It is understood that the data source 0CUSTOMER_ATTR is obtained from the Funtion Module: MDEX_CUSTOMER_MD
    3. Error Handling option.
    Regards.
    Raj

  • HOW TO TRANSFER DATA FROM CHAR TYPE TO NON CHAR TYPE

    HI EXPORTS,
             THIS IS SASIDHAR, I HAD UPLOADED DATA FROM FLAT FILE INTO DYNAMICAL INTERNAL TABLE NAME <T_UPLOAD>. THIS INTERNAL TABLE FIELDS ARE CONVERTED INTO CHAR TYPE FIELDS. NOW I HAVE TO TRANSFER THIS DATA INTO ANOTHER INTERNAL TABLE  <DYN_TABLE> WHICH CONTAINS BOTH CHARACTER AND NON CHARACTER FIELDS. PLEASE ANY ONE GUIDE ME REGARDING THIS ISSUE.
    THANKS AND REGARDS
    SASIDHAR.V

    there is no specific CASTING operation in ABAP, so just do following:
    non-char-field = char-field.
    as long as it is possible ABAP does implicit casting and you dont have to care about anything.

  • Cannot be converted in type DEC,CURR - longtext

    Dear,
    When we are loading the data to the targets, we are getting the errors in the Transfer rules like mentioned bellow
    Info source 0EC_CS_1 (Transaction Data for Consolidation)
    Status (tab) :
    Technical : Collection in source system ended
    Processing Step : Processing End
    Details (tab):
    Processing end : Errors occurred
    Error records written to application log
    Error in an arithmetic operation in record 1
    Record 1 :Contents 00 0.0000000 from field PCNT1 cannot be converted in type DEC ->longtext
    Info source 0CO_OM_CCA_9 (Cost Centers: Actual Costs with Delta E)
    Record 39952:Contents 048624.95- 1 from field SWF cannot be converted in type CURR ->longtext
    Kindly help.
    Thanks & Regards,
    Kiran A
    Edited by: Kiran A on Mar 21, 2010 10:23 AM
    Edited by: Kiran A on Mar 21, 2010 11:36 AM

    Hi,
                   It is sure some where in transferrules the mapping wasdone wrongly , like char --char of info object but in ur case some where data element is not same for field and info object.
      check throughly transfer rules correctly field level and infoobject mapping  and activate.
    it is some where currency and unit fields the difference is there for data elements
    Thanks&Regards,
    Sathish
    Edited by: sathish kakumudi on Mar 21, 2010 4:01 PM

  • Trying to drag pdf files i have and combine them into one pdf file in the account i just purchased with Adobe. when i drag a pdf file over Adobe doesn't accept it. says it can not convert this type of file. but it is an Adobe file. Do I need to change it?

    Trying to drag pdf files i have and combine them into one pdf file in the account i just purchased with Adobe. when i drag a pdf file over Adobe doesn't accept it. says it can not convert this type of file. but it is an Adobe file. Do I need to change it in some other form befor dragging it?

    Hello djensen1x,
    Could you please let me know what version of Acrobat are you using.
    Also, tell me your workflow of combining those PDF files?
    Please share the screenshot of the error message that you get.
    Hope to get your response.
    Regards,
    Anubha

  • Cannot convert ÿØÿà of type class java.lang.String to class BFileDomain.

    Hi All,
    I am using Jdeveloper 11.1.2.3.0.
    I have a scenario of making an ADF page where I have a IMAGE field to show on the page. So,I have a table called "PRODUCT" with fields called photo with BFILE type. Now when I the data i have inserted using the DML command and i can see the path at the backend.
    However,when i am runnig my ADF page in the Filed called "PHOTO" I can only see a junk character stating 'yoyo'.
    When I click on it, it says ERROR "Cannot convert ÿØÿà of type class java.lang.String to class oracle.jbo.domain.BFileDomain".
    Your help will be appreciated ASAP.
    Regards,
    Shahnawaz

    Hi,
    did you show the id-value in the user interface as a input-component, and did the input-component include a converter?
    If yes, show the id as output-text and remove any existing converter-components.
    Best Regards

  • Error converting data type nvarchar to numeric 'witholding tax' (OWHT)

    Hi Guys.
    After I have upgraded my clients 2007 PL 30 database to 8.81 PL05, and running a repair to fix inconsistincies, I am receiveing some error when opening any sales documents.
    It takes place when I open a sales document, or browse previous docs. When browsing previous docs, it onlly happens on some of them.
    I also receive a different error when viewing sales orders: Error converting data type nvarchar to numeric (CRD2).
    Any ideas how to fix it?
    It does not limit me from processing and using the rest of the functionality. All calculations with queries in the docs are still working.
    Thanks.

    Hi,
    Please check Note No. : 1402855 and see if the same applied to the issue mentioned by you.
    Kind Regards,
    Jitin
    SAP Business One Forum Team

  • How can I use jbo:InputSelect for a char type filed?

    How can I use <jbo:InputSelect for a char type filed?
    I have two tables. One is room (primary key is room(type is char)), another table is responsibility (foreign ker is room(type is char)). Both tables have same length for room column.
    There is a problem:
    If I use (in the "DataEditComponent.jsp" file)
    <jbo:InputSelect multiple="false" datasource="dsEdit" displaydatasource="roomData" displaydataitem="ROOM" displayvaluedataitem="ROOM" ></jbo:InputSelect>
    to get the room input for responsibility from combobox(Datasource roomData is from room table). In the form the room field cannot bind the data in combobox, alway select the first item. And if I select one item and click the update button.There is an error message:
    Error Message: JBO-27010: Attribute set with value H409 for Room in Responsibility has invalid precision/scale
    I found If I changed the field type from char to varchar2 in database also change the entity objects, it works well. I wonder if there are any diffrence using <jbo:InputSelect tag in char and varchar2 type. How can I use <jbo:InputSelect for a char type filed as i don't want to change my datatype in database at this stage.
    I try this in JDeveloper 9.03, 9.034, 9.04. The result is the same.

    If I were in your shoes, here's how I would do it:
    <%-- Assuming you have dsRoom and dsResponsibility --%>
    <%-- Select is an HTML tag --%>
    <select name="ROOM" size="1">
    <% char roomID =""; // Init your character var
    // Open a rowsetIterator to get the records and add them to the LOV
    <jbo:RowsetIterate datasource="dsResponsibility" changecurrentrow="true" >
    <% roomID = (char)dsResponsibility.getRowSet().getCurrentRow().getAttribute("ROOM"); // Grab the char value
    // add the value to the LOV
    %>
    <option value="<%=roomID%>"><%=roomID%></option>
    </jbo:RowsetIterate>
    </select>
    If you are using this as part of an edit page you may want to utilize the "selected" option of the <option> tag. In one instance I am doing this on an edit page because the use may open an existing record. If I don't account for it, then it will change the DB to contain the first value from the list! You can do a simple check like:
    //Set the current record's char
    char curRecord = (char)rowEdit.getAttribute("ROOM");
    // inside the iterate:
    if (curRecord == roomID) {
    <option value="<%=roomID%>" selected><%=roomID%></option>
    } else {
    <option value="<%=roomID%>" ><%=roomID%></option>
    Hope that helps!

Maybe you are looking for

  • Why can't I enable disk use on my Ipod touch?

    I wish to use my ipod touch as an external hard-drive. I have watched videos on how to go about it and they show that there is a greyed out check box that must be checked. This check box does not exist for me. Why not? and is it possible to enable di

  • How do I get high def movie from my iphone 4 to my television?

    I purchased an Apple Composite cable to connect to my television with my iPhone 4 so that I could play my HD movie to my television. It does not work, if only shows in SD. I do not have internet in my house so the Apple TV is out. Please help!

  • Emailing Keynote files

    Hi I cant email my keynote files to a college overseas. When I attach the file it is not attaching the Package contents but just the keynote file name. I can of course export to powerpoint but this never seem to work seamlessly without text realignin

  • Fm to read item notes

    Hi Experts, Is there any FM which can read the item long text for any Shopping cart and give the output in string format. The problem with BBP_PD_SC_GETDETAIL FM is its split in multiple lines based on guid. Is there any Fm which can convert the outp

  • Configurator 3 Panels Cause Issue in Photoshop CS6 for Windows 8

    I've come across an issue in Windows 8 when creating panels with Configurator 3 for Photoshop CS6.  I hope there is a solution. After I create and install any panel from Configurator 3 for Photoshop CS6, working on a Windows 8 machine, the speed of c