This document contains two SQL queries to find approval limits for requisition and purchase order document types. The first query joins four tables to retrieve the job name, control group name, object code and amount limit where the control function ID represents purchase requisitions. The second query is similar but retrieves data for purchase orders where the control function ID represents standard purchase orders.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
616 views1 page
Queries For PO Approval Limits
This document contains two SQL queries to find approval limits for requisition and purchase order document types. The first query joins four tables to retrieve the job name, control group name, object code and amount limit where the control function ID represents purchase requisitions. The second query is similar but retrieves data for purchase orders where the control function ID represents standard purchase orders.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1
Query to find the Approval Limits for Requisitions and PO Document Types
Query to find Approval Limits for Requisition
SELECT pj.NAME job_name, g.control_group_name, h.object_code, h.amount_limit FROM per_jobs pj, po_position_controls_all f, po_control_groups_all g, po_control_rules h WHERE pj.job_id = f.job_id AND f.control_group_id = g.control_group_id AND g.control_group_id = h.control_group_id AND g.org_id = 22 AND g.creation_date > sysdate - 90 AND h.creation_date > sysdate - 90 AND h.object_code = 'DOCUMENT_TOTAL' AND f.control_function_id = 8 -- 8 Represents Purchase Requisition Docume nt Type. Query to find Approval Limits for PO SELECT pj.NAME job_name, g.control_group_name, h.object_code, h.amount_limit FROM per_jobs pj, po_position_controls_all f, po_control_groups_all g, po_control_rules h WHERE pj.job_id = f.job_id AND f.control_group_id = g.control_group_id AND g.control_group_id = h.control_group_id AND g.org_id = 22 AND h.object_code = 'DOCUMENT_TOTAL' AND f.control_function_id = 1 -- 1 Represents Standard Purchase Order.