SELECT DISTINCT
gjb.NAME batch,
default_period_name period,
wn.recipient_role approver,
DECODE (gjb.approval_status_code, 'A', 'Approved', 'I', 'In Process', 'J',
'Rejected', 'R', 'Required', 'V', 'Validation Failed', 'Z', 'N/A' ) status,
wn.begin_date approval_start_date,
wn.end_date approval_end_date,
wn.due_date approval_due_date
FROM
wf_notifications wn,
wf_items wi,
gl_je_batches gjb
WHERE
wn.CONTEXT LIKE 'GLBATCH%'
||
(
SELECT
item_key
FROM
wf_items a
WHERE
a.user_key = wi.user_key
AND a.item_type = 'GLBATCH'
AND ROWNUM = 1
)
|| '%'
AND wi.item_type = wn.MESSAGE_TYPE
AND wi.user_key = gjb.NAME
AND gjb.name LIKE 'BatchName%';
gjb.NAME batch,
default_period_name period,
wn.recipient_role approver,
DECODE (gjb.approval_status_code, 'A', 'Approved', 'I', 'In Process', 'J',
'Rejected', 'R', 'Required', 'V', 'Validation Failed', 'Z', 'N/A' ) status,
wn.begin_date approval_start_date,
wn.end_date approval_end_date,
wn.due_date approval_due_date
FROM
wf_notifications wn,
wf_items wi,
gl_je_batches gjb
WHERE
wn.CONTEXT LIKE 'GLBATCH%'
||
(
SELECT
item_key
FROM
wf_items a
WHERE
a.user_key = wi.user_key
AND a.item_type = 'GLBATCH'
AND ROWNUM = 1
)
|| '%'
AND wi.item_type = wn.MESSAGE_TYPE
AND wi.user_key = gjb.NAME
AND gjb.name LIKE 'BatchName%';
No comments:
Post a Comment