Oracle Cloud offers a broad portfolio of software as a service applications, platform as a service, and social capabilities, all on a subscription basis. Oracle Cloud delivers instant value and productivity for end users, administrators, and developers alike through functionally rich, integrated, secure, enterprise cloud services.
 Get a Free Magzine ...Profit:The Executive's Guide to Oracle Applications

Subscribe to the OracleAppsHub to receive notifications when there are new posts:

 get RSS feed
 Oracle Fusion Applications (OFA) is a portfolio of next generation suite of software applications from Oracle Corporation. It is distributed across various product families; including financial management, human capital management, customer relationship management, supply chain management, procurement, governance, and project portfolio management
 Get a Free Magzine ...Profit:The Executive's Guide to Oracle Applications

The Base Cause of ” FRM-40654 “

Posted on February 14th, 2008 by Sanjit Anand ||Email This Post Email This Post

Have you tried OracleappsHub in ipad/iphone/smart Phone? Don't wait. try it today

Very common problem your end user normally reports “FRM-40654: Record has been updated by another user. Re-query to see change

Cause: Another user has updated this record since you performed a query and has changed at least one field in the record. Your actions have not changed the record in memory.

Action: You can update or delete this record now only if another user has restored the field values back to the way they were when you performed the query. Otherwise, you must re-query to fetch and display the new record into the form before you can update or delete it.

This is very common issue after migration or with any external interfaces, If you have taken care by TRIM function , then there is nothing to bother, else your end user will report this, which need a proper investigation.

arrow upThe reason and resolutions

This error is caused because of any of the following

  1. FRM-40654 Caused by unnecessary foreign key fields
  2. Trapping problem of some sort in Oracle Forms with triggers, execute_query
  3. Record locked ie Another user changed the record and saved after you queried the record
  4. Some of the columns have trailing spaces, and Forms by default truncates the trailing spaces and hence the database value and form value will not match and you get the error.
  5. Date field stored in database is with time stamp but form showing only Date component and hence Form value and database value will not match and hence you get the error. (you need to remove the time component in DB or show date time in Form)

Bottom line is the value in Database and value in form are not matching, so you have to check for each column and see where is the difference. I know this is going to be painful checking out every field for changes, but there is no other options left.

What you have to do is to investigate the column first and then make a update with TRIM function as

update <table name>
set <column name> = trim(<column name>);

arrow upResolutions Example

Example 1

User reported the problem at suppliers site,

  • Taking which table hold the supplier data.
  • Check a column value for a VARCHAR2 column. In this case VENDOR_SITE_CODE. or Address_line1
    SELECT ‘[‘||vendor_site_code||’]’
    FROM po_vendor_sites_all
    WHERE vendor_id=<VENDOR ID>;
  • If the column has trailing spaces the output will looks very similar to


  • Once you get the column , then use update script, with TRIM function, like
  • UPDATE po_vendor_sites
    SET vendor_site_code = TRIM(vendor_site_code)
    WHERE vendor_id = <VENDOR ID>;

Example 2 : Your bank statement Reconcile program ending up with error

In similar way you have to check like

1. select ‘[‘||trx_text||’]’ from ce_statement_lines_interface;
2. select ‘[‘||trx_text||’]’ from ce_statement_lines;

The above mentioned scripts need to be run against all varchar2 columns, not just trx_text, in either ce_statement_lines or ce_statement_lines_interface.

If trailing spaces are found, run the following scripts to correct them:

update ce_statement_lines_interface
set trx_text=trim(trx_text,’ ‘)

Change the column and table name to those with trailing spaces

Example 3:Invoice Through Auto invoice (External system)

Same way to find the column and apply by this kind of script
update ra_customer_trx_lines_all
where customer_trx_id = <customer trx id>;

arrow upWhat if , not have “trailing space” Problem

Confirm with DBA , is table is having any lock or not . If there is no lock then you need to ask Oracle support .

arrow up

Tips of Developing Conversion and Interface

Always use TRIM function in your insert portion of the program

arrow upFurther Reading on metalink

Related Posts

Posted in Technical | 3 Comments »Email This Post Email This Post |

Have you tried OracleappsHub in ipad/iphone/smart Phone? Don't wait. try it today
3 Responses
  1. amy chan Says:

    useful info

  2. peter nikhil tej Says:

    the post really rocking
    very good info
    and very helpful

  3. Shavkat Says:

    Thanks a million.
    Really helphfll.
    Usefull information and so well structured.

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.