You are on page 1of 4

SQL Tutorials

1. To get list of application which are installed in the current instance (FND means Foundation
module)
a. select * from FND_APPLICATION;
b. select * from FND_APPLICATION_TL;
2. To get particular application
a. select * from FND_APPLICATION_TL where APPLICATION_NAME = 'Payables';
3. To find a report and forms, i.e .rdf and .rtf file
a. select * from FND_APPLICATION; (Here we can find basepath from which we can find
.rtf and .rdf files. Then,
b. echo $fnd_top
4. AOL Components
a. USER
i. Responsibility
1. Menu
a. Function
i. Form/OAF

Need to understand.

AOL:- Users, Responsibility, Menus, Functions, Concurrent Programs, Lookup, Valuesets, Flexfield,
RequestGroup, messages, RequestForm, Personalization, XML Publisher Template Definitions, Profiles
 Table combination

select pha.segment1, pha.po_header_id, pha.org_id


, pla.line_num, pla.po_line_id, pla.UNIT_MEAS_LOOKUP_CODE
, pll.shipment_num, pll.line_location_id, pll.UNIT_MEAS_LOOKUP_CODE
from po_headers_all pha
, po_lines_all pla
, po_line_locations_all pll
where pll.po_line_id = pla.po_line_id
and pla.po_header_id = pha.po_header_id
and pha.segment1 = 413815;

 Use the following scripts to find out if the routing is not setup for the PO:

select po_header_id,
from po_headers_all where segment1 = 'PO#'; Insert the problem PO number

select po_line_id, line_num


from po_lines_all
where po_header_id = 'value returned from above';

select line_location_id, receiving_routing_id


from po_line_locations_all
where po_header_id = value returned from #1 and po_line_id = value returned
from #2

select routing_name, description


from rcv_routing_headers
where routing_header_id = insert value returned for receiving_routing_id from #3

If the last query does not return any rows then the Routing has not been set up correctly.

 Searching Receipt Fails with APP-PO-14142: rcv_receipts_eh.event-000


ORA-1403
 http://oracle-dba-quickanswers.blogspot.com/2012/01/searching-receipt-fails-with-app-
po.html

 Get PO Approval Limits in Oracle Apps


SELECT DISTINCT a.user_id, a.employee_id, a.user_name, a.description,
b.responsibility_name, b.description, d.full_name, e.job_id,
g.CONTROL_GROUP_ID, g.control_group_name, h.object_code, h.amount_limit
FROM fnd_user a,
fnd_responsibility_vl b,
fnd_user_resp_groups_direct c,
per_all_people_f d,
per_all_assignments_f e,
po_position_controls_all f,
po_control_groups_all g,
po_control_rules h
WHERE
a.USER_NAME = 'DSDALWADI'
AND c.user_id = a.user_id
AND b.responsibility_name = 'Purchasing Super User'
AND d.person_id = a.employee_id
AND d.person_id = e.person_id
AND e.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 = '82'
AND CONTROL_GROUP_NAME ^= 'Requisition Approval'
AND CONTROL_GROUP_NAME != 'Requisition Approval EFD'
and control_group_name != 'Requisition Approval With Capex'
ORDER BY user_name;

SELECT DISTINCT i.sequence_num, a.user_id, a.employee_id, a.user_name, a.description,


j.segment1,
b.responsibility_name, b.description, d.full_name, e.job_id,
g.CONTROL_GROUP_ID, g.control_group_name, h.object_code, h.amount_limit,
f.end_date, i.action_code, i.object_id
FROM fnd_user a,
fnd_responsibility_vl b,
fnd_user_resp_groups_direct c,
per_all_people_f d,
per_all_assignments_f e,
po_position_controls_all f,
po_control_groups_all g,
po_control_rules h,
po_action_history i,
po_headers_all j
WHERE
object_id = j.po_header_id
AND j.segment1 = '413855'
-- AND a.USER_NAME = 'PMPATEL_G1'
AND c.user_id = a.user_id
AND b.responsibility_name = 'Purchasing Super User'
AND d.person_id = a.employee_id
AND d.person_id = e.person_id
AND e.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 = '82'
-- and i.action_code = 'SUBMIT'
AND i.employee_id = a.employee_id
AND CONTROL_GROUP_NAME ^= 'Requisition Approval'
AND CONTROL_GROUP_NAME != 'Requisition Approval EFD'
AND control_group_name != 'Requisition Approval With Capex'
-- and f.END_DATE is null
ORDER BY i.SEQUENCE_NUM
;

You might also like