Friday 11 August 2017

Query to find GL Journal Batch Approval status with history

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%';


No comments:

Post a Comment

AP Invoice Notes related Table details in Oracle Fusion

 What is the table that stores the AP Invoice notes? AP notes are stored in ZMM_NOTES table with SOURCE_OBJECT_CODE = 'AP_STANDARD_INVOI...