10: g_debug_flag BOOLEAN;
11:
12: -- information on the flexfield. This is the same for the source and target
13: -- charts of accounts.
14: g_flexfield fnd_flex_key_api.flexfield_type;
15:
16: -- information on the target chart of accounts structure
17: g_target_structure fnd_flex_key_api.structure_type;
18:
13: -- charts of accounts.
14: g_flexfield fnd_flex_key_api.flexfield_type;
15:
16: -- information on the target chart of accounts structure
17: g_target_structure fnd_flex_key_api.structure_type;
18:
19: -- list of segments for the target chart of accounts
20: g_target_segments fnd_flex_key_api.segment_list;
21:
16: -- information on the target chart of accounts structure
17: g_target_structure fnd_flex_key_api.structure_type;
18:
19: -- list of segments for the target chart of accounts
20: g_target_segments fnd_flex_key_api.segment_list;
21:
22: -- number of segments for the target chart of accounts
23: g_target_nSegments NUMBER;
24:
179: INTO g_num_segment_rules
180: FROM gl_cons_segment_map
181: WHERE coa_mapping_id = mapping_id;
182:
183: -- This statement is necessary to use the fnd_flex_key_api package's
184: -- subroutines.
185: fnd_flex_key_api.set_session_mode('customer_data');
186:
187: -- gets information on the target flexfield
181: WHERE coa_mapping_id = mapping_id;
182:
183: -- This statement is necessary to use the fnd_flex_key_api package's
184: -- subroutines.
185: fnd_flex_key_api.set_session_mode('customer_data');
186:
187: -- gets information on the target flexfield
188: g_flexfield := fnd_flex_key_api.find_flexfield
189: (appl_short_name => g_application_short_name,
184: -- subroutines.
185: fnd_flex_key_api.set_session_mode('customer_data');
186:
187: -- gets information on the target flexfield
188: g_flexfield := fnd_flex_key_api.find_flexfield
189: (appl_short_name => g_application_short_name,
190: flex_code => g_id_flex_code
191: );
192:
190: flex_code => g_id_flex_code
191: );
192:
193: -- gets information on the structure of the target chart of accounts
194: g_target_structure := fnd_flex_key_api.find_structure
195: (flexfield => g_flexfield,
196: structure_number => to_coa_id
197: );
198:
196: structure_number => to_coa_id
197: );
198:
199: -- gets the list of segments for the chart of accounts
200: fnd_flex_key_api.get_segments(flexfield => g_flexfield,
201: structure => g_target_structure,
202: nsegments => g_target_nSegments,
203: segments => g_target_segments
204: );
950: where_1 VARCHAR2(4000);
951: where_2 VARCHAR2(4000);
952:
953: -- information on the source chart of accounts structure
954: source_structure fnd_flex_key_api.structure_type;
955:
956: -- list of segments for the source chart of accounts
957: source_segments fnd_flex_key_api.segment_list;
958:
953: -- information on the source chart of accounts structure
954: source_structure fnd_flex_key_api.structure_type;
955:
956: -- list of segments for the source chart of accounts
957: source_segments fnd_flex_key_api.segment_list;
958:
959: -- number of segments for the source chart of accounts
960: source_nSegments NUMBER;
961:
983: ORDER BY ffs1.segment_num;
984:
985: BEGIN
986: -- gets information on the structure of the source chart of accounts
987: source_structure := fnd_flex_key_api.find_structure
988: (flexfield => g_flexfield,
989: structure_number => from_coa_id
990: );
991:
989: structure_number => from_coa_id
990: );
991:
992: -- gets the list of segments for the source chart of accounts
993: fnd_flex_key_api.get_segments(flexfield => g_flexfield,
994: structure => source_structure,
995: nsegments => source_nSegments,
996: segments => source_segments
997: );