How to handle Many-to-Many tables

I have table_1 with a primary key, x
I have table_2 with primary key y
Table_3 represents the many-to-many relationship between table_1 and table_2, and has a primary key x,y.
Okay - so I know how to set up master detail forms for table_1 and for table_2, but what type of form do I use for table_3? I want to use the primary key of table_1 as an item (:pagenum_x, I guess) and then select from a drop-down list for key y.
I am am newbie, so if this is somewhere in the documentation (I can't find it after a few days trying), just tell me to keep looking. :)
Norm

Vojin,
Thanks for the reply. It helps to have some corroboration when these types of issues come up.
I can create regions or pages that handle the associations, but it seems as though I am fighting or fooling the product (APEX) to do so. Maybe adding the rowid with a sequence / trigger will simplify the design.
Thanks,
Norm

Similar Messages

  • How to handle many tables in ERD

    Hi:
    I have a schema with about 400 tables in it. They tend to be grouped into 5-10 groups of related tables. In a perfect world, I'd be able to arrange them in an ERD diagram and zoom into the appropriate area when I want to work on that section but I wouldn't have to recreate the arrangement of the tables in the diagram. I'm not aware that OWB can do this. I don't even think it can save the diagram as anything but SVG, which means every time I want to work an ERD I have to recreate it? I have to select all the tables, maximize them, arrange them each time?
    How do people normally handle hundreds of tables in OWB? Do you break the large schema up into numerous smaller source schemas and only end up with the large schema after deployment?
    Thanks

    I meant both, actually. I'm trying to create an ERD or set of ERDs to help me figure out what I need to do in a large (to me!) ETL project. I'm using OWB to create a new target schema based on a source schema. I'll be converting VARCHAR2(2000) and LONGs to CLOBS and consolidating tables and doing other stuff. An ERD would help me visualize the current schema and work on isolated pieces of it. Does that make sense?

  • How to handle scroll bar in table control in bdc

    hi friends,
       how to handle scroll bar coding in table control in bdc
    Thanks & Regards,
    Srinadh D

    hi,
    check the sites :
    table control scrolling:
    Scrolling in table control
    Re: scrolling in table control
    Table control - Vertical scrolling problem
    table control scrolling problem

  • How to update many tables using the same code

    <%@ page language = "java" import = "java.sql.*" %>
    <%@ page import = "java.sql.*" %>
    <%@ page import = "java.text.*" %>
    <%
    String custname1=request.getParameter("custname");
    session.setAttribute("custname",custname1);
    String custtin1=request.getParameter("custtin");
    session.setAttribute("custtin",custtin1);
    %>
    <%
    try{
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection conn;
    conn=DriverManager.getConnection("jdbc:odbc:loginval");
    Statement stat=conn.createStatement();
    String stmt="insert into custdetails values('"+custname1+"','"+custtin1+"')";
    stat.executeUpdate(stmt);
    stat.close();
    conn.close();
    %>
    <jsp:forward page = "success.html"/>
    <%
    catch(Exception e)
    %>
    <jsp:forward page = "tinerror.jsp"/>
    <%
    %>---------------------------------------------------------------
    this is my code, now this code will be used by many users to update their corresponding tables. so my problem is based on the username i need to change the table name in the insert query, for example if the username is sai, then the table name has to be saicustdetails and if the user name is ram then the table name in the query has to be ramcustdetails. and so on.
    please help

    *<%@ page language = "java" import = "java.sql.*" %>
    <%@ page import = "java.sql.*" %>
    <%@ page import = "java.text.*" %>
    <%
    String tin1=request.getParameter("tin");
    session.setAttribute("tin",tin1);
    tin1=tin1+"custdetails";
    String custname1=request.getParameter("custname");
    session.setAttribute("custname",custname1);
    String custtin1=request.getParameter("custtin");
    session.setAttribute("custtin",custtin1);
    //String tin2;
    %>
    <%
    try{
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection conn;
    conn=DriverManager.getConnection("jdbc:odbc:loginval");
    Statement stat=conn.createStatement();
    String tin2;
    tin2=tin1;
    String stmt="insert into "+tin2+"values('"+custname1+"','"+custtin1+"')";
    stat.executeUpdate(stmt);
    stat.close();
    conn.close();
    %>
    <jsp:forward page = "success.html"/>
    <%
    catch(Exception e)
    %>
    <jsp:forward page = "tinerror.jsp"/>
    <%
    %>i tried what u have said but still it does not work, anyother way?????

  • How to handle MANY buttons?

    hi!
    lets say i create n buttons..
    i need a function (i bet it has to be only one) that handles
    all of them.. for example onClick it will trace "u've pressed the
    10th button" or will open the "10thpage.swf" .. it doesnt matter..
    i nned to know how to get the id of the one button i pressed..
    i tried trace(event.target.name); and i expected to get u've
    pressed but[10] or something like that.. but all i get is the
    components of that button i pressed: like buttonBckgMC, or
    buttonTextField, or buttonSelectionMC
    thank you!

    evt.target.id should work fine if everything is defined (like
    text and you have a MenuButton class that contains a textfield name
    text).
    you might want to use currentTarget instead of target, in
    case your buttons overlap.

  • How to update many tables in PL/SQL

    Hi all,
    I have to update EMPNIC colum in all the tables using PL/SQL. There are over 700 tables in the database that has the same column name 'EMPNIC'
    I create one table called 'UPDATEEMPNIC' According to that table I have to update all the tables.
    This is my PL/SQL statement. But in this code its not updating the 'NEWEMPNIC'
    PROCEDURE UPDATE_EMP_NIC IS
    sql_stmt VARCHAR2(200);
    newempnic VARCHAR (20);
    empnic VARCHAR (20);
    table_name VARCHAR(100);
    BEGIN
    DECLARE
    CURSOR C IS
    --I can find all the table names that I have to update using this query.
    select table_name from all_tab_cols where table_name like 'TBL%' and column_name like 'EMPNIC';
    REC C%ROWTYPE;
    TYPE temp_refcur IS REF CURSOR;
    temp temp_refcur;
    --er temp%ROWTYPE;
    type rec_emp is record
    newempnic VARCHAR2 (20),
    empnic VARCHAR2 (20)
    er rec_emp;
         begin
         --for x in cur
              OPEN C ;
              loop
              FETCH C INTO REC;
    EXIT WHEN C%NOTFOUND;
    open temp for 'SELECT EMPNIC, NEWEMPNIC FROM UPDATEEMPNIC';
    loop
              fetch temp into er;
              exit when temp%notfound;
                   sql_stmt :='UPDATE '||REC.table_name||' SET EMPNIC ='''||er.NEWEMPNIC||'''WHERE EMPNIC ='''||er.EMPNIC||'''';
                   DBMS_OUTPUT.PUT_LINE(sql_stmt);
    EXECUTE IMMEDIATE sql_stmt ;
         end loop;
              close temp;
              end loop;
              CLOSE C;
    END;
    end UPDATE_EMP_NIC;
    But I can't find the whats the wrong.
    Let me know anyone know to do this.
    Thankyou all

    Why do you open a new thread for the same question?
    Please see the other thread!

  • How to handle events in J Table (Enter event)

    I created a J Table having multiple rows and columns. I want to have the event to happen on second column, on entering the code on first column, and then pressing ENTER.
    Eg:
    first column i enter code : say A010
    In the code master, the description matching the above code is "HIGH TENSION CABLE".
    When I enter "A010" in the first column and press "ENTER", i want the description to appear in the second column i.e. HIGH TENSION CABLE (by referring the code master, which I already created).
    How this can be handled. Please help me with the code/suggestions. As this urgently required for me in a project, I request the FORUM to help at the earliest.
    Thanking you in advance.
    PS: I shall appreciate if the reply is also sent to my email id: "[email protected]".
    N Murali

    This code would do your work
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.table.*;
    public class TestTable
        private JTable table;
        private AbstractTableModel model;
        private DefaultTableModel defaultModel;
        private JScrollPane jsp;
        public TestTable()
            table = new JTable();
            defaultModel = new DefaultTableModel(10,5);
            setModel(defaultModel);
            jsp = new JScrollPane(table);
            hookSetTextOnEnter();
        protected void hookSetTextOnEnter()
            String actionName = "selectNextRowCell";
            final Action enterAction = table.getActionMap().get(actionName);
            Action myAction = new AbstractAction()
                public void actionPerformed(ActionEvent e)
                    int row = table.getSelectedRow();
                    int column = table.getSelectedColumn();
                    System.out.println(" SELECTING NEXT ROW "+row+""+column);
                    if(row != -1 && column == 2 )
                        Object value = table.getValueAt(row,column);
                        if(value != null && value.toString().equals("A010"))
                        table.setValueAt("HIGH TENSION CABEL",row,column+1);
                    enterAction.actionPerformed(e);
            table.getActionMap().put(actionName,myAction);
        public void setModel(TableModel model)
            table.setModel(model);
        public JScrollPane getScrollPane()
            return jsp;
        public JTable getTable()
            return table;
        public static void main(String[] args)
            TestTable tt = new TestTable();
            JFrame frame = new JFrame("Test Table");
            frame.getContentPane().add(tt.getScrollPane());
            frame.pack();
            frame.setVisible(true);
    }------- Unformatted Version------------
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.table.*;
    public class TestTable
    private JTable table;
    private AbstractTableModel model;
    private DefaultTableModel defaultModel;
    private JScrollPane jsp;
    public TestTable()
    table = new JTable();
    defaultModel = new DefaultTableModel(10,5);
    setModel(defaultModel);
    jsp = new JScrollPane(table);
    hookSetTextOnEnter();
    protected void hookSetTextOnEnter()
    String actionName = "selectNextRowCell";
    final Action enterAction = table.getActionMap().get(actionName);
    Action myAction = new AbstractAction()
    public void actionPerformed(ActionEvent e)
    int row = table.getSelectedRow();
    int column = table.getSelectedColumn();
    System.out.println(" SELECTING NEXT ROW "+row+""+column);
    if(row != -1 && column == 2 )
    Object value = table.getValueAt(row,column);
    if(value != null && value.toString().equals("A010"))
    table.setValueAt("HIGH TENSION CABEL",row,column+1);
    enterAction.actionPerformed(e);
    table.getActionMap().put(actionName,myAction);
    public void setModel(TableModel model)
    table.setModel(model);
    public JScrollPane getScrollPane()
    return jsp;
    public JTable getTable()
    return table;
    public static void main(String[] args)
    TestTable tt = new TestTable();
    JFrame frame = new JFrame("Test Table");
    frame.getContentPane().add(tt.getScrollPane());
    frame.pack();
    frame.setVisible(true);
    Thanks,
    Kalyan

  • How to handle 3 different fact tables and measures within a DAX query?

    I am writing a DAX query in DAX studio in Excel against a tabular model that has 4 different Fact tables, but they share the same dimensions. (There's some long story I can't get into here, but unfortunately this is the structure) I want to
    include measures from the 4 fact tables, summarize by the dimensions in a single query output that can be used for a pivot table.  So far I have something like this:
     EVALUATE
    FILTER
        SUMMARIZE
            FactTable1,
            DimensionTable1[Value],        DimensionTable2[Value],
            DimensionTable3[Value],
            Dimensiontable4[Value],
            'dimDateTime'[Month PST],
            DimDateTIme[FiscalYear PST],
            "Measure Score",
            FactTable1[Measure 1],
            "Measure Score 2",
            FactTable1[Measure 2],
        ,Company[CompanyName]="Company ABC" 
    What I want to do is summarize the 3 fact tables by the same dimensions, but I am not sure how to do that within a DAX query.  I am getting an error if I try to include another table statement in the original SUMMARIZE function, even though the FACTS
    do share the same dimension.  Is there an easy way to do this?

    You can use ADDCOLUMNS to add the data from other tables, but you need to use within the SUMMARIZE the fact table that determines the cardinality of the output. If you are not sure (e.g. you project cost and revenues from two fact tables by month and there
    could me months with cost and no revenues, but also months with revenues and no costs), then you should use CROSSJOIN and then FILTER.
    You query might be written as (please note CALCULATETABLE instead of FILTER to improve performance):
    EVALUATE
    CALCULATETABLE (
        ADDCOLUMNS (
            SUMMARIZE (
                FactTable1,
                DimensionTable1[Value],
                DimensionTable2[Value],
                DimensionTable3[Value],
                Dimensiontable4[Value],
                'dimDateTime'[Month PST],
                DimDateTIme[FiscalYear PST]
            "Measure Score", FactTable1[Measure 1],
            "Measure Score 2", FactTable1[Measure 2]
        Company[CompanyName] = "Company ABC"
    Marco Russo http://www.sqlbi.com http://www.powerpivotworkshop.com http://sqlblog.com/blogs/marco_russo

  • How to handle Datatype mismatch in table and EO

    Hi
    I have one table which store employee details, where empId of employee is of data type varchar2. I have its equivalent EO and VO with empId as Number type. when i create a row with empId as 100 its seen as -530000000000 something of this form.
    How to resolve this issue without disturbing database.

    Hello Suresh,
    Change the attribute in the entity object to VARCHAR2.
    Regards.

  • How to handle pagenation for tree table

    Hi,
    I implemented af:treeTable but, that table is displaying 20K rows(childerns). When i ckick on the views->Expand All, taking 30min to load the treeTable.
    Is there any wan to handle this problem or is there any way to pagenate the treeTable?
    Regards,
    Raghu.

    Hi,
    I have used the following KMs in my transformation with the following options:
    IKM SQL Incremental Update
    INSERT    <Default>:true
    UPDATE    <Default>:true
    COMMIT    <Default>:true
    SYNC_JRN_DELETE    <Default>:true
    FLOW_CONTROL    <Default>:true
    RECYCLE_ERRORS    <Default>:false
    STATIC_CONTROL    <Default>:false
    TRUNCATE    <Default>:false
    DELETE_ALL    <Default>:false
    CREATE_TARG_TABLE    <Default>:false
    DELETE_TEMPORARY_OBJECTS     <Default>:true
    LKM SQL to SQL
    DELETE_TEMPORARY_OBJECTS    <Default>:true
    CKM Oracle
    DROP_ERROR_TABLE    <Default>:false
    DROP_CHECK_TABLE    <Default>:false
    CREATE_ERROR_INDEX    <Default>:true
    COMPATIBLE    <Default>:9
    VALIDATE    <Default>:false
    ENABLE_EDITION_SUPPORT    <Default>:false
    UPGRADE_ERROR_TABLE    true

  • How to handle the MISSING STATISTICS:Table or Index has no optimizer stats

    Dear All,
    For some of our recently created Ztables, we have been receiving an error message of MISSING STATISTICS in the system saying that Table or Index has no optimizer statistics. To solve the problem, when I go for creating an index with the key fields of the table, I receive a message that these fields are already there in the index 0 (primary index).
    Pls advice how to solve this issue.
    Regards,
    Alok.

    Hi friend,
    Please delete all primary and secondary indexes and redo creation of index. Now u will surely be able to create it.

  • How to handle Adobe Form - Dynamic Tables.

    Experts:
    I am new to Web DynPro for ABAP and Adobe Interactive forms.
    I have created a Adobe form with dynamic table. When I submit the form, WD4A is able to read only the first row of the table. Other rows are getting lost.
    I thought just binding with the context will trasfer data from Adobe to WD4A. But it is not happending.
    Do I need to write any code in WD4A and any script in Adobe Designer?
    Can any one send me a sample code (ABAP and JavaScript). Even link to that will be very useful.
    Thanks,
    Vijai

    Thomas:
    My context is as follows.
    <CHANGING>
      <REQUISITION_ITEMS>
        <ELEMENT..1>
        <ELEMENT..2>
        <ELEMENT..3>
    The cardinality of <CHANGING> node is 1..1 and the cardinality of  <Requisition_items> is 1..n.
    Thanks
    Vijai

  • How to handle field symbols internal table values?

    HI all,
              I declared field string as below.The below code is working fine.
    Data : ITAB TYPE STANDARD TABLE OF YAPOPLN, (Custom table).
              wa_itab like line of ITAB.
    field-symbol : <fs> type ITAB.
    ASSIGN PARAM TO <FS>
    LOOP AT <FS> INTO WA_ITAB.
    WRITE:/ 'ABC'.
    ENDLOOP.
    But my requirement is that I dont want all the fields of the table YAPOPLN.My output contains only 2 fields of the table YAPOPLN,which contains total 4 fields.According to my requirement only 2 fields will be getting into one parameter PARAM(this is function module parameter,which is from ALV classes) from the user entered output,which contains only 2 fields.So the above code is not working properly because wa_itab contains 4 fields and giving short dump.
    If I am declaring the internal table with the required fields(only 2 fields) and referring that internal table to field symbol <FS>
    Data : BEGIN OF ITAB1 OCCURS 0,
             FIELD1 LIKE YAPOPLN-FIELD1,
             FIELD2 LIKE YAPOPLN-FIELD2,
             END OF ITAB1.
    field-symbol : <fs> LIKE ITAB1 OR  <FS> TYPE ANY.
    DATA :WA_ITAB1 LIKE LINE OF ITAB1.
    ASSIGN PARAM TO <FS>
    LOOP AT <FS> INTO WA_ITAB.
    WRITE:/ 'ABC'.
    ENDLOOP.
    But when I am compiling this code i am getting the below error.I am gettting the same below error when even <FS> is also declared as <FS> TYPE ANY.
    .'FS' is not an internal table or defined in TABLES.
    Can anyone help me in this regard?
    Thanks,
    Balaji

    Hello,
    Try this way:
    If both the type of internal tables are same then you can directly assign dynamic internal table to static internal table.
    itab = <itab>.
    Suppose you have field symbol internal table <itab> which is different in structure from ITAB.
    Now, you can create <wa> as follow:
    FIELD-SYMBOLS <wa>.
    DATA wa TYPE REF TO DATA.
    CREATE DATA wa TYPE LINE OF <itab>.
    ASSIGN wa->* to <wa>.
    This way your work area is read.
    Using [ASSIGN COMPONENT|http://help.sap.com/saphelp_nw04/helpdata/EN/fc/eb3923358411d1829f0000e829fbfe/content.htm] syntax you can read required component of <wa>.
    Finally you can use that value to load static internal table.
    You can also refer to my thread on [Dynamic table|Re: Creating Dynamic table].
    Hope this helps!
    Thanks,
    Augustin.
    Edited by: Augustarian on Aug 20, 2009 10:06 AM

  • How to handle plsql Object and Table type inside BPEL

    Hi All,
    I have a procedure with 5 IN and 4 OUT parameters. Out of 4, One is Object type and remaining 3 are Table type. Now in my bpel, i am calling this proc from DB Adapter. The DB Adapter wizard created XSD with proper structure. But when i am testing this i am not getting these out parameters values in the payload of Invoke DBAdapter activity. I am neither getting errors nor output.
    What could be the issue.?
    Thanks in advance,
    Sudheer

    Arik,
    JDev is not creating any wrapper packages as such. It simply created a XSD with same as my procedure name.
    My XSD looks like this...
    <element name="OutputParameters">
    <complexType>
    <sequence>
    <element name="P_OBJ_H_INFO_O" type="db:APPS.H_OBJ_TYPE" db:index="6" db:type="Struct" minOccurs="0" nillable="true"/>
    <element name="P_TAB_L_INFO_O" type="db:APPS.L_TAB_TYPE" db:index="7" db:type="Array" minOccurs="0" nillable="true"/>
    <element name="P_TAB_M_INFO_O" type="db:APPS.M_TAB_TYPE" db:index="8" db:type="Array" minOccurs="0" nillable="true"/>
    <element name="P_TAB_A_INFO_O" type="db:APPS.A_TAB_TYPE" db:index="9" db:type="Array" minOccurs="0" nillable="true"/>
    </sequence>
    </complexType>
    </element>
    And again the 3 table types internally referring object types.
    Thanks for reply. Awaiting response...
    Sudheer

  • How to handle hot spot in table

    I have a screen with ALV grid where the first column is hot spot and when you press it, it will go to another screen and display details of selected row with some additional functionality as below.
    Now I want to skip this screen and proceed to next step .
    To do this I have recorded the flow and then I have created script to identify which row is selected with the following script which is working fine.
    In the recorded script(below) I had selected the second row of the grid, so that displayed screen show second row details and when I changed the value to 3, event of the 3rd row triggered and works fine.
    Since i have the selected row value,Can I make this value (marked in above screen) dynamic? So that every time I trigger the hot spot it will capture corresponding row and display the screen.
    Message was edited by: Shaik Shadulla

    Hi Shaik Shadulla,
    I am also having the same requirement .Have you fixed this issue?
    Could you please let me know how you have fixed?
    Thank you,
    Arunkumaran

Maybe you are looking for