Unique key for Qualified tables

Hello Experts,
We are currently facing an issue with qualified tables. We need to retain existing system keys as below:
Item (Main table)
Item_Id, Item_Number
Item_Price (Qualified Table)
Item_Price_Id, Item_Id, Price_Type_Id, Price
E.g.
1, Pencil
2, Pen
3, Notepad
1, 1, Retail_Price, $10
2, 1, Wholesale_Price, $5
3, 2, Retail_Price, $15
4, 2, Wholesale_Price, $10
We need to migrate the existing ids (Item_Price_Id) in MDM qualified table and need to maintain the same as max(Item_Price_Id) + 1 for all future records.
Is there a way we can achieve this?
Your help is greatly appreciated.
Thanks in advance,
Vinay

Hi Karol,
The Interface Iprinciple has this function as it:
Gets the unique identifier which unambiguously identifies the object's <b>principal type and principal's data record</b>(s) in the data store (e.g. a relational database).
<b>Note: the unique ID is a case sensitive string</b>
Use this identifier to keep and persist references to principals. As this identifier contains internal information and is usually not readable, it should not be displayed in user interfaces.
UME implementation guarantees to return Strings which are not longer than 255 characters.
<b>Returns:</b>
a non-null String identifying this principal
I hope this helps you.
Regards
Pravesh

Similar Messages

  • Is it possible to create many primary key for a table?

    hello sir/mam.
    i am selva, i am new to abap,
    is it possible to create many primary key for a table?
    please guide me.

    Hi Selva,
    Many Primary Keys = Composite Key.
    i.e some set of columns will enable you to identify a unique row from a set of rows in the table.
    This can be achieved by checking the primary key check box in se11.
    Hope it helps.
    Regards,
    Maheswaran.B
    Message was edited by: Maheswaran B

  • Remote key for lookup tables

    Hi,
    I need some advice on remote keys for lookup tables.
    We have loaded lookup data from several client system into the MDM repository. Each of the client system can have diffferences in the lookup values. What we need to do is to enable the keymappings so that the syndicator would know which value belongs to which system.
    The tricky part is. We haven't managed to send out the values based on the remote keys. We do <b></b>not<b></b> want to send the lookup tables themselves but the actually main table records. All lookup data should be checked at the point of the syndication and only the used lookup values that orginally came from one system should be send to that particular system. Otherwise they should be tag should be blank.
    Is this the right approach to handle this demand or is there a different way to take care of this? What would be the right settings in the syndicator?
    Help will be rewarded.
    Thank you very much
    best regards
    Nicolas

    Hi Andreas,
    that is correct. Let's take two examples:
    1) regions
    2) Sales Area data (qualified lookup data)
    Both tables are filled and loaded directly from the R/3s. So you would already know which value belongs to which system.
    The problem that I have is that we will not map the remote key from the main table because it will be blank for new created master data (Centralization scenario). Therefore we cannot map the remote key from the attached lookup tables, can we?
    The remote key will only work for lookup tables if the remote key of the actual master data is mapped. Since we don't have the remote key (local customer ID form R/3) in MDM and since we do not create it at the point of the syndication... how would the SAP standard scenario would look like for that?
    This is nothing extraordinary it's just a standard centralization scneario.
    Please advice.
    Thanks alot
    best regards
    Nicolas

  • Getting Candidate Keys for a Table?

    Hi,
    Does anyone know a way of getting a list of all candidate keys for a table? (all "UNIQUE" sets of columns defined when creating a table).
    I looked in DatabaseMetaData, but there you can only get a list of primary key fields.
    I'm using Java 1.3.1 with a PostgreSQL backend.
    Cheers
    Amar

    run a query against the Meta-data tables of the database for getting the UNIQUE columns.

  • Any easy way to generate unique primary key for database table?

    I'm currently playing with the J2EE reference implementation from Sun which comes with the IBM Cloudscape database. This Cloudscape database supports the use of an AutoIncrement field.
    First question: Can I use CMP and assume that the database will generate a proper key for me? Anyone tried it out successfully before?
    Also, based on what I've heard so far, it seems that generating database primary key is not really well-supported by J2EE using CMP in that a lot of J2EE developers have to resort to workarounds like using a session bean, JDBC and (1) some seed numbers for ID implanted in the database itself (as in the J2EE tutorial DukesBankApp example) or (2) using the SQL MAX aggregation command + 1. Usign seed number is contradictory to good database design and using MAX is dangerous for heavy traffic application if 2 beans try to insert themselves into the database at the same time (synchronizarion problem).
    Anyway I find it dumb that we still have to go back to JDBC and SQL which was the reason why the concept Entity Bean was introduced; to make database persistence transparent! Now it seems that J2EE makes it worse and more troublesome than before.
    Second Question: Is there any easy (hopefully transparent/automatic) way of generating primary key ID?

    if you want to rely on your container or database then go hard, will probably be faster.
    to make a cross container/db soln I used a CMP Entity bean called Sequence with one field for uid
    I use one instance and increment the field each time.
    To do the logic, I have a utils class with static method, no need for session bean overhead
    I reckon this approach is OK considering all things

  • Primary/Unique key for GL_IMPORT_REFERENCES

    Hi all,
    We are on EBS11.5.10. I have the following requirement. I need to put a snapshot log on GL_IMPORT_REFERENCES which we will use to interface data to out reporting environment. Therefore i need to set a primary key on GL_IMPORT_REFERENCES, this is required for creating the snapshot log.
    Can anyone suggest what combination of fields would be unique for this table, as no unique key is set.
    TIA

    mma,
    but do you tie them in with ETL? or they're simply uniqe auto-number-like?
    Thanks
    I just found this:
    http://datawarehouse.ittoolbox.com/groups/technical-functional/informatica-l/re-about-oracle-bi-and-fact-tables-and-image-tables-1515935
    Looks like there's a new methodology for extending the DWH. I'm still looking into this, but I still think auto-numbering ROW_WID is a good idea.
    Mma, perhaps - could you provide me with an example or two to present this change. Thanks

  • How to create a foreign key for the table from two different tables?

    Hi All,
    I have a three table like below. In the below table SAMPLE_CONS_CHECK and SAMPLE_CONS2_CHECK will be having the primary key for NAME column. The same SAMPLE_CONS3_CHECK table also having the primary key for NAME column and forieign key for SAMPLE_CONS_CHECK and SAMPLE_CONS2_CHECK tables. See the below code 2
    code 1:
    CREATE TABLE SAMPLE_CONS_CHECK
            (NAME VARCHAR2(10),
            SERIES  VARCHAR2(5)
    CREATE TABLE SAMPLE_CONS2_CHECK
            (NAME  VARCHAR2(5),
             MODEL  NUMBER
    CREATE TABLE SAMPLE_CONS3_CHECK
            (NAME  VARCHAR2(5),
             MODEL_NO  NUMBER
            )code 2
    alter table SAMPLE_CONS_CHECK
    add constraint SAMPLE_CONS_CHECK_pk primary key (NAME)
    alter table SAMPLE_CONS2_CHECK
    add constraint SAMPLE_CONS2_CHECK_pk primary key (NAME)
    alter table SAMPLE_CONS3_CHECK
    add constraint SAMPLE_CONS3_CHECK_pk primary key (NAME)
    ALTER TABLE SAMPLE_CONS3_CHECK ADD
    CONSTRAINT SAMPLE_CONS3_CHECK_FK1 FOREIGN KEY
         NAME
    ) REFERENCES SAMPLE_CONS_CHECK
        NAME
    ) ON DELETE CASCADE;
    ALTER TABLE SAMPLE_CONS3_CHECK ADD
    CONSTRAINT SAMPLE_CONS3_CHECK_FK2 FOREIGN KEY
         NAME
    ) REFERENCES SAMPLE_CONS2_CHECK
        NAME
    ) ON DELETE CASCADE;From the above schenario i am able to insert the data to SAMPLE_CONS3_CHECK table. But the parent data is already available in the parent table. The problem is here two different constarints from two different tables. While inserting, it is checking from both the tables whether the parent is exist or not.
    How can i solve this problem? Can anyone halp me about this?
    Thanks
    Edited by: orasuriya on Aug 8, 2009 2:02 AM

    Actually the design is completely incorrect.
    What you say is
    I have
    'foo', 'foo series'
    'foo','foo model'
    'foo',666
    By virtue of table3 referring to both table1 and table2.
    This means you actually need to have 1 (one) table:
    'foo','foo series','foo model', 666
    And the 'problem' disappears.
    Sybrand Bakker
    Senior Oracle DBA

  • How to define Composite primary key for a Table

    Hi ,
    I am basically more into Java Programming , with little bit knowledge on Oracle as DataBase .so please excuse for my silly doubts .
    Can anybody please tell me how to define a Composite Primary Key on a Table .
    Thanks in advance .
    Edited by: user672373773 on Sep 25, 2009 8:54 AM

    Here is an example right out of the Oracle documentation and the syntax for adding PK since you mention adding a composite PK.
    Example creating composite index
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14251/adfns_indexing.htm#sthref594
    Syntax for adding a PK (composite or not)
    alter table oooooooo.tttttttt
    add constraint tttttttt_PK
    primary key (sample_column2,
    sample_column1)
    using index
    tablespace IDXSPC
    pctfree 05
    initrans 04
    maxtrans 08
    storage (initial 16k
    next 16k
    maxextents 32
    pctincrease 0);
    -- dictionary management with restricted storage, change as desired.
    HTH -- Mark D Powell --

  • Problem with unique key for Fiscal_T_Time dimension lookup

    Hi,
    In my mapping, I use Lookup on Fiscal_T_Time dimension provided by oracle. The validation gives me a warning,saying "VLD-1603:Lookup condition for key lookup Fiscal_T_Time does not contain a complete unique key". I'm using <source_group>.date as input and L_Day_day as lookup column, which is shown as I select the unique key from the drop down list. Both have type matches. The configuration on the dimension also shows the constraint of the unique Key. What can be wrong?

    Continue my issue in another thread by Daming Wang on "More constraints need to add to Dimension". Thanks.

  • Expression logic for qualified tables

    Hello Experts.
    I am searching for an expression that can manage the following requirements:
    Different records of a qualified table belong to one record of the main table. One value that belongs to a certain combination in the qualified table should be automatically transferred to a field in the main table. For example there is one main table (MAIN) and a qualified table (QT) with at least two fields.
    Main table (MAIN) with some fields
    Qualified table (QT) with Field 1 and Field 2
    I tried following expression: IF(QT.Field 1 = ‘NAME’, QT.Field 2). But the expression doesn't’t work.
    How can an expression work with a certain combination of a qualified table? Has anybody an idea how to solve such a mystery?
    Thank you in advanced,
    Anja

    Hi Anita.
    I have the answer: You need an additional field in qualified table. This field is filled during import with the concatenation of all field values of the QT record.
    Qualified table with field 1 and field 2 look then like this
    Field 1: Name
    Field 2: Anita
    Field Conca:Name.Anita
    Now it is possible to build expression that can evaluate the string of the concatenation field.
    Thanks for your help,
    Anja

  • XML for Qualified tables (SP05)

    Hi all
    I have a xml file like this
    <?xml version="1.0" encoding="UTF-8"?>
    <od:schema xmlns:od="http://www.w3.org/2001/XMLSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <od:element name="Test">
      <od:complexType>
       <od:sequence>
              <od:element name="Material_Number_R3"/>
              <od:element name="ST_Code"/>
              <od:element name="Family"/>
              <od:element name="Line"/>
              <od:element name="Category"/>
              <od:element name="Ginco_R3_Code"/>
              <od:element name="Material_Type"/>
              <od:element name="Material_Group"/>
              <od:element name="Division"/>
       </od:sequence>
      </od:complexType>
    </od:element>
    </od:schema>
    And when i load it in the syndicator manager i can do the mapping, but i want to add some field of a qualified table: what should i change in my xml?
    BR
    PP

    Hi Jose,
    when you look at the delivered xsd-structures for the material master, you can see, taht Q-Lookup tables are already mirrored in these strcutres. so this could be used as a template.
    You simply would define a complex type structure for the Q-lookup-table fields (I call it MFGDATA). This complex type would then be referred to in your main strucutre (I call it MFGInfo).
    It would have the following for :
    <?xml version="1.0" encoding="UTF-8"?>
    <od:schema xmlns:od="http://www.w3.org/2001/XMLSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <od:element name="Test">
    <od:complexType>
    <od:sequence>
    <od:element name="Material_Number_R3"/>
    <od:element name="ST_Code"/>
    <od:element name="Family"/>
    <od:element name="Line"/>
    <od:element name="Category"/>
    <od:element name="Ginco_R3_Code"/>
    <od:element name="Material_Type"/>
    <od:element name="Material_Group"/>
    <od:element name="Division"/>
    <xsd:element name="MFGInfo" type="MFGDATA" maxOccurs="unbounded" />
    </od:sequence>
    </od:complexType>
    </od:element>
    <xsd:complexType name="MFGDATA">
    ######here you define all the fields of the Q-lookup tabel #####
    </xsd:complexType>
    </od:schema>
    Regards Klaus

  • Question on indexing foreign key for replicated table

    Hi everybody,
    I have 2 tables with following script
    create table
    parent(parent_id number(2) not null,
    parent_name varchar(20),
    constraint parent_pk primary key(parent_id))
    create table child(child_id number(2) not null,
    parent_id number(2) not null,
    child_name varchar2(20),
    constraint pk_child primary key(child_id,parent_id),
    constraint fk_child foreign key (parent_id) references parenr(parent_id)
    I want to replicate them and I know to replicate these 2 tables i should add them to my replication group, my question is that the child_id has foreign key so as below link says
    http://dbataj.blogspot.com/2007/11/advance-replication-part-ii-master.html
    I should put an index on the foreign key.What type of index should it be and is the following script correct for my purpose?
    CREATE BITMAP
    INDEX "fk_child"
    ON child ("PARENT_ID")
    TABLESPACE "USERS"
    I would appreciate your help in advance.
    Mery

    A bitmap index is almost certainly not the sort of index you'd want to create. You would normally want just a normal index, i.e.
    CREATE INDEX fk_child
      ON child( parent_id )on the master database just to support normal DML operations (otherwise, deleting a row from the parent table requires doing a full table scan on the child table to see if there are any orphaned child records).
    If you are trying to set up a multi-master replication environment, you would also need to replicate this index, since you'll want to support basic DML on both nodes.
    Justin

  • Primary key for active table

    hi
    can anyone tell me step by step to create primarykey for active table of dso that already has data loaded. few requests are activated and few are not activated.
    points for sure.
    regards
    anil

    Anil,
    This is absolutely mandatory to delete the data from any of the table if you want to change the key fields of the table. This is as good as universal law in data base theory
    Now as far as your ODS is concerned, you have to delete the complete data from it and then you can change the key fields of it. Again you just need to change this in the definition of ODS and not in any particular table.
    Just change the definition of ODS in development and transport it to production. Make sure top delete the data before you transport it. If not, transport will fail.
    Hope this info helps you.
    Regards,
    Yogesh

  • How many primary keys for one table?can we add more primary keys

    In general Table have one  primary key.is it possible to more than one primary key in a table?(ie is it possible to add more than one pirmary key in a table). Help me out.

    pls do check this link
    [http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ea0b446011d189700000e8322d00/frameset.htm|http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ea0b446011d189700000e8322d00/frameset.htm]
    All the key fields of a table must be stored together at the beginning of the table. A non-key field may not occur between two key fields.
    A maximum of 16 key fields per table is permitted. The maximum length of the table key is 255.
    If the key length is greater than 120, there are restrictions when transporting table entries. The key can only be specified up to a maximum of 120 places in a transport. If the key is larger than 120, table entries must be transported generically.

  • How add new field as primary key for existing table

    Hi,
    There is table with name REVIEWER_REUSE_EFFORT and the table has 8000 rows in it.
    Now the enhacement i must do on this table is there is no primary key on this table. so i must create a ID also add values to this table of ID
    Table structure is like this
    Create table REVIEWER_REUSE_EFFORT
    PRO_ID number,
    POBJ_ID number,
    TASK_ID number,
    POTENTIAL_EFFORT number,
    COMMENTS varchar2(1200),
    CREATED_BY varchar2(100),
    CREATION_DATE sysdate
    UPDATED_BY varchar2(1200),
    UPDATED_DATE sysdate
    Please suggest me how to add values in that 8000 rows
    Thanks
    Sudhir

    Hi,
    If you want to add a new column and update the new column with sequence of number
    alter table REVIEWER_REUSE_EFFORT add (ID number);
    update REVIEWER_REUSE_EFFORT  set ID=rownum;Regards,
    Prazy
    Edited by: Prazy on Jun 21, 2010 3:13 PM

Maybe you are looking for

  • Match not showing up in iTunes

    For some reason, Match is no longer showing up in iTunes. My AppleID is different from my iTunes ID, if that makes a difference. This used to work fine - in fact the Match process successfully completed for over 22,000 tracks. I have no idea "where i

  • 2 date columns and one dimension hierarchy

    Hi, I have one question in OBIEE 10g. I have one dimension table with 2 date columns (insertedOn, updatedOn) I created insertedOnYear, insertedOnMonth and updatedOnYear, updatedOnMonth columns from my date columns. I have hierarchy Year -> Month -> D

  • Problem create table

    I am a bigner in 10g, my question is if I create table in SQL command line, can I open this table in database home page, or how can I insert in home page in my table which I have created in sql command line. furthermore is there any tutorial of 10g.

  • The LMS 4.1 show message error license.

    The click logs critical show message "This software is provided for evaluation purposes only and had expired. If this is not an evaluation copy, please click this link for information about obtaining a valid purchase license or click here for current

  • Help! Vista Audio Settings issue (I think)

    Ok, I admit it.  I'm in way over my head.  Any advice is greatly appreciated! Last Spring I bought a new Sony Vaio laptop (with bluray drive and HDMI out), Sony XBR LCD, and Yamaha receiver (1 HDMI out - 2 HDMI in) from a local Best Buy.  I brought e