Insert record in master detail relationship

Hi,
I have the following situation. I have two tables (master and detail in 1:1 relationship). What I want to do is to skip through the master table and insert a record into the detail table containing only the id of the master table (foreign key column in detail table).
My tables look like this:
Master:
ID
NAME
ADRESS
Detail:
ID
DETAILS
MASTERID (foreign key)
For I am not experienced in PL/SQL does anybody give me an idea on how to do this. I think it is suitable to have a procedure solving this...
Thanks in advance!
Tino

Here you go:
CREATE TABLE dt_test_master
(     id           number primary key,
     descr      varchar2(10)
INSERT INTO dt_test_master VALUES(1, 'Master 1')
INSERT INTO dt_test_master VALUES(2, 'Master 2')
CREATE TABLE dt_test_child(id number, master_id number, col1 varchar2(10))
alter table dt_test_child add constraint dt_test_child_fk_master
foreign key(master_id) references dt_test_master
CREATE SEQUENCE dt_test_child_id_seq
CREATE OR REPLACE PROCEDURE p_CreateChild(     an_MasterId dt_test_child.master_id%TYPE,
av_Col1          dt_test_child.col1%TYPE
IS
BEGIN
     INSERT
     INTO
          dt_test_child
          (     id,
               master_id,
               col1
     VALUES
          (     dt_test_child_id_seq.NEXTVAL,
               an_MasterId,
               av_Col1
END;
SQL> exec p_CreateChild(1,'Child1');
PL/SQL procedure successfully completed.
SQL> exec p_CreateChild(1,'Child2');
PL/SQL procedure successfully completed.
SQL> exec p_CreateChild(2,'Child1');
PL/SQL procedure successfully completed.
SQL> exec p_CreateChild(3,'Child1');
BEGIN p_CreateChild(3,'Child1'); END;
ERROR at line 1:
ORA-02291: integrity constraint (TYLERD.DT_TEST_CHILD_FK_MASTER) violated - parent key not found
ORA-06512: at "TYLERD.P_CREATECHILD", line 8
ORA-06512: at line 1HTH
David

Similar Messages

  • Insert Record in Master-Detail block

    I am using JDev 10.1.2, Struts, ADF and JSP
    I have a Master-Detail relationship. As the master table(Course) is browsed , the details(Students) record keep changing. Now I want to insert records to the detail (Students) block alone. I am generating the Students id using Sequence, but I want use the Course Id that is being browsed for the new record inserted. How do I do this.
    I used the 'Read Only Dynamic Table' for the Details table and used the create button and forward it to create jsp. When I click on create button, it does go to the create jsp, but the the row is not blank. what do I have to do.
    Any help will be appreciated.

    Hi Shay,
    Thanks for the response. At least I'm getting some response after so long a time.
    I'm not sure what are you looking at. But this is what I have.
    I have a browseCourse.jsp that displays the courses in the master and students in the detail. I have a create button for the detail, and my code looks like this.
    public class BrowseCourseAction extends DataForwardAction
    public void onCreate (DataActionContext actionContext)
    actionContext.getHttpServletRequest().getSession().setAttribute("type", "create");
    if (actionContext.getEventActionBinding() != null)
    actionContext.getEventActionBinding().doIt();
    actionContext.setActionForward("createstudent");
    when the user click on create button it shows the createstudent.jsp. My question is how to set the course id for the new student that is about to be created.
    What do I have to do for this?

  • Is it possible to display records without master detail relationship?

    Hi all,
    I've a form for importing excl to oracle with column mapping. i.e I've display excl column heading on the form.
    In front of each excel column heading I've provide a list item which contains table column heading so user can map his excl column with table column and according to data gets insert into the database table.
    There are 28 excel and table column headings on the form every time user will have to map the column. Its very time consuming job. That's why I've decide to provide template to user. e.g user maps the excl column with table column only first time, then this combination is saved as 'template 1' . when user runs the form next time he/she needs to just select template-1 from lov. and that template get displayed on the forms field. Then user will press the process button and data gets inserted into respective table
    Now I've created two tables
    1. mst_template
    template_name        varchar2(100) ---primary key.
    2. template
    template_name   varchar2(100) --- foreign key (ref. tempalte_name - mst_template)
    ex_col                varchar2(100)
    tb_col                varchar2(100)Now my problem is, I try the master detail relationship but it doen't works becase on my form the condition is
    excel col                                   table col
    excl_col1                                 Tab_col1
    excl_col2                                  tab_col2
    excl_col28                                Tab_col28       i've establish the master detail relationship but getting error
    FRM-40505:ORACLE error:unable to perform query. as i use excl_col1, tab_col1.. etc
    can i achieve it by using cursor? without using master detail relationship. My 90% coding is done. only thing remaining is to display records on form. so can i use cursor in this situation? and how? I've work so hard on it and lot of time is spend too so i don't want to change the coding of the existing form. any suggestion for this problem.
    please help
    Regards
    sam.

    Turning on Closed Captioning is all you can do.  I think the problem you have is that not all movies have closed captioning.

  • Insert Record in Master-Detail by UIX Pages

    I am using Jdeverloper10g v10.1.2 ,ADF,UIX Pages
    My problem is :
    How i can insert a record by UIX Page , Because when i try to inserted a record by click on Create Button there is no action happen .
    So , is there any document can help me in Master_Detail_By_UIX
    with regards
    Naif

    Hi Leo,
    I know that but my application is already set up and I have all the reports and forms in place. However I do not know how to enter an update/insert statement when calling my form. I only can have update or insert.
    for update is working correctly and the reports/forms affected are quite complex I do not want to change anything on it but enter a detail recordset for each record in master table only containing foreign key id and id. then the update statement will work. At the moment I have to save the form (detail table) once to create th primary id and after that I can store values... but that is not feasible for end users...
    Tino

  • Inserting records in master detail form

    I am moving an existing Webdb Application to portal. In the application there is a master detail form along the following lines
    Dept Id: 10
    Dept Name: IMS
    Employee ID Employee Name etc
    1586 Julie Wilks
    Currently users can insert/update/delete detail lines. When inserting, the dept_id foreign key is automatically inserted into the dept_id column in the detail table. My understanding is that for some reason this does not happen in portal. Instead, the user is expected to input any foreign keys manually. As this could lead to all sorts of problems I'd rather not have to do this.
    Has anyone found a means to get around this problem?
    If solutions have already been posted, please point me in the right direction as a search on the forum hasn't come up with anything.
    Many thanks,
    Julie Wilks

    Hi,
    Am I the only one having this problem?
    Thanks,
    Diana

  • How to create Insert & Update on master-detail form JPA/EJB 3.0

    Is there any demonstration or tips how to Insert record on master-details form for JPA/EJB 3.0 with ADF binding?

    I have master-detail forms (dept-emp). I drag the dept->operations->create method to JSF page. But when I click create button, only dept form is clear and ready for insert. But emp form is not clear. How can I add create method for this?
    Can you give some example how to pass the right object to the persist or merge method so that it can save both the two objects (master-detail tables)
    Thanks
    Edited by: user560557 on Oct 9, 2009 8:58 AM

  • Visualize master-detail relationships using SQL Edge 1.2

    SQL Edge 1.2 released by Bay Breeze Software (http://www.baybreezesoft.com) is an Eclipse Rich Client application that allows users to execute SQL queries, browse schema information, and visualize master-detail relationships.
    With SQL Edge, users can use only one query to retrieve data in a master table, and then browse data in all related detail tables. Users can also insert, edit, and delete table records in the data grids.
    SQL Edge has four perspectives. The Query Perspective allows users run any SQL queries, while the Schema Perspective displays table schema information. There are two relationship perspectives. The Relationship Table View displays data in the master-detail style. The Relationship Tree View displays master table records as top-level tree nodes. The nodes can be expanded to reveal any level of related detail records. In addition, clicking any node will display the corresponding data in a detail grid.
    The following summarizes SQL Edge's major features:
    (1) Support any JDBC compatible databases.
    (2) Allow users to specify JDBC drivers at run-time, and provide wizards to help setup JDBC connections. Easy to install, and easy to setup.
    (3) SQL editor with syntax highlighting based on currently connected databases.
    (4) SQL edtior allows users to execute SQL queries asynchronously. Users can cancel the execution by click the "Cancel" button or just close the SQL Editor.
    (5) Schema perspective displays the table schema information, including column definitions, primary key, indexes, and foreign keys.
    (6) Relationship table view displays the related data in master-detail style, with master table data shown in the top grid, and all related detail table data in a list of bottom grids.
    (7) Relationship tree view displays the master table records as top-level tree nodes, and the related detail records as child nodes. Click any of these tree nodes will display the corresponding record data in a detail grid.
    (8) Allow users to insert, edit, and delete records in the master and detail grids of the relationship table view and relationship tree view.
    (9) Allow users to define master-detail relationships even between tables in different databases. This enables the relationship table view and relationship tree view to display data relationships between tables in different databases or without pre-defined foreign keys.

    Hi, Martin.
    Maybe you don't need a master detail relationship. Do you need to do changes in your detail block, or just queries?
    If just queries, you can create your second block based on a From-Clause Query, and change the QueryDataSourceName property with a When-List-Changed trigger in your T-List.
    I know this is a little vague but, without knowing what you need to do in the second block, I'm afraid to tell you more.
    Feel free to mail me directly, if you need some pointers about Forms.
    Pedro

  • Master-Detail Relationship problem

    I've spent 1.5 days already trying to solve this problem. I'm creating a JClient application using BC4J with a Master-Detail relationship. The relationship between tables is a many-to-many thru an intersection table. I've gotten my master and detail data to show with columnar form data in the top(master) panel and table data in the lower(detail) panel. My problem is that each time I get a master record that contains more than one detail record, each time I click the next navigation button in the master pane it will remain on the master record for the number of detail entries. For example, if a master record has 3 children, then I must click the next button 3 times to move to the next master record. I know that it has something to do with the way the entities are joined but I can't figure out how to join them any other way. Can anyone give me a hint how I can make the master panel only show one record for each Master-Detail relationship (even though the intersection table says its a many-to-many)?
    Thanks,
    Mark

    Apparently, I was making things much more complicated than they needed to be (rather, JDev was). My first attempt at MD relationships, I followed the examples in the help files. JDev created VO's, Entities, Assoc's, View Links, etc... Everything but the kitchen sink! After researching a bunch more, I found that the only thing I needed to do was to create my view objects to display exactly what I wanted to see in my panel regardless of whether it was a parent or a child. Once I had the view objects straight, then I could connect them using a view link and JDev handled the rest. Pretty slick but, I wish there was some better documentation. My next problem is that I'm trying to make this a Master-Detail-Detail-Detail window. The master needs to be a JComboBox, displays only a date, and needs to appear in the same panel as it's child. The 1st child will have a navbar that cycles through a bunch of orders based on the date from the combo box. The order panel's child is in the lower panel and displays the order detail items. It also has a navbar. The lower detail panel needs to have a split pane with the upper part showing the order detail and the lower part showing the materials used in making up that order detail item.
    So far, I've got the first 3 parts done (ie. combobox, orders, and details). For the combobox, I used a JComboBox navigationbinding. It shows the correct date, but my control is always disabled. I can't figure out why the combobox is always disabled. The enabled property is set to true. Anbody have any clues?
    Thanks,
    Mark

  • Problem with master/detail relationship

    Two tables :
    Master_table:
    Customer_no primary key
    Buyer_seller_type primary key
    Product_code primary key
    Detail_table
    Branch primary key
    Customer_no primary key
    I altered detail_table and added 2 more primary key fields:
    Buyer_seller_type primary key--
    Product_code primary key.
    Now I have to change the existing fmb according.
    I have maintained master/detail relationship for these 2 tables in the form.
    When I run this form and Try to save the date . I am getting error like
    Cannot insert null into buyer_seller_type field ie my new column.
    Insert into detail_table (branch,customer_type) values (:1,:2) ;
    I have maintained master/detail relationship. And what r the others properties I have to set to overcome this .
    my requirement is query should be like this:
    insert into detail_table (branch,customer_type,buyer_seller_type,product_code) values (:1,:2,:3,:4) ;
    how can i do this.
    I am using forms 6.
    plz its very urgent..plz help me.
    advance thanks

    Set following item property under Data node for both the new added column in detail table:
    Copy Value from Item:
    Enter <master_table_name.item_name>
    Regards,
    Hassan

  • Master Detail Relationship and Posting changes!

    I have a "MAster" medical-procedure block, and an "Detail" items block. The items block, being the detail block, in the master detail relationship shows the items used during the medical procedure. Both the master and detaqil blocks are based on stored procedures.
    Problem: I have multiple medical procedures (multi record master) and many items associated with the procedure (multi record detail). If I ask the user to "SAVE" the changes, after every detail entry ( for the correspondin master), it becomes a "PAIN" for the user. He wants to be able to choose a procedure, choose the details(items) associated with that procedure, and move on to the next master record, (the next medical procedure) , select it, if he performed that procedure, choose its corresponding detail items, "WITHOUT SAVING IN BETWEEN" navigation between the master records / "MEDICAL PROCEDURES"!
    1. Is it better to go for a master-detail relationship? If so, how do I prevent the "Please save the changes" when navigating between master records and ALSO save the details, without doing the "SAVE" multiple times. Can I go for a post ?..If so where? When-new_record instance/ any "Form level trigger"?
    2. If I do the go_block('dtl blk name'); execute_query; thing to coordinate between blocks, and "post" changes in the when -new -record-instance of master, the detail complains of a null value when I move from a medical procedure to another medical procedure which is not actually performed.
    I hope I make sense, any suggestions , "Welcome"!
    Thanks!

    Hi,
    I'd suggest to check this tutorial:
    http://www.oracle.com/technology/obe/obe_as_10g/bi/forms/formsmasterdetailobe.htm
    Having a relationship between data blocks, coordinates dml actions in both, so no coding is needed to save/update/delete records, forms built-ins do the work.
    hope this is useful,
    Hugo

  • Master-detail relationship - passing parameter from form to form

    Hello.
    I have a question about master detail relationship.
    In first form we have master-detail relationship.
    Example on dept, emp tables:
    We query dept (master), so we can get one or many emp (detail) records. Then we have a third table - tasks. Tasks table (detail) can have many records for one employee.
    Tasks table is in another form, which is called with call_form built_in. So we pass a parameter from master to detail - parameter empno. Because of that, we can only see tasks for one employee and can't navigate to another employee. This is normal.
    Now comes the question.
    Is it possible to call a form (with tasks table) with deptno parameter (so we can navigate through all employees with that department), but first show employee that was last used in first form?
    Example of our goal.
    Master: deptno = 20
    Detail: navigate to JONES employee
    Call new form (tasks)
    Tasks for JONES employee are first shown
    Can navigate to another employee - without requery
    Is this possible?
    If we pass deptno parameter, we can navigate through all employees - but must navigate to the employee we last used in first form.
    If we pass empno parameter to second form, we see last used employee but cannot navigate to another employee without requery.
    Hope you understand my problem.
    Thanks.

    Hi
    yes you can pass parameter from one form to another.
    In your master detail form set the trigger when-new-instance and there define the global variable like
    :GLOBAL.G_CIRCLE_ID := NULL;
    and in your task table set the trigger when-new-instance and there define the global variable like and also write this code
    :GLOBAL.G_DIVISION_ID := NULL;
    IF :GLOBAL.G_CIRCLE_ID IS NOT NULL THEN
         GO_BLOCK('DIVISION');
         SET_BLOCK_PROPERTY('DIVISION',DEFAULT_WHERE,'CIRCLE_ID ='||''''||:GLOBAL.G_CIRCLE_ID||'''');
         EXECUTE_QUERY;
    END IF;
    :GLOBAL.G_CIRCLE_ID := NULL;
    now you maintain your trigger according your need.
    Regards,

  • Facing java.lang.ClassCastException: DummyPagePhaseListener cannot be cast to oracle.adf.model.RegionController while am using master detail relationship by af:table

    Hi friends,
         We are in to new development in Oracle ADF and newbie to this technology.
         Created .jsf page and in corresponding pagedef, has "ControllerClass" with refering "DummyPagePhaseListener" and we have master-detail relationship using Viewlink(created using a SQL Query and  entity based view).
        Below exception raised when navigating from one  to another record in Master af:table. Any help will be appreciated. Thanks in Advance......
    java.lang.ClassCastException: DummyPagePhaseListener cannot be cast to oracle.adf.model.RegionController
    at oracle.adf.model.binding.DCBindingContainer.getRegionController(DCBindingContainer.java:5197)
    at oracle.adf.model.binding.DCBindingContainer.validate(DCBindingContainer.java:4247)
    at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.validateModelUpdates(PageLifecycleImpl.java:300)
    at oracle.adf.controller.faces.lifecycle.FacesPageLifecycle.validateModelUpdates(FacesPageLifecycle.java:70)
    at oracle.adf.controller.v2.lifecycle.Lifecycle$6.execute(Lifecycle.java:202)
    at oracle.adfinternal.controller.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:197)
    at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener.access$600(ADFPhaseListener.java:23)
    at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener$3.after(ADFPhaseListener.java:323)
    at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener.afterPhase(ADFPhaseListener.java:75)
    at oracle.adfinternal.controller.faces.lifecycle.ADFLifecyclePhaseListener.afterPhase(ADFLifecyclePhaseListener.java:53)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:447)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:202)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:508)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:125)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
    at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
    at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:180)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
    at java.security.AccessController.doPrivileged(Native Method)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)

    Hi timo,
    Thanks for ur reply...
    we are using unbounded taskflow.
    In Controller class(page def file), we refered the class that implements PagePhaseListener
    The following override methods has created
      public void afterPhase(PagePhaseEvent pagePhaseEvent) {
    //In this area we used to read the session object file which is written and sent by another application(application to application navigate).
    If session object file exists,will allow the user to navigate into the requested page else will navigate in to login(security aspect).
      public void beforePhase(PagePhaseEvent pagePhaseEvent) {
    Is we used Controller class wrongly ???
    Is there any relationship with region controller???
    Mani
    [email protected]

  • ESB problem when use merge function in master/detail relationship

    I have some problem with the merge function in database adapter.
    details:
    I have 2 tables in master/detail relationship, both have GUID column as a primary key (GUID generated by ESB).
    'car_group' table
    pk : guid
    unique : group_no, datadate, datatime
    ===============================
    guid, group_no, datadate, datatime, group_detail
    ===============================
    1, 1, 01/01/2008, 09:00, groupdetail01
    2, 1, 01/01/2008, 10:00, groupdetail02
    'car_group_detail' table
    pk : guid
    fk : car_group_guid link to car_group.guid
    ==================
    guid, car_group_guid, detail
    ==================
    1, 1, detail01
    2, 1, detail02
    3, 2, detail03
    4, 2, detail04
    I used a file adapter as a input, here is an example text file
    M, 1, 01/01/2008, 09:00, groupdetail01
    D, detail01
    D, detail02
    M, 1, 01/01/2008, 10:00, groupdetail02
    D, detail03
    D, detail04
    Because I used merge function so I need to specify the columns that will be a condition for the insert/update,
    but I have generate GUID as a primary key in the tables, I can't used it, so in toplink I map my unique key as a primary key.
    The insert operation work fine but when update is required (for example, try to change 'group_detail' column of the master table in text file),
    an SQLException thrown, the log file shown the adapter try to update the GUID column of master table but the constraint not allowed.
    And yes, cause of GUID generate everytime so ESB try to update this column also, but I don't want to do like that, I need something
    like when update operation required, just ignored the GUID column.
    I try to mark read-only to the GUID column in Toplink mapping file but still have the same problem, it still generate UPDATE statement
    with the GUID column, and also I try to let the database trigger to generate GUID instead of ESB function, but it not works in master/detail
    relationship (I think the Toplink manage the relationship, is it right ?)
    Please advise, thanks for advance.

    somebody please help, thanks !!!

  • Master-Detail relationship and querying back from the detail block

    Hello friends,
    Using oracle forms 6i. I have a multi data block. On the block there is a header and detail section. There is master detail relationship present in these blocks. I have a sequence defined, which generates an auto-number.
    Now in the detail section say I have 4 records all of which are say invoices and I am populating the details about it. On the 'save' button I have defined a logic which generates an auto- number or a unique number for all the 4 records in the detail section. The unique number is shown in the header section in a text-field.
    Now when I query (F11 and then Ctrl+F11) with the help of the unique number i see all the 4 records under it in the detail section. But when I query with the help of one of the 4 records in the detail section it says "fetching more than a single row." I know the same unique number is there for all the 4 records and in the header section I am displaying "number of items displayed" to be 1. That is why the error. But I want that to remain one. How exactly can I develop this functionality of querying the unique number in the header section from the detail block?
    Please help as soon as possible.

    Hi,
    I'd suggest to check this tutorial:
    http://www.oracle.com/technology/obe/obe_as_10g/bi/forms/formsmasterdetailobe.htm
    Having a relationship between data blocks, coordinates dml actions in both, so no coding is needed to save/update/delete records, forms built-ins do the work.
    hope this is useful,
    Hugo

  • Duplicate rows in Detail Table - Master Detail Relationship

    Hi,
    I have developed the Page it has following components. (Jdeveloper 10g - R12)
    1) Query RN
    It has around 11 parameters, 5 parameters have LOV attached, 2 are mandatory parameters.
    Auto Customization criteria. we don't criteria map defined , where clause is build based on parameters and vo.executeQuery gets called on Go button click.
    2) Sales Order Table RN (Master)
    3) Sales Order Line Table RN (Detail)
    View link is created to maintain the master detail relationship and detail region is attached to AM using view link under master region.
    Page flow works in this way, when user enter the parameters in search region and click on Go button, Sales Order table RN (master) gets populated.
    It has radio button when user click it fires PPR event .
    Process form request gets called and master row gets set (Same code as per developer guide) and Sales Order Line table RN (detail).
    Problem is once detail region gets populate and when user change any parameter which has LOV attached somehow same rows gets added to detail region which is weird because we have not clicked on GO button and radio button on header region is also not touched but detail region is populated somehow.
    Please help
    Thanks.
    Deepak

    Provide the query used for populating the child records. Issue might be due to caching.
    Thanks
    Shree

Maybe you are looking for

  • Apex 4.2.1 - mobile theme display bugs and Cascading LOV bug

    I've setup a test at http://apex.oracle.com/pls/apex/f?p=35331 - username/password is test/test Simple page to show some issues I'm running into. Wondering if work-arounds exist or if a patch would be available before we'd go live. First and second i

  • Additional Fields for Cash Journal Print Layout

    Hi All Is it possible to add a new field before printing the cash journal. My requirement is to add the FI Document Number Field to the screen layout before the printing the cash journal transactions. Please advise the procedure to this field. Thank

  • Displaying types in SOAP envelope

    TCP tunnel displays my SOAP body as follows: <soapenv:Body><AddUpdate xmlns="uri:webservice.thenet.software.com"> <TheNetObject> <Reference xmlns="uri:thenet.software.com"><ID>BPELTest</ID></Reference> <AccountName xmlns="uri:thenet.software.com">BPE

  • Message priority - F1 (Help)

    I am trying to write a JMS application in which the user is able to change the message priority (alone). If I run the setJMSPriority of the Message class, there is no effect. If I change the priority on the MessageProducer, then all defaults are chan

  • Problems with N2610

    Hello to everyone Ok here it goes.....since the other day when i try to turn on my mobile which is a N2610 the screen remains black and all u can see is "Local Mode" very very fade in the screen. Can anyone tell me how i can fix that?