PO Purchasing Document Upload

Description

What this upload does

The PO Purchasing Document Upload creates and updates Oracle Purchasing documents from Excel: Standard Purchase Orders, Blanket Purchase Agreements, Contract Purchase Agreements and Quotations. New documents are loaded through Oracle’s standard Purchasing Documents Open Interface; changes to existing Standard POs (field edits and shipment splits) are applied through Oracle’s standard PO Change process. Every row is validated and the import program is submitted for you, and a result report lists each row as success or error with the exact Oracle message.

When to use it

  • Mass-create new Standard POs, Blanket/Contract agreements or Quotations (header, lines, shipments/price breaks and distributions).
  • Add lines, shipments or price breaks to existing Blanket Agreements, Quotations and Standard POs.
  • Change an existing Standard PO — need-by/promised dates, quantities, unit price, distribution project/expenditure values and descriptive flexfields.
  • Split a shipment on an existing Standard PO line.

Before you start

  • Use a Purchasing responsibility with access to the operating unit you are loading. The upload runs under that operating unit’s context.
  • Make sure the suppliers, sites, items, categories, charge accounts and buyers you reference already exist — the upload validates against them.
  • Existing documents must be in a state Oracle allows you to change (for example a Standard PO that can be reapproved). Contract Purchase Agreements cannot be changed by this upload.

Choose the template for your document type (this is the key to “which columns”)

You do not need to work out the right columns by trial and error. The upload ships a dedicated template for each document type, and each template already contains only the columns that apply to that type. Pick the template that matches the Document Type you are loading:

Document Type (run parameter)Template to chooseOracle import program used
Standard Purchase OrderStandard Purchase Order (default)Import Standard Purchase Orders
Blanket Purchase AgreementBlanket Purchase OrderImport Price Catalogs
Contract Purchase AgreementContract Purchase OrderImport Contract Purchase Agreements
QuotationStandard QuotationImport Price Catalogs

Each template also has a “(with attachment)” variant that adds the attachment columns — use it only when you want to load document attachments at the same time. Choosing the right template is the simplest way to see exactly the columns relevant to your transaction type.

How a row is read — the four levels

A purchasing document is hierarchical, and one spreadsheet row carries values for up to four levels at once:

  1. Header — the document (supplier, buyer, currency, dates).
  2. Line — what is being bought (item/description, line type, unit price).
  3. Shipment (line location / price break) — quantity, dates, ship-to, or a price break on an agreement.
  4. Distribution — the charge account and project accounting that funds the shipment.

The header repeats on every line of the same document, a line repeats on every shipment, and a shipment repeats on every distribution. The upload finds each record by its “address” columns; if the address does not yet exist it is created, otherwise it is updated:

LevelIdentified by (its “address”)
HeaderPO Number for an existing document, or Group for a new one
LineLine Number (for Quotations the line is matched by Item)
Shipment / price breakShipment Number
DistributionDistribution Number

Use the Group column to tie several new rows into one new document (all rows that share the same Group become one PO). When adding to or changing an existing document, repeat its PO Number on every related row.

Columns that are always required

Column / parameterWhy
Operating Unit (run parameter)The operating unit the documents belong to.
Document Type (run parameter)Standard PO / Blanket / Contract / Quotation — drives the whole load.
Upload Mode (run parameter)“Create” for new documents only, “Create, Update” to also download and change existing ones.
BuyerEvery document header needs a buyer.
Approval StatusThe state to leave the imported documents in (e.g. Incomplete or Approved).
Create or Update ItemsWhether the import may create/update the item master.
Group — conditionallyRequired to create a new document when you are not supplying an existing PO Number (Contract Agreements excepted). This is the column that groups your new rows into one document. If you leave it blank on a create you get “Please enter a value for Group.”

What makes each level actually create a record

When you are creating, a level is only built if its trigger column is filled. This is the single most useful rule to remember:

To create a…You must fill…
LineLine Type (a row with no Line Type adds no line)
Shipment (Standard PO, Quotation)Ship Quantity
Price break (Blanket Agreement)Break Price
DistributionDistribution Number

Required columns when creating, by document type

In addition to the always-required columns above:

Standard Purchase Order

  • Header: Group, Buyer, Supplier, Supplier Site (Currency defaults from the supplier site).
  • Line: Line Number, Line Type, and either an Item, or a Description + Category + Unit of Measure for a description-based line; Price and Line Quantity.
  • Shipment: Ship Quantity, Need-By Date, Ship-To Organization and Ship-To Location. Leave Shipment Number blank to auto-number.
  • Distribution: Distribution Number, Charge Account and Quantity Ordered (use the Project/Task/Expenditure columns instead of a charge account for project-related distributions).

Blanket Purchase Agreement

  • Header: Group, Buyer, Supplier, Supplier Site (Amount Agreed optional).
  • Line: Line Number, Line Type, Item or Description+Category+UOM, Price.
  • Price break (optional): Shipment Number (the break number), Break Price, and optionally Quantity, Break Unit of Measure and the price-break dates.

Contract Purchase Agreement

  • Header only — contracts have no lines, shipments or distributions: Group, Buyer, Supplier, Supplier Site (Amount Agreed optional).

Quotation

  • Header: Group, Buyer, Supplier, Supplier Site (Quote Warning Delay optional).
  • Line: Line Number, Line Type, Item or Description+Category+UOM, Price.
  • Price break: Ship Quantity, Break Price, Break Unit of Measure, Price Break Start/End Date.

Updating an existing document — by the kind of change

Switch Upload Mode to “Create, Update” and run the upload with the document(s) you want to change in the download filters. The downloaded rows already contain the current values; keep the “address” columns that identify the record and only edit the column you actually want to change. Any cell you leave unchanged is ignored (a row with nothing changed returns “No change.”). The table below shows what to keep and what to fill for the common changes the team makes:

What you want to doKeep (to locate the record)Fill (the change)
Change a need-by / promised datePO Number, Line Number, Shipment NumberNeed-By Date and/or Promised Date
Change a shipment quantityPO Number, Line Number, Shipment NumberShip Quantity
Change unit price / line quantityPO Number, Line NumberPrice and/or Line Quantity
Split a shipment (line split)PO Number, Line Numbera new Shipment Number + the split’s Ship Quantity
Change distribution project / task / expenditure / quantityPO Number, Line Number, Shipment Number, Distribution Numberthe distribution column(s) you are changing
Change a descriptive flexfield (header/line/shipment/distribution)the address columns down to that levelthe DFF Context + the attribute column(s)
Add a new line to an existing documentPO Numbera new Line Number + Line Type + item/description…
Add a new shipment to an existing linePO Number, Line Numbera new Shipment Number + Ship Quantity
Add a new distributionPO Number, Line Number, Shipment Numbera new Distribution Number + Charge Account…
Add a price break (Blanket)PO Number, Line NumberBreak Price (and Shipment Number as the break number)
Add a price break (Quotation)PO Number, Line NumberShip Quantity + Break Price + Break Unit of Measure + dates

How a shipment “split” works

To split a shipment, take an existing line and enter a new Shipment Number together with the Ship Quantity you want to break out. The upload splits that quantity off the line’s original (lowest-numbered) shipment. The new shipment inherits the original shipment’s charge account — you cannot give the split a different charge account through this upload (the upload will reject the row if you try). Other shipment details (dates, ship-to, descriptive flexfields) can be set on the new split shipment.

Columns that cannot be changed on an existing purchase order

These columns can be set when you create a document, but Oracle’s change process cannot alter them on an existing one. If you change them on an update row the upload rejects the row with a clear message listing the offending columns, so the change is never silently lost:

  • Header Reference Number, Header Note to Vendor, Header Note to Receiver, Header Ship-To Location, Header Bill-To Location
  • Supplier, Supplier Site
  • Line Reference Number, Item, Item Revision, Line Note to Vendor, Ship-To Organization
  • Charge Account, Requestor

(A genuine shipment split is the one exception — the new split shipment may legitimately carry ship-to and similar values.) Contract Purchase Agreements cannot be updated at all through this upload — an update row returns “Contract Agreements cannot be updated through this upload.”

Field reference

Run parameters

ParameterPurpose
Operating UnitThe operating unit being loaded. Required.
Upload ModeCreate (new only) or Create, Update (also download existing documents to change). Required.
Document TypeStandard PO / Blanket / Contract / Quotation. Required.
Document Status, Active Price Breaks Only, Document Number / From / To, Creation Date From / To, Need By Date From / To, Agent Name, Created ByDownload filters used in Create, Update mode to choose which existing documents come into the spreadsheet.

Header columns

ColumnNotes
PO NumberExisting document to add to or change. Blank = create a new document.
GroupTies new rows into one new document. Required to create a new document (non-Contract).
Document NumberOptional — supply your own PO number instead of the system-generated one.
BuyerDocument buyer. Required.
Supplier, Supplier SiteThe supplier and site. Required to create a document.
Currency, Rate Type, Rate Date, RateDefault from the supplier site; override for foreign currency.
Effective Start/End DateAgreement effective dates (Blanket/Contract).
Amount AgreedAgreed amount on a Blanket/Contract agreement.
Quote Warning DelayQuotation warning lead time.
Header Reference Number, Header Description, Header Note to Vendor / Receiver, Header Ship-To / Bill-To LocationOptional header details (several cannot be changed on an existing PO — see above).
Header DFF Context + Header Attribute 1–15Header descriptive flexfield.

Line columns

ColumnNotes
Line NumberIdentifies the line. Required to add/locate a line.
Line TypeCreates the line — a row with no Line Type adds no line.
Item / Item Revision / Category / Description / Unit of MeasureProvide an Item, or a Description + Category + Unit of Measure for a description-based line.
PriceUnit price. Required for a goods line.
Line QuantityQuantity on a Standard PO line.
Allow Price Override, Limit PriceBlanket/agreement price controls.
Supplier Item, Line Reference Number, Line Note to VendorOptional line details.
Line DFF Context + Line Attribute 1–15Line descriptive flexfield.

Shipment / price-break columns

ColumnNotes
Shipment NumberIdentifies the shipment / price break. Blank auto-numbers a new Standard shipment.
Ship QuantityCreates a shipment (Standard PO, Quotation). Required for a shipment.
Break Price, Break Unit of Measure, Price Break Start/End DatePrice-break values. Break Price creates a price break on a Blanket Agreement.
Ship-To Organization Code, Ship-To Location CodeWhere the shipment is received.
Need-By Date, Promised DateStandard PO shipment dates (Need-By is required for a Standard shipment).
Receipt RoutingDirect / Standard / Inspection receiving routing.
Line Location DFF Context + Attribute 1–15Shipment descriptive flexfield.

Distribution columns

ColumnNotes
Distribution NumberCreates a distribution. Required for a distribution.
Quantity OrderedQuantity charged to this distribution.
Charge AccountAccount to charge (required unless the distribution is project-related). Cannot be changed on an existing PO.
RequestorDeliver-to person. Cannot be changed on an existing PO.
Project Number, Task Number, Expenditure Type, Expenditure Date, Expenditure OrgProject accounting for a project-related distribution.
Distribution DFF Context + Attribute 1–15Distribution descriptive flexfield.

Attachment columns (the “(with attachment)” templates only): Attachment Category, Title, Description, Type, Content and the file id that is auto-populated after you click Upload Attachments. Category and Type are required when adding an attachment.

Running the upload, step by step

  1. Run the PO Purchasing Document Upload in Blitz Report. Choose the template for your document type, set Upload Mode, the Operating Unit, the Document Type, and (in Create, Update mode) the download filters for the documents you want to change. The Excel file downloads and opens.
  2. Enter or edit your data following the requirements above — remember the create triggers (Line Type, Ship Quantity / Break Price, Distribution Number) and keep the address columns when changing existing records.
  3. Validate and Save using the add-in’s Validate and Save action. This checks required values and the list-of-values entries and saves the file.
  4. Upload — back in Blitz Report click Upload and select the saved file. The upload validates each row, stages the new documents and submits Oracle’s import program (or applies the change to the existing Standard PO).

What’s produced

New documents are created through Oracle’s standard import (Import Standard Purchase Orders / Import Price Catalogs / Import Contract Purchase Agreements) in the Approval Status you chose; changes to existing Standard POs are applied through Oracle’s standard PO change process. When the request finishes, a result report opens listing every uploaded row with a status of success or error and the exact Oracle message — so you can see precisely which field a row is missing instead of guessing. Fix any error rows in the same file and upload again.

Common questions

How do I know which columns I need for my change?
Start from the template for your document type (it already shows only the relevant columns), then use the “by the kind of change” table above. Keep the address columns that identify the record and fill only what you are changing.

Can I get tabs with only the columns for my transaction type?
Yes — that is exactly what the templates are. There is a separate template for Standard PO, Blanket, Contract and Quotation, each containing only the columns that apply to it. Choose the one you need when you run the upload.

I changed one cell but the row says “No change.”
The upload compares each cell to the stored value and ignores anything unchanged. Make sure the cell you edited is actually different from the downloaded value, and that you kept the address columns so the upload can find the record.

Why was my change to the Item / Supplier / Charge Account rejected?
Those columns cannot be changed on an existing purchase order (see the list above). They can only be set when the document is first created.

Can I change a Contract Agreement?
No. Contract Purchase Agreements can be created but not updated through this upload.

How do I split a shipment?
On the existing line, enter a new Shipment Number and the Ship Quantity to break out. The new shipment is split from the original and inherits its charge account.

Troubleshooting

MessageCauseWhat to do
Please enter a value for Group.Creating a new document with no PO Number and no Group.Enter a Group value to tie the new rows into one document (not needed for Contracts).
The following cannot be changed on an existing purchase order: …An update row changes a column Oracle cannot alter on an existing PO.Remove those changes (Item, Supplier, Charge Account, Requestor, reference numbers, ship-to, etc.) and re-upload.
Charge Account on a new shipment is inherited from the original shipment and cannot be set via this upload.A shipment split tried to set a different charge account.Leave Charge Account blank on the split; the new shipment inherits the original account.
Contract Agreements cannot be updated through this upload.An update row for a Contract Agreement.Contracts can only be created. Maintain existing contracts in Oracle.
This action cannot be performed by the upload.The row does not amount to a supported create or change (for example no line/shipment/distribution trigger column and nothing changed).Fill the trigger column for the level you intend to create (Line Type, Ship Quantity/Break Price, Distribution Number) or the column you intend to change.
Import program completed in Error (see Oracle request id)Oracle’s import rejected the staged document(s) — usually a missing or invalid line/shipment/distribution value.Open the named Oracle request, read the rejection, correct the field and re-upload.
with document_types_ as
(
select /*+ inline */
case when pdtav.document_type_code='QUOTATION' then pdtav.document_type_code else pdtav.document_subtype end document_type,
pdtav.type_name document_type_name
from
po_document_types_all_vl pdtav,
hr_all_organization_units_vl haouv
where
2=2 and
3=3 and
pdtav.org_id=haouv.organization_id and
pdtav.document_type_code in ('PO','PA','QUOTATION') and
pdtav.document_subtype in ('BLANKET','CONTRACT','STANDARD')
),
po_lines_ as
(
select /*+ inline */
pla.po_line_id,
pla.note_to_vendor,
pla.line_reference_num,
pla.po_header_id,
pla.line_num,
pltt.line_type,
msiv.concatenated_segments item,
pla.item_revision,
pla.unit_meas_lookup_code unit_of_measure,
pla.unit_price,
xxen_util.meaning(pla.allow_price_override_flag,'YES_NO',0) allow_price_override,
pla.not_to_exceed_price limit_price,
pla.quantity line_quantity,
pla.item_description description,
pla.vendor_product_num supplier_item,
mcv.category_concat_segs category,
xxen_util.display_flexfield_context(201,'PO_LINES',pla.attribute_category) line_dff_context,
xxen_util.display_flexfield_value(201,'PO_LINES',pla.attribute_category,'ATTRIBUTE1',pla.rowid,pla.attribute1) line_attribute1,
xxen_util.display_flexfield_value(201,'PO_LINES',pla.attribute_category,'ATTRIBUTE2',pla.rowid,pla.attribute2) line_attribute2,
xxen_util.display_flexfield_value(201,'PO_LINES',pla.attribute_category,'ATTRIBUTE3',pla.rowid,pla.attribute3) line_attribute3,
xxen_util.display_flexfield_value(201,'PO_LINES',pla.attribute_category,'ATTRIBUTE4',pla.rowid,pla.attribute4) line_attribute4,
xxen_util.display_flexfield_value(201,'PO_LINES',pla.attribute_category,'ATTRIBUTE5',pla.rowid,pla.attribute5) line_attribute5,
xxen_util.display_flexfield_value(201,'PO_LINES',pla.attribute_category,'ATTRIBUTE6',pla.rowid,pla.attribute6) line_attribute6,
xxen_util.display_flexfield_value(201,'PO_LINES',pla.attribute_category,'ATTRIBUTE7',pla.rowid,pla.attribute7) line_attribute7,
xxen_util.display_flexfield_value(201,'PO_LINES',pla.attribute_category,'ATTRIBUTE8',pla.rowid,pla.attribute8) line_attribute8,
xxen_util.display_flexfield_value(201,'PO_LINES',pla.attribute_category,'ATTRIBUTE9',pla.rowid,pla.attribute9) line_attribute9,
xxen_util.display_flexfield_value(201,'PO_LINES',pla.attribute_category,'ATTRIBUTE10',pla.rowid,pla.attribute10) line_attribute10,
xxen_util.display_flexfield_value(201,'PO_LINES',pla.attribute_category,'ATTRIBUTE11',pla.rowid,pla.attribute11) line_attribute11,
xxen_util.display_flexfield_value(201,'PO_LINES',pla.attribute_category,'ATTRIBUTE12',pla.rowid,pla.attribute12) line_attribute12,
xxen_util.display_flexfield_value(201,'PO_LINES',pla.attribute_category,'ATTRIBUTE13',pla.rowid,pla.attribute13) line_attribute13,
xxen_util.display_flexfield_value(201,'PO_LINES',pla.attribute_category,'ATTRIBUTE14',pla.rowid,pla.attribute14) line_attribute14,
xxen_util.display_flexfield_value(201,'PO_LINES',pla.attribute_category,'ATTRIBUTE15',pla.rowid,pla.attribute15) line_attribute15
from
po_lines_all pla,
po_line_types_tl pltt,
mtl_categories_v mcv,
mtl_system_items_vl msiv
where
nvl(pla.cancel_flag,'N')='N' and
nvl(pla.closed_code,'OPEN')<>'FINALLY CLOSED' and
pltt.language=userenv('lang') and
pltt.line_type_id=pla.line_type_id and
pla.category_id=mcv.category_id(+) and
msiv.inventory_item_id(+) = pla.item_id and
msiv.organization_id(+) = xxen_po_upload.get_inv_org_id(pla.org_id)
),
po_line_locations_ as
(
select /*+ inline */
plla.po_line_id,
plla.line_location_id,
plla.shipment_num,
plla.quantity ship_quantity,
plla.price_override break_price,
plla.unit_meas_lookup_code break_unit_of_measure,
plla.price_discount discount,
mp.organization_code ship_to_organization_code,
hla.location_code ship_to_location_code,
plla.need_by_date,
plla.promised_date,
rrh.routing_name receipt_routing,
plla.start_date price_break_start_date,
plla.end_date price_break_end_date,
xxen_util.display_flexfield_context(201,'PO_LINE_LOCATIONS',plla.attribute_category) line_location_dff_context,
xxen_util.display_flexfield_value(201,'PO_LINE_LOCATIONS',plla.attribute_category,'ATTRIBUTE1',plla.rowid,plla.attribute1) line_location_attribute1,
xxen_util.display_flexfield_value(201,'PO_LINE_LOCATIONS',plla.attribute_category,'ATTRIBUTE2',plla.rowid,plla.attribute2) line_location_attribute2,
xxen_util.display_flexfield_value(201,'PO_LINE_LOCATIONS',plla.attribute_category,'ATTRIBUTE3',plla.rowid,plla.attribute3) line_location_attribute3,
xxen_util.display_flexfield_value(201,'PO_LINE_LOCATIONS',plla.attribute_category,'ATTRIBUTE4',plla.rowid,plla.attribute4) line_location_attribute4,
xxen_util.display_flexfield_value(201,'PO_LINE_LOCATIONS',plla.attribute_category,'ATTRIBUTE5',plla.rowid,plla.attribute5) line_location_attribute5,
xxen_util.display_flexfield_value(201,'PO_LINE_LOCATIONS',plla.attribute_category,'ATTRIBUTE6',plla.rowid,plla.attribute6) line_location_attribute6,
xxen_util.display_flexfield_value(201,'PO_LINE_LOCATIONS',plla.attribute_category,'ATTRIBUTE7',plla.rowid,plla.attribute7) line_location_attribute7,
xxen_util.display_flexfield_value(201,'PO_LINE_LOCATIONS',plla.attribute_category,'ATTRIBUTE8',plla.rowid,plla.attribute8) line_location_attribute8,
xxen_util.display_flexfield_value(201,'PO_LINE_LOCATIONS',plla.attribute_category,'ATTRIBUTE9',plla.rowid,plla.attribute9) line_location_attribute9,
xxen_util.display_flexfield_value(201,'PO_LINE_LOCATIONS',plla.attribute_category,'ATTRIBUTE10',plla.rowid,plla.attribute10) line_location_attribute10,
xxen_util.display_flexfield_value(201,'PO_LINE_LOCATIONS',plla.attribute_category,'ATTRIBUTE11',plla.rowid,plla.attribute11) line_location_attribute11,
xxen_util.display_flexfield_value(201,'PO_LINE_LOCATIONS',plla.attribute_category,'ATTRIBUTE12',plla.rowid,plla.attribute12) line_location_attribute12,
xxen_util.display_flexfield_value(201,'PO_LINE_LOCATIONS',plla.attribute_category,'ATTRIBUTE13',plla.rowid,plla.attribute13) line_location_attribute13,
xxen_util.display_flexfield_value(201,'PO_LINE_LOCATIONS',plla.attribute_category,'ATTRIBUTE14',plla.rowid,plla.attribute14) line_location_attribute14,
xxen_util.display_flexfield_value(201,'PO_LINE_LOCATIONS',plla.attribute_category,'ATTRIBUTE15',plla.rowid,plla.attribute15) line_location_attribute15
from
po_line_locations_all plla,
mtl_parameters mp,
hr_locations_all hla,
rcv_routing_headers rrh
where
plla.ship_to_location_id=hla.location_id(+) and
plla.ship_to_organization_id=mp.organization_id(+) and
plla.receiving_routing_id=rrh.routing_header_id(+) and
plla.po_release_id is null
)
select
null action_,
null status_,
null message_,
null modified_columns_,
pha.org_id,
to_number(null) request_id_,
to_number(null) interface_header_id,
pha.po_header_id,
pha.segment1 po_number,
null group_,
null document_number,
pha.revision_num,
pha.creation_date,
pt.document_type_name document_type,
po_headers_sv3.get_po_status(pha.po_header_id) document_status,
pha.start_date effective_start_date,
pha.end_date effective_end_date,
pha.currency_code,
gdct.user_conversion_type rate_type,
pha.rate_date,
pha.rate,
pha.reference_num header_reference_num,
pha.comments header_description,
papf.full_name buyer,
pv.vendor_name supplier_name,
pvsa.vendor_site_code supplier_site,
pha.blanket_total_amount amount_agreed,
xxen_util.meaning(pha.global_agreement_flag,'YES_NO',0) global_agreement,
xxen_util.meaning(pha.supply_agreement_flag,'YES_NO',0) supply_agreement,
pha.quote_warning_delay,
pha.note_to_vendor header_note_to_vendor,
pha.note_to_receiver header_note_to_receiver,
xxen_util.display_flexfield_context(201,'PO_HEADERS',pha.attribute_category) header_dff_context,
xxen_util.display_flexfield_value(201,'PO_HEADERS',pha.attribute_category,'ATTRIBUTE1',pha.rowid,pha.attribute1) header_attribute1,
xxen_util.display_flexfield_value(201,'PO_HEADERS',pha.attribute_category,'ATTRIBUTE2',pha.rowid,pha.attribute2) header_attribute2,
xxen_util.display_flexfield_value(201,'PO_HEADERS',pha.attribute_category,'ATTRIBUTE3',pha.rowid,pha.attribute3) header_attribute3,
xxen_util.display_flexfield_value(201,'PO_HEADERS',pha.attribute_category,'ATTRIBUTE4',pha.rowid,pha.attribute4) header_attribute4,
xxen_util.display_flexfield_value(201,'PO_HEADERS',pha.attribute_category,'ATTRIBUTE5',pha.rowid,pha.attribute5) header_attribute5,
xxen_util.display_flexfield_value(201,'PO_HEADERS',pha.attribute_category,'ATTRIBUTE6',pha.rowid,pha.attribute6) header_attribute6,
xxen_util.display_flexfield_value(201,'PO_HEADERS',pha.attribute_category,'ATTRIBUTE7',pha.rowid,pha.attribute7) header_attribute7,
xxen_util.display_flexfield_value(201,'PO_HEADERS',pha.attribute_category,'ATTRIBUTE8',pha.rowid,pha.attribute8) header_attribute8,
xxen_util.display_flexfield_value(201,'PO_HEADERS',pha.attribute_category,'ATTRIBUTE9',pha.rowid,pha.attribute9) header_attribute9,
xxen_util.display_flexfield_value(201,'PO_HEADERS',pha.attribute_category,'ATTRIBUTE10',pha.rowid,pha.attribute10) header_attribute10,
xxen_util.display_flexfield_value(201,'PO_HEADERS',pha.attribute_category,'ATTRIBUTE11',pha.rowid,pha.attribute11) header_attribute11,
xxen_util.display_flexfield_value(201,'PO_HEADERS',pha.attribute_category,'ATTRIBUTE12',pha.rowid,pha.attribute12) header_attribute12,
xxen_util.display_flexfield_value(201,'PO_HEADERS',pha.attribute_category,'ATTRIBUTE13',pha.rowid,pha.attribute13) header_attribute13,
xxen_util.display_flexfield_value(201,'PO_HEADERS',pha.attribute_category,'ATTRIBUTE14',pha.rowid,pha.attribute14) header_attribute14,
xxen_util.display_flexfield_value(201,'PO_HEADERS',pha.attribute_category,'ATTRIBUTE15',pha.rowid,pha.attribute15) header_attribute15,
hla2.location_code header_ship_to_location,
hla1.location_code header_bill_to_location,
to_number(null) interface_line_id,
pl.po_line_id,
pl.line_num,
pl.line_reference_num,
pl.line_type,
pl.item,
pl.item_revision,
pl.category,
pl.description,
pl.unit_of_measure,
pl.unit_price price,
xxen_util.meaning(pl.allow_price_override,'YES_NO',0) allow_price_override,
pl.limit_price,
pl.line_quantity,
pl.supplier_item,
pl.note_to_vendor line_note_to_vendor,
pl.line_dff_context,
pl.line_attribute1,
pl.line_attribute2,
pl.line_attribute3,
pl.line_attribute4,
pl.line_attribute5,
pl.line_attribute6,
pl.line_attribute7,
pl.line_attribute8,
pl.line_attribute9,
pl.line_attribute10,
pl.line_attribute11,
pl.line_attribute12,
pl.line_attribute13,
pl.line_attribute14,
pl.line_attribute15,
to_number(null) interface_line_location_id,
pll.line_location_id,
pll.shipment_num,
pll.ship_quantity,
pll.break_price,
pll.break_unit_of_measure,
--pll.discount,
pll.ship_to_organization_code,
pll.ship_to_location_code,
pll.need_by_date,
pll.promised_date,
pll.receipt_routing,
pll.price_break_start_date,
pll.price_break_end_date,
pll.line_location_dff_context,
pll.line_location_attribute1,
pll.line_location_attribute2,
pll.line_location_attribute3,
pll.line_location_attribute4,
pll.line_location_attribute5,
pll.line_location_attribute6,
pll.line_location_attribute7,
pll.line_location_attribute8,
pll.line_location_attribute9,
pll.line_location_attribute10,
pll.line_location_attribute11,
pll.line_location_attribute12,
pll.line_location_attribute13,
pll.line_location_attribute14,
pll.line_location_attribute15,
to_number(null) interface_distribution_id,
pda.po_distribution_id,
pda.distribution_num,
pda.quantity_ordered,
gcck.concatenated_segments charge_account,
case when pda.deliver_to_person_id is not null then (select papf.full_name from per_all_people_f papf where papf.person_id=pda.deliver_to_person_id and trunc(sysdate) between papf.effective_start_date and papf.effective_end_date) end requestor,
case when pda.project_id is not null then (select ppev.project_number from pa_projects_expend_v ppev where ppev.project_id=pda.project_id) end project_number,
case when pda.task_id is not null then (select ptaev.task_number from pa_tasks_all_expend_v ptaev where ptaev.task_id= pda.task_id and ptaev.expenditure_org_id=pda.org_id) end task_number,
pda.expenditure_type,
pda.expenditure_item_date expenditure_date,
case when pda.expenditure_organization_id is not null then  (select poev.name from pa_organizations_expend_v poev where poev.organization_id= pda.expenditure_organization_id) end expenditure_org,
xxen_util.display_flexfield_context(201,'PO_DISTRIBUTIONS',pda.attribute_category) distribution_dff_context,
xxen_util.display_flexfield_value(201,'PO_DISTRIBUTIONS',pda.attribute_category,'ATTRIBUTE1',pda.rowid,pda.attribute1) distribution_attribute1,
xxen_util.display_flexfield_value(201,'PO_DISTRIBUTIONS',pda.attribute_category,'ATTRIBUTE2',pda.rowid,pda.attribute2) distribution_attribute2,
xxen_util.display_flexfield_value(201,'PO_DISTRIBUTIONS',pda.attribute_category,'ATTRIBUTE3',pda.rowid,pda.attribute3) distribution_attribute3,
xxen_util.display_flexfield_value(201,'PO_DISTRIBUTIONS',pda.attribute_category,'ATTRIBUTE4',pda.rowid,pda.attribute4) distribution_attribute4,
xxen_util.display_flexfield_value(201,'PO_DISTRIBUTIONS',pda.attribute_category,'ATTRIBUTE5',pda.rowid,pda.attribute5) distribution_attribute5,
xxen_util.display_flexfield_value(201,'PO_DISTRIBUTIONS',pda.attribute_category,'ATTRIBUTE6',pda.rowid,pda.attribute6) distribution_attribute6,
xxen_util.display_flexfield_value(201,'PO_DISTRIBUTIONS',pda.attribute_category,'ATTRIBUTE7',pda.rowid,pda.attribute7) distribution_attribute7,
xxen_util.display_flexfield_value(201,'PO_DISTRIBUTIONS',pda.attribute_category,'ATTRIBUTE8',pda.rowid,pda.attribute8) distribution_attribute8,
xxen_util.display_flexfield_value(201,'PO_DISTRIBUTIONS',pda.attribute_category,'ATTRIBUTE9',pda.rowid,pda.attribute9) distribution_attribute9,
xxen_util.display_flexfield_value(201,'PO_DISTRIBUTIONS',pda.attribute_category,'ATTRIBUTE10',pda.rowid,pda.attribute10) distribution_attribute10,
xxen_util.display_flexfield_value(201,'PO_DISTRIBUTIONS',pda.attribute_category,'ATTRIBUTE11',pda.rowid,pda.attribute11) distribution_attribute11,
xxen_util.display_flexfield_value(201,'PO_DISTRIBUTIONS',pda.attribute_category,'ATTRIBUTE12',pda.rowid,pda.attribute12) distribution_attribute12,
xxen_util.display_flexfield_value(201,'PO_DISTRIBUTIONS',pda.attribute_category,'ATTRIBUTE13',pda.rowid,pda.attribute13) distribution_attribute13,
xxen_util.display_flexfield_value(201,'PO_DISTRIBUTIONS',pda.attribute_category,'ATTRIBUTE14',pda.rowid,pda.attribute14) distribution_attribute14,
xxen_util.display_flexfield_value(201,'PO_DISTRIBUTIONS',pda.attribute_category,'ATTRIBUTE15',pda.rowid,pda.attribute15) distribution_attribute15,
null approval_status,
null create_or_update_items,
null group_lines,
null attachment_category_,
null attachment_title_,
null attachment_description_,
null attachment_type_,
null attachment_content_,
null attachment_file_id_
from
po_headers_all pha,
gl_daily_conversion_types gdct,
per_all_people_f papf,
po_vendors pv,
po_vendor_sites_all pvsa,
hr_locations_all hla1,
hr_locations_all hla2,
po_distributions_all pda,
gl_code_combinations_kfv gcck,
hr_all_organization_units_vl haouv,
document_types_ pt,
po_lines_ pl,
po_line_locations_ pll
where
nvl(:p_create_empty_file,'N')<>'Y' and
1=1 and
2=2 and
pha.org_id=haouv.organization_id and
pha.rate_type=gdct.conversion_type(+) and
pha.type_lookup_code=pt.document_type and
papf.person_id=pha.agent_id and
trunc(sysdate) between papf.effective_start_date and papf.effective_end_date and
pha.vendor_id=pv.vendor_id(+) and
pha.vendor_site_id=pvsa.vendor_site_id(+) and
pha.bill_to_location_id=hla1.location_id(+) and
pha.ship_to_location_id=hla2.location_id(+) and
pha.po_header_id=pl.po_header_id(+) and
pl.po_line_id=pll.po_line_id(+) and
pll.line_location_id=pda.line_location_id(+) and
(pll.price_break_end_date is null or pll.price_break_end_date >= trunc(sysdate) or :p_active_price_breaks_only is null) and
pda.code_combination_id=gcck.code_combination_id(+) and
nvl(pha.cancel_flag,'N')='N' and
nvl(pha.closed_code,'OPEN')='OPEN' and
nvl(pha.frozen_flag,'N')='N' and
nvl(pha.user_hold_flag,'N')='N'
Parameter NameSQL textValidation
Operating Unit
haouv.name=:operating_unit
LOV
Upload Mode
:upload_mode like '%' || xxen_upload.action_update
LOV
Create Empty File
 
LOV
Document Type
case when pdtav.document_type_code='QUOTATION' then pdtav.document_type_code else pdtav.document_subtype end=:document_type
LOV
Document Status
po_headers_sv3.get_po_status(pha.po_header_id) =:document_status
LOV
Active Price Breaks Only
 
LOV
Document Number
pha.segment1=:document_number
LOV
Document Number From
pha.segment1>=:document_number_from
LOV
Document Number To
pha.segment1<=:document_number_to
LOV
Creation Date From
pha.creation_date>=:creation_date_from
Date
Creation Date To
pha.creation_date<:creation_date_to+1
Date
Need By Date From
pll.need_by_date>=:need_by_date_from
Date
Need By Date To
pll.need_by_date<:need_by_date_to+1
Date
Agent Name
papf.full_name=:agent
LOV
Created By
pha.created_by in (select user_id from fnd_user where user_name=:created_by)
LOV
Download
Blitz Report™