Killing, Frm-40654 Record has been upd...Re-query to see change

believe me guys, this is my 3rd night scratching my head to find the solution for this error.
i saw some post, infact many posts, realize that its an age-old problem faced by many developers.
i have a master-detail Purchase_Order form, where there are 3 blocks;
1) purchase_order_header 2) purchase_order_details and 3) ctrl
CREATE TABLE purchase_ORDER_header
(POH_comp_CODE VARCHAR2(3) NOT NULL,
POH_CODE VARCHAR2(6) NOT NULL,
POH_DATE  DATE NOT NULL,
POH_no number not null,
POH_quot_REF_code varchar2(6),
POH_QUOT_ref_NO NUMBER,
POH_PARTY_CODE VARCHAR2(6) NOT NULL,
POH_GROSS_fc_amount     NUMBER(13,3),
POH_GROSS_lc_amount     NUMBER(13,3),
POH_COMM_PERC        NUMBER(6,3),
POH_COMM_fc_AMounT      NUMBER(13,3),
POH_COMM_lc_AMounT      NUMBER(13,3),
POH_NET_fc_amount       NUMBER(13,3),
POH_NET_lc_amount       NUMBER(13,3),
POH_FREIGHT_fc_amount NUMBER(13,3),
POH_FREIGHT_lc_amount NUMBER(13,3),
POH_CLEARING_fc_amount NUMBER(13,3),
POH_CLEARING_lc_amount NUMBER(13,3),
POH_SHIp_from varchar2(200),
POH_sHIP_to varchar2(200),
POH_tpt_MODE VARCHAR2(15),
POH_EXPECTED_date date,
POh_FX_rate       number(12,8),
POH_REMARKS              VARCHAR2(200),
POH_CR_UID               VARCHAR2(12),
POH_CR_DT                DATE,
POH_UPD_UID              VARCHAR2(12),
POH_UPD_DT               DATE,
conStraint POH_PK PRIMARY KEY (POH_COMP_CODE,POH_code,POH_NO));
NON-db item used at purchase_order_header block level;
poh_party_name,m_cntry_name, m_prev_tot_amt_scy, m_prev_tot_amt_lcy, m_curr_code_scy, m_curr_code_scy_disp,
CREATE TABLE purchase_ORDER_DETAIL
(POD_COMP_CODE    VARCHAR2(3) NOT NULL,
POD_DATE          DATE not null,
POD_POH_CODE      VARCHAR2(6) NOT NULL,
POD_POH_NO        NUMBER(10) NOT NULL,
POD_prod_CODE     VARCHAR2(6) not null references product_MAstER(prod_CODE),
POD_uom           varchar2(6),
POD_CURR_CODE     VARCHAR2(3),
POD_QTY           NUMBER(10) not null,
POD_RATE          NUMBER(9,3) not null,
POD_LC_AMOUNT        NUMBER(13,3),
POD_FC_amount        NUMBER(13,3),
POD_REMARKS       VARCHAR2(200),
POD_CR_UID        VARCHAR2(12),
POD_CR_DT         DATE,
POD_UPD_UID       VARCHAR2(12),
POD_UPD_DT        DATE,
CONSTRAINT POD_fk FOREIGN KEY (POD_COMP_CODE,POD_POH_CODE, POD_POH_no) REFERENCES
PURCHASE_ORDER_headER(POH_COMP_CODE,POH_code,POH_NO) ON DELETE CASCADE);
NON-db item used at purchase_order_detail block level;
pod_prod_name
*ctrl*
m_old_vah_no
m_user_id
m_comp_code
m_cursor_hint_rec
m_txn_title
m_cr_uid_disp
m_cr_dt_disp
m_curr_code_bcy
m_brok_cntry_code
though multi-user form, but right now ii am the only single user using.
i was just testing this form by querying records and repeatedly changing values inside form and saving,
just to confirm the validation are being performed as expected.
how form is behaving, on some records, it is allowing me changing values over-n-over without the error(above),
but on some records it allows editing, but if i repeat changing values, the error is flashed.
based on the discussion i tried & change my form at various places as suggested. such as,
setting DML Returning values=Yes
trigger at form-level
*WNFI*
:M_cr_DT_disp := SYSDATE;
:poH_date := SYSDATE;
:POH_tpt_MODE := 'Road';
SET_ITEM_PROPERTY('POH_NO',ENABLED,PROPERTY_FALSE);
*WNRI*
:M_CR_DT_DISP  := SYSDATE;
*KEY-COMMIT*
SET_APPLICATION_PROPERTY(CURSOR_STYLE,'BUSY');
COMMIT_FORM;
POST_COMMIT_ACTION;
SET_APPLICATION_PROPERTY(CURSOR_STYLE,'DEFAULT');
CHECK_PacKaGe_FAILURE ;
GO_BLOCK('PURCHASE_ORDER_HEADER');
*PRE-COMMIT*
BEGIN
   :M_OLD_VAH_NO := :poh_NO ;
END;
*PRE-FORM*
:M_COMP_CODE := :GLOBAL.M_COMP_CODE;
:M_COMP_NAME := :GLOBAL.M_COMP_NAME;
:M_USER_UID  := :GLOBAL.M_USER_UID;
:poH_CODE                  := :GLOBAL.POh_CODE;
:poH_COMP_CODE    := :GLOBAL.M_COMP_CODE;
:M_TXN_TITLE                 := :GLOBAL.M_TXN_TITLE;
SET_WINDOW_PROPERTY(FORMS_MDI_WINDOW,TITLE,:GLOBAL.M_WINDOW_TI
TLE);
SET_WINDOW_PROPERTY(FORMS_MDI_WINDOW,WINDOW_STATE,MAXIMIZE);
:GLOBAL.M_LANG_CODE := 'ENG';
*ON-CLEAR-DETAILS* <SYSTEM GENERATED)
*KEY-EXIT*
CLEAR_BLOCK(NO_VALIDATE);
CLEAR_FORM(NO_VALIDATE);
EXIT_FORM(NO_VALIDATE);
my header-block-level triggers, pre-updates
:POH_UPD_UID := :M_USER_UID;
:POH_UPD_DT := SYSDATE;
pre-insert
headerblock
:POH_CR_UID := :M_USER_UID;
:POH_CR_DT := SYSDATE;
P_GEN_DOC_NO(:poH_NO,:poH_CODE,'001');
CHK_UNIQUE_DOC_NO;
pre-delete
system generated
pre-record
:M_CR_DT_DISP  := :POH_CR_DT ;
:M_CR_UID_DISP := :POH_CR_UID;
:M_TXN_TITLE := 'P U R C H A S E';
key-entqry
CLEAR_RECORD;
CLEAR_BLOCK(NO_VALIDATE);
CLEAR_BLOCK(NO_VALIDATE);
ENTER_QUERY;
post-query
DECLARE
     CURSOR C_SUPL_CODE IS SELECT      SUPL_NAME, SUPL_cntry_CODE
                           FROM        SUPPLIER_MASTER
                           WHERE       SUPL_CODE = :POH_PARTY_CODE;
     CURSOR C_BRok_CURR Is SELECT CNTRY_NAME, CNTRY_CURR_CODE
                              from   INVS_country
                              where  CNTRY_code = :m_BROK_CNTRY_code;
     M_DUMMY VARCHAR2(1);
BEGIN
          OPEN  C_SUPL_CODE;
          FETCH C_SUPL_CODE INTO :POH_PARTY_NAME,:M_brok_CNTRY_code;
          IF    C_SUPL_CODE%NOTFOUND THEN
                      MESSAGE('PCPlease create the Supplier of this code!');
                      MESSAGE(' ');
                      RAISE FORM_TRIGGER_FAILURE;
          END IF;
          CLOSE C_SUPL_CODE;
          OPEN  C_brok_Curr;
          FETCH C_brok_Curr INTO :M_CNTRY_NAME, :M_CURR_CODE_SCY;
          CLOSE C_BROK_curr;
          :M_CURR_CODE_SCY := '('||:M_CURR_CODE_SCY||')';
          :M_CURR_CODE_SCY_DISP := :M_CURR_CODE_SCY;
END;
on-populate-details
<system generated on creating Relationship header-detail>
trigger at detail block-level
pre-update
:pod_UPD_UID := :M_USER_UID;
:POD_UPD_DT := SYSDATE;
pre-insert
:POD_CR_UID          := :M_USER_UID;
:POD_CR_DT           := SYSDATE;
:POD_DATE            := :POH_DATE;
:POD_curr_code := SUBSTR(:M_curr_CODE_SCY,2,3);
pre-record
:M_PREV_TOT_AMT_SCY := NVL(:POH_GROSS_fc_AMOUNT,0) -
                       NVL(:POD_fc_AMOUNT,0);
:M_PREV_TOT_AMT_LCY := NVL(:poH_GROSS_LC_AMOUNT,0) -
                       NVL(:poD_lc_AMOUNT,0);
when-remove-record
:poH_GROSS_fc_AMOUNT := NVL(:poH_GROSS_fc_AMOUNT,0) -
NVL(:POD_fC_AMOUNT,0);
:poH_GROSS_Lc_AMOUNT := NVL(:poH_GROSS_Lc_AMOUNT,0) -
NVL(:POD_LC_AMOUNT,0);
:POH_COMM_fc_Amount      :=     NVL(:poH_GROSS_fc_AMOUNT,0)* NVL(:poH_COMM_PERC,0)/100;
:POH_COMM_LC_Amount      :=     NVL(:poH_GROSS_Lc_AMOUNT,0)* NVL(:poH_COMM_PERC,0)/100;
:PoH_NET_FC_AMOUNT   :=      NVL(:poH_GROSS_fc_AMOUNT,0)    -
NVL(:poH_COMM_fc_AMOUNT,0)     +
NVL(:POH_freight_FC_amount,0)  +
NVL(:POH_CLEARING_fc_amount,0) ;
:POH_NET_lc_AMOUNT   :=      NVL(:poH_GROSS_Lc_AMOUNT,0)    -
NVL(:poH_COMM_LC_AMOUNT,0)         +
nvl(:POH_freight_lC_amount,0)  +
nvl(:POH_CLEARING_lc_amount,0) ;
post-query
DECLARE
     CURSOR C_PROD IS SELECT prod_NAME
                      FROM   PRODUCT_MASTER
                   WHERE  PROD_CODE = :poD_PROD_CODE;
BEGIN
               OPEN  C_PROD;
               FETCH C_PROD INTO :pod_PROD_name;
               IF    C_PROD%NOTFOUND THEN
                              MESSAGE('DPROD does not exists!');
                              MESSAGE(' ');
                              RAISE FORM_TRIGGER_FAILURE;
               END IF;
               CLOSE C_PROD;
END;
i have button-pallette for horizantal canvas used for iconic button for,
m_comp_name  (display_item)
previous_record,next_record,go_top,go_bottom,query,save,exit,d
elete_record,create_record,copy_record,
clear & print. all are iconic button with just 1 trigger
when-button-pressed
SET_ITEM_PROPERTY('CTRL.M_CURSOR_HINT_REC',DISPLAYED,PROPERTY_
FALSE);
   :M_CURSOR_HINT_REC := '';
   do_key('...
PROGRAM UNITS PROCEDURES
PROCEDURE CHK_UNIQUE_DOC_NO IS
CURSOR C_poH IS
       SELECT 'X'
       FROM  purchase_ORDER_HEADer
       WHERE POH_COMP_CODE = :POH_COMP_CODE
       AND   POH_CODE  = :POH_CODE
       AND   POH_NO    = :POH_NO;
DUMMY VARCHAR2(1);
BEGIN
   IF :PURCHAsE_order_HEADer.ROWID IS NULL THEN
      OPEN  C_poH;
      FETCH C_poH INTO DUMMY;
      IF C_poH%FOUND THEN
         MESSAGE('TXN NO. ALREADY EXISTS IN PAY_VCH_TXN_HEAD TABLE');
         MESSAGE(' ');
         CLOSE C_poH;
         RAISE FORM_TRIGGER_FAILURE;
      END IF;
      CLOSE C_poH;
   END IF;
END;
PROCEDURE POST_COMMIT_ACTION IS
M_MSG VARCHAR2(30);
BEGIN
   IF :poH_NO != :M_OLD_VAH_NO THEN
--      STD_ERROR_ROUTINE(105002, :GLOBAL.M_LANG_CODE, TO_CHAR(:VAH_NO));
        M_MSG := 'New Document is'||' '||TO_CHAR(:poH_NO);
        MESSAGE(M_MSG);
   END IF;
END;
PROCEDURE P_GEN_DOC_NO
          (P_DOC_NO        IN OUT  NUMBER,
           P_TXN_CODE      IN      VARCHAR2,
           P_COMP_CODE     IN      VARCHAR2) IS
M_CURR_NO     PM_TXN_DOC_RANGE.TXND_CURR_NO%TYPE ;
M_TO_NO       PM_TXN_DOC_RANGE.TXND_TO_NO%TYPE ;
M_ROWID       VARCHAR2(20) ;
CURSOR C1 IS
       SELECT NVL(TXND_CURR_NO, 0) + 1, NVL(TXND_TO_NO, 0), ROWID
       FROM   PM_TXN_DOC_RANGE
       WHERE  TXND_COMP_CODE = P_COMP_CODE
       AND    TXND_TXN_CODE  = P_TXN_CODE
       FOR    UPDATE OF TXND_CURR_NO ;
BEGIN
      OPEN C1;
      FETCH C1 INTO M_CURR_NO, M_TO_NO, M_ROWID ;
      IF C1%NOTFOUND THEN
         CLOSE C1;
         MESSAGE('TRANSACTION NO. NOT INITIALISED');
         MESSAGE(' ');
         RAISE FORM_TRIGGER_FAILURE;
      END IF ;
   IF M_CURR_NO > M_TO_NO THEN
      MESSAGE('CURRENT TXN NO. IS OVER THE LIMIT');
      MESSAGE(' ');   
      RAISE FORM_TRIGGER_FAILURE;
   END IF ;
   P_DOC_NO := M_CURR_NO ;
   UPDATE PM_TXN_DOC_RANGE
   SET    TXND_CURR_NO = P_DOC_NO
   WHERE  ROWID = M_ROWID ;
   CLOSE C1;
END;
PROCEDURE P_GEN_DUMMY_DOC_NO
          (P_DOC_NO        IN OUT  NUMBER,
           P_TXN_CODE      IN      VARCHAR2,
           P_COMP_CODE     IN      VARCHAR2) IS
M_CURR_NO     PM_TXN_DOC_RANGE.TXND_CURR_NO%TYPE ;
M_TO_NO       PM_TXN_DOC_RANGE.TXND_TO_NO%TYPE ;
CURSOR O_GET_DOC_NO IS
       SELECT NVL(TXND_CURR_NO, 0) + 1, NVL(TXND_TO_NO, 0)
       FROM   PM_TXN_DOC_RANGE
       WHERE  TXND_COMP_CODE = P_COMP_CODE
       AND    TXND_TXN_CODE  = P_TXN_CODE;
BEGIN
   OPEN O_GET_DOC_NO;
   FETCH O_GET_DOC_NO INTO M_CURR_NO, M_TO_NO ;
   IF O_GET_DOC_NO%NOTFOUND THEN
      MESSAGE('DUMMTRANSACTION NO. NOT INITIALISED');
      MESSAGE(' ');
      RAISE FORM_TRIGGER_FAILURE;
   END IF ;
   CLOSE O_GET_DOC_NO;
   IF M_CURR_NO > M_TO_NO THEN
      MESSAGE('DUMMCURRENT TXN NO. IS OVER THE LIMIT');
      MESSAGE(' ');   
      RAISE FORM_TRIGGER_FAILURE;
   END IF ;
   P_DOC_NO := M_CURR_NO ;
END;i request,please please please,,advice me something as it has taken very long.
i would welcome and be greatful ever if someone ask me to send the .fmb file and have look at it.

poelger wrote:
Make sure that the fields you use in your form don't have trailing spaces in the database.you mean my db table fields length is greater than the ones displayed on form?
for example my POD_RATE is NUMBER(9,3) and on form its Maximum length is 11,
so if i enter 2.5, will you say that my db field POD_RATE has trailing space?
i tried to change some form fields length to match with the db fields length.
but now the form has become wild, it is flashing this error on the screen many times on change and navigation
and even while exit form

Similar Messages

  • Form based on a view -  FRM-40654: Record has been updated by another user.

    Hi All,
    I am hoping that somebody can help me with this problem that is occurring only when I try an update a record in forms.
    I have a block based on a join-view, I can insert no problems, but I can only update certain records within the block. If I come across a second record that is similar to the first except for primary key and a couple of other values and try and update that record forms gives me the following message FRM-40654: Record has been updated by another user. Re-query to see change.
    The first record I have no problems in updating and I have followed a number of suggestions to get this to work, like setting the key-mode of the block to updateable/non-updateable and setting the primary key to 'yes' for some of the database items. I have also created procedures within the database that are called by triggers on-insert, on-update etc.
    If anybody has any ideas how I can solve this I would be happy to hear your suggestions.
    Thanks in Advance.
    Regards,
    Scott.

    Scott,
    beside of
    1) In the block properties change the Key Mode property of the block to be Non-Updatable Primary Key
    2) Mark one or more columns as Primary Key in the item Property Palette - in this instance you would set the property for Empno.
    Enforce Primary Key = no
    Key Mode = Unique
    Update Changed Columns Only = Yes
    I found a bug entry that is supposed to be fixed in Patch 9 of Forms 6i (assuming you are running 6i). So if you could try with a more recent Patch set (e.g. 14) then probably the problem will go away.
    Fran

  • "FRM:40654 Record has been updated by another user" - Error in POST-QUERY

    Hi,
    I'm using Forms version 6.0.8.26.0
    In one of the forms, its data block is based on a view.
    In POST-QUERY trigger, I try to change the value for a database item. This operation results in following error:
    "FRM-40654: Record has been updated by another user. Re-query to see change."
    After this message the value of the item is automatically being set back to what was queried from the DB.
    I tried setting the DML Returning Value to 'Yes'. It doesn't help :(
    Any suggestions please?
    Thanks,
    Usha

    Hy
    try to set key-locking delayed
    and check
    if one field from the view as primary key
    or
    manually create On-Update, On-Insert, On-Delete and On-Lock triggers
    or
    write an INSTEAD OF TRIGGER

  • FRM-40654 Record has been updated by another user.Re-query to see change.

    Hi All:
    While Updating a record in form its updating fine at first time
    if i updating the record second time its not allowing me to update its showing following error
    FRM-40654 Record has been updated by another user.Re-query to see change.
    After Re-querying its allowing me to update the record .... so anyone can give a good idea to update the record without Re-query.
    i am using following versions
    Apps 11.5.10.2
    Forms 6i
    Database 10g

    @814950,
    Welcome to the Oracle Forums. Please take a few minutes to review the following:
    <ul>
    <li>Before posting on this forum please read
    <li>10 Commandments for the OTN Forums Member
    <li>Announcement: Forums Etiquette / Reward Points
    </ul>
    It is not good to use someone else's post to ask a new question; this is commonly refered to as "Post Hi-jacking." It is always best to create a new post and add a reference link to a similar post. Please create a new post for your question!
    Also,
    >
    BEFORE I NSERT OR U PDATE
    OF quantity, price_override
    ON po.po_line_locations_all
    >
    If I recall correctly from when I worked with the Oracle Enterprise Business Suite (EBS), the PO_LINE_LOCATIONS_ALL is an EBS ta ble. Oracle does not recommend you modify EBS tables directly. There are recommended methods for performing DML on EBS tables. I suggest you review the Oracle Applications Documentation library. Select your EBS version and then scroll to the Standards section and review the following documents:
    <ul>
    <li>Oracle Applications Developer's Guide
    <li>Oracle Applications User Interface Standards for Forms-Based Products
    <li>Oracle Application Framework Personalization Guide
    </ul>
    Again, please ask your question in a new post.
    Craig...
    Edited by: CraigB on Dec 1, 2010 9:29 AM

  • Error!!!!  Record has been updated by another user

    dear all
    Why i got this error when i put a value and try to write to a text item. i never change insert update etc in property pallete..
    this error appear.
    FRM-40654 Record has been updated by another user . requery to see change?
    give me advise and suggestion why i got this error..

    This message have several different causes. One cause is what wilfred indicated.
    But I've seen this message appear if there's something wrong with a primary key, and I've seen it occur when doing a post command using a master-detail block. In the latter case, you need to requiry the other tables in your form.
    In your case since you are using only one block, I'd look for a problem with your primary key.

  • FRM-40600: Record has already been inserted.

    I am using Form 9i.
    I have written a procedure to save master-detail form which is called when WHEN-BUTTTON-PRESSED trigger written in submit button..
    I have written this procedure because I am confident in writing procedure for save button. But it gives error - 'FRM-40600: Record has already been inserted.'.
    When I was using default (form) for saving record, I was getting lot of message (error). I was getting confused seeing this message. That's why I have written save button procedure. I don't know whether I am doing wrong or right.
    Before posting, I searched in forum also and found some post regarding this, but still I am unable to find the solution.
    Anyway, I am giving you code for save procedure -
    PROCEDURE save_workorder IS
    v_count          NUMBER;
    BEGIN
         SELECT COUNT(*) INTO v_count FROM workorder_master
                                       WHERE workorder_no = :workorder_master.workorder_no;
         IF v_count = 0 THEN
              GO_BLOCK('workorder_master');
              INSERT INTO workorder_master (
                                                                                    vender_code,
                                                                                    workorder_no,
                                                                                    auth_rep,
                                                                                    workplace,
                                                                                    work_desc,
                                                                                    from_dt,
                                                                                    to_dt,
                                                                                    tot_manpower,
                                                                                    gp_manpower,
                                                                                    lic_no,
                                                                                    lic_recpt_no,
                                                                                    lic_valid_upto,
                                                                                    eic_name,
                                                                                    status,
                                                                                    remarks,
                                                                                    entry_by,
                                                                                    entry_dt)
                                                                     VALUES(
                                                                                    :workorder_master.vender_code,
                                                                                    :workorder_master.workorder_no,
                                                                                    :workorder_master.auth_rep,
                                                                                    :workorder_master.workplace,
                                                                                    :workorder_master.work_desc,
                                                                                    :workorder_master.from_dt,
                                                                                    :workorder_master.to_dt,
                                                                                    :workorder_master.tot_manpower,
                                                                                    :workorder_master.gp_manpower,
                                                                                    :workorder_master.lic_no,
                                                                                    :workorder_master.lic_recpt_no,
                                                                                    :workorder_master.lic_valid_upto,
                                                                                    :workorder_master.eic_name,
                                                                                    :workorder_master.status,
                                                                                    :workorder_master.remarks,
                                                                                    :workorder_master.entry_by,
                                                                                    :workorder_master.entry_dt);
              GO_BLOCK('workorder_dtls');
              FIRST_RECORD;
              LOOP
              EXIT WHEN :workorder_dtls.labour_code IS NULL;
              IF :workorder_dtls.pass_no IS NULL THEN
                   generate_pass_no;
                   IF :workorder_dtls.pass_no IS NOT NULL THEN
                             :workorder_dtls.status := 'I';
                             INSERT INTO workorder_dtls (
                                                                                         labour_code,
                                                                                    workorder_no,
                                                                                    pass_no,
                                                                                    status,
                                                                                    from_dt,
                                                                                    to_dt,
                                                                                    cancil_dt,
                                                                                    issue_dt,
                                                                                    return_dt,
                                                                                    entry_by,
                                                                                    entry_dt)
                                                                VALUES (:workorder_dtls.labour_code,
                                                                                    :workorder_dtls.workorder_no,
                                                                                    :workorder_dtls.pass_no,
                                                                                    :workorder_dtls.status,
                                                                                    :workorder_dtls.from_dt,
                                                                                    :workorder_dtls.to_dt,
                                                                                    :workorder_dtls.cancil_dt,
                                                                                    :workorder_dtls.issue_dt,
                                                                                    :workorder_dtls.return_dt,
                                                                                    :workorder_master.entry_by,
                                                                                    :workorder_master.entry_dt);
                   END IF;
                   ELSE --if pass no is not null then it is previous record.
                        UPDATE workorder_dtls SET status           = :workorder_dtls.status,
                                                                                    cancil_dt = :workorder_dtls.cancil_dt,
                                                                                    return_dt = :workorder_dtls.return_dt,
                                                                                    entry_by      = :workorder_dtls.entry_by,
                                                                                    entry_dt      = :workorder_dtls.entry_dt
                                            WHERE labour_code = :workorder_dtls.labour_code
                                            AND workorder_no = :workorder_dtls.workorder_no
                                            AND pass_no = :workorder_dtls.pass_no;
                   END IF;     
                   IF :workorder_dtls.status = 'I' THEN
                   UPDATE labour_master SET status = 'I'
                                       WHERE labour_code = :workorder_dtls.labour_code;
                   END IF;
                   IF :workorder_dtls.status = 'E' THEN
                        IF :workorder_dtls.return_dt IS NOT NULL THEN
                             UPDATE labour_master SET status = 'A'
                                                      WHERE labour_code = :workorder_dtls.labour_code;
                        ELSE
                             UPDATE labour_master SET status = 'H'
                                                      WHERE labour_code = :workorder_dtls.labour_code;
                        END IF;
                   END IF;
                   IF :workorder_dtls.status = 'B' THEN
                        IF :workorder_dtls.return_dt IS NOT NULL THEN
                             UPDATE labour_master SET status = 'A'
                                                      WHERE labour_code = :workorder_dtls.labour_code;
                        ELSE
                             UPDATE labour_master SET status = 'S'
                                                 WHERE labour_code = :workorder_dtls.labour_code;
                        END IF;
                   END IF;
                   NEXT_RECORD;
              END LOOP;
         ELSE --if workorder exist
              GO_BLOCK('workorder_master');
              UPDATE workorder_master SET     auth_rep               =     :workorder_master.auth_rep,
                                                                                    workplace               =     :workorder_master.workplace,
                                                                                    work_desc               =     :workorder_master.work_desc,
                                                                                    from_dt                    =     :workorder_master.from_dt,
                                                                                    to_dt                         =     :workorder_master.to_dt,
                                                                                    tot_manpower     =     :workorder_master.tot_manpower,
                                                                                    gp_manpower          =     :workorder_master.gp_manpower,
                                                                                    lic_no                    =     :workorder_master.lic_no,
                                                                                    lic_recpt_no     =     :workorder_master.lic_recpt_no,
                                                                                    lic_valid_upto=     :workorder_master.lic_valid_upto,
                                                                                    eic_name               =     :workorder_master.eic_name,
                                                                                    status                    =     :workorder_master.status,
                                                                                    remarks                    =     :workorder_master.remarks,
                                                                                    entry_by               =     :workorder_master.entry_by,
                                                                                    entry_dt               =     :workorder_master.entry_dt
                                            WHERE vender_code = :workorder_master.vender_code
                                            AND workorder_no = :workorder_master.workorder_no;
              GO_BLOCK('workorder_dtls');
              FIRST_RECORD;
              LOOP
              EXIT WHEN :workorder_dtls.labour_code IS NULL;
              IF :workorder_dtls.pass_no IS NULL THEN
                   generate_pass_no;
                   IF :workorder_dtls.pass_no IS NOT NULL THEN
                             :workorder_dtls.status := 'I';
                             INSERT INTO workorder_dtls (
                                                                                         labour_code,
                                                                                    workorder_no,
                                                                                    pass_no,
                                                                                    status,
                                                                                    from_dt,
                                                                                    to_dt,
                                                                                    cancil_dt,
                                                                                    issue_dt,
                                                                                    return_dt,
                                                                                    entry_by,
                                                                                    entry_dt)
                                                                VALUES (:workorder_dtls.labour_code,
                                                                                    :workorder_dtls.workorder_no,
                                                                                    :workorder_dtls.pass_no,
                                                                                    :workorder_dtls.status,
                                                                                    :workorder_dtls.from_dt,
                                                                                    :workorder_dtls.to_dt,
                                                                                    :workorder_dtls.cancil_dt,
                                                                                    :workorder_dtls.issue_dt,
                                                                                    :workorder_dtls.return_dt,
                                                                                    :workorder_master.entry_by,
                                                                                    :workorder_master.entry_dt);
                   END IF;
                   ELSE --if pass no is not null then it is previous record.
                        UPDATE workorder_dtls SET status           = :workorder_dtls.status,
                                                                                         cancil_dt = :workorder_dtls.cancil_dt,
                                                                                         return_dt = :workorder_dtls.return_dt,
                                                                                         entry_by      = :workorder_dtls.entry_by,
                                                                                         entry_dt      = :workorder_dtls.entry_dt
                                            WHERE labour_code = :workorder_dtls.labour_code
                                            AND workorder_no = :workorder_dtls.workorder_no
                                            AND pass_no = :workorder_dtls.pass_no;
                   END IF;     
                   IF :workorder_dtls.status = 'I' THEN
                   UPDATE labour_master SET status = 'I'
                                       WHERE labour_code = :workorder_dtls.labour_code;
                   END IF;
                   IF :workorder_dtls.status = 'E' THEN
                        IF :workorder_dtls.return_dt IS NOT NULL THEN
                             UPDATE labour_master SET status = 'A'
                                                      WHERE labour_code = :workorder_dtls.labour_code;
                        ELSE
                             UPDATE labour_master SET status = 'H'
                                                      WHERE labour_code = :workorder_dtls.labour_code;
                        END IF;
                   END IF;
                   IF :workorder_dtls.status = 'B' THEN
                        IF :workorder_dtls.return_dt IS NOT NULL THEN
                             UPDATE labour_master SET status = 'A'
                                                      WHERE labour_code = :workorder_dtls.labour_code;
                        ELSE
                             UPDATE labour_master SET status = 'S'
                                                 WHERE labour_code = :workorder_dtls.labour_code;
                        END IF;
                   END IF;
                   NEXT_RECORD;
              END LOOP;
         END IF;
         COMMIT;
    END;
    Thanks and regards,
    Vikas

    Yes Sir, why not.
    This procedure is written in KEY-NEXT-ITEM of workorder_no, the only trigger in workorder_no. Block level-trigger is also there. like ON-POPULATE-DETAILS, ON-CHECK-DELETE-MASTER.
    Thanks and regards,
    Vikas
    [HTML]
    DECLARE
         V_VENDER_CODE NUMBER;
         REL_ID RELATION;
    BEGIN
    BEGIN     
    SELECT VENDER_CODE INTO V_VENDER_CODE FROM WORKORDER_MASTER WHERE WORKORDER_NO = :WORKORDER_MASTER.WORKORDER_NO ;
                   :BLK_TEMP_WORKORDER.WORKORDER_NO := :WORKORDER_MASTER.WORKORDER_NO;
                   :BLK_TEMP_WORKORDER.VENDER_CODE := V_VENDER_CODE;
         IF ( (:WORKORDER_MASTER.WORKORDER_NO is not null) ) THEN  
             rel_id := Find_Relation('WORKORDER_MASTER.WORKORDER_MASTE_WORKORDER_DTLS');  
             Query_Master_Details(rel_id, 'WORKORDER_DTLS');
          SET_ITEM_PROPERTY('BLK_TEMP_WORKORDER.CB_ALL' , ENABLED , PROPERTY_TRUE);
         END IF;
                   GO_BLOCK('WORKORDER_MASTER');
                   EXECUTE_QUERY(NO_VALIDATE);
                   GO_BLOCK('WORKORDER_MASTER_IMG');
                   EXECUTE_QUERY(NO_VALIDATE);
                   :WORKORDER_MASTER.VENDER_CODE := :BLK_TEMP_WORKORDER.VENDER_CODE;
                   :WORKORDER_MASTER.WORKORDER_NO := :BLK_TEMP_WORKORDER.WORKORDER_NO ;
           GO_ITEM('WORKORDER_MASTER.AUTH_REP');
    EXCEPTION
         WHEN NO_DATA_FOUND THEN
         MESSAGE('NO VENDER HAVING WORKORDER NO. '||:WORKORDER_MASTER.WORKORDER_NO ||' EXIST.');
         IF :WORKORDER_MASTER.VENDER_CODE IS NULL THEN
              GO_ITEM('WORKORDER_MASTER.VENDER_CODE');
         ELSE
                :BLK_TEMP_WORKORDER.WORKORDER_NO := :WORKORDER_MASTER.WORKORDER_NO;
                   :BLK_TEMP_WORKORDER.VENDER_CODE := :WORKORDER_MASTER.VENDER_CODE;
                GO_BLOCK('WORKORDER_MASTER');
                   EXECUTE_QUERY(NO_VALIDATE);
                   GO_BLOCK('WORKORDER_MASTER_IMG');
                   EXECUTE_QUERY(NO_VALIDATE);
                   :WORKORDER_MASTER.VENDER_CODE := :BLK_TEMP_WORKORDER.VENDER_CODE;
                   :WORKORDER_MASTER.WORKORDER_NO := :BLK_TEMP_WORKORDER.WORKORDER_NO ;
          SELECT name INTO :workorder_master.auth_rep FROM contractor_master
                                        WHERE vender_code = :workorder_master.vender_code;
          GO_ITEM('WORKORDER_MASTER.AUTH_REP');
         END IF;
    END;
    END;[HTML]

  • How to get the exact time when condition records has been created?

    Hello All,
    Can anyone thorw some light on - how to find the exact time on which a particular condition record has been created?
    I have tried to get it from KONP {by inputting condition record number}, but unfortunately time is not tracked over there, but the date is tracked.
    Await your valuable inputs on the same.
    Regards,
    Hrishi

    Dear Hrishi,
    Try with this
    Go to display mode of the condition record through VK13 transaction from the condition record overview screen go to menu Environment >Changes>Click on Change report now system will take you to the Change Documents for conditions selection screen here you input proper selection data then execute now system will give the all the details here you can find the time also.
    I hope this will help you,
    Regards,
    Murali.

  • Gettig "Record has been modified" error while opening a window

    Hi,
    I have a window 'A' and window 'B'. On click of a button from 'A' window 'B' is opened. There are 3 fields in the window 'B' and these 3 fields are the part of the query which gets executed in window 'A'.
    Now on click of the button I am executing a proc which is setting window 'B' field values again.After this when you open the window 'B' it gives the error saying "Record has been modified". I tried giving commit_form after setting the fields but still it throws the error.
    Please advice on this.
    Thank you

    Deepak Jambhekar wrote:
    Hi,
    I have a window 'A' and window 'B'. On click of a button from 'A' window 'B' is opened. There are 3 fields in the window 'B' and these 3 fields are the part of the query which gets executed in window 'A'.
    Now on click of the button I am executing a proc which is setting window 'B' field values again.After this when you open the window 'B' it gives the error saying "Record has been modified". I tried giving commit_form after setting the fields but still it throws the error.
    Please advice on this.Just add
    EXECUTE_QUERY;after the commit_form;
    Hope this works..
    Hamid

  • Record has been changed by some other user

    Hi All,
    i am working on a network when i make some update in my database through a form on first updation it works fine, while on second updation it gives me an error 'Record has been changed by some other user' wile no other user is currently working on the same form.
    Plz tell me what i can do.
    Wating 4 your reply.
    Thanks in Advance.

    You probably have a database trigger which changes the value of a column which is also part of your form.
    The solution depends on the version of Oracle forms and the database that you are using.
    Oracle forms 6 introduced a DML returning value (block level) which you can set to Yes so that the value(s) changed by the server will automatically be updated within the form. However, you must be running against an Oracle8 (or later) database for this to work.

  • "Movie recording has been stopped automatically"

    Recently, using my 60D in very cold Wisconsin weather, I've had the message "movie recording has been stopped automatically."  I've used my 60D in all kinds of temps but recently in Wisconsin the overnight temps are getting into the the minus single digits so when I go out to shoot homes in the early am it is cold.  I am using a SanDisk Ultra 16G 30mb/s 10.  It seems that once the camera "warms" up a bit, it shoots fine and I don't get the message.  This happens when I come in from the cold outdoors and begin shooting inside.  I've had no issues with the pictures, just the video portion.  Any ideas? Condensation perhaps?

    60D operating temperatures according to two WEB sources is 32F to 104F.  I suggest a camera overcoat or some way to keep the camera in that temperature bracket when shooting.  I hope the cold temps break for you soon.  
    John  

  • Record Has Been Deleted. Your Request Cannot Be Processed

    Hi All,
    Using Order Organizer Form - i split the line, the line get split successfully but after split has done the following error message/note come up;
    "Record Has Been Deleted. Your Request Cannot Be Processed".
    How to avoid this, please give me suggestions.
    Regards,
    JAK

    Hi
    I think you are using 11.5.10 ver
    Using Quick Order Entry Form - Enter a Sales Order Line with an item that has related items. Save the line and then delete it. An error is displayed and the line remains in the form. However, the line has been removed from database and if we query again for the line it doesn't already exists.
    In fact this is a Bug 4057501
    please execute the following Patch
    Patch No. 4444195.
    Thanks
    Raj
    Hyderabad

  • Error Record has been deleted. Your request cannot be processed

    Hi Team,
    We are planning to integrate apps scema with our separate schema by calling oe_order_pub.process_order API,
    While calling this API we are getting error like creation process :"Record has been deleted. Your request cannot be processed."
    As pe my observation i found below vaariable causes the issue.
    l_line_tbl (i).operation := OE_GLOBALS.G_OPR_CREATE;
    Please help.

    I have passed the Lock control = 1 at the header level. Still getting the same error.
    Record has been deleted. Your request cannot be processed.
    --Prasanth                                                                                                                                                                                                                                                                                                                                                   

  • 70d - movie recording has been stopped automatically

    I just purchased a new Canon 70D...once I start recording, it records for a few seconds...small boxes appear on the upper right side of the display screen and then it shuts down and says "Movie recording has been stopped automatically"...is this due to a setting or something? I have been using a 7D for a number of years and this is a new issue for me...

    Hi, LmharrisonTX!
    You may want to check the type of memory card you're using for this.  HD movie recording requires a fast memory card, and if yours can't keep up, it will be overwhelmed within a few seconds, causing the camera to halt recording.  We recommend using at least a "Class 10" memory card.
    Please let us know what you are using.  If the card is indeed at least Class 10 and you're still having problems, we can at least eliminate that as a possibility and we can examine other factors.
    We look forward to hearing from you!

  • "record has been saved" without insert

    I don't know what I'm missing...
    Custom 6i Form with several tabs and generally one block/table each. All the blocks are Delete Allowed = No. I can edit records but not insert via the form. However, I do get "record has been saved" message. I can insert via Toad with same db user.
    Thank you.
    Doug

    I query all (4) records....(etc.)Now why didn't you give that info at the beginning?
    (Thanks Marilyn and DH for jumping in)
    Then the form SHOULD be inserting the row.
    Is System.Message_Level being set to a value other than zero?
    Do you have an on-insert trigger on the block that prevents inserting?
    Do you have an on-error trigger either at block or form-level that overrides any error messages?
    Is the form querying rows based on some key values set in the background, and the inserted records are not being set to the same key values?

  • The record has been changed....on default form

    Hi,
    I'm facing a strange problem....
    Trying to alter the prompt in the menu default form, for one and only one record, the message "The record has been changed.Re-query to see the changes." appears...!!!
    I have seen this message on custom forms.... but on default form which also insists even when i close the form and re-open it..., first time....
    What do you suggest me to do...???
    Note: I use eBS 11.5.10.2 and DB10g v.2
    Thank you,
    Sim

    Hi sgalaxy,
    It looks the system is detecting something different between the record shown in the form and the record stored in the DB table, and that's why it's showing the error message. Typically the issue is caused by date columns that are truncated in the form or by trailing spaces in text columns. You will need to compare columns in form and DB table until you find the problematic column and update it manually (truncating date or removing trailing spaces in DB)
    Hope it helps.

Maybe you are looking for

  • *** Pages won't open after system re-install

    I had to re-install OS X since it was acting funny and after doing a full time machine back up, I can't open Pages or Numbers from iWork '09 anymore. They launch and then immediately crash. I purchased the SN online and don't see where I go to get th

  • Save Doesn't Work in Dw CS3

    All of a sudden Save no longer works in Dreamweaver CS3 on an XT(2) PC. At first I tried Control-S and thought that something was grabbing the control character - but it doesn't even work from the drop down Menu File/Save. What is weird is the Save A

  • Downloaded iOS 6 and now the App Store is running slow

    Ever since downloading iOS6 the App Store is running really slow. Especially on passbook.

  • Ipod wont hold as much after itunes update.

    My Ipod touch 5th gen (32gb) had about 16gb of space remaining. Then once I updated itunes and have tried to sync all of the sudden it tells me that im 4gbs over yet its the same amount of data as i had before the update. If you know anything please

  • Mouse Acceleration settings lost on restart or shutdown

    Every time I restart (or shutdown -r via terminal) my powermac it loses it's mouse settings. Strange, because only the mouse speed setting is lost. The setting is set to max when I login after a restart (I never shut down, it's my database, web and f