How to identify tables use currency as foreign keys?

Currently we have identified some currencies that needed to updated to ISO values and others as obsolete(eg. some EURO countiries set to EUR) in ECC
So my question is how to efficiently locate those foreign keys tables in ECC?
Thx and Best Grds
David

I do not think I fully understand your question but I will give it a shot.
If you are trying to locate a foreign key, then proceed as follows.
1.  Transaction Code: SE11
2.  Enter the table in question.  For example BSEG
3.  Select a table. For example BUKRS or KUNNR
4.  Click on Foreign Keys.  The symbol or icon is a key with an arrow pointing down. It is before Srch Help.
5. A screen will pop-up with the foreign key fields and tables where you can you the CHECKTABLE.
Or enter table using SE11: GLPCT
2.  Select RTCUR
3.  Click on Foreign Keys
3.  In the pop-up screen,  double click on TCURC in the check table field.
Hopes the above provides you with a clue.
Elias
Edited by: Elias Akorli on Dec 7, 2009 2:29 PM

Similar Messages

  • How can identify the default currency for a customer?

    How can identify the default currency for a customer?
    I know that this is being determined when you create a sales order for a particular customer, for example, so I could break this process open and find out what it uses. But I thought it worth asking in this forum first.
    Blue

    Hi Gary,
    As per my understanding of your question I am replying , If you are looking some thing else then I request you to please elaborate your query.
    If you see the BP sales area data in transaction BP, In billing tab you maintain the currency for a customer which is default currency when you create a sales order.
    <b>Reward points if it helps!!</b>
    Best regards,
    Vikash

  • In ADF how can i insert data in multiple table if they have foreign key

    I have started working on ADF and can anybody inform me in ADF how can i insert data in multiple table if they have foreign key,please?
    Thnak you very much.

    Hello,
    Still no luck.I am surely doing silly mistakes.Anyway,Here are my workings-
    1> student_mst (id(pk),studentname) and student_guard_mst(id(fk),guardianname)
    2> created EO from both of the tables,made id in both EO as DBSequence and an association was also generated.
    3> i made that association composite by clicking the checkbox
    4> i created 2 VO from 2 EO.
    5> put those VO in Application Module.
    6> dragged and dropped 2 VO on my jspx page and dropped them as ADF Form.
    Now what to do please?

  • ORA-02266: unique/primary keys in table referenced by enabled foreign keys

    Hi,
    I am trying to delete data from a table by dropping a partition. I have identified all the child tables by running the following command.
    select 'select count(*) from '||table_name||' where employee_id = 100;'
    from dba_constraints
    where constraint_type='R'
    and r_constraint_name in
    (select constraint_name from dba_constraints
    where constraint_type in ('P','U') and table_name='EMPLOYEE);
    'SELECTCOUNT(*)FROM'||TABLE_NAME||'WHEREEMPLOYEE_ID_ID=100;'
    select count(*) from PT_ORDERS where employee_id = 100;
    select count(*) from PT_DEP where employee_id = 100;
    select count(*) from PT_SKILLSET where employee_id = 100;
    I dropped the partition for employee_id 100 in all of the child tables. The select count(*) returns 0 rows for each of the above.
    When I try to run the below command on the EMPLOYEE table, I get 'ORA-02266: unique/primary keys in table referenced by enabled foreign keys'.
    alter table EMPLOYEE drop partition EMP_ID_100;
    I cant see why I am unable to drop this partition now as there is now child data in any of the referenced tables. Any suggestions or help on this would be greatly appreciated.
    Thanks.
    Rgs,
    Rob

    You should disable foreign key constraints first and drop partition. Deletion of rows or dropping partitions in childs don't work in this case
    as you have the global dependency:
    <PRE>
    SQL> create table scott.t (x int primary key, y int)
    2 partition by list (y) (
    3 partition p_1 values(1), partition p_2 values(2))
    4 /
    Table created.
    SQL> create table scott.t_c (x int references scott.t(x), y int)
    2 partition by list (y) (
    3 partition p_1 values(1), partition p_2 values(2))
    4 /
    Table created.
    SQL> insert into scott.t values(1,1)
    2 /
    1 row created.
    SQL> insert into scott.t values(2,2)
    2 /
    1 row created.
    SQL> insert into scott.t_c values(1,1)
    2 /
    1 row created.
    SQL> insert into scott.t_c values(2,2)
    2 /
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> alter table scott.t_c drop partition p_2;
    Table altered.
    SQL> alter table scott.t drop partition p_2;
    alter table scott.t drop partition p_2
    ERROR at line 1:
    ORA-02266: unique/primary keys in table referenced by enabled foreign keys
    SQL> select constraint_name from dba_constraints
    2 where owner = 'SCOTT' and constraint_type = 'P'
    3 and table_name = 'T';
    CONSTRAINT_NAME
    SYS_C0011058
    SQL> select constraint_name from dba_constraints
    2 where owner = 'SCOTT' and constraint_type = 'R'
    3 and r_constraint_name = 'SYS_C0011058';
    CONSTRAINT_NAME
    SYS_C0011059
    SQL> alter table scott.t_c disable constraint SYS_C0011059;
    Table altered.
    SQL> alter table scott.t drop partition p_2;
    Table altered.
    SQL> alter table scott.t_c enable novalidate constraint SYS_C0011059;
    Table altered.
    </PRE>
    I guess you should consider such option as Referencial partitioning (with some restrictions).
    Best wishes,
    Dmitry.

  • How can I create a new entry without using LOV for foreign keys.

    Referring to TUHRA sample application based on HR database schema. JDeveloper 10.1.3.0.4
    How can I create a new employee without using LOV for the foreign key "job_id".
    On the first page I would like to choose the job_title from adf read-only table.
    After clicking on the "create new employee button" a creation form appears in which the job_id field is set with previous selection.
    Regards M.Winkler
    Edited by: user3541283 on 06.10.2008 03:44
    Edited by: user3541283 on 06.10.2008 03:50

    Hi,
    usually the foreign key is only set if the VO you select is dependent from a master. If e.g. you have DepartmentsVO1 that has an EmployeeVO3 as its nested VO, then creating a new instance of employees automatically add the foreign key. If you add EmployeesVO1, which is not dependent to DepartmensVO1, then the foreign key is not set. So if this is the case in THURA (keep in mind that this is not an Oracle demo but a sample used in a book about ADF) then all you need is to take the independent VO when building the new employee form.
    Frank

  • Using one user account table across multiple databases but account used as a foreign key

    I want to use one user account table from one database and use it across a couple other databases. The problem is that I want some tables to use the primary key from the user account table as a foreign key to access the data when the user logs in. Is this
    the right way of going about it? Do I have to create a user account table in all my databases? What is the best practice to handle this problem? Thanks in advance.

    You can use Triggers or using replication. 
    more info: 
    Add Foreign Key relationship between two Databases
    SQL Server Replication
    Saeid Hasani [sqldevelop]

  • How to create table using mysql in LabVIEW

    Hii
               I am using mysql database Toolkit for my project.  In that how to New create a table. Is there any possiblilites to create a table using query...can u send a sample prg ... and inform which toolkit Vi to use....  

    The SQL syntax for creating a table is:
    CREATE TABLE table_name
    column_name1 data_type,
    column_name2 data_type,
    column_name3 data_type,
    )The toolkit has a funciton called DB Tools Create Table. That would be the obvious function to use if you don't want to execute a SQL query to create the table. The tooklit comes with examples. Have you looked at them? There's one called Create Database Table that  would seem to be exactly what you are looking for.

  • How to get tables used by a Function Module

    Hi,
    How to know the tables used by a function module dynamically.
    Cuurently im using BAPI_MATERIAL_SAVEDATA in my report program.
    I tried FM GET_TABLES to know the tables, but could see only tables used in the report.
    Main issue in my case is when im running this update program, could observe different tables being displayed as updated in SM50(Process Overview).Want to clarify as why these tables which are not being used in my report are being displayed in SM50.
    So was doubtin weather this FM is using these displayed tables.
    Thanks in advance for u r replys.
    Regards,
    Dedeepya

    Hi Dedeepya,
    you could use a SQL Trace (tx. ST05) to list all tables affected and operations that realize. Just active the trace, execute FM, and Deactive trace. Then click in "Display trace" and check it.
    Best regards,
    Pablo

  • How to findout table using structure..

    I like to modify the sap script.I went to change editor on window in coding screen.but they are mentioned only structure name,not a table name.How to findout the table using this structure.

    Hi,
    If u open that structure  u can find the data element for that particular structure. U have to double click that element after that go with where-used-list icon and go with table fields and find out the tables.
    Thanks,
    Shankar

  • How to create table using Procedure

    Hi,
    I want to create table using procedure .
    How to write procedure for the table creation?
    thanks in advance.

    Use dynamic sql or DBMS_UTILITY.EXEC_DDL_STATEMENT:
    SQL> desc tbl1
    ERROR:
    ORA-04043: object tbl1 does not exist
    SQL> begin
      2      execute immediate 'create table tbl1(x number)';
      3  end;
      4  /
    PL/SQL procedure successfully completed.
    SQL> desc tbl1
    Name                                      Null?    Type
    X                                                  NUMBER
    SQL> drop table tbl1
      2  /
    Table dropped.
    SQL> begin
      2      DBMS_UTILITY.EXEC_DDL_STATEMENT('create table tbl1(x number)');
      3  end;
      4  /
    PL/SQL procedure successfully completed.
    SQL> desc tbl1
    Name                                      Null?    Type
    X                                                  NUMBER
    SQL>  SY.

  • How to change a massive amount of foreign keys?

    Hi to all!
    I'm a newbie here, and I hope I'll find a solution to my problem...
    Well, I have to create a copy of row within the same table, with same values except of primary key. That part is ok. Then, I have to change values of that primary key (from old value, to new value) in all foreign keys which references to that column/primary key in parent table. Let's say that isn't problem too, using system tables and informations about constraints and indexes...
    But, tricky part comes. Some of those foreign keys are primary keys for their tables, and there are other foreign keys which references to these primary keys, including a column which is primary key in very first (parent) table. And also, that line of primary key-foreign key can go on...
    I don't know how deep to check for those keys. Any help with some piece of code (in PL/SQL)? Also, how to start to change value of that, particular column, in line of primary key-foreign key?

    Sounds like you need to add a copy function to your application. This will allow you to create a copy of an existing import/export but each will be unique. This would provide you with the ability to change the import/export and retain the old and new details.
    A small example using a header and detail table;
    select * from orders;
      ORDER_ID ORDER_DATE
             1 27/05/2010
    select * from order_lines;
       LINE_ID   ORDER_ID
             1          1
             2          1
             3          1A function that makes a copy of a certain order;
    create or replace function copy_order(p_order_id orders.order_id%type)
      return number is
      l_new_order_id orders.order_id%type;
    begin
      select orders_seq.nextval
      into l_new_order_id
      from dual;
      insert into orders
        (order_id, order_date)
        select l_new_order_id, sysdate
        from orders
        where order_id = p_order_id;
      insert into order_lines
        (line_id, order_id)
        select order_lines_seq.nextval, l_new_order_id
        from order_lines
        where order_id = p_order_id;
      return l_new_order_id;
    end;
    Function createdCall the function with order_id 1;
    var n number
    exec :n := copy_order(1);
    PL/SQL procedure successfully completed
    print n
    n
    2There are now 2 similar orders;
    select * from orders;
      ORDER_ID ORDER_DATE
             1 27/05/2010
             2 28/05/2010
    select * from order_lines;
       LINE_ID   ORDER_ID
             1          1
             2          1
             3          1
             4          2
             5          2
             6          2
    6 rows selectedThe first order can be canceled (using a status column or similar) and the second order can be updated, ie add additional lines, etc. or left as is.

  • How to avoid shared locks when validating foreign keys?

    I have a table with a FK and I want to update a row in that table without being blocked by another transaction which is updating the parent row at the same time. Here is an example:
    CREATE TABLE dbo.ParentTable
    PARENT_ID int NOT NULL,
    VALUE varchar(128) NULL,
    CONSTRAINT PK_ParentTable PRIMARY KEY (PARENT_ID)
    GO
    CREATE TABLE dbo.ChildTable
    CHILD_ID int NOT NULL,
    PARENT_ID INT NULL,
    VALUE varchar(128) NULL,
    CONSTRAINT PK_ChildTable PRIMARY KEY (CHILD_ID),
    CONSTRAINT FK_ChildTable__ParentTable FOREIGN KEY (PARENT_ID)
    REFERENCES dbo.ParentTable (PARENT_ID)
    GO
    INSERT INTO ParentTable(PARENT_ID, VALUE)
    VALUES (1, 'Some value');
    INSERT INTO ChildTable(CHILD_ID, PARENT_ID, VALUE)
    VALUES (1, 1, 'Some value');
    GO
    Now I have 2 transactions running at the same time:
    The first transaction:
    SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;BEGIN TRAN
    UPDATE ParentTable
    SET VALUE = 'Test'
    WHERE PARENT_ID = 1;
    The second transaction:
    SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;BEGIN TRAN
    UPDATE ChildTable
    SET VALUE = 'Test',
    PARENT_ID = 1
    WHERE CHILD_ID = 1;
    If 'UPDATE ParentTable' statement runs a bit earlier, then 'UPDATE ChildTable' statement is blocked untill the first transaction is committed or rollbacked. It happens because SQL Server acquires shared locks when validating foreign keys, even
    if the transaction is using read uncommitted, read committed snapshot (read committed using row versioning) or snapshot isolation level. I cannot see why change in the ParentTable.VALUE should prevent me from updating ChildTable. Please note that ParentTable.PARENT_ID
    is not changed by the first transaction, which means that from FK's point of view whatevere is set to the ParentTable.VALUE is never a problem for referential integrity. So, such blocking behavior seems to me not logical. Furthermore, it contradicts to the
    MSDN:
    Transactions running at the READ UNCOMMITTED level do not issue shared locks to prevent other transactions from modifying data read by the current transaction. READ UNCOMMITTED transactions are also not blocked by exclusive locks that would prevent the
    current transaction from reading rows that have been modified but not committed by other transactions. 
    Does anybody know how to workaround the issue? In other words, are there any tricks to avoid shared locks when validating foreign keys? (Disabling FK is not an option.) Thank you.
    Alexey

    If you change the primary key of the parent table to be nonclustered, there is no blocking.
    Indeed, when I update ParentTable.VALUE, then:
    in case of PK_ParentTable is clustered, a particular row in the clustered index is locked (request_mode:X, resource_type: KEY)
    in case of PK_ParentTable is non-clustered, a particular physical row in the heap is locked (request_mode:X, resource_type: RID).
    and when I update ChildTable.PARENT_ID, then:
    in case of PK_ParentTable is clustered, this index is used to verify referential integrity:
    in case of PK_ParentTable is non-clustered, again this index is used to verify referential integrity, but this time it is not locked:
    It is important to note that in both cases SQL Server acquires shared locks when validating foreign keys. The principal difference is that in case of clustered PK_ParentTable the request is blocked, while for non-clustered index it is granted.
    Thank you, Erland for the idea and explanations.
    The only thing that upsets me is that this solution cannot be applied, because I don't want to convert PK_ParentTable from clustered to non-clustered just to avoid blocking issues. It is a pity that SQL Server is not smart enough to realize that:
    ParentTable.PARENT_ID is not changed and, as a result, should not be locked
    ChildTable.PARENT_ID is not actually changed either (old value in my example is 1 and the new value is also 1) and, as a result, there is no need at all for validating the foreign key.
    In fact, the problem I described is just a tip of the iceberg. The real challenge is that I have deadlocks because of the FK validation. In reality, the first transaction has an additional statement which updates ChildTable:
    SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
    BEGIN TRAN
    UPDATE ParentTable
    SET VALUE = 'Test'
    WHERE PARENT_ID = 1;
    UPDATE ChildTable
    SET VALUE = 'Test'
    WHERE PARENT_ID = 1;
    The result is famous message:
    Msg 1205, Level 13, State 51, Line xx
    Transaction (Process ID xx) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
    I know that if I change the order of the two statements, it will solve the deadlock issue. But let's imagine I cannot do it. What are the other options?
    Alexey

  • 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

  • How to save a record with null foreign key?

    Dear all,
    Most articles show non-nullable foreign keys; but now I've got a problem with nullable foreign keys.
    With this simple example: an employee has zero or one manager.
    in manager object:
    @OneToMany(cascade={CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}, mappedBy="manager")
    private Collection<Employee> employees;
    in employee object:
    @ManyToOne
    @JoinColumn(name="manager_id")
    private Manager manager;
    when updating an employee record, i may use a selectOneMenu to pass a manager id of "0", I expect toplink to save a null manager_id in the employee record; but i tries to create a new manager object of id="0" (i.e. insert a new manager record instead)
    the code i use to save an employee is like this:
    em.getTransaction().begin();
    em.merge(employee);
    em.getTransaction().commit();
    What's the correct way to save the employee record with a null manager_id column?
    Could someone help?
    Thanks a lot!
    AK

    But could you give me some pointers on how could I do
    that from the web UI level?Got it. You want to select "nothing" and then set the object reference to that. I can't help you on JSF but how do you lookup the selected object behind the scenes? If you use entityManager.(Employee.class, 0) then you should get back null if there is no Employee with id=0.
    --Shaun                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to purge tables using odi ???

    hi,
    I want to purge the Data in target table.my Data Policy is to only retain the only 90 days. I have to keep only 90 days data. How can i do this in ODI. I have only one DATE column.
    Thanks,
    Regards,
    AMSII

    If your existing date field can be used to identify the records to be purged, then you could simply create a procedure in ODI along the lines of
    delete from <%=odiRef.getSchemaName( )%>.*your_table* where your_date_field < (sysdate - 90)
    This is the simplest way, but be wary of your indexes on the table that they don't get too fragmented. You could also investigate using a daily partition startegy on the table which would enable you to drop partitions older than 90 days which would be much faster.

Maybe you are looking for

  • Error in CJ88  Posting transaction is not possible (value date not allowed)

    When i try CJ88 with a wbs element, it shows the following error : Posting transaction is not possible (value date not allowed) Message no. AA 478 Diagnosis A retirement was already posted on the asset 000022400733 0041 on 20091231. Based on the valu

  • Issue with recursive join and filter records

    I am having an issue with recursive join and filtering records for the following rules. The table, sample records, test script and rules are as below drop table PC_COVKEY_PD; create table PC_COVKEY_PD ( PC_COVKEY varchar(50), COVERAGE_NUMBER varchar(

  • How best to update Dev from Production

    Hi experts, I have a  project coming up and I need help in knowing how best to restore our BW development/VAL to be in sync with production, we intend to copy production into dev. I need ideas as I have to meet with basis team to figure out how best

  • Daily email "subscriptions" coming randomly/too late

    Hello, I have the Apple Discussions board set up to email mail a "daily digest" of what posts get updated that I contributed to. I also post to other a lot of other forums (most of which are ran my vBulltion, which is a little different then these bo

  • Plugin container has stopped working

    My firefox is not working - help. it doesn't even type ... sluggish and keeps crashing and a stop plugin notice keeps popping up hundreds of times. I need to work and am unsure how to proceed.