Data type conversion issue

Trying make the parent-child hierarchy to work, where all the keys in the dimension table and parent-child closure table are RAW ( VARBINARY(16) in admin tool)
In BI Answer, when parent-child logical dimension is used with the fact table, got the following error message:
Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 43119] Query Failed: [nQSError: 46035] Datatype(VARBINARY) nullable(0) unicode(1) external char(0) conversion to datatype(VARCHAR) nullable(0) unicode(1) external char(0) is not supported. (HY000)
SQL Issued: SELECT 0 s_0, "Chargeback"."Target Instance"."Target Name" s_1, CASE WHEN ISLEAF("Chargeback"."Target Instance"."H51 Target Instance") THEN 1 ELSE 0 END s_2, IDOF("Chargeback"."Target Instance"."H51 Target Instance") s_3, PARENT("Chargeback"."Target Instance"."H51 Target Instance") s_4, "Chargeback"."Base Facts"."Charge" s_5 FROM "Chargeback" WHERE ISROOT("Chargeback"."Target Instance"."H51 Target Instance")
Two questions:
1. The column with the conversion problem is not listed in the error message. How to find out the column with the problem?
2. The SQL listed is not the final text send over to database. How to find out the actual query send over to the database? (Tried EM console, and searched for trace message for bi server, but could not find it there)

Srix, thanks for the reply.
The query is generated by the tool, so it takes some understanding of the internals to make it work. By 'casting the column' do you mean changing the datatypes in the RPD file? If yes, change on the logical table metadata or the physical table metadata? ?

Similar Messages

  • Data type conversion issues between Oracle and SQL Server

    Hi there, I am using Heterogeneous Services to insert into a SQL Server database. I am running into an issue between data types regarding Oracle's VARCHAR2 and trying to insert that into a SQL Server MONEY data type. I tried using the TO_NUMBER() function to convert my VARCHAR2 to a number, but that didn't seem to help.
    Does anyone have any advice on how to work around this??
    Thanks for any help,
    ivalum21

    ORA-02047: cannot join the distributed transaction in progress
    ORA-06512: at "MY_PACKAGE_NAME", line 263
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [Generic Connectivity Using ODBC]DRV_Execute: DB_ODBC_ENGINE (1645): ;
    [Microsoft][ODBC SQL Server Driver][SQL Server]Disallowed implicit conversion
    from data type varchar to data type money, table 'tableA',
    column 'total_amount'. Use the CONVERT function to run this query. (SQL
    State: 37000; SQL Code: 260)
    ORA-02063: preceding 2 lines from SQLSERVER_LINK
    ORA-06512: at "RCDTPUMP.CAMPUSCALL_DATAPUMP_UNI", line 875
    ORA-06512: at "RCDTPUMP.CAMPUSCALL_DATAPUMP_UNI", line 791
    ORA-06512: at "RCDTPUMP.CAMPUSCALL_DATAPUMP_UNI", line 1156
    ORA-06512: at line 1
    That is what I get when I take out the TO_NUMBER()
    Message was edited by:
    ivalum21

  • Invalid data type conversions

    what are the invalid data type conversions in ABAP ???
    Moderator message: please search for available information/documentation.
    Edited by: Thomas Zloch on Mar 10, 2012 6:01 PM

    No Amanda,
    The values that I see in message monitor are also those that comes to XSLT programs as input.
    I investigated our problem a little further myself:
    1) XI always converts messages into XML format - this everybody knows.
    2) In XI documentation it is declared that XI uses ISO 8601 for DATE type formatting. That's why you see dates in format YYYY-MM-DD in XML data in message monitoring.
    3) The appearance of those decimal values are not that obvious for me. If XI uses ABAP transformation for message content then applies the rules for converting ABAP data types into XML. For this there is a SAP document 'ABAP - XML mapping' from TechEd2004. This document seems to describe how ABAP data types are handled by XML transformation.
    Anyway, we currently need to play with decimal values in XSLT mapping programs inside XI:
    a) add leading 0 integer if source value < 1
    RFC returns 0.123 -> XI converts to XML '.123' -> XSLT mapper should return '0.123' ->SOAP response returns '0.123'
    b) add decimal point and trailing zeros
    RFC returns 0.000 -> XI converts to XML '0' -> XSLT mapper should return '0.000' ->SOAP response return '0.000'
    With dates, the problem is actually on documenting mapping rules when writing interface specifications. If you would write an EAI-solution-independent conversion rule (RFC/date->SOAP/char) for date field it could sound like: YYYYMMDD -> dd.mm.yyyy. This works semantically between these systems but would not work for XI-developer, because he get YYYY-MM-DD from the RFC.
    Additionally the decimal type conversion requirements in XSLT mapping programs probably only applies XI and are therefore not reusable in other EAI environments.
    I would be glad if somebody would still have further comments for this data type conversion issue.
    br: Kimmo

  • The priority of different data type conversion

    Hi All,
    I want to know the priority of data type conversion rule. if in an expression, I have several kind of data type( I, P, F,N..).
    Then finaly, all the data object will convert to which data type?
    I don't know the priority of data conversion.
    E.g.   data a type i. data b type p. data c type f.
             a = b + c.
    or    data d type p, data e type f.
          if ( d > f ).
    Then who will convert to who's type?
    Thanks and Regards.
    Aaron

    For expressions, the right term in SAP is "calculation type", it's explained here : [abap help - determining the calculation type|http://help.sap.com/abapdocu_70/en/ABENARITH_TYPE.htm]. SAP takes the "biggest" type of all variables in the expression. It can be I, P or F (smallest is I, biggest is F).
    Conditions are handled differently, just using data type conversion (see link given above by Abhishek), SAP converts from smallest to biggest type (in your case, it converts P to F and compares the two F variables).

  • Need Help with data type conversion

    Hello People,
    I am new to java, i need some help with data type conversion:
    I have variable(string) storing IP Address
    IPAddr="10.10.103.10"
    I have to call a library function which passes IP Address and does something and returns me a value.
    The problem I have is that external function call in this library excepts IP Address in form of a byte array.
    Here is the syntax for the function I am calling through my program
    int createDevice (byte[] ipAddress).
    now my problem is I don't know how to convert the string  IPAddr variable into a byte[] ipAddress to pass it through method.

    Class InetAddress has a method
    byte[]      getAddress() You can create an instance using the static method getByName() providing the IP address string as argument.

  • Data type conversion JCO To ABAP( Double to DEC)

    Hi,
      I want to update a field having data type as DEC with length 11 in APO system using JCO.Whatever i give as input is not getting reflected in APO system. Instead i get some different value.
    It seems that there is some data type conversion for that field..
    Thanks
    Archana

    if(tableName.equals("BAPI10001LOCPRDVERS2"))
                                                           table.appendRow();
                                                           //System.out.println("getting inside table "+tableName);
                                                           table.setValue("SOP112","PRODUCT");
                                                           table.setValue("SCMTEST111","LOCATION");
                                                           table.setValue("1001","LOCTYPE");
                                                           table.setValue("SCMTEST111","LOCATION_INT");
                                                           table.setValue("000","PLANNING_VERSION");
                                                           table.setValue("5000","SAFETY_DAYS_SUPPLY");//this is the field having problem
                                                           table.setValue("5","SAFETY_STOCK");
                                                           table.setValue(" ","SAFTY_STOCK_CALC_METHOD");
                                                           table.setValue("5.00","OPENING_PERIOD");
                                                           table.setValue("15","FORECAST_HORIZON");
                                                           table.setValue(("20000"),"VMI_PROM_LEAD_TIME");
                                                           table.setValue("0","MINIMUM_LOT_SIZE");
                                                           table.setValue(bd1,"TARGET_DAYS_SUPPLY");

  • Data type conversion from packed to numeric

    Hi Experts,
    i have a question on data type conversion. My requirement is:
    i have fields of type packed decimal in my internal table itab. I need to convert the values of packed decimal fields in itab to numeric type.
    Example:
    Data: begin of itab occurs 0,
                ebeln like ekko-ebeln,
                ebelp like ekpo-ebelp,
                menge(15) type p decimals 2,
                netpr(15) type p decimals 2,
              end of itab. 
    if itab-menge has a value of 2.00, i need to convert that value to '         200'.  Right justified.
    if itab-netpr has a value of 1,234.56, i need to convert that to '         123456'.
    The above internal table itab is passed to the Function module GUI_DOWNLOAD and the itab data is downloaded to a text file.
    Please let me know how to acheive this objective.

    Hi ,
    You can use
    SPLIT at '.' into v1 v2
    concatenate v1 v2 into vv1.
    REPORT ZDN_TEST_001 .
    data: lv_var1(15) type p decimals 2 value '123.00'.
    data: lv_var2(15) type p decimals 5 value '123.12121'.
    data: lv_varc1(15) type c.
    data: lv_varc2(15) type c.
    data: lv_varc1d(2) type c.
    data: lv_varc2d(5) type c.
    data: lv_varc11(15) type c.
    data: lv_varc21(15) type c.
    write:/ lv_var1.
    write:/ lv_var2.
    *1)write & REPLACE.
    write lv_var1 to lv_varc1.
    write lv_var2 to lv_varc2.
    REPLACE '.' WITH SPACE INTO lv_varc1.
                 CONDENSE lv_varc1 NO-GAPS.
    REPLACE '.' WITH SPACE INTO lv_varc2.
                 CONDENSE lv_varc2 NO-GAPS.
    write:/ lv_varc1.
    write:/ lv_varc2.
    *2)split & concatinate
    write lv_var1 to lv_varc1.
    write lv_var2 to lv_varc2.
    split lv_varc1 at '.' into lv_varc1 lv_varc1d.
    concatenate lv_varc1 lv_varc1d into lv_varc11.
    split lv_varc2 at '.' into lv_varc2 lv_varc2d.
    concatenate lv_varc2 lv_varc2d into lv_varc21.
    write:/ lv_varc11.
    write:/ lv_varc21.

  • How to avoid oracle implicit data type conversion

    Hello,
    i have a query like below..
    SELECT EMP_NUM
    FROM EMPLOYEE
    WHERE EMP_NUM=SOURCE_EMP_NUM;
    1. My SOURCE_EMP_NUM data type is varchar2.
    2. My table EMP_NUM data type is number.
    3. In one case my SOURCE_EMP_NUM value '00000123'
    4. I have an entry in table for EMP_NUM as 123.
    5. In this case my query is success and giving me row for 123, which i don't want it should compare with leading zeros. But due to oracle implicit conversion the comparision getting passed.
    6. I have an index for this column, so i can't use "like" operator...
    Can somebody help me.....
    Thanks in adv....

    HI,
    Just see this :---
    SQL> select * from emp where deptno=00020;---------deptno is number, 00020 is number and its true
    EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
    7369 SMITH CLERK 7902 17-DEC-80 800 20
    7566 JONES MANAGER 7839 02-APR-81 2975 20
    7788 SCOTT ANALYST 7566 19-APR-87 3000 20
    7876 ADAMS CLERK 7788 23-MAY-87 1100 20
    7902 FORD ANALYST 7566 03-DEC-81 3000 20
    SQL> select * from emp where to_char(deptno)=00020;=-------------deptno is character type and 00020 is number so still it is leaving 0000 from 20 as it number and has no impact,
    EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
    7369 SMITH CLERK 7902 17-DEC-80 800 20
    7566 JONES MANAGER 7839 02-APR-81 2975 20
    7788 SCOTT ANALYST 7566 19-APR-87 3000 20
    7876 ADAMS CLERK 7788 23-MAY-87 1100 20
    7902 FORD ANALYST 7566 03-DEC-81 3000 20
    SQL> select * from emp where to_char(deptno)='00020';---now both are character and no row is selected.
    no rows selected
    So you can avoid the implicit conversion according to the requirements and in this case we are usin to_char function to avoid this.
    Regards,
    Navneet

  • New user for java (Data type conversion)

    Hi all, I'm the newer from JAVA, just start to learn it few weeks before, there have some problem about me.
    I want to konw how to change the data type ??For example, if I have a string call year and store the char "1", how can I change that field to int type ?
    Thanks very much

    You should have a link to, or download, the API docs. You can see them on line at:
    http://java.sun.com/j2se/1.3/docs/api/index.html
    Look up the class Integer. It has a static method, parseInt() which takes a String argument and returns an int.. Since it is static, you can do the following:
    int value = Integer.parseInt(your_string);
    Then, to make it robust, you can put try/catch around it and catch NumberFormatException if you need to do error checking.

  • Date format conversion issue in BW

    Hi Experts,
    I have 2 custom date fields for which I'm getting the values from oracle database through DB Connect in MM/DD/YYYY format (e.g values 10/20/2007 and 3/5/2007). But I want to convert this date format into SAP BW internal format (YYYYMMDD). I've defined the above 2 date fields in BW with a data type DATS (8 digits length) and wrote a code in the TRs as below. Both these fields are defined as a character with a length of 10 in the oracle system.
    data zresult(10) type C.
    data :  lv_day(2) type c,
    lv_month(2) type c,
    lv_year(4) type c.
    zresult =  tran_structure-spring_norm_date.
    lv_day = zresult+3(2).
    lv_month = zresult+0(2).
    lv_year = zresult+6(4).
    CONCATENATE lv_year lv_month lv_day into result.
    But still the data load is getting failed due to wrong date format and error in the routine. It says the value for the characteristic 0DATE doesn't have 8 spaces. Is there anything wrong with the routine?
    Could someone please share some inputs on this.
    Thanks,
    Krish

    Hi Narasimha,
    Thanks a lot for your prompt response and inputs. I used this code as below in my TR for the date field. But its still giving an error message saying "Value '20072109' of characteristic 0DATE is not possible and error when assigning SID". The value what I can see in the source system (oracle table) and in PSA for this record is '9/21/2007'. Am I still missing something here?
    DATA: get_date TYPE sy-datum,
    s1(2) TYPE c,
    s2(2) TYPE c,
    s3(4) TYPE c,
    lv_length TYPE i,
    lv_length1 TYPE i.
    SPLIT TRAN_STRUCTURE-FALL_NORM_DATE AT '/' INTO s1 s2 s3.
    lv_length = STRLEN( s1 ).
    IF lv_length = 1.
    CONCATENATE '0' s1 INTO s1.
    ENDIF.
    lv_length1 = STRLEN( s2 ).
    IF lv_length1 = 1.
    CONCATENATE '0' s2 INTO s2.
    ENDIF.
    CONCATENATE s3 s2 s1 INTO get_date.
    RESULT = get_date.
    Could you please help me on this?
    FYI, I have defined my date field in ODS with the data type DATS in order to display the output in YYYYMMDD format.
    Thanks,
    Krish

  • Demantra - Create New Series - Mdp_matrix - Data Type String Issue

    I created a new series (MDP_matrix) that has the data type as String. The display format is BLANK.
    I was able to load the data into mdp_matrix table for the series i created.
    However, when i look at the series in a worksheet, it does not display the string value. It display zero. for some reason, it considers the series as numeric and not string. Any idea why that would be happening?
    This is on version 7.2 using SQL server/tomcat

    Hi
    1. Have you tried giving display format i.e ###?
    2. Is your server expression something like max (mdp_matrix. column_name)?
    Tks
    MJ

  • WebLogic 10: Custom Tag type conversion issue

    I have a tag file wherein I define an attribute to be of type "mypackage.SuperClass". At runtime this tag gets passed an instance of "mypackage.SubClass" where SubClass is a sub-class of SuperClass.
              Now this should and does work fine in WebLogic 9.2 but in 10 it gives this error:
              Cannot convert <toString output of SubClass> of type class mypackage.SubClass to class mypackage.SubClass                    I appreciate any help to resolve this issue.
              Thanks,
              Keyur

    This table has about 2 million rows.There is a date field in the table which comes as a 'nvarchar' in sql .When i try to convert it to a 'datetime' , i get an error as operation timed out..
    Refer below example.
    declare @x datetime
    set @x = '1/01/2006 12:00:00 a.m.'
    -------BELOW ERROR WILL BE DISPLAYED
    Msg 241, Level 16, State 1, Line 3
    Conversion failed when converting date and/or time from character string.
    Rather the format of datetime should be,
    set @x = '1/01/2006 12:00:00 AM'
    WORKAROUND,
    declare @x datetime
    set @x = REPLACE('1/01/2006 12:00:00 a.m.','.','')
    Regards, RSingh

  • ABAP Character Data Type Multiplication Issue difference in ITG vs Dev Environments.

    Hello Folks,
    My problem is very simple but hey I have tried everything and dont know why I have an issue and what is the possible solution. Let me create the scenario:-
    SAP Dev Box:
    data: prctg type char15.
    prctg = '0.065'.
    prctg = prctg * 100000.
    i see prctg value to be: 6500. Which is good.
    SAP ITG Box:
    data: prctg type char15.
    prctg = '0.065'.
    prctg = prctg * 100000.
    i see prctg value to be: 65000. Which is absurd and wrong!!!!
    Question: How can 2 environments behave differently? What is the solution to have the same result as the DEV Box using a reliable method please.
    Thanks alot!!!! Yet I have had no one resolve this issue for me in my workplace so I came here desparately!!
    Salman

    Hi,
    It's to do with deactivated 'Fixed point arithmetic' in V61A, where FV64A301 is ultimately included, I believe:
    My guess is that in the system, where it is working, someone has activated 'Fixed point arithmetic' in V61A via repair or otherwise.
    You can verify if the issue is inactive Fixed point arithmetic, by reproducing (inactivating it in Program attributes) in your test program.
    Are you coding your business logic directly in enhancement implementations? If yes, why don't you modularize your business logic in, say, a class method? Or at least a custom Function module? :| Define some kind of interface (I don't mean ABAP OO Interface, but interface in general - what SAP data you need to pass, what data you need to return or change), and encapsulate your logic in a separate procedure, which you then can call from Enhancement implementation...
    Just because you see too many to count lazy SAP programmers programming ridiculous "naked" (not modularized) enhancement implementations in the middle of existing Function modules and other modularization units, doesn't mean it's a good thing to do... It makes original code more unreadable than it already was and what if you or someone else needs to reuse that business logic...? And as added benefit, you'll encounter less galling issues like this...
    cheers
    Jānis

  • Moving Values to fields of different data types- Conversion

    I'm having trouble figuring out how to move a value from a field of a <b>char type</b> to a field of <b>structure RSDSSELOPT</b> type in a different itab.
    I'll show you what I have so far.
    DATA: BEGIN OF ITABAPI OCCURS 0,
          SEARCHFLD LIKE ZDOLTARC03-SEARCHFLD,
          VALUE LIKE ZDOLTARC03-VALUE,
          END OF ITABAPI.
    DATA: BEGIN OF ITAB_GO occurs 0,
             FIELDNAME LIKE RSDSTABS-PRIM_FNAME,
             SELOPT_T TYPE RSDS_SELOPT_T,
          END OF ITAB_GO.
      LOOP AT ITABAPI.
         MOVE: ITABAPI-SEARCHFLD TO ITAB_GO-FIELDNAME,
               <b>ITABAPI-VALUE TO ITAB_GO-SELOPT_T.</b>
         APPEND ITAB_GO.
      ENDLOOP.
    As an alternative I tried feeding the value into ITAB_GO-selopt_t-low, but breaking down the structure that far may be beyond the capabilities of the processor.
    If anyone knows a way to feed a char value into the structure field please help.
    N L

    Hi Natasha,
    my advice is: don't try to do it in just step. Instead,
    DATA: LT_RANGE TYPE TABLE OF RSDSSELOPT WITH HEADER LINE.
    LOOP AT ITABAPI.
       MOVE: ITABAPI-SEARCHFLD TO ITAB_GO-FIELDNAME.
       CLEAR: LT_RANGE.
       REFRESH: LT_RANGE.
       LT_RANGE-SIGN = 'I'.
       LT_RANGE-OPTION = 'EQ'.
       LT_RANGE-LOW = ITABAPI-VALUE.
       APPEND LT_RANGE.
       ITAB_GO-SELOPT_T[] = LT_RANGE[].  
       APPEND ITAB_GO.
    ENDLOOP.
    Pls let us know if it helped. BR,
    Alvaro

  • Data Type Conversion... Help...

    Hi... As per my requirement , i need to fetch last three days partition records from the below listed tables i.e EMP and DEPT and purge it.
    But i thought LAST_ANALYZED column will fetch correctly; but it isn't.
    Moreover the requirement is to fetch using HIGH_VALUE column which has LONG datatype.
    So please help, how can i do my conversion from LONG() datatype and compare with SYSDATE or anyother logic to calculate last 3 days?
    Query:
    SELECT      dtp.partition_name,dtp.table_name
    FROM dba_tab_partitions dtp
    WHERE dtp.table_name IN ('EMP','DEPT')
    AND TRUNC(dtp.high_value) ......
    I tried with the below query...
    SELECT      partition_name,table_name
    FROM dba_tab_partitions dtp
    WHERE TRUNC(dtp.high_value) <= TRUNC(SYSDATE) - 3;
    Got the error as "ORA-00932: Inconsistent datatype got NUMBER" :(
    Please help...
    Edited by: Sunil G on Sep 23, 2010 3:26 AM
    Edited by: Sunil G on Sep 23, 2010 4:57 AM

    Thanks for your reply.
    But below was the actual requirement ; which i initially posted.
    But the fetch was not happening properly if i do with last_analyzed.
    So thats why i posted this question.
    So how we can handle this case with respect to dynamic query?????
    ===========================================================================================
    -- This Procedure is created to purge the 3-days records by dropping older partitions
    PROCEDURE P_PUR_STG_REC(p_tab_name IN VARCHAR2)
    IS
    query_str VARCHAR2(4000);
    TYPE t_rec_part IS RECORD
    (     l_part_name dba_tab_partitions.partition_name%TYPE,
         l_part_tab dba_tab_partitions.partition_table%TYPE
    TYPE r_rec_part IS TABLE OF t_rec_part;
    BEGIN
    query_str := 'SELECT dtp.partition_name,dtp.table_name
                   FROM dba_tab_partitions dtp
                   WHERE dtp.table_name IN ' || p_tab_name ||
                   ' AND TRUNC(dtp.last_analyzed) <= TRUNC(SYSDATE) - 3' ;
    OPEN c_fetch FOR query_str ;
    EXECUTE IMMEDIATE query_str BULK COLLECT INTO r_rec_part;
    FOR i IN r_rec_part.first..r_rec_part.last LOOP
         DBMS_OUTPUT.PUT_LINE('r_rec_part(i).l_part_tab - '
                                  ||r_rec_part(i).l_part_tab
                                  ||' , '
                                  ||'r_rec_part(i).l_part_name - '
                                  ||r_rec_part(i).l_part_name
    EXECUTE IMMEDIATE 'ALTER TABLE '|| r_rec_part(i).l_part_tab ||
    ' DROP PARTITION '|| r_rec_part(i).l_part_name ||'UPDATE INDEXES ';
    END LOOP;
    EXCEPTION
    WHEN OTHERS THEN
              DBMS_OUTPUT.PUT_LINE('Exception occured at when-others -> SQLCODE-->'
              || SQLCODE
              ||' , '
              || 'SQLERRM-->'
              || SQLERRM);
    RAISE;
    END P_PUR_STG_REC;
    ===========================================================================================

Maybe you are looking for