Master-details Relation In MultiBlock Form

I have 3 Database block,A,B and C
The relation exists A to B and B to C with 1 to many.
I want to make a form without any non-database Block
my problem is that - where I am adding first record(i.e. A, B,C) and moving to add 2nd record in B , it prompts 'Do u want to Save record ' . To avoid this message i used POST command in 'Clear_All_Master_Details' prorgam unit. and removed 'ASK_COMMIT' in clear_block function.
It is working properly, but when 2 users are modifing to two different documents which belongs to A,B and C (i.e using same Form from different computer) it gets hanged untill unless the first user is not commitng or not clearing his form.
I hope u must understand my proble.
Please anybody can help in this topic.
Thanks
KM

If the 'hanging' happens when users are modifying different records then the root of the problem is probably in a database trigger, updating or inserting the same record for each user. If you cannot redesign that then you'll need to implement a locking mechanism. For that, see DBMS_Lock.
James.

Similar Messages

  • Multiple Master Detail Relation In Forms 6i

    I have tables as below
    1.Bill_Head
    Bill_No
    Bill_Date
    Fin_Year_Cd
    Remarks
    2.Bill_Tail
    Bill_No
    Product_Cd
    Amount
    Ded_Amount
    Net_Amount
    3.Bill_Tail_Det
    Bill_No
    Product_Cd
    Quantity
    Rate
    Interest_Percent
    Service_Charge
    Vat_Tax_Percent
    The Relation is like
    Between BILL_HEAD and BILL_TAIL is Master Details Relation
    Between BILL_TAIL and BILL_TAIL_DET is one to one relation
    In single form i am not able to insert record.
    If i build Master details between BILL_HEAD and BILL_TAIL, BILL_TAIL and BILL_TAIL_DET, when i run the for to insert data.
    I will put the data for BILL_HEAD data
    For this parent record there will be child record in BILL_TAIL block.
    For this BILL_TAIL parent record there may be a child record in BILL_TAIL_DET or may not. Suppose i put a child in BILL_TAIL_DET.
    Then i wanted put one more child record in BILL_TAIL block, if i say next record, it is asking me to "save the record first".
    Please help me in this regards
    my mail id : [email protected]
    Regards
    Mahaveer
    Message was edited by:
    user603318

    Thanks Kris, for your reply.
    Is there any way out to enter all the data at once and then commit, b'cse for every record asking to commit is tedius.
    Regards
    Mahaveer

  • Master-Detail Relation- Detail records not displaying

    Hi All,
    I am working forms(10g) customization for an oracle applications. our requirement is to develop a new window(screen) which should display all the related child records for the master record in the main form on a button press.
    i have developed a new database block based on a vew and provided the relation with master block, and done the required customization.
    But, when i run the form, and clicked on button, it is giving an error
    FRM-40350 Query caused no records to be retrieved.below is the code that i have written on button click
    BEGIN
              IF event = 'WHEN-BUTTON-PRESSED'
              THEN
              SHOW_VIEW('XXSCP_GBL_CUST_PEGGING_CON');
              SHOW_VIEW('XXSCP_GBL_CUST_PEGGING_STK');
              app_window.set_window_position('XXSCP_GBL_CUST_PEGGING_WIN',
                                             'CASCADE',
                                             'XXSCP_GBL_EXCEP_DETAILS_WIN');
          SET_BLOCK_PROPERTY('XXSCP_GBL_EXP_DETAIL_V',NEXT_NAVIGATION_BLOCK,'XXSCP_GBL_CUST_PEG_V');                                        
          GO_BLOCK('XXSCP_GBL_CUST_PEG_V');
         -- fnd_message.DEBUG('before execute');
          EXECUTE_QUERY;
          :parameter.p_excep_detail := 'FALSE';
              ELSE
                   NULL;
              END IF;
              EXCEPTION
                   WHEN OTHERS
                   THEN
                   fnd_message.DEBUG('other error at button press'||SQLERRM);
              --     NULL;
    END;I am able to query records in my view from database, but not working when i run the form.
    ANy suggestion will be helpful.
    Thanks in advance,
    pavan

    Duplicate post -- Re: Master-Detail Relation- Detail records not displaying

  • Master Detail Relation

    Can I design Master detail using one block for master and display like 5 records and each of this has 10 detail records. I am not sure if I can achieve this.
    Other scenario is have one master block(5 records) and have 5 detail blocks. Please give any information related

    Husna,
    1. To only show 5 reords in teh master block, just set the display record property to 5 (records displayed). Selecting one of teh master records queries the detail records (as many as there are available)
    2. Master/Detail navigation works only for the current selected master record. i get th eimpression that you want to show all detail records that belong to the five master records currently visible. If this is the case then I would'nt use a master-detail relation in Forms, but read the PK from the block record and set it as the where clause to one of the detail blocks.
    Frank

  • Creating a master-detail relation between a view and a table

    Hi all,
    I have a problem with creating a master-detail relation between a database-view with lots of customer data and a small table with per customer a list of entities of our companies who may work for that customer.
    Somehow I seem to be unable to create a relation between these two. I can't find where I can make a foreign key using Toplink to implement the relationship. And neither can I get a Viewlink object doing the job using ADF Business Components.
    Somebody any suggestions on this problems?
    Regards,
    Birgit

    There is a key relationship between two fields which form the primary key in the main table of the view and two fields in the second table.
    I created a viewlink manually, but I still couldn't get the data correct i.e. a form with one record of a customer from the main view and a small table with all entities of our company who can make performances for that customer.
    I tried to find a manual or a how-to on this topic but I didn't find anything helpfull yet.
    Regards,
    Birgit
    After a couple more tries, I got the master-detail working. With all the fiddling I am not sure what caused the problem but I think the finally action was checking which fields of the view were marked as primary keys.
    Now everthing is up and running.
    Birgit
    Message was edited by:
    user492355

  • Master-Details Relation

    Hi All,
    I Have one dought,I have a form with master-detail relation.
    If i query in header level i can able to see all the data in both levels.
    If i query in detail level i cannot see header level information,but i can able to see the detail level only.
    Can any help me in this
    Regards
    Siva

    Remove join condition and relation as well! In master block you should have in where close "database_item = :bl_2.item" and in detail block you should have where close with "database_item = :bl_1.item". When user put the cursor in bl_1 and execute query the bl_2 should be listed as well. You can do this on different way for ex.: write in key-exeqry or when-new-record-instance etc. on bl_1 go_block('bl_2'); execute_query; And inversely or "vice versa": when user put the cursor in bl_2 and execute query the bl_1 should be listed as well. You can do this on the same way for ex.: write in key-exeqry on bl_2 go_block('bl_1'); execute_query;
    If you want to create record you have to be carefuly on the key items in both blocks. So you have to fill the key item before user want to do the commit form. That's all but I did not test it so I can not know how could both where condition behave with different users action.

  • Need Master-Detail relation to link Master column to 2 different detail col

    I have a form with a master detail relation. The master block is a database table rec_shipments with a primary key of shipment_id and a bunch of other columns. The detail block is a table rec_containers with a container_id as the primary key plus column shipment_id, split_shipment_id, weight, volume, etc. The shipment_id and split_shipment_id are nullable.
    When a shipment is received a shipment record is created and container records are created with the shipment_id populated and the split_shipment_id null. In the form a relation was created between the shipment block and the container block as shipment_id=shipment_id. This works fine. However, they have the ability to spit the original containers into smaller more manageable containers for distribution. For example if they receive a railroad car full of pallets of printer paper they may take and divide them, half into 1 rolloff bin and half into another rolloff bin. The rolloff bins will get a unique container_id for tracking. The record in the system created in the rec_containers table will have the split_shipment_id populated and the shipment_id null. In the screen they want to see the original containers (railroad car) and the split containers (rolloff bins) when the query the shipment.
    What they want:
    Shipment_id -- and additional information
    Railroad Car ID plus additional information
    Rolloff Bin 1 ID plus additional information
    Rolloff Bin 2 ID plus additional information
    My problem is the rolloff bins don't show up with the current relation because the shipment_id is null in the 2 rolloff bin records.
    I've tried creating a view on the rec_containers table that is all the columns in the table plus 1 additional column that is
    nvl(shipment_id,split_shipment_id) comp_ship_id
    and set the relation to shipment_id=comp_shipment_id. I set the comp_shipment_id column to query yes and insert & update to no because I don't want to update that column in the view.
    The problem is I can't update any columns, I get a can't reserve record for update or delete error.
    Does anyone have any ideas how I can get the containers block to query all records where the shipment_id or split_shipment_id matches the shipment block shipment_id and still be able to update the records?
    Thanks for any help.

    Your idea of using a view is the best approach. In order to make the block updateable, you have to sst the property "Query only" for your derived item to "Yes". Witn this, the column will not be included in any further dml. About the locking... it may be that forms isn't anymore able to do proper locking when a block is based on a view. In that case, put an ON-LOCK-trigger on the block and lock the record by yourself doing y SELECT FOR UPDATE NOWAIT on the record. To just try if this would work you use a NULL in the ON-LOCK just to xheck if the dml-operations itself will work. if your view is based on only one table you have good chances that there is nothing to change, if you get an error like "View not updateable", you have to do some further adjustments
    -Set the key-Mode for the block to "Non-updateable"
    -Set the property "Primary key" to "Yes" for the pk-item in your block.
    hope this helps

  • Master - Detail relation succeded and the failed!!

    Hi all,
    I've made a master-detail relation between two data block using data block wizard with (copy value from item) property, this worked successfully for times and failed a lot of times!
    when I insert a record at the master data block the value is copied at the detail data block, but when I did the same thing for another time the value didn't copy!!
    to solve this problem I made a trigger at the detail data block (pre insert):
    :Master.Item-Value := :Detail.Item-Value
    this one succeded for the first time and then it failed!!
    I don't know what is the problem
    Note:
    I connected to a database server on another PC and work and save my forms at this PC.
    Edited by: Dev. Musbah on Oct 5, 2008 3:54 AM

    One about the important note:
    Thats exactly the missing point.
    If you assign the PK-value by a database-trigger, you have to read it back into forms after the insert.
    Three possibilities:
    1. There is a property at block level like "DML returning clause" If set to "Yes", forms will read back all values from the db after insert or update.
    2. Write an POST-INSERT-trigger at block-level and read back the ID by yourself using a cursor.
    3. Assign the PK-value already in the form in a PRE-INSERT-trigger and populate the PK-column in the database-trigger only if the pk-column is null
    hope this helps.

  • Help on Master Detail relation

    Im using XSQL command line processor 1.0.2.0.
    How I can I write a SQL query To display master detil relation in the output?
    For example Department and Emp are two different tables with master detail relation...
    I just want to display the output some thing like..
    <Department>
    <Details>
    <Dep_name>Accounts</Dep_name>
    <Dep_no>10</Dep_no>
    <EMP>
    <EMP_NAME>AAAAAA</EMP_NAME>
    <EMP_NO>999999999</EMP_NO>
    <HRD>01/01/2000</HRD>
    </EMP>
    <EMP>
    <EMP_NAME>BBBBBB</EMP_NAME>
    <EMP_NO>100000000</EMP_NO>
    <HRD>01/01/2000</HRD>
    </EMP>
    </Details>
    <Details>
    <Dep_name>INVENTORY</Dep_name>
    <Dep_no>20</Dep_no>
    <EMP>
    <EMP_NAME>CCCCCCC</EMP_NAME>
    <EMP_NO>8888888888</EMP_NO>
    <HRD>01/01/2000</HRD>
    </EMP>
    <EMP>
    <EMP_NAME>BBBBBB</EMP_NAME>
    <EMP_NO>100000000</EMP_NO>
    <HRD>01/01/2000</HRD>
    </EMP>
    </Details>
    </Department>

    [list]
    [*]First, I'd recommend upgrading to XSQL 1.0.4.3, the latest production release that is part of the XDK for Java 8.1.7.1 at http://otn.oracle.com/tech/xml
    [*]Then, explore using the Oracle CURSOR() expression to create nested rowsets. This is documented in our SQL language reference info here on OTN. My book has several examples of using CURSOR() to produce master/detail results, too.
    [list]
    Steve Muench
    Development Lead, Oracle XSQL Pages Framework
    Lead Product Manager for BC4J and Lead XML Evangelist, Oracle Corp
    Author, Building Oracle XML Applications
    null

  • Serious problem with previous / next record in master-details relations

    I have master-details relations like this (if master is A) :
    A-B
    A-C and C-D
    When I move down with do_key('next_record') all values of all records in all blocks are OK. But when I move up, it doesn't work : all D block values are erased and I don't understand why ?
    Thank you for your help.
    Antoine LEFEBVRE.

    Blocks A and B are in the first canvas and blocks C et D are in the second canvas.
    On next_record action from A the B is updated, C too and D too. But on previous_record action, D is not updates.
    To display the second canvas I use a command button and into the WBP trigger there is :
    go_block(C);
    execute_query;
    to be sure to execute query, but it's null.
    What's your suggest ?
    Thank you,
    Antoine.

  • Master detail relation in the ADF Jdev10g sample application

    Hi,
    I have to develop Master detail relation in the ADF Jdev10g. Need sample application...Can anybody help me..

    Lots and lots of tutorials [url http://www.oracle.com/technetwork/developer-tools/jdev/overview/index-100269.html]here
    Note: 11g has been out for some time now, and if you are doing new development, it really makes sense to be using the latest software. If, by chance, you happen to be talking about doing development for the E-Business Suite, you want to be asking on the OA Framework forum.
    John

  • About master detail relation ship between tables

    Hi
    I am using jdev 11.1.1.5.0
    Use case:
    I have 2 table having master-detail relationship
    master table - req_hdr
    detail table - req_file
    req_hdr is drop as adf table (t1) on a fragment page and req_file is drop on popup as adf table (t2).
    user can add any no of row in req_file with respect to each row of req_hdr.
    to open popup for req_file, a command image link is provided in one column of req_hdr.
    On popup, there is two button provided for save and close.
    On save button,commit operation is performed and on close button,rollback operation and popup.hide() is performed.
    Now the problem what I am facing is
    1. If with respect to any row of req_hdr there is one row already exist in req_file and user click on add button to add new row in req_file and randomly user decide to to close the popup rollback operation is performed and again when user click on same row to open popup.
    Popup contains no row while in database there is one row exist for that.
    2. if user add a new row in req_file and perform save( commit ) and again for next row of req_hdr user open a popup to add new row in req_file and click on add button ,values of preceding row is already populated in new row while is should be empty because req_hdr and req_file have master detail relation and for next id of req_hdr, req_file should display new row.
    Anyone have the solution regarding this....?
    Thanks..

    the contentDelivery for the popup is already set to lazyUncached
    and on add button i use following code to add new row:--
    <code>
    Row r_file=null;
    CollectionModel tableModel = (CollectionModel)getT2().getValue();
    JUCtrlHierBinding adfModel = (JUCtrlHierBinding)tableModel.getWrappedData();
    DCIteratorBinding dciter = adfModel.getDCIteratorBinding();
    NavigatableRowIterator nav=dciter.getNavigatableRowIterator();
    r_file=nav.createRow();
    r_file.setNewRowState(Row.STATUS_INITIALIZED);
    Row lastRow=nav.last();
    int r_index=nav.getRangeIndexOf(lastRow);
    nav.insertRowAtRangeIndex(r_index+1, r_file);
    dciter.setCurrentRowWithKey(r_file.getKey().toStringFormat(true));
    r_file.setAttribute("Sno", vo_file.getEstimatedRowCount());
    r_file.setAttribute("Filetype", null);
    r_file.setAttribute("Filename", null);
    r_file.setAttribute("Remark", null);
    </code>
    There is any help regarding this....?

  • Issue with Master Detail relation in OAF page -- Help

    Hi,
    I am developing an OA page with a master detail relation. The detail records are displayed in the subtab region.
    The issue that I am facing is as follows:
    If there are 2 detail records in the detail table, then my page is displaying these 2 records twice i.e.
    Detail Records:
    Header Id Line Id
    2 1
    3 1
    Header Id Line Id
    2 1
    3 1
    If the number of detail record increases, then again the display also increases that many times i.e. 3 records gets displayed thrice.
    Kindly help to figure out the issue.
    Thanks In Advance.

    Hi,
    Take the following actions.
    1. Try to display your records in simple Table and remove it from subtab,
    2. check relations as well, you can delete and re-create all the relations with EOs and VOs and recreate them.
    3. Also check when your VO get popluated that how many rows are there in Detail VO ?
    For example.
    int x = yourViewObject.getRowCount();
    System.out.println("Number of rows in detail view Object"+x);
    Haroon.

  • How do I get and pass Master-Detail rowid to another form in query mode?

    I am trying to get the rowid of my master record passed to
    another form in query mode. This is necessary because, I need to
    have a way to show other detail tables for my master record. I
    have been successful in calling the other forms, but only if I
    hard code the rowid(or Primary Key).
    Ultimately a "Tabbed" HTML table for each supporting detail
    table that I have would be perfect. Any help would be greatly
    appreciated. Thanks.

    correct me if I am wrong, is this a 9iAS (Application Server)
    related question? This forum is for 9iAS only.
    Regards,
    --Tao

  • Copying master detail records in oracle forms

    Hi,
    Have a master details block , using a copy button i copy the existing contents
    in both the blocks , than primary key and foreign key value of the both blocks are changed and i want to save it as a new record.
    Problem is when i do the above it goes to record status as update
    it is not doing insert with the values.and throwing an error wrt referential integrity
    pls help
    with thanks

    This forum focuses on EBS. For Form specific questions, you can try Forms

Maybe you are looking for