NESTED Tables for Sub-types when creating table for Super-type

If I create the following types, as an example:
Person with subtypes: Employee and Customer
Appointment
CREATE OR REPLACE TYPE Person_OT AS OBJECT (
person#                         NUMBER,
personSurname                    VARCHAR2(50),
personForenames               VARCHAR2(50),
personDateOfBirth               DATE,
personAddress                    Address_OT,
) NOT FINAL ;
CREATE OR REPLACE TYPE Employee UNDER Person_OT (
empSalary               NUMBER,
empNoSales          NUMBER,
makes               Appointment_List_OT
) FINAL ;
CREATE OR REPLACE TYPE Appointment_OT AS OBJECT (
some attributes
CREATE OR REPLACE TYPE Appointment_List_OT AS TABLE OF REF Appointment_OT ;
When creating the table to hold objects of Person type, how can the requisite nested table for representing 'makes' be declared? The below approach is not correct, however the table will not compile without naming the nested tables.
CREATE TABLE Person_TBL OF Person_OT (
Person#     PRIMARY KEY)
NESTED TABLE makes STORE AS Appointment_List_NTBL;
Advice very much appreciated!

CREATE TABLE Person_TBL OF Person_OT(
Person# PRIMARY KEY)
NESTED TABLE TREAT(SYS_NC_ROWINFO$ AS EMPLOYEE).MAKES STORE AS Appointment_List_NTBL
Table created.
SQL> select * from user_nested_tables
  2  /
TABLE_NAME                     TABLE_TYPE_OWNER
TABLE_TYPE_NAME                PARENT_TABLE_NAME
PARENT_TABLE_COLUMN
STORAGE_SPEC                   RETURN_TYPE          ELEMENT_SUBSTITUTABLE
APPOINTMENT_LIST_NTBL          SCOTT
APPOINTMENT_LIST_OT            PERSON_TBL
TREAT(SYS_NC_ROWINFO$ AS "SCOTT"."EMPLOYEE")."MAKES"
                       DEFAULT                VALUE                         N
SQL>  SY.

Similar Messages

  • Any suggestions for best practice when creating assets for tablets?

    General community question,
    I'm about to start creating a tablet demo of a few assets that have already been created for web that need adapting for tablet (namely iOS on iPad). I was wondering if anyone could share some pointers about what to avoid doing or some top tips to ensure that they can be converted as quickly and easily as possible, particularly given the state of the current version of EA.
    Any suggestions or links to relevant websites would be welcome!
    Cheers,
    D

    General community question,
    I'm about to start creating a tablet demo of a few assets that have already been created for web that need adapting for tablet (namely iOS on iPad). I was wondering if anyone could share some pointers about what to avoid doing or some top tips to ensure that they can be converted as quickly and easily as possible, particularly given the state of the current version of EA.
    Any suggestions or links to relevant websites would be welcome!
    Cheers,
    D

  • Getting Error when createing Table control in Module Pool.

    Hi expert ,
    i am creating a module pool program . i want to crate line item value for that i have created table control  on screen 200 .
    but when i am activation to that giving error below mention.
    The field "ZFBDCHALLAN-EBELN" is not assigned to a loop. "LOOP ...ENDLOOP" must appear in "PBO" and "PAI".
    thanks
    chandra

    Its mandatory to have loop endloop in both events
    PBO and PAI
    loop your internal table similarly.
    Please check it should be below format
    PROCESS BEFORE OUTPUT.
    * Set PF Status for screen 100.
      MODULE status_0200.
    * This module will initialize the field
      MODULE init_0100.
      LOOP AT t_custmat_asg INTO w_custmat_asg
          WITH CONTROL tc_1
          CURSOR tc_1-current_line.
    * It will count the record in internal table
        MODULE set_linecount.
    * Screen Modifications
        MODULE status_check.
      ENDLOOP.
    PROCESS AFTER INPUT.
    * Module AT EXIT-COMMAND
      MODULE exit_0200 AT EXIT-COMMAND.
      LOOP AT t_custmat_asg .
        CHAIN.
          FIELD :
          w_custmat_asg-check,
                  w_custmat_asg-kunnr,
                  w_custmat_asg-name1,
                  w_custmat_asg-asgtyp,
                  w_custmat_asg-productcls,
                  w_custmat_asg-sctegry,
                  w_custmat_asg-ctegry,
                  w_custmat_asg-parent,
                  w_custmat_asg-frmdate,
                  w_custmat_asg-todate,
                  w_custmat_asg-frecster,
                  w_custmat_asg-salesrep,
                  w_custmat_asg-flag,
                  w_custmat_asg-username,
                  w_custmat_asg-udate.
    * Validation For Forecaster.
          MODULE validate_forecaster.
    * Validation For Salesrep.
          MODULE valiate_salesrep.
    * Validation for Customer
          module validate_customer.
    * Validate null value
          module validate_null_vals.
    * Validation For Data Changed On The Screen
          MODULE data_changed_0200 ON CHAIN-REQUEST.
        ENDCHAIN.
      ENDLOOP.
    Regards
    Satish Boguda

  • Error when creating files for transport request SAPK-700BGINPLMWUI

    Hello experts,
    We're upgrading our 46c System to ERP 6.0 EHP4.
    In Phase  EHP_INCLUSION we get the following error Message: Disassembling package queue failed, rc = "2", reason = "Error when creating files for transport request SAPK-700BGINPLMWUI"
    We've already checked the SAINT version; Upgrade Fix, SAPCAR version. We've checked our TMS as well and everything seems  O.K.
    Any help would be really appreciated!!!
    Complete Error message:
    EhP component PLMWUI, 700                                                                               
    Looking for SAINT package for 'PLMWUI' ...                                                                               
    R3upReadNewPackages:                                                                               
    patchType='U', langVect='DEC'                                                                               
    RFC Login to: System="X05", Nr="00", GwHost="sxt ", GwService="sapgw00"                                                 
    RFC Login succeeded                                                                               
    Calling function module "spda_read_new_packages" by RFC                                                                     
      ismovesVersion='0'                                                                               
    R3upReadNewPackages: exit: rc=0                                                                               
    ... No matching package found.                                                                               
    R3upReadNewPackages:                                                                               
    patchType='I', langVect='DEC'                                                                               
    RFC Login to: System="X05", Nr="00", GwHost="sxt ", GwService="sapgw00"                                                 
    RFC Login succeeded                                                                               
    Calling function module "spda_read_new_packages" by RFC                                                                     
      ismovesVersion='0'                                                                               
    R3upReadNewPackages: exit: rc=0                                                                               
    Found: name = 'PLMWUI', release = '700', package = 'SAPK-700BGINPLMWUI', type = 'AOI'                                  
    ... Matching package found: 'PLMWUI','700','SAPK-700BGINPLMWUI'                                                             
    (trc) R3upPatchDisassembleQueue: 1 package queue entries                                                                    
    (trc) R3upPatchDisassembleQueue: force=YES                                                                               
    (trc) R3upPatchDisassembleQueue: 1 packages will be disassembled                                                            
    Starting disassembling package queue                                                                               
    Date & Time: 20100319133139                                                                               
    Starting RFC Login to: System = "X05", GwHost = "sxt ", GwService = "sapgw00"                                           
    RFC Login to: System="X05", Nr="00", GwHost="sxt ", GwService="sapgw00"                                                 
    RFC Login succeeded                                                                               
    Calling function module "SPDA_DISASSEMBLE_QUEUE" by RFC                                                                     
    Input table IT_PATQ:                                                                               
    "SAPK-700BGINPLMWUI","000","AOI","PLMWUI","700","SAP PLM Web UI","00"                                                       
    Call of function module "SPDA_DISASSEMBLE_QUEUE" by RFC succeeded                                                           
    Logging off from SAP system                                                                               
    Date & Time: 20100319133139                                                                               
    Disassembling package queue failed, rc = "2", reason = "Error when creating files for transport request SAPK-700BGINPLMWUI"

    Hello Anthes,
    Please Check the things in following sequence :
    1.Use latest SAPehpi, R3trans and tp versions.
    2. users/group authorization issue and/or ownersip limitations (set 777) .Reboot the server to make sure, that the authorisations are updated and there is no lock on a file in the EHPI dir.Repeat the phase.
    Folders where permissions should be 777 are Upgrade directory, Data Directory, Cofile directory and .../EPS/in.
    3. Source file corruption can be ruled out by execution
    R3trans -l /usr/sap/<SID>/..../abap/data/R-700BGINPLMWUI.SAP (The data file corresponding to the Package which is giving error). Check if this ends fine.
    Note 2050
    4. Confirm that your transport tool is 'healthy' by testing it in STMS. In SPAM in client 000 use the function Disassemble package and enter the package <Package name>.
    5. Try to update the kernel if it not helps.
    Best Regards
    Niraj

  • How to add the rows formatted as table headings, Tables headings are repeated when a table spans more than one page.

    Hi all,
    i am facing problem while generating Test Result word document after successful execution of TestStand.
    The Problem is :
    i want to add rows Formatted as table headings, table headings are repeated when a table spans more than one page(marked as Red).
    Example:
    Page  No. 1
    |     Test case Number  |  Test Step number      |
    |      100                         |            100                   |
    Page  No. 2
    |     Test case Number  |  Test Step number      |
    |      200                         |            300                   |
    Test Result word document should generate with Table headings(marked as Red) in every pages of the document, but i am not getting as per above example.
    Please through light on this.
    Regards,
    Susa.

    Hi Santiago,
    Thank you very much for your valuable reply.
    i want to generate MS-word report for TestStand after successful testing using MS-word2000.
    Test report contains Actual values, Expected values and Pass/Fail status.
    In my program i have customized all  fields i can able to generate test report which contains Verification engineer name , test mode, test date, start time, end time Actual values, Expected values and Pass/Fail status.etc....
    To put all values of test case number, Test step number, Actual values, Expected values and Pass/Fail status in to table for each time, i will
    insert a row into table every time values arrives, once the table exceedes its page size it moves to the next page, next page should start with table row header  but it start with  values of above said parameters.
    so i'm not able to repeat table row header for each page.
    Please find the attached file for your reference.
    Attched file expected.doc  :   This file contains what i wanted to generate MS-word report. Here table row header "Test Case Number and Test Step Number " is repeated in second page.
    Attached file Actual output from source code.doc   :  This report generated from the source code. Here table row header "Test Case Number and Test Step Number" is not repeated in second page.
    Do you know any property to set "repeat as header row at the top of each page" using MS-word ActiveX in CVI/Labwindows.
    i think this information is sufficient for you,
    Still if you need some information please ask me.
    Thanks
    Susa.
    Attachments:
    Actual output from source code.doc ‏25 KB
    expected.doc ‏26 KB

  • Test Note (Documentation Type) when creating Test Plan

    Hi Gurus.
    After we upgraded our SolMan 7.0 system from Support Pack (ST component ) level 19 to level 25,  I noticed this new field "Test Note" (Dcoumentation Type) when creating a Test Plan in transaction STWB_2.
    Initially, when I haven't chosen any project yet, this field has a list-of-values (i.e. Test Case Note, iTutor Document) but when I choose a project, the list-of-values only showing "ST". I also tried choosing another project and there is no value in the list.
    Does anyone know where this list is coming from or how I can configure this?
    It looks like project-related and but I couldn't find any settings for this.
    Can this field be turned off so it will not show in the screen?
    Thanks,
    Tess

    Hi Tess,
    The documentation type ST is the standard documentation type for test notes.
    Test notes are needed by testers to document results in detail during/after testing a test case.
    In SOLAR_PROJECT_ADMIN  there is the text menu 'GOTO - Project Template - Implementation Projects'
    and then there to the tap 'Documentation Types' to do the default settings for 'ST' for all implementation projects.
    Otherwise you'll have to change settings in the administration for each project!
    There you can assign your own documentation template for ST in the central settings.
    If you are using other project types for testing you'll have to do the same for each project type.
    Regards,
    Adelbert

  • Error when creating interval for number range object

    Hi,
           I am trying to transport my BW stuff from QA to Production and I am getting the following error in the transport logs. The info objects are inactive in RSA1.
    Start of the after-import method RS_IOBJ_AFTER_IMPORT for object type(s) IOBJ (Activation Mode)
    Characteristic YRESD: Error when creating interval for number range object BIM0000396
    Can some body advise me what's wrong? Is something need to be maintained in number ranges?
    Also when I am checking the objects in RSA1, I am getting a message saying "source system WD110 does not exist", WD110 is our dev system. How can I change the source system after transport?
    Thanks.
    Edited by: Raj G on Mar 20, 2008 11:38 AM

    Also when I am checking the objects in RSA1, I am getting a message saying "source system WD110 does not exist", WD110 is our dev system. How can I change the source system after transport?
    Which system are you checking this?
    refer: Re: Transport Source Systems from DEV to Testing for step to map the source systems for transport

  • When creating iframes for htm pages, I pdfs work just fine in all versions of Firefox. However, when I construct an iframe for an htm to be displayed on an htm

    ''duplicate of https://support.mozilla.org/en-US/questions/973637 - locking''
    When creating iframes for htm pages, I pdfs work just fine in all versions of Firefox. However, when I construct an iframe for an htm to be displayed on an htm, Firefox 24 will not load the htm/iframe.

    Hello,
    In order to better assist you with your issue please provide us with a screenshot. If you need help to create a screenshot, please see [[How do I create a screenshot of my problem?]]
    Once you've done this, attach the saved screenshot file to your forum post by clicking the '''Browse...''' button below the ''Post your reply'' box. This will help us to visualize the problem.
    Thank you!

  • Which BW variable is used for date(range) when creating a portal service

    Hi,
    Can any one please let me know which BW variable is to be used for date(range) when creating a portal service for searching based on dates.
    Thanks
    Abhai

    Hi Arun,
    its just a portal service which would be called when  searching a document created on a particular date or betwwen a range of date.so what i require is which BW variable to be used when handling range.As for variable technical name we use VAR_NAME_I  and for single value variable we VAR_VALUE_EXT_I
    in the similar manner i want BW variable to be used for range of values.
    Thanks
    Abhai

  • Cover for charger alert when is open for Xperia Z2

    How to setting the alert for Xperia Z2 when the Cover for charger/USB port is on open pisition ?

    The phone can't sense if the cover is open or not. Smart Connect will however give you a reminder to check/close the flap after charging. If you selected the option to not show the reminder again and want it back you can go to Settings -> Apps -> Smart Connect -> Clear data.
     - Official Sony Xperia Support Staff
    If you're new to our forums make sure that you have read our Discussion guidelines.
    If you want to get in touch with the local support team for your country please visit our contact page.

  • What is a valid location for autorecovery files when using Word for MAC?

    What is a valid location for autorecovery files when using Word for MAC?

    Microsoft Word for Mac support forums is probably a better place to ask.

  • Error when creating table with nested table of object

    Dear all,
    I tried to create a table that contains nested table of an object but got an error:
    create or replace type some_obj is object (
      a number, b blob
      4  /
    Type created.
    create or replace type some_type is table of some_obj;
      2  /
    Type created.
    SQL>
    create table test (obj_id number, temp some_type) nested table temp store as nes_tab;
    Table created.
    SQL> create table test (obj_id number, temp some_type) nested table temp store as nes_tab
    ERROR at line 1:
    ORA-00955: name is already used by an existing objectWhat is causing the error? How can I troubleshoot this?
    best regards,
    Val

    Valerie Debonair wrote:
    never mind, I put "/" at the end of the create statement that makes executing create table twice....Yep. If I'm writing a script, I tend to just stick with "/" for all my statements, including the SQL as well as the DDL, otherwise it can be confusing whether a ";" is needed or not or whether it will try and execute it twice like you found.
    "/" works for all.

  • Place a string before a data type when creating a column in a new table

    Hi,
    I am trying to create a table in Oracle 10g called Penalty with the following Primary Key; PenaltyType. I wish to insert the word 'penalty' and a single number into each column without creating a sequence, for example penalty1, penalty2, penalty4, penalty9 etc with the number input by the user and the database automatically inserting the word before it.
    I am not sure about how I go about creating this as a constraint on the data type, could anyone possibly enlighten me?
    I am using code which forms part of a larger SQL script to create a car hire database as detailed below;
    CREATE TABLE Penalty
    (PenaltyType ???????????????
    CONSTRAINT pen_PenaltyType_pk PRIMARY KEY (PenaltyType),
    MinDay NUMBER(3),
    MaxDay NUMBER(3),
    Cost NUMBER(2, 2));
    Where the question marks would be replaced by the inserted word and single number to meet data type constraint:- "The word penalty followed by a single number (eg. Penalty1) "
    Any help would be most appreciated, hope it's not too confusing, and sorry about formatting but the forum left justifies it all.
    Thanks,
    Jason

    Something like this ?
    SQL> desc penalty
    Name                                                              Null?    Type
    PENALTYTYPE                                                       NOT NULL VARCHAR2(20)
    MINDAY                                                                     NUMBER(3)
    MAXDAY                                                                     NUMBER(3)
    COST                                                                       NUMBER(2,2)
    SQL> create or replace trigger trig_penalty
      2  before insert on penalty
      3  for each row
      4  begin
      5     :new.penaltytype := 'Penalty' || trim(to_char(to_number(:new.penaltytype),'000000'));
      6  exception
      7     when others then
      8       raise_application_error(-20001,'Wrong value');
      9* end;
    SQL> /
    Trigger created.
    SQL> insert into penalty(penaltytype) values(1);
    1 row created.
    SQL> select * from penalty;
    PENALTYTYPE                   MINDAY          MAXDAY            COST
    Penalty000001
    SQL> insert into penalty(penaltytype) values('A');
    insert into penalty(penaltytype) values('A')
    ERROR at line 1:
    ORA-20001: Wrong value
    ORA-06512: at "TEST.TRIG_PENALTY", line 5
    ORA-04088: error during execution of trigger 'TEST.TRIG_PENALTY'
    SQL>BTW, you can use tags, [pre] before text, and [[i]pre] after text, to format it.

  • 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 fill the tables faglflexa and faglflext when creating a new document

    Hello all,
    I need to modify the field faglflexa-RMVCT when creating a new FI document , actually i'm using the transaction ABUMN,
    i tried to use manu user-exit to change this table unfortunately , I have not changed this entry .
    Could you please help me to find a solution for this problem?
    Thank you in advance,

    When you are defining the elements of the datatype there are columns where you can do what you need:
    <b>column type</b>: here you choose the type of data of the element
    it can be a standard type or a user defined one (if you click one time only it should appear an icon in the right for input help: click there and choose the type you need)
    <b>column occurence </b>: in a similar way of column type here you define the cardinality of the element (min occurence and max occurence)
    setting min occurrence: 1, max occurrence 1 or unbounded --> required
            mmin occurrence 0, max occurrence 0, 1 or unbounded --> optional
    about the attributes there are directly the choice between required or optional.
    <b> column details </b>: here you define the length of the  element if it is a string or a lot of other things if the type is a different one.
    I hope this will help you

Maybe you are looking for

  • Is this true about Trade Ins?

    I called my local Best Buy and the rep told me that the trade in phone had to be originally purchased at Best Buy?  Does anyone know if this is true?

  • How to monitor on disk i/o on healthcheck and awr report on biweekly health

    can you explain how to monitor from disk i/o and awr report from old snap shot to new snap shot how to check and analyze .,,,,,,,,,,,,,,,,,,,,,can any one tell few points which we can **regularly maintain for health check** thanks in advance SQL> SEL

  • HCM forms and Processes - Adobe

    Hi, I am working on HCM forms and processes( not QISRs ). I want to populate a drop down list based on the selection of another dropdown list, how can we acheive this in Adobe forms. Should I go about configuring some back end generic service? if so

  • Can't get home videos imported into iTunes?

    iTunes will let me import videos but then they are not there? And ideas on how to help? Thanks

  • Use NAS (NFS) share as storage? Can't make shares.

    Hi, Trying to make shares on a network storage, nas, connected via nfs but i noticed that its greyed out. Is it supposed to only use disks or iSCSI för shares?