Requisition Report Query

Requisition Report Query, www.askhareesh.com
Headers


SELECT prh.requisition_header_id,
    PRH.SEGMENT1 ReqNO,
    PRH.type_lookup_code Reqtype,
    prh.creation_date    Cdate
FROM   PO_REQUISITION_HEADERS_ALL PRH
WHERE  PRH.SEGMENT1  = '8'
and    prh.org_id  = 204

lines


SELECT prl.REQUISITION_HEADER_ID,
    prl.REQUISITION_LINE_ID,
    prl.LINE_NUM,
    prl.QUANTITY,
    prl.UNIT_PRICE
FROM   po_requisition_lines_all prl

Distributions


select           &P_FLEXDATA   C_FLEXDATA,
                   prd.DISTRIBUTION_num,
    prd.REQUISITION_LINE_ID
from   po_req_distributions_all prd,
         GL_CODE_COMBINATIONS   GCC
WHERE GCC.Code_combination_id = prd.code_combination_id
and        CHART_OF_ACCOUNTS_ID  = :P_STRUCT_NUM;

*/