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 Document 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.
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 Document 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.
Control Function ID
|
Document Type
|
1
|
Approve Standard Purchase Orders
|
2
|
Approve Contract Purchase Orders
|
3
|
Approve Planned Purchase Orders
|
4
|
Approve Blanket Purchase
Agreements
|
5
|
Approve Blanket Releases
|
6
|
Approve Scheduled Releases
|
7
|
Approve Internal Requisitions
|
8
|
Approve Purchase Requisitions
|
Thanks Uday
ReplyDelete