Data Modeler: How to create a self reference in ER?

e.g. I create the entity EMP in a logical Subview. Two attributes are here essential for a self-reference: EMPNO and MGR. So each Employee has a reference to his boss. And this information is stored in MGR.
Now I create the entity EMP with the 8 columns from the SCOTT/TIGER schema. After that I define a 1:N-Relation between EMP and EMP. but it looks like I cannot define, which attributes are starting point of the relation and destination.
Who can help me here?
Gerd

Gerd,
you cannot select destination (as you said) attribute - they are automatically generated. However you can achieve what you want - it depends on your starting point:
1) start from logical model (analysis first)
- you create 1:n recursive relationship -
- change the name of created FK attribute to MGR or what ever you want - this is controlled by "FK Attribute name synchronization" setting at "General options>Model>Logical" page
2) start from relational model (reverse engineering of existing status)
- create self reference foreign key - select MGR as FK column;
- reverse engineer to logical model - you'll have FK attribute named MGR
Philip

Similar Messages

  • SQL data modeller -- how to create 1 to 1 relationship foreign key ?

    hi guys...
    i got 2 tables..
    table 1 - CFR
    CFR_ID = primary key
    table 2 - USER_PLAN
    USER_ID = primary key
    PLAN_ID,
    CFR_ID = foreign key reference (table 1)
    The business flows go like this..
    insdie CFR table, it contain all records / transactions of a particular user/plan. everytime a new transaction occurs for a plan/user, a new CFR_ID / row will be generated.
    after which, the newly generated CFR_ID for the new row , will be updated to the CFR_ID in USER_PLAN
    Thus, there is always a 1 to 1 relationship between the 2 table regardless how many CFR_ID is generated for a particular USER_PLAN. as the CFR_ID in the USEr_plan table will always be the latest one generated inside the CFR table.
    However, in the data modeller, i am unable to create such foreign key relationship... ANY idea how do i create a 1 on 1 foreign key relationship ? or there is no such way..
    Thanks and Best Regards,
    Noob

    Hi philips,
    Thanks for the wonderful reply..
    Just to double comfirm with you,
    even if i had set a unique constraint on CFR_ID(foreign key column), inside the relationship model, the relationship between the foreign key is still showing as a 1:m relationship right ?
    just that a character 'U' will appear beside the CFR_ID column.
    However the diagraphm is still showing a 1:M relationship.
    is this correct ?
    Regards,
    Noob

  • Data Modeller: how to create and use collection type

    Hello,
    basically subj. I'm not clear how to ( for example ) create and use the data type based off the varray data type.
    Please advise.
    thank you
    andrew

    Hi Andrew,
    you can create collection types (varray/table) in two ways:
    1) in browser - find "Data Types">"Collection types" node use pop-up menu - it's just "create new collection type" there
    2) in Data types model diagram - you can create collection of "certain structured type" or collection of references to it - use "new Collection ..." tool and first click on referred structured type and after that on structured type that will hold the collection - new attribute is added in latter type and if there is no such collection type already defined new collection type is created and you can edit it later.
    Philip

  • How to Create a Cross Reference of an item  in an E-Business Suite

    Hi ,
    I need Help ,how to Create a cross reference of an item in an E-Business Suite
    Regards
    Srini

    Hello Srini,
    Prerequisite to create a cross reference for an item in eBusiness suite is that the item should be created in the master organization and assigned to your organization.
    Navigate to screen Inventory > Items > Cross references. Enter a name for your cross reference.
    Then, click on Assign : a screen is opened. In this screen, you can enter Item and Cross reference value. Note that a cross reference can be defined for an organization or common to all organizations.
    Another kind of cross reference you can create is Customer item (it defines how a customer designates your item). It can be defined through screen
    Inventory > Customer item > Customer Item and Customer item cross references.
    Please refer to Inventory user guide for more detail about this functionalities.

  • How to create Vector with reference to Collection

    hello experts,
    can someone let me know how to create vector with reference to Collection interface.
    Collection is an interface. and we cant create an instance of it. i'm not clear of what to pass in that constructor.
    Vector v = new Vector (Collection c);
    what are the possible objects of 'c'
    post some example code please.
    thanks

    Ever heard of reading the javadocs?
    "Collection is an interface. and we cant create an instance of it." - you don't understand interfaces, then.
    // I certainly can create a Collection - here's one
    Collection c = new ArrayList();
    // Now I'll add some Strings to my Collection.
    c.add("foo");
    c.add("bar");
    c.add("baz");
    // Now I'll make a Vector out of it.
    Vector v = new Vector(c);%

  • What is a reference location structure & How to create a new reference loc structure

    Dear PM experts,
    Need ur guidance on below :
    1. What is a reference location structure
    2. How to create a new reference loc structure
    Thanks
    Mudassar

    IH02 (reference functional location structure list) is similar to IH01 (functional location structure list)
    Create some reference functional locations via transaction IL11 and link them hierarchically.
    Then run IH02 to view the structure.
    Reference Functional Location - Technical Objects (CS-BD/PM-EQM) - SAP Library
    PeteA

  • How to create customer self registration form iReceivables in 11.5.10.2

    Hi,
    I am new to iReceivables and in need to know how to create customer self registration in iReceivable 11.5.10.2.
    Please give the steps. I the guide its mentioned as need to create the static HTML page. If so please let me know how to do it. Please give me if you are having any sample code.
    Regards
    Suresh P

    Please see these docs.
    SelfService Registration Link Not Working For iReceivables [ID 603353.1]
    iReceivables user tries to register for iStore and message 'Email Address Is Already In Use' [ID 1114661.1]
    Questions: Auto Login After Self-Registration [ID 403097.1]
    How to Find iReceviables Patchset Level on 11i Instance [ID 263942.1]
    How To Create Custom Self Registration Challenge Questions In 11i [ID 759998.1]
    iReceivables Self Registration Challenge Question not Working [ID 961586.1]
    The Ireceivables Self Registration Page Errors Out. What Are the Setups to Review? [ID 414161.1]
    How To Control The Invoice Picked Up In iReceivable Self Registartion Challenge Question? [ID 1310902.1]
    Thanks,
    Hussein

  • OS41: data modeler,  how to use it?

    Hi,
    I'd like to know how to use T-code OS41: data modeler, when do I need to use it? and How to use? Please kindly help.
    Thanks and Regards.

    Hi Steve
    <b>SD11-Data Modeler</b> is used, as its name implies, to model your processes.
    You can create entity types, connect tables or views to those entities, implement connections between entities and if needed, you can also insert business objects all in a hierarchical way. You can connect data models to each other as well.
    By this way, you document your own processes containing also some technical perspective.
    Hope this small piece will give some basic understanding.
    *--Serdar

  • Data Modeler - can't create a spatial indexes

    Good day, colleagues!
    I have a 584 release of Dala Modeler.
    Here is the cite from Oracle SQL Developer Data Modeler Guide:
    "3.82 Spatial Definition Properties
    Coordinate System ID: Oracle Spatial SRID value. ...
    +Create Spatial Index: Controls whether a spatial index is created.+
    Spatial Index Name: Name for the spatial index.
    I have a SDO_GEOMETRY column in my table and want to create spatial index.
    The problem is that there is no "Create Spatial Index" option in my Spatial Definition Properties window. There is only "Spatial Index Name" option. When I'm trying to create spatial index manually, I can't, because "Spatial" option for creating index is inactive. I've checked "Register as Spatial Table" table option, but it also didn't help.
    So, I have no way to create a spatial index. How can I do it?

    Hello usamytch,
    creation of spatial index is confusing. We'll improve it in next releases. Here are the steps:
    1) create index - no need to add columns
    2) create spatial column definition ("Spatial properties" in table dialog)
    3) In spatial column definition you can select your spatial column, coordinate system ID, dimensions and you can select one of existing indexes to be used as spatial one.
    4) after that index appear as spatial and you can set spatial related properties in index dialog
    5) you have to check "Register as Spatial Table" in order to get spatial meta-data generated in DDL
    There are additional spatial properties you can set in physical model.
    Philip

  • Data Modeler: How to prevent auto surrogate key in supertype/subtypes?

    When forward engineering supertype/subtypes, how can I prevent the automatic creation of a surrogate key (propagated to all super/subs)? Data Modeler creates this SK only at the relational level. I have already defined a surrogate identifier in the logical; the intent is to engineer this to the relational model and propagate to each subtype.
    Thanks,
    Patrick

    Thank you Philip for the explanation. I'd like to dig into this a little deeper, as I may be misinterpreting your explanation, and especially the last bit ( "...but foreign keys from subtype table to super-type table are not created" ).
    My preferred super/subtype implementation consists of a supertype parent table (ideally with a [manually created] discriminator code value) and any number of subtype child tables, all referencing the parent (via FK column/RI). Note that RI is from the supertype/parent to each subtype/child table, not the other way round as Designer docs suggest (one of three different approaches: all-inclusive single-table, detail tables only, master/detail w/ RI from child to parent [arced]). The implementation I suggest ("the fourth way") allows the painless addition of a new subtype simply by creating a new child table and a new discriminator value for the parent. I've had consistent success using this approach with Designer for many years.
    I've verified this successfully with a bare bones logical (3 levels), with appropriate UID on supertype/parent. All seems to transform well to relational model (i.e., all tables have inherited the parent PK, and individual attributes transformed to columns in the appropriate tables). The transform did not include a SurrogateID column.
    However, the transform doesn't work quite so well in my full-blown Party model, even though I ensured that a UID was defined on the logical supertype/parent. also confirmed that Hierarchy relationships are defined between supertypes and subtypes. What else could I be doing wrong that causes the transform to create a SurrogateID column on each super/subtype table?
    And on a similar note: are you suggesting that SQLDev Modeler transforms a supertype/subtype hierarchy with RI from detail tables to the parent table (i.e., backwards) when selecting "Table for each entity"? This approach would require a new FK column added to the parent table whenever a new subtype table was required.

  • Data Modeler - how to access it

    Howdy All,
    I've heard of somethin' called the data modeller that I should have access to as a developer...
    Does anyone know the transaction and how to use it?
    Thanking you all kindly.

    Hi Steve
    <b>SD11-Data Modeler</b> is used, as its name implies, to model your processes.
    You can create entity types, connect tables or views to those entities, implement connections between entities and if needed, you can also insert business objects all in a hierarchical way. You can connect data models to each other as well.
    By this way, you document your own processes containing also some technical perspective.
    Hope this small piece will give some basic understanding.
    *--Serdar

  • Data Modeler - How to move relationship lines?

    I can't figure out how to move the relationship lines on the data modeler.
    Tried a bunch of things that have worked in all the other modelers I've used, but no luck. Couldn't find anything in the help text about it, either.
    Edited by: David Wendelken on Nov 14, 2008 4:07 PM

    Hi Jim, David,
    AutoRoute (on/off) can be managed at diagram level - use right mouse click on empty space.
    In current published release (AutoRoute off) - straight lines (only two connection points) cannot be moved. You need intermediate points (at least one) for better arranging. Points (Elbows ) are created using Ctrl+mouse click.
    Connection points also can be moved in next EA release.
    Philip

  • Data Modeler: Editing or creating a view "crashes"

    Hi all,
    some days ago I've created a view in my relational model using the data modeler (SQL Developer 3.2.20.09). Today I wanted to add some more columns. Unfortunately the property pane doesn't open any more when double clicking the view object (for the tables it still works). No error message is shown. In the logical view a red triangle is shown in the top left corner of the view object.
    When I try to create a totally new view then the data modeler /sql developer crashes (doesn't respond anymore)...
    What could be the reason?
    If also tried with the new version of SQL Developer - there it doesn't work either...
    Thanks in advance
    Matthias

    Or this one:
    2014-01-22 16:49:32,665 [AWT-EventQueue-0] ERROR DefaultDiagramUI - DefaultDiagramUI.paint:
    java.lang.NullPointerException
      at oracle.dbtools.crest.swingui.diagram.graph.EdgeRenderer.getForeground(Unknown Source)
      at javax.swing.JComponent.setForeground(JComponent.java:2679)
      at oracle.dbtools.crest.swingui.diagram.graph.EdgeRenderer.installAttributes(Unknown Source)
      at oracle.dbtools.crest.swingui.diagram.graph.EdgeRenderer.setView(Unknown Source)
      at oracle.dbtools.crest.swingui.diagram.graph.EdgeRenderer.getRendererComponent(Unknown Source)
      at oracle.dbtools.crest.swingui.diagram.graph.AbstractCellView.getRendererComponent(Unknown Source)
      at oracle.dbtools.crest.swingui.diagram.ui.def.DefaultDiagramUI.paintCell(Unknown Source)
      at oracle.dbtools.crest.swingui.diagram.ui.def.DefaultDiagramUI.paint(Unknown Source)
      at javax.swing.plaf.ComponentUI.update(ComponentUI.java:143)
      at javax.swing.JComponent.paintComponent(JComponent.java:760)
      at javax.swing.JComponent.paint(JComponent.java:1037)
      at javax.swing.JComponent.paintChildren(JComponent.java:870)
      at oracle.dbtools.crest.swingui.diagram.OverviewPanel.paintChildren(Unknown Source)
      at javax.swing.JComponent.paint(JComponent.java:1046)
      at javax.swing.JComponent.paintChildren(JComponent.java:870)
      at javax.swing.JComponent.paint(JComponent.java:1046)
      at javax.swing.JComponent.paintChildren(JComponent.java:870)
      at javax.swing.JComponent.paint(JComponent.java:1046)
      at javax.swing.JComponent.paintChildren(JComponent.java:870)
      at javax.swing.JComponent.paint(JComponent.java:1046)
      at javax.swing.JComponent.paintChildren(JComponent.java:870)
      at javax.swing.JComponent.paint(JComponent.java:1046)
      at javax.swing.JComponent.paintChildren(JComponent.java:870)
      at javax.swing.JComponent.paint(JComponent.java:1046)
      at javax.swing.JComponent.paintChildren(JComponent.java:870)
      at javax.swing.JComponent.paint(JComponent.java:1046)
      at javax.swing.JComponent.paintChildren(JComponent.java:870)
      at javax.swing.JComponent.paint(JComponent.java:1046)
      at javax.swing.JComponent.paintChildren(JComponent.java:870)
      at javax.swing.JComponent.paint(JComponent.java:1046)
      at javax.swing.JComponent.paintChildren(JComponent.java:870)
      at javax.swing.JComponent.paint(JComponent.java:1046)
      at javax.swing.JComponent.paintChildren(JComponent.java:870)
      at javax.swing.JComponent.paint(JComponent.java:1046)
      at javax.swing.JComponent.paintChildren(JComponent.java:870)
      at javax.swing.JComponent.paint(JComponent.java:1046)
      at javax.swing.JLayeredPane.paint(JLayeredPane.java:567)
      at javax.swing.JComponent.paintChildren(JComponent.java:870)
      at javax.swing.JComponent.paintToOffscreen(JComponent.java:5139)
      at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1491)
      at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1422)
      at javax.swing.RepaintManager.paint(RepaintManager.java:1225)
      at javax.swing.JComponent.paint(JComponent.java:1023)
      at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:21)
      at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:60)
      at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:97)
      at java.awt.Container.paint(Container.java:1778)
      at java.awt.Window.paint(Window.java:3390)
      at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:797)
      at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:714)
      at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:694)
      at javax.swing.RepaintManager.access$700(RepaintManager.java:41)
      at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1636)
      at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
      at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:666)
      at java.awt.EventQueue.access$400(EventQueue.java:81)
      at java.awt.EventQueue$2.run(EventQueue.java:627)
      at java.awt.EventQueue$2.run(EventQueue.java:625)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:636)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

  • How to create complaints with reference to ECC Billing document (CRM 7.0)

    Hi experts!
    I use ECC 6.0 and CRM 7.0.
    I have to create CRM complaints (ZCLR - CLRP) with reference to ecc billing documents.
    I read the following topics and help:
    1. How to create complaints with referenceto ECC Billing document
    2. Re: How can we transfer billing documents from SAP ERP to CRM 2007?
    3. http://help.sap.com/saphelp_crm70/helpdata/en/46/029ba32e675c1ae10000000a1553f6/frameset.htm
    Made these settings:
    1. Define the Business object type
    Goto SPRO>CRM>Transaction>Settings for Complaints>Integration>Trnsaction Referencing>Define Object types for Transaction reference
    2. Assign Business Object Types to Transaction Types
    Goto SPRO>CRM>Transaction>Settings for Complaints>Integration>Trnsaction Referencing>Assign Business Object Types to Transaction Types
    3. Implement a BADI - CRM_COPY_BADI_EXTERN.Check Implementation CRM_COPY_BADI_BILLDO for more information on the coding for referencing the ECC Billing document.
    Goto SPRO>CRM>Transaction>Settings for Complaints>Integration>Trnsaction Referencing>BAdI: Create Complaint with Reference to External Transaction.
    but still do not know,
    1) if I should pre-replicate billing documents into CRM ?
    2) Or, the system uses the RFC to find these documents in ECC to create reference?
    Please help me.
    Best regards Kostya.
    Edited by: Kostya Khveshchenik on Oct 20, 2010 2:09 PM

    not resolved =(
    Edited by: Kostya Khveshchenik on Nov 19, 2010 8:50 AM

  • How to create PO with reference to Pr through BAPI

    Hi everybody
    I wanted to create PO with reference to PR through BAPI_PO_CREATE (4.6c), but i found there is no field to set PR info in the parameter. Is the bapi right for this case, or there are other functions?
    THANKS FOR ANY ADVICE!
    Best regards,
    Egg

    Hi abappers!
    I'm using bapi BAPI_PO_CREATE1 to create PO with reference to one or more PR. I have a problem with document date:
    If the delivery date of the PR is lower than creation date of PR, the document date of the PO is the delivery date (lower than sy-datum).
    If the delivery date of the PR is the same or higher than creation date of PR, the document date of the PO is the creation date of PR (sy-datum or high).
    I'm trying to change this date in poheader-doc_date, but the system ignores me. I'm sure this is the correct variable, because I use it to create other PO's without reference.
    Another thing confuses me is that if I create the PO with reference to the same PR from ME21N, the system doesn't allow me to indicate a document date lower than sy-datum.
    Thanks in advance,
    Jorge

Maybe you are looking for