Friday, 28 April 2023

Oracle EBS - SQL Query to Get Pending Approval Journal Entry

 


SELECT 

    gjb.name BATCH_NAME, 

    decode(gjb.approval_status_code, 'A', 'Approved', 'I', 'In Process', 

               'J', 'Rejected', 'R', 'Required', 'V', 

               'Validation Failed', 'Z', 'N/A') APPROVAL_STATUS, 

    gjh.* 

FROM 

    gl_je_headers gjh, 

    gl_je_batches gjb 

WHERE 

        gjh.created_by = '3833' –USERNAME- HTRUONG , USER_ID=3833 

and gjh.creation_date >= sysdate-365 

    AND gjh.je_batch_id = gjb.je_batch_id 

    AND decode(gjb.approval_status_code, 'A', 'Approved', 'I', 'In Process', 

               'J', 'Rejected', 'R', 'Required', 'V', 

               'Validation Failed', 'Z', 'N/A') in ('Required','In Process') 

               ; 


Wednesday, 29 March 2023

Oracle EBS - SQL Query to get GL Batch Workflow Notification Item Key & Item Type

 --Get the Batch ID for Specific Batch---

select * from apps.gl_je_batches
where
name like '%FA-31-MSI-HT-MAR-23-02 Spreadsheet A 4791187 254572724%'
;

--Get the Item Key & Item Type for the specific GL Bach--
SELECT WF_PROCESS.PROCESS_NAME,
WF_IT_ACT_STATUS.*
FROM apps.WF_ITEM_ACTIVITY_STATUSES WF_IT_ACT_STATUS,
apps.WF_PROCESS_ACTIVITIES WF_PROCESS
WHERE 1=1
AND ITEM_KEY LIKE '%4662825%'-- Pass the Bactch ID Here
AND WF_IT_ACT_STATUS.ITEM_TYPE = 'GLBATCH'
AND WF_PROCESS.INSTANCE_ID = WF_IT_ACT_STATUS.PROCESS_ACTIVITY
ORDER BY BEGIN_DATE, END_DATE
;