Purchase Requisition, PO [message #294355] |
Thu, 17 January 2008 05:41 |
hryzas
Messages: 1 Registered: January 2008 Location: India
|
Junior Member |
|
|
Hi,
I have created a PO from a Purchase requisition. How can I refer the requisition number(or id, or any attribute of the requisition) from the PO from the back end? In other words, which attibute links a PO with the corresponding requisition?
Any updates will be appreciated.
Thx!!
|
|
|
|
Re: Purchase Requisition, PO [message #294919 is a reply to message #294355] |
Sun, 20 January 2008 20:45 |
kzhangkzhang
Messages: 2 Registered: January 2008
|
Junior Member |
|
|
The following SQL will list the PR (Purchase Req) for a given PO (Assuming PO is created from PR):
SELECT
prha.segment1 req_num,
prha.org_id pr_ou,
poh.segment1 po_num,
poh.org_id po_ou
FROM
apps.po_requisition_headers_all prha,
apps.po_requisition_lines_all prla,
apps.po_req_distributions_all prda,
apps.po_distributions_all pda,
apps.po_line_locations_all poll,
apps.po_lines_all pol,
apps.po_headers_all poh
WHERE
1 = 1
AND poh.segment1 = '&po_number'
AND poh.po_header_id = pol.po_header_id
AND pol.po_line_id = poll.po_line_id
AND poll.line_location_id = pda.line_location_id
AND pda.req_distribution_id = prda.distribution_id
AND prda.requisition_line_id = prla.requisition_line_id
AND prla.requisition_header_id = prha.requisition_header_id
;
|
|
|