Professional Documents
Culture Documents
PO Communication Methods Whitepaper PDF
PO Communication Methods Whitepaper PDF
Communication Methods
An Oracle White Paper
March 2008
Article On Purchasing Communication Methods
Introduction ....................................................................................................... 5
1.0 Print............................................................................................................... 5
Choosing the format of document for communication.......................... 5
Text Format .............................................................................................. 5
PDF ............................................................................................................ 6
Setting up ....................................................................................................... 6
Report parameters......................................................................................... 6
Launching Printed PO report from Approval.......................................... 7
Printed Purchase Order report output ...................................................... 9
2.0 Fax................................................................................................................. 9
How it works? ............................................................................................... 9
Text Format .............................................................................................. 9
PDF Format............................................................................................ 10
Sample Output ............................................................................................ 10
Output when the format is text............................................................ 10
Output when the format is PDF.......................................................... 11
Fax codes control file ............................................................................ 11
Setup steps ................................................................................................... 11
Select the communication method as ‘Fax’ for supplier site ........... 12
Faxing at the end of approval............................................................... 12
3.0 Email........................................................................................................... 12
How it works? ............................................................................................. 12
Features of Oracle Workflow............................................................... 12
HTML format......................................................................................... 13
PDF format............................................................................................. 14
Setup steps ................................................................................................... 14
Supplier Site ............................................................................................ 14
Set the Profile Options.......................................................................... 15
Create and Approve PO........................................................................ 15
What happens in Approval? ...................................................................... 16
Sample Purchase Order Emails ................................................................ 17
Important Queries for Email Purchase Orders...................................... 17
Script to check the workflow status and po_wf_debug data........... 17
To check the AdHocUser Setup. ......................................................... 17
To check the Mail status........................................................................ 18
To Verify the Mail content from sqlplus ............................................ 18
INTRODUCTION
In business world, communication of documents between legal entities is crucial.
They play an important role in driving the business. Oracle Advanced Procurement
Suite of Applications supports variety of communication methods starting
traditional Postal mails to the recent PDF document communicated through Email
and automatic communication of documents through XML and EDI.
Print
Fax
Email
XML
EDI
1.0 PRINT
This is one of the traditional communication methods. The legal documents
[Purchase orders and Purchase agreements] are printed on pre-printed stationeries
and sent to suppliers though normal postal service.
Text Format
The Printed Purchase Order report [Landscape and Portrait] generates the
document in text format. The document is printed on a printer setup in the system.
The document can be printed on pre-printed stationeries, which has the company
logo and other required legal declarations [like confidential etc]. To support this the
report output we will not hard code any headings/labels.
Setting up
Minimum steps for printing are:
• Setup the Printer
Report parameters
Print Selection
This parameter determines what type of documents needs to be printed.
This parameter can have the following values: New, Changed, All.
New: Print only the new documents, which are never been communicated.
Changed: Print only Changed documents that have been communicated at
least once in the past.
All: Print all the documents.
Purchase Order Numbers From/To
Provide the range of document Numbers to Print.
Release Numbers From/To
Provide the range of Release Numbers to Print
Release Dates From/To
Provide the range of release dates to print. This is applicable only for
Releases.
Approved
Whether to Print the Approved documents or all documents.
Test
2.0 FAX
Next traditional method we are going to see is facsimiles. Oracle Purchasing
supports facsimile transmission of Purchasing Documents in text as well as in PDF
format. For documents text format, purchasing uses the Printed PO report as base.
For PDF communication, the PDF document is used as base.
How it works?
Text Format
The fax server is configured as a printer in application. Buyer will choose this fax
server (printer) while submitting the fax request.
To fax, the buyer submits the Printed PO report with Fax parameter as ‘Yes’. In
addition the fax number is also provided as parameter. The report prints the
document wrapping inside the Fax Control codes. The report output is directed to
the fax server (printer).
Fax server interprets the control codes and starts transmission when it encounters
the Start control codes. The transmission is terminated when the fax server
encounters the end control codes.
The fax should be capable of transmitting the PDF documents. The server is
configured to listen to a directory in the system in Oracle applications network.
Whenever a new control file is generated in this directory, fax server will pick up
the control file and transmit the document to the specified location.
To fax the document, the buyer will submit the request ‘PO Output for
Communication’ with Fax as parameter. This program generates the PDF
document and also generates a control codes file. The control codes file will be
placed in the directory specified in the profile option ‘PO: Fax Output Directory
for the PO Document’
Since the fax server is configured to listen to this directory, once the control file is
generated the fax server will transmit the document.
Sample Output
{{BEGIN}}
{{FAX 408524-7661}}
{{ATTACH
/conclog/log/unclass/lv115dyp/out/o2763510.out}}
<Attach the PDF document>
{{END}}
Setup steps
At the end of approval process, buyer can optionally choose to fax the document.
This option is available in the Approval window. Buyer needs to check the fax
check box and to fill up the fax number. Then at the end of approval process
depending on the document format chosen, corresponding output will be generated
and faxed to the suppliers automatically.
3.0 EMAIL
Next communication method is email. Emailing the Purchasing documents is an
easy to use, cheaper and reliable communication method. Oracle Purchasing
supports emailing purchasing documents to suppliers
How it works?
Oracle Purchasing leverages the Oracle Workflow’s capabilities to email the
Purchasing Documents. Oracle Workflow provides a facility to email the
notifications to the specified workflow user. Purchasing uses this concept to send
the Purchasing documents to the suppliers. The document can be sent in HTML or
in the PDF format.
HTML format
Po_Email_Header 'PLSQL:
PO_EMAIL_GENERATE.GENERATE_HEADER/'||
To_Char (Documentid) || ':' || Documenttypecode
Po_Email_Body 'PLSQLCLOB:
PO_EMAIL_GENERATE.GENERATE_HTML/'||
To_Char (Documentid) || ':' || Documenttypecode
Po_Terms_Condition 'PLSQLCLOB:
s PO_EMAIL_GENERATE.GENERATE_TERMS/'||
L_Itemtype || ':' || L_Itemkey
Working Principle
Oracle Workflow sends notifications only to a valid workflow user (role). So Oracle
Purchasing uses the following logic to send the notification to the supplier eMail
address.
PDF format
In Purchasing Options if PDF format is selected then the PDF output is generated
and this PDF document is selected in to a document type of attribute
[PDF_ATTACHMENT]. This attribute is then attached to the notification. Hence
when the mail is sent, the attribute PDF_ATTACHMENT content (which is pdf
document) is also sent to the supplier. Otherwise the working principle remains
same.
Setup steps
Supplier Site
While creating the Supplier site, make sure to provide the correct language of the
supplier site. Choose the default communication method as Email and provide the
default email address to use in the E-mail field.
Now we need to set few profile options to complete the Email PO setup.
Navigate to: Sysadmin=>Profiles=>System
Set the profile option PO: Secondary Email address to a generic Email address
(PurchasingDept@Company.com) to which also the purchase order will be sent.
This back up Email can be used for internal reference or to forward to supplier in
case if it is missed some how.
Set the PO: In File Path profile option to a UNIX directory in which the terms
and conditions file will be placed. Make sure that the directory required
permissions.
Login to Unix and place the terms and conditions in the above-mentioned
directory.
Set the PO: Terms and Conditions filename option to a valid file name.
When the Mail is sent the above file will be attached to the Email. First the system
will search for file named FileName_<SupplierLang>. If it is not found then it will
search for file named FileName_<BaseLang>. If that is also not found then it will
search for file named FileName.
The buyer can optionally choose to email the Purchase order at the end of approval
process. This option is available in the Approval window. If the Email option is
chosen then at the end of approval process a notification will be generated for the
supplier. This notification will be emailed to the supplier email address specified in
the approval window.
While sending the document, the general Terms and Conditions also added form
the location mentioned in the above profile options.
At the time of starting of the workflow, the Email address entered in the approval
window is populated in to the workflow attribute EMAIL_ADDRESS.
In addition to the supplier address, the document also can be copied to an internal
Email address. The profile option ‘PO: Secondary Email Address’ holds the
secondary email address to which the document will be sent. This is used as a
Run the wfstat from $FND_TOP/sql using the above Item_Type and Item_key
@wfstat.sql POAPPRV <ITEM_KEY>. Spool the output for reference.
Get the AdHocUserName from the wfstat output in the User Column for
EMAIL_PO_NOTIFICATION activity.
…
22-AUG-03 22:59:52
EMAIL_DOC_PROCESS/EMAIL_PO_NOTIFICATION COMPLETE
#NULL HYDERABAD2252 40455 O
…
Run the following SQL to verify the notification status. This should be ‘SENT’ and
not ‘FAIL’. If it is ‘OPEN’, it means the notification mailer is not yet sent the mail.
SELECT status, mail_status
FROM wf_notifications
WHERE notification_id = &NotificationId
Run the bde_wf_notif.sql with the Email Purchase Order Notification id to verify
the Email content in the sqlplus.
The PDF PO can be accessed from the following forms: Enter PO, Enter Releases,
PO Summary, and Approval Notification. This pdf would display the names of the
attachments according to the level they reference. All HTML files and web pages
will appear as hyperlinks. When the user clicks on one of these hyperlinks, a new
window should open with the attachment. All other types of attachments would be
classified as type “File”. Their contents cannot be viewed directly from the
purchase order.
What is XML?
XML (Extensible Markup Language) is a standard for creating markup languages,
which describe the structure of data. It is not a fixed set of elements like
What is XSL?
XSL stands for Extensible Style sheet Language.XSL describes how the XML
document should be displayed.
XSL-FO:
XSL-FO stands for Extensible Style sheet Language Formatting Objects.XSL-FO is
an XML-based markup language describing the formatting of XML data for output
to screen, paper or other media. XSL-FO documents are XML files with output
information. They contain information about the output layout and output
contents. XSL-FO documents are stored in files with a .fo or a .fob file extension.
XML Publisher
Oracle XML Publisher is a new java based product available within the technology
stack of the E-Business suite. Utilizing a set of familiar desktop tools such as
Adobe Acrobat and Microsoft Word users can create and maintain their own report
formats based on development delivered xml data extracts. XML Publisher will
then convert these documents to the XSL-FO format. Users can also obtain 3rd
party provided PDF forms e.g. government tax forms and merge xml data
generated from the E-Business Suite to fill the forms with the required data.
Buyers can communicate the contract terms attached to the purchasing document.
Just changing the layout without changing the code can do all this. Also PDF
document gives a professional appearance. Since the data and presentation layers
are separated, customization of the lay out (XSL-FO) is simple and easy. There are
many UI tools that assist in customizing the templates.
Buyers will be able to view the Purchasing documents online through View
Documents before communicating to the supplier. Also the same PDF format will
be accessible through iSupplier Portal too.
Please note that at this point, Oracle Purchasing does not support the Planned Purchase order and
Scheduled Release documents in PDF format.
To generate the PDF, the data is collected in the form of XML. For purchasing
documents we might need two different XML documents; One XML for
purchasing document and another XML for the contract terms document
The following business views are used to get the xml data. The XML is merely a
select * from these views: po_headers_xml, po_lines_xml, po_line_locations_xml,
po_distribution_xml, po_headers_archive_xml, po_lines_archive_xml,
po_line_locations_archive_xml, po_distribution_archive_xml.
Depending on which revision to communicate, either the main tables or the archive
tables are used to construct the XML data.
Oracle purchasing seeds standard style sheets with frequently used layout. The
following are the seeded style sheets.
• Standard Purchase Order Style sheet
The following are the important class variables and their purpose.
m_documentId //represents document id (po_header_id or po_release_id)
m_documentType
m_languageCode
m_revisionNum
m_documentSubtype //if required
m_orgId
m_authorizationStatus
m_withTerms // “Y”,”N”,”C”
m_storeFlag // “Y”, “N”.”Y” indicates that PDF document needs to be stored in
the repository
m_PDF // has the generated pdf as a BLOB/Stream based on XMLPublisher
API’s
m_POXML // PO data as a CLOB
m_POXSL // this will have the po stylesheet in the form of BLOB/Stream based
on Template Repository API’s
m_POHasTermsConditions //indicates whether the po has Terms and Conditions
m_POIsSigned //indicates whether the po has been signed atleast once or not
m_archiveOn // print or communicate
m_amendmentProfile
m_viewOrCommunicate //view or Communicate
m_documentTemplateType //XSLFO or TEMPLATE (pdf template)
m_contractsXML
m_contractsXSL
m_fileName
m_documentTemplateID
Constructors
Methods
GetDocument () //which checks in the repository whether the pdf file exists or
not
GetPOXML () //generates the XML for the given document
GetPOXSL () //retrieves the document template/type from the template
repository
GetContractXML () //get the Contract XML
GetContractXSL () //retrieve the contract template from the template repository
GenDoc () //generates the pdf document and returns a BLOB
Generate documents API uses the below logic to determine whether to generate
the PO or to retrieve the PO from the DB. Also this determines whether to or not
to store the generated pdf document in the database.
After generating the XML data and retrieving the XSL from the database Generate
Documents API calls the XDO APIs to generate the PDF document. This API
takes the XML and XSL as parameters and generates the pdf. Below is the
systematic flow of pdf generation when the document and contracts layout is a style
sheet.
If the document and contract uses different types of layout (style sheet, pdf
template), the generate pdf follows the below logic to generate the pdf document.
Setup Steps
Purchasing Options
In the Setup->Purchasing options screen choose PDF value for the ‘PO Output
format’ field. This value is used to determine the format in which the document
needs to be communicated.
For each document type, buyers can choose the layout in which the pdf would be
generated. The layout can be selected for the document as well as for the contract
terms. The layout can be a seeded or a customized one. These layouts are stored in
the XML Publisher repository.
Navigate to Setup->Purchasing->Document Types and associate the style sheets as
shown below:
Sample outputs
Here is a sample output of the pdf document with contract terms. First page of the
document is the cover page. This page is generated separately and added to the
main document. The next section is the document details. The next section is the
contract terms and conditions. The last page contains space for signature of the
buyer and the supplier for legal purpose.
One important argument to note is the ‘Test’ flag. This can be Yes, No or Debug.
The values Yes and No has the same meaning as the Printed Purchase Order
report. If the value for this flag is passed as Debug, then the XML and XSL
contents are printed in the log file. Also the XML Publisher APIs are not called.
This option is very useful to debug any issues with this program. This can be used
But important point to note is, the customer cannot customize the seeded style
sheets. They need to make a copy of the seeded style sheet and then customize it as
per their requirement.
Then the customer can make the required modifications to this downloaded style
sheet. Once the modifications are done, they can upload the style sheet again to
XML Publisher.
Now click on ‘Update’ to update the template file with throne you have modified
Now the modified style sheet should be selected in the Document Types form.
Incase if there is any issues with the customized style sheet, the customer can test
the PDF generation using the seeded style sheet. This will help them in identifying
whether issue is with the style sheet or with the code.
5.0 XML
XML is one of the automatic methods of communication used by Purchasing to
send the Purchase orders to the suppliers. This communication method leverages
Business Events Feature of Oracle workflow for communication.
How it works
• The workflow even manager dequeues the AQ for events and looks out for
the subscriptions. In this case the POXML workflow is subscribed to this
event. This workflow receives the event with document header id and does
the necessary checks to ensure that XML is chosen in the PO approval
window and the trading partner is setup and then raises an event ‘Raise XML
Poevent’
• OTA offers a message transport layer between two systems (in this case
buyer and supplier). The key benefit is guaranteed, exactly one-time delivery
of message over HTTP (S), when both systems are using OTA.
This is how it works: OTA in the buyer’s Oracle Applications system picks
up the XML document from the outbound AQ where the XML Gateway
placed it. When OTA in the buyer’s system communicates with the transport
layer in the supplier’s system, the XML document is sent to the supplier’s
XML Gateway uses the following two models to send the XML documents
to the supplier
• Model1: XML documents are sent to the supplier by the way of the
Oracle Exchange
• Model2: XML documents are sent to the supplier directly.
The setup for Oracle XML Gateway by the buyer includes entering data in the
Trading Partner Setup window. Select the XML Gateway responsibility.
In the Trading Partner Details region, enter information for the New PO document
as follows
Transaction Type
It is the standard product short code for the base Oracle Application. Type PO
is for Purchasing, and subtype PRO is for Process PO (i.e. a new purchasing
document). For change order transmission POCO subtype should be selected. The
last letter of the subtype signifies the direction of messaging.
Standard Code
This code represents the XML format to be used. Oracle supports most widely
accepted OAG standard. This is best suited for any B2B applications
communication.
Note: The Open Applications Group, Inc. (OAGi) is a not-for-profit open
standards group building process-based XML standards for both B2B and A2A
integration. The Open Applications Group was formed in late 1994 as the first post-
EDI organization focusing on improving the state of application integration.
Website: http://www.openapplications.org/
External Transaction Type
External Transaction Type and subtype are the primary external identifier for the
XML message. For new purchasing document, text ‘SOP’ is used.
Direction
This code identifies the direction of the transaction. The value IN identifies an
inbound message, and the value OUT identifies an outbound message. The value
displayed is OUT.
Map
This is the name of the map created using the XML Gateway Message Designer.
Select PROCESS_PO_007 from the LOV. (Although you can customize this map,
Oracle does not support the customizations.)
Connection/Hub
This option is used to select whether it is a direct communication to the supplier
site or through a hub like Oracle Exchange. If it is DIRECT communication
This is used to define the XML Message and Process Log Directory. This directory
should be listed as one of the utl_file_dir. Also make sure that the directory has
correct permission settings.
This is used to identify the XML Gateway system administrator or contact person
e–mail address to notify when a system or process error is detected.
ECX_OAG_LOGICALID
This is used by the sending application to enter the Identifier in the XML message.
The supplier company needs to perform all necessary setup to enable the supplier’s
system to receive the XML documents transmitted by the buyer directly. The
supplier should use the same OAGI standard XML documents used by the buyer
company. In addition, the supplier needs to use the same Extensions DTD as used
by the buyer company to ensure all information transmitted by the buyer is
received. The Extensions DTD specifies fields used by Oracle to provide additional
information.
On submission the XML flag will be checked automatically. During approval based
on the xml_flag in the approval window, the xml flag is updated on the headers
6.0 EDI
Introduction
Electronic Data Interchange (EDI) is the computer-to-computer exchange of
structured information, by
agreed message standards, from one computer application to another by electronic
means and with a minimum of human intervention eliminating paper work. In
common usage, EDI is understood to mean specific interchange methods agreed
upon by national or international standards bodies for the transfer of business
transaction data, with one typical application being the automated purchase of
goods and services.
How it works?
Oracle e-Commerce Gateway collects all of the business data needed to map to a
standard EDI transaction, which the receiving Trading Partner can interpret
properly into their receiving application using their equivalent of Oracle e-
Commerce Gateway/Translator setup.
Oracle e-Commerce Gateway extracts outbound transaction data from application
tables and loads inbound transactions into the base Oracle Application Open
Interface tables.
During inbound flow, the oracle host system administrator receives the flat file (in
ASCII format) from the trading partners. The EDI Translator converts this flat file
in to oracle standard format. Oracle e-Commerce Gateway processes flat file and
populates the business data into the open interface tables of Oracle Applications.
The following table lists the transactions that integrate with Oracle Purchasing
Setup steps
Here is the flow for setting up and running e-Commerce Gateway for Oracle
Purchasing.
In the Define Trading Partner window, select the Assignment tab. Associate the
supplier and supplier site to the trading partner.
In the Define Trading Partner window, select the Details tab. select the transaction
as:
‘OUT: Purchase Order (850/ORDERS)’ for new purchasing documents and ‘’ for
changed purchasing documents. Transaction type is the document type of interest.
The Map field gets defaulted based on the transaction and transaction type if it is
already setup. This map gives the relation between business data fields and the
position of the fields in the flat file. E-Commerce gateway seeded predefined
standards.
In the Define Trading Partner window, select the Contact tab. The information on
the contact tab is optional. It contains contact data for the specified trading partner.
It may be used by the EDI Coordinator for the trading partner’s EDI
Coordinator’s contact data. This data is for reference only. It is not used by Oracle
e-Commerce Gateway.
Business Views
After the document is successfully extracted and written to flat file it will be marked
by Oracle e-Commerce Gateway to prevent it from subsequent extraction. The
following table lists the fields updated based on an excerpt of code in the
UPDATE_PO procedure defined in the ECEPOOB.pls file.
Oracle Corporation
World Headquarters
500 Oracle Parkway
Redwood Shores, CA 94065
U.S.A.
Worldwide Inquiries:
Phone: +1.650.506.7000
Fax: +1.650.506.7200
oracle.com