Thursday 4 June 2015

Oracle iExpense attachment data store in fnd_lobs table

Oracle iExpense attachment for every report will get stored in fnd_lobs table. There is table fnd_attached_documents in which column pk1_value stores line_id for expense report which you can join with ap_expense_report_lines_all. Media_id column from fnd_documents will be file_id in fnd_lobs table.

SELECT *
FROM fnd_lobs
WHERE file_id IN
                      (SELECT fd.media_id
                        FROM fnd_documents_tl fdtl,
                                    fnd_documents fd,
                                    fnd_attached_documents fad
                       WHERE fdtl.document_id = fd.document_id
                       AND fd.document_id = fad.document_id
                     AND fad.entity_name = 'OIE_LINE_ATTACHMENTS'
                     AND fad.pk1_value = '204771') -- line_id from expense line                                                 

No comments:

Post a Comment

How to resolve issue for BIP RTF template XML tags showing value as <?ref: 0000xx?>

 How to resolve issue for BIP RTF template XML tags showing value as <?ref: 0000xx?>  Sometime these xml data tags automatically chang...