Automatic Approval For Imported Standard Purchase Orders: An Oracle White Paper June 2002
Automatic Approval For Imported Standard Purchase Orders: An Oracle White Paper June 2002
INTRODUCTION
In an endeavor to provide new functionalities and features with every upgrade of Oracle
Applications, Procurement Family Pack G (11i.PRC_PF.G -2141229) also brings some new
features and functions. Corporations need software systems that can provide multiple
options for performing a certain task. ‘Automatic Approval for Imported Standard
Purchase Orders’ is one such feature, which is coming as an addition in Procurement
Family Pack G (11i.PRC_PF.G -2141229).
ABSTRACT
The current interface does not support importing Standard Purchase Orders(PO) with an
“Approved” status. There may be situations where document approval has already taken
place in a legacy system and the system needs to support importing the document in the
approved state. This can lead to significant manual effort on the user’s part in trying to
query up the imported POs in the online form and then submitting them for approval one by
one.
It may also happen that the legacy system is used only to create Purchase Orders, which still
need to go through the normal approval cycles. For these situations, it is required that the
interface also initiates the Approval process setup in the system (PO Approval Workflow)
for the imported POs. This would ensure that the same approval hierarchy is followed
irrespective of whether the PO was created using the online form or was imported from an
external source. At the same time this would save the user the effort required to query up the
imported POs, opening them in the form individually and then submitting for approval.
SCOPE
1. High Level Diagram.
2. Major Features.
a. Improved User Interface for Importing Standard POs.
b. Importing ‘Approved’ Standard Purchase Orders.
c. Initiating Approval Process for Imported Standard POs.
3. Setup Requirements
a. User Procedure
4. Importing Standard Purchase Orders.
5. Trouble Shooting.
6. Known Issues and Resolutions
Page 1
HIGH LEVEL DIAGRAM
Data from EDI gateway or sql insert is first loaded into the PO_HEADERS_INTERFACE,
PO_LINES_INTERFACE, and PO_DISTRIBUTIONS_INTERFACE tables. The
PO_DISTRIBUTIONS_INTERFACE is used only for standard purchase orders. Import
Standard Purchase Orders is a concurrent program, which is used to import Standard
Purchase Orders from Oracle or non-Oracle systems. This program can then be run to
import the records from the interface table as Purchase Orders in Oracle Purchasing.
The Purchasing Documents Open Interface uses Application Program Interfaces (APIs) to
process the data in the Oracle Applications interface tables to ensure that it is valid before
importing it into Oracle Purchasing.
APIs - interface concurrent programs, directly invoked from SQL, not through Application’s
request submission.
MAJOR FEATURES
Only parameters relevant to importing Standard POs are presented to the user during
concurrent program submission. For Importing Standard POs, the user is able to specify the
following runtime parameters:
• Default Buyer for the imported documents if one is not specified in the interface data.
• Option to create items in item master out of Buyer Part Numbers.
• Approval Status of the imported Documents. The user must be presented with choices to
either import the documents as “Approved” or “Incomplete” or initiate the approval process.
Page 2
• Option to initiate the approval process automatically for documents imported with
“Incomplete” status.
• Batch Id: To identify the data set in the interface table.
The enhanced Open Interface would permit importing POs to be imported to the Application
with an “Approved” status. This can be achieved either by specifying a status of
“Approved” in the interface data or leaving the status “Null” in the interface data and
specifying a value of “Approved” for the “Approval Status” runtime parameter. However,
this would not initiate the PO Approval Workflow and therefore assumes that all necessary
document approval has already taken place in the source legacy system or such approval is
not required for the documents being imported.
The enhanced interface would also permit to optionally import the POs with an
“INCOMPLETE” status and then automatically initiate the PO Approval Workflow for
these imported documents. Specifying either a status of “Incomplete” or null in the interface
data and specifying a value of “Initiate Approval” for the “Approval Status” runtime
parameter can achieve this.
This feature would satisfy approval-processing requirements for POs imported from legacy
systems. This would facilitate businesses to ensure a Standard Approval Policy for both POs
created within the application as well as POs imported from external sources. It will
eliminate the requirement of maintaining Approval Structures in multiple systems.
SETUP REQUIREMENTS
Set the profile option PO: Write Server Output to File. Set this profile option when you are
debugging the Purchasing Documents Open Interface. When you import documents with a
large number of items (about 100 or more), the concurrent manager details log (viewable
through the View Log button in the Submit Request window) can overflow and create
errors. The profile option PO: Write Server Output to File enables you to write these log
details to a flat file in the $APPL_TOP/log directory to avoid this overflow.
If you set this profile option to Yes, the log details are written to a flat file, which will not
overflow. If you set this profile option to No, the log details are written to the concurrent
manager log screen as usual, which can cause overflow problems for large catalogs. If you
leave this profile option blank, log details are not written at all, which improves
performance. By default, the profile option is left blank. The user can update this profile
option. It can also be updated at the system administrator user, responsibility, application,
and site levels.
Page 3
1. Set PO: Write Server Output to File to Yes.
2. After you run the Purchasing Documents Open Interface, look for a system-generated log
file in the $APPL_TOP/log directory.
To debug using SQL*Plus, do the following before you run the Purchasing Documents
Open Interface:
1. Set PO: Write Server Output to File to Yes.
2. Make sure the directory for the log file you want to write to in the next step is set in the
environment variable APPLPTMP and that it is listed in the UTL_FILE_DIR parameter
in the init.ora file.
Page 4
(
INTERFACE_LINE_ID,
INTERFACE_HEADER_ID,
PO_HEADER_ID,
ITEM_ID,
UNIT_PRICE,
QUANTITY
)
VALUES
(
po_lines_interface_s.nextval,
po_headers_interface_s.currval,
po_headers_interface_s.currval,
2350,
110,
10
)
/
commit;
Enter Parameters.
n Default Buyer: If default buyer is specified, then this will be used as the buyer in
purchase orders for import data, which do not have buyer information. If default buyer is
not specified and the imported purchase order also does not have buyer information, the
program will use normal defaulting mechanism to generate buyer information.
n Create or Update Items : Choose “Yes” or “No”. If you choose “Yes”, the Import
Program will additionally create items in the item master out of those Buyer Part Numbers
in the interface data for which there’s no corresponding entry in the item master.
Page 5
n Approval Status : Choose “Approved” or “Incomplete” or “Initiate Approval”. This
will determine the status of the PO after it is imported. Please see chart below for details on
the effect of this parameter.
n Batch Id : Specify a batch ID if you want to restrict the import process to a specific
data set.
TROUBLESHOOTING
Resolving Failed Interface Rows
Error Messages
Purchasing may display specific error messages during interface processing. For more
details on these messages, please see the Oracle Applications Message Reference Manual,
in HTML format on the documentation CD-ROM for Release 11i.
If you receive an error in a document, you can fix the error and resubmit the document again
by reusing a header record in the PO_HEADERS_INTERFACE table using SQL*Plus, if
you’re using a test environment. If you do this, set the PROCESS_CODE column in the
PO_HEADERS_INTERFACE table to PENDING and be sure to reset the following
columns to NULL for all lines belonging to that header in the PO_LINES_INTERFACE
table:
PROCESS_CODE
PRICE_CHG_ACCEPT_FLAG
PRICE_BREAK_FLAG
Page 6
where interface_transaction_id in (select interface_header_id from po_headers_interface);
This is a quick way to know what errors are being thrown. It is best to start with the
minimum amounts of columns populated, and them move towards adding new columns. As
new columns are added, the processing can be completed and the error messages used to
debug further. You can query the concurrent program from with the System Administrator
responsibility, and enable the trace option. The trace will be thrown to the backend database
server, residing in the value of user_dump_dest variable, which can be located via the
following sql:
The value returned represents the directory on the backend server where the trace will
reside. At the minimum, if a bug is to be logged, the customer should be requested for a
trace file and/or the columns, which are being populated into the open interface tables.
KNOWN ISSUES
The Standard Purchase Orders imported in ‘Approved’ State through Import Standard
Purchase Orders program are sometimes not updating the MTL_SUPPLY_DEMAND
table.
Solution:
You can make some change to Header/ Line information of the imported PO and save it.
This will prompt you to submit the PO for Re-Approval. Submitting the document for Re-
approval will update the MTL_SUPPLY_DEMAND table.
OR
Update the AUTHORIZATION_STATUS of the Imported PO to ‘Incomplete’ by running
the following scripts on the SQL prompt and submit the document for Approval again. This
can also be used to update the MTL_SUPPLY_DEMAND table.
1. To get the PO_HEADER_ID
select PO_HEADER_ID
from PO_HEADERS_ALL
where SEGMENT1 = '&YOUR_PO_NUM';
2. Update the status of the PO
update PO_HEADERS_ALL
set AUTHORIZATION_STATUS = '',
WF_ITEM_KEY = '',
WF_ITEM_TYPE = '',
Page 7
where PO_HEADER_ID = &po_header_id;
SUMMARY
Karthikeya Subbarao is a Support Analyst with Oracle India Private Ltd., Bangalore. He has
a Bachelor’s Degree in Mechanical Engineering.
CREDITS
Page 8
Oracle Purchasing: Automatic Approval for Imported Standard Purchase Orders
June 2002
Updated : June 2002
Author: Karthikeya Subbarao
Contributing Authors: n/a
Copyright © Oracle Corporation 2002
All Rights Reserved Printed in the U.S.A.
Oracle Corporation
World Headquarters
500 Oracle Parkway
Redwood Shores, CA 94065
U.S.A.
Worldwide Inquiries:
650.506.7000
Fax 650.506.7200
Page 9