OWB Can't Import Existing Package with Collection Data Type as Arguments

I created a package and compiled it successfully as the follows:
+++++++++++++++++++++++++++++
CREATE OR REPLACE PACKAGE PACKAGE_TEST AS
TYPE Num_LIST IS TABLE of NUMBER INDEX BY BINARY_INTEGER;
FUNCTION TEST_FUNCTION1 ( arg1 NUMBER, arg2 NUMBER) RETURN NUMBER;
FUNCTION TEST_FUNCTION2 ( args NUM_LIST) RETURN NUMBER;
END PACKAGE_TEST;
CREATE OR REPLACE PACKAGE BODY PACKAGE_TEST AS
FUNCTION TEST_FUNCTION1 ( arg1 NUMBER, arg2 NUMBER) RETURN NUMBER IS
ln_sum NUMBER;
BEGIN
ln_sum := arg1 + arg2;
     RETURN ln_sum;     
EXCEPTION
WHEN OTHERS THEN
RETURN -10000;     
END TEST_FUNCTION1;
FUNCTION TEST_FUNCTION2 ( args NUM_LIST) RETURN NUMBER IS      
     ln_sum NUMBER;
BEGIN
ln_sum :=0;
     FOR i IN 1.. args.COUNT LOOP
     ln_sum := ln_sum + args( i );     
     END LOOP;     
     RETURN ln_sum;     
EXCEPTION
WHEN OTHERS THEN
RETURN -10000;     
END TEST_FUNCTION2;     
END PACKAGE_TEST;
++++++++++++++++++++++++++++++++++++++++
Then I tried to import the package into OWB (9.2). The problem came: all the package body and
the specification of TEST_FUNCTION1 were imported, but the package specification of
TEST_FUNCTION2 couldn't be imported. The IMPORT FILTER gave an error message:
"TEST_FUNCTION2: Argument Data type is not supported".
How to resolve this problem? It is very import for our project, since we have to import some
packages with user_defined collection data types as arguments.
Thank you.
Lushu

Hi Lushu,
Unfortunately this is indeed not supported and I would not know how to work around this one. The only way I guess that this would work is to not import it, and then use Expressions to call the function with inputs.
Jean-Pierre

Similar Messages

  • Package with table data type as out parameter.

    Hi there, I managed to compile the package without error but when I am trying to test this package and
    I am keep facing this error message. 
    Am I using correctly for the table data type as out parameter.  I have no idea what is wrong with the package to fix. 
    Pls. help and advise me.  Thanks.
    Error starting at line 1 in command:
    DECLARE
    p_stmodel VARCHAR2(40):=null;
    p_item_number VARCHAR(40):='9BX158-300';
    p_item_id NUMBER:=0;
    l_attribute_out test_common_api.l_item_attr_tab:=test_common_api.l_item_attr_tab();
    BEGIN
    test_common_api.test_attribute(p_stmodel,p_item_number,p_item_id,l_attribute_out);
    END;
    Error report:
    ORA-06550: line 8, column 18:
    PLS-00302: component 'TEST_ATTRIBUTE' must be declared
    ORA-06550: line 8, column 2:
    PL/SQL: Statement ignored
    06550. 00000 -  "line %s, column %s:\n%s"
    *Cause:    Usually a PL/SQL compilation error.
    *Action:
    ---------Package.
    CREATE OR REPLACE PACKAGE test_common_api
    AS
    TYPE item_attr_rec IS RECORD (CONFIGURATION VARCHAR2(20),
                                   PRODUCTTYPE VARCHAR2(30),
                                   INTERNALPRODUCTNAME VARCHAR2(20),
                                   NUMBEROFHEADS VARCHAR2(2),
                                   NUMBEROFDISCS VARCHAR2(2),
                                   GENERATION  VARCHAR2(10),
                                   FACTORYAPPLICATION VARCHAR2(150),
                                   PRODUCTFAMILY  VARCHAR2(60),
                                   FORMFACTOR VARCHAR2(10),
                                   FORMATTEDCAPACITY NUMBER,
                                   FORMATTEDCAPACITY_UOM VARCHAR2(20),
                                   INTERFACE  VARCHAR2(30),
                                   SPINDLESPEEDRPM  NUMBER,
                                   PRODUCTCACHE VARCHAR2(10),
                                   WARRANTYMONTHS   VARCHAR2(2),
                                   PHYSICAL_SECTOR_SIZE  NUMBER,
                                   MODELHEIGHT  VARCHAR2(10),
                                   ENCRYPTION_TYPE VARCHAR2(40));
    TYPE l_item_attr_tab IS TABLE OF item_attr_rec;
    END test_common_api;
    show errors
    create or replace package body test_common_api
    AS
    PROCEDURE test_attribute (p_stmodel IN VARCHAR2,
                               p_item_number IN VARCHAR2,
                               p_item_id IN NUMBER,
                               l_item_attr_list OUT l_item_attr_tab)
    IS
    l_stmodel st.stmodelnumber%TYPE;
    l_market_segment VARCHAR2(10) ;
    l_sub_market_segment VARCHAR2(10) ;
    l_app_segment VARCHAR2(10);
    l_market_name VARCHAR2(40) ;
    l_ccitem seaeng_ccitemnumber.ccitemnumber%TYPE;
    l_query_item  VARCHAR2(1000);
    l_query_model VARCHAR2(1000);
    l_where VARCHAR2(1000);
    l_bind_var1      VARCHAR2(40);
    l_bind_var2      VARCHAR2(40);
    l_sql            NUMBER:=0;
    l_config VARCHAR2(40):=null;
    BEGIN
       IF p_stmodel is not null THEN
           l_where :='WHERE sc.ccmodel = sp.productmodelnumber AND sp.stmodelnumber = st.stmodelnumber
                      AND sc.pricingdescriptor=''MODEL''
                      AND sc.ccdashnumber =''000''
                      AND sp.detailedproductname=''GENERIC''
                      AND st.stmodelnumber= :1';
                  IF p_item_number is null AND p_item_id is null THEN
                      l_config :='null';
                  ELSE
                      l_config :='sc.configuration';
                  END IF;
            l_bind_var1 :=p_stmodel;
            l_sql :=1;
        ELSE
            IF p_item_id is null and p_item_number is not null THEN
                l_where := 'WHERE sc.ccmodel = sp.productmodelnumber AND sp.stmodelnumber = st.stmodelnumber and sc.ccitemnumber = :1';  
                l_bind_var1 :=p_item_number;
                l_sql:=2;
            ELSIF p_item_id is NOT null and p_item_number is null THEN
                l_where := 'WHERE sc.ccmodel= sp.productmodelnumber AND sp.stmodelnumber = st.stmodelnumber and sc.ccitemnumber in ( select msi.segment1
                            from mtl_system_items msi
                            where msi.inventory_item_id = :1)';
                l_bind_var1 := p_item_id;
                l_sql:=2;
            ELSIF p_item_id is not null and p_item_number is not null THEN
                l_where :='WHERE sc.ccmodel = sp.productmodelnumber AND sp.stmodelnumber = st.stmodelnumber and sc.ccitemnumber in (select msi.segment1
                           from mtl_system_items msi
                           where msi.inventory_item_id = :1
                           AND msi.segment1=:2)';
                l_sql:=3;
                l_bind_var1 := p_item_id ;
                l_bind_var2 :=p_item_number;
            END IF;
        END IF;
    l_query_item :='SELECT sc.configuration,st.producttype, sp.internalproductname, sp.numberofheads , sp.numberofdiscs,
      sp.generation,sp.factoryapplication, st.productfamily,st.formfactor , st.formattedcapacity , st.formattedcapacity_uom,
      st.interface,st.spindlespeedrpm,st.productcache,st.warrantymonths, st.physical_sector_size, st.modelheight, st.encryption_type
       FROM  pm sp , st st, seaeng_ccitemnumber sc ';
    l_query_model :='SELECT '|| l_config|| ' , st.producttype, null,null , null, null, sp.factoryapplication, null,st.formfactor, st.formattedcapacity,
      st.formattedcapacity_uom,st.interface , st.spindlespeedrpm, st.productcache, st.warrantymonths,st.physical_sector_size, st.modelheight,
      st.encryption_type
      FROM  pm sp , st st, seaeng_ccitemnumber sc ';
       IF l_sql = 1 THEN
          EXECUTE IMMEDIATE  l_query_model ||l_where
                             BULK COLLECT INTO l_item_attr_list
                             USING l_bind_var1 ;
                               dbms_output.put_line(l_query_model||l_where);
        ELSIF
             l_sql =2 THEN
               EXECUTE IMMEDIATE l_query_item || l_where
                                 BULK COLLECT INTO l_item_attr_list
                                 using l_bind_var1;
                                 dbms_output.put_line(l_query_item||l_where);
        ELSE
           EXECUTE IMMEDIATE  l_query_item ||l_where
                             BULK COLLECT INTO l_item_attr_list
                             USING l_bind_var1, l_bind_var2 ; 
                               dbms_output.put_line(l_query_item||l_where);
        END IF;
    END test_attribute;
    END test_common_api;
    show errors

    I think you forget to declare "PROCEDURE test_attribute" procedure in your package definition. like:
    CREATE OR REPLACE PACKAGE test_common_api
    AS
    TYPE item_attr_rec IS RECORD (CONFIGURATION VARCHAR2(20),
                                   PRODUCTTYPE VARCHAR2(30),
                                   INTERNALPRODUCTNAME VARCHAR2(20),
                                   NUMBEROFHEADS VARCHAR2(2),
                                   NUMBEROFDISCS VARCHAR2(2),
                                   GENERATION  VARCHAR2(10),
                                   FACTORYAPPLICATION VARCHAR2(150),
                                   PRODUCTFAMILY  VARCHAR2(60),
                                   FORMFACTOR VARCHAR2(10),
                                   FORMATTEDCAPACITY NUMBER,
                                   FORMATTEDCAPACITY_UOM VARCHAR2(20),
                                   INTERFACE  VARCHAR2(30),
                                   SPINDLESPEEDRPM  NUMBER,
                                   PRODUCTCACHE VARCHAR2(10),
                                   WARRANTYMONTHS   VARCHAR2(2),
                                   PHYSICAL_SECTOR_SIZE  NUMBER,
                                   MODELHEIGHT  VARCHAR2(10),
                                   ENCRYPTION_TYPE VARCHAR2(40));
    PROCEDURE test_attribute (p_stmodel IN VARCHAR2,
                               p_item_number IN VARCHAR2,
                               p_item_id IN NUMBER,
                               l_item_attr_list OUT l_item_attr_tab);
    TYPE l_item_attr_tab IS TABLE OF item_attr_rec;
    END test_common_api;
    show errors
    create or replace package body test_common_api
    AS
    PROCEDURE test_attribute (p_stmodel IN VARCHAR2,
                               p_item_number IN VARCHAR2,
                               p_item_id IN NUMBER,
                               l_item_attr_list OUT l_item_attr_tab)
    IS
    l_stmodel st.stmodelnumber%TYPE;
    l_market_segment VARCHAR2(10) ;
    l_sub_market_segment VARCHAR2(10) ;
    l_app_segment VARCHAR2(10);
    l_market_name VARCHAR2(40) ;
    l_ccitem seaeng_ccitemnumber.ccitemnumber%TYPE;
    l_query_item  VARCHAR2(1000);
    l_query_model VARCHAR2(1000);
    l_where VARCHAR2(1000);
    l_bind_var1      VARCHAR2(40);
    l_bind_var2      VARCHAR2(40);
    l_sql            NUMBER:=0;
    l_config VARCHAR2(40):=null;
    BEGIN
       IF p_stmodel is not null THEN
           l_where :='WHERE sc.ccmodel = sp.productmodelnumber AND sp.stmodelnumber = st.stmodelnumber
                      AND sc.pricingdescriptor=''MODEL''
                      AND sc.ccdashnumber =''000''
                      AND sp.detailedproductname=''GENERIC''
                      AND st.stmodelnumber= :1';
                  IF p_item_number is null AND p_item_id is null THEN
                      l_config :='null';
                  ELSE
                      l_config :='sc.configuration';
                  END IF;
            l_bind_var1 :=p_stmodel;
            l_sql :=1;
        ELSE
            IF p_item_id is null and p_item_number is not null THEN
                l_where := 'WHERE sc.ccmodel = sp.productmodelnumber AND sp.stmodelnumber = st.stmodelnumber and sc.ccitemnumber = :1';  
                l_bind_var1 :=p_item_number;
                l_sql:=2;
            ELSIF p_item_id is NOT null and p_item_number is null THEN
                l_where := 'WHERE sc.ccmodel= sp.productmodelnumber AND sp.stmodelnumber = st.stmodelnumber and sc.ccitemnumber in ( select msi.segment1
                            from mtl_system_items msi
                            where msi.inventory_item_id = :1)';
                l_bind_var1 := p_item_id;
                l_sql:=2;
            ELSIF p_item_id is not null and p_item_number is not null THEN
                l_where :='WHERE sc.ccmodel = sp.productmodelnumber AND sp.stmodelnumber = st.stmodelnumber and sc.ccitemnumber in (select msi.segment1
                           from mtl_system_items msi
                           where msi.inventory_item_id = :1
                           AND msi.segment1=:2)';
                l_sql:=3;
                l_bind_var1 := p_item_id ;
                l_bind_var2 :=p_item_number;
            END IF;
        END IF;
    l_query_item :='SELECT sc.configuration,st.producttype, sp.internalproductname, sp.numberofheads , sp.numberofdiscs,
      sp.generation,sp.factoryapplication, st.productfamily,st.formfactor , st.formattedcapacity , st.formattedcapacity_uom,
      st.interface,st.spindlespeedrpm,st.productcache,st.warrantymonths, st.physical_sector_size, st.modelheight, st.encryption_type
       FROM  pm sp , st st, seaeng_ccitemnumber sc ';
    l_query_model :='SELECT '|| l_config|| ' , st.producttype, null,null , null, null, sp.factoryapplication, null,st.formfactor, st.formattedcapacity,
      st.formattedcapacity_uom,st.interface , st.spindlespeedrpm, st.productcache, st.warrantymonths,st.physical_sector_size, st.modelheight,
      st.encryption_type
      FROM  pm sp , st st, seaeng_ccitemnumber sc ';
       IF l_sql = 1 THEN
          EXECUTE IMMEDIATE  l_query_model ||l_where
                             BULK COLLECT INTO l_item_attr_list
                             USING l_bind_var1 ;
                               dbms_output.put_line(l_query_model||l_where);
        ELSIF
             l_sql =2 THEN
               EXECUTE IMMEDIATE l_query_item || l_where
                                 BULK COLLECT INTO l_item_attr_list
                                 using l_bind_var1;
                                 dbms_output.put_line(l_query_item||l_where);
        ELSE
           EXECUTE IMMEDIATE  l_query_item ||l_where
                             BULK COLLECT INTO l_item_attr_list
                             USING l_bind_var1, l_bind_var2 ; 
                               dbms_output.put_line(l_query_item||l_where);
        END IF;
    END test_attribute;
    END test_common_api;
    show errors

  • Error while calling XQuery Function with xs:date type as Argument

    Hi,
    I have follwing function in my DataService .
    declare function tns:getXXXDetail($effectiveDate as xs:date,
    $cancelDate as xs:date) as element(ns26:XXXAccount)* {
              implCode
    declare function tns:testGetXXXDetail($searchCriteria as element(ns15:locateMemberXXXDetail))
                   as element(ns26:XXXAccount)* {
    for $Account in tns:getXXXDetail($searchCriteria/ns16:accountTypeDates/ns18:effectiveDate,
         $searchCriteria/ns16:accountTypeDates/ns18:cancelDate)
    return $Account
    I am trying to test the getXXXDetail() function from testGetXXXDetail .
    The searchCriteria is a complex type with date elements effectiveDate and cancelDate, both are optional
    When i test with effectiveDate,cancelDate elements present in $searchCriteria its working fine.
    When i remove these dates element i am getting follwing error
    "expected exactly one item, got 0 items" error
    Any Clue ?

    When i remove these dates element i am getting follwing error"expected exactly one item, got 0 items" error
    Sounds like your schema for these items indicates minOccurs="1" (or relies on that as the default).
    Edit the schema and change the definitions to be...
    <xs:element name="effectiveDate" minOccurs="0" ... />

  • I am having problems importing some CDs into iTunes on a laptop with Windows 8. Most CDs import without problem. The ones I can't import can be imported into iTunes with Windows 7. Does anybody know why this problem is occurring?

    I am having problems importing some CDs into iTunes on a laptop with Windows 8. Most CDs import without problem. The ones I can't import can be imported into iTunes with Windows 7. Does anybody know why this problem is occurring?

    First-off, this seems to be a general problem with 10.4 (across all the operating systems of which I am aware).  Unfortunately, I cannot provide a permanent solution but, if you need a quick fix, this will (hopefully) work for you.
    For some inexplicable reason, iTunes no longer recognises standard Windows paths.  For example:
    Y:\Music\Buddy Holly\Buddy Holly - Rave On.mp3
    The end result is that it will import a playlist with no content. 
    It will, however, recognise the equivalent Apple paths which look like this:
    file://localhost/Y:/Buddy Holly/Buddy Holly - Rave On.mp3
    It is possible to convert your existing playlists using a few basic replace commands in something like Notepad.  In my case, I made some code changes in my music manager and now generate two sets of playslists (one standard and one to accommodate iTunes).
    Forgive me foir stating the obvious but please remember to make sure that the disk / path containing your music is accessible when doing the import otherwise you will probably get a blank result.  Note that you can do a bulk import by selecting all the (revised) playlists and dragging them onto the iTunes sidebar.
    I am sorry that this is not a "clean" solution but it will work if you are in a bind.  The only alternative of which I am aware is to wait for Apple to fix the problem.

  • I have a large number of photos imported into iPhoto with the dates wrong.  How can I adjust multiple photos (with varying dates) to the same, correct, date?

    I have a large number of photos imported into iPhoto with the dates wrong.  How can I adjust multiple photos (with varying dates) to the same, correct, date?

    If I understand you correctly, when you enter a date in the Adjust Date and Time window, the picture does not update with the date you enter.  If that is the case then something is wrong with iPhoto or your perhaps your library.
    How large a date change are you putting in?  iPhoto currently has an issue with date changes beyond about 60 years at a time.  If the difference between the current date on the image and the date you are entering is beyond that range that may explain why this is not working.
    If that is not the case:
    Remove the following to the trash and restart the computer and try again:
    Home > Library > Caches > com.apple.iphoto
    Home > Library > Preferences > com.apple.iPhoto (There may be more than one. Remove them all.)
    ---NOTE: to get to the "home > library" hold down option on the keyboard and click on "Go" > "Library" while in the Finder.
    Let me know the results.

  • Can NOT cancel/Reverse GI with a date before the actual GI date

    Hi
    can NOT cancel/Reverse GI with a date before the actual GI date, if i do the PGI in wrong date, then how should i do?
    thanks

    >
    jo jo wrote:
    > Hi
    >
    > can NOT cancel/Reverse GI with a date before the actual GI date, if i do the PGI in wrong date, then how should i do?
    > thanks
    Hi Jo Jo,
    I am not sure if i understand your problem correctly.
    As far as my understanding goes you are trying to reverse a GI on a date before Actual goods issue date.
    If you have PGId on a date before planned GI date the system will update that date into Actual GI date and not planned GI Date.
    For example if you planned GI date was 1st April 2008 and you did PGI on 28th April 2008 Actual GI date will become 28th April 2008.
    So if you try to reverse PGI before 28th April you wont be allowed to as you cannot reverse a goods issue that has not happened.
    Hope it helps.
    Post furthur if i had misunderstood your problem.
    Regards
    Abhishek

  • How can I change the language with the .dat (.bak) file?

    How can I change the language with the .dat (.bak) file? Is it legal?
    How does it work?
    Thanks for answering

    https://discussions.apple.com/message/17364930#17364930

  • How can I port my PSE with the data to a new PC? [was:Jeanné]

    Wie kann ich mein PSE mit den Daten auf den neuen PC portieren?

    Jeanné wrote:
    How can I port my PSE with the data to a new PC?
      Translations by Microsoft® Translator
    The only way you can do this by installing the PSE on your new machine using the DVD and the serial number you must have bought.  Once this is done, you might want to copy all your photos from the old machine on to a flash drive and then copy them from flash drive to your Pictures folder and let PSE finds them and catalogs them automatically.
    This method is ideal if your haven't created very sophisticated catalog in your old machine because you may also want to transfer the old catalog on to your new PC so that you don't have to re-create the catalog from scratch.  If you want to transfer the catalog as well then on your old PC launch PSE Organizer and go to:
    File >> Backup Catalog
    This is also saved on the removable flash drive
    Now go to the new PC and launch Organizer and do almost the same thing except:
    File >> Restore Catalog
    Now this should almost get you started.
    Good luck.

  • HT4108 can I use my IPAD with a data projector?  and does the data projector have to be an iOS compatible one?

    can I use my IPAD with a data projector?  and does the data projector have to be an iOS compatible one?

    You can connect via a cable or wireless using an Apple TV.
    http://ipad.about.com/od/iPad_Guide/a/How-To-Connect-Your-Ipad-To-Your-Tv.htm
    iPad Accessories: Connections for a TV or Projector
    http://www.dummies.com/how-to/content/ipad-accessories-connections-for-a-tv-or-p rojector.html
    You may be interested in AirPlay on the Apple TV:
    Apple - AirPlay - Play content from iOS devices on Apple TV
    http://www.apple.com/airplay/
    Alternately, there are Apple Digital AV Adapters for hardwired connections:
    iOS: About Apple Digital AV Adapters
    http://support.apple.com/kb/ht4108
     Cheers, Tom

  • Call a method with complex data type from a DLL file

    Hi,
    I have a win32 API with a dll file, and I am trying to call some methods from it in the labview. To do this, I used the import library wizard, and everything is working as expected. The only problem which I have is with a method with complex data type as return type (a vector). According to this link, import library wizard can not import methods with complex data type.
    The name of this method is this:   const std::vector< BlackfinInterfaces::Count > Counts ()
    where Count is a structure defined as below:
    struct Count
       Count() : countTime(0) {}
       std::vector<unsigned long> countLines;
       time_t countTime;
    It seems that I should manually use the Call Library Function Node. How can I configure parameters for the above method?

    You cannot configure Call Library Function Node to call this function.  LabVIEW has no way to pass a C++ class such as vector to a DLL.

  • Error ORA-01426: numeric overflow when Creating table with double data type

    Hi,
    I am using ODP.NET to create a table with data from SQL to Oracle. The problem is with double data type fields that is equivalent to FLOAT(49) in Oracle. My syntax is:
    CREATE TABLE SCOTT.ALLTYPES
    F1 NUMBER(10),
    F10 DATE,
    F2 NUMBER(10),
    F3 NUMBER(5),
    F4 NUMBER(3),
    F5 FLOAT(23),
    F6 FLOAT(49),
    F7 NUMBER (38,5),
    F8 NVARCHAR2(500),
    F9 NVARCHAR2(500)
    Th error is with field F6 but I am not sure what is the correct type equivalent to double in SQL.
    I woul appreciate if anyone can help me with this problem.
    Sunny

    Does this simple test work for you?
    In database:
    create table float_test
      f1 float(49)
    );C# code:
    using System;
    using System.Data;
    using System.Text;
    using Oracle.DataAccess.Client;
    using Oracle.DataAccess.Types;
    namespace FloatTest
      /// <summary>
      /// Summary description for Class1.
      /// </summary>
      class Class1
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main(string[] args)
          // connect to local db using o/s authenticated account
          OracleConnection con = new OracleConnection("User Id=/");
          con.Open();
          // will hold the value to insert
          StringBuilder sbValue = new StringBuilder();
          // create a string of 49 number 9's
          for (int i = 0; i < 49; i++)
            sbValue.Append("9");
          // command object to perform the insert
          OracleCommand cmd = con.CreateCommand();
          cmd.CommandText = "insert into float_test values (:1)";
          // bind variable for the value to be inserted
          OracleParameter p_value = new OracleParameter();
          p_value.OracleDbType = OracleDbType.Double;
          p_value.Value = Convert.ToDouble(sbValue.ToString());
          // add parameter to collection
          cmd.Parameters.Add(p_value);
          // execute the insert operation
          cmd.ExecuteNonQuery();
          // clean up
          p_value.Dispose();
          cmd.Dispose();
          con.Dispose();
    }SQL*Plus after executing above code:
    SQL> select * from float_test;
            F1
    1.0000E+49
    1 row selected.- Mark

  • How to insert data in a column with uniqueidefier data type

    Guys,
    I need insert data in a column with uniqueidefier data type, when i am trying to that getting error.
    error message says: "Conversion failed when converting from a character string to uniqueidentifier."
    I have data in table a col1,col2,col3,col4 - col3,col4 has datatype as varchar and i am updating table b columns col1,col2 with table a col3 and col4.
    Please guide how to do it.

    Hi,
    Not any String can be convert to uniqueidentifier.
    1. you have to make sure u use a value which is fir to be uniqueidentifier
    2. Use convert or cast in the insert query in order to convert the string into uniqueidentifier
    insert X ... convert(uniqueidentifier, 'string which fit to be convert to uniqueidentifier')
    Please post DDL+DML for more specific help
    DDL = Data Definition Language. In our case that is, CREATE TABLE statements for your tables and other definitions that are needed to understand your tables structure and there for let us to test and reproduce the problem in our server. Without DDL no one
    can execute any query.
    How to get DDL: Right click on the table in Object Explorer and select script table as CREATE. Post these create table scripts here.
    DML = data manipulation language is a family of queries used for manipulating the data it self like: inserting, deleting and updating data. In our case we need some sample data in order to check the query and get result, so we need some indert query for
    sample data.
    If you post a "create query" for the tables and "insert query" with some sample, then we could help you without Assuming/Guessing. There is a reason that DDL is generally asked for and expected when discussing query problems - it helps
    to identify issues, clarify terminology and prevent incorrect assumptions.  Sample data also provides a common point of reference for the discussion. A script that can be used to illustrate or reproduce the issue you have, will encourage others to help.
    [Personal Site] [Blog] [Facebook]

  • Same Input name with different data type cause the reflection exception

    I have a proxy contains couple RFCs. Two RFCs contain an argument named IN_COMPANY_CODE with data type of ZTRE_FX_BUKRSTable. Another RFC contains the same argument name of IN_COMPANY_CODE but hold different data type (String). All RFCs are in the same proxy. Complie and build the application with no issue.
    But when I ran the RFC, it generates the reflection exception below:
    Method SAPProxy1.Z_F_Tre_R_Pre_Trade_Fx can not be reflected. --> There was an error reflecting 'In_Company_Code'. > The XML element named 'IN_5fCOMPANY_--5fCODE' from namespace '' references distinct types System.String and MSTRFOREX.ZTRE_FX_BUKRSTable. Use XML attributes to specify another XML name or namespace for the element or types.
    I realize the conflict introduced by the same name with difference data type. But I would like to know if this is fixable as a bug or if there is any best practice and/or some manual intervention to make it work.

    Please install fix from OSS note 506603. After this, right-click .sapwsdl file and select "Run custom tool".

  • JDBC insert with XMLTYPE data type

    Hi,
    SOAP to JDBC scenario. Oracle 11G as a receiver.
    Requirement is to  insert whole xml payload message in one of Oracle table fields as a xml string. Target oracle DB table column is defined with XMLTYPE data type, it has capacity to hold xml data more than 4GB. I am using graphical mapping with direct INSERT statement.
    When I try to insert xml payload with smaller size transaction goes through. However when the xml payload size increases it is giving following error in JDBC receiver communication channel monitoring.
    Could not execute statement for table/stored proc. "TABLE_NAME" (structure "StructName") due to java.sql.SQLException: ORA-01704: string literal too long
    Here is insert statement as in communication channel monitoring. (Note: XML payload with bold characters is truncated)
    INSERT INTO  TABLE_NAME (REQ_ID, OUTAGE_OBJ, TIMESTAMP, PROCESSED_FLAG) VALUES (VAL1, <?xml version="1.0" encoding="UTF-8"?>............</>, TO_DATE(2010-11-15 10:21:52,YYYY-MM-DD HH24:MI:SS), N)
    Any suggestions to handle this requirement?
    Thank you in advance.
    Anand More.

    Hi Anand,
    The problem here is definitely the length of the SQL query. i.e "INSERT INTO ......... VALUES......."
    This is what i got when i searched for this ORACLE error code:
    ORA-01704: string literal too long
    Cause: The string literal is longer than 4000 characters.
    Action: Use a string literal of at most 4000 characters. Longer values may only be entered using bind variables.
    Please ask a ORACLE DB expert on how to handle this Also i am not sure how can we handle Bind Varibales in SAP PI.
    I hope this helps.
    Regards, Gaurav.

  • Problem with packed data type variable?

    Hi all,
    I have a problem while doing calculations with packed data type variables . As they are saving in the format '0,00'. so unable to do calulations because of ',' . 
    To convert these fields into str and replacing ',' with '.' is very time consuming because i have many packed data type variables.
    Can you please provide any other alternative for over coming this problem? Is there any option while defining these variables?
    Thanks,
    Vamshi.

    Hi VAMSHI KRISHNA,
    First check out SU01 Tcode (if u don't have permission then u can ask BASIS to do it)
    Enter User Name
    Execute
    Goto Defaults Tab
    Check Out Decimal Notation here... set it 1,234,567.89
    SAVE it
    Log Off once and again login with the same user id and check the result...
    Hope it will solve your problem..
    Thanks & Regards
    ilesh 24x7

Maybe you are looking for