Query to get the approval details in Fusion:
SELECT DISTINCT WF.ASSIGNEESDISPLAYNAME "Approver Name",
PRHA.REQUISITION_NUMBER "Requisition Number",
WF.TITLE Description,
SUBSTR(WF.ASSIGNEES, 1 ,INSTR(WF.ASSIGNEES, ',', 1, 1)-1) "Approval Pending with SSO",
BU.BU_NAME "Business Unit Name"
FROM FA_FUSION_SOAINFRA.WFTASK WF,
PO_ACTION_HISTORY PAH,
POR_REQUISITION_HEADERS_ALL PRHA,
FUN_ALL_BUSINESS_UNITS_V BU
WHERE PAH.IDENTIFICATION_KEY = WF.IDENTIFICATIONKEY
AND WF.STATE ='ASSIGNED'
AND WF.IDENTIFICATIONKEY LIKE 'REQ_%'
AND ASSIGNEES IS NOT NULL
AND WORKFLOWPATTERN NOT IN ('AGGREGATION', 'FYI')
AND COMPONENTNAME ='ReqApproval'
AND PAH.OBJECT_ID = PRHA.REQUISITION_HEADER_ID
and PRHA.REQ_BU_ID = BU.BU_ID
AND SUBSTR(WF.ASSIGNEES, 1 ,INSTR(WF.ASSIGNEES, ',', 1, 1)-1) = NVL(:SSO,SUBSTR(WF.ASSIGNEES, 1 ,INSTR(WF.ASSIGNEES, ',', 1, 1)-1))
and PRHA.REQUISITION_NUMBER = NVL(:REQNUM,PRHA.REQUISITION_NUMBER)
AND BU.BU_NAME = NVL(:BUNIT,BU.BU_NAME)
SELECT DISTINCT WF.ASSIGNEESDISPLAYNAME "Approver Name",
PRHA.REQUISITION_NUMBER "Requisition Number",
WF.TITLE Description,
SUBSTR(WF.ASSIGNEES, 1 ,INSTR(WF.ASSIGNEES, ',', 1, 1)-1) "Approval Pending with SSO",
BU.BU_NAME "Business Unit Name"
FROM FA_FUSION_SOAINFRA.WFTASK WF,
PO_ACTION_HISTORY PAH,
POR_REQUISITION_HEADERS_ALL PRHA,
FUN_ALL_BUSINESS_UNITS_V BU
WHERE PAH.IDENTIFICATION_KEY = WF.IDENTIFICATIONKEY
AND WF.STATE ='ASSIGNED'
AND WF.IDENTIFICATIONKEY LIKE 'REQ_%'
AND ASSIGNEES IS NOT NULL
AND WORKFLOWPATTERN NOT IN ('AGGREGATION', 'FYI')
AND COMPONENTNAME ='ReqApproval'
AND PAH.OBJECT_ID = PRHA.REQUISITION_HEADER_ID
and PRHA.REQ_BU_ID = BU.BU_ID
AND SUBSTR(WF.ASSIGNEES, 1 ,INSTR(WF.ASSIGNEES, ',', 1, 1)-1) = NVL(:SSO,SUBSTR(WF.ASSIGNEES, 1 ,INSTR(WF.ASSIGNEES, ',', 1, 1)-1))
and PRHA.REQUISITION_NUMBER = NVL(:REQNUM,PRHA.REQUISITION_NUMBER)
AND BU.BU_NAME = NVL(:BUNIT,BU.BU_NAME)
No comments:
Post a Comment