SLA 概述
SLA : 子分类账 (Subledger Accounting) ,这个在 R12 中大力宣扬的内容 , 我们通常的认为总账就是对 Journal 的汇总 , 但是在实际的操作中我们会发现 , 对于 Sub system 过来的 Journal, 并不能单纯的以一种逻辑进行汇总 , 比如 AP 传入到 GL 的 request ,虽然有丰富的选项用来进行汇总 , 但是对于是否要汇总 Detail Journal, 财务人员的思考角度跟我们是不一样的 , 并不能这样简单的 Summary ,针对不同的 Invoice ,可能期望得到的 Journal 样子不太一样 . 因此 , 就需要 SLA 这个新的模块进来对这些特殊性质的 Journal 进行处理 . 其实这个模块也不是 R12 所特有的 , 在 11i 下面 , 我们就可以看见有些 Form, DB 的 object 是以 XLA 开头的 , 其实就是 Subledger Accounting 。
SLA 设置
SLA 常用表介绍
在 SLA 中技术方面最常用的就是日记账来源追溯,在追溯的过程中从 GL 到 SLA 和 11i 差别不大,都是通过 gl_import_references 表来进行,该表的 je_batch_id , je_header_id , je_line_num 是和 GL 关联,该表字段 gl_sl_link_id 是和 SLA 中的行表 (XLA_AE_LINES) 关联,在 SLA 中重要的几张表如下 :
XLA_EVENTS:
The XLA_EVENTS table record all information related to a specific event. This table is created as a type XLA_ARRAY_EVENT_TYPE.
XLA_TRANSACTION_ENTITIES:
The table XLA_TRANSACTION_ENTITIES contains information about sub-ledger document or transactions.
XLA_AE_HEADERS:
The XLA_AE_HEADERS table stores Subledger Journal entries. There is a one-to-many relationship between accounting events and journal entry headers.
XLA_AE_LINES:
The XLA_AE_LINES table stores the Subledger Journal entry lines. There is a one-to-many relationship between Subledger Journal entry headers and Subledger Journal entry lines.
XLA_DISTRIBUTION_LINKS:
The XLA_DISTRIBUTION_LINKS table stores the link between transactions and Subledger Journal entry lines.
SLA 与各子模块之间的关联设置
上面提到的 gl_import_references.gl_sl_link_id 字段就是和 xla_ae_lines.gl_sl_link_id 字段关联,在这些表中和子模块关联的字段在 xla_transaction_entities 中,该表中有如下形式的字段 :
源表关联字段
source_id_int_num
source_id_char_num
( 这两个字段是用来 和 源模块关联,该字段设置在各个子模块中 )
路径:
Setup — >Accounting Setup — >Subledger Accounting Setup — >Accounting Methods Builder — >Events — >Event Model
( 设置— > 会计科目设置— > 子分类账会计设置— > 会计方法生成器— > 事件— > 事件模型 )
( 注:各子模块的路径稍有不同,大致如上 )
下面就以 AR 模块为例展示如下:

该界面的 Entity Code[ 实体代码 ] 对应 xla_transaction_entities 表中的 ENTITY_CODE 字段,每个来源就标示了该子分类账是哪个模块产生的。点击 Identifiers[ 标示 ] 进入如下界面:该界面中的 Entity Table Column[ 实体表列字段 ] 是子模块相关源表的字段, Identifier Column[ 标示列 ] 就是 SLA 中 xla_transaction_entities 表的列, SLA 和各子模块的联系就是通过该界面的设置来完成的。

安全性控制字段
security_id_int_num
security_id_char_num
这两个字段是用来进行安全验证,数据屏蔽使用的, xla_transaction_entities 是有 VPD 验证的表,各个模块使用的策略函数是通过如下界面来设置的:
路径: Setup — >Accounting Setup — >Subledger Accounting Setup — >Subledger application
( 设置 — > 会计科目设置 — > 子分类账会计设置 — > 子分类账应用产品 )
( 注:各子模块的路径稍有不同,大致如上 )

SLA 与各子模块之间 ER 图
1. SLA 与 AP_INVOICE

2. SLA 与 AP_PAYMENT

3. SLA 与 AR_TRANSACTIONS

4. SLA 与 AR_RECEIPTS

5. SLA 与 AR_ADJUSTMENT

6. SLA 与 FA_TRANSACTIONS

7. SLA 与 FA_DEPRECIATION

8. SLA 与 PA_REVENUE

9. SLA 与 PA_EXPENDITURES

10. SLA 与 PO_RECEIVE

11. SLA 与 INV_TRANSACTIONS

12. SLA 与 WIP_TRANSACTIONS

