|
|
发表于 2009/3/6 15:40:07
|
显示全部楼层
Symptoms
When trying to Cancel a Purchase Order(PO) or Release the form gives error:
Please undo the changes to the document in the current revision before taking the cancel action.
You are trying to cancel a document that has been altered since its last archived revision.
STEPS
The issue can be reproduced at will with the following steps:
1) In the Purchase Order Summary Form query the Purchase Order or Release
2) Tools/ Cancel /Cancel PO or Release and get the error message
Changes
Upgraded to 11.5.10
Cause
In 11.5.10 there was a new Enhancement done for the 'Cancel' Control action to Check the Archive Table before the cancel. The Check is to make sure for Approved Rows the Main and the Archive Table has the same Data and that there were not Changes which need to be communicate to the Supplier. When the Archive On is 'Communicate' The archive happens in a separate step so there can be Purchase Orders which are 'Approved' but the the main and the archive table are out of synchronization. In these cases the Cancel is not allowed to Happen unless the above changes are communicated to the Supplier by 'Printing' the Purchase Orders. Once this step is done the Archive of the Purchase Order happens and the Purchase Order will be eligible for cancel.
There are some Old Purchase Orders (created earlier to 11.5.10 ) where there are many Rows which were out of synchronization between the Main and the Archive table . These could be due to new columns being added. There could be many rows due to data fixed too where the Main and the Archive Table are out of Synchronization.
Solution
To implement the solution, please execute the following steps:
1-Navigate to Setup=>Purchasing=>Document Types.
2-Find in the Document Types the Standard Purchase Order type
3-Check the Archive on field : Is Archive set to 'Communicate' or set to 'Approve'
If the Archive is set to 'Communicate' you have to communicate the PO to the Supplier before you can use the Cancel Option. You can run the 'PO Output for Communicate' or 'Printed Purchase Order Report' (select 'Print Selection'-'All' and give the PO Number you want to communicate). This will create the Archive. Now you can cancel the PO.
If the Archive is set to 'Approve' you have to make the document authorization status ' Requires Reapproval' then REAPPROVE it before you can use the Cancel Option. You can update/enter the value in the field 'Note To Supplier'. (Navigation for the field is Lines block --> Click on "More" tab.) This will change the revision number and status is set to 'REQUIRES REAPPROVAL'., Now APPROVE the Purchase Order. Archival process will takes place here.
.
4- If still receiving the same error message while trying to cancel the Purchase Order after completing the steps above:
4.1 Download and apply Patch 6243080
Apply the patch in a TEST environment, Patch will generate a datafix script ( poarsynf.sql )
4.2 Run the generated scripts in the same TEST environment :
4.3. Connect to SQL plus.
4.4. Run the fix script poarsynf.sql
- If you want to run the script for one PO or Release, please pass the appropriate
po_header_id or po_release_id respectively.
( you can get the po_header_id by executing the following SQL statement
Select po_header_id from po_headers_all where segment1=&PO_number; ) ** If you want the script to be ran for all the POs/Releases, then please comment out the lines that have the parameters &po_header_id and &po_release_id.
4.5 Once it is completed ensure there is no error reported.
4.6 Then validate the data.
4.7 Test the behavior (cancellation) in application to ensure that the data is correct.
4.8 Migrate the solution as appropriate to other environments.
5- If still unable to cancel the document after applying the generic datafix patch
Download and run the diagnostic scripts below. Log a new SR and provide the output from the diagnostic scripts.
These scripts will determine the data that is not synchronized between the purchase order tables (po_headers_all, po_lines_all, po_line_locations_all and po_distributions_all)and the archive tables (po_headers_archive_all, po_lines_archive_all, po_line_locations_archive_all and po_distributions_archive_all ) for that purchase order. |
|