Sunteți pe pagina 1din 4

Document 390023.

https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-sta...

How To Reset a Purchase Order or Requisition From In Process or Pre-Approved To


Incomplete/Requires Reapproval For Isolated Cases (Doc ID 390023.1)
In this Document
Goal
Solution
Instructions:
Scope:
References

APPLIES TO:
Oracle Purchasing - Version 11.5.9 to 12.1.3 [Release 11.5 to 12.1]
Oracle iProcurement - Version 11.5.10.2 to 11.5.10.2 [Release 11.5]
Information in this document applies to any platform.

GOAL

Purchasing uses different document statuses to indicate different stages of approval of a document. 'In process' and 'Pre approved'
stages indicate the document is undergoing approval and therefore in these states, the document is not available for editing and can
only be viewed by the user in the summary screens.
During approval, sometimes purchasing documents get stuck in workflow, due to:
1. Temporary approval workflow error. There is no error for new documents.
2. Workflow being purged even when the po approval is active. There is no workflow activity for the item type and item key
associated to the document. Enhancement Request Bug 10390644 - FEATURE TO PREVENT IN PROCESS / PRE-APPROVED
DOCUMENTS WITH CANCELLED WORKFLOWS has been logged to help address this area. This enhancement request is asking for
logic to prevent or provide feature to automatically address POs that have workflows cancelled while they are still IN PROCESS.
Once they are cancelled they can be purged which can lead to the PO being IN PROCESS with no workflow data situation.
3. A data corruption existing on the document. If there is some incorrect data entered in the document which needs correction and
there is no notification in the worklist so the document can be rejected.
A example of temporary approval workflow error occurs when a workflow related package is invalid. In such a case the workflow errors
out. However the same can be revoked after the package is made valid and the erroring workflow activity is retried.
For cases where there is NOT a pending notification and the workflow cannot be progressed using wfretry, is there any other
alternative?

SOLUTION
For cases where there is NOT a pending notification and the workflow cannot be progressed using wfretry, use the reset scripts
provided in these patches:
Patch:5549427 for release 11.5.9 and 11.5.10. (See Scope section for restrictions on encumbrance documents.)
Patch:9707155:R12.PO.A for release 12
Patch:9707155:R12.PO.B for release 12.1 (Not supported for AME purchase orders. Use the withdraw feature instead.)
Note: Procurement rollup patch 14254641:R12.PRC_PF.B for 12.1.3 incorporates the ability to withdraw purchase orders from the
Buyer Work Center -> Orders page. The withdrawal process will change the purchase order status back to Incomplete and modify
the action history of the document, closing the pending actions and creating a withdraw action associated to the user who performed
the withdrawal. Refer to Note 1487949.1 for details about the withdraw functionality.
Patch:19254890:R12.PO.B is additionally available for release 12.1 where the following error is returned: 'This REQ/PO/REL has at least
one distribution with wrong Encumbrance amount.' while running poresreq.sql/poxrespo.sql/poresrel.sql files.
These scripts allow the user to resubmit the document for approval by resetting the authorization status when documents are stuck in
'In-Process' or 'Pre-Approved' statuses. The scripts are:
poxrespo.sql - to reset Standard, Blanket, Planned and Contract purchase orders

1 of 4

11-03-2015 11:25

Document 390023.1

https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-sta...

poresrel.sql - to reset Blanket and scheduled releases


poresreq.sql - to reset Internal and purchase requisitions
In order to obtain the scripts apply the proper patch. The scripts will be available in the $PO_TOP/sql directory.
It is strongly encouraged to use these reset scripts where there are single (or few) occurrences of documents getting stuck. It is not
necessary to submit a Service Request for authorized use of these scripts and if any issues arise after proper use of one of the reset
scripts the issues will be fully supported by Oracle Support. Often where there are single occurrences that cannot be replicated, root
cause investigations cannot be performed. But if there are continued repetitive occurrence of such issues, then these should be
reported to Oracle Support.

Instructions:
The script prompts the user for the following parameters :
Document number. Enter the document number in question.
Organization id. The organization id that the document belongs to. (Important: This prompt should never be entered with a null
value as the organization id is never null at the table level and must be entered or else the query to find the document to reset
will not find the document). Use these scripts to identify the organization id:
Requisition:
SQL > select hr.name, prh.segment1, prh.org_id
from po_requisition_headers_all prh,
hr_all_organization_units hr
where prh.org_id = hr.organization_id and
prh.segment1 = '&Enter_Req_Number';

Purchase Order:
SQL > select hr.name, poh.segment1, poh.org_id
from po_headers_all poh,
hr_all_organization_units hr
where poh.org_id = hr.organization_id and
poh.segment1 = '&Enter_PO_Number';

Purchase Order Release:


SQL > select hr.name, poh.segment1, por.release_num, por.org_id
from po_headers_all poh,
po_releases_all por,
hr_all_organization_units hr
where poh.org_id = hr.organization_id and
por.org_id = poh.org_id and
poh.po_header_id = por.po_header_id and
poh.segment1 = '&Enter_PO_Number' and
por.release_num = '&Enter_Release_Num';

Do you want to delete the action history since the last approval?
The standard practice is to choose No (N).
With poxrespo.sql and poresrel.sql an option to delete or update the action history since the last submission of the document
for approval.
On selecting update, if there is an action pending on a particular user, the scripts will update the action code as 'No Action
Taken'.
If the action history does not contain a record with pending user action, the update action will have no effect on the action
history.
On selecting the delete option, the action history for the unsuccessful approval cycle would be deleted.
For example.: for Standard PO Number 5211
Revision Sequence Action Employee
0
1 Submit
A
0
2 forward
A
0
3 Approve
B
0
4 Reserve
B
1
5 Submit
A
1
6 forward
A
1
7

2 of 4

11-03-2015 11:25

Document 390023.1

https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-sta...

Here the document is stuck after 1 successful approval for Revision 0.


Hence if you choose the Delete action for action history, the sequence number 5,6,7 will be deleted and the document would
be set to Requires reapproval.
If you choose the Update option for this case then the action at sequence 7 would be updated to 'No Action Taken' and the
note field would indicate 'Updated by reset script on <date>'.

Note: If the option to delete the Action History is taken and a commit is issued at the end of the script, there is no
possibility to restore the deleted action history

After the script executes if no errors a commit; should be entered to commit the transaction. If any errors occur, issue a rollback;
command

Scope:
These script picks up documents, which are:
Not canceled
Not finally closed
In statuses - 'IN PROCESS' or 'PRE-APPROVED'

Perform the following checks before proceeding to reset the PO:


1. If open notification is present, the script will warn the user.
2. If a change request is associated with the document, the script will abort. For this scenario, reference the datafix
section in Note 453551.1
3. Reset requisition script aborts if the requisition is found to be associated with a purchase order or internal Sales
Order.
4. If USSGL Transaction codes are being used and/or Federal Purchasing, the script aborts.
5. If you are on 11.5.10 and the document that you wish to reset is sourced to an encumbered blanket agreement or
an encumbered global agreement, do not use this script.
6. If you are on 11.5.10 run the program 'Import Journals' from the GL responsibility before running this script. This is
required for the encumbrance diagnostics performed by this script. Failing to run the program may result in
incorrect information coveyed by the script.
7. Do not apply the script to releases prior to 11.5.9.
8. For release 12 and 12.1 the script will take care of encumbered documents, but it will abort if any of the document
distributions has a wrong encumbrance amount.

If the above check pass, the scripts:


1.
2.
3.
4.
5.

Abort all the workflow processes associated with the document Approval.
Updates action history.
Updates the PO tables to set the status correctly.
For 11.5.10, the script corrects encumbrance entries if encumbrance is used.
For 11.5.10, the script suggests any Manual postings that may be required to correct encumbrance entries in GL.
These manual postings appear in the table po_manual_postings_temp.

Additional note:
1. If there is slow performance when running the reset scripts then purging the workflow tables should be investigated.
2. At present there is no generic script to accommodate resetting multiple documents at once.
3. Do not run these scripts in parallel on two documents at once, as this may cause a locking issue.
4. On reset if the error occurs: "This PO has been reserved at least once previously. Hence this PO can not be reset." and funds
reservation is being used review Patch 9707155.

Still Have Questions?

3 of 4

11-03-2015 11:25

Document 390023.1

https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-sta...

Join our growing Oracle Procurement Community and learn from your peers and Oracle on how to address your unique issues in Procurement.

You can access the main Oracle Communities page at http://communities.oracle.com (If you are enrolled, the Procurement community will be liste
already enrolled in the Procurement community, you can do so by clicking on the link Edit Subscriptions).
OR
From "My Oracle Support" as follows:
1.
2.
3.
4.
5.

Log into My Oracle Support


Click on the 'Community' link at the top of the page
Click in 'Find a Community' field and enter Procurement
Double click on Procurement in the list
Click on the 'Create a Community Post' button and submit your question.

REFERENCES
NOTE:1487949.1 - How to Reset the Approval Status for Purchase Orders using the Withdrawal Functionality
BUG:10390644 - ER: FEATURE TO PREVENT IN PROCESS/PRE-APPROVED DOCUMENTS WITH CANCELLED WORKFLOW
NOTE:453551.1 - How To Diagnose An Issue In Requester Change Order Processing

4 of 4

11-03-2015 11:25

S-ar putea să vă placă și