How to initialize a Type Object??

Hi,
I have a procedure as below, which has type t_r_rep_data and a table having this type as record, but when I called this procedure, it has ORA-06530 error: Reference to uninitialized composite. Can you tell me how to initialize a type Object?
Also, is it this the right way to insert a type record into the table, or can I just just INSERT statement?
Many thanks
PROCEDURE add_row
( in_row_type_ind CHAR,
in_ordering VARCHAR2
,in_record_type VARCHAR2
,in_level1_value VARCHAR2
,in_level1_description VARCHAR2
,in_level2_value VARCHAR2
,in_level2_description VARCHAR2
,in_level3_value VARCHAR2
,in_level3_description VARCHAR2
,in_level4_value VARCHAR2
,in_level4_description VARCHAR2
,in_amount_as_of_date1 NUMBER
,in_amount_as_of_date2 NUMBER
,io_table IN OUT t_ntr_rep_data
IS
l_row_count NUMBER;
l_row t_r_rep_data;
BEGIN
-- ??? not sure where and how to do the initialization bit
l_row.row_type_ind := NULL;
l_row.ordering := NULL;
l_row.record_type := NULL;
l_row.level1_value := NULL;
l_row.level1_description := NULL;
l_row.level2_value := NULL;
l_row.level2_description := NULL;
l_row.level3_value := NULL;
l_row.level3_description := NULL;
l_row.level4_value := NULL;
l_row.level4_description := NULL;
l_row.amount_as_of_date1 := 0;
l_row.amount_as_of_date2 := 0;
SELECT COUNT(*)
INTO l_row_count
FROM (TABLE(CAST(io_table AS t_ntr_rep_data)));
l_row.row_type_ind := in_row_type_ind;
l_row.ordering := in_ordering;
l_row.record_type := in_record_type;
l_row.level1_value := in_level1_value;
l_row.level1_description := in_level1_description;
l_row.level2_value := in_level2_value;
l_row.level2_description := in_level2_description;
l_row.level3_value := in_level3_value;
l_row.level3_description := in_level3_description;
l_row.level4_value := in_level4_value;
l_row.level4_description := in_level4_description;
l_row.amount_as_of_date1 := in_amount_as_of_date1;
l_row.amount_as_of_date2 := in_amount_as_of_date2;
io_table(l_row_count+1) := l_row;
END;
--------------------------------------------------

Simply write a stud which queries the Oracle Dictionary tables which will return Object Type
Based on the object_name and User_name

Similar Messages

  • How to create a Type Object with Dynamic select query columns in a Function

    Hi Every One,
    I'm trying to figure out how to write a piplined function that executes a dynamic select query and construct a Type Object in order to assigned it to the pipe row.
    I have tried by
    SELECT a.DB_QUERY INTO actual_query FROM mytable a WHERE a.country_code = 'US';
    c :=DBMS_SQL.OPEN_CURSOR;
    DBMS_SQL.PARSE(c,actual_query,DBMS_SQL.NATIVE);
    l_status := DBMS_SQL.EXECUTE(c);
    DBMS_SQL.DESCRIBE_COLUMNS(c, col_cnt, rec_tab);
    FOR j in 1..col_cnt LOOP
    DBMS_SQL.DEFINE_COLUMN(c,j,v_val,2000);
    END LOOP;
    FOR j in 1..col_cnt LOOP
    DBMS_SQL.COLUMN_VALUE(c,j,v_val);
    END LOOP;
    But got stuck, how to iterate the values and assign to a Type Object from the cursor. Can any one guide me how to do the process.
    Thanks,
    mallikj2

    Hi Justin,
    First of thanks for your reply, and coming to my requirement, I need to report the list of items which are there in the dynamic select statement what am getting from the DB. The select statement number of columns may vary in my example for different countries the select item columns count is different. For US its '15', for UK it may be 10 ...like so, and some of the column value might be a combination or calculation part of other table columns (The select query contains more than one table in the from clause).
    In order to execute the dynamic select statement and return the result i choose to write a function which will parse the cursor for dynamic query and then iterate the values and construct a Type Object and append it to the pipe row.
    Am relatively very new for these sort of things, welcome in case of any suggestions to make it simple (Instead of the function what i thought to work with) also a sample narrating the new procedure will be appreciated.
    Thanks in Advance,
    mallikj2.

  • How to read a type object

    hi,
    My problem resovles into the below:
    The user creates some type object.
    He calls the library function
    This function should be able to know the type object type name, the elements in the type and their values.
    Now the qn: how do i create such a library?
    in oracle 10.2 JDBC doesnt support the transfer of AnydataType from db to java. ANy workarounds for this?
    -----

    Simply write a stud which queries the Oracle Dictionary tables which will return Object Type
    Based on the object_name and User_name

  • How to initialize a data object in bpm 11g?

    I created a Business Object with a few attributes,
    then a Process Data Object with the type of the Business Object,
    and tried to use it in Humantask, set it as Editable.
    but I failed editing it when starting the process, it's not editable at all, I don't know why? maybe the Process Data Object is not initialized? or something I missed?
    anyone can help? thanks.

    If you are using ADFBC, the easiest way is
    - drop the data control as ADF form
    - add CreateInsert method binding to the pagedef
    - add an invokeAction for the createInsert with a refresh property set to renderModel so that an empty creation form will be shown on page load
    for insertion
    - Finally, add the commit action as button
    Sireesha

  • How can I assign a hard coded value to a variable of type OBJECT.

    Hi,
       I have to call the following method
                                      lc_action_execute->get_ref_object(
                                                            exporting
                                                                  io_appl_object = io_appl_object
                                                            importing
                                                                   ev_guid_ref    = lv_guid_ref.
    Now I have to hard code the io_appl_object variable (of type OBJECT) to test my application for the time being. How can I assign a value to the variable? Is there any way to do that?

    I wouldn't use WDR_CONTEXT_ATTR_VALUE_LISTGEN.  Use wdr_context_attr_value_list instead:
    data l_topics type zpm_main_topic_tbl.
      l_topics = wd_assist->read_all_topics( ).
      data lt_valueset type wdr_context_attr_value_list.
      field-symbols <wa_topic> like line of l_topics.
      field-symbols <wa_vs>  like line of lt_valueset.
      loop at l_topics assigning <wa_topic>.
        append initial line to lt_valueset assigning <wa_vs>.
        <wa_vs>-value = <wa_topic>-main_topic.
        <wa_vs>-text  = <wa_topic>-main_topic_desc.
      endloop.
      data lo_nd_meeting type ref to if_wd_context_node.
    * navigate from <CONTEXT> to <MEETING> via lead selection
      lo_nd_meeting = wd_context->get_child_node( name = wd_this->wdctx_meeting ).
      data lo_node_info type ref to if_wd_context_node_info.
      lo_node_info = lo_nd_meeting->get_node_info( ).
      lo_node_info->set_attribute_value_set(
         name = 'MAIN_TOPIC'
         value_set = lt_valueset ).

  • How to divide big serialized object in parts to be able to save as Blob typ

    Hi,
    Actually i have serialize a big XML document object and want to save in a field of type Blob. As Blob size is 64k. So if the serialized object is greater than 64k. It gives me error of size.Can anybody tell how to break large serialized objects.
    I am using this code
    File f = new File("out.ser");
    FileInputStream fin = new FileInputStream(f);
    p = farCon.prepareStatement("insert into TeeColor values('3',?)");
    p.setBinaryStream(1, fin, f.length());
    p.executeUpdate();
    This code works fine if the size of out.ser file is less than 64k. But does not work for bigger sizes
    Please help me out
    Thanks

    Read your data from the file into a byte array, then extract 64K at a time into a smaller byte array, and use a ByteArrayInputStream for updating the database.

  • How to make the attribute of type object private

    Hi All!
    How to make the attributes of type object private ?
    regards
    Sanjeeb Bose
    Kolkata India

    Sanjeeb,
    Object encapsulation can be enforced at your client/mid-tier API level (e.g., Java, C++).
    Regards,
    Geoff
    Hi All!
    How to make the attributes of type object private ?
    regards
    Sanjeeb Bose
    Kolkata India

  • "In initializer for 'mxmlContent', type Object is not assignable to target Array element type..."

    Hi all,
    So I've have built an application on flash builder 4.5 using Christophe Coenraets' tutorial "Building an EmployeeDirectory" (http://www.adobe.com/devnet/flex/articles/employee-directory-android-flex.html#articlecont entAdobe_numberedheader).
    I'm getting this error message "In initializer for 'mxmlContent', type Object is not assignable to target Array element type mx.core.IVisualElement." and then the debugger highlights my code this line of my code "</s:List>" in my EmployeeDetails.mxml file. This started after I coded Part 5, Step 2 "Integrating with the Device Capabilities: Triggering the Actions".   The rest of the code debugged fine.
    I think it relates to Christophe's note "Note: Make sure you import spark.events.IndexChangeEvent (and not mx.events.IndexChangedEvent) for this code to compile.".  I don't know where to place this
    " import spark.events.IndexChangeEvent;" line of code. 
    Any help?  Tks in advance..
    Any help would be greatly appreciated.  Thanks

    You have a DataGrid directly inside a State element. Perhaps wrap it in an AddChild element?
    More information on using states can be found here:
    http://livedocs.adobe.com/flex/3/html/help.html?content=using_states_1.html

  • How must I initialize a graphics object?

    Hi,
    I've a problem with Graphics Abstract class;
    how must I do to initialize a Graphics object?
    I must execute this code:
    Graphics gr;
    gr.drawString("Image",30,0);
    gr.drawString("not",30,30);
    gr.drawString("Found",30,60);
    image.paintIcon(null,gr,0,0);
    the compiler returns my the error:
    "gr not initialized"
    How can I do to initialize this last?
    Thank.

    Or you can call getGraphics() on any Component, but most likely you will do any graphics in the paint method as tjacobs said.

  • How to access complex data type objects in webdynpro

    Hi
    Need help on the detailed procedure to access the complex data type objects.
    I am importing an external wsdl file, its request and response have complex data type objects , how do i access the same as the values are nested in them.
    The structure of request and response at my end is as below:
    request(I level)
    --complextypeobject(II level)
    requestheader(III level)
    field1
    field2
    request
    --response
    messages
    resp1
    resp2
    Any help would be highly appreciated.
    Thanks and Regards,
    Amar Bhagat Challa.

    here you go
    WS Structure
    Request_MI_PortWellOB_MI_PortWellOB
    |-- MT_PortWellOut
       |--agency ( attr)
       |--user (attr)
       |-- well ( node)
         |-- borehole
         |-- downhole
         |-- interval
         |-- surface
    // code to set complex type
              wdContext.nodeRequest_MI_PortWellOB_MI_PortWellOB().bind(new Request_MI_PortWellOB_MI_PortWellOB());
              //        port well object
              Request_MI_PortWellOB_MI_PortWellOB oPWRequest = new Request_MI_PortWellOB_MI_PortWellOB();
              ComplexType_DT_PortWell oPWParameters = new ComplexType_DT_PortWell();
              oPWRequest.setMT_PortWellOut(oPWParameters);
              wdContext.nodeRequest_MI_PortWellOB_MI_PortWellOB().bind(oPWRequest);
              DT_PortWell oPWInputbean =
                   this.wdContext.nodeRequest_MI_PortWellOB_MI_PortWellOB().nodeMT_PortWellOut().currentMT_PortWellOutElement().modelObject().getOriginalBean();
              //       oPWInputbean.setTEST("test");
              //          well object
              DT_CWR_Well oWParameters = new DT_CWR_Well();
              //          all object
              //        surface
              DT_CWR_Surface oSParameters = new DT_CWR_Surface();
              ComplexType_DT_CWR_Surface s = new ComplexType_DT_CWR_Surface();
              //          Borehole
              DT_CWR_BoreHole[] oBParameters = new DT_CWR_BoreHole[wdContext.nodeBoreholedetail().size()];
              //          Downhole
              DT_CWR_DownHole[] oDParameters = new DT_CWR_DownHole[wdContext.nodeDownholedetail().size()];
              //          Interval
              DT_CWR_Interval[] oIParameters = new DT_CWR_Interval[wdContext.nodeIntervaldetail().size()];
              //        add all into well object       
              oWParameters.setSURFACE(oSParameters);
              oWParameters.setBOREHOLE(oBParameters);
              oWParameters.setDOWNHOLE(oDParameters);
              oWParameters.setINTERVAL(oIParameters);
              //       oPWParameters.setWELL(oWParameters );      
              oPWInputbean.setWELL(oWParameters);
              oPWRequest.setMT_PortWellOut(oPWParameters);
              wdContext.nodeRequest_MI_PortWellOB_MI_PortWellOB().bind(oPWRequest);
              wdContext.currentMT_PortWellOutElement().setUSERID("user");
              wdContext.currentMT_PortWellOutElement().setAGENCY("agency");
    Rahul

  • EEWB :  how to determine the business object and the extension type ?

    Hi,
    I ask myself how to determine the business object and the extension type to use to add new fields in a new tab of a specific transaction ? what means each business object, does that correspond to a specific transaction ?
    I need to add a new tab in the ‘BaMI’ business activity in transaction CRMD_ORDER just after the tab 'Actions' at header level.
    Could you help me please to determine which business object and extension type I have to select during creation of the project and which business object category I have to select during creation of the extension (wizard) ?
    Thanks for your help,
    Marie

    Marie,
    In order to determine what type of transaction you are extending, you will need to look at the customizing for the transaction.
    In the IMG:
    Goto:
    Customer Relationship Management->Transactions->Basic Settings->Define Transaction Types.
    You will then choose the transaction defined that you want to extend.  If you display the details of the transaction you will find an attribute called:
    "Leading Transaction Category".  This tells you the general context in which the transaction is used.  The other item to view is the assignment of business transaction categories found in the maintenance screen.
    This information general corresponds to one of the options that the EEWB will give you on the transaction type.
    As far as extensions go, my recommendation is the following:
    - Use CUSTOMER_H Customer Header Extensions for any new fields at the header level.
    - Use CUSTOMER_I Customer Item Extensions for any new fields at the item level.
    Unless you have a specific requirement to extend a segment of the transaction, I recommend placing all new fields in these segments.  The CUSTOMER_H & CUSTOMER_I segments are considered "standard" segments, that are already built into all the necessary API structures. 
    Let me know if you have any further questions.
    Good luck,
    Stephen

  • How do you compile "type body" objects that are invalid?

    We just completed a few application upgrades and now the objects catindexmethods and textindexmethods are invalid. These are part of our intermedia install but haven't started using it yet. How to I recompile these objects to be valid again?

    Did a little deeper and you shall find it:
    alter type xxx compile body;

  • How to determine a View Object Type (read only or Updatable) ADF B.C 10.1.3

    Hi all,
    in scott Schema by ADF B.C 10.1.3, I created an entity object like emp
    and created view object EmpView from emp and dept entities
    and Application Module
    and when draging EmpView and dropping it in jspx
    while running I got an error :
    JB0-25003 your EmpView View Object has no Type
    How to determine a View Object Type (read only or updatable) in B.C ?
    Thanks

    Hi,
    this should not require any manual confiuration. Can you select the ApplicationModule in the model, right click on it and run the ADf BC tester ? Check if he ViewObject runs if not added to JSF
    Frank

  • How to specify a type of COM-object activation

    How to specify a type of COM-object activation: in-proc, local server etc - in C# client? I want to use a .NET analog of CLSCTX_INPROC_SERVER constant. Documentation for used COM component insist that all types of activation are possible.

    When you create an instance of a COM object using COM Interop, it is the equivalent of calling CoCreateInstance with CLSCTX_ALL.
    (See COM Interop Part 1: C# Client Tutorial.)
    If you don't like the automatic behavior, then Create the object manually (PInvoke CoCreateInstance) and just marshal the interface pointer to get a runtime callable wrapper by specifying
    MarshalAs(UnmanagedType.Interface) on the result.  (The DllImport signature provided at the pinvoke.net link above marshals it this way.)

  • SSIS Programming- How to declare a variable of type Object?

    Hello, I have a very specific coding question. I am trying to create a pkg using SSIS Object model. I am trying to create a variable of type Object. But I could not find any reference in KB or forums on creating variable of this data type.
    Example:
    // Create the package.
    Application a = new Application();
    Package p = new Package();
    p.Name = "MyDataExtractPkg";
    //Add Variables to the pkg
    Variables pkgVars = p.Variables;
    Variable var8 = p.Variables.Add("varHour", false, "User", (System.Int16)0);
    Variable var9 = p.Variables.Add("varHourDiff", false, "User", 0);
    Variable var10 = p.Variables.Add("varIntervalWaitInMS", false, "User", 5000);
    Variable var11 = p.Variables.Add("varJobCnt", false, "User", 0);
    Variable var12 = p.Variables.Add("varjobID", false, "User", 0);
    Variable var13 = p.Variables.Add("varJobRS", false, "User", (System.Object)0);
    Variable var14 = p.Variables.Add("varProcessDate", false, "User", "abc");
    As you can see I was able to successfully variables of Type Int16, Int32(default) & String.
    But I need to create a variable of type Object for "varJobRS" and above code is generating int. Appreciate any direction or help on how to create Object variable type.
    Thanks,
    DW Guy

    I have been continuing with my work with intention to approch MS, but I came across the solution in one of the Blog site. The solution is :
    var13.Value =
    new
    Object();
    This converts the variable of type Object.
    The link that gave this soluion is:
    http://ssisbi.com/building-ssis-packages-programmatically-part-5/
    Thanks,
    DW Guy

Maybe you are looking for

  • Using "Edit in" function after upgrading to LR 4.4

    Hello all, I upgraded to 4.4 today and when I tried to use the "edit in" function on a photo an move to Elements 10 I got a message that LR was unable to prepare the selected file for editting and it will not be opened.  I tried multiple photos and n

  • Need to revert a universal app to iphone in iTunes connect

    The question is can we replace a Universal App with and Iphone app in iTunes connect and what are the steps. In this case the iPhone app is the app the Universal app replaced in the first place. Our client claims you cannot replace a Universal app wi

  • RESTful Webservice on a 11g

    Hello, i created the following webservice : import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; @Path("/helloworld") public class MobileRSServiceImpl {     @GET     @Path("sayhello")     @P

  • How to read the number of pending and delivered messages from a Queue

    Hi           Can anyone please tell me that how to peek through a queue to get the total number of messages pending and number of messages delivered from a Queue.           I just have to peek through the queue and I do not want to process the messag

  • Where does WebMail store user preferences

    I have enabled WebMail on my server. Each user that logs in is able to change its preference settings at WebMail, e.g. # of msgs. shown per page, etc.. This is okay, but when I delete a user, I guess that there is a config file left somewhere. Has an