如何从总账获取分类账信息
R12 中, 总账所有表中不在保存子分类账信息,如日记账表中没有任何的发票、付款等信息。
ORACLE 通过 XLA 连接(link) 总账(GL) 和子分类账(SubLedger):gl_sl_link_id。
step 1: GL -> XLA
gl.gl_je_lines.je_batch/header_id/line_num = gl.gl_import_references.je_batch/header_id/line_num gl_je_lines -> gl_import_references
gl.gl_import_references.gl_sl_link_id = xla.xla_ae_lines.gl_sl_link_id gl_import_references -> xla_ae_lines
gl.gl_import_references.gl_sl_link_table = xla.xla_ae_lines.gl_sl_link_table
step 2: XLA 连接 发票、付款等
方式一:
xla_ae_lines/xla_distribution_links -> Subledger distribution tables
1.1 如果 xla_distribution_links.source_distribution_type = 'AP_INV_DIST' (AP Invoice Distribution)
关联方式:xla_distribution_links.source_distribution_id_num_1 = ap_invoice_distributions_all.invoice_distribution_id
再走:ap_invoice_distributions_all -> ap_invoices_all -> ap_checks_all 找到发票、付款、供应商等信息
1.2 如果xla_distribution_links.source_distribution_type = 'AP_PREPAY' (预付款)
关联方式:xla_distribution_links.source_distribution_id_num_1 = ap_prepay_app_dists.prepay_app_dist_id
再走:ap_invoice_distributions_all -> ap_invoices_all -> ap_checks_all 找到发票、付款、供应商等信息
2. 如果 xla_distribution_links.source_distribution_type = 'AP_PMT_DIST' (AP Payment Distribution)
关联方式:xla_distribution_links.source_distribution_id_num_1 = ap_payment_hist_dists.invoice_payment_id
再走:ap_invoice_payments_all -> ap_checks_all
方式二:XLA_AE_LINES/XLA_AE_HEADERS/XLA_EVENTS -> Subledger events table