Friday, 13 March 2015

To get the PR Action History Details

Hi Floks

How to get PR action history from the back-end?

Below is the query.

select hr.name ORG_NAME,prh.segment1 Requisition_Number,prh.AUTHORIZATION_STATUS,pah.LAST_UPDATE_DATE,pah.CREATION_DATE,pah.OBJECT_ID,
       NVL2(pah.ACTION_CODE,'COMPLETE','PENDING')Action_Status ,pah.ACTION_CODE,papf.full_name,pah.ACTION_DATE,pah.NOTE
from po_requisition_headers_all prh,po_action_history pah, per_all_people_f papf,hr_all_organization_units hr
where papf.person_id = pah.employee_id 
and pah.object_id = prh.REQUISITION_HEADER_ID
and prh.org_id = hr.organization_id
and prh.AUTHORIZATION_STATUS = 'IN PROCESS'
and prh.segment1 = :'PR_Number'
order by pah.LAST_UPDATE_DATE desc