Search This Blog

Sunday, November 17, 2019

Oracle Apps R12 query for attachments from backend for sshr txns

1. get the item_key, for workflow administrator

select * from hr_api_transactions
where item_key = '217855'

2. get the transaction_id and other details from query 1,
the transaction_id can be in pk5_value or pk1_value for the below query 2.
if not then query based on created_by, creation_date from query 1.

 select  fd.*, fl.*--,fad.*--fd.*,
         from fnd_attached_documents fad 
             ,fnd_documents fd 
             ,fnd_lobs fl
             ,fnd_document_datatypes fdd
             ,fnd_document_categories_tl fdct   
         where fad.document_id = fd.document_id 
         and   fd.media_id     = fl.file_id 
         and   fd.datatype_id  = fdd.datatype_id
         and   fd.category_id  = fdct.category_id 
         and   fdd.user_name   = 'File' 
        --and   fad.entity_name = 'XXASSET' -- replace with the entity_name you want to extract.
        and fdct.language = 'US'
        --and pk5_value = '217855'
        and fad.creation_date like to_date('27-oct-2019')
        and fad.created_by = 12345
           
       
        and fd.creation_date like sysdate