Tuesday, 13 October 2009

FRM-40654 Record Has Been Updated. Requery Block To See Change

One of the root causes which can cause this issue is the trailing spaces in the columns.

my case this was po_vendor_sites_all table.

Those who have Metalink can refer : 429469.1

and for the rest I am copying it here.

-----------
Symptoms

Unable to update fields on vendor sites form due to error:

FRM-40654: Record has been updated. Requery block to see change.

.
Cause
Leading or trailing spaces in various columns on the PO_VENDOR_SITES_ALL table

Leading or Trailing Spaces script available via Note 229407.1 confirmed there were leading or
trailing spaces in several columns in this table.

Solution

The update you need to run is as follows:

Update po_vendor_sites_all
set VENDOR_SITE_CODE = rtrim(VENDOR_SITE_CODE)
where VENDOR_SITE_CODE != rtrim(VENDOR_SITE_CODE);

Update po_vendor_sites_all
set VENDOR_SITE_CODE = ltrim(VENDOR_SITE_CODE)
where VENDOR_SITE_CODE !=ltrim(VENDOR_SITE_CODE);

Commit;

You might only get the ltrim portion updating rows for one column and the rtrim for others or some
of both. Don't worry about the numbers - it's best to run both ltrim and rtrim to be sure you have
caught all the offending spaces.

Then just repeat the script for the offending columns. In your case this would be:

ADDRESS_LINE1
ADDRESS_LINE2
ADDRESS_LINE3
ADDRESS_LINE4
AREA_CODE
PHONE
FAX
VAT_REGISTRATION_NUM
REMITTANCE_EMAIL
----------

An easier way to do the same is by running the DIAGNOSTIC TOOLS which for me is the best way rather than going around with all the columns which is cumbersome.

Steps:

To execute the test, do the following:

1. Login to Oracle E-Business Suite
2. Select the responsibility "Oracle Diagnostics Tool" (see Note 358831.1 for details)
3. Select application "Applications DBA" from the "Application" list of values
4. Click the "Advanced" tab
5. Scroll down to group "Data Collection"
6. Select test name "Trailing and Leading Spaces"

This will list the problematic data in the given Object which is straight forward than the previous approach.

Reference: Metalink : 229407.1

Integrations Lead - Lessons learnt

 Integrations have been my passion for a while but like anything tech there is no credit given when things go right but always heaps of pres...