Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
q=book/export/html/514
1. You need to list out all Internal Requisitions that do not have an associated Internal Sales
order.
1. ---
used to list all Internal Requisitions that do not have an associated Internal Sales o
rder
3. RQL.LINE_NUM,
4. RQL.REQUISITION_HEADER_ID ,
5. RQL.REQUISITION_LINE_ID,
6. RQL.ITEM_ID ,
7. RQL.UNIT_MEAS_LOOKUP_CODE ,
8. RQL.UNIT_PRICE ,
9. RQL.QUANTITY ,
10. RQL.QUANTITY_CANCELLED,
11. RQL.QUANTITY_DELIVERED ,
12. RQL.CANCEL_FLAG ,
13. RQL.SOURCE_TYPE_CODE ,
14. RQL.SOURCE_ORGANIZATION_ID ,
15. RQL.DESTINATION_ORGANIZATION_ID,
16. RQH.TRANSFERRED_TO_OE_FLAG
17. from
19. where
2. You want to display what requisition and PO are linked(Relation with Requisition and PO )
4. from po_headers_all p,
5. po_distributions_all d,
6. po_req_distributions_all rd,
7. po_requisition_lines_all rl,
8. po_requisition_headers_all r
2. select prh.REQUISITION_HEADER_ID,
3. prh.PREPARER_ID ,
5. trunc(prh.CREATION_DATE),
6. prh.DESCRIPTION,
7. prh.NOTE_TO_AUTHORIZER
9. apps.po_action_history pah
4. You need to list those PR which havn't auto created to PO.(Purchase Requisition without a
Purchase Order)
1. -----
list all Purchase Requisition without a Purchase Order that means a PR has not been au
tocreated to PO.
2. select
8. prl.item_description "Description",
9. prl.quantity "Qty",
13. from
22. po.po_headers_all ph
23. WHERE
5. You need to list all information form PR to PO ...as a requisition moved from different stages till
converting into PR. This query capture all details related to that PR to PO.
1. ----- List and all data entry from PR till PO
2.
6. pord.LAST_UPDATED_BY,
7. porh.Authorization_Status "Status",
8. porh.Description "Description",
18. apps.fnd_user u
24. order by 2
list all Purchase Requisition without a Purchase Order that means a PR has not been au
tocreated to PO.
2. select
8. prl.item_description "Description",
9. prl.quantity "Qty",
13. from
22. po.po_headers_all ph
23. WHERE
7. List all the PO's with there approval ,invoice and Payment Details
1. ----- List and PO With there approval , invoice and payment details
2. select
8. f.ADDRESS_LINE1 "ADDRESS",
9. f.city "CITY",
19. (NVL(c.quantity_ordered,0)-
28. (select
32. a.amount_paid,
33. h.amount,
34. h.check_id,
38.
40. AP.AP_INVOICE_DISTRIBUTIONS_ALL B,
41. PO.PO_DISTRIBUTIONS_ALL C,
42. PO.PO_HEADERS_ALL D,
43. PO.PO_VENDORS E,
44. PO.PO_VENDOR_SITES_ALL F,
45. PO.PO_LINES_ALL G,
46. AP.AP_INVOICE_PAYMENTS_ALL H,
47. AP.AP_CHECKS_ALL I
8.You need to know the link to GL_JE_LINES table for purchasing accrual and budgetary
control actions..
The budgetary (encumbrance) and accrual actions in the purchasing module generate records that
will be imported into GL for the corresponding accrual and budgetary journals.
The following reference fields are used to capture and keep PO information in the
GL_JE_LINES table.
These reference fields are populated when the Journal source (JE_SOURCE in
GL_JE_HEADERS) is
Purchasing.
Take a note for Period end accruals, the REFERENCE_5 column is not used.
2. select
4. h.authorization_status "STATUS",
6. ll.line_location_id,
7. d.po_distribution_id ,
8. h.type_lookup_code "TYPE"
9. from
10. po.po_headers_all h,
11. po.po_lines_all l,
13. po.po_distributions_all d
Approved
Cancelled
In Process
Incomplete
Pre-Approved
Rejected
and you should note: When we finally close the requisition from Requisition Summary form the
authorization_status of the requisition does not change. Instead it's closed_code becomes
'FINALLY CLOSED'.
1. -----
list all Purchase Requisition without a Purchase Order that means a PR has not been autocreate
d to PO.
2. select
3. prh.segment1 "PR NUM",
4. trunc(prh.creation_date) "CREATED ON",
5. trunc(prl.creation_date) "Line Creation Date" ,
6. prl.line_num "Seq #",
7. msi.segment1 "Item Num",
8. prl.item_description "Description",
9. prl.quantity "Qty",
10. trunc(prl.need_by_date) "Required By",
11. ppf1.full_name "REQUESTOR",
12. ppf2.agent_name "BUYER"
13. from
14. po.po_requisition_headers_all prh,
15. po.po_requisition_lines_all prl,
16. apps.per_people_f ppf1,
17. (select distinct agent_id,agent_name from apps.po_agents_v ) ppf2,
18. po.po_req_distributions_all prd,
19. inv.mtl_system_items_b msi,
20. po.po_line_locations_all pll,
21. po.po_lines_all pl,
22. po.po_headers_all ph
23. WHERE
24. prh.requisition_header_id = prl.requisition_header_id
25. and prl.requisition_line_id = prd.requisition_line_id
26. and ppf1.person_id = prh.preparer_id
27. and prh.creation_date between ppf1.effective_start_date and ppf1.effective_end_date
28. and ppf2.agent_id(+) = msi.buyer_id
29. and msi.inventory_item_id = prl.item_id
30. and msi.organization_id = prl.destination_organization_id
31. and pll.line_location_id(+) = prl.line_location_id
32. and pll.po_header_id = ph.po_header_id(+)
33. AND PLL.PO_LINE_ID = PL.PO_LINE_ID(+)
34. AND PRH.AUTHORIZATION_STATUS = 'APPROVED'
35. AND PLL.LINE_LOCATION_ID IS NULL
36. AND PRL.CLOSED_CODE IS NULL
37. AND NVL(PRL.CANCEL_FLAG,'N') <> 'Y'
38. ORDER BY 1,2
PO_HEADERS_ALL
po_lines_all
po_line_locations_all
select * from po_line_locations_all where po_header_id =<po_header_id>;
po_distributions_all
po_releases_all
RCV_SHIPMENT_HEADERS
RCV_SHIPMENT_LINES
RCV_TRANSACTIONS
RCV_ACCOUNTING_EVENTS
RCV_RECEIVING_SUB_LEDGER
MTL_MATERIAL_TRANSACTIONS
MTL_TRANSACTION_ACCOUNTS
AP_INVOICE_DISTRIBUTIONS_ALL
AP_INVOICES_ALL
PA_EXPENDITURE_ITEMS_ALL
GL_INTERFACE
SELECT *
FROM GL_INTERFACE GLI
WHERE user_je_source_name ='Purchasing'
AND gl_sl_link_table ='RSL'
AND reference21='PO'
AND EXISTS
( SELECT 1
FROM rcv_receiving_sub_ledger RRSL
WHERE GLI.reference22 =RRSL.reference2
AND GLI.reference23 =RRSL.reference3
AND GLI.reference24 =RRSL.reference4
AND RRSL.rcv_transaction_id in
(select transaction_id from rcv_transactions
where po_header_id <po_header_id>));
GL_IMPORT_REFERENCES
SELECT *
FROM gl_import_references GLIR
WHERE reference_1='PO'
AND gl_sl_link_table ='RSL'
AND EXISTS
( SELECT 1
FROM rcv_receiving_sub_ledger RRSL
WHERE GLIR.reference_2 =RRSL.reference2
AND GLIR.reference_3 =RRSL.reference3
AND GLIR.reference_4 =RRSL.reference4
AND RRSL.rcv_transaction_id in
(select transaction_id from rcv_transactions
where po_header_id =<po_header_id>))
A single Query covering P2P life Cycle
A single Query covering P2P life Cycle
In real business world, many time when system is running external/internal auditor are more
interested in scrutiny of:
· Therefore thought to share this query, hope this would be great help who have such kind of
adhoc requirement from daily life.
· Here is query:
· SELECT
A.ORG_ID "ORG ID",
E.VENDOR_NAME "VENDOR NAME",
UPPER(E.VENDOR_TYPE_LOOKUP_CODE) "VENDOR TYPE",
F.VENDOR_SITE_CODE "VENDOR SITE",
F.ADDRESS_LINE1 "ADDRESS",
F.CITY "CITY",
F.COUNTRY "COUNTRY",
TO_CHAR(TRUNC(D.CREATION_DATE)) "PO DATE",
D.SEGMENT1 "PO NUMBER",
D.TYPE_LOOKUP_CODE "PO TYPE",
C.QUANTITY_ORDERED "QTY ORDERED",
C.QUANTITY_CANCELLED "QTY CANCALLED",
G.ITEM_DESCRIPTION "ITEM DESCRIPTION",
G.UNIT_PRICE "UNIT PRICE",
(NVL(C.QUANTITY_ORDERED,0)-
NVL(C.QUANTITY_CANCELLED,0))*NVL(G.UNIT_PRICE,0) "PO Line Amount",
(SELECT
DECODE(PH.APPROVED_FLAG, 'Y', 'Approved')
FROM PO.PO_HEADERS_ALL PH
WHERE PH.PO_HEADER_ID = D.PO_HEADER_ID) "PO STATUS",
A.INVOICE_TYPE_LOOKUP_CODE "INVOICE TYPE",
A.INVOICE_AMOUNT "INVOICE AMOUNT",
TO_CHAR(TRUNC(A.INVOICE_DATE)) "INVOICE DATE",
A.INVOICE_NUM "INVOICE NUMBER",
(SELECT
DECODE(X.MATCH_STATUS_FLAG, 'A', 'Approved')
FROM AP.AP_INVOICE_DISTRIBUTIONS_ALL X
WHERE X.INVOICE_DISTRIBUTION_ID = B.INVOICE_DISTRIBUTION_ID)"Invoice
Approved?",
A.AMOUNT_PAID,
H.AMOUNT,
I.CHECK_NUMBER "CHEQUE NUMBER",
TO_CHAR(TRUNC(I.CHECK_DATE)) "PAYMENT DATE"
FROM AP.AP_INVOICES_ALL A,
AP.AP_INVOICE_DISTRIBUTIONS_ALL B,
PO.PO_DISTRIBUTIONS_ALL C,
PO.PO_HEADERS_ALL D,
PO.PO_VENDORS E,
PO.PO_VENDOR_SITES_ALL F,
PO.PO_LINES_ALL G,
AP.AP_INVOICE_PAYMENTS_ALL H,
AP.AP_CHECKS_ALL I
WHERE A.INVOICE_ID = B.INVOICE_ID
AND B.PO_DISTRIBUTION_ID = C. PO_DISTRIBUTION_ID (+)
AND C.PO_HEADER_ID = D.PO_HEADER_ID (+)
AND E.VENDOR_ID (+) = D.VENDOR_ID
AND F.VENDOR_SITE_ID (+) = D.VENDOR_SITE_ID
AND D.PO_HEADER_ID = G.PO_HEADER_ID
AND C.PO_LINE_ID = G.PO_LINE_ID
AND A.INVOICE_ID = H.INVOICE_ID
AND H.CHECK_ID = I.CHECK_ID
AND F.VENDOR_SITE_ID = I.VENDOR_SITE_ID
AND C.PO_HEADER_ID IS NOT NULL
AND A.PAYMENT_STATUS_FLAG = 'Y'
AND D.TYPE_LOOKUP_CODE != 'BLANKET';
1.Item Creation:
2.Supplier Creation:
3.Buyer Creation:
-------------------------------------------------
1.Item Creation:
2.Supplier Creation:
3.Buyer Creation:
Buyer Creation:
==================
1.REQUISITION:
Requisition: is one of the purchasing document will be prepared by the employee when
ever he required the materials or Services or Training and so on.
we have two types of Requisitions 1)Internal
2)Purchase
Internal requisition will be created if materials are receiving from another Inventory
inside of the organization.
Purchase requisition will be created while purchasing the materials from the Suppliers.
Requisitions=>Requisitions
Open the Requisition form enter the Reqno and select the type at Header level
Enter the Items information at line level like Item name,qty,unitprice,tax and so on
select Distributions button enter the Distributions details.
Save
Select the Button called Approve button to go for approving the Requisition Document
Open the Requisition summary form.
Enter the Reqno select find button we can find the Requisition status wether it is
approved or not.
select Tools menu => View Action History to find the history details
Select Tools Menu =>Control option to Cancel the requisition.
Once the Requisition is Approved Buyer will prepare thre RFQ document which will be
delivered to the supplier. Supplier will respond for that with quotation.
we have Three types of RFQ documents
BID RFQ:This will be prepared for the secific fixed quantity and there won't be any
PriceBraeaks(Discounts).
catalog RFQ: This will be create for te materials which we will purchase from the
suppliers regularley , and large number of quantity. Here we can specify the
Price Breaks.
Standard RFQ: This will be prepared for the Items which we will purchase only once
not very often,Here we can include the Discounts information at different
auantity levels.
RFQ Information will be entered at 3 Level
1)Headers
2)Lines
3)Price Breaks(CATALOG,STANDARD) or Shippments (Only for Bid RFQ)
Payment Terms: When Organization is going to make the payment and Interest rates
Fright Terms: Who is going to Bear the Tansportation chargers wether Buyer or Supplier
FOB(FreeOnBoard): If any materials damage or any missing quantity is there then the
the responsiboility of those materials.
Carrier : In which Transportation Company Organization Required Materials
Transportation company Name.
Quotation is another purchasing document we will receive from the Supplier which
contains the supplier quote details , Price, Payment terms and so on.
Whatever the quotations we have received from the supplier we will enter in the system
through form.
For Bid RFQ we will receive Bid quotation from the Supplier
For Catalog RFQ we will receive Catalog quotation from the Supplier
For Standard RFQ we will receive Standard quotation from the Supplier.
After enter all the quotations in the system management will do quote analysis as per
that one best quotation will be elected as Purchase Order.
Quotation Report
4.PURCHASE ORDER:
PO is one of the Main document which will be prepared and approved by the buyer and
send it to the supplier. which contains the following information
terms and Conditions
Items deails
Qty,Price
Distiribution and Shipment Details and so on.
AUTO CREATE:
It is one of the Purchasing feature to create the RFQ and PO documents automatically
by using requisition lines.
5.RECEIPTS:
Receipts are one of the documents it will be used to find out how much quantity Supplier
has supplied. We will find out Purchase Order status if it is successfully approved then we will
create the Receipt. We will give the PO Number select Findbutton check the PO lines right mark
and save. It will create the Receipt number select Header button it will shows the receipt
Once Receipt will created go Inventory module and check whether the requested items are
received or not by using these tables.
2-way:- Purchase Order and Invoice Quantities must match within tolerance before the
corresponding invoice can be paid.
3-way:- Purchase Order, Receipts and Invoice Quantities must match with in tolerance before
the corresponding invoice can be paid.
4-way:- Purchase Order, Receipts, Inspection and Invoice Quantities must match with in
tolerance before the corresponding invoice can be paid.
From the company point of view a person or Organization who is going to receive amount we
will call as Supplier.
Types of Invoices:-
1. Standard
2. Credit Memo
3. Debit Memo
4. With Holding Tax
5. Po Default
6. Mixed
7. Pre Payment
8. Expense Report
9. Recurring Invoices
10. Quick Match
Standard Invoice:- We will create the Standard Invoice to particular Supplier and Supplier
site we will enter the invoice amount, invoice date and soon……..
Credit Memo & Debit Memo Invoices:- Both Invoices has got negative (-ve) amount and
adjusted against Standard Invoice. Credit Memo will be created whenever Supplier is giving
discount. Debit Memo will be created if buyer is going to deduct the amount.
With Holding Tax Invoice:- If supplier is not registered supplier then buyer will make the
Income Tax to the government on behalf of supplier.
Po Default Invoice:- Here we will create the Invoice as per Purchase Order amount. We will
give the Po number system will retrieve PO amount and Invoice will be created as
per PO details.
Prepayment Invoice:- When ever we want make payment to supplier in advance that tome
we will create this Prepayment Invoice and we make the Payment.
Expense Reports Invoice:- It will be created for employee expenses as per the employee
grade, position this Invoices will be calculated.
Recurring Invoice:- For some of the Invoices we will not be having supplier invoice that time
we will create Recurring Invoices.
Ex:- For rent account we will be creating Invoice which has got fixed amount and fixed rate
(duration).
Quick Match Invoice:- While creating Purchase Order we will be giving the match approval
option as per that match approval we will create the Invoice and the Invoice type is Quick Match
Invoice.
Mixed Invoice:- Mixed Invoices will be created for miscellaneous expenses. Once we create
the invoice you have to do following 3 activities.
1. Validate Invoice
2. Approve the Invoice
3. Create Accounting entries for Invoice
INVOICES
Here we will select the Invoice type and we will give the Supplier number, name, site invoice
date, invoice number, invoice currencies, and amount. Select Distributions button to distribute
the Invoice amount into different accounts.
1. Invoice total should be equal to the distributions total then we will call it as Invoice validated
successfully.
2. Select Actions…1 button chooses approve check box press OK then system will approve
the Invoice.
3. Select Actions…1 button choose create accounting check box press OK button it will
create the accounting entries we can see all this accounting transactions from tools view
accounting option.
Invoice Holds:- If invoice is not approved then that invoice will be keeping under hold status.
By selecting holds button in invoice form we can see the holds details.
PAYMENTS:
Payments:- Once the Invoice is approved then we can go for payments. The Payments are
or 3 types. They were
1. Manual
2. Quick
3. Refund
Manual:- Here we will issue the checks manually to the supplier and we will capture that
information in the payment scheme by using manual payment option.
Quick:- Through the Quick Payment type we can generate checks through the system and
we can have the transactions directly in the system.
Refund:- When ever company is going to give advance back to the customer that time we will
select payment type as Refund.
Distribution Set:- It is one of the option is available in Invoices Screen. While creating the
Invoice we will attach distribution set. System will automatically create the transactions in
distributions forms as per the distribution set.
Navigation:
To view posting:
After submitting the request select viewà output button. It will shows number of
transactions has been transferred to G.L. then select G.L Module (General Ledger, Vision
Operations (USA)).
Action History of PO
, pha.segment1 po
, gcc.segment3 acct
, acct_desc.description acct_desc
, gcc.segment4 ctr
, ctr_desc.description ctr_desc
, papf.full_name req_raised_by
, reqah.full_name req_last_approver
, poah.full_name po_last_approver
, pv.vendor_name supplier
, pvsa.vendor_site_code site
, po.po_requisition_lines_all prla
, po.po_line_locations_all plla
, po.po_lines_all pla
, po.po_headers_all pha
, po.po_distributions_all pda
, gl.gl_code_combinations gcc
, apps.po_vendors pv
, apps.po_vendor_sites_all pvsa
, apps.fnd_flex_values_vl acct_desc
, apps.fnd_flex_values_vl ctr_desc
, hr.per_all_people_f papf
, (SELECT papf.full_name
, pah.action_code
, pah.object_id
, po.po_requisition_headers_all prha
, applsys.fnd_user fu
, hr.per_all_people_f papf
AND papf.effective_end_date
AND pah.sequence_num =
(SELECT MAX(sequence_num)
, (SELECT papf.full_name
, pah.action_code
, pah.object_id
, po.po_headers_all pha
, applsys.fnd_user fu
, hr.per_all_people_f papf
AND papf.effective_end_date
AND pah.sequence_num =
(SELECT MAX(sequence_num)
AND papf.effective_end_date
ORDER BY prha.segment1
, gcc.segment4
PO to GL query
hope this will help to you.... keep watching this site for more updates or bookmark this
site.
RQL.LINE_NUM,
RQL.REQUISITION_HEADER_ID ,
RQL.REQUISITION_LINE_ID,
RQL.ITEM_ID ,
RQL.UNIT_MEAS_LOOKUP_CODE ,
RQL.UNIT_PRICE ,
RQL.QUANTITY ,
RQL.QUANTITY_CANCELLED,
RQL.QUANTITY_DELIVERED ,
RQL.CANCEL_FLAG ,
RQL.SOURCE_TYPE_CODE ,
RQL.SOURCE_ORGANIZATION_ID ,
RQL.DESTINATION_ORGANIZATION_ID,
RQH.TRANSFERRED_TO_OE_FLAG
from
where
RQL.REQUISITION_HEADER_ID = RQH.REQUISITION_HEADER_ID
and RQL.SOURCE_TYPE_CODE = 'INVENTORY'
SELECT pah.action_code
, pah.object_id
, pah.action_date
, pah.sequence_num step
, pah.creation_date
, prha.segment1 req_num
, prha.wf_item_key
, prha.authorization_status
, fu.description
, papf.full_name hr_full_name
, papf.employee_number emp_no
, pj.NAME job
, po.po_requisition_headers_all prha
, applsys.fnd_user fu
, hr.per_all_people_f papf
, hr.per_all_assignments_f paaf
, hr.per_jobs pj