9i: howto avoid automatic creation of surrogate keys

hi,
i'm modeling multiple intersection entities in the ERD by adding the relationships to UID-elements. Whenever i do this, a surrogate key is automatically created, even when my settings in the DDT are correct. How can i avoid this?
thanks, trevi

Hi,
Note that generating the DDL for Oracle 12c means that it will attempt to use your Oracle 12c Physical model.  So if you normally use Oracle 10g or 11g, you will find that any details from your Oracle 10g or 11g Physical Model will not be included.  So this approach may have other implications for you.
If you are not using Oracle 12c, there are some relevant properties on the Auto Increment tab of the Relational Model properties dialog for the Column which may help:
Sequence Name - allows you to specify the name of the Sequence (which can be the name of a Sequence defined in the relevant Physical Model).
Trigger Name - allows you to specify the name of a Trigger (which can be the name of a Trigger that is defined for the Table in the Physical Model).
Generate Trigger - unsetting this will stop the Trigger being generated.
David

Similar Messages

  • Avoid  automatic creation of purchase requisition for bom item N

    Dear.
    When I create a production order , for the components  with bom item N the system create a purchase requisition. I need to avoid this automatic creation , do you know a solution to obtain this ?
    Thanks.

    For the many people that have asked this question.
    N item category in the BOM is always going to propose direct procurement. Through configuration I have not found a way to make it go away from the planned order. You can make it go away from the production order.
    The IMG path: 
    Plant Maintenance and Customer Service 
    -> Maintenance and Service Processing 
    --> Maintenance and Service Orders 
    ---> Functions and Settings for Order Types 
    ----> Define Change Docs, Collective Purc. Req. Indicator, Operation No. Interval
    Under the Res/PurRq -> Specify Never
    In order make this setting effective, you must define the following
    system message to error or warning, as it is stated on note 569984
    Version Appl.A. No. Cat
    00000000 C2 280 W
    Please note that this setting is effective for reservations and
    requisitions.
    The best solution is to use BOM item category L with the bulk indicator set. You will not get any direct procurement proposals or planned orders and you can use long term planning to see the time phased MRP results.

  • Automatic Creation of primary key at the time of creating entries

    Hi All,
    I have a requirement to generate the primary key automatically at the time of creating entries. I have managed to do so by writing an event code for the maintainance object in SE54.
    However called only when I create entries throught the Maintainance View.
    It does not get called when I write an insert statement in the program.
    Please suggest a way to achieve this.
    Thanks in advance,
    Archana.

    for assigning the primary key while using insert statement, write a piece of code to get the last pk value, increment it by 1 and then assign this value to the pk field of the next record while inserting. if you are using a fn mod to insert values, just have this piece of code right before the insert query. a better way would be to use a GUID which will be unique globally. there is a fn mod GUID_CREATE which you can use to generate GUID. i don't think there is a way to automate this while making entries using se11, unless you change the code that actually creates the entry in the database.

  • Column prefix and automatic generation of surrogate key

    Hello,
    I used Oracle Designer and could always generate columns with prefixes and got surragate keys as Primary key. Now I cannot find these properties in data modeler.
    Thank you for your help
    Siegwin

    Hello Siegwin,
    Abbreviation (Abkurzung) is on the General (Allgemein) tab in the Properties Dialog for a Table in the Relational Model.
    There are 2 alternative ways to run the Transformation script:
    1.  Right_click on the Relational Model in the Browser, and select Apply Custom Transformation Scripts (Benutzerdefinierte Transformationsskripte anwenden) from the drop-down menu.
        Use the right arrow to move "Table abbreviation to column" from the left column into the right column.
        Select the Apply (Anwenden) button.
    Alternatively
    2.  From the Tools (Extras) menu select Design Rules/Transformations (Entwurfsregeln/Transformationen).
        Select the fourth entry ("Table abbreviation to column") and click the Apply (Anwenden) button.
        Then click the Close (Schliessen) button.
    Note that you can run Data Modeler in English if you wish.
    First close Data Modeler and then edit the file datamodeler.conf (if you are using Data Modeler in 32 bit mode) or datamodeler64.conf (if you are using Data Modeler in 64 bit mode).
    These files are in folder datamodeler\datamodeler\bin.
    To run Data Modeler in English, you should add the following lines to the file:
    AddVMOption -Duser.country=US
    AddVMOption -Duser.language=en
    Regards,
    David

  • Suppress auto sequence and trigger DDL for surrogate keys?

    Is there a way to suppress trigger and sequence creation for surrogate keys when export to DDL file?
    I know most of the time the automatic sequence and trigger creation is welcome and very handy.
    However I'm migrating from an old Designer model and there only the needed sequences are created.
    They have a different name and trigger logic is custom (and  generated outside designer).
    There is a lot of package code depending on this. So I prefer to create and use different sequences.
    Is there a way to achieve this? Any tips are welcome.Create

    Hi,
    Note that generating the DDL for Oracle 12c means that it will attempt to use your Oracle 12c Physical model.  So if you normally use Oracle 10g or 11g, you will find that any details from your Oracle 10g or 11g Physical Model will not be included.  So this approach may have other implications for you.
    If you are not using Oracle 12c, there are some relevant properties on the Auto Increment tab of the Relational Model properties dialog for the Column which may help:
    Sequence Name - allows you to specify the name of the Sequence (which can be the name of a Sequence defined in the relevant Physical Model).
    Trigger Name - allows you to specify the name of a Trigger (which can be the name of a Trigger that is defined for the Table in the Physical Model).
    Generate Trigger - unsetting this will stop the Trigger being generated.
    David

  • DataModeler v3.3.0 - Naming standards template for surrogate keys creation

    I'm using DM 3.3.0.734 and in the logical model we now can define in the entity properties to "Create Surrogate Key".
    When we use Engineer to relational model, for each entity is automatically created a new column using the naming template {entity}_ID as NUMERIC (without precision) and is defined as primary key.
    My questions are:
    Is possible to define a different naming standard for surrogate key creation?. We define id_{entiry}
    Is possible to set the precision of NUMERIC surrogate key?
    If we define entity's column as Primary UID, these columns are included in an unique constraint, but are using the naming standards for PK.
    As consequence are created the following:
    Unique constraint name: entity_PK
    Primary key(surrogate)name: entity_PKv1
    There is any way to define naming standards like "{entity}_UID" for unique constraints, or even, "{entity}_SK" for surrogate primary key name?
    Can anyone help with some of these topics?
    Regards,
    Ariel.

    Hi Ariel,
    Naming standards template for surrogate keys creation I logged enhancement request for that.
    How to change those bad names (going to change them one by one is not an option):
    1) If those "transformed" unique keys are the only ones you have in relational model then simply can apply naming standards
    2) You can write transformation script to do that for you
    3) you can use new functionality - search, export to excel file, change the names there (using find/replace will be faster) and return changed data back to relational model
    you can find description for that here:
    https://apex.oracle.com/pls/apex/f?p=44785:24:13179871410726::NO:24:P24_CONTENT_ID,P24_PREV_PAGE:6621,16
    http://www.thatjeffsmith.com/archive/2012/11/sql-developer-data-modeler-v3-3-early-adopter-search/
    http://www.thatjeffsmith.com/archive/2012/11/sql-developer-data-modeler-v3-3-early-adopter-collaborative-design-via-excel/
    You should search for _PK, then filter result on Index and you can export result using report functionality (to XLS or XLSX output format). You can create template and include only table and name (of index) as properties to be included into report.
    Regards,
    Philip

  • How to Maintain Surrogate Key Mapping (cross-reference) for Dimension Tables

    Hi,
    What would be the best approach on ODI to implement the Surrogate Key Mapping Table on the STG layer according to Kimball's technique:
    "Surrogate key mapping tables are designed to map natural keys from the disparate source systems to their master data warehouse surrogate key. Mapping tables are an efficient way to maintain surrogate keys in your data warehouse. These compact tables are designed for high-speed processing. Mapping tables contain only the most current value of a surrogate key— used to populate a dimension—and the natural key from the source system. Since the same dimension can have many sources, a mapping table contains a natural key column for each of its sources.
    Mapping tables can be equally effective if they are stored in a database or on the file system. The advantage of using a database for mapping tables is that you can utilize the database sequence generator to create new surrogate keys. And also, when indexed properly, mapping tables in a database are very efficient during key value lookups."
    We have a requirement to implement cross-reference mapping tables with Natural and Surrogate Keys for each dimension table. These mappings tables will be populated automatically (only inserts) during the E-LT execution, right after inserting into the dimension table.
    Someone have any idea on how to implement this on ODI?
    Thanks,
    Danilo

    Hi,
    first of all please avoid bolding something. After this according Kimball (if i remember well) is a 1:1 mapping, so no-surrogate key.
    After that personally you could use Lookup Table
    http://www.odigurus.com/2012/02/lookup-transformation-using-odi.html
    or make a simple outer join filtering by your "Active_Flag" column (remember that this filter need to be inside your outer join).
    Let us know
    Francesco

  • Automatic creation of new tax classification

    Hi
    Help needed in understanding......
    Automatic creation of tax classification in taxes in billing tab of customer master , after creation of a sales depot in a different country
    thanks
    Anil

    Unless you use jurisdiction codes, and no external tax system, for
    example with tax procedure TAXUSJ, there is no validity dates for the
    condition records.  You can see this differnce by comparing the tables
    A003 without jurisdiction codes and A053 with jurisdiction codes.  A053
    contains the extra fields DATBI (key field) and DATAB.  This is the
    standard functionality.
    Please have a look at the following part of note 418582:
    " Changing past percentage rates has to be inhibited in order to avoid
    database inconsistencies. For this reason, the functions which allow you
    to transport time-dependent tax codes with percentage rates from the
    past are not supported."

  • 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.

  • Automatically creation of storage location for material, in MF60

    Hi all,
    my collegue of PP module uses MF60 transaction.
    When he puts XXXX as Replenishment storage location, the system tells him this error: To stge loc. XXXX does not exist for material M1010000182 in plant 0001.
    In MM i have activate the automatic creation of storage location for plant 0001 and for all movement types.
    Why MF60 does not respect this requirement?
    If I try to do movement type 311 with MIGO, manually, there's no problem to transfer the material from a storage location to , XXXX s.loc.
    Is there something more that I have to do?
    Thanks in advance!
    Best regards
    Alba

    Thanks a lot...
    the note says:
    Summary
    Symptom
    A material without storage location view exists.
    If within a single material document, this material is moved in such a way that no change in stock occurs in total, the system does not create a storage location automatically even if this is set in Customizing.
    Additional key words
    OMC3, XLAUT
    Cause and prerequisites
    All postings to a segment (for example, material, plant, storage location) are only executed if a change in stock occurs. Only in this case, storage locations are created automatically. This way it is made sure that no empty segments are created.
    Solution
    The system behaves correctly.
    Header Data
    Release Status:     
    Released on:     07.07.2000  22:00:00
    BUT why IF i do 311 in MIGO, system creates automatically storage location (also if no change in stock occurs in total).
    AND if doMF60  (that does mouvement 311), system does not create automatically the storage location?
    Best regards
    Alba

  • Automatic Creation of multiple Transportation Lanes

    Hi all.
    Is it possible to avoid following standard behaviour:
    Change of Supplying Plant in the Special Procurement Type
    If you have changed the supplying plant in the special procurement type in the ERP system, the SCM system creates a new transportation lane for the new combination of supplying plant (from special procurement type) and material/plant. The already existing transportation lane and the now invalid combination of supplying plant and plant in the ERP system is locked for orders in the SAP APO system. This can be seen from the lock indicator X that is set by the system.
    Automatic Creation of Transportation Lanes - Transportation Lane - SAP Library
    Our need for some SKU is to create automatically two T-Lanes. Considering user exit EXIT_SAPLCMAT_001, we added a new line on CT_CIF_MATLOC (and relative CT_CIF_MATLOCX) with different SUPPLPLANT, but the system obviously blocks (SPRKZ) the SKU on one of the two T-Lane.
    Thanks in advance for your support.

    Hi Mauro,
    In my opinion you have to create a program to delete the lock indicator. First you have to extract the information from tr.lanes, then change (delete X indicator) and save. This job should be scheduled before heuristic run.
    To extract data from tr.lanes you can use BAPI_TRLSRVAPS_GETLIST2. To change and save you can use BAPI_TRLSRVAPS_SAVEMULTI2.
    Hope that can help you!
    Thanks.
    Regards, Marius

  • Automatic creation of Purchase Order from Sales Order

    Hi,
    please is it possible to know the use of flag "Create PO automatically" into Sales Order Item Category customizing setting? Perhaps automatic creation of PO for Third Party sales process.
    Thank you very much
    Kind Reards
    Andrea

    Hi friend,
    You are right that chekbox is used for third party only. And it will be used when you are using ALE when you have distributed system where your sales order is supposed to be created in different system and PO will be raised in different system.
    If you activate this field, the system automatically generates both a purchase order requisition for third-party schedule lines as well as a purchase order in the background when you save the sales order. This function has been designed for Application Link Enabling (ALE) but you can also use it when working with distributed systems.
    To avoid errors caused by incorrect system settings, we recommend that you carry out the SAPEVENT OCU_LINK\DS:TRAN.BD86 for your third-party material. If you SAPEVENT OCU_LINK\DS:TRAN.PFTS tasks 8097 (create)and 8114 (change) (by choosing "Extras -> Employee assignment -> Maintain"), you will receive workflow objects in your inbox, should any errors occur.

  • Automatic creation of purchase info record

    Hi friends
    I could not find check box in RFQ (ME41!N)or in Quotation (ME47N) for updating/automatic creation of purchase info record.
    Thanks
    Sunny

    Hi,
    you can maintain the info update for the required quotation through ME47.choose the required line item and click on the "item detail" icon and put the necessary value for info update:
    1-     No update
    2-A     Update with or without plant
    3-B     Update with plant (if no plant ban)
    4-C     Update without plant (if no plant requirement)
    Indicator: Update Info Record
    Determines whether:
    The purchasing info record for this vendor and material is to refer to this PO item, and
    The item is to be valid for the entire purchasing organization or just for the plant.
    Use
    The indicator determines which prices and conditions are suggested in future PO items.
    Prices and conditions can apply to an entire purchasing organization or to a single plant within a purchasing organization.
    For example, if you create a purchase order for a plant for which an info record has been defined at plant level, the purchase order is based on the conditions in the plant info record and not on the conditions that apply to the purchasing organization.
    Procedure
    Enter the relevant plant key:
    A
    Updating of the document number is effected at plant level as long as there is a purchasing info record at plant level. Otherwise the document number is updated at purchasing organization level.
    B
    Updating is effected at plant level if plant conditions are allowed for the plant.
    C
    Updating is effected without plant data if plant conditions are not necessary for the plant.
    Dependencies
    The level at which updating of the document number may be effected is defined for each plant.
    Hope this will clarify your query.
    Thanks & Regards,
    Bijay Pradhan

  • About Surrogate Key and Dimension Key on OWB 10.2

    Hi, everyone.
    I am using OWB 10.2 and I have a question about Surrogate key and Dimension Key.
    I indicated the foreign key as VARCHAR2 type in Fact Table and Dimension Key as VARCHAR2 type is operated as Primary key in Dimension Table. I made Single Level in Dimension Table.
    I know that Dimension Key stores the surrogate ID for dimension and is the primary key of the table. Also, Surrogate ID should be only NUMBER type.
    So, in this case, Surrogate ID is NUMBER type
    Dimension key should be NUMBER type to store the surrogate ID.
    But, Dimension key also should operate the primary to relate Foreign key as VARCHAR2 type.
    How I can solve this confusing condition?
    Please let me know that.
    JWS

    Hi JWS,
    From a SQL point of view it should not be a problem to join a NUMBER field to a VARCHAR2 field because during execution there will be an implicite cast for the NUMBER value to a VARCHAR2 value. See the example below.
       SELECT * FROM DUAL
       WHERE   1 = '1'From an OWB point of view it is not possible to have a Dimension with an NUMBER value Key that has a relation to a VARCHAR2 value Foreign key in a Fact table. This is caused due to the creation of a Fact table in OWB in which the Foreign keys in it are build from de Dimension tables that refer to them.
    You will loose the reference to the Dimension when changing the type of the Foreign Key.
    To resolve this issue I would advise you to use a Sequence that generates your Surrogate Key (NUMBER type) for the Dimension table and store it in the Primary Key Column (VARCHAR2 type).
    When validating the mapping you will get a warning, but when executing this should give no problems.
    Regards,
    Ilona

  • Surrogate Key and Map for Cube

    Hi
    I am new to Data Warehousing and am trying to use OWB 11g.
    I am trying to create dimensions with multiple levels. When I create more than one level it need to have surrogate as well business key for each dimension level. But I can create only one surrogate in the dimension, there is no option to create multiple surrogate keys in the same dimension. so what am I missing?
    My second question is regarding cube. Do I need to create a Mapping for a cube? if yes, should I move the data to the cube from the dimensions? and where will the measures come from? do i need to load the measures or they will be calculated automatically?
    please reply...
    regards
    Arif

    hi
    Got it, Yes that was the reason,
    The table was not properly deployed after the dimension was modified.
    Anyway, the describe of the table is as follows
    describe arif.QUESTION_DIM
    Name Null Type
    DIMENSION_KEY NOT NULL NUMBER
    IGV_ID NUMBER
    PER_ID NUMBER
    DIM_ID NUMBER
    IGO_ID NUMBER
    INQ_ID NUMBER
    ID NUMBER
    DIM_ORDEM NUMBER
    DIM_AMBITO VARCHAR2(3)
    DIM_NOME VARCHAR2(150)
    10 rows selected
    Now, I am having another problem,
    when, I deploy the Map to load the data from three different tables, it gives the following problem
    Name               Action               Status          Log
    QUESTION_MAP          Create               Warning          ORA-06550: line 297, column 25:
                                            PLS-00302: component 'ID' must be declared
    QUESTION_MAP          Create               Warning          ORA-06550: line 1153, column 11:
                                            PL/SQL: SQL Statement ignored
    QUESTION_MAP          Create               Warning          ORA-06550: line 1155, column 15:
                                            PL/SQL: ORA-00904: "QUESTION_DIM"."ID": invalid identifier
    QUESTION_MAP          Create               Warning          ORA-06550: line 1155, column 31:
                                            PLS-00302: component 'ID' must be declared
    QUESTION_MAP          Create               Warning          ORA-06550: line 233, column 1:
                                            PL/SQL: SQL Statement ignored
    QUESTION_MAP          Create               Warning          ORA-06550: line 2539, column 11:
                                            PL/SQL: SQL Statement ignored
    QUESTION_MAP          Create               Warning          ORA-06550: line 2541, column 15:
                                            PL/SQL: ORA-00904: "QUESTION_DIM"."ID": invalid identifier
    QUESTION_MAP          Create               Warning          ORA-06550: line 2541, column 31:
                                            PLS-00302: component 'ID' must be declared
    QUESTION_MAP          Create               Warning          ORA-06550: line 297, column 9:
                                            PL/SQL: ORA-00904: "QUESTION_DIM"."ID": invalid identifier
    Edited by: user643560 on Oct 22, 2008 9:38 AM

Maybe you are looking for