1. 相关表连接关系:
GL_JE_BATCHES (je_batch_id) => GL_JE_HEADERS (je_batch_id);
GL_JE_HEADERS (je_header_id) => GL_JE_LINES (je_header_id);
GL_JE_LINES (je_header_id, je_line_num) => GL_IMPORT_REFERENCES (je_header_id, je_line_num) ;
GL_IMPORT_REFERENCES (gl_sl_link_table, gl_sl_link_id) => XLA_AE_LINES (gl_sl_link_table, gl_sl_link_id) ;
XLA_AE_LINES (application_id, ae_header_id) => XLA_AE_HEADERS (application_id, ae_header_id) ;
XLA_AE_HEADERS (application_id, event_id) => XLA_EVENTS (application_id, event_id);
XLA_EVENTS (application_id, entity_id) => XLA.XLA_TRANSACTION_ENTITIES (application_id, entity_id);
2. AP日记帐追溯
对于AP数据,找到 xla.xla_transaction_entities 表中的记录后需要按如下情况分开追溯:
(1). entity_code 为 TRANSACTIONS 和 BILLS_RECEIVABLE 时,表中字段 source_id_int_1 对应的为 ra_customer_trx_all 表中的 customer_trx_id; 字段 security_id_int_1 对应的为 org_id
(2). entity_code 为 ADJUSTMENTS 时,表中字段 source_id_int_1 对应的为 ar_adjustments_all 表中的 adjustment_id; 字段 security_id_int_1 对应的为 org_id
(3). entity_code 为 RECEIPTS 时,表中字段 source_id_int_1 对应的为 ar_cash_receipts_all 表中的 cash_receipt_id; 字段 security_id_int_1 对应的为 org_id
(4). entity_code 为 THIRD_PARTY_MERGE 的情况不会传送至总帐,所以没有追溯。*/