Insert error in master-detail form

Probably a stupid question. When I populate the master block of
a master detail form from an LOV, I am asked to save the form.
Since the information is loaded from the LOV, there are no
changes to save. If I answer yes, it gives an Insert error due
to the primary key violation in the master block table. If I
answer no, it opens the detail block and gives the correct
information. The problem is that when I enter information into
the detail block and try to save it, I get the same error
message regarding the primary key violation in the master block.
The form works fine if I do not populate the master block from
the LOV (or from select statements in triggers). Any suggestions
will be appreciated.
LS

Hi,
Check for the form or block status.Looks like the status has
changed.Thats why u r getting the message.If any of the base
table item has changed then u will get such a message.Try
working on this an check it out.
Thanks
Vinod

Similar Messages

  • 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

  • Session storage errors in master-detail form

    hi,
    as the sequences do not work in master detail forms, i'm using session variables but the form does not compile and gives error.
    following is my code in the SAVE button of the master-detail form -
    declare
    new_prod_id number(10);
    begin
    select BPSIDEV.PRODUCT_ID_SEQ.NEXTVAL
    into new_prod_id
    from dual;
    p_session.set_value
    p_block_name => 'MASTER_BLOCK',
    p_attribute_name => 'A_PRODUCT_ID',
    p_value => new_prod_id
    doSave; -- This is generated code
    end;
    the action item values is as foloows -
    Master - INSERT
    Detail - INSERT
    am i missing here something ? or is anything wrong here ?? pls advise ...
    after the above changes the form would not compile at all.
    also how would i populate the the detail records with the foreign key ??
    thanx...
    null

    This problem is fixed in 3.0.8 release of Portal which will be available with the next release of iAS.
    Actuallty the fix is simple look at the generated package of EXAMPLE_MD_FORM from EXAMPLE_APP, onSave event handler looks like this:
    procedure onSave
    p_block_name in varchar2,
    p_object_name in varchar2,
    p_instance in integer,
    p_event_type in varchar2,
    p_user_args in varchar2,
    p_session in out WWV_30898.wwa_api_module_session
    is
    "_master_block" varchar2(30) := 'MASTER_BLOCK';
    Some more code.......
    And then closer to the end in detail processing section there is something like:
    "_d_data_rec".COMM:=p_session.get_value_as_NUMBER(
    p_block_name => "_detail_block",
    p_attribute_name => 'A_COMM',
    p_index => "_cnt"
    "_d_data_rec".DEPTNO:=p_session.get_value_as_NUMBER(
    p_block_name => "_detail_block",
    p_attribute_name => 'A_DEPTNO',
    p_index => "_cnt"
    ===========================================
    You'll need to insert following code, just one if statement, that's it. Please note every time you regenerate the package this code will be lost, so you'll need to add this agains and again. Not a perfect solution, that's why I like JS workaround better.
    ============================================
    if "_d_data_rec".DEPTNO is NULL and "_m_data_rec".DEPTNO is NOT NULL
    then
    "_d_data_rec".DEPTNO := "_m_data_rec".DEPTNO;
    end if;
    ============================================
    ============================================
    if "_detail_action" = 'DELETE' and "_DETAIL_ROWID" is not null then
    DELETE FROM WWV_30898_DEMO.EMP WHERE ROWID = "_DETAIL_ROWID";
    "_detail_deleted" := "_detail_deleted" + 1;
    elsif "_detail_action" = 'UPDATE' then
    UPDATE WWV_30898_DEMO.EMP SET EMPNO="_d_data_rec".EMPNO,ENAME="_d_data_rec".ENAME,JOB="_d_data_rec".JOB,MGR="_d_data_rec".MGR,HIREDATE="_d_data_rec".HIREDATE,SAL="_d_data_rec".SAL,COMM="_d_data_rec".COMM,DEPTNO ="_d_data_rec".DEPTNO WHERE ROWID = "_DETAIL_ROWID" ;
    "_detail_updated" := "_detail_updated" + 1;
    elsif "_detail_action" = 'INSERT' then
    INSERT INTO WWV_30898_DEMO.EMP (EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,COMM,DEPTNO) VALUES ("_d_data_rec".EMPNO,"_d_data_rec".ENAME,"_d_data_rec".JOB,"_d_data_rec".MGR,"_d_data_rec".HIREDATE,"_d_data_rec".SAL,"_d_data_rec".COMM,"_d_data_rec".DEPTNO) RETURNING ROWID INTO "_DETAIL_ROWID";
    "_detail_inserted" := "_detail_inserted" + 1;
    end if;
    ............................

  • Error in Master Detail Form

    Hi All,
    i m getting the following error when i m creating a master entry ...
    ORA-06550: line 5, column 23: PL/SQL: ORA-02289: sequence does not exist ORA-06550: line 5, column 16: PL/SQL: SQL Statement ignored ORA-06550: line 8, column 16: PLS-00364: loop index variable 'C1' use is invalid ORA-06550: line 8, column 9: PL/SQL: Statement ignored
    but while creating the master detail form i had specified the corresponding sequences and they even exist in the DB.
    Please ! do help me .
    Thanks & Regards,
    Nandini Thakur.

    Hi ,
    Though u choose the schema name ...the sequence is not appended with the schema name .
    Example you are craeting the application in schema 1 and ur database objects are in schema 2.
    so while creating the Master detail form you will get the option of choosing the schema, but then also the sequence name is not appended (as this may be the problem or bug in apex) .
    so one needs to manually go and append the schema name.
    In master detail form one needs to append it
    1) Form of the Master ...the process called as get primary key there the sequence name should be appended
    ex:- myschema.seq
    2) another is the detail tabular form . here you need to good to the id hidden field and edit it , then in the source column append it with the myschema.seq.
    Regards,
    Nandini Thakur

  • 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

  • FRM-40654 error in master-detail form while deleting record in detail block

    Hi,
    I am facing an issue in a custom form which is a Master-detail form while deleting a record in detail block. It is giving an error "FRM-40654 Record has been Updated by another user. Re-query to see change". I have checked the record is matching with that in database.
    Can anyone help on this.
    Thanks In Advance,
    Midhun

    Hi jan,
    master block is based on Table "A" and detail block is based on a View "X".
    View "X" definitions includes the tables "A","B","C" etc..
    Now I have tried removing table"A" from view "X", even then the same error is ocuuring but the lock is happening on table "B" instead of "A"
    Thanks,
    Midhun

  • Error creating Master/Detail Form

    Hi,
    I tried to create a master detail form. I went through all the steps fine, only when i click the button to create the form, i received the following errors:
    ORA-20001: Unable to create master detail page. ORA-06502: PL/SQL: numeric or value error: character to number conversion error
    Unable to create Master Detail pages.
    Could someone please tell me what's wrong?
    Thanks,
    Patrick.

    We are getting this message in several areas in the development environmnet. It's happening in the developer login screen, when creating new tabs, and when tryig to create master detail reports. Here is our error from the Apache Log:
    [Mon Mar  2 11:41:31 2009] [error] [client 10.64.8.231] [ecid: 1236012090:148.94.143.136:24226:0:1621,0] mod_plsql: /pls/apex_qmnt/wwv_flow.accept HTTP-404 ORA-06502: PL/SQL: numeric or value error\nORA-06512: at line 31\n
    I think this is different from the issue above as that is due to too many items in a shuttle list. Ours seems to be related to our new APEX insstallation. Any help is appreciated here.

  • HELP: Error while insert in master-detail form!!!

    Hello
    I have created a master-detail form and when I tried to insert a new record I got an error that the field on the detail table that references the primary key on the master table can not be null. I don't understand this error because I thought that when you create a master-detail form and you insert a new record the field that make the references in the detail table to the primary key on the master table will be automatically filled, am I wrong??. Can anybody tell me what is going on??. The primary key of my master table is filled with a trigger before insert, is that the problem??.
    Please Help me is really urgent
    Ana Maria

    I am still new to this, but maybe this will help.
    1. Double check that your foreign key link definition in the detail table is referencing the correct column in the master table. If this is not present or referencing the column, this may be causing the problem. Self evident, but sometimes it is the simple things that get us.
    2. I have not used a trigger yet, but could there be validation being done in the form before the trigger is firing. Therefore, there would not be a value in the detail part of the form.
    Hope this was of some help.

  • Error ORA-01790: for INSERT in master detail form

    Gidday;
    I get the error message 'ORA-01790: expression must have same datatype as corresponding expression' when I attempt an insert operation in the detail region of a master/detail form.
    I have checked previous entries of this error I could find - as far as I can tell the parent key defaults are correct.
    It seems one of the factors could be that the tables are not within the 'home' schema for the application. I have created a similar default master detail form on the tables, with the home schema matching that for the tables. Within my major application I have ensured the correct schema is referenced in all fields (all those I could find - in the Report Attributes / Column Attributes area).
    I just cannot find which expressions are mis-matching their datatypes.
    thanks; DS

    Hi,
    According to [http://ora-01790.ora-code.com] the error is raised because "A SELECT list item corresponds to a SELECT list item with a different datatype in another query of the same set expression." Do you have any Select Lists on your page? If you do, is the "return value" of the same datatype as for the underlying field?
    One thing to try in these circumstances is to click the Debug link on the Developer's toolbar at the bottom of the page and then try to insert your record. You will get a whole stream of messages appear on the left of the page and the error should become obvious.
    You could also check that all the defaults you have set do not contain spaces or linefeeds at the end - I have seen this cause issues before.
    Andy

  • How can I insert in the table detail of a master/detail form??

    Hello, I have created a master/detail form from the assistant, and with the code generated by APEX I do not manage to insert a row in the table detail, I press the button 'Add Row' and refill information, when I press the button ' to apply changes ' me the following mistake appears:
    'Error in mru internal routine: ORA-20001: Error in MRU: row= 1, ORA-20001: ORA-20001: Current version of data in database has changed since user initiated update process. current checksum = "C85B64D53C8D63E9D3EE83B82728DFA3", item checksum = "244B1FED90DF5CC5B0DDB6728F4D02DD"., update "CRM_ADMIN"."ASIGNACIONES_AM_CONTACTOS" set "SECUENCIA" = :b1, "CODIGO" = :b2, "NOMBRE_CLIENTE" = :b3, "NOMBRE" = :b4, "COMENTARIOS" = :b5, "CODIGO_COMERCIAL" = :b6'
    How I can solve and be able to insert in the table it detail?
    Thanks

    Hi Law,
    Text in a shape or a text box will not feature in the table of contents.
    To get a colour behind your titles, type them into your document (not a shape). Format as Heading or some other paragraph style the TOC will recognise.
    Select the title text and Format Panel > Text > Font > Gearwheel > Advanced Options.
    Choose Character Fill Color and choose a colour from the palette (left) or colour circle (right).
    Example Titles (all on the same page for a smaller screen shot).
    Chapter 3 (in a coloured Text Box or Shape) does not appear in the TOC:
    Hint for cheats :
    To give the titles a wider Character Fill Colour, add some Tab characters before and after.
    Regards,
    Ian.

  • Inconsistent inserts into detail table of master-detail form

    Hello,
    [I am not sure if this is a bug or user error, so I've also put this in the bug tracking system.  Apologize for the 'duplication']
    I have a master-detail form: Orders is the master, and Order_Details is the detail. I have noticed some inconsistent behavior when inserting the detail information.
    On occasion, the row will be inserted, and a null value will get inserted into the database for the first column of the detail table; all the other data values will be inserted fine. There doesn't seem to be any pattern to when it happens. I wrote down the following test steps:
    1. Enter new order information and click 'Create'
    2. Click 'Add Row' button so can add order detail info
    3. Enter detail row information
    4. Click 'Add Row' (I do this so I can see the success message that the detail data was actually inserted)
    5. Click 'Apply Changes' at the master level.
    I ran a query on the order details table and saw that the data inserted correctly. Then I ran the following test:
    1. Enter new order information and click 'Create'
    2. Click Add Row button so can add order detail info
    3. Enter detail row information
    4. Click 'Add Row' (success message appears that detail was inserted)
    5. Enter second detail row information
    6. Click 'Add Row' (success message appears that detail was inserted, however, now in the first column of that second detail row - the product name field/column - the data does not appear. I only see my null text value. The data in the first detail row is all correct)
    7. Enter third row detail information
    8. Click 'Add Row' (success message appears that detail was inserted, and this row's information appears correctly, as does the first row's, but the second row is still showing a null value for the product name column)
    9. Click 'Apply Changes' to get out of the form
    A query of the order details table shows that a null value (-) has indeed been inserted into the table for the product name column of the second detail row.
    This behavior also happens when I don't have a null value for the LOV (i.e., it defaults to the first row of the lookup table).
    Has anyone seen this before? Am I entering the data incorrectly?
    Thanks.
    -melissa
    Message was edited by:
    mblakene

    having the some problem. Any help with this ??
    milowski were you able to solve it ? can you share the information.
    Thanks

  • Master detail form - Cascade Delete gives error

    I am using 3.0.9.8.2 and have made a master detail form which works fine except for cascade delete. Insert and update works well, but I have to delete the child rows first to be able to delete the parent.
    "Cascade Delete Detail Rows on Master Delete" is checked.
    Error situation 1 (where the master just has one child row (number of detail rows to be displayed = 2)):
    When trying master action=delete I get:
    Error: No conversion performed for type INTEGER, value . (WWC-49102)
    This happens whatever is chosen from the detail action drop down list during the attempted delete.
    Error situation 2 (where the master has two child rows (number of detail rows to be displayed = 2)):
    When trying master action=delete I get:
    Error: An unexpected error occurred: ORA-02292: integrity constraint (MILLS_PORTAL.TEX_ACCOUNTS_FK) violated - child record found (WWV-16016)
    This also happens whatever is chosen from the detail action drop down list.

    Sorry to say, but this is a bug which will get fixed in the forth coming releases.
    Till then, there are 2 ways to avoid this problem:-
    1> The change the foreign key in the detail table to have an ON DELETE CASCADE clause.
    2> (Though not desirable, but still as a workaround)- Drop the foreign key constraint from the detail table.

  • Error while creating the master-detail forms

    on creation of a new master-detail form or on edit of a existing master-detail form, i get the following error -
    ******** START ERROR **********
    Thu, 15 Mar 2001 23:02:16 GMT
    ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at "CC_INTRANET.WWV_BIND", line 56
    ORA-06512: at "CC_INTRANET.WWV_UI_LOVF", line 3123
    ORA-06512: at "CC_INTRANET.WWV_UIFORM_BUILD", line 2850
    ORA-06512: at "CC_INTRANET.WWV_UIFORM_BUILD", line 5567
    ORA-06512: at line 8
    DAD name: cc_intranet
    PROCEDURE : CC_INTRANET.wwv_uiform_build.show_header
    URL : http://webdb.us.colorcon.com:7777/pls/cc_intranet/CC_INTRANET.wwv_uiform_build.show_header?p_wizard_mode=MASTER&
    ********** END ERROR ********
    any ideas anyone ... ?
    thanx in advance ...
    null

    more information on above -
    i upgraded webdb 2.2 to portal 3.0.6 and the new master-detail form is been created in the upgraded site.
    pls reply on this.
    thanx a bunch
    null

  • Master Details Forms- Report getting error

    Dear All,
    I have used master details form . In details form , i am having 50 fields . i am able to add row. after that it is showing error ike below.
    Error:
    =============================================================================
    Error in mru internal routine: ORA-20001: Error in MRU: row= 1, ORA-20001: ORA-20001: Current version of data in database has changed since user initiated update process. current checksum = "D63F13336F2D8570B20FC4825A7B836A", item checksum = "809B7E0170040C75637E80BE2D464C77"., update "SIFY"."REG_MANAGER_DETAILS" set "RMD_ID" = :b1, "RMD_RM_ID" = :b2, "RMD_ACMAN_NAME" = :b3, "RMD_CONN_OT_CUR" = :b4, "RMD_CONN_RS_CUR" = :b5, "RMD_CONN_HW_CUR" = :b6, "RMD_HOST_OT_CUR" = :b7, "RMD_HOST_RS_CUR" = :b8, "RMD_HOST_HS_CUR" = :b9, "RMD_EAS_OT_
    =============================================
    What will be solution to resolve this type of error ?
    Please help me to resolve this. Thanks in advance.
    Regards
    Dhanush.R

    Dhanush,
    This is an optimistic locking checksum error. It's trying to tell you that it can't save because someone/thing has updated the data already and it doesn't want to overwrite it. Is that always occurring?
    Regards,
    Dan
    Blog: http://DanielMcGhan.us/
    Work: http://SkillBuilders.com/

  • Master detail form Error in mru internal routine: ORA-20001

    Hi,
    i created a master-detail form with apex standrad wizard.
    Master e datail are on the same page.
    All works fine.
    My detail form contain some fields of my detail table.
    Now i added a link on detail form for call a form with all fields of my detail table.
    The link work fine.
    When i try to add row or update my detail form i receive the error
    Error in mru internal routine: ORA-20001: Error in MRU: row= 1, ORA-20001: ORA-20001: Current version of data in database has changed since user initiated update process. current checksum = "D472A2BF636CA11122F196B8A32B3DC8", item checksum
    Any help?
    Thanks in advance
    Lukx

    Lukx,
    I've just reproduced your what I believe you wanted and didn't receive any errors. Here are the steps I took.
    1) Used the wizards to create a Master Detail form (with Detail edit on the same page as the master and only showing 2 of the detail columns)
    2) Used the wizard to create a FORM ON A TABLE for my detail table allowing the user to edit all detail columns
    3) Created a "column link" column on the detail form of the Master Detail form which links to the FORM ON A TABLE, passing across the ID of the detail record.
    When I do this, everything seems to work perfectly as expected.
    Is there something I'm missing in the steps you performed to create your scenario?
    Thanks
    Doug
    http://www.sumneva.com

Maybe you are looking for

  • Very important and necessary

    I use a leopard, and I try to upgrade to Snow Leopard system, to run away I am having trouble in this way CD not accepted by the laptop, if i entered the CD laptop to get it out, I tried another way to copy the system flash memory and tried to downlo

  • EXIF time altered on conversion from PEF to DNG

    Converting Pentax PEF files from my *istDS to DNG using the Adobe DNG converter (4.1) results in the EXIF date/times all being shifted forward by six hours. I gather that the camera and the converter are miscommunicating regarding time zone. But the

  • Will Oracle BPEL PM available for MacOS

    Oracle SOA Suite 10g Release 3 (10.1.3.1.0) currently only supports Windows and Linux, Is there any future plan to include support for MacOS 10.x.

  • Help! I think I've made a huge error! (songs from ITouch to ITunes)

    I've been having trouble transferring songs bought on my ITouch into my Itunes on my computer. I tried right clicking on 'My Ipod' and 'Transfer Purchases' and going to 'File' and clicking 'Transfer Purchases to My Ipod', but neither did anything. As

  • Internet gets a bit sleepy...

    As it stands, we have never had Skype work. We have installed and uninstalled atleast 5 times both ways. We have tried reverting back to previous versions of skype but to no avail.  We have Microsoft security essentials, superanti spyware, CC cleaner