Incompatible data types in combination

Hi All,
i am getting this error incompatible data types in combination when i run my interface. my interface extract data from table and loads into file.it was running fine but dun know why its giving this error now during insert rows step.

You're essentially trying assign a void value to a double... that's what the error is telling you.
public static void showKilometers(double m)
double kilos;
kilos = m * 0.001;
JOptionPane.showMessageDialog(null,(m) + " Meters is " +
(kilos) + " Kilometers.");
} The reason this doesn't work is because in order to assign the value of a function to a variable, the function must actually return a value.
Try this:
public static double showKilometers(double m)
double kilos;
kilos = m * 0.001;
JOptionPane.showMessageDialog(null,(m) + " Meters is " +
(kilos) + " Kilometers.");
return kilos;
} Do the same thing for your other conversions and make sure the function and return types are correct.
Edit: Ah, looking back over the program, you weren't actually trying to assign variables; rather, you were just wanting to display them. My bad, I only looked at the narrow scope of the error and wondered why you wanted message dialogs. =)
But, hopefully my description of that error will help you understand a few things.
Edited by: Thok on Oct 10, 2007 2:40 PM

Similar Messages

  • The data type of InfoObject 0ORGUNIT is incompatible with field 0ORGUNIT

    I am trying to create a DataSource in BW to load the organizational hierarchy from HR R/3 to BW.  I get the message "The data type of InfoObject 0ORGUNIT is incompatible with field 0ORGUNIT," 
    Our BW version is 3.5; the version of HR R/3 is SAP ECC 6.0.
    I'm not sure what this message means but if I continue to click OK, I get transfer structures for the org attributes and hierarchies but not the text.  The key to the text is 60 characters.  Shouldn't the key be the org unit, which is in format NUMC 8?
    I was able to create this DataSource last summer, when HR was in a different version (4.6?) with no issues. Does anybody have any idea what's wrong and what I can do about it?
    Thanks!

    Would be nice if you could share the resolution they found,
    since that might help other people as well.
    For instance, me.... as we face exactly the same problem at the moment !!
    Ch

  • The data types varchar and varchar are incompatible in the subtract operator

    Hi ;
    I want to fetch values  6,903,00  format ,my query is ;
    SELECT CONVERT(varchar(50), CONVERT(money,SUM(DEBIT)),1) AS DEBIT ,CONVERT(varchar(50), CONVERT(money,SUM(CREDIT)),1),AS
    CREDIT CONVERT(varchar(50), CONVERT(money,SUM(DEBIT)),1) - CONVERT(varchar(50), CONVERT(money,SUM(CREDIT)),1) AS BALANCE
    FROM TABLE
    it was get error :  The data types varchar and varchar are incompatible in the subtract operator.
    I want to Show result ;
    DEBIT         -          CREDIT            -    BALANCE
    6,903,00              4,387.24             2,515.76
    Thanks in advance

    You have to do the subtraction with the MONEY data type (prior to covert-ing).
    Starting with SQL Server 2012, you can use the FORMAT command:
    https://msdn.microsoft.com/en-us/library/hh213505.aspx
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Database Design
    New Book / Kindle: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2014
    We have to use SQL 2005 due to licensing issue .

  • Error in getting Long data type from Table

    Hi All,
    I have one table say xx_long. In this table one column is having Long data type.
    Now I want this values will get in to the PL/SQL variable. I taken variable data type as long but it is showing error "ORA-00997: illegal use of LONG datatype".
    Sample code with which I tried:
    declare
    a long;
    begin
    select slno into a from xx_long where slno = 100;
    dbms_output.put_line('Value:'||a);
    end;
    Please help me on this.
    Thanks in advance.
    Regards,
    Hari

    LONG columns cannot appear in certain parts of SQL statements:
    WHERE clauses, GROUP BY clauses, ORDER BY clauses, or CONNECT BY clauses or with the DISTINCT operator in SELECT statements
    The UNIQUE operator of a SELECT statement
    The column list of a CREATE CLUSTER statement
    The CLUSTER clause of a CREATE MATERIALIZED VIEW statement
    SQL functions (such as SUBSTR or INSTR)
    Expressions or conditions
    SELECT lists of queries containing GROUP BY clauses
    SELECT lists of subqueries or queries combined by the UNION, INTERSECT, or MINUS set operators
    SELECT lists of CREATE TABLE ... AS SELECT statements
    SELECT lists in subqueries in INSERT statements

  • Array data type in SQL server

    Hi there,
    I have stored procedure which does have array data type. recently we have migrated oracle to SQL server
    but this array datatype doesn't support in SQL server.
    How can we rewrite this stored procedure to make it work exactly same as Oracle SP.
    Can you please help on this.
    ALTER PROCEDURE [dbo].[New1]
    @i_ID dbo.t_IdArray READONLY ,
    @i_ArraySize INT ,
    @SWP_Ret_Value FLOAT = NULL OUTPUT
    AS
    Begin
    UPDATE fmm.SITES
    SET DISPLAY_ORDER = id.t_RowNum
    FROM @i_ID id
    JOIN dbo.SITE1 s
    on s.SITE_ID = id.t_ID
    end
    Thanks for your help.

    Hi Latheesh,
    I have tried your bit except configure the SQLCommand and TVP parameter I don't where I need to do this bit.
    Without that bit I have tried your code it was throwing an error like this
    Operand type clash: int is incompatible with t_IdArray
    Can you please have a look .
    Thanks,
    RK
    can you show the definition for  dbo.t_IdArray
    what does it contain?
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Problem with a data type (quantum13.3) in the mapping

    Hello all,
    i have an automated activity in my process which access to a webservice. (The Webservice returned the details of a purchase requisition) At the webservice output mapping i get this error:
    "Incompatible expression type ... Expected: com.sap.dictionary.double ... Found: quantum13.3..."
    Has anyone an idea how i could accept this data type? Has anyone ever heard of the type "quantum13.3"?
    Regards,
    Bastian

    Hi Bastian,
    This error is showing up whenever you try to map incompatible types.
    The type of the element you map to is most likely the 'com.sap.dictionary.double' whereas the service is returning an element of type 'quantum13.3'. The mapping expects that both types fit to each other, but they do not.
    Check the used service for that specific type. Perhaps it is just a restriction of a 'well-known' type or the service returns the data in another format / element as well.
    *edit'
    Looking up the type via a well-known search engine showed the following definition:
          <xsd:simpleType name="quantum13.3">
            <xsd:restriction base="xsd:decimal">
              <xsd:totalDigits value="13"/>
              <xsd:fractionDigits value="3"/>
            </xsd:restriction>
          </xsd:simpleType>
    Looks like this is a normal 'xsd:decimal' then. Try using 'xsd:decimal' instead of 'com.sap.dictionary.double' within the target element.
    Hope that helps,
    Martin
    Edited by: Martin Moeller on Apr 27, 2009 12:53 PM (type found)

  • Problem while creating with QUAN and CURR data type fields

    I am trying to create a Z table. A couple of fields are of data type QUAN and CURR, which need to have reference table and reference field.
    Field               DataType     Length     Decimal
    TOT_QTY       QUAN            15                 3
    PRICE              CURR             16                2
    For reference table and fields, I found a Table HRPAD23 which has a field called N_QUANTITY (15,3) that matches my TOT_QTY field's data type and it also has a field called UN_PRICE that matches my PRICE field's data type. But when I use them as reference, and try to activate the table, I get an error "combination reference table/field does not exist". How do I fix this? Can anybody help me? Thanks in advance.
    Chris
    Edited by: martin99 on Aug 18, 2011 9:16 PM

    Martin,
    I doubt that you need to add 2 extra fields in your table as suggested in the last post by John.
    Your error is very CLEAR that you seem to be use wrong combination of reference table and field.
    For QTY field,
    use ref table  -  HRPAD23.              ref field- UNIT
    OR
    ref table - VBAP                       ref field - VRKME
    For PRICE field,
    use ref table - PAD25                  ref field - KWAER
    OR
    ref table - T77REFDOC                                     ref field - CURRENCY
    It should work.
    BR,
    Diwakar

  • Date type is unique by default?

    Hello,
    I have created a table with date data type. All records are inserted but same date records throws following error:
    ORA00001-unique constraint (aa.sys_C005487) violated
    Best regards

    Before you blindly drop the constraint, you might want to consider a few things.
    Is there a real business reason why the constraint needs to be in place?
    Is the constraint actually only on the single date column, or a combination of columns? You can use the user_cons_columns view to find out.
    There will be a (probably) unique index supporting the constraint. You may want to consider if you need to keep it. If so, then, if it is a unique index, you will have to rebuild it after you drop the constraint. If the index is not unique then you can use the keep index clause on the drop constraint statement.
    You should also make sure that ti is actually a constraint, and not just a unique index. For example:
    SQL> CREATE TABLE t (id number, descr varchar2(10));
    Table created.
    SQL> CREATE UNIQUE INDEX t_unq ON t(id);
    Index created.
    SQL> INSERT INTO t VALUES (1, 'One');
    1 row created.
    SQL> INSERT INTO t VALUES (1, 'Ein');
    INSERT INTO t VALUES (1, 'Ein')
    ERROR at line 1:
    ORA-00001: unique constraint (OPS$ORACLE.T_UNQ) violated
    SQL> SELECT constraint_name, constraint_type
      2  FROM user_constraints
      3  WHERE table_name = 'T';
    no rows selectedJohn

  • Unable to create a new master data type

    I am trying to set up a simple demo model on an On Premise S&OP on HANA system (Release 3).
    I have created and saved some master data attributes.
    But when I try and set up a new master data type, the system does not show any available master data attributes to select (even though 'All attributes' is selected in the dropdown), so I cannot save the new master data type.
    Any suggestions regarding this problem are welcome...

    Hello David,
    We are having S&OP 3.0 SP1 patch 1 on premise with HANA version 1.00.69.385057. We have old golden demo files imported.
    Could you please let us know...
    1) is it right combination..?
    2) Is it necessary to upgrade to patch 2.
    3) in case, we upgrade to patch 2, do we need to import golden demo file again for patch 2
    4) Do we have any release note for patch 2.
    Your quick response is highly appreciated. Thanks!!
    Regards,
    Dinesh Goyal

  • ATG extending OOTB enumerated data type

    Hi All,
    If i have to add a extra payment group/option to an data-type="enumerated" in ATG repository, should we ,
    1) Use the OOTB table in our extended orderRepository.xml???? Coz ATG recomends to use auxiliary when extending the OOTB properties.
    2)Should we mention all the OOTB options along with my custom option????
    3) Will there be any SQL change for adding a extra option in the enumarated data-type????
    4)Can you please let me know more about  data-type="enumerated" .
    <item-descriptor name="paymentGroup" sub-type-property="type" version-property="version" expert="true" cache-mode="simple" display-name-resource="itemDescriptorPaymentGroup" item-cache-timeout="180000">
    <table name="dcspp_pay_group" type="primary" id-column-name="payment_group_id">
          <attribute name="resourceBundle" value="atg.commerce.OrderRepositoryTemplateResources"/>
         <property name="type" data-type="enumerated" default="paymentGroup" expert="true" category-resource="categoryInfo" display-name-resource="type">
            <attribute name="useCodeForValue" value="false"/>
            <option value="paymentGroup" code="0"/>
            <option value="creditCard" code="1"/>
            <option value="giftCertificate" code="2"/>
            <option value="storeCredit" code="3"/>
             <option value="MyPaymentGroup" code="3"/>
            <option value="invoiceRequest" code="5000"/>
            <attribute name="resourceBundle" value="atg.commerce.OrderRepositoryTemplateResources"/>
            <attribute name="propertySortPriority" value="10"/>
          </property>
    </table>
    Regards

    Hi,
    You can use OOTB tables for this requirement as you are not changing the table definitions.
    No SQL change is required.
    You need to mention all the OOTB options when you say xml-combine as replace. Make sure that you are getting the correct repository xml file after combining by examining the template definition thro dyn admin.
    One more good practice is use reasonably greater value to the code to your custom option (instead of giving the next number) as it would help during migration.
    For Ex, in your example you have given code as 3 for your custom option. If ATG adds one more payment group they would use this code. If you use  something like 100, it avoids the rework during migration.
    Hope this helps.
    Keep posting the updates / questions.
    Thanks,
    Gopinath Ramasamy

  • After upgrade from FB4Beta to FB4, web services no longer returning the same data types.

    I just upgraded from FB4 beta to the FB4 release. I'm still running the Flex 3.5 SDK and amnow  unable to use a lot of my web services. In the previous FB4 beta, I could generate the proxy classes from the WSDL and would get a ResultEvent that containted either my complex data type or an ArrayCollection of those complex data types.
    After I deleted and regenerated the services under the FB4 release, I get a ProxyObject or an ArrayCollection of ProxyObjects. No matter what I try I cannot map those ProxyObjects to my complex data type and it's driving me nuts! The oddest thing is that it didn't break all of my services, just some of them.
    I've tried several methods of mapping the ProxyObject to my custom data type but I get a null result every time and no errors.
    private function getContactsResult_handleResult(event:ResultEvent):void
        this._contactsList.removeAll();
        if (event.result is ArrayCollection)
            for each (var contact:ContactType in event.result)
                _contactsList.addItem(contact);                   
        if (event.result is ContactType)
            _contactsList.addItem(event.result as ContactType);
    Any suggestions?

    It looks like this was a combination of the upgrade,
    increasing use of ASP files and not having seperate application
    pools in IIS.
    We've just starting edding aspx apps, previously we only had
    one asp app so we only used the default app;icaton pool in iis.
    With the errors in the virtual directory started, we deleted and
    remade the VD with it's only application pool. That appears to have
    resolved the issues. The only concern I have is one of the VD did
    have it's own applicaton pool and still had the very slow response
    after the upgrade. But I'll see how this solution works for the
    future.
    The decesion was made to only have cf8 installed since that
    worked well on our testing server, so we did intend to overwrite
    the CFIDE folder.
    Thanks for checking this out and for your time on this.
    At this point I consider this closed. If something else comes
    up I'll start a new thread on it.

  • SOM expression - resolved to an incompatible node type of 'dataValue'

    Hi experts,
    i am working on wd abap interactive forms, i have taken a table on pdf and provided binding.. like data node is with data[*] and rest of the fields are maped preperly.
    by default on initialization i fill some data this popup message is not coming..
    if there is no data this message appears, when i fill some data manually and try to fetch i am not getting the records.
    please let me know how to get rid of this message.
    The SOM expression '$record.Z_TY_SFLIGHT_LIGHTS' for the dataRef specified
    on field 'Table1', resolved to an incompatible node type of 'dataValue'.
    Thanks,
    Mahesh.Gattu

    If i maintain the cardinality of the table node 1..n it is not giving me the SOM popup.
    instead of 0..n.
    Thanks,
    Mahesh.Gattu

  • XML operation resulted an XML data type exceeding 2GB in size. Operation aborted.

    I have table with one million rows, when i am using xml path ('Root'), it giving me an error 
    "XML operation resulted an XML data type exceeding 2GB in size. Operation aborted."
    This is a limitation of sqlserver. I have to xml path because i have to create nodes and attributes. In more complex case i will be joining multiple tables to get id and other attributes so combining multiple xmls in not an option here.
    any workaround....thanks in advance

    Here an example of your query that retrieve record in batch of 2 records. In real code, you should save the last id retrieved and call the query in a loop.
    DECLARE @BATCHSIZE AS integer
    SET @BATCHSIZE = 2
    DECLARE @LASTID As Integer
    SET @LASTID = 0
    select top(@BATCHSIZE) id as "@id"
    ,name as "@name"
    select id as "@id"
    ,name as "@name"
    select *
    from @products p
    where p.customer_id = cs.id
    group by id,customer_id,name
    for xml path ('product'),Root('products'),type
    from @customer cs
    where cs.client_id = c.id
    group by id,client_id,name
    for xml path ('customer'),Root('customers'),type
    from @client c
    where c.id > @LASTID
    order by c.id
    for xml path ('clients'),Root ('Main')

  • How to Load Dates Data type from txtfile to Hyperion Planning

    I have loaded numeric and string data for especify combination, for example
    soruce Txtfile:
    Year Measures Market Data1 Data2
    "Jan","Sales","New York","120","2013/01/01"
    Hyperion Planning:
    (combinations in my target)
    Jan,Sales,NewYork,E_1011--->120
    Jan,Sales,NewYork,E_1008--->"not loaded"
    E_1011 is defined as Numeric data type in Hyperion Planning
    E_1008 is defined as Date data type in Hyperion Planning
    In my Interface source file, field Data1,Data2 is defined as "String", why ODI is loading only Data1 field?, how can I do for load Data2 field.
    Thanks for your help.

    AFAIK, I don't think you can use the same description for multiple members.
    What i would suggest is to concatenate your member name and alias and use that as Alias. As your account member is the placeholder and would not confuse anyone. Ensure that you maintain the 80 character limit
    Regards
    Amarnath
    ORACLE | Essbase

  • Data type of Souce Object Vs BW Object

    Hi All,
    Our Source system is Oracle system.We have a field 'delivered date' (Database type is 'DATE' and Type in DDIC is 'DATS').
    for example: 20.09.2005 08:17:15
    Our requirement is to display this data as it is in BW report on ODS.
    Shall go for BW infoObject with data type 'CHAR' ? does it lead to any issues while loading from oracle to BW as source data type is 'DATS' and BW Object  data type is 'CHAR'?
    Is necessary to maiantain same data types here?
    If dont go with data type 'CHAR', it is not possible to display date and time together.
    I have tested with flat file and it works fine.
    Thanks

    Hi,
    Thanks for your reply.Thats what i had thought of doing.we need not represent it as Date as its combination of date and time.This is the only way to get it i guess.(defining 'CHAR' infoObject and mapping to 'DATS' of source field ).
    Any other possibilities?
    Thanks

Maybe you are looking for