Master Details form - button click records are vanishing

Developed One Custom Form, In the Master Block One Organization ID Column is there Based on ID, through LOV i am populating live level some data. it is working
fine.
In the Master Blokc based on Line level information I am doing calculations.
for that once Command Button Inserted. if i click the Command button
without changing Org ID it is working fine. if i changed to Some other organization id during
Entry. that time only records are vanishing. for other organization details in line level.
in the command button i am not referring organzation id.
begin
go_block('XX_JVG_BLEND_LINES');
first_record;
--           FND_MESSAGE.SET_STRING('inside 1');
          --FND_MESSAGE.SHOW;
          declare
          WEIGHTED_AVERAGE_ATOTAL NUMBER:=0;
BEGIN
     WHILE :XX_JVG_BLEND_LINES.MTL_SYSTEM_ITEMS_SEGMENT1 IS NOT NULL
loop
               --FND_MESSAGE.SET_STRING('inside loop');
                    --FND_MESSAGE.SHOW;
          DECLARE
               WEIGHTED_AVERAGE_A NUMBER:=0;
               WEIGHTED_AVERAGE_ALTOTAL NUMBER:=0;
          CURSOR
          C1           
          IS
          SELECT NUMERIC_VALUE FROM XX_JVG_SYSTEM_PARAMETERS WHERE FIELD_NAME='LA'
               AND CHARACTER_VALUE = :XX_JVG_BLEND_LINES.A;
               BEGIN
               open c1;
               FETCH C1 INTO WEIGHTED_AVERAGE_A ;
                    WEIGHTED_AVERAGE_ALTOTAL:=(NVL(:XX_JVG_BLEND_LINES.ISSUE_QUNATITY_KG,0)*NVL(WEIGHTED_AVERAGE_A,0));
                    WEIGHTED_AVERAGE_ATOTAL := WEIGHTED_AVERAGE_ATOTAL+WEIGHTED_AVERAGE_ALTOTAL;
               close c1;
               end;
                         IF :System.Last_Record = 'TRUE' THEN
                              EXIT;
                         ELSE     
               NEXT_RECORD;
          END IF;     
          End LOOP;
this is my code
what are the possbilities.

bcz of post update trigger line level firing in another column
probled solved

Similar Messages

  • 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

  • Creation of Master-Detail Form for new record.

    Hi Friends,
    This is my requirements. Please help me to complete my task.
    I have two tables Master and Detail. Detail have foreign key relationship with Master.
    I want to design the page Master table columns are in header portion and Detail table columns are in af:table.
    When i load the page, it should contain empty header portion and one empty row in the table and table should contain Create, Edit and Delete button.
    I want to use one Save (Commit Operation) only. If i save the record it should insert first in Master table and then detail table.
    I gone through lot of documents but not able to find anything related to my need.
    Please if any link or sample or document is there means please share it.
    Thanks & Regards
    Vimalan Balan

    Hi Frank,
    Yes Frank, I am planning to create master and detail within one form and one submit action to save the master and detail values in the table. In detail table i want to have only create and delete operation for the rows.
    Example:
    Master - Header
    PO ID -- input value
    Name -- input value
    Detail - table row.
    <create> <delete>
    Select Amount Exchange Rate
    <save> --- this is for entire master and detail. Need to save the master and detail after user entered in the screen.
    Please guide me or help or provide solution to solve the problem.
    Thanks & Regards
    Vimalan Balan

  • Master detail forms..increase the detail rows by clicking a button

    hi all,
    i have a problem, in my master detail form i have set the details rows as 8. can i give an option to the user such as a button, on clicking which he can increase the number of detail rows by say 2 or 3.
    can any one help me out on this???
    Thanks in Advance
    Rajesh

    Hi Rajesh,
    This is not posible in the current model of the portal forms , the no of detail rows can be set only at the design time.
    rahul

  • Adding button to report to link to master detail form

    I want to add a button to a report to direct me to a blank master detail form to insert a new record. I have used the following code in the additional PL/SQL code section:
    htp.formopen('PORTAL30.wwa_app_module.new_instance?p_moduleid=1271601405');
    htp.formsubmit('p_request','Create New');
    htp.formClose;
    When I click this I get 'Page Not Found'.
    But if I hit refresh I am directed to the correct form with the same url.
    Any ideas on what the issue is?
    Thanks.

    Hi,
    Check this sample code.
    tables:sscrfields. "Fields on selection screens
    selection-screen function key 1.
    selection-screen function key 2.
    Initialization.
      sscrfields-functxt_01 = 'Report'.
      sscrfields-functxt_02 = 'Exit'.
    at selection-screen.
       if sscrfields-ucomm = 'FC01'.
      perform f_alv_sub.
       elseif sscrfields-ucomm = 'FC02'.
       endif.
    Hope it helps.

  • Field values erases when Add Row button is pressed in Master Detail Form

    Hi,
    I am using APEX 4.0. There is a master-detail form in a page, this has 5 rows in it by default, has a Add row and a Delete button. I face two problems now:
    1. When the values are entered in all the 5 rows, that are in default, and Add Row button is clicked, these values are entered in the DB, but they are erased from the interface. Means when user clicks Add row he don't see the old values he has entered. All new empty rows are only seen. This might confuse the user. How can I resolve this.
    2. The values are saved to the DB only when the Add row button is clicked, so suppose if the user enters some wrong values in the default rows and after he clicks Delete button, all the field values are erased. Is there a way to delete only that particular row? (Please note: the values are not saved to the DB, unless the Add Row button is clicked)
    Please let me know how to resolve these 2 issues.
    Thanks.

    So let me get this straight:
    You enter information into a tabular form and then click the add row and the data is being duplicated from the prior row or being inserted into the table ?
    Thank you,
    Tony Miller
    Webster, TX
    A lady came up to me on the street, pointed at my suede jacket and said "Do you know a cow was murdered to make that jacket?"
    "I didn't know there were any witnesses", I replied " Now I'll have to kill you too"

  • Creating Detail record in Master Detail form

    I have created a Master Detail form with the Detail form being on a second page.
    I have no problem editing an existing detail record. However, if I attempt to create a new Detail record (insert). I get an error. It appears that the value of the field that I am linking the Master and Detail records with, does not get passed to the second (detail) form when I press the 'Create' button and I have not been able to ascertain where I may need to modify the parameters of the page.
    Any guidance would be appreciated.

    Hi Judy,
    It's been 5-6 months since I've created a Master/Detail APEX application, but I don't remember having to create any special trigger or anything. I created a few maintenance appls over tables I created, and created an inquiry appl using Oracle vendor tables. All of them have worked nicely.
    If the PK/FK's are set up correctly it just works. :-) Like magic. If I recall correctly, as you create the appl you define the the key fields to use. If the tables are defined correctly, and you 'tie' them together using the correct key fields in the application everything should work nicely.
    Tony

  • I dont want to commit master-detail form untill user press save button

    We have department-employee kind of master detail form.
    1) We click on any record on department block.
    2) Then we change / insert /delete record in employee block.
    3) then we move to anothe department.
    4) now it ask for saving the changes. THIS WE DO NOT WANT.
    5) WE WANT TO SAVE CHANGES WHEN USER CLICK ON SAVE BUTTON.
    6) If user make changes to various employees of various department,
    we want user to cancel changes when ever user wants.
    IN SHORT WHAT WE WANT IS
    No record should be saved untill user press save button below.
    and If user press cancel all changes made must be undo.
    PLEASE DO NOT SUGGEST DO_COMMIT in clear block details,
    We know that and we dont want that option.
    Regards
    Upendra

    Hi URTRIVEDI
    but it gives "could not reserve record (x tries), keep trying?" error.The problem is not within the code given by Francois but in sessions u opened.
    pls make sure u r not running more than one instance of ur form with in one session.
    e.g. FireFox is opening more than one tab at a time every modification u made > compile > Generate , Save & Run only one Form instance
    Hope this helps...
    Regards,
    Amatu Allah

  • Old items are not populated after adding items into a master/detail form

    Hi,
    I am relatively new to APEX. I am creating a master/detail form. It works well. When I add new items the older items are no more populated. Why ?
    For example I have an itme which is a select list as a Named LOV. At creation of the row I want the user to choose from this select list. It works well.
    But when modifying the record, I don't want the user to change this name. For that purpose, I create an item which is a display only item. This item is conditional and appear only when the record has been created.
    And this is where the problem comes. It seems to work but, if I logout of the application and login, then values are no more populated to the items and I get an error when trying to update the form.
    I hope I make it clear. I have been trying a lot of times and found that if I add items, then everything goes wrong.
    Thank you for your kind help.
    Christian

    Hi Christian,
    You don't say what the error is that you are getting - this may help us with your problem!
    On the form, do you now have TWO fields - one being the original select list and the other being a read-only version of it? Is it likely that BOTH fields could appear on the page at the same time AND that both are connected to the field on the table?
    You can set the select list to be read-only conditionally - in this case you could make it read-only on the condition of the primary key field not being null.
    Andy

  • Cannot delete record in master detail form in apex 4.0.1

    Dear all,
    I've created a master detail form in apex 4.0.1. Inserting and updating records is working. But when i want to delete a detail or master record, nothing is happening. The delete button is just not working.
    Can someone please tell me if this is a bug, and if so, is there a work around to solve this problem?
    Thanks,
    Diana

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

  • Query  button in Master/Detail form

    Hello All,
    I created a Master / detail form...looks good for a blind query and for a specific column value...
    The problem is When the user selects query button ,how do I show records that the logged in user has created.
    Am already storing username in the table when the user inserts new record.
    Appreciate if you could send code ..if that's the choice to fix my issue..
    Thanks in advance
    Babu

    Hi,
    Write the following code in 'Query' event of the 'Query' button in your form ..
    p_session.set_shadow_value(p_block_name => 'DEFAULT',
    p_attribute_name => 'A_USER_ID',
    p_value => portal30.wwctx_api.get_user,
    p_language => PORTAL30.wwctx_api.get_nls_language);
    doQuery;
    Replace 'A_USER_ID' with name of your user id field . I hope you have selected this field in your form and if not select this field & hide it in the form to make this code to work.
    -Krishnamurthy

  • Previous&Next button not appearing in Master/Detail form

    Hi,
    I have a master/detail form.I published it as a portlet .
    When I run it as a portlet or in a page..I am NOT seeing PREVIOUS and NEXT button
    I see the two buttons in edit mode for both Master & Detail Block.
    Even I changed the number of detail rows to display from 5 to 10..still don't
    see the buttons.
    Any help is greatly appreciated
    Thanks
    Babu

    Hi Shiladitya ,
    What you said is correct.I am displaying just 5 Detail Rows.I entered 5 rows...after
    that I changed the to changed to display only 2 rows.Now I see Previous and Next button after I queried.
    If the user wants to enter more 5 lines for the same Master record...you know how do I that ?
    Is there anyway to get more lines. ?
    Thanks in Advance
    Babu

  • Can't add new detail record in Master Detail form

    Hi ,
    I've created a simple database application from scratch by initially selecting a Master Detail page. This generated a report page (for the parent ) and a form page (for the child ). On using the form to add a new child record the following error was generated:
    Error in mru internal routine: ORA-20001: Error in MRU: row= 1, ORA-01400: cannot insert NULL into ("STUDENT1"."DELEGATE"."DELEGATE_ID"), insert into "STUDENT1"."DELEGATE" ( "DELEGATE_ID", "CLIENT_ID", "SURNAME", "INITIALS", "SEX", "SPECIAL_NEEDS") values ( :b1, :b2, :b3, :b4, :b5, :b6)
    Error Unable to process update.
    The 'child' field listed in the error message is automatically hidden on the form and I had presumed that on generating this form using the wizard that I would have had an opportunity to link the delegate_id field to a trigger or a sequence as seems to happen when creating a database application scratch using other page types. I'm new to Apex so I'd be grateful if anyone could let me know as to why this default behaviour occurs,
    regards,
    Kevin.

    I tried it for Apex 4.0.2 (my version) and 4.1 (on apex.oracle.com) and I am asked for master and detail PK generation in both versions.
    What are your steps exactly in the wizard? Like this?
    Create page -> Form -> Master Detail Form
    Now you see a whole list of sub steps including "Primary Key Source".
    Oh I see "Create Application wizard." in your post. Start with an empty application (blank page) and use the Create Page wizard instead. Maybe that's the difference.
    Edited by: InoL on Nov 18, 2011 9:27 AM

  • Unable to View records in a master-detail form

    In a master-detail form, I am not able to view records of the master/detail table
    by accepting the values of the PK of the header table items.
    Please tell me the exact steps, so that I can view the detail table records based on the header table PK items.
    Thanks.

    Yes I wrote the LOV code in a different procedure. Now, the view is showing correctly. But I am now trying to update the viewed records.
    The steps I am following in View Option is as below:
    go_block('header');
    clear_block(no_validate);
    execute_query;
    proc_lov;
    go_block('item');
    execute_query;
    I am unable to commit the changes made in the blocks
    The reason it is showing is : UNABLE TO update.....I saw the display_error.
    The system is trying to update the PK part also..Why....Though PK party is clearly defined in the table as well as property palette. Pl. explain how to go about it. Uregent help is required once again.

  • Portal Master-detail form how to auto assign detail record sequence number

    Portal Master-detail form how to auto assign detail record sequence number.Please help me?

    You can just read the following section
    Can I specify a sequence number generator as the default value for a form column?
    Yes. Enter the following in the "default value" field for the column:
    #<schema name>.<sequence name>.nextval
    where <schema name> is the name of the schema containing the sequence, and <sequence name> is the name of the sequence. The entry is preceded by a "#".
    For example, if the schema name is "SCOTT", and the sequence name is "CUSTOMER_SEQ", the default value entry is:
    #SCOTT.CUSTOMER_SEQ.NEXTVAL
    same way you can do for master - detail form.
    for more information on forms please refer the following URL.
    http://otn.oracle.com/products/iportal/htdocs/portal_faq.htm#BuildingApplications
    hope it helps.

Maybe you are looking for

  • How to create a site template with subsites on SharePoint Online (2013, wave 15)

    I need to create a site template of a site that contains 4 subsites. I have tried saving the parent site as a "site template", but when i create a new site based on this template, I don't get any of the subsites created. Anyone knows why the subsites

  • Displaying a subset of records is limiting the information I can show

    Hello All, I'm developing my photo gallery's TOC page and when I began, I had lots of data I wanted to display and through the use of lookup tables and the proper logic in my SELECT query, I could show a vertical list of galleries that matched a spec

  • Please help me with my new apple tv 2 audio skipping constantly

    Hey I set up my new apple tv 2 today i work in a retail store selling all this stuff but I can't figure this out. Apple tv hdmi connects to my Yamaha amp B&W speakers and Sony Bravia tv. It mirrors fine ( but isn't full screen on tv) and iPad and iPh

  • Status Adapter Engine

    Hello Guys! I'm having the following error in the RWB, > Component monitoring > Adapter Engine ..> Result of self-test Internal error: system status for cluster nodes 477459051 not available can you send me help about this Error? Thanks in advance. N

  • Issuing certificates for user and clients from different forest/domain

    Hello, at first I would like to say that I have made some researches on this forum and in the Internet overall. I have AD Forest with ~10 sites all over the Europe, DFL and FFL is 2008 R2, right now we are migrating site by site from old domain (samb