Passing object type as parameters

HI All,
I am having a procedure as parameters below
Procedure xyz( one in Varchar2
two in Varchar2
three in inv_abc_obj
four out inv_def_obj);
No i need to run this procedure as stand alone.
The object inv_abc_obj is again of type inv_abc_obj as objecct ( main_obj_type xx_itm_main_obj
sub_obj_type xx_tst_main_obj)
Can any one help me out how to execute the procedure xyz
Thanks in Advance

somtheing like this.
create or replace type t_type as object(
npid number,
ffid number,
str varchar2(200));
create or replace type tbl_type as table of t_type;
create or replace
procedure xyz(one in varchar2,two in varchar2, three in tbl_type, four out tbl_type)
as
begin
four:=three;
end;
declare
three tbl_type :=tbl_type();
four  tbl_type :=tbl_type();
begin
three.extend(1);
three(1) := t_type(1,2,'TEST');
xyz(1,2,three,four);
dbms_output.put_line(four(1).str);
end;
/

Similar Messages

  • Passing Object types using JDBC

    I need to pass Oracle user-defined object types in and out of
    PL/SQL stored procedures. Is this possible???
    Thanks
    null

    Hi Tina,
    I just had another thought. JDBC for 8.0 doesn't support
    user-defined SQL types. This feature isn't implemented until 8i.
    Sorry about the false lead!
    So you'd have to wrapper your object in another PL/SQL method
    which 'explodes' the user-defined type, as:
    procedure can_call_from_jdbc (ename varchar2, empno number, ...)
    is...
    begin
    call my_procedure(employee_t(ename, empno, ...));
    end;
    Pierre
    Oracle Product Development Team wrote:
    : Hi Tina,
    : Yikes! I'm glad you asked; it made me realize that some info
    : that's supposed to be posted on our external site is missing.
    I
    : think it'll take about a week to push this to our external
    site.
    : I'll try to find you a version and email it to you directly.
    : Thanks!
    : Pierre
    : Tina Creighton (guest) wrote:
    : : I'm currently using version 8.04 with Objects option, I'm
    : trying
    : : to locate the oracle.jpub class. Is there a way to download
    : the
    : : new jdbc that works with objects. Thanks. Tina
    : : Oracle Product Development Team wrote:
    : : : Absolutely!
    : : : the easiest thing is first to use JPub to generate a Java
    : : object
    : : : which is an analogue to the SQL object you have. For
    : example,
    : : : if your SQL object is called 'EMPLOYEE_T', you can invoke
    : JPub
    : : : with:
    : : : $ jpub -sql=employee_t -url=jdbc:oracle:oci8:@
    : : -user=scott/tiger
    : : : or even
    : : : $ java oracle.jpub.Main -sql=employee_t
    : -url=jdbc:oracle:oci8:@
    : : : -user=scott/tiger
    : : : This'll give you a Java class used to represent Java
    : instances
    : : of
    : : : the SQL 'employee_t', featuring friendly setters and getter
    : for
    : : : the fields.
    : : : If you have PL/SQL programs which take arguments of type
    : : : employee_t, such as:
    : : : PROCEDURE P1 (N NUMBER, E EMPLOYEE_T) IS...
    : : : PROCEDURE P2 (N NUMBER, E OUT EMPLOYEE_T) IS...
    : : : PROCEDURE P3 (N NUMBER, E IN OUT EMPLOYEE_T) IS...
    : : : You can call them in a SQLJ program as:
    : : : main () {
    : : : employee_t e; // the class generated by JPub
    : : : #sql {call P1(1, :e);}
    : : : #sql {call P2(2, :out e);}
    : : : #sql {call P3(3, :in out e);}
    : : : to call your three PL/SQL procedures. After the call to P2
    : and
    : : : P3, your
    : : : variable 'e' will be populated with the contents of the new
    : : : employee_t value
    : : : that was output from the PL/SQL method.
    : : : (SQLJ is just a shorthand way of calling JDBC. SQLJ
    programs
    : : are
    : : : translated
    : : : into SQLJ programs by calling the "SQLJ Translator":
    : : : $ sqlj myfile.sqlj
    : : : Pierre
    : : : Tina creighton (guest) wrote:
    : : : : I need to pass Oracle user-defined object types in and
    out
    : of
    : : : : PL/SQL stored procedures. Is this possible???
    : : : : Thanks
    : : : Oracle Technology Network
    : : : http://technet.oracle.com
    : Oracle Technology Network
    : http://technet.oracle.com
    Oracle Technology Network
    http://technet.oracle.com
    null

  • Passing Object parameters to Procedures in Oracle

    Hi,
    Can any one please provide me with a sample example how to pass object types as parameters (IN) to a procedure/package.
    Thanks in Advance.

    Here is a simple example
    SQL> create or replace type tbl as table of number
      2  /
    Type created.
    SQL> create or replace procedure proc(pTbl tbl)
      2  as
      3  begin
      4     for i in 1..pTbl.count
      5     loop
      6             dbms_output.put_line(pTbl(i));
      7     end loop;
      8  end;
      9  /
    Procedure created.
    SQL> exec proc(tbl(1,2,3,4,5))
    1
    2
    3
    4
    5
    PL/SQL procedure successfully completed.

  • Passing objects by reference in PL/SQL

    Hi,
    I have come across an unexpected problem using object types in PL/SQL that is causing me some grief. I'm from a Java background and am relatively new to Oracle Objects but what I'm trying to do is fairly trivial, I think. The code below illustrates the problem.
    --- cut here ---
    CREATE OR REPLACE TYPE test_obj_t AS OBJECT
    num INTEGER,
    CONSTRUCTOR FUNCTION test_obj_t RETURN SELF AS RESULT
    CREATE OR REPLACE TYPE BODY test_obj_t IS
    CONSTRUCTOR FUNCTION test_obj_t RETURN SELF AS RESULT IS
    BEGIN
    num := 0;
    RETURN;
    END;
    END;
    CREATE OR REPLACE PACKAGE test_obj_ref AS
    PROCEDURE init(o IN test_obj_t);
    PROCEDURE inc;
    FUNCTION get_num RETURN INTEGER;
    END;
    CREATE OR REPLACE PACKAGE BODY test_obj_ref IS
    obj test_obj_t;
    PROCEDURE init(o IN test_obj_t) IS
    BEGIN
    obj := o;
    END;
    PROCEDURE inc IS
    BEGIN
    obj.num := obj.num + 1;
    END;
    FUNCTION get_num RETURN INTEGER IS
    BEGIN
    RETURN obj.num;
    END;
    END;
    --- cut here ---
    The object type test_obj_t holds a integer and the test_obj_ref package holds a 'reference' to an instance of the object.
    To test the above code I run this PL/SQL block:
    declare
    obj test_obj_t;
    begin
    obj := test_obj_t;
    test_obj_ref.init(obj);
    dbms_output.put_line('obj.num='||obj.num);
    dbms_output.put_line('test_obj_ref.get_num='||test_obj_ref.get_num);
    test_obj_ref.inc;
    dbms_output.put_line('obj.num='||obj.num);
    dbms_output.put_line('test_obj_ref.get_num='||test_obj_ref.get_num);
    test_obj_ref.inc;
    dbms_output.put_line('obj.num='||obj.num);
    dbms_output.put_line('test_obj_ref.get_num='||test_obj_ref.get_num);
    end;
    giving the output:
    obj.num=0
    test_obj_ref.get_num=0
    obj.num=0
    test_obj_ref.get_num=1
    obj.num=0
    test_obj_ref.get_num=2
    It appears that the object held by the test_obj_ref package is being incremented as expected, but I would have expected the object declared in the PL/SQL block to be pointing to the same object and so should report the same incremented values.
    I suspect that the object is copied in the call to test_obj_ref.init() so I end up with two object instances, one that is held by the test_obj_ref package and one in the anonymous block. Although, I thought that all IN parameters in PL/SQL are passed by reference and not copied!
    Am I right?
    Is passing objects by reference possible in PL/SQL, if so how?
    I'm using Oracle 10.2.0.3.
    Cheers,
    Andy.

    the object being passed to the test_obj_ref.init+ procedure is passed by reference; however, when you assign it to your package variable obj it is being copied to a new instance. you can pass object instances as parameters to procedures using the +IN OUT [NOCOPY]+ *calling mode, in which case modifications to the attributes of the passed object will be reflected in the calling scope's instance variable.
    oracle's only other notion of an object reference is the +"REF <object-type>"+ datatype, which holds a reference to an object instance stored in an object table or constructed by an object view.
    hope this helps...
    gerard

  • Physical service to invoke Oracle stored procedure taking an object type

    Hello,
    I have some stored procedures in Oracle that take a complex object type as parameters. Can I invoke these directly from ODSI? If so, how do I create the physical service for this?
    Example:
    CREATE OR REPLACE TYPE "CCSUSERDV"."TEST_TYPE" as object (
    name varchar2(80),
    text varchar2(1000),
    some_other number
    CREATE OR REPLACE PACKAGE CCSUSERDV.TEST
    as
    function joinText(inVal in TEST_TYPE) return varchar2;
    end;
    CREATE OR REPLACE PACKAGE BODY CCSUSERDV.TEST
    AS
    FUNCTION joinText(inVal in TEST_TYPE) return varchar2 AS
    BEGIN
    if (inVal.text is not null) then
    return inVal.name || '-' || inVal.text;
    else
    return inVal.name || ':' || inVal.some_other;
    end if;
    END;
    END;
    I Want to be able to call TEST.joinText from OSDI. I know I could create a separate function that takes all the attributes of my object, but it would be considerably more convenient to implement in terms of the object instead, because there are several functions that take the same set of about 20 fields as a request.
    Thank you!!
    Jeff

    (1) Your best bet is to create a wrapper stored procedure that takes simple arguments and constructs the object, then calls your stored procedure with the object. You call the wrapper stored procedure from ODSI. JPublisher can create wrapper stored procedures for you.
    (2) If it is impossible for you to create a wrapper stored procedure in the database, you can create a physical data service from the existing stored procedure. You will notice that the function in the physical data service will have simple arguments (not the object), and if you try to execute it, it will fail. It's up to you to write an anonymous pl/sql block that wraps the existing stored procedure (basically what you would have had to write for (1)), and edit the metadata in the physical ds - where it has the name of the stored procedure, replace the name with your anonymous PL/SQL block.
    Below is what the CREATE_BATCH stored procedure from Oracle Process Manufacturing would look like. (it also has CURSOR args - so it is uglier than just Objects). It also demonstrates that you need to do a conversion of boolean args.
    xquery version "1.0" encoding "WINDOWS-1252";
    (::pragma xds <x:xds xmlns:x="urn:annotations.ld.bea.com" targetType="t:CERTIFY_BATCH" xmlns:t="ld:JdbcTest4DataServices/opm/CERTIFY_BATCH">
    <creationDate>2007-01-14T20:55:37</creationDate>
    <relationalDB dbVersion="10" dbType="oracle" name="oracleXeDataSource"/>
    </x:xds>::)
    declare namespace f1 = "ld:JdbcTest4DataServices/opm/CERTIFY_BATCH";
    import schema namespace t1 = "ld:JdbcTest4DataServices/opm/CERTIFY_BATCH" at "ld:JdbcTest4DataServices/opm/schemas/CERTIFY_BATCH.xsd";
    (::pragma function <f:function xmlns:f="urn:annotations.ld.bea.com" kind="read" nativeName="DECLARE p_batch_header gme_batch_header%rowtype; x_batch_header gme_batch_header%rowtype; x_unallocated_material gme_api_pub.unallocated_materials_tab; TYPE rc IS REF CURSOR; PROCEDURE to_ref_cursor(x IN gme_api_pub.unallocated_materials_tab, ref_cursor IN OUT rc) IS l_data bea_unallocated_materials_tab := bea_unallocated_materials_tab(); BEGIN FOR i IN x.FIRST .. x.LAST LOOP l_data.EXTEND; l_data(i) := bea_unallocated_materials_type(x(i).batch_id, x(i).batch_no, x(i).material_detail_id, x(i).line_type, x(i).line_no, x(i).item_id, x(i).item_no, x(i).alloc_qty, x(i).unalloc_qty, x(i).alloc_uom); END LOOP; OPEN ref_cursor FOR SELECT * FROM TABLE ( CAST (l_data AS bea_unallocated_materials_tab) ); END; FUNCTION to_boolean(n IN NUMBER) RETURN BOOLEAN IS BEGIN IF (n = 0) THEN RETURN FALSE; ELSE RETURN TRUE; END IF; END to_boolean;BEGIN p_batch_header.batch_id := ?; p_batch_header.batch_no := ?; p_batch_header.plant_code := ?; p_batch_header.batch_type := ?; p_batch_header.actual_start_date := ?; p_batch_header.actual_cmplt_date := ?; gme_api_pub.certify_batch( p_api_version => ?, p_validation_level => ?, p_init_msg_list => to_boolean(?), p_commit => to_boolean(?), x_message_count => ?, x_message_list => ?, x_return_status => ?, p_del_incomplete_manual => to_boolean(?), p_ignore_shortages => to_boolean(?), p_batch_header => p_batch_header, x_batch_header => x_batch_header, x_unallocated_material => x_unallocated_material ); ? := x_batch_header.batch_id; ? := x_batch_header.batch_no; ? := x_batch_header.plant_code; ? := x_batch_header.batch_type; ? := x_batch_header.actual_start_date; ? := x_batch_header.actual_cmplt_date; ? := x_batch_header.plan_start_date; ? := x_batch_header.plan_cmplt_date; ? := x_batch_header.due_date; ? := x_batch_header.recipe_validity_rule_id; ? := x_batch_header.wip_whse_code; to_ref_cursor(x_unallocated_material, ?);END;" nativeLevel2Container="" nativeLevel3Container="" style="storedProcedure">
    <params xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdt="http://www.w3.org/2004/07/xpath-datatypes" xmlns:pn1="ld:JdbcTest4DataServices/opm/CERTIFY_BATCH" >
    <param name="BATCH_ID" kind="in" xqueryType="xs:string" nativeTypeCode="12" nativeType="VARCHAR2"/>
    <param name="BATCH_NO" kind="in" xqueryType="xs:decimal" nativeTypeCode="3" nativeType="NUMBER"/>
    <param name="PLANT_CODE" kind="in" xqueryType="xs:string" nativeTypeCode="12" nativeType="VARCHAR2"/>
    <param name="BATCH_TYPE" kind="in" xqueryType="xs:decimal" nativeTypeCode="3" nativeType="NUMBER"/>
    <param name="ACTUAL_START_DATE" kind="in" xqueryType="xs:dateTime" nativeTypeCode="93" nativeType="DATE"/>
    <param name="ACTUAL_CMPLT_DATE" kind="in" xqueryType="xs:dateTime" nativeTypeCode="93" nativeType="DATE"/>
    <param name="P_API_VERSION" kind="in" xqueryType="xs:decimal" nativeTypeCode="3" nativeType="NUMBER"/>
    <param name="P_VALIDATION_LEVEL" kind="in" xqueryType="xs:decimal" nativeTypeCode="3" nativeType="NUMBER"/>
    <param name="P_INIT_MSG_LIST" kind="in" xqueryType="xs:integer" nativeTypeCode="3" nativeType="NUMBER"/>
    <param name="P_COMMIT" kind="in" xqueryType="xs:integer" nativeTypeCode="3" nativeType="NUMBER"/>
    <param name="X_MESSAGE_COUNT" kind="out" xqueryType="xs:decimal" nativeTypeCode="3" nativeType="NUMBER"/>
    <param name="X_MESSAGE_LIST" kind="out" xqueryType="xs:string" nativeTypeCode="12" nativeType="VARCHAR2"/>
    <param name="X_RETURN_STATUS" kind="out" xqueryType="xs:string" nativeTypeCode="12" nativeType="VARCHAR2"/>
    <param name="P_DEL_INCOMPLETE_MANUAL" kind="in" xqueryType="xs:integer" nativeTypeCode="3" nativeType="NUMBER"/>
    <param name="P_IGNORE_SHORTAGES" kind="in" xqueryType="xs:integer" nativeTypeCode="3" nativeType="NUMBER"/>
    <param name="BATCH_ID" kind="out" xqueryType="xs:string" nativeTypeCode="12" nativeType="VARCHAR2"/>
    <param name="BATCH_NO" kind="out" xqueryType="xs:decimal" nativeTypeCode="3" nativeType="NUMBER"/>
    <param name="PLANT_CODE" kind="out" xqueryType="xs:string" nativeTypeCode="12" nativeType="VARCHAR2"/>
    <param name="BATCH_TYPE" kind="out" xqueryType="xs:decimal" nativeTypeCode="3" nativeType="NUMBER"/>
    <param name="ACTUAL_START_DATE" kind="out" xqueryType="xs:dateTime" nativeTypeCode="93" nativeType="DATE"/>
    <param name="ACTUAL_CMPLT_DATE" kind="out" xqueryType="xs:dateTime" nativeTypeCode="93" nativeType="DATE"/>
    <param name="PLAN_START_DATE" kind="out" xqueryType="xs:dateTime" nativeTypeCode="93" nativeType="DATE"/>
    <param name="PLAN_CMPLT_DATE" kind="out" xqueryType="xs:dateTime" nativeTypeCode="93" nativeType="DATE"/>
    <param name="DUE_DATE" kind="out" xqueryType="xs:dateTime" nativeTypeCode="93" nativeType="DATE"/>
    <param name="RECIPE_VALIDITY_RULE_ID" kind="out" xqueryType="xs:string" nativeTypeCode="12" nativeType="VARCHAR2"/>
    <param name="WIP_WHSE_CODE" kind="out" xqueryType="xs:string" nativeTypeCode="12" nativeType="VARCHAR2"/>
    <param name="X_UNALLOCATED_MATERIAL" kind="out" xqueryType="pn1:X_UNALLOCATED_MATERIAL_ROW" nativeTypeCode="-10" nativeType="REF CURSOR"/>
    </params>
    </f:function>::)
    declare function f1:CERTIFY_BATCH($p_batch_header_batch_id as xsd:string, $p_batch_header_batch_no as xsd:decimal, $p_batch_header_plant_code as xsd:string, $p_batch_header_batch_type as xsd:decimal, $p_batch_header_actual_start_date as xsd:dateTime, $p_batch_header_actual_cmplt_date as xsd:dateTime, $p_api_version as xsd:decimal, $p_validation_level as xsd:decimal, $p_init_msg_list as xsd:integer, $p_commit as xsd:integer, $p_del_incomplete_manual as xsd:integer, $p_ignore_shortages as xsd:integer) as schema-element(t1:CERTIFY_BATCH) external;

  • Debugging Oracle Object types

    Hi
    I'm trying to debug a application (in 9i Release 2) using PL/SQL object types and was wondering if JDev can help.
    I can see the objects, and their code, but the debugger seems unable to step into them, see local variables etc. It also incorrectly identifies code errors -- in short it appears to be using the 9i Release 1 drivers.
    I've just installed version 9.0.3.2 but that hasn't helped. The release notes say helpfully that 9.0.3 can handle the drivers for 9i R2, but it won't use them!
    I'm about to try the 10g preview, but I'm not feeling hopeful. Is this something I can expect to be fixed or do I have to find some other way of debugging my code?
    Thanks,
    Glenn.

    Hi,
    I also have problems debugging oracle objects. I'm running an Oracle Database Version 9.2.0.1.0 and use
    JDeveloper 9.0.3 to remotely debug PL/SQL Code. The debugging works fine when I'm setting breakpoints and
    step through the code.
    But I seem to be unable to list the value of variables of
    object types and variables of nested table types. And of course I cannot set conditional breakpoints on variables that have an Oracle object type. If I try 10g, there is no improvement. The object types are not recognized as Oracle object types or nested table types, instead they are shown as $Oracle.builtin.OPAQUE
    I need this feature to remotely debug procedures, that mostly use Oracle object types as parameters. Is there any possibility that I can get this feature to work? Otherwise JDeveloper is not much of a use for me when I'm debugging PL/SQL code.
    Thanks,
    Astrid
    I provided an example, in which I create the above mentioned types and fill them with data, but where I'm unable to retrieve the values of the variables in JDeveloper:
    ---------------------EXAMPLE--------------------------
    PROMPT Creating TYPE 'ot_hwemployee'
    CREATE OR REPLACE TYPE ot_hwemployee AS OBJECT (
    emp_id NUMBER (10),
    emp_name VARCHAR2 (200)
    PROMPT Creating TYPE 'nt_hwemployee'
    CREATE OR REPLACE TYPE nt_hwemployee AS TABLE OF ot_hwemployee
    PROMPT Creating TYPE 'nt_hwinteger'
    CREATE OR REPLACE TYPE nt_hwinteger AS TABLE OF NUMBER (20)
    PROMPT Creating PROCEDURE 'checkEmployees'
    CREATE OR REPLACE PROCEDURE checkEmployees
    AS
    vnt_employees nt_hwemployee;
    BEGIN
    vnt_employees := nt_hwemployee(ot_hwemployee(1, 'Mustermann Max'),
    ot_hwemployee(2, 'Beispiel Barbara'),
    ot_hwemployee(3, 'Schober-Gant Astrid'));
    deleteemployees(vnt_employees);
    END checkEmployees;
    PROMPT Creating PROCEDURE 'deleteEmployees'
    CREATE OR REPLACE PROCEDURE deleteEmployees (
    pnt_employees IN OUT nt_hwemployee)
    AS
    vnt_employees_deleted nt_hwinteger;
    BEGIN
    vnt_employees_deleted := nt_hwinteger();
    FOR i IN pnt_employees.FIRST .. pnt_employees.LAST LOOP
    IF (pnt_employees(i).emp_id > 2) THEN
    vnt_employees_deleted.EXTEND;
    vnt_employees_deleted(vnt_employees_deleted.COUNT) := pnt_employees(i).emp_id;
    pnt_employees.delete(i);
    END IF;
    END LOOP;
    END deleteEmployees;
    -------------------------END EXAMPLE-------------------

  • How to pass an IN argument of object type from VB

    I need to call a PL/SQL function in Oracle 8.1.6 from VB. One of the IN arguments is an object type (TYPE). How would I instantiate the variable of Oracle object type on VB side so that it can be passed to the Oracle?
    Thank you

    Hi,
    Per the ODP docs,
    ODP.NET supports binding parameters of PL/SQL Associative Arrays which contain the following data types.
    +■ BINARY_DOUBLE+
    +■ BINARY_FLOAT+
    +■ CHAR+
    +■ DATE+
    +■ NCHAR+
    +■ NUMBER+
    +■ NVARCHAR2+
    +■ RAW+
    +■ ROWID+
    +■ UROWID+
    +■ VARCHAR2+
    It should work if you create a UDT to hold a varray of mdsys.sdo_geometry, for example.
    Hope it helps,
    Greg

  • Error in creation of Object Type from XML passed

    Hi,
    I am facing a problem creating a appropriate a object type for a XML.
    Below are the details:
    XML Passed
    <mer_offer_action_data>
    <form_id>
    134039588
    </form_id>
    <action_cd>
    OA
    </action_cd>
    <offer_decline_reason_cd>
    </offer_decline_reason_cd>
    <start_dt>
    </start_dt>
    <candidate>
    <ds_prs_id>
    109315
    </ds_prs_id>
    <ds_prs_id>
    110534
    </ds_prs_id>
    <ds_prs_id>
    110059
    </ds_prs_id>
    </candidate>
    </mer_offer_action_data>
    Types Declaration
    +CREATE OR REPLACE type MER_OFF_CANDIDATE
    AS
    OBJECT
    DS_PRS_ID NUMBER
    CREATE OR REPLACE TYPE MER_OFF_CANDIDATE_t
    AS
    TABLE OF MER_OFF_CANDIDATE;
    CREATE OR REPLACE type MER_OFFER_ACT_DATA
    AS
    OBJECT
    FORM_ID NUMBER,
    ACTION_CD VARCHAR2(6),
    OFFER_DECLINE_REASON_CD VARCHAR2(6),
    START_DT VARCHAR2(11),
    CANDIDATE MER_OFF_CANDIDATE_t
    CREATE OR REPLACE TYPE MER_OFFER_ACT_DATA_t
    AS
    TABLE OF MER_OFFER_ACT_DATA;
    CREATE OR REPLACE type MER_OFFER_ACTION_DATA
    AS
    OBJECT
    MER_OFF_ACT_DATA MER_OFFER_ACT_DATA_t
    /+
    My Declaration
    +merOffActDataXML      xmltype;
    merOffActData     MER_OFFER_ACTION_DATA := MER_OFFER_ACTION_DATA(MER_OFFER_ACT_DATA_t());+
    Inside Pl/SQL block
    +-- Converts XML data into user defined type for further processing of data
    xmltype.toobject(merOffActDataXML,merOffActData);+
    when I run the Pl/Sql block it gives me error
    ORA-19031: XML element or attribute FORM_ID does not match any in type ORADBA.MER_OFFER_ACTION_DATA
    which means the object type mapping is wrong
    I would like to know whether the object type I had created is correct or not.
    Thanks for your help
    Beda

    Bedabrata Patel wrote:
    Below are the details:The details except for a description of the problem
    I am facing a problem creating a appropriate a object type for a XML.And which error you are getting
    Error in creation of Object Type http://download.oracle.com/docs/cd/E11882_01/server.112/e10880/toc.htm
    And which version of Oracle you are getting the unknown error creating the unknown problem.

  • Schema of a new Object Type: message pass the BIU without validation

    Hi,
    i've defined a new Object Type for send messages to Web Service. I've created the schema files and i've uploaded there in repository with the "Import" function of GUI. After, i've defined the XML file for the "Execute" function of the B1i GUI.
    After the load of files, in the repository the files are in correct position.
    In my BIU the definition of sender and receiver system type is correct, and also the definition of SenderMainObjectTypeID and ReceiverObjectTypeID. The message from B1 pass through the IPO chain without problems and the message is received by teh Web Service.
    If modify the file XSL into the BIU, a message with less elements than a schema pass without problem.
    If delete the schema from repository, the message pass without validation.
    I would know because the schema is bypassed...
    Thans

    Ok,
    solved with introduction of validation point in a customized IPO using a branch / unbranch atoms.
    Bye.

  • How can we execute a procedure with object type as its parameter, by passing partial elements.

    Can somebody help...
    I have a procedure which takes parameter as IN OUT extended object type .Below is the example.
    PROCEDURE p_save (example IN OUT xyz_obj)
    my object type "xyz_obj" have elements with other object types also, and that itself have around 100 elements.
    And when calling the above procedure for test purpose, how is it possible to pass partial elements of the object type rather than setting all unused elements to null.

    user13026549 wrote:
    Can somebody help...
    I have a procedure which takes parameter as IN OUT extended object type .Below is the example.
    PROCEDURE p_save (example IN OUT xyz_obj)
    my object type "xyz_obj" have elements with other object types also, and that itself have around 100 elements.
    And when calling the above procedure for test purpose, how is it possible to pass partial elements of the object type rather than setting all unused elements to null.
    It ISN'T possible. How could it be? Each attribute has to be set to something don't you think?
    A common way to handle that is to define a public package variable that is an instance of the object type and has ALL elements set to null. As Odie suggested a custom constructor function can be used for that.
    Then you create your procedure instance by starting with an instance of the package variable (where everything is null) and setting values for the attributes you need.

  • How to pass conventional table values in object types Dynamically

    Hi All,
    Need urgent help...
    TYPE add_ty is object
    (add1     varchar2(50),
    add2     varchar2(50),
    add2     varchar2(50))
    type add_ty_obj is table of add_ty;
    create table company_dtl
    (cmpid          number(10),
    cmpname          varchar2(100),
    address          add_ty_obj);
    table company_dtl contains demo data as below:-
    cmpid cmpname address
    C101     abc     UK,
              USA,
              AUS
    c102     xyz     UK,
              CN,
              GER
    If I want to read data from table and pass data to object add_ty_obj,
    So How can I do it dynamically. I am willing to create procedure
    which can read data from above table and pass that to mentioned object in
    OUT parameter.
    Out parameter contains same object type somewhere in middleware.
    Please help or advice.
    Thanks in Advance..

    Hi
    i have tried to make procedure that take company id as input and give their address as output.I think it might be useful for you. Or if you want something different
    please write us with more detail.
    CREATE OR REPLACE PROCEDURE READ_DATA_PROC( VAR_CMPID IN NUMBER , VAR_TYP OUT ADD_TY_OBJ)
    AS
    BEGIN
    SELECT ADDRESS INTO VAR_TYP FROM COMPANY_DTL WHERE CMPID = V_CMPID ;
    END READ_DATA_PROC;
    here i'm also adding your table and type definition i've used
    CREATE TYPE ADD_TY IS OBJECT
    (ADD1 VARCHAR2(50),
    ADD2 VARCHAR2(50),
    ADD3 VARCHAR2(50));
    CREATE TYPE ADD_TY_OBJ AS TABLE OF ADD_TY;
    CREATE TABLE COMPANY_DTL
    (CMPID NUMBER(10),
    CMPNAME VARCHAR2(100),
    ADDRESS ADD_TY_OBJ)
    NESTED TABLE ADDRESS STORE AS ADDRESS_TAB;thanks,
    Neeraj
    Edited by: Neeraj.Ora on Feb 26, 2011 1:03 PM

  • Passing Ref Cursor as parameter to object type method

    I am encountering a problem passing a parameter of type REF CURSOR to methods of a set of object types I am developing.
    Here is an example of what I am trying to do:
    create or replace package p1 as
    type c_Cursor is ref cursor;
    end p1;
    create or replace type t_Object as object
    not instantiable method m1(p_Cursor in p1.c_Cursor) return varchar2
    ) not instantiable not final;
    create or replace type t_Subtype under t_Object as
    overriding method m1(p_Cursor in p1.c_Cursor)
    return varchar2
    The problem is that the PL/SQL compiler gives the error message PLS-00201 "p1.c_Cursor" not defined.
    According to my PL/SQL book (SF's Oracle PL/SQL Programming) the only way to use a ref cursor as a parameter to functions/procedures is to wrap them in a package. Indeed I have developed a test procedure in a different package that uses p1.c_Cursor as a parameter and it works fine.
    Oracle's documemtation suggests that object security (roles etc) can cause this error but as all the objects are being created in the same schema I don't see how this should be a problem.
    If anyone can suggest how to get around this problem I will be very grateful.
    BTW, if there are any mistakes in my sample code it's because I am writing it from memory as I don't have Internet access at work.
    Thanks,
    Charles.

    Thanks for your reply. I am still baffled as to why it doesn't work but, as you correctly point out, SYS_REFCURSOR works just fine. I figured that out earlier today and now the problem is solved.
    Charles.

  • ORA-30626: function/procedure parameters of remote object types not support

    Hello,
    I am trying to create a dynamic LOV.
    I have a table and package in a remote database, I am connecting to the database using dblink. When I access package I am getting error
    ORA-30626: function/procedure parameters of remote object types are not supported
    However I can access table with [email protected], not the package!
    How can I solve this problem?

    Did you ever get an answer/workaround to this? I'm having similar problems in 10g.

  • Passing Values to Object Type Attributes

    Hi Experts,
    I need to pass values to object type attributes amount,channel and company code from zprogram.
    I have got FM 'SWO_INVOKE'.But in this FM how will I pass values to 3 attributes.
    I have created object type through SWO1 .Is it necessary to call FM SWO_CREATE before FM 'SWO_INVOKE'.
    Please suggest.
    Regards,
    Kaustubh.

    Hi,
    I guess you will have to Initialize business object first by using the function module "SWO_CREATE' and then call the other function module to pass the attributes. I am not sure, but please check by passing the attribute name and value to the tables parameter 'CONTAINER'.
    CONTAINER-ELEMENT = <Attribute name>.
    CONTAINER-VALUE = <value from the Zprogram>.
    Hope this will help.
    Thanks,
    Samson

  • Trying to pass Oracle array/object type to Java

    I have a Java class with two inner classes that are loaded into Oracle:
    public class PDFJ
        public static class TextObject
            public String font_name;
            public int font_size;
            public String font_style;
            public String text_string;
        public static class ColumnObject
            public int left_pos;
            public int right_pos;
            public int top_pos;
            public int bottom_pos;
            public int leading;
            public TextObject[] column_texts;
    }I have object types in Oracle as such that bind to the Java classes:
    CREATE OR REPLACE TYPE "PROGRAMMER"."PDFJ_TEXT" AS OBJECT
    EXTERNAL NAME 'PDFJ$TextObject'
    LANGUAGE JAVA
    USING SQLData(
      "FONT_NAME" VARCHAR2(25) EXTERNAL NAME 'font_name',
      "FONT_SIZE" NUMBER EXTERNAL NAME 'font_size',
      "FONT_STYLE" VARCHAR2(1) EXTERNAL NAME 'font_style',
      "TEXT_STRING" VARCHAR2(4000) EXTERNAL NAME 'text_string'
    CREATE OR REPLACE TYPE "PROGRAMMER"."PDFJ_TEXT_ARRAY" AS
      TABLE OF "PROGRAMMER"."PDFJ_TEXT";
    CREATE OR REPLACE TYPE "PROGRAMMER"."PDFJ_COLUMN" AS OBJECT
    EXTERNAL NAME 'PDFJ$ColumnObject'
    LANGUAGE JAVA
    USING SQLData(
      "LEFT_POS" NUMBER EXTERNAL NAME 'left_pos',
      "RIGHT_POS" NUMBER EXTERNAL NAME 'right_pos',
      "TOP_POS" NUMBER EXTERNAL NAME 'top_pos',
      "BOTTOM_POS" NUMBER EXTERNAL NAME 'bottom_pos',
      "LEADING" NUMBER EXTERNAL NAME 'leading',
      "COLUMN_TEXTS" "PROGRAMMER"."PDFJ_TEXT_ARRAY" EXTERNAL NAME 'column_texts'
    CREATE OR REPLACE TYPE "PROGRAMMER"."PDFJ_COLUMN_ARRAY" AS
        TABLE OF "PROGRAMMER"."PDFJ_COLUMN";
    /I successfully (as far as I know) build a PDFJ_COLUMN_ARRAY object in a PL/SQL procedure. The PDFJ_COLUMN_ARRAY contains PDFJ_COLUMN objects; each of those objects contains a PDFJ_TEXT_ARRAY of PDFJ_TEXT objects (Example: pdf_column_array(i).pdf_text_array(i).text_string := 'something';). In this procedure, I pass this PDFJ_COLUMN_ARRAY as a parameter to a Java function. I assume the Java function parameter is supposed to be a oracle.sql.ARRAY object.
    I cannot figure out how to decompose this generic ARRAY object into a ColumnObject[] array. I also tried Googling and searching the forums, but I can't figure out matching search criteria. I was wondering if anyone here knows anything about passing user-defined Oracle type objects to a Java function and retrieving the user-defined Java class equivalents that they are supposedly mapped to--especially a user-defined array type of user-defined object types containing another user-defined array type of user-defined object types.

    Ok. I will try asking on the JDBC forum. So, don't
    flame me for cross-posting. :PWe won't, if over there you just post basically a
    link to this one.
    sigh Guess what, he did it the flame-deserving way. It's crossposted at:
    http://forum.java.sun.com/thread.jspa?threadID=602805
    <flame level="mild">Never ceases to amaze me how people don't think that posting a duplicate rather than a simple link isn't wasteful, as people could end up answering in both of them, not seeing each other's answers</flame>

Maybe you are looking for

  • Can you mix DV and HDV in the same sequence?

    Hi Everyone.... I am new to the forum, and new to FCP...yes! I joined the dark side and just got a MAC. I am trying to learn this system, and the 500 manuals it came with are about as clear as mud..... Can I mix 16x9 DV footage with 16x9 HDV footage?

  • How to find out where i'm using a style

    Hello everyone I am an user of Indesign CS4, a few days ago I was working with some files and I had a very particular need. I want to know where some paragraph and character styles are being used in the content of my document. Is there any way, maybe

  • Final Cut Pro HD on my imac G5

    I just bought an iMac G5 (iSight) and I found out Final Cut Pro HD is not running. The system is asking for an AGP GRAPHICS CARD. Has anybody experienced this? Do I have to get an extra Graphics Card? Is not enought with the iMac hardware itself as i

  • "Best practice" for accessing a class from a custom component?

    My app utilizes a simple class to hold global properties such as username, session data, and similar data. The class is initialized at app startup via code similar to: appGlobals:myGlobals=new myGlobals. Many of the custom MXML components and AS clas

  • Bookmark which changes the date automatically to the acutal date

    Hi, the bookmark funktion is used very much by our users. But they have one problem: There is no possibilty to run the bookmark with the actual date and not with the date when the bookmark was created. Is there any posiblity to change this? Best rega