All Purchasing - Usefull Information - V.imp 2012
All Purchasing - Usefull Information - V.imp 2012
All Purchasing - Usefull Information - V.imp 2012
/* PO Notes
SELECT
requisition_header_id,
authorization_status,
type_lookup_code,
wf_item_type,
wf_item_key,
created_by,
preparer_id
FROM
po_requisition_headers_all
WHERE
created_by= (select user_id from
fnd_user where user_name ='LAJAGARL')
SELECT
requisition_header_id,
requisition_line_id,
source_type_code,
item_id,
destination_type_code,
org_id,
item_description,
destination_organization_id
FROM
po_requisition_lines_all
WHERE
creation_date = (select
max(creation_date) from
po_requisition_lines_all)
/*
Requisition Import :
In addition to creating the requisitions
online, they can also be imported as as
batch. Once imported they go into the table
po_requisitions_interface_all. Once imported,
we need to run the "Requisition Import" from
the "GL Corporate Purchasing" responsibility
which then populates the table
"po_requisition_headers_all" and
"po_requisition_lines_all" tables. While
running the requisition import, the
concurrent program asks for the source (from
where to be imported). This source value is
coming from the above interface table.
*/
vendor_site_id,authorization_status,wf_item_t
ype
wf_item_key,creation_date,
last_update_date
from po_headers_all
where segment1 = '10000080'
select po_header_id,po_line_id,item_id,
category_id, item_description,
list_price_per_unit,unit_price,
quantity, request_id
from po_lines_all
where po_header_id =24271
/*Typically the purchase order header
information will go into po_headers_all,
The purchase order lines information
will go into po_lines_all
the purchase order shipment information
will go into po_line_locations_all
(i.e the time and location,
need_by , the location where this needs to be
shipped).
These locations are usually the inventory
locations.
the purchase order distribution
information will go into po_distributions_all
(code_combination etc).
/* RECEIVING :
So once the PO is approved, it is now
ready for receiving the goods from the
Supplier.
Understanding the Receipts form : When you
first want to receive any thing and open the
receipts form, firstly it show the "Find
expected receipts". This form had various
field
like PO, receipt number, receiving
location etc. Now what we have to understand
from this form
is that,if we want to receive items
corresponding to a PO, then we have to enter
that PO number
and then press "Find" button. Now if we
want receive all the items that are supposed
to be shipped
at a receiving location, then we enter
that receiving location and press "Find"
button,
which in turn will show all the purchase
orders that ship item to that specific
receiving location.
What this means is that the form checks if
it has been already received, and if it is,
then it
will say no records exist otherwise, we
can create a new receipt record.
IF YOU HAVE ALREADY RECEIVED, THEN THIS
FORM DOES NOT SHOW ANY RECORDS AND HENCE IT
IS CALLED FIND EXPECTED RECEIPTS. AND ONCE
RECEIVED ,THEN YOU CAN GO TO
"RECEIVING TRANSACTIONS SUMMARY FORM" and
check the transactions.
*/
receipt_num,ship_to_org_id,organization_id
from rcv_shipment_headers
where shipment_header_id = 132612
select
last_update_date,shipment_header_id,shipment_
line_id,quantity_shipped,quantity_received,
shipment_line_status_code,source_document_cod
e,item_description,item_id,
po_header_id,po_line_id,po_distribution_id,po
_line_location_id,routing_header_id
,destination_type_code,to_subinventory,delive
r_to_location_id,
charge_account_id
from rcv_shipment_lines
where shipment_header_id = 132612
select
transaction_id,inventory_item_id,organization
_id, subinventory_code,rcv_transaction_id,
primary_quantity,actual_cost,source_code,cost
_category_id,
owning_organization_id,creation_date
,transaction_type_id
from mtl_material_transactions
where inventory_item_id
= (select inventory_item_id from
mtl_system_items_b
where segment1='0000799102923'
and organization_id = 82)
and creation_date >='18-OCT-2004'
--and rcv_transaction_id = 582138
*/
select
rma_reference,transaction_id,transaction_type
,quantity,interface_source_code,
source_document_code,
destination_type_code, po_header_id,
po_line_id, po_distribution_id,
routing_header_id
,subinventory,shipment_header_id,shipment_lin
e_id
from rcv_transactions
where po_header_id = 23855
--and po_line_id = 213748
-- AP related queries.
select * -- po_distributions_id from
ap_invoices_all order by creation_date desc
select * from ap_invoice_distributions_all
where po_distribution_id = 213198
------------------------HR STUFF
-- Set the environment in the production
environment (
fnd_client_info.set_org_context)
BEGIN
dbms_application_info.set_client_info(485);
END;
------------------------------
Urgent Help needed regarding a PO.
Hi
In our production system, we have a
requisition which has been created and
approved. There is a PO Autocreated for this
requisition with the current status being 'IN
PROCESS'. After this a change was made in the
requisition ,which was approved and the
change was also accepted in the PO.
--Sourcing Rules :
/* Sourcing rule indicates where an item
needs to be sourced from. That is if ever
there is a PO or req
raised against a particular item, we need to
go with which supplier.
So we first create a sourcing rule
mentioning what are the effective dates and
which supplier name.
And then assign it to an item. That is we
can assign it to an item, Inventory
Org,Operating unit etc.
If it is assgined to an item, then we always
buy that item from that particular supplier.
If is is assigned to an Inventory
Organization, then all the item in that
particular inventory org, will
be sourced from that particular supplier.
If is is assigned to an Opearting Unit, then
all the item in all inventory orgs of that
operating unit will
be sourced from that particular supplier.*/
--------------------------------
-- Quotations
select * from po_headers_all
where type_lookup_code ='RFQ'
and po_header_id = 51608