Search This Blog

Wednesday, September 9, 2015

Query for Standard and Blanket Purchase order Details

Below query can be handy to retrieve details for Standard Purchase order and Blanket Purchase order with releases. The query is not completely tested and is only for reference.

SELECT poh.segment1 po_number
     , poh.type_lookup_code
     , pr.release_num
     , poh.creation_date
     , pv.vendor_name supplier
     , pvs.vendor_site_code supplier_site_code
     , hl.location_code ship_to_location_code
     , pb.agent_name buyer_name
     , msi.segment1 item_number
     , msi.description item_desc
     , msi.inventory_item_status_code item_status
     , pll.quantity
     , pll.quantity_received
     , pll.quantity_cancelled
     , pll.quantity_billed
     , pol.unit_price
     , mp.organization_code receiving_org_code
     , (SELECT mc.concatenated_segments
        FROM mtl_categories_kfv mc, mtl_item_categories mic, mtl_category_sets mcs
        WHERE mcs.category_set_name = 'PURCHASING'
          AND mcs.category_set_id = mic.category_set_id
          AND mic.inventory_item_id = msi.inventory_item_id
          AND mic.organization_id = msi.organization_id
          AND mic.category_id = mc.category_id)
          po_category
FROM po_headers_all poh
   , po_lines_all pol
   , po_line_locations_all pll
   , po_releases_all pr
   , mtl_system_items msi
   , org_organization_definitions mp
   , po_vendors pv
   , po_vendor_sites_all pvs
   , po_agents_v pb
   , hr_locations hl
   , hr_operating_units hou
WHERE poh.type_lookup_code IN ('BLANKET', 'STANDARD')
  AND msi.inventory_item_id = pol.item_id
  AND msi.organization_id = pll.ship_to_organization_id
  AND mp.organization_id = msi.organization_id
  AND poh.po_header_id = pol.po_header_id
  AND pol.po_line_id = pll.po_line_id
  AND pr.po_header_id(+) = poh.po_header_id
  AND NVL (pll.po_release_id, 1) = NVL (pr.po_release_id, 1)
  AND poh.vendor_id = pv.vendor_id
  AND poh.vendor_site_id = pvs.vendor_site_id
  AND pvs.vendor_id = pv.vendor_id
  AND pb.agent_id = poh.agent_id
  AND hl.location_id = poh.ship_to_location_id
  AND poh.org_id = hou.organization_id
  AND hou.short_code = 'VIS-US'
ORDER BY poh.segment1, pr.release_num

Thursday, March 19, 2015

Query for Drop Ship Order

Below query can be helpful to get integrated information for drop ship orders

SELECT h.order_number
     , l.line_number so_line_number
     , ph.segment1 po_number
     , l.ordered_item
     , l.ordered_quantity
     , por.release_num
     , pl.line_num po_line_number
     , ph.authorization_status
     , prh.interface_source_code
     , prh.segment1 requisition_number
     , prl.line_num requisition_line_number
     , ph.closed_date
     , ph.closed_code
     , ods.header_id so_header_id
     , ods.line_id so_line_id
     , prh.requisition_header_id
     , prl.requisition_line_id
     , ph.po_header_id
     , pl.po_line_id
     , pll.line_location_id po_line_location_id
     , por.po_release_id
FROM oe_drop_ship_sources ods
   , oe_order_headers_all h
   , oe_order_lines_all l
   , po_line_locations_all pll
   , po_lines_all pl
   , po_headers_all ph
   , po_requisition_headers_all prh
   , po_requisition_lines_all prl
   , po_releases_all por
WHERE h.header_id = l.header_id
  AND h.header_id = ods.header_id
  AND l.line_id = ods.line_id
  AND por.po_release_id(+) = ods.po_release_id
  AND ods.line_location_id = pll.line_location_id(+)
  AND ods.po_header_id = pl.po_header_id(+)
  AND ods.po_line_id = pl.po_line_id(+)
  AND ph.po_header_id(+) = pl.po_header_id
  AND prl.requisition_header_id(+) = ods.requisition_header_id
  AND prl.requisition_line_id(+) = ods.requisition_line_id
  AND prh.requisition_header_id(+) = prl.requisition_header_id
  AND h.order_number = :sales_order;


Tuesday, January 7, 2014

Accounting Entries in Procure to Pay (P2P) cycle


A quick review on accounting entries in Procure to Pay cycle.

    Purchase Requisition creation: No entry
    Purchase Order creation: No entry
    Inventory Receipt:
    Inventory A/c…………….Debit
    AP Accrual A/C………Credit(This A/c We are giving in Financial Option)
    At the time of Matching the Invoice with Purchase Order
    AP Accrual A/c………….Debit
    Supplier A/c…………..Credit
    At the time of making payment to supplier
    Supplier A/C…………… Debit
    Bank A/c…………….Credit

Tuesday, January 19, 2010

Types of Purchase Orders

Different types of purchase order in Oracle
Standard Purchase Order: A standard purchase orders is generally created for one–time purchase of various items. Standard purchase orders is created when we know the details of the goods or services we require, estimated costs, quantities, delivery schedules, and accounting distributions.

Blanket Purchase Agreements: A blanket purchase agreements are created when we know the detail of the goods or services we plan to buy from a specific supplier in a period, but we do not yet know the detail of your delivery schedules. Blanket purchase agreements can be used to specify negotiated prices for items before actually purchasing them. Blanket purchase agreements can be created for a single organization or to be shared by different business units of organization (global agreements).

Blanket Releases: A blanket release is issued against a blanket purchase agreement to
place the actual order (as long as the release is within the blanket agreement effectivity dates).

Contract Purchase Agreements: A contract purchase agreement is an agreement between buyer and a supplier for unspecified goods or services. This agreement may include terms and conditions, amount, and effective dates. Later Standard Purchase orders can be issued based on the agreements decided.

Planned Purchase Orders: A planned purchase order is a long–term agreement committing to buy items or services from a single source. Tentative delivery schedules and all other details like item, price, quantity is specified in planned purchase orders. We can issue scheduled releases against planned purchase order to create standard purchase orders.

Sunday, December 6, 2009

Error in RCV Transactions Interface (Receiving Transaction Processor)

When trying to use RCV interfaces and ran Receiving transaction Processor import program, the transaction errored out with message "The parameters passed to procedure populate_cost_details are invalid."

In the documentation, the column name LAST_UPDATE_LOGIN is noted as "optional".
However, the columns user_id and login_id in package
inv_wwacst.populate_cost_details are selected from
mtl_material_transactions_temp table in inltpu, which is populated by the
Receiving Interface Manager. These columns are expected to be NOT null and
will error if they are null. The solution is to populate the LAST_UPDATE_LOGIN
with a value (type is Number. Even though Purchasing does not require this
field to be populated, this is required in Inventory when the items are
delivered.

Refer Metalink Note: 99533.1

Keywords: Receiving Open Interface, RVCTP, PO Receipts, populate_cost_details

Saturday, January 26, 2008

Link Purchase Order and Requisition

You have a purchase order and you have a requisition, but wait how do you know how this purchase order is linked with requisition. Here is the query thats answers this. Use this query find linked Purchase order and Requisition.
This could be really a helpful one.


SELECT prh.segment1 req_number
,prh.authorization_status
,prl.line_num req_line_num
,prl.item_description req_item_description
,prl.unit_price req_unit_price
,prl.quantity req_quantity
,pd.req_header_reference_num
,pd.req_line_reference_num
,pl.line_num
,pl.item_description
,pl.quantity
,pl.amount
,ph.segment1 po_number
,prd.distribution_id
,pd.req_distribution_id
FROM po_requisition_headers_all prh
,po_requisition_lines_all prl
,po_req_distributions_all prd
,po_distributions_all pd
,po_line_locations_all pll
,po_lines_all pl
,po_headers_all ph
WHERE prh.requisition_header_id = prl.requisition_header_id
and prh.org_id = prl.org_id
and prl.requisition_line_id = prd.requisition_line_id
and prl.org_id = prd.org_id
and prd.distribution_id = pd.req_distribution_id(+)
and prd.org_id = pd.org_id(+)
and pd.line_location_id = pll.line_location_id(+)
and pd.org_id = pll.org_id(+)
and pll.po_line_id = pl.po_line_id(+)
and pll.org_id = pl.org_id(+)
and pl.po_header_id = ph.po_header_id(+)
and pl.org_id = ph.org_id(+)

Copyright (c) All rights reserved. Presented by Suresh Vaishya