处理要进行COA的校验之外,还要进行账套配置这个地方,平衡段的校验,相关参参照关系见如下sql(Doc ID 943582.1):
-- 1.
SELECT *
FROM gl_ledgers
WHERE ledger_id = &ledger_id;
--2.
SELECT *
FROM gl_ledger_configurations
WHERE configuration_id = < configuration_id returned FROM FIRST query >;
--3.
SELECT *
FROM gl_ledger_config_Details
WHERE configuration_id = < configuration_id returned FROM FIRST query >;
--4.
SELECT *
FROM gl_le_value_sets
WHERE legal_entity_id IN
(SELECT object_id
FROM gl_ledger_config_details
WHERE configuration_id = < configuration_id returned FROM FIRST query >
AND object_type_code = 'LEGAL_ENTITY');
--5.
SELECT *
FROM gl_legal_entities_bsvs
WHERE legal_entity_id IN
(SELECT object_id
FROM gl_ledger_config_details
WHERE configuration_id = < configuration_id returned FROM FIRST query >
AND object_type_code = 'LEGAL_ENTITY');
--6.
SELECT *
FROM gl_ledger_norm_seg_vals
WHERE ledger_id IN (SELECT OBJECT_ID
FROM gl_ledger_config_Details
WHERE configuration_id = < configuration_id returned FROM FIRST
query >
AND object_type_code IN ('PRIMARY', 'SECONDARY'))
OR legal_entity_id IN (SELECT OBJECT_ID
FROM gl_ledger_config_Details
WHERE configuration_id = < configuration_id returned FROM FIRST
query >
AND object_type_code IN ('LEGAL_ENTITY'));
--7.
SELECT *
FROM gl_ledger_segment_values
WHERE ledger_id IN (SELECT OBJECT_ID
FROM gl_ledger_config_Details
WHERE configuration_id = < configuration_id returned FROM FIRST
query >
AND object_type_code IN ('PRIMARY', 'SECONDARY'))
OR legal_entity_id IN (SELECT OBJECT_ID
FROM gl_ledger_config_Details
WHERE configuration_id = < configuration_id returned FROM FIRST
query >
AND object_type_code IN ('LEGAL_ENTITY'));
--8.
SELECT *
FROM gl_ledger_relationships;