Query : to find the process in Workflow using a known function name or Activity name

select
wat1.display_name "process name",wat.display_name "activity name",wa.function "function"
from wf_process_activities wpa
,wf_activities_tl wat
,wf_activities_tl wat1
,wf_activities wa
where wpa.activity_item_type = wa.item_type
and wpa.instance_label = wa.name
and wat.item_type = wa.item_type
and wat.version = wa.version
and wat.language = 'US'
and wat.name = wa.name
and wat1.name = wpa.process_name
and wat1.item_type = wat.item_type
and wat1.version = wat.version
and wat1.language = wat.language
and wat1.version = wpa.process_version
and (upper(wa.function) like '%'||upper('&func_name')||'%' or (wa.FUNCTION IS NULL AND '&func_name'='%'))
and (upper(wat.display_name) like '%'||upper('&act_name')||'%' or (wat.display_name IS NULL AND '&act_name'='%'))

Using this query we can find the workflow process name where the given function name or activity is being called.

Query : Query to find receipts against a PO shipment line

execute fnd_client_info.set_org_context('org_id');

SELECT
pol.po_header_id,
pol.po_line_id,
pll.line_location_id,
pll.quantity,
rsh. shipment_header_id,
rsh. receipt_source_code,
rsh. vendor_id,
rsh. vendor_site_id,
rsh. organization_id,
rsh. shipment_num,
rsh. receipt_num,
rsh. ship_to_location_id,
rsh. bill_of_lading,
rsl.shipment_line_id,
rsl.QUANTITY_SHIPPED,
rsl.QUANTITY_RECEIVED ,
rct.transaction_type,
rct.transaction_id,
decode(pol.order_type_lookup_code,'RATE',nvl(rct.amount,0),'FIXED PRICE',nvl(rct.amount,0),
nvl(rct.source_doc_quantity,0) ) transaction_qty
from rcv_transactions rct
, rcv_shipment_headers rsh
, rcv_shipment_lines rsl
, po_lines pol
, po_line_locations pll
where rct.po_line_location_id = 28302 --- check it out
and rct.po_line_location_id = pll.line_location_id
and rct.po_line_id = pol.po_line_id
and nvl(pol.order_type_lookup_code,'QUANTITY') NOT IN ('RATE','FIXED PRICE')
and rct.shipment_line_id=rsl.shipment_line_id
and rsl.shipment_header_id=rsh.shipment_header_id
order by rct.transaction_id
/

R12 - how does iExpenses join to ap_checks_all

R12 does have the ap_expense_report_headers_all.vouchno column. You can join the ap_expense_report_headers_all.vouchno with ap_invoices_all.invoice_id.

Alternatively, you can also use the following join, ap_invoices_all.PRODUCT_TABLE = 'AP_EXPENSE_REPORT_HEADERS_ALL' AND ap_invoices_all.REFERENCE_KEY1 = ap_expense_report_headers_all.report_header_id.

However, would suggested to  use the invoice_id and vouchno join.