20: +=======================================================================*/
21: --
22: --
23: TYPE t_rec_array_event IS RECORD
24: (array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
25: ,array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
26: ,array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L
27: ,array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
28: ,array_event_id xla_number_array_type --XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
21: --
22: --
23: TYPE t_rec_array_event IS RECORD
24: (array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
25: ,array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
26: ,array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L
27: ,array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
28: ,array_event_id xla_number_array_type --XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
29: ,array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L
22: --
23: TYPE t_rec_array_event IS RECORD
24: (array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
25: ,array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
26: ,array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L
27: ,array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
28: ,array_event_id xla_number_array_type --XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
29: ,array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L
30: ,array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L
23: TYPE t_rec_array_event IS RECORD
24: (array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
25: ,array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
26: ,array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L
27: ,array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
28: ,array_event_id xla_number_array_type --XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
29: ,array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L
30: ,array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L
31: ,array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
24: (array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
25: ,array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
26: ,array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L
27: ,array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
28: ,array_event_id xla_number_array_type --XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
29: ,array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L
30: ,array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L
31: ,array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
32: ,array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
25: ,array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
26: ,array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L
27: ,array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
28: ,array_event_id xla_number_array_type --XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
29: ,array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L
30: ,array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L
31: ,array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
32: ,array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
33: ,array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
26: ,array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L
27: ,array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
28: ,array_event_id xla_number_array_type --XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
29: ,array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L
30: ,array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L
31: ,array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
32: ,array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
33: ,array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
34: ,array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
27: ,array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
28: ,array_event_id xla_number_array_type --XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
29: ,array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L
30: ,array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L
31: ,array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
32: ,array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
33: ,array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
34: ,array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
35: ,array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
28: ,array_event_id xla_number_array_type --XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
29: ,array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L
30: ,array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L
31: ,array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
32: ,array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
33: ,array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
34: ,array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
35: ,array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
36: ,array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
29: ,array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L
30: ,array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L
31: ,array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
32: ,array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
33: ,array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
34: ,array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
35: ,array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
36: ,array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
37: ,array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
30: ,array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L
31: ,array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
32: ,array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
33: ,array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
34: ,array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
35: ,array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
36: ,array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
37: ,array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
38: ,array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
31: ,array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
32: ,array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
33: ,array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
34: ,array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
35: ,array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
36: ,array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
37: ,array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
38: ,array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
39: ,array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
32: ,array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
33: ,array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
34: ,array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
35: ,array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
36: ,array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
37: ,array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
38: ,array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
39: ,array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
40: ,array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
33: ,array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
34: ,array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
35: ,array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
36: ,array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
37: ,array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
38: ,array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
39: ,array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
40: ,array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
41: ,array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
34: ,array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
35: ,array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
36: ,array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
37: ,array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
38: ,array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
39: ,array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
40: ,array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
41: ,array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
42: ,array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
35: ,array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
36: ,array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
37: ,array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
38: ,array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
39: ,array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
40: ,array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
41: ,array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
42: ,array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
43: ,array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
36: ,array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
37: ,array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
38: ,array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
39: ,array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
40: ,array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
41: ,array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
42: ,array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
43: ,array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
44: ,array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
37: ,array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
38: ,array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
39: ,array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
40: ,array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
41: ,array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
42: ,array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
43: ,array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
44: ,array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
45: ,array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L
38: ,array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
39: ,array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
40: ,array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
41: ,array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
42: ,array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
43: ,array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
44: ,array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
45: ,array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L
46: );
39: ,array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
40: ,array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
41: ,array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
42: ,array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
43: ,array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
44: ,array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
45: ,array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L
46: );
47: --
40: ,array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
41: ,array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
42: ,array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
43: ,array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
44: ,array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
45: ,array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L
46: );
47: --
48: type t_array_value_num is table of number index by varchar2(30);
41: ,array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
42: ,array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
43: ,array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
44: ,array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
45: ,array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L
46: );
47: --
48: type t_array_value_num is table of number index by varchar2(30);
49: type t_array_value_char is table of varchar2(240) index by varchar2(30);
158:
159: END IF;
160:
161: IF p_lookup_code IS NOT NULL AND p_meaning IS NULL THEN
162: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
163: xla_accounting_err_pkg. build_message
164: (p_appli_s_name => 'XLA'
165: ,p_msg_name => 'XLA_AP_NO_LOOKUP_MEANING'
166: ,p_token_1 => 'SOURCE_NAME'
173: ,p_value_2 => p_lookup_code
174: ,p_token_3 => 'LOOKUP_TYPE'
175: ,p_value_3 => p_lookup_type
176: ,p_token_4 => 'PRODUCT_NAME'
177: ,p_value_4 => xla_ae_journal_entry_pkg.g_cache_event.application_name
178: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
179: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
180: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
181: );
174: ,p_token_3 => 'LOOKUP_TYPE'
175: ,p_value_3 => p_lookup_type
176: ,p_token_4 => 'PRODUCT_NAME'
177: ,p_value_4 => xla_ae_journal_entry_pkg.g_cache_event.application_name
178: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
179: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
180: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
181: );
182:
175: ,p_value_3 => p_lookup_type
176: ,p_token_4 => 'PRODUCT_NAME'
177: ,p_value_4 => xla_ae_journal_entry_pkg.g_cache_event.application_name
178: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
179: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
180: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
181: );
182:
183: IF (C_LEVEL_ERROR >= g_log_level) THEN
176: ,p_token_4 => 'PRODUCT_NAME'
177: ,p_value_4 => xla_ae_journal_entry_pkg.g_cache_event.application_name
178: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
179: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
180: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
181: );
182:
183: IF (C_LEVEL_ERROR >= g_log_level) THEN
184: trace
304: ,p_module => l_log_module);
305:
306: END IF;
307:
308: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
309: x_value_combination_id := null;
310: x_value_segment_code := null;
311: x_value_type_code := null;
312: l_output_value := null;
326: 'XLA_OWNER_TYPE'
327: ,l_component_type_code
328: )
329: ,p_token_3 => 'PAD_NAME'
330: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
331: ,p_token_4 => 'PAD_OWNER'
332: ,p_value_4 => xla_lookups_pkg.get_meaning(
333: 'XLA_OWNER_TYPE'
334: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
330: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
331: ,p_token_4 => 'PAD_OWNER'
332: ,p_value_4 => xla_lookups_pkg.get_meaning(
333: 'XLA_OWNER_TYPE'
334: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
335: )
336: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
337: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
338: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
332: ,p_value_4 => xla_lookups_pkg.get_meaning(
333: 'XLA_OWNER_TYPE'
334: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
335: )
336: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
337: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
338: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
339: ,p_ae_header_id => NULL
340: );
333: 'XLA_OWNER_TYPE'
334: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
335: )
336: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
337: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
338: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
339: ,p_ae_header_id => NULL
340: );
341: RETURN l_output_value;
334: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
335: )
336: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
337: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
338: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
339: ,p_ae_header_id => NULL
340: );
341: RETURN l_output_value;
342: EXCEPTION
424: ,p_module => l_log_module);
425:
426: END IF;
427:
428: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
429: x_value_combination_id := null;
430: x_value_segment_code := null;
431: x_value_type_code := null;
432: l_output_value := null;
446: 'XLA_OWNER_TYPE'
447: ,l_component_type_code
448: )
449: ,p_token_3 => 'PAD_NAME'
450: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
451: ,p_token_4 => 'PAD_OWNER'
452: ,p_value_4 => xla_lookups_pkg.get_meaning(
453: 'XLA_OWNER_TYPE'
454: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
450: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
451: ,p_token_4 => 'PAD_OWNER'
452: ,p_value_4 => xla_lookups_pkg.get_meaning(
453: 'XLA_OWNER_TYPE'
454: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
455: )
456: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
457: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
458: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
452: ,p_value_4 => xla_lookups_pkg.get_meaning(
453: 'XLA_OWNER_TYPE'
454: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
455: )
456: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
457: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
458: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
459: ,p_ae_header_id => NULL
460: );
453: 'XLA_OWNER_TYPE'
454: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
455: )
456: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
457: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
458: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
459: ,p_ae_header_id => NULL
460: );
461: RETURN l_output_value;
454: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
455: )
456: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
457: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
458: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
459: ,p_ae_header_id => NULL
460: );
461: RETURN l_output_value;
462: EXCEPTION
544: ,p_module => l_log_module);
545:
546: END IF;
547:
548: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
549: x_value_combination_id := null;
550: x_value_segment_code := null;
551: x_value_type_code := null;
552: l_output_value := null;
566: 'XLA_OWNER_TYPE'
567: ,l_component_type_code
568: )
569: ,p_token_3 => 'PAD_NAME'
570: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
571: ,p_token_4 => 'PAD_OWNER'
572: ,p_value_4 => xla_lookups_pkg.get_meaning(
573: 'XLA_OWNER_TYPE'
574: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
570: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
571: ,p_token_4 => 'PAD_OWNER'
572: ,p_value_4 => xla_lookups_pkg.get_meaning(
573: 'XLA_OWNER_TYPE'
574: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
575: )
576: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
577: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
578: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
572: ,p_value_4 => xla_lookups_pkg.get_meaning(
573: 'XLA_OWNER_TYPE'
574: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
575: )
576: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
577: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
578: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
579: ,p_ae_header_id => NULL
580: );
573: 'XLA_OWNER_TYPE'
574: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
575: )
576: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
577: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
578: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
579: ,p_ae_header_id => NULL
580: );
581: RETURN l_output_value;
574: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
575: )
576: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
577: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
578: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
579: ,p_ae_header_id => NULL
580: );
581: RETURN l_output_value;
582: EXCEPTION
724: ,p_module => l_log_module);
725:
726: END IF;
727:
728: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
729: x_value_combination_id := null;
730: x_value_segment_code := null;
731: x_value_type_code := null;
732: l_output_value := null;
746: 'XLA_OWNER_TYPE'
747: ,l_component_type_code
748: )
749: ,p_token_3 => 'PAD_NAME'
750: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
751: ,p_token_4 => 'PAD_OWNER'
752: ,p_value_4 => xla_lookups_pkg.get_meaning(
753: 'XLA_OWNER_TYPE'
754: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
750: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
751: ,p_token_4 => 'PAD_OWNER'
752: ,p_value_4 => xla_lookups_pkg.get_meaning(
753: 'XLA_OWNER_TYPE'
754: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
755: )
756: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
757: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
758: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
752: ,p_value_4 => xla_lookups_pkg.get_meaning(
753: 'XLA_OWNER_TYPE'
754: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
755: )
756: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
757: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
758: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
759: ,p_ae_header_id => NULL
760: );
753: 'XLA_OWNER_TYPE'
754: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
755: )
756: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
757: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
758: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
759: ,p_ae_header_id => NULL
760: );
761: RETURN l_output_value;
754: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
755: )
756: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
757: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
758: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
759: ,p_ae_header_id => NULL
760: );
761: RETURN l_output_value;
762: EXCEPTION
844: ,p_module => l_log_module);
845:
846: END IF;
847:
848: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
849: x_value_combination_id := null;
850: x_value_segment_code := null;
851: x_value_type_code := null;
852: l_output_value := null;
866: 'XLA_OWNER_TYPE'
867: ,l_component_type_code
868: )
869: ,p_token_3 => 'PAD_NAME'
870: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
871: ,p_token_4 => 'PAD_OWNER'
872: ,p_value_4 => xla_lookups_pkg.get_meaning(
873: 'XLA_OWNER_TYPE'
874: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
870: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
871: ,p_token_4 => 'PAD_OWNER'
872: ,p_value_4 => xla_lookups_pkg.get_meaning(
873: 'XLA_OWNER_TYPE'
874: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
875: )
876: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
877: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
878: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
872: ,p_value_4 => xla_lookups_pkg.get_meaning(
873: 'XLA_OWNER_TYPE'
874: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
875: )
876: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
877: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
878: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
879: ,p_ae_header_id => NULL
880: );
873: 'XLA_OWNER_TYPE'
874: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
875: )
876: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
877: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
878: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
879: ,p_ae_header_id => NULL
880: );
881: RETURN l_output_value;
874: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
875: )
876: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
877: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
878: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
879: ,p_ae_header_id => NULL
880: );
881: RETURN l_output_value;
882: EXCEPTION
964: ,p_module => l_log_module);
965:
966: END IF;
967:
968: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
969: x_value_combination_id := null;
970: x_value_segment_code := null;
971: x_value_type_code := null;
972: l_output_value := null;
986: 'XLA_OWNER_TYPE'
987: ,l_component_type_code
988: )
989: ,p_token_3 => 'PAD_NAME'
990: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
991: ,p_token_4 => 'PAD_OWNER'
992: ,p_value_4 => xla_lookups_pkg.get_meaning(
993: 'XLA_OWNER_TYPE'
994: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
990: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
991: ,p_token_4 => 'PAD_OWNER'
992: ,p_value_4 => xla_lookups_pkg.get_meaning(
993: 'XLA_OWNER_TYPE'
994: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
995: )
996: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
997: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
998: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
992: ,p_value_4 => xla_lookups_pkg.get_meaning(
993: 'XLA_OWNER_TYPE'
994: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
995: )
996: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
997: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
998: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
999: ,p_ae_header_id => NULL
1000: );
993: 'XLA_OWNER_TYPE'
994: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
995: )
996: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
997: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
998: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
999: ,p_ae_header_id => NULL
1000: );
1001: RETURN l_output_value;
994: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
995: )
996: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
997: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
998: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
999: ,p_ae_header_id => NULL
1000: );
1001: RETURN l_output_value;
1002: EXCEPTION
1084: ,p_module => l_log_module);
1085:
1086: END IF;
1087:
1088: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
1089: x_value_combination_id := null;
1090: x_value_segment_code := null;
1091: x_value_type_code := null;
1092: l_output_value := null;
1106: 'XLA_OWNER_TYPE'
1107: ,l_component_type_code
1108: )
1109: ,p_token_3 => 'PAD_NAME'
1110: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
1111: ,p_token_4 => 'PAD_OWNER'
1112: ,p_value_4 => xla_lookups_pkg.get_meaning(
1113: 'XLA_OWNER_TYPE'
1114: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
1110: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
1111: ,p_token_4 => 'PAD_OWNER'
1112: ,p_value_4 => xla_lookups_pkg.get_meaning(
1113: 'XLA_OWNER_TYPE'
1114: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
1115: )
1116: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
1117: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
1118: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
1112: ,p_value_4 => xla_lookups_pkg.get_meaning(
1113: 'XLA_OWNER_TYPE'
1114: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
1115: )
1116: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
1117: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
1118: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
1119: ,p_ae_header_id => NULL
1120: );
1113: 'XLA_OWNER_TYPE'
1114: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
1115: )
1116: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
1117: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
1118: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
1119: ,p_ae_header_id => NULL
1120: );
1121: RETURN l_output_value;
1114: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
1115: )
1116: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
1117: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
1118: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
1119: ,p_ae_header_id => NULL
1120: );
1121: RETURN l_output_value;
1122: EXCEPTION
1204: ,p_module => l_log_module);
1205:
1206: END IF;
1207:
1208: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
1209: x_value_combination_id := null;
1210: x_value_segment_code := null;
1211: x_value_type_code := null;
1212: l_output_value := null;
1226: 'XLA_OWNER_TYPE'
1227: ,l_component_type_code
1228: )
1229: ,p_token_3 => 'PAD_NAME'
1230: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
1231: ,p_token_4 => 'PAD_OWNER'
1232: ,p_value_4 => xla_lookups_pkg.get_meaning(
1233: 'XLA_OWNER_TYPE'
1234: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
1230: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
1231: ,p_token_4 => 'PAD_OWNER'
1232: ,p_value_4 => xla_lookups_pkg.get_meaning(
1233: 'XLA_OWNER_TYPE'
1234: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
1235: )
1236: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
1237: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
1238: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
1232: ,p_value_4 => xla_lookups_pkg.get_meaning(
1233: 'XLA_OWNER_TYPE'
1234: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
1235: )
1236: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
1237: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
1238: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
1239: ,p_ae_header_id => NULL
1240: );
1233: 'XLA_OWNER_TYPE'
1234: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
1235: )
1236: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
1237: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
1238: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
1239: ,p_ae_header_id => NULL
1240: );
1241: RETURN l_output_value;
1234: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
1235: )
1236: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
1237: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
1238: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
1239: ,p_ae_header_id => NULL
1240: );
1241: RETURN l_output_value;
1242: EXCEPTION
1324: ,p_module => l_log_module);
1325:
1326: END IF;
1327:
1328: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
1329: x_value_combination_id := null;
1330: x_value_segment_code := null;
1331: x_value_type_code := null;
1332: l_output_value := null;
1346: 'XLA_OWNER_TYPE'
1347: ,l_component_type_code
1348: )
1349: ,p_token_3 => 'PAD_NAME'
1350: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
1351: ,p_token_4 => 'PAD_OWNER'
1352: ,p_value_4 => xla_lookups_pkg.get_meaning(
1353: 'XLA_OWNER_TYPE'
1354: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
1350: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
1351: ,p_token_4 => 'PAD_OWNER'
1352: ,p_value_4 => xla_lookups_pkg.get_meaning(
1353: 'XLA_OWNER_TYPE'
1354: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
1355: )
1356: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
1357: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
1358: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
1352: ,p_value_4 => xla_lookups_pkg.get_meaning(
1353: 'XLA_OWNER_TYPE'
1354: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
1355: )
1356: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
1357: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
1358: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
1359: ,p_ae_header_id => NULL
1360: );
1353: 'XLA_OWNER_TYPE'
1354: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
1355: )
1356: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
1357: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
1358: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
1359: ,p_ae_header_id => NULL
1360: );
1361: RETURN l_output_value;
1354: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
1355: )
1356: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
1357: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
1358: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
1359: ,p_ae_header_id => NULL
1360: );
1361: RETURN l_output_value;
1362: EXCEPTION
1444: ,p_module => l_log_module);
1445:
1446: END IF;
1447:
1448: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
1449: x_value_combination_id := null;
1450: x_value_segment_code := null;
1451: x_value_type_code := null;
1452: l_output_value := null;
1466: 'XLA_OWNER_TYPE'
1467: ,l_component_type_code
1468: )
1469: ,p_token_3 => 'PAD_NAME'
1470: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
1471: ,p_token_4 => 'PAD_OWNER'
1472: ,p_value_4 => xla_lookups_pkg.get_meaning(
1473: 'XLA_OWNER_TYPE'
1474: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
1470: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
1471: ,p_token_4 => 'PAD_OWNER'
1472: ,p_value_4 => xla_lookups_pkg.get_meaning(
1473: 'XLA_OWNER_TYPE'
1474: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
1475: )
1476: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
1477: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
1478: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
1472: ,p_value_4 => xla_lookups_pkg.get_meaning(
1473: 'XLA_OWNER_TYPE'
1474: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
1475: )
1476: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
1477: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
1478: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
1479: ,p_ae_header_id => NULL
1480: );
1473: 'XLA_OWNER_TYPE'
1474: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
1475: )
1476: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
1477: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
1478: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
1479: ,p_ae_header_id => NULL
1480: );
1481: RETURN l_output_value;
1474: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
1475: )
1476: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
1477: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
1478: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
1479: ,p_ae_header_id => NULL
1480: );
1481: RETURN l_output_value;
1482: EXCEPTION
1550: (p_msg => 'END of AcctDerRule_11(invalid)'
1551: ,p_level => C_LEVEL_PROCEDURE
1552: ,p_module => l_log_module);
1553: END IF;
1554: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
1555: x_value_type_code := null;
1556: l_output_value := null;
1557: xla_accounting_err_pkg.build_message
1558: (p_appli_s_name => 'XLA'
1570: 'XLA_OWNER_TYPE'
1571: ,l_component_type_code
1572: )
1573: ,p_token_3 => 'PAD_NAME'
1574: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
1575: ,p_token_4 => 'PAD_OWNER'
1576: ,p_value_4 => xla_lookups_pkg.get_meaning(
1577: 'XLA_OWNER_TYPE'
1578: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
1574: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
1575: ,p_token_4 => 'PAD_OWNER'
1576: ,p_value_4 => xla_lookups_pkg.get_meaning(
1577: 'XLA_OWNER_TYPE'
1578: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
1579: )
1580: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
1581: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
1582: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
1576: ,p_value_4 => xla_lookups_pkg.get_meaning(
1577: 'XLA_OWNER_TYPE'
1578: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
1579: )
1580: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
1581: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
1582: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
1583: ,p_ae_header_id => NULL
1584: );
1577: 'XLA_OWNER_TYPE'
1578: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
1579: )
1580: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
1581: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
1582: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
1583: ,p_ae_header_id => NULL
1584: );
1585: RETURN l_output_value;
1578: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
1579: )
1580: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
1581: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
1582: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
1583: ,p_ae_header_id => NULL
1584: );
1585: RETURN l_output_value;
1586: EXCEPTION
1685: l_tmp_amt NUMBER;
1686: l_acc_rev_natural_side_code VARCHAR2(1);
1687:
1688: l_num_entries NUMBER;
1689: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
1690: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
1691: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
1692: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
1693: l_recog_line_1 NUMBER;
1686: l_acc_rev_natural_side_code VARCHAR2(1);
1687:
1688: l_num_entries NUMBER;
1689: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
1690: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
1691: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
1692: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
1693: l_recog_line_1 NUMBER;
1694: l_recog_line_2 NUMBER;
1687:
1688: l_num_entries NUMBER;
1689: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
1690: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
1691: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
1692: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
1693: l_recog_line_1 NUMBER;
1694: l_recog_line_2 NUMBER;
1695:
1688: l_num_entries NUMBER;
1689: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
1690: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
1691: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
1692: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
1693: l_recog_line_1 NUMBER;
1694: l_recog_line_2 NUMBER;
1695:
1696: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
1694: l_recog_line_2 NUMBER;
1695:
1696: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
1697: l_bflow_applied_to_amt NUMBER; -- 5132302
1698: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
1699:
1700: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
1701:
1702: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
1769: l_accrual_line_num := NULL; -- 4262811
1770: l_tmp_amt := NULL; -- 4262811
1771: --
1772:
1773: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
1774: l_balance_type_code <> 'B' THEN
1775: IF NVL(
1776: xla_ae_sources_pkg.GetSystemSourceChar(
1777: p_source_code => 'XLA_EVENT_TYPE_CODE'
1850: --
1851: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
1852:
1853: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
1854: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
1855:
1856: -- 4955764
1857: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
1858: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
1926: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
1927:
1928: IF xla_accounting_cache_pkg.GetValueChar
1929: (p_source_code => 'LEDGER_CATEGORY_CODE'
1930: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
1931: AND l_bflow_method_code = 'PRIOR_ENTRY'
1932: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
1933: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
1934: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
2066: p_lookup_type => 'XLA_OWNER_TYPE'
2067: ,p_lookup_code => l_component_type_code
2068: )
2069: ,p_token_4 => 'PRODUCT_NAME'
2070: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
2071: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
2072: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
2073: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
2074: ,p_ae_header_id => NULL
2067: ,p_lookup_code => l_component_type_code
2068: )
2069: ,p_token_4 => 'PRODUCT_NAME'
2070: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
2071: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
2072: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
2073: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
2074: ,p_ae_header_id => NULL
2075: );
2068: )
2069: ,p_token_4 => 'PRODUCT_NAME'
2070: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
2071: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
2072: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
2073: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
2074: ,p_ae_header_id => NULL
2075: );
2076:
2069: ,p_token_4 => 'PRODUCT_NAME'
2070: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
2071: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
2072: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
2073: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
2074: ,p_ae_header_id => NULL
2075: );
2076:
2077: IF (C_LEVEL_ERROR>= g_log_level) THEN
2100: ----------------------------------------------------------------------------------
2101: -- 4219869 Business Flow
2102: -- Update journal entry status -- Need to generate this within IF
2103: ----------------------------------------------------------------------------------
2104: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
2105: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
2106: ,p_balance_type_code => l_balance_type_code
2107: );
2108:
2227:
2228: --
2229: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
2230: --
2231: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
2232: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
2233: ELSE
2234: ---------------------------------------------------------------------------------------------------
2235: -- 4262811a Switch Sign
2252:
2253: XLA_AE_LINES_PKG.ValidateCurrentLine;
2254: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
2255:
2256: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
2257: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
2258: ,p_balance_type_code => l_balance_type_code);
2259:
2260: END IF;
2377: l_tmp_amt NUMBER;
2378: l_acc_rev_natural_side_code VARCHAR2(1);
2379:
2380: l_num_entries NUMBER;
2381: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
2382: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
2383: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
2384: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
2385: l_recog_line_1 NUMBER;
2378: l_acc_rev_natural_side_code VARCHAR2(1);
2379:
2380: l_num_entries NUMBER;
2381: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
2382: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
2383: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
2384: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
2385: l_recog_line_1 NUMBER;
2386: l_recog_line_2 NUMBER;
2379:
2380: l_num_entries NUMBER;
2381: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
2382: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
2383: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
2384: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
2385: l_recog_line_1 NUMBER;
2386: l_recog_line_2 NUMBER;
2387:
2380: l_num_entries NUMBER;
2381: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
2382: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
2383: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
2384: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
2385: l_recog_line_1 NUMBER;
2386: l_recog_line_2 NUMBER;
2387:
2388: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
2386: l_recog_line_2 NUMBER;
2387:
2388: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
2389: l_bflow_applied_to_amt NUMBER; -- 5132302
2390: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
2391:
2392: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
2393:
2394: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
2461: l_accrual_line_num := NULL; -- 4262811
2462: l_tmp_amt := NULL; -- 4262811
2463: --
2464:
2465: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
2466: l_balance_type_code <> 'B' THEN
2467: IF NVL(
2468: xla_ae_sources_pkg.GetSystemSourceChar(
2469: p_source_code => 'XLA_EVENT_TYPE_CODE'
2540: --
2541: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
2542:
2543: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
2544: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
2545:
2546: -- 4955764
2547: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
2548: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
2616: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
2617:
2618: IF xla_accounting_cache_pkg.GetValueChar
2619: (p_source_code => 'LEDGER_CATEGORY_CODE'
2620: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
2621: AND l_bflow_method_code = 'PRIOR_ENTRY'
2622: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
2623: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
2624: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
2756: p_lookup_type => 'XLA_OWNER_TYPE'
2757: ,p_lookup_code => l_component_type_code
2758: )
2759: ,p_token_4 => 'PRODUCT_NAME'
2760: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
2761: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
2762: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
2763: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
2764: ,p_ae_header_id => NULL
2757: ,p_lookup_code => l_component_type_code
2758: )
2759: ,p_token_4 => 'PRODUCT_NAME'
2760: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
2761: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
2762: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
2763: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
2764: ,p_ae_header_id => NULL
2765: );
2758: )
2759: ,p_token_4 => 'PRODUCT_NAME'
2760: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
2761: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
2762: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
2763: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
2764: ,p_ae_header_id => NULL
2765: );
2766:
2759: ,p_token_4 => 'PRODUCT_NAME'
2760: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
2761: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
2762: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
2763: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
2764: ,p_ae_header_id => NULL
2765: );
2766:
2767: IF (C_LEVEL_ERROR>= g_log_level) THEN
2790: ----------------------------------------------------------------------------------
2791: -- 4219869 Business Flow
2792: -- Update journal entry status -- Need to generate this within IF
2793: ----------------------------------------------------------------------------------
2794: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
2795: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
2796: ,p_balance_type_code => l_balance_type_code
2797: );
2798:
2917:
2918: --
2919: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
2920: --
2921: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
2922: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
2923: ELSE
2924: ---------------------------------------------------------------------------------------------------
2925: -- 4262811a Switch Sign
2942:
2943: XLA_AE_LINES_PKG.ValidateCurrentLine;
2944: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
2945:
2946: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
2947: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
2948: ,p_balance_type_code => l_balance_type_code);
2949:
2950: END IF;
3069: l_tmp_amt NUMBER;
3070: l_acc_rev_natural_side_code VARCHAR2(1);
3071:
3072: l_num_entries NUMBER;
3073: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
3074: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
3075: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
3076: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
3077: l_recog_line_1 NUMBER;
3070: l_acc_rev_natural_side_code VARCHAR2(1);
3071:
3072: l_num_entries NUMBER;
3073: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
3074: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
3075: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
3076: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
3077: l_recog_line_1 NUMBER;
3078: l_recog_line_2 NUMBER;
3071:
3072: l_num_entries NUMBER;
3073: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
3074: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
3075: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
3076: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
3077: l_recog_line_1 NUMBER;
3078: l_recog_line_2 NUMBER;
3079:
3072: l_num_entries NUMBER;
3073: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
3074: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
3075: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
3076: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
3077: l_recog_line_1 NUMBER;
3078: l_recog_line_2 NUMBER;
3079:
3080: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
3078: l_recog_line_2 NUMBER;
3079:
3080: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
3081: l_bflow_applied_to_amt NUMBER; -- 5132302
3082: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
3083:
3084: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
3085:
3086: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
3153: l_accrual_line_num := NULL; -- 4262811
3154: l_tmp_amt := NULL; -- 4262811
3155: --
3156:
3157: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
3158: l_balance_type_code <> 'B' THEN
3159: IF NVL(
3160: xla_ae_sources_pkg.GetSystemSourceChar(
3161: p_source_code => 'XLA_EVENT_TYPE_CODE'
3234: --
3235: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
3236:
3237: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
3238: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
3239:
3240: -- 4955764
3241: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
3242: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
3310: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
3311:
3312: IF xla_accounting_cache_pkg.GetValueChar
3313: (p_source_code => 'LEDGER_CATEGORY_CODE'
3314: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
3315: AND l_bflow_method_code = 'PRIOR_ENTRY'
3316: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
3317: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
3318: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
3450: p_lookup_type => 'XLA_OWNER_TYPE'
3451: ,p_lookup_code => l_component_type_code
3452: )
3453: ,p_token_4 => 'PRODUCT_NAME'
3454: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
3455: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
3456: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
3457: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
3458: ,p_ae_header_id => NULL
3451: ,p_lookup_code => l_component_type_code
3452: )
3453: ,p_token_4 => 'PRODUCT_NAME'
3454: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
3455: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
3456: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
3457: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
3458: ,p_ae_header_id => NULL
3459: );
3452: )
3453: ,p_token_4 => 'PRODUCT_NAME'
3454: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
3455: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
3456: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
3457: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
3458: ,p_ae_header_id => NULL
3459: );
3460:
3453: ,p_token_4 => 'PRODUCT_NAME'
3454: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
3455: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
3456: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
3457: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
3458: ,p_ae_header_id => NULL
3459: );
3460:
3461: IF (C_LEVEL_ERROR>= g_log_level) THEN
3484: ----------------------------------------------------------------------------------
3485: -- 4219869 Business Flow
3486: -- Update journal entry status -- Need to generate this within IF
3487: ----------------------------------------------------------------------------------
3488: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
3489: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
3490: ,p_balance_type_code => l_balance_type_code
3491: );
3492:
3611:
3612: --
3613: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
3614: --
3615: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
3616: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
3617: ELSE
3618: ---------------------------------------------------------------------------------------------------
3619: -- 4262811a Switch Sign
3636:
3637: XLA_AE_LINES_PKG.ValidateCurrentLine;
3638: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
3639:
3640: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
3641: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
3642: ,p_balance_type_code => l_balance_type_code);
3643:
3644: END IF;
3761: l_tmp_amt NUMBER;
3762: l_acc_rev_natural_side_code VARCHAR2(1);
3763:
3764: l_num_entries NUMBER;
3765: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
3766: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
3767: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
3768: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
3769: l_recog_line_1 NUMBER;
3762: l_acc_rev_natural_side_code VARCHAR2(1);
3763:
3764: l_num_entries NUMBER;
3765: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
3766: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
3767: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
3768: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
3769: l_recog_line_1 NUMBER;
3770: l_recog_line_2 NUMBER;
3763:
3764: l_num_entries NUMBER;
3765: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
3766: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
3767: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
3768: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
3769: l_recog_line_1 NUMBER;
3770: l_recog_line_2 NUMBER;
3771:
3764: l_num_entries NUMBER;
3765: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
3766: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
3767: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
3768: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
3769: l_recog_line_1 NUMBER;
3770: l_recog_line_2 NUMBER;
3771:
3772: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
3770: l_recog_line_2 NUMBER;
3771:
3772: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
3773: l_bflow_applied_to_amt NUMBER; -- 5132302
3774: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
3775:
3776: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
3777:
3778: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
3845: l_accrual_line_num := NULL; -- 4262811
3846: l_tmp_amt := NULL; -- 4262811
3847: --
3848:
3849: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
3850: l_balance_type_code <> 'B' THEN
3851: IF NVL(
3852: xla_ae_sources_pkg.GetSystemSourceChar(
3853: p_source_code => 'XLA_EVENT_TYPE_CODE'
3924: --
3925: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
3926:
3927: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
3928: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
3929:
3930: -- 4955764
3931: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
3932: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
4000: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
4001:
4002: IF xla_accounting_cache_pkg.GetValueChar
4003: (p_source_code => 'LEDGER_CATEGORY_CODE'
4004: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
4005: AND l_bflow_method_code = 'PRIOR_ENTRY'
4006: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
4007: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
4008: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
4140: p_lookup_type => 'XLA_OWNER_TYPE'
4141: ,p_lookup_code => l_component_type_code
4142: )
4143: ,p_token_4 => 'PRODUCT_NAME'
4144: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
4145: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
4146: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
4147: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
4148: ,p_ae_header_id => NULL
4141: ,p_lookup_code => l_component_type_code
4142: )
4143: ,p_token_4 => 'PRODUCT_NAME'
4144: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
4145: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
4146: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
4147: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
4148: ,p_ae_header_id => NULL
4149: );
4142: )
4143: ,p_token_4 => 'PRODUCT_NAME'
4144: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
4145: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
4146: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
4147: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
4148: ,p_ae_header_id => NULL
4149: );
4150:
4143: ,p_token_4 => 'PRODUCT_NAME'
4144: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
4145: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
4146: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
4147: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
4148: ,p_ae_header_id => NULL
4149: );
4150:
4151: IF (C_LEVEL_ERROR>= g_log_level) THEN
4174: ----------------------------------------------------------------------------------
4175: -- 4219869 Business Flow
4176: -- Update journal entry status -- Need to generate this within IF
4177: ----------------------------------------------------------------------------------
4178: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
4179: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
4180: ,p_balance_type_code => l_balance_type_code
4181: );
4182:
4301:
4302: --
4303: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
4304: --
4305: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
4306: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
4307: ELSE
4308: ---------------------------------------------------------------------------------------------------
4309: -- 4262811a Switch Sign
4326:
4327: XLA_AE_LINES_PKG.ValidateCurrentLine;
4328: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
4329:
4330: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
4331: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
4332: ,p_balance_type_code => l_balance_type_code);
4333:
4334: END IF;
4453: l_tmp_amt NUMBER;
4454: l_acc_rev_natural_side_code VARCHAR2(1);
4455:
4456: l_num_entries NUMBER;
4457: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
4458: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
4459: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
4460: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
4461: l_recog_line_1 NUMBER;
4454: l_acc_rev_natural_side_code VARCHAR2(1);
4455:
4456: l_num_entries NUMBER;
4457: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
4458: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
4459: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
4460: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
4461: l_recog_line_1 NUMBER;
4462: l_recog_line_2 NUMBER;
4455:
4456: l_num_entries NUMBER;
4457: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
4458: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
4459: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
4460: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
4461: l_recog_line_1 NUMBER;
4462: l_recog_line_2 NUMBER;
4463:
4456: l_num_entries NUMBER;
4457: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
4458: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
4459: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
4460: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
4461: l_recog_line_1 NUMBER;
4462: l_recog_line_2 NUMBER;
4463:
4464: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
4462: l_recog_line_2 NUMBER;
4463:
4464: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
4465: l_bflow_applied_to_amt NUMBER; -- 5132302
4466: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
4467:
4468: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
4469:
4470: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
4537: l_accrual_line_num := NULL; -- 4262811
4538: l_tmp_amt := NULL; -- 4262811
4539: --
4540:
4541: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
4542: l_balance_type_code <> 'B' THEN
4543: IF NVL(
4544: xla_ae_sources_pkg.GetSystemSourceChar(
4545: p_source_code => 'XLA_EVENT_TYPE_CODE'
4616: --
4617: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
4618:
4619: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
4620: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
4621:
4622: -- 4955764
4623: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
4624: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
4692: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
4693:
4694: IF xla_accounting_cache_pkg.GetValueChar
4695: (p_source_code => 'LEDGER_CATEGORY_CODE'
4696: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
4697: AND l_bflow_method_code = 'PRIOR_ENTRY'
4698: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
4699: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
4700: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
4832: p_lookup_type => 'XLA_OWNER_TYPE'
4833: ,p_lookup_code => l_component_type_code
4834: )
4835: ,p_token_4 => 'PRODUCT_NAME'
4836: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
4837: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
4838: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
4839: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
4840: ,p_ae_header_id => NULL
4833: ,p_lookup_code => l_component_type_code
4834: )
4835: ,p_token_4 => 'PRODUCT_NAME'
4836: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
4837: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
4838: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
4839: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
4840: ,p_ae_header_id => NULL
4841: );
4834: )
4835: ,p_token_4 => 'PRODUCT_NAME'
4836: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
4837: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
4838: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
4839: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
4840: ,p_ae_header_id => NULL
4841: );
4842:
4835: ,p_token_4 => 'PRODUCT_NAME'
4836: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
4837: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
4838: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
4839: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
4840: ,p_ae_header_id => NULL
4841: );
4842:
4843: IF (C_LEVEL_ERROR>= g_log_level) THEN
4866: ----------------------------------------------------------------------------------
4867: -- 4219869 Business Flow
4868: -- Update journal entry status -- Need to generate this within IF
4869: ----------------------------------------------------------------------------------
4870: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
4871: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
4872: ,p_balance_type_code => l_balance_type_code
4873: );
4874:
4993:
4994: --
4995: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
4996: --
4997: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
4998: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
4999: ELSE
5000: ---------------------------------------------------------------------------------------------------
5001: -- 4262811a Switch Sign
5018:
5019: XLA_AE_LINES_PKG.ValidateCurrentLine;
5020: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
5021:
5022: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
5023: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
5024: ,p_balance_type_code => l_balance_type_code);
5025:
5026: END IF;
5143: l_tmp_amt NUMBER;
5144: l_acc_rev_natural_side_code VARCHAR2(1);
5145:
5146: l_num_entries NUMBER;
5147: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
5148: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
5149: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
5150: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
5151: l_recog_line_1 NUMBER;
5144: l_acc_rev_natural_side_code VARCHAR2(1);
5145:
5146: l_num_entries NUMBER;
5147: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
5148: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
5149: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
5150: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
5151: l_recog_line_1 NUMBER;
5152: l_recog_line_2 NUMBER;
5145:
5146: l_num_entries NUMBER;
5147: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
5148: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
5149: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
5150: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
5151: l_recog_line_1 NUMBER;
5152: l_recog_line_2 NUMBER;
5153:
5146: l_num_entries NUMBER;
5147: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
5148: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
5149: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
5150: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
5151: l_recog_line_1 NUMBER;
5152: l_recog_line_2 NUMBER;
5153:
5154: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
5152: l_recog_line_2 NUMBER;
5153:
5154: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
5155: l_bflow_applied_to_amt NUMBER; -- 5132302
5156: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
5157:
5158: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
5159:
5160: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
5227: l_accrual_line_num := NULL; -- 4262811
5228: l_tmp_amt := NULL; -- 4262811
5229: --
5230:
5231: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
5232: l_balance_type_code <> 'B' THEN
5233: IF NVL(
5234: xla_ae_sources_pkg.GetSystemSourceChar(
5235: p_source_code => 'XLA_EVENT_TYPE_CODE'
5304: --
5305: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
5306:
5307: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
5308: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
5309:
5310: -- 4955764
5311: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
5312: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
5380: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
5381:
5382: IF xla_accounting_cache_pkg.GetValueChar
5383: (p_source_code => 'LEDGER_CATEGORY_CODE'
5384: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
5385: AND l_bflow_method_code = 'PRIOR_ENTRY'
5386: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
5387: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
5388: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
5520: p_lookup_type => 'XLA_OWNER_TYPE'
5521: ,p_lookup_code => l_component_type_code
5522: )
5523: ,p_token_4 => 'PRODUCT_NAME'
5524: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
5525: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
5526: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
5527: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
5528: ,p_ae_header_id => NULL
5521: ,p_lookup_code => l_component_type_code
5522: )
5523: ,p_token_4 => 'PRODUCT_NAME'
5524: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
5525: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
5526: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
5527: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
5528: ,p_ae_header_id => NULL
5529: );
5522: )
5523: ,p_token_4 => 'PRODUCT_NAME'
5524: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
5525: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
5526: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
5527: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
5528: ,p_ae_header_id => NULL
5529: );
5530:
5523: ,p_token_4 => 'PRODUCT_NAME'
5524: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
5525: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
5526: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
5527: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
5528: ,p_ae_header_id => NULL
5529: );
5530:
5531: IF (C_LEVEL_ERROR>= g_log_level) THEN
5554: ----------------------------------------------------------------------------------
5555: -- 4219869 Business Flow
5556: -- Update journal entry status -- Need to generate this within IF
5557: ----------------------------------------------------------------------------------
5558: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
5559: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
5560: ,p_balance_type_code => l_balance_type_code
5561: );
5562:
5681:
5682: --
5683: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
5684: --
5685: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
5686: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
5687: ELSE
5688: ---------------------------------------------------------------------------------------------------
5689: -- 4262811a Switch Sign
5706:
5707: XLA_AE_LINES_PKG.ValidateCurrentLine;
5708: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
5709:
5710: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
5711: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
5712: ,p_balance_type_code => l_balance_type_code);
5713:
5714: END IF;
5835: l_tmp_amt NUMBER;
5836: l_acc_rev_natural_side_code VARCHAR2(1);
5837:
5838: l_num_entries NUMBER;
5839: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
5840: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
5841: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
5842: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
5843: l_recog_line_1 NUMBER;
5836: l_acc_rev_natural_side_code VARCHAR2(1);
5837:
5838: l_num_entries NUMBER;
5839: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
5840: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
5841: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
5842: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
5843: l_recog_line_1 NUMBER;
5844: l_recog_line_2 NUMBER;
5837:
5838: l_num_entries NUMBER;
5839: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
5840: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
5841: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
5842: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
5843: l_recog_line_1 NUMBER;
5844: l_recog_line_2 NUMBER;
5845:
5838: l_num_entries NUMBER;
5839: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
5840: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
5841: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
5842: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
5843: l_recog_line_1 NUMBER;
5844: l_recog_line_2 NUMBER;
5845:
5846: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
5844: l_recog_line_2 NUMBER;
5845:
5846: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
5847: l_bflow_applied_to_amt NUMBER; -- 5132302
5848: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
5849:
5850: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
5851:
5852: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
5919: l_accrual_line_num := NULL; -- 4262811
5920: l_tmp_amt := NULL; -- 4262811
5921: --
5922:
5923: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
5924: l_balance_type_code <> 'B' THEN
5925: IF (NVL(p_source_2,'
5926: ') = 'A' OR
5927: NVL(p_source_2,'
6004: --
6005: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
6006:
6007: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
6008: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
6009:
6010: -- 4955764
6011: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
6012: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
6080: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
6081:
6082: IF xla_accounting_cache_pkg.GetValueChar
6083: (p_source_code => 'LEDGER_CATEGORY_CODE'
6084: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
6085: AND l_bflow_method_code = 'PRIOR_ENTRY'
6086: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
6087: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
6088: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
6220: p_lookup_type => 'XLA_OWNER_TYPE'
6221: ,p_lookup_code => l_component_type_code
6222: )
6223: ,p_token_4 => 'PRODUCT_NAME'
6224: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
6225: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
6226: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
6227: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
6228: ,p_ae_header_id => NULL
6221: ,p_lookup_code => l_component_type_code
6222: )
6223: ,p_token_4 => 'PRODUCT_NAME'
6224: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
6225: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
6226: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
6227: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
6228: ,p_ae_header_id => NULL
6229: );
6222: )
6223: ,p_token_4 => 'PRODUCT_NAME'
6224: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
6225: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
6226: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
6227: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
6228: ,p_ae_header_id => NULL
6229: );
6230:
6223: ,p_token_4 => 'PRODUCT_NAME'
6224: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
6225: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
6226: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
6227: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
6228: ,p_ae_header_id => NULL
6229: );
6230:
6231: IF (C_LEVEL_ERROR>= g_log_level) THEN
6254: ----------------------------------------------------------------------------------
6255: -- 4219869 Business Flow
6256: -- Update journal entry status -- Need to generate this within IF
6257: ----------------------------------------------------------------------------------
6258: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
6259: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
6260: ,p_balance_type_code => l_balance_type_code
6261: );
6262:
6381:
6382: --
6383: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
6384: --
6385: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
6386: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
6387: ELSE
6388: ---------------------------------------------------------------------------------------------------
6389: -- 4262811a Switch Sign
6406:
6407: XLA_AE_LINES_PKG.ValidateCurrentLine;
6408: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
6409:
6410: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
6411: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
6412: ,p_balance_type_code => l_balance_type_code);
6413:
6414: END IF;
6533: l_tmp_amt NUMBER;
6534: l_acc_rev_natural_side_code VARCHAR2(1);
6535:
6536: l_num_entries NUMBER;
6537: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
6538: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
6539: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
6540: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
6541: l_recog_line_1 NUMBER;
6534: l_acc_rev_natural_side_code VARCHAR2(1);
6535:
6536: l_num_entries NUMBER;
6537: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
6538: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
6539: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
6540: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
6541: l_recog_line_1 NUMBER;
6542: l_recog_line_2 NUMBER;
6535:
6536: l_num_entries NUMBER;
6537: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
6538: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
6539: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
6540: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
6541: l_recog_line_1 NUMBER;
6542: l_recog_line_2 NUMBER;
6543:
6536: l_num_entries NUMBER;
6537: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
6538: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
6539: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
6540: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
6541: l_recog_line_1 NUMBER;
6542: l_recog_line_2 NUMBER;
6543:
6544: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
6542: l_recog_line_2 NUMBER;
6543:
6544: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
6545: l_bflow_applied_to_amt NUMBER; -- 5132302
6546: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
6547:
6548: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
6549:
6550: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
6617: l_accrual_line_num := NULL; -- 4262811
6618: l_tmp_amt := NULL; -- 4262811
6619: --
6620:
6621: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
6622: l_balance_type_code <> 'B' THEN
6623: IF NVL(
6624: xla_ae_sources_pkg.GetSystemSourceChar(
6625: p_source_code => 'XLA_EVENT_TYPE_CODE'
6700: --
6701: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
6702:
6703: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
6704: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
6705:
6706: -- 4955764
6707: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
6708: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
6776: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
6777:
6778: IF xla_accounting_cache_pkg.GetValueChar
6779: (p_source_code => 'LEDGER_CATEGORY_CODE'
6780: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
6781: AND l_bflow_method_code = 'PRIOR_ENTRY'
6782: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
6783: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
6784: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
6916: p_lookup_type => 'XLA_OWNER_TYPE'
6917: ,p_lookup_code => l_component_type_code
6918: )
6919: ,p_token_4 => 'PRODUCT_NAME'
6920: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
6921: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
6922: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
6923: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
6924: ,p_ae_header_id => NULL
6917: ,p_lookup_code => l_component_type_code
6918: )
6919: ,p_token_4 => 'PRODUCT_NAME'
6920: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
6921: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
6922: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
6923: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
6924: ,p_ae_header_id => NULL
6925: );
6918: )
6919: ,p_token_4 => 'PRODUCT_NAME'
6920: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
6921: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
6922: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
6923: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
6924: ,p_ae_header_id => NULL
6925: );
6926:
6919: ,p_token_4 => 'PRODUCT_NAME'
6920: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
6921: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
6922: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
6923: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
6924: ,p_ae_header_id => NULL
6925: );
6926:
6927: IF (C_LEVEL_ERROR>= g_log_level) THEN
6950: ----------------------------------------------------------------------------------
6951: -- 4219869 Business Flow
6952: -- Update journal entry status -- Need to generate this within IF
6953: ----------------------------------------------------------------------------------
6954: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
6955: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
6956: ,p_balance_type_code => l_balance_type_code
6957: );
6958:
7077:
7078: --
7079: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
7080: --
7081: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
7082: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
7083: ELSE
7084: ---------------------------------------------------------------------------------------------------
7085: -- 4262811a Switch Sign
7102:
7103: XLA_AE_LINES_PKG.ValidateCurrentLine;
7104: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
7105:
7106: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
7107: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
7108: ,p_balance_type_code => l_balance_type_code);
7109:
7110: END IF;
7231: l_tmp_amt NUMBER;
7232: l_acc_rev_natural_side_code VARCHAR2(1);
7233:
7234: l_num_entries NUMBER;
7235: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
7236: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
7237: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
7238: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
7239: l_recog_line_1 NUMBER;
7232: l_acc_rev_natural_side_code VARCHAR2(1);
7233:
7234: l_num_entries NUMBER;
7235: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
7236: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
7237: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
7238: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
7239: l_recog_line_1 NUMBER;
7240: l_recog_line_2 NUMBER;
7233:
7234: l_num_entries NUMBER;
7235: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
7236: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
7237: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
7238: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
7239: l_recog_line_1 NUMBER;
7240: l_recog_line_2 NUMBER;
7241:
7234: l_num_entries NUMBER;
7235: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
7236: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
7237: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
7238: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
7239: l_recog_line_1 NUMBER;
7240: l_recog_line_2 NUMBER;
7241:
7242: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
7240: l_recog_line_2 NUMBER;
7241:
7242: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
7243: l_bflow_applied_to_amt NUMBER; -- 5132302
7244: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
7245:
7246: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
7247:
7248: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
7315: l_accrual_line_num := NULL; -- 4262811
7316: l_tmp_amt := NULL; -- 4262811
7317: --
7318:
7319: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
7320: l_balance_type_code <> 'B' THEN
7321: IF (NVL(p_source_2,'
7322: ') = 'A' OR
7323: NVL(p_source_2,'
7400: --
7401: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
7402:
7403: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
7404: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
7405:
7406: -- 4955764
7407: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
7408: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
7476: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
7477:
7478: IF xla_accounting_cache_pkg.GetValueChar
7479: (p_source_code => 'LEDGER_CATEGORY_CODE'
7480: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
7481: AND l_bflow_method_code = 'PRIOR_ENTRY'
7482: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
7483: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
7484: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
7616: p_lookup_type => 'XLA_OWNER_TYPE'
7617: ,p_lookup_code => l_component_type_code
7618: )
7619: ,p_token_4 => 'PRODUCT_NAME'
7620: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
7621: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
7622: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
7623: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
7624: ,p_ae_header_id => NULL
7617: ,p_lookup_code => l_component_type_code
7618: )
7619: ,p_token_4 => 'PRODUCT_NAME'
7620: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
7621: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
7622: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
7623: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
7624: ,p_ae_header_id => NULL
7625: );
7618: )
7619: ,p_token_4 => 'PRODUCT_NAME'
7620: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
7621: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
7622: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
7623: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
7624: ,p_ae_header_id => NULL
7625: );
7626:
7619: ,p_token_4 => 'PRODUCT_NAME'
7620: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
7621: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
7622: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
7623: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
7624: ,p_ae_header_id => NULL
7625: );
7626:
7627: IF (C_LEVEL_ERROR>= g_log_level) THEN
7650: ----------------------------------------------------------------------------------
7651: -- 4219869 Business Flow
7652: -- Update journal entry status -- Need to generate this within IF
7653: ----------------------------------------------------------------------------------
7654: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
7655: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
7656: ,p_balance_type_code => l_balance_type_code
7657: );
7658:
7777:
7778: --
7779: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
7780: --
7781: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
7782: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
7783: ELSE
7784: ---------------------------------------------------------------------------------------------------
7785: -- 4262811a Switch Sign
7802:
7803: XLA_AE_LINES_PKG.ValidateCurrentLine;
7804: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
7805:
7806: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
7807: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
7808: ,p_balance_type_code => l_balance_type_code);
7809:
7810: END IF;
7929: l_tmp_amt NUMBER;
7930: l_acc_rev_natural_side_code VARCHAR2(1);
7931:
7932: l_num_entries NUMBER;
7933: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
7934: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
7935: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
7936: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
7937: l_recog_line_1 NUMBER;
7930: l_acc_rev_natural_side_code VARCHAR2(1);
7931:
7932: l_num_entries NUMBER;
7933: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
7934: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
7935: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
7936: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
7937: l_recog_line_1 NUMBER;
7938: l_recog_line_2 NUMBER;
7931:
7932: l_num_entries NUMBER;
7933: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
7934: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
7935: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
7936: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
7937: l_recog_line_1 NUMBER;
7938: l_recog_line_2 NUMBER;
7939:
7932: l_num_entries NUMBER;
7933: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
7934: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
7935: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
7936: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
7937: l_recog_line_1 NUMBER;
7938: l_recog_line_2 NUMBER;
7939:
7940: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
7938: l_recog_line_2 NUMBER;
7939:
7940: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
7941: l_bflow_applied_to_amt NUMBER; -- 5132302
7942: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
7943:
7944: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
7945:
7946: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
8013: l_accrual_line_num := NULL; -- 4262811
8014: l_tmp_amt := NULL; -- 4262811
8015: --
8016:
8017: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
8018: l_balance_type_code <> 'B' THEN
8019: IF NVL(
8020: xla_ae_sources_pkg.GetSystemSourceChar(
8021: p_source_code => 'XLA_EVENT_TYPE_CODE'
8096: --
8097: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
8098:
8099: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
8100: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
8101:
8102: -- 4955764
8103: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
8104: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
8172: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
8173:
8174: IF xla_accounting_cache_pkg.GetValueChar
8175: (p_source_code => 'LEDGER_CATEGORY_CODE'
8176: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
8177: AND l_bflow_method_code = 'PRIOR_ENTRY'
8178: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
8179: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
8180: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
8312: p_lookup_type => 'XLA_OWNER_TYPE'
8313: ,p_lookup_code => l_component_type_code
8314: )
8315: ,p_token_4 => 'PRODUCT_NAME'
8316: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
8317: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
8318: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
8319: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
8320: ,p_ae_header_id => NULL
8313: ,p_lookup_code => l_component_type_code
8314: )
8315: ,p_token_4 => 'PRODUCT_NAME'
8316: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
8317: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
8318: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
8319: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
8320: ,p_ae_header_id => NULL
8321: );
8314: )
8315: ,p_token_4 => 'PRODUCT_NAME'
8316: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
8317: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
8318: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
8319: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
8320: ,p_ae_header_id => NULL
8321: );
8322:
8315: ,p_token_4 => 'PRODUCT_NAME'
8316: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
8317: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
8318: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
8319: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
8320: ,p_ae_header_id => NULL
8321: );
8322:
8323: IF (C_LEVEL_ERROR>= g_log_level) THEN
8346: ----------------------------------------------------------------------------------
8347: -- 4219869 Business Flow
8348: -- Update journal entry status -- Need to generate this within IF
8349: ----------------------------------------------------------------------------------
8350: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
8351: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
8352: ,p_balance_type_code => l_balance_type_code
8353: );
8354:
8473:
8474: --
8475: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
8476: --
8477: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
8478: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
8479: ELSE
8480: ---------------------------------------------------------------------------------------------------
8481: -- 4262811a Switch Sign
8498:
8499: XLA_AE_LINES_PKG.ValidateCurrentLine;
8500: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
8501:
8502: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
8503: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
8504: ,p_balance_type_code => l_balance_type_code);
8505:
8506: END IF;
8629: l_tmp_amt NUMBER;
8630: l_acc_rev_natural_side_code VARCHAR2(1);
8631:
8632: l_num_entries NUMBER;
8633: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
8634: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
8635: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
8636: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
8637: l_recog_line_1 NUMBER;
8630: l_acc_rev_natural_side_code VARCHAR2(1);
8631:
8632: l_num_entries NUMBER;
8633: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
8634: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
8635: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
8636: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
8637: l_recog_line_1 NUMBER;
8638: l_recog_line_2 NUMBER;
8631:
8632: l_num_entries NUMBER;
8633: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
8634: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
8635: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
8636: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
8637: l_recog_line_1 NUMBER;
8638: l_recog_line_2 NUMBER;
8639:
8632: l_num_entries NUMBER;
8633: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
8634: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
8635: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
8636: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
8637: l_recog_line_1 NUMBER;
8638: l_recog_line_2 NUMBER;
8639:
8640: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
8638: l_recog_line_2 NUMBER;
8639:
8640: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
8641: l_bflow_applied_to_amt NUMBER; -- 5132302
8642: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
8643:
8644: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
8645:
8646: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
8713: l_accrual_line_num := NULL; -- 4262811
8714: l_tmp_amt := NULL; -- 4262811
8715: --
8716:
8717: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
8718: l_balance_type_code <> 'B' THEN
8719: IF NVL(
8720: xla_ae_sources_pkg.GetSystemSourceChar(
8721: p_source_code => 'XLA_EVENT_TYPE_CODE'
8792: --
8793: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
8794:
8795: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
8796: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
8797:
8798: -- 4955764
8799: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
8800: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
8868: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
8869:
8870: IF xla_accounting_cache_pkg.GetValueChar
8871: (p_source_code => 'LEDGER_CATEGORY_CODE'
8872: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
8873: AND l_bflow_method_code = 'PRIOR_ENTRY'
8874: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
8875: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
8876: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
9010: p_lookup_type => 'XLA_OWNER_TYPE'
9011: ,p_lookup_code => l_component_type_code
9012: )
9013: ,p_token_4 => 'PRODUCT_NAME'
9014: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
9015: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
9016: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
9017: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
9018: ,p_ae_header_id => NULL
9011: ,p_lookup_code => l_component_type_code
9012: )
9013: ,p_token_4 => 'PRODUCT_NAME'
9014: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
9015: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
9016: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
9017: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
9018: ,p_ae_header_id => NULL
9019: );
9012: )
9013: ,p_token_4 => 'PRODUCT_NAME'
9014: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
9015: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
9016: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
9017: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
9018: ,p_ae_header_id => NULL
9019: );
9020:
9013: ,p_token_4 => 'PRODUCT_NAME'
9014: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
9015: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
9016: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
9017: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
9018: ,p_ae_header_id => NULL
9019: );
9020:
9021: IF (C_LEVEL_ERROR>= g_log_level) THEN
9044: ----------------------------------------------------------------------------------
9045: -- 4219869 Business Flow
9046: -- Update journal entry status -- Need to generate this within IF
9047: ----------------------------------------------------------------------------------
9048: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
9049: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
9050: ,p_balance_type_code => l_balance_type_code
9051: );
9052:
9173:
9174: --
9175: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
9176: --
9177: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
9178: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
9179: ELSE
9180: ---------------------------------------------------------------------------------------------------
9181: -- 4262811a Switch Sign
9198:
9199: XLA_AE_LINES_PKG.ValidateCurrentLine;
9200: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
9201:
9202: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
9203: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
9204: ,p_balance_type_code => l_balance_type_code);
9205:
9206: END IF;
9327: l_tmp_amt NUMBER;
9328: l_acc_rev_natural_side_code VARCHAR2(1);
9329:
9330: l_num_entries NUMBER;
9331: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
9332: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
9333: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
9334: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
9335: l_recog_line_1 NUMBER;
9328: l_acc_rev_natural_side_code VARCHAR2(1);
9329:
9330: l_num_entries NUMBER;
9331: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
9332: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
9333: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
9334: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
9335: l_recog_line_1 NUMBER;
9336: l_recog_line_2 NUMBER;
9329:
9330: l_num_entries NUMBER;
9331: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
9332: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
9333: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
9334: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
9335: l_recog_line_1 NUMBER;
9336: l_recog_line_2 NUMBER;
9337:
9330: l_num_entries NUMBER;
9331: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
9332: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
9333: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
9334: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
9335: l_recog_line_1 NUMBER;
9336: l_recog_line_2 NUMBER;
9337:
9338: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
9336: l_recog_line_2 NUMBER;
9337:
9338: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
9339: l_bflow_applied_to_amt NUMBER; -- 5132302
9340: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
9341:
9342: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
9343:
9344: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
9411: l_accrual_line_num := NULL; -- 4262811
9412: l_tmp_amt := NULL; -- 4262811
9413: --
9414:
9415: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
9416: l_balance_type_code <> 'B' THEN
9417: IF NVL(
9418: xla_ae_sources_pkg.GetSystemSourceChar(
9419: p_source_code => 'XLA_EVENT_TYPE_CODE'
9488: --
9489: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
9490:
9491: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
9492: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
9493:
9494: -- 4955764
9495: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
9496: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
9564: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
9565:
9566: IF xla_accounting_cache_pkg.GetValueChar
9567: (p_source_code => 'LEDGER_CATEGORY_CODE'
9568: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
9569: AND l_bflow_method_code = 'PRIOR_ENTRY'
9570: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
9571: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
9572: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
9706: p_lookup_type => 'XLA_OWNER_TYPE'
9707: ,p_lookup_code => l_component_type_code
9708: )
9709: ,p_token_4 => 'PRODUCT_NAME'
9710: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
9711: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
9712: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
9713: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
9714: ,p_ae_header_id => NULL
9707: ,p_lookup_code => l_component_type_code
9708: )
9709: ,p_token_4 => 'PRODUCT_NAME'
9710: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
9711: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
9712: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
9713: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
9714: ,p_ae_header_id => NULL
9715: );
9708: )
9709: ,p_token_4 => 'PRODUCT_NAME'
9710: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
9711: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
9712: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
9713: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
9714: ,p_ae_header_id => NULL
9715: );
9716:
9709: ,p_token_4 => 'PRODUCT_NAME'
9710: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
9711: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
9712: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
9713: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
9714: ,p_ae_header_id => NULL
9715: );
9716:
9717: IF (C_LEVEL_ERROR>= g_log_level) THEN
9740: ----------------------------------------------------------------------------------
9741: -- 4219869 Business Flow
9742: -- Update journal entry status -- Need to generate this within IF
9743: ----------------------------------------------------------------------------------
9744: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
9745: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
9746: ,p_balance_type_code => l_balance_type_code
9747: );
9748:
9869:
9870: --
9871: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
9872: --
9873: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
9874: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
9875: ELSE
9876: ---------------------------------------------------------------------------------------------------
9877: -- 4262811a Switch Sign
9894:
9895: XLA_AE_LINES_PKG.ValidateCurrentLine;
9896: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
9897:
9898: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
9899: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
9900: ,p_balance_type_code => l_balance_type_code);
9901:
9902: END IF;
10021: l_tmp_amt NUMBER;
10022: l_acc_rev_natural_side_code VARCHAR2(1);
10023:
10024: l_num_entries NUMBER;
10025: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
10026: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
10027: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
10028: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
10029: l_recog_line_1 NUMBER;
10022: l_acc_rev_natural_side_code VARCHAR2(1);
10023:
10024: l_num_entries NUMBER;
10025: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
10026: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
10027: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
10028: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
10029: l_recog_line_1 NUMBER;
10030: l_recog_line_2 NUMBER;
10023:
10024: l_num_entries NUMBER;
10025: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
10026: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
10027: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
10028: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
10029: l_recog_line_1 NUMBER;
10030: l_recog_line_2 NUMBER;
10031:
10024: l_num_entries NUMBER;
10025: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
10026: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
10027: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
10028: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
10029: l_recog_line_1 NUMBER;
10030: l_recog_line_2 NUMBER;
10031:
10032: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
10030: l_recog_line_2 NUMBER;
10031:
10032: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
10033: l_bflow_applied_to_amt NUMBER; -- 5132302
10034: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
10035:
10036: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
10037:
10038: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
10105: l_accrual_line_num := NULL; -- 4262811
10106: l_tmp_amt := NULL; -- 4262811
10107: --
10108:
10109: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
10110: l_balance_type_code <> 'B' THEN
10111: IF NVL(
10112: xla_ae_sources_pkg.GetSystemSourceChar(
10113: p_source_code => 'XLA_EVENT_TYPE_CODE'
10186: --
10187: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
10188:
10189: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
10190: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
10191:
10192: -- 4955764
10193: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
10194: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
10262: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
10263:
10264: IF xla_accounting_cache_pkg.GetValueChar
10265: (p_source_code => 'LEDGER_CATEGORY_CODE'
10266: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
10267: AND l_bflow_method_code = 'PRIOR_ENTRY'
10268: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
10269: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
10270: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
10402: p_lookup_type => 'XLA_OWNER_TYPE'
10403: ,p_lookup_code => l_component_type_code
10404: )
10405: ,p_token_4 => 'PRODUCT_NAME'
10406: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
10407: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
10408: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
10409: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
10410: ,p_ae_header_id => NULL
10403: ,p_lookup_code => l_component_type_code
10404: )
10405: ,p_token_4 => 'PRODUCT_NAME'
10406: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
10407: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
10408: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
10409: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
10410: ,p_ae_header_id => NULL
10411: );
10404: )
10405: ,p_token_4 => 'PRODUCT_NAME'
10406: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
10407: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
10408: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
10409: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
10410: ,p_ae_header_id => NULL
10411: );
10412:
10405: ,p_token_4 => 'PRODUCT_NAME'
10406: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
10407: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
10408: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
10409: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
10410: ,p_ae_header_id => NULL
10411: );
10412:
10413: IF (C_LEVEL_ERROR>= g_log_level) THEN
10436: ----------------------------------------------------------------------------------
10437: -- 4219869 Business Flow
10438: -- Update journal entry status -- Need to generate this within IF
10439: ----------------------------------------------------------------------------------
10440: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
10441: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
10442: ,p_balance_type_code => l_balance_type_code
10443: );
10444:
10563:
10564: --
10565: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
10566: --
10567: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
10568: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
10569: ELSE
10570: ---------------------------------------------------------------------------------------------------
10571: -- 4262811a Switch Sign
10588:
10589: XLA_AE_LINES_PKG.ValidateCurrentLine;
10590: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
10591:
10592: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
10593: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
10594: ,p_balance_type_code => l_balance_type_code);
10595:
10596: END IF;
10713: l_tmp_amt NUMBER;
10714: l_acc_rev_natural_side_code VARCHAR2(1);
10715:
10716: l_num_entries NUMBER;
10717: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
10718: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
10719: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
10720: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
10721: l_recog_line_1 NUMBER;
10714: l_acc_rev_natural_side_code VARCHAR2(1);
10715:
10716: l_num_entries NUMBER;
10717: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
10718: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
10719: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
10720: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
10721: l_recog_line_1 NUMBER;
10722: l_recog_line_2 NUMBER;
10715:
10716: l_num_entries NUMBER;
10717: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
10718: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
10719: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
10720: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
10721: l_recog_line_1 NUMBER;
10722: l_recog_line_2 NUMBER;
10723:
10716: l_num_entries NUMBER;
10717: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
10718: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
10719: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
10720: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
10721: l_recog_line_1 NUMBER;
10722: l_recog_line_2 NUMBER;
10723:
10724: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
10722: l_recog_line_2 NUMBER;
10723:
10724: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
10725: l_bflow_applied_to_amt NUMBER; -- 5132302
10726: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
10727:
10728: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
10729:
10730: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
10797: l_accrual_line_num := NULL; -- 4262811
10798: l_tmp_amt := NULL; -- 4262811
10799: --
10800:
10801: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
10802: l_balance_type_code <> 'B' THEN
10803: IF NVL(
10804: xla_ae_sources_pkg.GetSystemSourceChar(
10805: p_source_code => 'XLA_EVENT_TYPE_CODE'
10876: --
10877: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
10878:
10879: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
10880: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
10881:
10882: -- 4955764
10883: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
10884: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
10952: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
10953:
10954: IF xla_accounting_cache_pkg.GetValueChar
10955: (p_source_code => 'LEDGER_CATEGORY_CODE'
10956: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
10957: AND l_bflow_method_code = 'PRIOR_ENTRY'
10958: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
10959: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
10960: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
11092: p_lookup_type => 'XLA_OWNER_TYPE'
11093: ,p_lookup_code => l_component_type_code
11094: )
11095: ,p_token_4 => 'PRODUCT_NAME'
11096: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
11097: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
11098: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
11099: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
11100: ,p_ae_header_id => NULL
11093: ,p_lookup_code => l_component_type_code
11094: )
11095: ,p_token_4 => 'PRODUCT_NAME'
11096: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
11097: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
11098: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
11099: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
11100: ,p_ae_header_id => NULL
11101: );
11094: )
11095: ,p_token_4 => 'PRODUCT_NAME'
11096: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
11097: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
11098: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
11099: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
11100: ,p_ae_header_id => NULL
11101: );
11102:
11095: ,p_token_4 => 'PRODUCT_NAME'
11096: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
11097: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
11098: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
11099: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
11100: ,p_ae_header_id => NULL
11101: );
11102:
11103: IF (C_LEVEL_ERROR>= g_log_level) THEN
11126: ----------------------------------------------------------------------------------
11127: -- 4219869 Business Flow
11128: -- Update journal entry status -- Need to generate this within IF
11129: ----------------------------------------------------------------------------------
11130: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
11131: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
11132: ,p_balance_type_code => l_balance_type_code
11133: );
11134:
11253:
11254: --
11255: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
11256: --
11257: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
11258: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
11259: ELSE
11260: ---------------------------------------------------------------------------------------------------
11261: -- 4262811a Switch Sign
11278:
11279: XLA_AE_LINES_PKG.ValidateCurrentLine;
11280: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
11281:
11282: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
11283: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
11284: ,p_balance_type_code => l_balance_type_code);
11285:
11286: END IF;
11405: l_tmp_amt NUMBER;
11406: l_acc_rev_natural_side_code VARCHAR2(1);
11407:
11408: l_num_entries NUMBER;
11409: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
11410: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
11411: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
11412: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
11413: l_recog_line_1 NUMBER;
11406: l_acc_rev_natural_side_code VARCHAR2(1);
11407:
11408: l_num_entries NUMBER;
11409: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
11410: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
11411: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
11412: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
11413: l_recog_line_1 NUMBER;
11414: l_recog_line_2 NUMBER;
11407:
11408: l_num_entries NUMBER;
11409: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
11410: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
11411: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
11412: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
11413: l_recog_line_1 NUMBER;
11414: l_recog_line_2 NUMBER;
11415:
11408: l_num_entries NUMBER;
11409: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
11410: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
11411: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
11412: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
11413: l_recog_line_1 NUMBER;
11414: l_recog_line_2 NUMBER;
11415:
11416: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
11414: l_recog_line_2 NUMBER;
11415:
11416: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
11417: l_bflow_applied_to_amt NUMBER; -- 5132302
11418: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
11419:
11420: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
11421:
11422: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
11489: l_accrual_line_num := NULL; -- 4262811
11490: l_tmp_amt := NULL; -- 4262811
11491: --
11492:
11493: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
11494: l_balance_type_code <> 'B' THEN
11495: IF NVL(p_source_5,'
11496: ') = 'Y' AND
11497: NVL(
11570: --
11571: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
11572:
11573: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
11574: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
11575:
11576: -- 4955764
11577: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
11578: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
11646: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
11647:
11648: IF xla_accounting_cache_pkg.GetValueChar
11649: (p_source_code => 'LEDGER_CATEGORY_CODE'
11650: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
11651: AND l_bflow_method_code = 'PRIOR_ENTRY'
11652: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
11653: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
11654: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
11786: p_lookup_type => 'XLA_OWNER_TYPE'
11787: ,p_lookup_code => l_component_type_code
11788: )
11789: ,p_token_4 => 'PRODUCT_NAME'
11790: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
11791: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
11792: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
11793: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
11794: ,p_ae_header_id => NULL
11787: ,p_lookup_code => l_component_type_code
11788: )
11789: ,p_token_4 => 'PRODUCT_NAME'
11790: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
11791: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
11792: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
11793: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
11794: ,p_ae_header_id => NULL
11795: );
11788: )
11789: ,p_token_4 => 'PRODUCT_NAME'
11790: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
11791: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
11792: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
11793: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
11794: ,p_ae_header_id => NULL
11795: );
11796:
11789: ,p_token_4 => 'PRODUCT_NAME'
11790: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
11791: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
11792: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
11793: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
11794: ,p_ae_header_id => NULL
11795: );
11796:
11797: IF (C_LEVEL_ERROR>= g_log_level) THEN
11820: ----------------------------------------------------------------------------------
11821: -- 4219869 Business Flow
11822: -- Update journal entry status -- Need to generate this within IF
11823: ----------------------------------------------------------------------------------
11824: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
11825: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
11826: ,p_balance_type_code => l_balance_type_code
11827: );
11828:
11947:
11948: --
11949: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
11950: --
11951: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
11952: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
11953: ELSE
11954: ---------------------------------------------------------------------------------------------------
11955: -- 4262811a Switch Sign
11972:
11973: XLA_AE_LINES_PKG.ValidateCurrentLine;
11974: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
11975:
11976: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
11977: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
11978: ,p_balance_type_code => l_balance_type_code);
11979:
11980: END IF;
12097: l_tmp_amt NUMBER;
12098: l_acc_rev_natural_side_code VARCHAR2(1);
12099:
12100: l_num_entries NUMBER;
12101: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
12102: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
12103: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
12104: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
12105: l_recog_line_1 NUMBER;
12098: l_acc_rev_natural_side_code VARCHAR2(1);
12099:
12100: l_num_entries NUMBER;
12101: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
12102: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
12103: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
12104: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
12105: l_recog_line_1 NUMBER;
12106: l_recog_line_2 NUMBER;
12099:
12100: l_num_entries NUMBER;
12101: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
12102: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
12103: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
12104: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
12105: l_recog_line_1 NUMBER;
12106: l_recog_line_2 NUMBER;
12107:
12100: l_num_entries NUMBER;
12101: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
12102: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
12103: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
12104: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
12105: l_recog_line_1 NUMBER;
12106: l_recog_line_2 NUMBER;
12107:
12108: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
12106: l_recog_line_2 NUMBER;
12107:
12108: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
12109: l_bflow_applied_to_amt NUMBER; -- 5132302
12110: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
12111:
12112: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
12113:
12114: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
12181: l_accrual_line_num := NULL; -- 4262811
12182: l_tmp_amt := NULL; -- 4262811
12183: --
12184:
12185: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
12186: l_balance_type_code <> 'B' THEN
12187: IF NVL(
12188: xla_ae_sources_pkg.GetSystemSourceChar(
12189: p_source_code => 'XLA_EVENT_TYPE_CODE'
12260: --
12261: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
12262:
12263: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
12264: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
12265:
12266: -- 4955764
12267: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
12268: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
12336: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
12337:
12338: IF xla_accounting_cache_pkg.GetValueChar
12339: (p_source_code => 'LEDGER_CATEGORY_CODE'
12340: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
12341: AND l_bflow_method_code = 'PRIOR_ENTRY'
12342: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
12343: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
12344: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
12476: p_lookup_type => 'XLA_OWNER_TYPE'
12477: ,p_lookup_code => l_component_type_code
12478: )
12479: ,p_token_4 => 'PRODUCT_NAME'
12480: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
12481: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
12482: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
12483: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
12484: ,p_ae_header_id => NULL
12477: ,p_lookup_code => l_component_type_code
12478: )
12479: ,p_token_4 => 'PRODUCT_NAME'
12480: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
12481: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
12482: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
12483: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
12484: ,p_ae_header_id => NULL
12485: );
12478: )
12479: ,p_token_4 => 'PRODUCT_NAME'
12480: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
12481: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
12482: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
12483: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
12484: ,p_ae_header_id => NULL
12485: );
12486:
12479: ,p_token_4 => 'PRODUCT_NAME'
12480: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
12481: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
12482: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
12483: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
12484: ,p_ae_header_id => NULL
12485: );
12486:
12487: IF (C_LEVEL_ERROR>= g_log_level) THEN
12510: ----------------------------------------------------------------------------------
12511: -- 4219869 Business Flow
12512: -- Update journal entry status -- Need to generate this within IF
12513: ----------------------------------------------------------------------------------
12514: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
12515: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
12516: ,p_balance_type_code => l_balance_type_code
12517: );
12518:
12637:
12638: --
12639: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
12640: --
12641: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
12642: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
12643: ELSE
12644: ---------------------------------------------------------------------------------------------------
12645: -- 4262811a Switch Sign
12662:
12663: XLA_AE_LINES_PKG.ValidateCurrentLine;
12664: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
12665:
12666: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
12667: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
12668: ,p_balance_type_code => l_balance_type_code);
12669:
12670: END IF;
12789: l_tmp_amt NUMBER;
12790: l_acc_rev_natural_side_code VARCHAR2(1);
12791:
12792: l_num_entries NUMBER;
12793: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
12794: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
12795: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
12796: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
12797: l_recog_line_1 NUMBER;
12790: l_acc_rev_natural_side_code VARCHAR2(1);
12791:
12792: l_num_entries NUMBER;
12793: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
12794: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
12795: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
12796: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
12797: l_recog_line_1 NUMBER;
12798: l_recog_line_2 NUMBER;
12791:
12792: l_num_entries NUMBER;
12793: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
12794: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
12795: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
12796: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
12797: l_recog_line_1 NUMBER;
12798: l_recog_line_2 NUMBER;
12799:
12792: l_num_entries NUMBER;
12793: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
12794: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
12795: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
12796: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
12797: l_recog_line_1 NUMBER;
12798: l_recog_line_2 NUMBER;
12799:
12800: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
12798: l_recog_line_2 NUMBER;
12799:
12800: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
12801: l_bflow_applied_to_amt NUMBER; -- 5132302
12802: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
12803:
12804: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
12805:
12806: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
12873: l_accrual_line_num := NULL; -- 4262811
12874: l_tmp_amt := NULL; -- 4262811
12875: --
12876:
12877: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
12878: l_balance_type_code <> 'B' THEN
12879: IF NVL(p_source_5,'
12880: ') = 'Y' AND
12881: NVL(
12954: --
12955: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
12956:
12957: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
12958: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
12959:
12960: -- 4955764
12961: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
12962: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
13030: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
13031:
13032: IF xla_accounting_cache_pkg.GetValueChar
13033: (p_source_code => 'LEDGER_CATEGORY_CODE'
13034: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
13035: AND l_bflow_method_code = 'PRIOR_ENTRY'
13036: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
13037: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
13038: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
13170: p_lookup_type => 'XLA_OWNER_TYPE'
13171: ,p_lookup_code => l_component_type_code
13172: )
13173: ,p_token_4 => 'PRODUCT_NAME'
13174: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
13175: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
13176: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
13177: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
13178: ,p_ae_header_id => NULL
13171: ,p_lookup_code => l_component_type_code
13172: )
13173: ,p_token_4 => 'PRODUCT_NAME'
13174: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
13175: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
13176: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
13177: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
13178: ,p_ae_header_id => NULL
13179: );
13172: )
13173: ,p_token_4 => 'PRODUCT_NAME'
13174: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
13175: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
13176: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
13177: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
13178: ,p_ae_header_id => NULL
13179: );
13180:
13173: ,p_token_4 => 'PRODUCT_NAME'
13174: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
13175: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
13176: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
13177: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
13178: ,p_ae_header_id => NULL
13179: );
13180:
13181: IF (C_LEVEL_ERROR>= g_log_level) THEN
13204: ----------------------------------------------------------------------------------
13205: -- 4219869 Business Flow
13206: -- Update journal entry status -- Need to generate this within IF
13207: ----------------------------------------------------------------------------------
13208: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
13209: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
13210: ,p_balance_type_code => l_balance_type_code
13211: );
13212:
13331:
13332: --
13333: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
13334: --
13335: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
13336: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
13337: ELSE
13338: ---------------------------------------------------------------------------------------------------
13339: -- 4262811a Switch Sign
13356:
13357: XLA_AE_LINES_PKG.ValidateCurrentLine;
13358: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
13359:
13360: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
13361: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
13362: ,p_balance_type_code => l_balance_type_code);
13363:
13364: END IF;
13485: l_tmp_amt NUMBER;
13486: l_acc_rev_natural_side_code VARCHAR2(1);
13487:
13488: l_num_entries NUMBER;
13489: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
13490: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
13491: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
13492: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
13493: l_recog_line_1 NUMBER;
13486: l_acc_rev_natural_side_code VARCHAR2(1);
13487:
13488: l_num_entries NUMBER;
13489: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
13490: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
13491: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
13492: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
13493: l_recog_line_1 NUMBER;
13494: l_recog_line_2 NUMBER;
13487:
13488: l_num_entries NUMBER;
13489: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
13490: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
13491: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
13492: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
13493: l_recog_line_1 NUMBER;
13494: l_recog_line_2 NUMBER;
13495:
13488: l_num_entries NUMBER;
13489: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
13490: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
13491: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
13492: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
13493: l_recog_line_1 NUMBER;
13494: l_recog_line_2 NUMBER;
13495:
13496: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
13494: l_recog_line_2 NUMBER;
13495:
13496: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
13497: l_bflow_applied_to_amt NUMBER; -- 5132302
13498: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
13499:
13500: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
13501:
13502: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
13569: l_accrual_line_num := NULL; -- 4262811
13570: l_tmp_amt := NULL; -- 4262811
13571: --
13572:
13573: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
13574: l_balance_type_code <> 'B' THEN
13575: IF NVL(
13576: xla_ae_sources_pkg.GetSystemSourceChar(
13577: p_source_code => 'XLA_EVENT_TYPE_CODE'
13648: --
13649: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
13650:
13651: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
13652: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
13653:
13654: -- 4955764
13655: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
13656: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
13724: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
13725:
13726: IF xla_accounting_cache_pkg.GetValueChar
13727: (p_source_code => 'LEDGER_CATEGORY_CODE'
13728: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
13729: AND l_bflow_method_code = 'PRIOR_ENTRY'
13730: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
13731: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
13732: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
13866: p_lookup_type => 'XLA_OWNER_TYPE'
13867: ,p_lookup_code => l_component_type_code
13868: )
13869: ,p_token_4 => 'PRODUCT_NAME'
13870: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
13871: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
13872: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
13873: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
13874: ,p_ae_header_id => NULL
13867: ,p_lookup_code => l_component_type_code
13868: )
13869: ,p_token_4 => 'PRODUCT_NAME'
13870: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
13871: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
13872: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
13873: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
13874: ,p_ae_header_id => NULL
13875: );
13868: )
13869: ,p_token_4 => 'PRODUCT_NAME'
13870: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
13871: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
13872: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
13873: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
13874: ,p_ae_header_id => NULL
13875: );
13876:
13869: ,p_token_4 => 'PRODUCT_NAME'
13870: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
13871: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
13872: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
13873: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
13874: ,p_ae_header_id => NULL
13875: );
13876:
13877: IF (C_LEVEL_ERROR>= g_log_level) THEN
13900: ----------------------------------------------------------------------------------
13901: -- 4219869 Business Flow
13902: -- Update journal entry status -- Need to generate this within IF
13903: ----------------------------------------------------------------------------------
13904: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
13905: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
13906: ,p_balance_type_code => l_balance_type_code
13907: );
13908:
14029:
14030: --
14031: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
14032: --
14033: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
14034: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
14035: ELSE
14036: ---------------------------------------------------------------------------------------------------
14037: -- 4262811a Switch Sign
14054:
14055: XLA_AE_LINES_PKG.ValidateCurrentLine;
14056: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
14057:
14058: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
14059: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
14060: ,p_balance_type_code => l_balance_type_code);
14061:
14062: END IF;
14185: l_tmp_amt NUMBER;
14186: l_acc_rev_natural_side_code VARCHAR2(1);
14187:
14188: l_num_entries NUMBER;
14189: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
14190: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
14191: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
14192: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
14193: l_recog_line_1 NUMBER;
14186: l_acc_rev_natural_side_code VARCHAR2(1);
14187:
14188: l_num_entries NUMBER;
14189: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
14190: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
14191: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
14192: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
14193: l_recog_line_1 NUMBER;
14194: l_recog_line_2 NUMBER;
14187:
14188: l_num_entries NUMBER;
14189: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
14190: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
14191: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
14192: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
14193: l_recog_line_1 NUMBER;
14194: l_recog_line_2 NUMBER;
14195:
14188: l_num_entries NUMBER;
14189: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
14190: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
14191: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
14192: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
14193: l_recog_line_1 NUMBER;
14194: l_recog_line_2 NUMBER;
14195:
14196: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
14194: l_recog_line_2 NUMBER;
14195:
14196: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
14197: l_bflow_applied_to_amt NUMBER; -- 5132302
14198: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
14199:
14200: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
14201:
14202: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
14269: l_accrual_line_num := NULL; -- 4262811
14270: l_tmp_amt := NULL; -- 4262811
14271: --
14272:
14273: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
14274: l_balance_type_code <> 'B' THEN
14275: IF NVL(
14276: xla_ae_sources_pkg.GetSystemSourceChar(
14277: p_source_code => 'XLA_EVENT_TYPE_CODE'
14348: --
14349: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
14350:
14351: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
14352: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
14353:
14354: -- 4955764
14355: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
14356: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
14424: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
14425:
14426: IF xla_accounting_cache_pkg.GetValueChar
14427: (p_source_code => 'LEDGER_CATEGORY_CODE'
14428: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
14429: AND l_bflow_method_code = 'PRIOR_ENTRY'
14430: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
14431: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
14432: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
14566: p_lookup_type => 'XLA_OWNER_TYPE'
14567: ,p_lookup_code => l_component_type_code
14568: )
14569: ,p_token_4 => 'PRODUCT_NAME'
14570: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
14571: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
14572: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
14573: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
14574: ,p_ae_header_id => NULL
14567: ,p_lookup_code => l_component_type_code
14568: )
14569: ,p_token_4 => 'PRODUCT_NAME'
14570: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
14571: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
14572: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
14573: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
14574: ,p_ae_header_id => NULL
14575: );
14568: )
14569: ,p_token_4 => 'PRODUCT_NAME'
14570: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
14571: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
14572: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
14573: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
14574: ,p_ae_header_id => NULL
14575: );
14576:
14569: ,p_token_4 => 'PRODUCT_NAME'
14570: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
14571: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
14572: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
14573: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
14574: ,p_ae_header_id => NULL
14575: );
14576:
14577: IF (C_LEVEL_ERROR>= g_log_level) THEN
14600: ----------------------------------------------------------------------------------
14601: -- 4219869 Business Flow
14602: -- Update journal entry status -- Need to generate this within IF
14603: ----------------------------------------------------------------------------------
14604: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
14605: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
14606: ,p_balance_type_code => l_balance_type_code
14607: );
14608:
14729:
14730: --
14731: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
14732: --
14733: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
14734: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
14735: ELSE
14736: ---------------------------------------------------------------------------------------------------
14737: -- 4262811a Switch Sign
14754:
14755: XLA_AE_LINES_PKG.ValidateCurrentLine;
14756: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
14757:
14758: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
14759: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
14760: ,p_balance_type_code => l_balance_type_code);
14761:
14762: END IF;
14883: l_tmp_amt NUMBER;
14884: l_acc_rev_natural_side_code VARCHAR2(1);
14885:
14886: l_num_entries NUMBER;
14887: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
14888: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
14889: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
14890: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
14891: l_recog_line_1 NUMBER;
14884: l_acc_rev_natural_side_code VARCHAR2(1);
14885:
14886: l_num_entries NUMBER;
14887: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
14888: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
14889: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
14890: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
14891: l_recog_line_1 NUMBER;
14892: l_recog_line_2 NUMBER;
14885:
14886: l_num_entries NUMBER;
14887: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
14888: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
14889: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
14890: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
14891: l_recog_line_1 NUMBER;
14892: l_recog_line_2 NUMBER;
14893:
14886: l_num_entries NUMBER;
14887: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
14888: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
14889: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
14890: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
14891: l_recog_line_1 NUMBER;
14892: l_recog_line_2 NUMBER;
14893:
14894: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
14892: l_recog_line_2 NUMBER;
14893:
14894: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
14895: l_bflow_applied_to_amt NUMBER; -- 5132302
14896: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
14897:
14898: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
14899:
14900: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
14967: l_accrual_line_num := NULL; -- 4262811
14968: l_tmp_amt := NULL; -- 4262811
14969: --
14970:
14971: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
14972: l_balance_type_code <> 'B' THEN
14973: IF NVL(
14974: xla_ae_sources_pkg.GetSystemSourceChar(
14975: p_source_code => 'XLA_EVENT_TYPE_CODE'
15044: --
15045: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
15046:
15047: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
15048: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
15049:
15050: -- 4955764
15051: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
15052: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
15120: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
15121:
15122: IF xla_accounting_cache_pkg.GetValueChar
15123: (p_source_code => 'LEDGER_CATEGORY_CODE'
15124: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
15125: AND l_bflow_method_code = 'PRIOR_ENTRY'
15126: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
15127: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
15128: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
15262: p_lookup_type => 'XLA_OWNER_TYPE'
15263: ,p_lookup_code => l_component_type_code
15264: )
15265: ,p_token_4 => 'PRODUCT_NAME'
15266: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
15267: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
15268: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
15269: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
15270: ,p_ae_header_id => NULL
15263: ,p_lookup_code => l_component_type_code
15264: )
15265: ,p_token_4 => 'PRODUCT_NAME'
15266: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
15267: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
15268: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
15269: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
15270: ,p_ae_header_id => NULL
15271: );
15264: )
15265: ,p_token_4 => 'PRODUCT_NAME'
15266: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
15267: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
15268: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
15269: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
15270: ,p_ae_header_id => NULL
15271: );
15272:
15265: ,p_token_4 => 'PRODUCT_NAME'
15266: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
15267: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
15268: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
15269: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
15270: ,p_ae_header_id => NULL
15271: );
15272:
15273: IF (C_LEVEL_ERROR>= g_log_level) THEN
15296: ----------------------------------------------------------------------------------
15297: -- 4219869 Business Flow
15298: -- Update journal entry status -- Need to generate this within IF
15299: ----------------------------------------------------------------------------------
15300: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
15301: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
15302: ,p_balance_type_code => l_balance_type_code
15303: );
15304:
15425:
15426: --
15427: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
15428: --
15429: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
15430: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
15431: ELSE
15432: ---------------------------------------------------------------------------------------------------
15433: -- 4262811a Switch Sign
15450:
15451: XLA_AE_LINES_PKG.ValidateCurrentLine;
15452: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
15453:
15454: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
15455: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
15456: ,p_balance_type_code => l_balance_type_code);
15457:
15458: END IF;
15575: l_tmp_amt NUMBER;
15576: l_acc_rev_natural_side_code VARCHAR2(1);
15577:
15578: l_num_entries NUMBER;
15579: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
15580: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
15581: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
15582: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
15583: l_recog_line_1 NUMBER;
15576: l_acc_rev_natural_side_code VARCHAR2(1);
15577:
15578: l_num_entries NUMBER;
15579: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
15580: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
15581: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
15582: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
15583: l_recog_line_1 NUMBER;
15584: l_recog_line_2 NUMBER;
15577:
15578: l_num_entries NUMBER;
15579: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
15580: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
15581: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
15582: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
15583: l_recog_line_1 NUMBER;
15584: l_recog_line_2 NUMBER;
15585:
15578: l_num_entries NUMBER;
15579: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
15580: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
15581: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
15582: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
15583: l_recog_line_1 NUMBER;
15584: l_recog_line_2 NUMBER;
15585:
15586: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
15584: l_recog_line_2 NUMBER;
15585:
15586: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
15587: l_bflow_applied_to_amt NUMBER; -- 5132302
15588: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
15589:
15590: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
15591:
15592: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
15659: l_accrual_line_num := NULL; -- 4262811
15660: l_tmp_amt := NULL; -- 4262811
15661: --
15662:
15663: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
15664: l_balance_type_code <> 'B' THEN
15665: IF NVL(
15666: xla_ae_sources_pkg.GetSystemSourceChar(
15667: p_source_code => 'XLA_EVENT_TYPE_CODE'
15739: --
15740: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
15741:
15742: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
15743: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
15744:
15745: -- 4955764
15746: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
15747: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
15815: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
15816:
15817: IF xla_accounting_cache_pkg.GetValueChar
15818: (p_source_code => 'LEDGER_CATEGORY_CODE'
15819: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
15820: AND l_bflow_method_code = 'PRIOR_ENTRY'
15821: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
15822: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
15823: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
15955: p_lookup_type => 'XLA_OWNER_TYPE'
15956: ,p_lookup_code => l_component_type_code
15957: )
15958: ,p_token_4 => 'PRODUCT_NAME'
15959: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
15960: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
15961: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
15962: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
15963: ,p_ae_header_id => NULL
15956: ,p_lookup_code => l_component_type_code
15957: )
15958: ,p_token_4 => 'PRODUCT_NAME'
15959: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
15960: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
15961: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
15962: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
15963: ,p_ae_header_id => NULL
15964: );
15957: )
15958: ,p_token_4 => 'PRODUCT_NAME'
15959: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
15960: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
15961: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
15962: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
15963: ,p_ae_header_id => NULL
15964: );
15965:
15958: ,p_token_4 => 'PRODUCT_NAME'
15959: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
15960: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
15961: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
15962: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
15963: ,p_ae_header_id => NULL
15964: );
15965:
15966: IF (C_LEVEL_ERROR>= g_log_level) THEN
15989: ----------------------------------------------------------------------------------
15990: -- 4219869 Business Flow
15991: -- Update journal entry status -- Need to generate this within IF
15992: ----------------------------------------------------------------------------------
15993: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
15994: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
15995: ,p_balance_type_code => l_balance_type_code
15996: );
15997:
16116:
16117: --
16118: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
16119: --
16120: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
16121: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
16122: ELSE
16123: ---------------------------------------------------------------------------------------------------
16124: -- 4262811a Switch Sign
16141:
16142: XLA_AE_LINES_PKG.ValidateCurrentLine;
16143: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
16144:
16145: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
16146: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
16147: ,p_balance_type_code => l_balance_type_code);
16148:
16149: END IF;
16264: l_tmp_amt NUMBER;
16265: l_acc_rev_natural_side_code VARCHAR2(1);
16266:
16267: l_num_entries NUMBER;
16268: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
16269: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
16270: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
16271: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
16272: l_recog_line_1 NUMBER;
16265: l_acc_rev_natural_side_code VARCHAR2(1);
16266:
16267: l_num_entries NUMBER;
16268: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
16269: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
16270: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
16271: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
16272: l_recog_line_1 NUMBER;
16273: l_recog_line_2 NUMBER;
16266:
16267: l_num_entries NUMBER;
16268: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
16269: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
16270: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
16271: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
16272: l_recog_line_1 NUMBER;
16273: l_recog_line_2 NUMBER;
16274:
16267: l_num_entries NUMBER;
16268: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
16269: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
16270: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
16271: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
16272: l_recog_line_1 NUMBER;
16273: l_recog_line_2 NUMBER;
16274:
16275: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
16273: l_recog_line_2 NUMBER;
16274:
16275: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
16276: l_bflow_applied_to_amt NUMBER; -- 5132302
16277: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
16278:
16279: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
16280:
16281: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
16348: l_accrual_line_num := NULL; -- 4262811
16349: l_tmp_amt := NULL; -- 4262811
16350: --
16351:
16352: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
16353: l_balance_type_code <> 'B' THEN
16354: IF NVL(
16355: xla_ae_sources_pkg.GetSystemSourceChar(
16356: p_source_code => 'XLA_EVENT_TYPE_CODE'
16426: --
16427: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
16428:
16429: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
16430: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
16431:
16432: -- 4955764
16433: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
16434: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
16502: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
16503:
16504: IF xla_accounting_cache_pkg.GetValueChar
16505: (p_source_code => 'LEDGER_CATEGORY_CODE'
16506: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
16507: AND l_bflow_method_code = 'PRIOR_ENTRY'
16508: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
16509: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
16510: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
16642: p_lookup_type => 'XLA_OWNER_TYPE'
16643: ,p_lookup_code => l_component_type_code
16644: )
16645: ,p_token_4 => 'PRODUCT_NAME'
16646: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
16647: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
16648: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
16649: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
16650: ,p_ae_header_id => NULL
16643: ,p_lookup_code => l_component_type_code
16644: )
16645: ,p_token_4 => 'PRODUCT_NAME'
16646: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
16647: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
16648: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
16649: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
16650: ,p_ae_header_id => NULL
16651: );
16644: )
16645: ,p_token_4 => 'PRODUCT_NAME'
16646: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
16647: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
16648: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
16649: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
16650: ,p_ae_header_id => NULL
16651: );
16652:
16645: ,p_token_4 => 'PRODUCT_NAME'
16646: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
16647: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
16648: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
16649: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
16650: ,p_ae_header_id => NULL
16651: );
16652:
16653: IF (C_LEVEL_ERROR>= g_log_level) THEN
16676: ----------------------------------------------------------------------------------
16677: -- 4219869 Business Flow
16678: -- Update journal entry status -- Need to generate this within IF
16679: ----------------------------------------------------------------------------------
16680: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
16681: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
16682: ,p_balance_type_code => l_balance_type_code
16683: );
16684:
16803:
16804: --
16805: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
16806: --
16807: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
16808: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
16809: ELSE
16810: ---------------------------------------------------------------------------------------------------
16811: -- 4262811a Switch Sign
16828:
16829: XLA_AE_LINES_PKG.ValidateCurrentLine;
16830: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
16831:
16832: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
16833: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
16834: ,p_balance_type_code => l_balance_type_code);
16835:
16836: END IF;
16953: l_tmp_amt NUMBER;
16954: l_acc_rev_natural_side_code VARCHAR2(1);
16955:
16956: l_num_entries NUMBER;
16957: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
16958: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
16959: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
16960: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
16961: l_recog_line_1 NUMBER;
16954: l_acc_rev_natural_side_code VARCHAR2(1);
16955:
16956: l_num_entries NUMBER;
16957: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
16958: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
16959: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
16960: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
16961: l_recog_line_1 NUMBER;
16962: l_recog_line_2 NUMBER;
16955:
16956: l_num_entries NUMBER;
16957: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
16958: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
16959: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
16960: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
16961: l_recog_line_1 NUMBER;
16962: l_recog_line_2 NUMBER;
16963:
16956: l_num_entries NUMBER;
16957: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
16958: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
16959: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
16960: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
16961: l_recog_line_1 NUMBER;
16962: l_recog_line_2 NUMBER;
16963:
16964: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
16962: l_recog_line_2 NUMBER;
16963:
16964: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
16965: l_bflow_applied_to_amt NUMBER; -- 5132302
16966: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
16967:
16968: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
16969:
16970: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
17037: l_accrual_line_num := NULL; -- 4262811
17038: l_tmp_amt := NULL; -- 4262811
17039: --
17040:
17041: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
17042: l_balance_type_code <> 'B' THEN
17043: IF NVL(
17044: xla_ae_sources_pkg.GetSystemSourceChar(
17045: p_source_code => 'XLA_EVENT_TYPE_CODE'
17117: --
17118: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
17119:
17120: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
17121: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
17122:
17123: -- 4955764
17124: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
17125: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
17193: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
17194:
17195: IF xla_accounting_cache_pkg.GetValueChar
17196: (p_source_code => 'LEDGER_CATEGORY_CODE'
17197: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
17198: AND l_bflow_method_code = 'PRIOR_ENTRY'
17199: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
17200: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
17201: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
17333: p_lookup_type => 'XLA_OWNER_TYPE'
17334: ,p_lookup_code => l_component_type_code
17335: )
17336: ,p_token_4 => 'PRODUCT_NAME'
17337: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
17338: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
17339: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
17340: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
17341: ,p_ae_header_id => NULL
17334: ,p_lookup_code => l_component_type_code
17335: )
17336: ,p_token_4 => 'PRODUCT_NAME'
17337: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
17338: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
17339: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
17340: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
17341: ,p_ae_header_id => NULL
17342: );
17335: )
17336: ,p_token_4 => 'PRODUCT_NAME'
17337: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
17338: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
17339: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
17340: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
17341: ,p_ae_header_id => NULL
17342: );
17343:
17336: ,p_token_4 => 'PRODUCT_NAME'
17337: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
17338: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
17339: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
17340: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
17341: ,p_ae_header_id => NULL
17342: );
17343:
17344: IF (C_LEVEL_ERROR>= g_log_level) THEN
17367: ----------------------------------------------------------------------------------
17368: -- 4219869 Business Flow
17369: -- Update journal entry status -- Need to generate this within IF
17370: ----------------------------------------------------------------------------------
17371: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
17372: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
17373: ,p_balance_type_code => l_balance_type_code
17374: );
17375:
17494:
17495: --
17496: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
17497: --
17498: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
17499: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
17500: ELSE
17501: ---------------------------------------------------------------------------------------------------
17502: -- 4262811a Switch Sign
17519:
17520: XLA_AE_LINES_PKG.ValidateCurrentLine;
17521: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
17522:
17523: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
17524: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
17525: ,p_balance_type_code => l_balance_type_code);
17526:
17527: END IF;
17642: l_tmp_amt NUMBER;
17643: l_acc_rev_natural_side_code VARCHAR2(1);
17644:
17645: l_num_entries NUMBER;
17646: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
17647: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
17648: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
17649: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
17650: l_recog_line_1 NUMBER;
17643: l_acc_rev_natural_side_code VARCHAR2(1);
17644:
17645: l_num_entries NUMBER;
17646: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
17647: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
17648: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
17649: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
17650: l_recog_line_1 NUMBER;
17651: l_recog_line_2 NUMBER;
17644:
17645: l_num_entries NUMBER;
17646: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
17647: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
17648: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
17649: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
17650: l_recog_line_1 NUMBER;
17651: l_recog_line_2 NUMBER;
17652:
17645: l_num_entries NUMBER;
17646: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
17647: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
17648: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
17649: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
17650: l_recog_line_1 NUMBER;
17651: l_recog_line_2 NUMBER;
17652:
17653: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
17651: l_recog_line_2 NUMBER;
17652:
17653: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
17654: l_bflow_applied_to_amt NUMBER; -- 5132302
17655: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
17656:
17657: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
17658:
17659: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
17726: l_accrual_line_num := NULL; -- 4262811
17727: l_tmp_amt := NULL; -- 4262811
17728: --
17729:
17730: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
17731: l_balance_type_code <> 'B' THEN
17732: IF NVL(
17733: xla_ae_sources_pkg.GetSystemSourceChar(
17734: p_source_code => 'XLA_EVENT_TYPE_CODE'
17804: --
17805: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
17806:
17807: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
17808: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
17809:
17810: -- 4955764
17811: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
17812: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
17880: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
17881:
17882: IF xla_accounting_cache_pkg.GetValueChar
17883: (p_source_code => 'LEDGER_CATEGORY_CODE'
17884: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
17885: AND l_bflow_method_code = 'PRIOR_ENTRY'
17886: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
17887: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
17888: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
18020: p_lookup_type => 'XLA_OWNER_TYPE'
18021: ,p_lookup_code => l_component_type_code
18022: )
18023: ,p_token_4 => 'PRODUCT_NAME'
18024: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
18025: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
18026: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
18027: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
18028: ,p_ae_header_id => NULL
18021: ,p_lookup_code => l_component_type_code
18022: )
18023: ,p_token_4 => 'PRODUCT_NAME'
18024: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
18025: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
18026: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
18027: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
18028: ,p_ae_header_id => NULL
18029: );
18022: )
18023: ,p_token_4 => 'PRODUCT_NAME'
18024: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
18025: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
18026: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
18027: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
18028: ,p_ae_header_id => NULL
18029: );
18030:
18023: ,p_token_4 => 'PRODUCT_NAME'
18024: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
18025: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
18026: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
18027: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
18028: ,p_ae_header_id => NULL
18029: );
18030:
18031: IF (C_LEVEL_ERROR>= g_log_level) THEN
18054: ----------------------------------------------------------------------------------
18055: -- 4219869 Business Flow
18056: -- Update journal entry status -- Need to generate this within IF
18057: ----------------------------------------------------------------------------------
18058: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
18059: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
18060: ,p_balance_type_code => l_balance_type_code
18061: );
18062:
18181:
18182: --
18183: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
18184: --
18185: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
18186: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
18187: ELSE
18188: ---------------------------------------------------------------------------------------------------
18189: -- 4262811a Switch Sign
18206:
18207: XLA_AE_LINES_PKG.ValidateCurrentLine;
18208: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
18209:
18210: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
18211: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
18212: ,p_balance_type_code => l_balance_type_code);
18213:
18214: END IF;
18321: l_tmp_amt NUMBER;
18322: l_acc_rev_natural_side_code VARCHAR2(1);
18323:
18324: l_num_entries NUMBER;
18325: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
18326: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
18327: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
18328: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
18329: l_recog_line_1 NUMBER;
18322: l_acc_rev_natural_side_code VARCHAR2(1);
18323:
18324: l_num_entries NUMBER;
18325: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
18326: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
18327: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
18328: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
18329: l_recog_line_1 NUMBER;
18330: l_recog_line_2 NUMBER;
18323:
18324: l_num_entries NUMBER;
18325: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
18326: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
18327: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
18328: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
18329: l_recog_line_1 NUMBER;
18330: l_recog_line_2 NUMBER;
18331:
18324: l_num_entries NUMBER;
18325: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
18326: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
18327: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
18328: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
18329: l_recog_line_1 NUMBER;
18330: l_recog_line_2 NUMBER;
18331:
18332: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
18330: l_recog_line_2 NUMBER;
18331:
18332: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
18333: l_bflow_applied_to_amt NUMBER; -- 5132302
18334: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
18335:
18336: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
18337:
18338: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
18405: l_accrual_line_num := NULL; -- 4262811
18406: l_tmp_amt := NULL; -- 4262811
18407: --
18408:
18409: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
18410: l_balance_type_code <> 'B' THEN
18411: IF NVL(
18412: xla_ae_sources_pkg.GetSystemSourceChar(
18413: p_source_code => 'XLA_EVENT_TYPE_CODE'
18484: --
18485: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
18486:
18487: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
18488: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
18489:
18490: -- 4955764
18491: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
18492: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
18564: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
18565:
18566: IF xla_accounting_cache_pkg.GetValueChar
18567: (p_source_code => 'LEDGER_CATEGORY_CODE'
18568: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
18569: AND l_bflow_method_code = 'PRIOR_ENTRY'
18570: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
18571: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
18572: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
18641: p_lookup_type => 'XLA_OWNER_TYPE'
18642: ,p_lookup_code => l_component_type_code
18643: )
18644: ,p_token_4 => 'PRODUCT_NAME'
18645: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
18646: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
18647: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
18648: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
18649: ,p_ae_header_id => NULL
18642: ,p_lookup_code => l_component_type_code
18643: )
18644: ,p_token_4 => 'PRODUCT_NAME'
18645: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
18646: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
18647: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
18648: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
18649: ,p_ae_header_id => NULL
18650: );
18643: )
18644: ,p_token_4 => 'PRODUCT_NAME'
18645: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
18646: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
18647: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
18648: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
18649: ,p_ae_header_id => NULL
18650: );
18651:
18644: ,p_token_4 => 'PRODUCT_NAME'
18645: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
18646: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
18647: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
18648: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
18649: ,p_ae_header_id => NULL
18650: );
18651:
18652: IF (C_LEVEL_ERROR>= g_log_level) THEN
18675: ----------------------------------------------------------------------------------
18676: -- 4219869 Business Flow
18677: -- Update journal entry status -- Need to generate this within IF
18678: ----------------------------------------------------------------------------------
18679: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
18680: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
18681: ,p_balance_type_code => l_balance_type_code
18682: );
18683:
18736:
18737: --
18738: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
18739: --
18740: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
18741: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
18742: ELSE
18743: ---------------------------------------------------------------------------------------------------
18744: -- 4262811a Switch Sign
18761:
18762: XLA_AE_LINES_PKG.ValidateCurrentLine;
18763: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
18764:
18765: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
18766: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
18767: ,p_balance_type_code => l_balance_type_code);
18768:
18769: END IF;
18874: l_tmp_amt NUMBER;
18875: l_acc_rev_natural_side_code VARCHAR2(1);
18876:
18877: l_num_entries NUMBER;
18878: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
18879: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
18880: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
18881: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
18882: l_recog_line_1 NUMBER;
18875: l_acc_rev_natural_side_code VARCHAR2(1);
18876:
18877: l_num_entries NUMBER;
18878: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
18879: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
18880: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
18881: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
18882: l_recog_line_1 NUMBER;
18883: l_recog_line_2 NUMBER;
18876:
18877: l_num_entries NUMBER;
18878: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
18879: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
18880: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
18881: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
18882: l_recog_line_1 NUMBER;
18883: l_recog_line_2 NUMBER;
18884:
18877: l_num_entries NUMBER;
18878: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
18879: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
18880: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
18881: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
18882: l_recog_line_1 NUMBER;
18883: l_recog_line_2 NUMBER;
18884:
18885: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
18883: l_recog_line_2 NUMBER;
18884:
18885: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
18886: l_bflow_applied_to_amt NUMBER; -- 5132302
18887: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
18888:
18889: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
18890:
18891: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
18958: l_accrual_line_num := NULL; -- 4262811
18959: l_tmp_amt := NULL; -- 4262811
18960: --
18961:
18962: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
18963: l_balance_type_code <> 'B' THEN
18964: IF NVL(
18965: xla_ae_sources_pkg.GetSystemSourceChar(
18966: p_source_code => 'XLA_EVENT_TYPE_CODE'
19035: --
19036: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
19037:
19038: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
19039: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
19040:
19041: -- 4955764
19042: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
19043: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
19115: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
19116:
19117: IF xla_accounting_cache_pkg.GetValueChar
19118: (p_source_code => 'LEDGER_CATEGORY_CODE'
19119: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
19120: AND l_bflow_method_code = 'PRIOR_ENTRY'
19121: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
19122: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
19123: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
19192: p_lookup_type => 'XLA_OWNER_TYPE'
19193: ,p_lookup_code => l_component_type_code
19194: )
19195: ,p_token_4 => 'PRODUCT_NAME'
19196: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
19197: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
19198: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
19199: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
19200: ,p_ae_header_id => NULL
19193: ,p_lookup_code => l_component_type_code
19194: )
19195: ,p_token_4 => 'PRODUCT_NAME'
19196: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
19197: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
19198: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
19199: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
19200: ,p_ae_header_id => NULL
19201: );
19194: )
19195: ,p_token_4 => 'PRODUCT_NAME'
19196: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
19197: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
19198: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
19199: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
19200: ,p_ae_header_id => NULL
19201: );
19202:
19195: ,p_token_4 => 'PRODUCT_NAME'
19196: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
19197: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
19198: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
19199: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
19200: ,p_ae_header_id => NULL
19201: );
19202:
19203: IF (C_LEVEL_ERROR>= g_log_level) THEN
19226: ----------------------------------------------------------------------------------
19227: -- 4219869 Business Flow
19228: -- Update journal entry status -- Need to generate this within IF
19229: ----------------------------------------------------------------------------------
19230: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
19231: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
19232: ,p_balance_type_code => l_balance_type_code
19233: );
19234:
19287:
19288: --
19289: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
19290: --
19291: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
19292: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
19293: ELSE
19294: ---------------------------------------------------------------------------------------------------
19295: -- 4262811a Switch Sign
19312:
19313: XLA_AE_LINES_PKG.ValidateCurrentLine;
19314: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
19315:
19316: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
19317: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
19318: ,p_balance_type_code => l_balance_type_code);
19319:
19320: END IF;
19427: l_tmp_amt NUMBER;
19428: l_acc_rev_natural_side_code VARCHAR2(1);
19429:
19430: l_num_entries NUMBER;
19431: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
19432: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
19433: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
19434: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
19435: l_recog_line_1 NUMBER;
19428: l_acc_rev_natural_side_code VARCHAR2(1);
19429:
19430: l_num_entries NUMBER;
19431: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
19432: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
19433: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
19434: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
19435: l_recog_line_1 NUMBER;
19436: l_recog_line_2 NUMBER;
19429:
19430: l_num_entries NUMBER;
19431: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
19432: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
19433: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
19434: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
19435: l_recog_line_1 NUMBER;
19436: l_recog_line_2 NUMBER;
19437:
19430: l_num_entries NUMBER;
19431: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
19432: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
19433: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
19434: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
19435: l_recog_line_1 NUMBER;
19436: l_recog_line_2 NUMBER;
19437:
19438: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
19436: l_recog_line_2 NUMBER;
19437:
19438: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
19439: l_bflow_applied_to_amt NUMBER; -- 5132302
19440: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
19441:
19442: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
19443:
19444: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
19511: l_accrual_line_num := NULL; -- 4262811
19512: l_tmp_amt := NULL; -- 4262811
19513: --
19514:
19515: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
19516: l_balance_type_code <> 'B' THEN
19517: IF NVL(
19518: xla_ae_sources_pkg.GetSystemSourceChar(
19519: p_source_code => 'XLA_EVENT_TYPE_CODE'
19590: --
19591: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
19592:
19593: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
19594: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
19595:
19596: -- 4955764
19597: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
19598: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
19670: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
19671:
19672: IF xla_accounting_cache_pkg.GetValueChar
19673: (p_source_code => 'LEDGER_CATEGORY_CODE'
19674: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
19675: AND l_bflow_method_code = 'PRIOR_ENTRY'
19676: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
19677: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
19678: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
19747: p_lookup_type => 'XLA_OWNER_TYPE'
19748: ,p_lookup_code => l_component_type_code
19749: )
19750: ,p_token_4 => 'PRODUCT_NAME'
19751: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
19752: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
19753: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
19754: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
19755: ,p_ae_header_id => NULL
19748: ,p_lookup_code => l_component_type_code
19749: )
19750: ,p_token_4 => 'PRODUCT_NAME'
19751: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
19752: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
19753: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
19754: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
19755: ,p_ae_header_id => NULL
19756: );
19749: )
19750: ,p_token_4 => 'PRODUCT_NAME'
19751: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
19752: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
19753: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
19754: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
19755: ,p_ae_header_id => NULL
19756: );
19757:
19750: ,p_token_4 => 'PRODUCT_NAME'
19751: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
19752: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
19753: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
19754: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
19755: ,p_ae_header_id => NULL
19756: );
19757:
19758: IF (C_LEVEL_ERROR>= g_log_level) THEN
19781: ----------------------------------------------------------------------------------
19782: -- 4219869 Business Flow
19783: -- Update journal entry status -- Need to generate this within IF
19784: ----------------------------------------------------------------------------------
19785: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
19786: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
19787: ,p_balance_type_code => l_balance_type_code
19788: );
19789:
19842:
19843: --
19844: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
19845: --
19846: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
19847: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
19848: ELSE
19849: ---------------------------------------------------------------------------------------------------
19850: -- 4262811a Switch Sign
19867:
19868: XLA_AE_LINES_PKG.ValidateCurrentLine;
19869: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
19870:
19871: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
19872: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
19873: ,p_balance_type_code => l_balance_type_code);
19874:
19875: END IF;
19980: l_tmp_amt NUMBER;
19981: l_acc_rev_natural_side_code VARCHAR2(1);
19982:
19983: l_num_entries NUMBER;
19984: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
19985: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
19986: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
19987: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
19988: l_recog_line_1 NUMBER;
19981: l_acc_rev_natural_side_code VARCHAR2(1);
19982:
19983: l_num_entries NUMBER;
19984: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
19985: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
19986: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
19987: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
19988: l_recog_line_1 NUMBER;
19989: l_recog_line_2 NUMBER;
19982:
19983: l_num_entries NUMBER;
19984: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
19985: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
19986: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
19987: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
19988: l_recog_line_1 NUMBER;
19989: l_recog_line_2 NUMBER;
19990:
19983: l_num_entries NUMBER;
19984: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
19985: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
19986: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
19987: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
19988: l_recog_line_1 NUMBER;
19989: l_recog_line_2 NUMBER;
19990:
19991: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
19989: l_recog_line_2 NUMBER;
19990:
19991: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
19992: l_bflow_applied_to_amt NUMBER; -- 5132302
19993: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
19994:
19995: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
19996:
19997: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
20064: l_accrual_line_num := NULL; -- 4262811
20065: l_tmp_amt := NULL; -- 4262811
20066: --
20067:
20068: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
20069: l_balance_type_code <> 'B' THEN
20070: IF NVL(
20071: xla_ae_sources_pkg.GetSystemSourceChar(
20072: p_source_code => 'XLA_EVENT_TYPE_CODE'
20141: --
20142: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
20143:
20144: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
20145: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
20146:
20147: -- 4955764
20148: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
20149: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
20221: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
20222:
20223: IF xla_accounting_cache_pkg.GetValueChar
20224: (p_source_code => 'LEDGER_CATEGORY_CODE'
20225: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
20226: AND l_bflow_method_code = 'PRIOR_ENTRY'
20227: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
20228: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
20229: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
20298: p_lookup_type => 'XLA_OWNER_TYPE'
20299: ,p_lookup_code => l_component_type_code
20300: )
20301: ,p_token_4 => 'PRODUCT_NAME'
20302: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
20303: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
20304: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
20305: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
20306: ,p_ae_header_id => NULL
20299: ,p_lookup_code => l_component_type_code
20300: )
20301: ,p_token_4 => 'PRODUCT_NAME'
20302: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
20303: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
20304: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
20305: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
20306: ,p_ae_header_id => NULL
20307: );
20300: )
20301: ,p_token_4 => 'PRODUCT_NAME'
20302: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
20303: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
20304: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
20305: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
20306: ,p_ae_header_id => NULL
20307: );
20308:
20301: ,p_token_4 => 'PRODUCT_NAME'
20302: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
20303: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
20304: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
20305: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
20306: ,p_ae_header_id => NULL
20307: );
20308:
20309: IF (C_LEVEL_ERROR>= g_log_level) THEN
20332: ----------------------------------------------------------------------------------
20333: -- 4219869 Business Flow
20334: -- Update journal entry status -- Need to generate this within IF
20335: ----------------------------------------------------------------------------------
20336: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
20337: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
20338: ,p_balance_type_code => l_balance_type_code
20339: );
20340:
20393:
20394: --
20395: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
20396: --
20397: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
20398: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
20399: ELSE
20400: ---------------------------------------------------------------------------------------------------
20401: -- 4262811a Switch Sign
20418:
20419: XLA_AE_LINES_PKG.ValidateCurrentLine;
20420: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
20421:
20422: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
20423: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
20424: ,p_balance_type_code => l_balance_type_code);
20425:
20426: END IF;
20553: l_tmp_amt NUMBER;
20554: l_acc_rev_natural_side_code VARCHAR2(1);
20555:
20556: l_num_entries NUMBER;
20557: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
20558: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
20559: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
20560: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
20561: l_recog_line_1 NUMBER;
20554: l_acc_rev_natural_side_code VARCHAR2(1);
20555:
20556: l_num_entries NUMBER;
20557: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
20558: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
20559: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
20560: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
20561: l_recog_line_1 NUMBER;
20562: l_recog_line_2 NUMBER;
20555:
20556: l_num_entries NUMBER;
20557: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
20558: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
20559: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
20560: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
20561: l_recog_line_1 NUMBER;
20562: l_recog_line_2 NUMBER;
20563:
20556: l_num_entries NUMBER;
20557: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
20558: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
20559: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
20560: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
20561: l_recog_line_1 NUMBER;
20562: l_recog_line_2 NUMBER;
20563:
20564: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
20562: l_recog_line_2 NUMBER;
20563:
20564: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
20565: l_bflow_applied_to_amt NUMBER; -- 5132302
20566: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
20567:
20568: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
20569:
20570: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
20637: l_accrual_line_num := NULL; -- 4262811
20638: l_tmp_amt := NULL; -- 4262811
20639: --
20640:
20641: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
20642: l_balance_type_code <> 'B' THEN
20643: IF (p_source_26 <= p_source_34 OR
20644: NVL(p_source_5,'
20645: ') = 'Y') AND
20720: --
20721: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
20722:
20723: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
20724: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
20725:
20726: -- 4955764
20727: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
20728: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
20796: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
20797:
20798: IF xla_accounting_cache_pkg.GetValueChar
20799: (p_source_code => 'LEDGER_CATEGORY_CODE'
20800: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
20801: AND l_bflow_method_code = 'PRIOR_ENTRY'
20802: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
20803: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
20804: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
20938: p_lookup_type => 'XLA_OWNER_TYPE'
20939: ,p_lookup_code => l_component_type_code
20940: )
20941: ,p_token_4 => 'PRODUCT_NAME'
20942: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
20943: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
20944: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
20945: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
20946: ,p_ae_header_id => NULL
20939: ,p_lookup_code => l_component_type_code
20940: )
20941: ,p_token_4 => 'PRODUCT_NAME'
20942: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
20943: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
20944: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
20945: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
20946: ,p_ae_header_id => NULL
20947: );
20940: )
20941: ,p_token_4 => 'PRODUCT_NAME'
20942: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
20943: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
20944: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
20945: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
20946: ,p_ae_header_id => NULL
20947: );
20948:
20941: ,p_token_4 => 'PRODUCT_NAME'
20942: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
20943: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
20944: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
20945: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
20946: ,p_ae_header_id => NULL
20947: );
20948:
20949: IF (C_LEVEL_ERROR>= g_log_level) THEN
20972: ----------------------------------------------------------------------------------
20973: -- 4219869 Business Flow
20974: -- Update journal entry status -- Need to generate this within IF
20975: ----------------------------------------------------------------------------------
20976: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
20977: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
20978: ,p_balance_type_code => l_balance_type_code
20979: );
20980:
21101:
21102: --
21103: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
21104: --
21105: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
21106: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
21107: ELSE
21108: ---------------------------------------------------------------------------------------------------
21109: -- 4262811a Switch Sign
21126:
21127: XLA_AE_LINES_PKG.ValidateCurrentLine;
21128: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
21129:
21130: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
21131: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
21132: ,p_balance_type_code => l_balance_type_code);
21133:
21134: END IF;
21261: l_tmp_amt NUMBER;
21262: l_acc_rev_natural_side_code VARCHAR2(1);
21263:
21264: l_num_entries NUMBER;
21265: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
21266: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
21267: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
21268: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
21269: l_recog_line_1 NUMBER;
21262: l_acc_rev_natural_side_code VARCHAR2(1);
21263:
21264: l_num_entries NUMBER;
21265: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
21266: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
21267: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
21268: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
21269: l_recog_line_1 NUMBER;
21270: l_recog_line_2 NUMBER;
21263:
21264: l_num_entries NUMBER;
21265: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
21266: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
21267: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
21268: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
21269: l_recog_line_1 NUMBER;
21270: l_recog_line_2 NUMBER;
21271:
21264: l_num_entries NUMBER;
21265: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
21266: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
21267: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
21268: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
21269: l_recog_line_1 NUMBER;
21270: l_recog_line_2 NUMBER;
21271:
21272: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
21270: l_recog_line_2 NUMBER;
21271:
21272: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
21273: l_bflow_applied_to_amt NUMBER; -- 5132302
21274: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
21275:
21276: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
21277:
21278: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
21345: l_accrual_line_num := NULL; -- 4262811
21346: l_tmp_amt := NULL; -- 4262811
21347: --
21348:
21349: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
21350: l_balance_type_code <> 'B' THEN
21351: IF (p_source_26 <= p_source_34 OR
21352: NVL(p_source_5,'
21353: ') = 'Y') AND
21428: --
21429: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
21430:
21431: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
21432: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
21433:
21434: -- 4955764
21435: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
21436: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
21504: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
21505:
21506: IF xla_accounting_cache_pkg.GetValueChar
21507: (p_source_code => 'LEDGER_CATEGORY_CODE'
21508: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
21509: AND l_bflow_method_code = 'PRIOR_ENTRY'
21510: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
21511: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
21512: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
21646: p_lookup_type => 'XLA_OWNER_TYPE'
21647: ,p_lookup_code => l_component_type_code
21648: )
21649: ,p_token_4 => 'PRODUCT_NAME'
21650: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
21651: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
21652: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
21653: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
21654: ,p_ae_header_id => NULL
21647: ,p_lookup_code => l_component_type_code
21648: )
21649: ,p_token_4 => 'PRODUCT_NAME'
21650: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
21651: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
21652: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
21653: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
21654: ,p_ae_header_id => NULL
21655: );
21648: )
21649: ,p_token_4 => 'PRODUCT_NAME'
21650: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
21651: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
21652: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
21653: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
21654: ,p_ae_header_id => NULL
21655: );
21656:
21649: ,p_token_4 => 'PRODUCT_NAME'
21650: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
21651: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
21652: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
21653: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
21654: ,p_ae_header_id => NULL
21655: );
21656:
21657: IF (C_LEVEL_ERROR>= g_log_level) THEN
21680: ----------------------------------------------------------------------------------
21681: -- 4219869 Business Flow
21682: -- Update journal entry status -- Need to generate this within IF
21683: ----------------------------------------------------------------------------------
21684: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
21685: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
21686: ,p_balance_type_code => l_balance_type_code
21687: );
21688:
21809:
21810: --
21811: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
21812: --
21813: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
21814: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
21815: ELSE
21816: ---------------------------------------------------------------------------------------------------
21817: -- 4262811a Switch Sign
21834:
21835: XLA_AE_LINES_PKG.ValidateCurrentLine;
21836: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
21837:
21838: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
21839: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
21840: ,p_balance_type_code => l_balance_type_code);
21841:
21842: END IF;
21967: l_tmp_amt NUMBER;
21968: l_acc_rev_natural_side_code VARCHAR2(1);
21969:
21970: l_num_entries NUMBER;
21971: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
21972: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
21973: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
21974: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
21975: l_recog_line_1 NUMBER;
21968: l_acc_rev_natural_side_code VARCHAR2(1);
21969:
21970: l_num_entries NUMBER;
21971: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
21972: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
21973: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
21974: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
21975: l_recog_line_1 NUMBER;
21976: l_recog_line_2 NUMBER;
21969:
21970: l_num_entries NUMBER;
21971: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
21972: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
21973: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
21974: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
21975: l_recog_line_1 NUMBER;
21976: l_recog_line_2 NUMBER;
21977:
21970: l_num_entries NUMBER;
21971: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
21972: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
21973: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
21974: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
21975: l_recog_line_1 NUMBER;
21976: l_recog_line_2 NUMBER;
21977:
21978: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
21976: l_recog_line_2 NUMBER;
21977:
21978: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
21979: l_bflow_applied_to_amt NUMBER; -- 5132302
21980: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
21981:
21982: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
21983:
21984: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
22051: l_accrual_line_num := NULL; -- 4262811
22052: l_tmp_amt := NULL; -- 4262811
22053: --
22054:
22055: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
22056: l_balance_type_code <> 'B' THEN
22057: IF NVL(
22058: xla_ae_sources_pkg.GetSystemSourceChar(
22059: p_source_code => 'XLA_EVENT_TYPE_CODE'
22131: --
22132: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
22133:
22134: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
22135: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
22136:
22137: -- 4955764
22138: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
22139: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
22207: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
22208:
22209: IF xla_accounting_cache_pkg.GetValueChar
22210: (p_source_code => 'LEDGER_CATEGORY_CODE'
22211: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
22212: AND l_bflow_method_code = 'PRIOR_ENTRY'
22213: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
22214: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
22215: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
22349: p_lookup_type => 'XLA_OWNER_TYPE'
22350: ,p_lookup_code => l_component_type_code
22351: )
22352: ,p_token_4 => 'PRODUCT_NAME'
22353: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
22354: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
22355: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
22356: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
22357: ,p_ae_header_id => NULL
22350: ,p_lookup_code => l_component_type_code
22351: )
22352: ,p_token_4 => 'PRODUCT_NAME'
22353: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
22354: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
22355: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
22356: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
22357: ,p_ae_header_id => NULL
22358: );
22351: )
22352: ,p_token_4 => 'PRODUCT_NAME'
22353: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
22354: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
22355: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
22356: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
22357: ,p_ae_header_id => NULL
22358: );
22359:
22352: ,p_token_4 => 'PRODUCT_NAME'
22353: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
22354: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
22355: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
22356: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
22357: ,p_ae_header_id => NULL
22358: );
22359:
22360: IF (C_LEVEL_ERROR>= g_log_level) THEN
22383: ----------------------------------------------------------------------------------
22384: -- 4219869 Business Flow
22385: -- Update journal entry status -- Need to generate this within IF
22386: ----------------------------------------------------------------------------------
22387: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
22388: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
22389: ,p_balance_type_code => l_balance_type_code
22390: );
22391:
22512:
22513: --
22514: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
22515: --
22516: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
22517: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
22518: ELSE
22519: ---------------------------------------------------------------------------------------------------
22520: -- 4262811a Switch Sign
22537:
22538: XLA_AE_LINES_PKG.ValidateCurrentLine;
22539: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
22540:
22541: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
22542: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
22543: ,p_balance_type_code => l_balance_type_code);
22544:
22545: END IF;
22670: l_tmp_amt NUMBER;
22671: l_acc_rev_natural_side_code VARCHAR2(1);
22672:
22673: l_num_entries NUMBER;
22674: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
22675: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
22676: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
22677: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
22678: l_recog_line_1 NUMBER;
22671: l_acc_rev_natural_side_code VARCHAR2(1);
22672:
22673: l_num_entries NUMBER;
22674: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
22675: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
22676: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
22677: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
22678: l_recog_line_1 NUMBER;
22679: l_recog_line_2 NUMBER;
22672:
22673: l_num_entries NUMBER;
22674: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
22675: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
22676: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
22677: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
22678: l_recog_line_1 NUMBER;
22679: l_recog_line_2 NUMBER;
22680:
22673: l_num_entries NUMBER;
22674: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
22675: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
22676: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
22677: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
22678: l_recog_line_1 NUMBER;
22679: l_recog_line_2 NUMBER;
22680:
22681: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
22679: l_recog_line_2 NUMBER;
22680:
22681: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
22682: l_bflow_applied_to_amt NUMBER; -- 5132302
22683: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
22684:
22685: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
22686:
22687: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
22754: l_accrual_line_num := NULL; -- 4262811
22755: l_tmp_amt := NULL; -- 4262811
22756: --
22757:
22758: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
22759: l_balance_type_code <> 'B' THEN
22760: IF p_source_26 > p_source_34 AND
22761: NVL(p_source_5,'
22762: ') = 'N' AND
22836: --
22837: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
22838:
22839: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
22840: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
22841:
22842: -- 4955764
22843: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
22844: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
22912: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
22913:
22914: IF xla_accounting_cache_pkg.GetValueChar
22915: (p_source_code => 'LEDGER_CATEGORY_CODE'
22916: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
22917: AND l_bflow_method_code = 'PRIOR_ENTRY'
22918: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
22919: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
22920: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
23054: p_lookup_type => 'XLA_OWNER_TYPE'
23055: ,p_lookup_code => l_component_type_code
23056: )
23057: ,p_token_4 => 'PRODUCT_NAME'
23058: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
23059: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
23060: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
23061: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
23062: ,p_ae_header_id => NULL
23055: ,p_lookup_code => l_component_type_code
23056: )
23057: ,p_token_4 => 'PRODUCT_NAME'
23058: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
23059: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
23060: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
23061: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
23062: ,p_ae_header_id => NULL
23063: );
23056: )
23057: ,p_token_4 => 'PRODUCT_NAME'
23058: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
23059: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
23060: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
23061: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
23062: ,p_ae_header_id => NULL
23063: );
23064:
23057: ,p_token_4 => 'PRODUCT_NAME'
23058: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
23059: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
23060: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
23061: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
23062: ,p_ae_header_id => NULL
23063: );
23064:
23065: IF (C_LEVEL_ERROR>= g_log_level) THEN
23088: ----------------------------------------------------------------------------------
23089: -- 4219869 Business Flow
23090: -- Update journal entry status -- Need to generate this within IF
23091: ----------------------------------------------------------------------------------
23092: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
23093: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
23094: ,p_balance_type_code => l_balance_type_code
23095: );
23096:
23217:
23218: --
23219: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
23220: --
23221: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
23222: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
23223: ELSE
23224: ---------------------------------------------------------------------------------------------------
23225: -- 4262811a Switch Sign
23242:
23243: XLA_AE_LINES_PKG.ValidateCurrentLine;
23244: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
23245:
23246: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
23247: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
23248: ,p_balance_type_code => l_balance_type_code);
23249:
23250: END IF;
23373: l_tmp_amt NUMBER;
23374: l_acc_rev_natural_side_code VARCHAR2(1);
23375:
23376: l_num_entries NUMBER;
23377: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
23378: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
23379: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
23380: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
23381: l_recog_line_1 NUMBER;
23374: l_acc_rev_natural_side_code VARCHAR2(1);
23375:
23376: l_num_entries NUMBER;
23377: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
23378: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
23379: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
23380: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
23381: l_recog_line_1 NUMBER;
23382: l_recog_line_2 NUMBER;
23375:
23376: l_num_entries NUMBER;
23377: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
23378: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
23379: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
23380: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
23381: l_recog_line_1 NUMBER;
23382: l_recog_line_2 NUMBER;
23383:
23376: l_num_entries NUMBER;
23377: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
23378: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
23379: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
23380: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
23381: l_recog_line_1 NUMBER;
23382: l_recog_line_2 NUMBER;
23383:
23384: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
23382: l_recog_line_2 NUMBER;
23383:
23384: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
23385: l_bflow_applied_to_amt NUMBER; -- 5132302
23386: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
23387:
23388: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
23389:
23390: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
23457: l_accrual_line_num := NULL; -- 4262811
23458: l_tmp_amt := NULL; -- 4262811
23459: --
23460:
23461: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
23462: l_balance_type_code <> 'B' THEN
23463: IF NVL(
23464: xla_ae_sources_pkg.GetSystemSourceChar(
23465: p_source_code => 'XLA_EVENT_TYPE_CODE'
23537: --
23538: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
23539:
23540: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
23541: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
23542:
23543: -- 4955764
23544: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
23545: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
23613: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
23614:
23615: IF xla_accounting_cache_pkg.GetValueChar
23616: (p_source_code => 'LEDGER_CATEGORY_CODE'
23617: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
23618: AND l_bflow_method_code = 'PRIOR_ENTRY'
23619: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
23620: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
23621: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
23755: p_lookup_type => 'XLA_OWNER_TYPE'
23756: ,p_lookup_code => l_component_type_code
23757: )
23758: ,p_token_4 => 'PRODUCT_NAME'
23759: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
23760: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
23761: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
23762: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
23763: ,p_ae_header_id => NULL
23756: ,p_lookup_code => l_component_type_code
23757: )
23758: ,p_token_4 => 'PRODUCT_NAME'
23759: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
23760: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
23761: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
23762: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
23763: ,p_ae_header_id => NULL
23764: );
23757: )
23758: ,p_token_4 => 'PRODUCT_NAME'
23759: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
23760: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
23761: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
23762: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
23763: ,p_ae_header_id => NULL
23764: );
23765:
23758: ,p_token_4 => 'PRODUCT_NAME'
23759: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
23760: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
23761: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
23762: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
23763: ,p_ae_header_id => NULL
23764: );
23765:
23766: IF (C_LEVEL_ERROR>= g_log_level) THEN
23789: ----------------------------------------------------------------------------------
23790: -- 4219869 Business Flow
23791: -- Update journal entry status -- Need to generate this within IF
23792: ----------------------------------------------------------------------------------
23793: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
23794: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
23795: ,p_balance_type_code => l_balance_type_code
23796: );
23797:
23918:
23919: --
23920: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
23921: --
23922: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
23923: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
23924: ELSE
23925: ---------------------------------------------------------------------------------------------------
23926: -- 4262811a Switch Sign
23943:
23944: XLA_AE_LINES_PKG.ValidateCurrentLine;
23945: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
23946:
23947: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
23948: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
23949: ,p_balance_type_code => l_balance_type_code);
23950:
23951: END IF;
24068: l_tmp_amt NUMBER;
24069: l_acc_rev_natural_side_code VARCHAR2(1);
24070:
24071: l_num_entries NUMBER;
24072: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
24073: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
24074: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
24075: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
24076: l_recog_line_1 NUMBER;
24069: l_acc_rev_natural_side_code VARCHAR2(1);
24070:
24071: l_num_entries NUMBER;
24072: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
24073: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
24074: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
24075: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
24076: l_recog_line_1 NUMBER;
24077: l_recog_line_2 NUMBER;
24070:
24071: l_num_entries NUMBER;
24072: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
24073: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
24074: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
24075: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
24076: l_recog_line_1 NUMBER;
24077: l_recog_line_2 NUMBER;
24078:
24071: l_num_entries NUMBER;
24072: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
24073: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
24074: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
24075: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
24076: l_recog_line_1 NUMBER;
24077: l_recog_line_2 NUMBER;
24078:
24079: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
24077: l_recog_line_2 NUMBER;
24078:
24079: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
24080: l_bflow_applied_to_amt NUMBER; -- 5132302
24081: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
24082:
24083: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
24084:
24085: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
24152: l_accrual_line_num := NULL; -- 4262811
24153: l_tmp_amt := NULL; -- 4262811
24154: --
24155:
24156: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
24157: l_balance_type_code <> 'B' THEN
24158: IF p_source_28 > 0 AND
24159: NVL(
24160: xla_ae_sources_pkg.GetSystemSourceChar(
24232: --
24233: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
24234:
24235: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
24236: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
24237:
24238: -- 4955764
24239: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
24240: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
24308: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
24309:
24310: IF xla_accounting_cache_pkg.GetValueChar
24311: (p_source_code => 'LEDGER_CATEGORY_CODE'
24312: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
24313: AND l_bflow_method_code = 'PRIOR_ENTRY'
24314: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
24315: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
24316: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
24448: p_lookup_type => 'XLA_OWNER_TYPE'
24449: ,p_lookup_code => l_component_type_code
24450: )
24451: ,p_token_4 => 'PRODUCT_NAME'
24452: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
24453: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
24454: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
24455: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
24456: ,p_ae_header_id => NULL
24449: ,p_lookup_code => l_component_type_code
24450: )
24451: ,p_token_4 => 'PRODUCT_NAME'
24452: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
24453: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
24454: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
24455: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
24456: ,p_ae_header_id => NULL
24457: );
24450: )
24451: ,p_token_4 => 'PRODUCT_NAME'
24452: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
24453: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
24454: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
24455: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
24456: ,p_ae_header_id => NULL
24457: );
24458:
24451: ,p_token_4 => 'PRODUCT_NAME'
24452: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
24453: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
24454: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
24455: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
24456: ,p_ae_header_id => NULL
24457: );
24458:
24459: IF (C_LEVEL_ERROR>= g_log_level) THEN
24482: ----------------------------------------------------------------------------------
24483: -- 4219869 Business Flow
24484: -- Update journal entry status -- Need to generate this within IF
24485: ----------------------------------------------------------------------------------
24486: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
24487: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
24488: ,p_balance_type_code => l_balance_type_code
24489: );
24490:
24609:
24610: --
24611: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
24612: --
24613: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
24614: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
24615: ELSE
24616: ---------------------------------------------------------------------------------------------------
24617: -- 4262811a Switch Sign
24634:
24635: XLA_AE_LINES_PKG.ValidateCurrentLine;
24636: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
24637:
24638: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
24639: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
24640: ,p_balance_type_code => l_balance_type_code);
24641:
24642: END IF;
24757: l_tmp_amt NUMBER;
24758: l_acc_rev_natural_side_code VARCHAR2(1);
24759:
24760: l_num_entries NUMBER;
24761: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
24762: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
24763: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
24764: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
24765: l_recog_line_1 NUMBER;
24758: l_acc_rev_natural_side_code VARCHAR2(1);
24759:
24760: l_num_entries NUMBER;
24761: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
24762: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
24763: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
24764: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
24765: l_recog_line_1 NUMBER;
24766: l_recog_line_2 NUMBER;
24759:
24760: l_num_entries NUMBER;
24761: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
24762: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
24763: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
24764: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
24765: l_recog_line_1 NUMBER;
24766: l_recog_line_2 NUMBER;
24767:
24760: l_num_entries NUMBER;
24761: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
24762: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
24763: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
24764: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
24765: l_recog_line_1 NUMBER;
24766: l_recog_line_2 NUMBER;
24767:
24768: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
24766: l_recog_line_2 NUMBER;
24767:
24768: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
24769: l_bflow_applied_to_amt NUMBER; -- 5132302
24770: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
24771:
24772: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
24773:
24774: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
24841: l_accrual_line_num := NULL; -- 4262811
24842: l_tmp_amt := NULL; -- 4262811
24843: --
24844:
24845: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
24846: l_balance_type_code <> 'B' THEN
24847: IF p_source_28 > 0 AND
24848: NVL(
24849: xla_ae_sources_pkg.GetSystemSourceChar(
24919: --
24920: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
24921:
24922: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
24923: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
24924:
24925: -- 4955764
24926: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
24927: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
24995: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
24996:
24997: IF xla_accounting_cache_pkg.GetValueChar
24998: (p_source_code => 'LEDGER_CATEGORY_CODE'
24999: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
25000: AND l_bflow_method_code = 'PRIOR_ENTRY'
25001: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
25002: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
25003: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
25135: p_lookup_type => 'XLA_OWNER_TYPE'
25136: ,p_lookup_code => l_component_type_code
25137: )
25138: ,p_token_4 => 'PRODUCT_NAME'
25139: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
25140: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
25141: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
25142: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
25143: ,p_ae_header_id => NULL
25136: ,p_lookup_code => l_component_type_code
25137: )
25138: ,p_token_4 => 'PRODUCT_NAME'
25139: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
25140: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
25141: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
25142: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
25143: ,p_ae_header_id => NULL
25144: );
25137: )
25138: ,p_token_4 => 'PRODUCT_NAME'
25139: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
25140: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
25141: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
25142: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
25143: ,p_ae_header_id => NULL
25144: );
25145:
25138: ,p_token_4 => 'PRODUCT_NAME'
25139: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
25140: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
25141: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
25142: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
25143: ,p_ae_header_id => NULL
25144: );
25145:
25146: IF (C_LEVEL_ERROR>= g_log_level) THEN
25169: ----------------------------------------------------------------------------------
25170: -- 4219869 Business Flow
25171: -- Update journal entry status -- Need to generate this within IF
25172: ----------------------------------------------------------------------------------
25173: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
25174: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
25175: ,p_balance_type_code => l_balance_type_code
25176: );
25177:
25296:
25297: --
25298: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
25299: --
25300: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
25301: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
25302: ELSE
25303: ---------------------------------------------------------------------------------------------------
25304: -- 4262811a Switch Sign
25321:
25322: XLA_AE_LINES_PKG.ValidateCurrentLine;
25323: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
25324:
25325: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
25326: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
25327: ,p_balance_type_code => l_balance_type_code);
25328:
25329: END IF;
25448: l_tmp_amt NUMBER;
25449: l_acc_rev_natural_side_code VARCHAR2(1);
25450:
25451: l_num_entries NUMBER;
25452: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
25453: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
25454: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
25455: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
25456: l_recog_line_1 NUMBER;
25449: l_acc_rev_natural_side_code VARCHAR2(1);
25450:
25451: l_num_entries NUMBER;
25452: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
25453: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
25454: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
25455: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
25456: l_recog_line_1 NUMBER;
25457: l_recog_line_2 NUMBER;
25450:
25451: l_num_entries NUMBER;
25452: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
25453: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
25454: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
25455: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
25456: l_recog_line_1 NUMBER;
25457: l_recog_line_2 NUMBER;
25458:
25451: l_num_entries NUMBER;
25452: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
25453: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
25454: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
25455: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
25456: l_recog_line_1 NUMBER;
25457: l_recog_line_2 NUMBER;
25458:
25459: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
25457: l_recog_line_2 NUMBER;
25458:
25459: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
25460: l_bflow_applied_to_amt NUMBER; -- 5132302
25461: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
25462:
25463: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
25464:
25465: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
25532: l_accrual_line_num := NULL; -- 4262811
25533: l_tmp_amt := NULL; -- 4262811
25534: --
25535:
25536: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
25537: l_balance_type_code <> 'B' THEN
25538: IF p_source_29 > 0 AND
25539: NVL(
25540: xla_ae_sources_pkg.GetSystemSourceChar(
25612: --
25613: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
25614:
25615: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
25616: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
25617:
25618: -- 4955764
25619: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
25620: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
25688: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
25689:
25690: IF xla_accounting_cache_pkg.GetValueChar
25691: (p_source_code => 'LEDGER_CATEGORY_CODE'
25692: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
25693: AND l_bflow_method_code = 'PRIOR_ENTRY'
25694: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
25695: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
25696: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
25828: p_lookup_type => 'XLA_OWNER_TYPE'
25829: ,p_lookup_code => l_component_type_code
25830: )
25831: ,p_token_4 => 'PRODUCT_NAME'
25832: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
25833: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
25834: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
25835: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
25836: ,p_ae_header_id => NULL
25829: ,p_lookup_code => l_component_type_code
25830: )
25831: ,p_token_4 => 'PRODUCT_NAME'
25832: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
25833: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
25834: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
25835: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
25836: ,p_ae_header_id => NULL
25837: );
25830: )
25831: ,p_token_4 => 'PRODUCT_NAME'
25832: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
25833: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
25834: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
25835: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
25836: ,p_ae_header_id => NULL
25837: );
25838:
25831: ,p_token_4 => 'PRODUCT_NAME'
25832: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
25833: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
25834: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
25835: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
25836: ,p_ae_header_id => NULL
25837: );
25838:
25839: IF (C_LEVEL_ERROR>= g_log_level) THEN
25862: ----------------------------------------------------------------------------------
25863: -- 4219869 Business Flow
25864: -- Update journal entry status -- Need to generate this within IF
25865: ----------------------------------------------------------------------------------
25866: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
25867: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
25868: ,p_balance_type_code => l_balance_type_code
25869: );
25870:
25989:
25990: --
25991: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
25992: --
25993: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
25994: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
25995: ELSE
25996: ---------------------------------------------------------------------------------------------------
25997: -- 4262811a Switch Sign
26014:
26015: XLA_AE_LINES_PKG.ValidateCurrentLine;
26016: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
26017:
26018: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
26019: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
26020: ,p_balance_type_code => l_balance_type_code);
26021:
26022: END IF;
26137: l_tmp_amt NUMBER;
26138: l_acc_rev_natural_side_code VARCHAR2(1);
26139:
26140: l_num_entries NUMBER;
26141: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
26142: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
26143: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
26144: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
26145: l_recog_line_1 NUMBER;
26138: l_acc_rev_natural_side_code VARCHAR2(1);
26139:
26140: l_num_entries NUMBER;
26141: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
26142: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
26143: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
26144: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
26145: l_recog_line_1 NUMBER;
26146: l_recog_line_2 NUMBER;
26139:
26140: l_num_entries NUMBER;
26141: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
26142: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
26143: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
26144: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
26145: l_recog_line_1 NUMBER;
26146: l_recog_line_2 NUMBER;
26147:
26140: l_num_entries NUMBER;
26141: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
26142: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
26143: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
26144: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
26145: l_recog_line_1 NUMBER;
26146: l_recog_line_2 NUMBER;
26147:
26148: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
26146: l_recog_line_2 NUMBER;
26147:
26148: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
26149: l_bflow_applied_to_amt NUMBER; -- 5132302
26150: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
26151:
26152: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
26153:
26154: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
26221: l_accrual_line_num := NULL; -- 4262811
26222: l_tmp_amt := NULL; -- 4262811
26223: --
26224:
26225: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
26226: l_balance_type_code <> 'B' THEN
26227: IF NVL(
26228: xla_ae_sources_pkg.GetSystemSourceChar(
26229: p_source_code => 'XLA_EVENT_TYPE_CODE'
26299: --
26300: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
26301:
26302: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
26303: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
26304:
26305: -- 4955764
26306: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
26307: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
26375: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
26376:
26377: IF xla_accounting_cache_pkg.GetValueChar
26378: (p_source_code => 'LEDGER_CATEGORY_CODE'
26379: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
26380: AND l_bflow_method_code = 'PRIOR_ENTRY'
26381: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
26382: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
26383: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
26515: p_lookup_type => 'XLA_OWNER_TYPE'
26516: ,p_lookup_code => l_component_type_code
26517: )
26518: ,p_token_4 => 'PRODUCT_NAME'
26519: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
26520: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
26521: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
26522: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
26523: ,p_ae_header_id => NULL
26516: ,p_lookup_code => l_component_type_code
26517: )
26518: ,p_token_4 => 'PRODUCT_NAME'
26519: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
26520: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
26521: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
26522: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
26523: ,p_ae_header_id => NULL
26524: );
26517: )
26518: ,p_token_4 => 'PRODUCT_NAME'
26519: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
26520: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
26521: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
26522: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
26523: ,p_ae_header_id => NULL
26524: );
26525:
26518: ,p_token_4 => 'PRODUCT_NAME'
26519: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
26520: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
26521: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
26522: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
26523: ,p_ae_header_id => NULL
26524: );
26525:
26526: IF (C_LEVEL_ERROR>= g_log_level) THEN
26549: ----------------------------------------------------------------------------------
26550: -- 4219869 Business Flow
26551: -- Update journal entry status -- Need to generate this within IF
26552: ----------------------------------------------------------------------------------
26553: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
26554: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
26555: ,p_balance_type_code => l_balance_type_code
26556: );
26557:
26676:
26677: --
26678: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
26679: --
26680: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
26681: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
26682: ELSE
26683: ---------------------------------------------------------------------------------------------------
26684: -- 4262811a Switch Sign
26701:
26702: XLA_AE_LINES_PKG.ValidateCurrentLine;
26703: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
26704:
26705: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
26706: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
26707: ,p_balance_type_code => l_balance_type_code);
26708:
26709: END IF;
26818: l_tmp_amt NUMBER;
26819: l_acc_rev_natural_side_code VARCHAR2(1);
26820:
26821: l_num_entries NUMBER;
26822: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
26823: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
26824: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
26825: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
26826: l_recog_line_1 NUMBER;
26819: l_acc_rev_natural_side_code VARCHAR2(1);
26820:
26821: l_num_entries NUMBER;
26822: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
26823: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
26824: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
26825: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
26826: l_recog_line_1 NUMBER;
26827: l_recog_line_2 NUMBER;
26820:
26821: l_num_entries NUMBER;
26822: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
26823: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
26824: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
26825: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
26826: l_recog_line_1 NUMBER;
26827: l_recog_line_2 NUMBER;
26828:
26821: l_num_entries NUMBER;
26822: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
26823: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
26824: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
26825: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
26826: l_recog_line_1 NUMBER;
26827: l_recog_line_2 NUMBER;
26828:
26829: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
26827: l_recog_line_2 NUMBER;
26828:
26829: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
26830: l_bflow_applied_to_amt NUMBER; -- 5132302
26831: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
26832:
26833: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
26834:
26835: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
26902: l_accrual_line_num := NULL; -- 4262811
26903: l_tmp_amt := NULL; -- 4262811
26904: --
26905:
26906: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
26907: l_balance_type_code <> 'B' THEN
26908: IF NVL(p_source_2,'
26909: ') = 'B' AND
26910: NVL(
26987: --
26988: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
26989:
26990: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
26991: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
26992:
26993: -- 4955764
26994: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
26995: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
27067: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
27068:
27069: IF xla_accounting_cache_pkg.GetValueChar
27070: (p_source_code => 'LEDGER_CATEGORY_CODE'
27071: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
27072: AND l_bflow_method_code = 'PRIOR_ENTRY'
27073: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
27074: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
27075: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
27144: p_lookup_type => 'XLA_OWNER_TYPE'
27145: ,p_lookup_code => l_component_type_code
27146: )
27147: ,p_token_4 => 'PRODUCT_NAME'
27148: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
27149: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
27150: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
27151: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
27152: ,p_ae_header_id => NULL
27145: ,p_lookup_code => l_component_type_code
27146: )
27147: ,p_token_4 => 'PRODUCT_NAME'
27148: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
27149: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
27150: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
27151: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
27152: ,p_ae_header_id => NULL
27153: );
27146: )
27147: ,p_token_4 => 'PRODUCT_NAME'
27148: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
27149: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
27150: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
27151: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
27152: ,p_ae_header_id => NULL
27153: );
27154:
27147: ,p_token_4 => 'PRODUCT_NAME'
27148: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
27149: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
27150: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
27151: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
27152: ,p_ae_header_id => NULL
27153: );
27154:
27155: IF (C_LEVEL_ERROR>= g_log_level) THEN
27178: ----------------------------------------------------------------------------------
27179: -- 4219869 Business Flow
27180: -- Update journal entry status -- Need to generate this within IF
27181: ----------------------------------------------------------------------------------
27182: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
27183: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
27184: ,p_balance_type_code => l_balance_type_code
27185: );
27186:
27239:
27240: --
27241: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
27242: --
27243: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
27244: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
27245: ELSE
27246: ---------------------------------------------------------------------------------------------------
27247: -- 4262811a Switch Sign
27264:
27265: XLA_AE_LINES_PKG.ValidateCurrentLine;
27266: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
27267:
27268: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
27269: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
27270: ,p_balance_type_code => l_balance_type_code);
27271:
27272: END IF;
27385: l_tmp_amt NUMBER;
27386: l_acc_rev_natural_side_code VARCHAR2(1);
27387:
27388: l_num_entries NUMBER;
27389: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
27390: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
27391: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
27392: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
27393: l_recog_line_1 NUMBER;
27386: l_acc_rev_natural_side_code VARCHAR2(1);
27387:
27388: l_num_entries NUMBER;
27389: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
27390: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
27391: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
27392: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
27393: l_recog_line_1 NUMBER;
27394: l_recog_line_2 NUMBER;
27387:
27388: l_num_entries NUMBER;
27389: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
27390: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
27391: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
27392: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
27393: l_recog_line_1 NUMBER;
27394: l_recog_line_2 NUMBER;
27395:
27388: l_num_entries NUMBER;
27389: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
27390: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
27391: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
27392: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
27393: l_recog_line_1 NUMBER;
27394: l_recog_line_2 NUMBER;
27395:
27396: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
27394: l_recog_line_2 NUMBER;
27395:
27396: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
27397: l_bflow_applied_to_amt NUMBER; -- 5132302
27398: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
27399:
27400: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
27401:
27402: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
27469: l_accrual_line_num := NULL; -- 4262811
27470: l_tmp_amt := NULL; -- 4262811
27471: --
27472:
27473: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
27474: l_balance_type_code <> 'B' THEN
27475: IF (NVL(p_source_2,'
27476: ') = 'A' OR
27477: NVL(p_source_2,'
27552: --
27553: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
27554:
27555: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
27556: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
27557:
27558: -- 4955764
27559: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
27560: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
27622: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
27623:
27624: IF xla_accounting_cache_pkg.GetValueChar
27625: (p_source_code => 'LEDGER_CATEGORY_CODE'
27626: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
27627: AND l_bflow_method_code = 'PRIOR_ENTRY'
27628: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
27629: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
27630: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
27699: p_lookup_type => 'XLA_OWNER_TYPE'
27700: ,p_lookup_code => l_component_type_code
27701: )
27702: ,p_token_4 => 'PRODUCT_NAME'
27703: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
27704: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
27705: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
27706: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
27707: ,p_ae_header_id => NULL
27700: ,p_lookup_code => l_component_type_code
27701: )
27702: ,p_token_4 => 'PRODUCT_NAME'
27703: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
27704: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
27705: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
27706: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
27707: ,p_ae_header_id => NULL
27708: );
27701: )
27702: ,p_token_4 => 'PRODUCT_NAME'
27703: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
27704: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
27705: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
27706: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
27707: ,p_ae_header_id => NULL
27708: );
27709:
27702: ,p_token_4 => 'PRODUCT_NAME'
27703: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
27704: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
27705: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
27706: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
27707: ,p_ae_header_id => NULL
27708: );
27709:
27710: IF (C_LEVEL_ERROR>= g_log_level) THEN
27733: ----------------------------------------------------------------------------------
27734: -- 4219869 Business Flow
27735: -- Update journal entry status -- Need to generate this within IF
27736: ----------------------------------------------------------------------------------
27737: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
27738: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
27739: ,p_balance_type_code => l_balance_type_code
27740: );
27741:
27794:
27795: --
27796: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
27797: --
27798: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
27799: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
27800: ELSE
27801: ---------------------------------------------------------------------------------------------------
27802: -- 4262811a Switch Sign
27819:
27820: XLA_AE_LINES_PKG.ValidateCurrentLine;
27821: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
27822:
27823: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
27824: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
27825: ,p_balance_type_code => l_balance_type_code);
27826:
27827: END IF;
27936: l_tmp_amt NUMBER;
27937: l_acc_rev_natural_side_code VARCHAR2(1);
27938:
27939: l_num_entries NUMBER;
27940: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
27941: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
27942: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
27943: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
27944: l_recog_line_1 NUMBER;
27937: l_acc_rev_natural_side_code VARCHAR2(1);
27938:
27939: l_num_entries NUMBER;
27940: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
27941: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
27942: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
27943: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
27944: l_recog_line_1 NUMBER;
27945: l_recog_line_2 NUMBER;
27938:
27939: l_num_entries NUMBER;
27940: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
27941: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
27942: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
27943: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
27944: l_recog_line_1 NUMBER;
27945: l_recog_line_2 NUMBER;
27946:
27939: l_num_entries NUMBER;
27940: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
27941: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
27942: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
27943: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
27944: l_recog_line_1 NUMBER;
27945: l_recog_line_2 NUMBER;
27946:
27947: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
27945: l_recog_line_2 NUMBER;
27946:
27947: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
27948: l_bflow_applied_to_amt NUMBER; -- 5132302
27949: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
27950:
27951: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
27952:
27953: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
28020: l_accrual_line_num := NULL; -- 4262811
28021: l_tmp_amt := NULL; -- 4262811
28022: --
28023:
28024: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
28025: l_balance_type_code <> 'B' THEN
28026: IF NVL(
28027: xla_ae_sources_pkg.GetSystemSourceChar(
28028: p_source_code => 'XLA_EVENT_TYPE_CODE'
28105: --
28106: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
28107:
28108: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
28109: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
28110:
28111: -- 4955764
28112: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
28113: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
28185: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
28186:
28187: IF xla_accounting_cache_pkg.GetValueChar
28188: (p_source_code => 'LEDGER_CATEGORY_CODE'
28189: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
28190: AND l_bflow_method_code = 'PRIOR_ENTRY'
28191: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
28192: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
28193: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
28262: p_lookup_type => 'XLA_OWNER_TYPE'
28263: ,p_lookup_code => l_component_type_code
28264: )
28265: ,p_token_4 => 'PRODUCT_NAME'
28266: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
28267: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
28268: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
28269: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
28270: ,p_ae_header_id => NULL
28263: ,p_lookup_code => l_component_type_code
28264: )
28265: ,p_token_4 => 'PRODUCT_NAME'
28266: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
28267: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
28268: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
28269: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
28270: ,p_ae_header_id => NULL
28271: );
28264: )
28265: ,p_token_4 => 'PRODUCT_NAME'
28266: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
28267: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
28268: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
28269: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
28270: ,p_ae_header_id => NULL
28271: );
28272:
28265: ,p_token_4 => 'PRODUCT_NAME'
28266: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
28267: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
28268: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
28269: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
28270: ,p_ae_header_id => NULL
28271: );
28272:
28273: IF (C_LEVEL_ERROR>= g_log_level) THEN
28296: ----------------------------------------------------------------------------------
28297: -- 4219869 Business Flow
28298: -- Update journal entry status -- Need to generate this within IF
28299: ----------------------------------------------------------------------------------
28300: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
28301: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
28302: ,p_balance_type_code => l_balance_type_code
28303: );
28304:
28357:
28358: --
28359: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
28360: --
28361: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
28362: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
28363: ELSE
28364: ---------------------------------------------------------------------------------------------------
28365: -- 4262811a Switch Sign
28382:
28383: XLA_AE_LINES_PKG.ValidateCurrentLine;
28384: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
28385:
28386: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
28387: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
28388: ,p_balance_type_code => l_balance_type_code);
28389:
28390: END IF;
28503: l_tmp_amt NUMBER;
28504: l_acc_rev_natural_side_code VARCHAR2(1);
28505:
28506: l_num_entries NUMBER;
28507: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
28508: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
28509: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
28510: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
28511: l_recog_line_1 NUMBER;
28504: l_acc_rev_natural_side_code VARCHAR2(1);
28505:
28506: l_num_entries NUMBER;
28507: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
28508: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
28509: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
28510: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
28511: l_recog_line_1 NUMBER;
28512: l_recog_line_2 NUMBER;
28505:
28506: l_num_entries NUMBER;
28507: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
28508: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
28509: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
28510: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
28511: l_recog_line_1 NUMBER;
28512: l_recog_line_2 NUMBER;
28513:
28506: l_num_entries NUMBER;
28507: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
28508: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
28509: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
28510: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
28511: l_recog_line_1 NUMBER;
28512: l_recog_line_2 NUMBER;
28513:
28514: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
28512: l_recog_line_2 NUMBER;
28513:
28514: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
28515: l_bflow_applied_to_amt NUMBER; -- 5132302
28516: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
28517:
28518: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
28519:
28520: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
28587: l_accrual_line_num := NULL; -- 4262811
28588: l_tmp_amt := NULL; -- 4262811
28589: --
28590:
28591: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
28592: l_balance_type_code <> 'B' THEN
28593: IF (NVL(p_source_2,'
28594: ') = 'A' OR
28595: NVL(p_source_2,'
28670: --
28671: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
28672:
28673: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
28674: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
28675:
28676: -- 4955764
28677: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
28678: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
28740: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
28741:
28742: IF xla_accounting_cache_pkg.GetValueChar
28743: (p_source_code => 'LEDGER_CATEGORY_CODE'
28744: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
28745: AND l_bflow_method_code = 'PRIOR_ENTRY'
28746: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
28747: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
28748: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
28817: p_lookup_type => 'XLA_OWNER_TYPE'
28818: ,p_lookup_code => l_component_type_code
28819: )
28820: ,p_token_4 => 'PRODUCT_NAME'
28821: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
28822: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
28823: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
28824: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
28825: ,p_ae_header_id => NULL
28818: ,p_lookup_code => l_component_type_code
28819: )
28820: ,p_token_4 => 'PRODUCT_NAME'
28821: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
28822: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
28823: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
28824: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
28825: ,p_ae_header_id => NULL
28826: );
28819: )
28820: ,p_token_4 => 'PRODUCT_NAME'
28821: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
28822: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
28823: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
28824: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
28825: ,p_ae_header_id => NULL
28826: );
28827:
28820: ,p_token_4 => 'PRODUCT_NAME'
28821: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
28822: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
28823: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
28824: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
28825: ,p_ae_header_id => NULL
28826: );
28827:
28828: IF (C_LEVEL_ERROR>= g_log_level) THEN
28851: ----------------------------------------------------------------------------------
28852: -- 4219869 Business Flow
28853: -- Update journal entry status -- Need to generate this within IF
28854: ----------------------------------------------------------------------------------
28855: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
28856: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
28857: ,p_balance_type_code => l_balance_type_code
28858: );
28859:
28912:
28913: --
28914: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
28915: --
28916: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
28917: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
28918: ELSE
28919: ---------------------------------------------------------------------------------------------------
28920: -- 4262811a Switch Sign
28937:
28938: XLA_AE_LINES_PKG.ValidateCurrentLine;
28939: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
28940:
28941: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
28942: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
28943: ,p_balance_type_code => l_balance_type_code);
28944:
28945: END IF;
29435:
29436: l_calculate_acctd_flag VARCHAR2(1) :='N';
29437: l_calculate_g_l_flag VARCHAR2(1) :='N';
29438: --
29439: l_array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29440: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29441: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
29442: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
29443: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29436: l_calculate_acctd_flag VARCHAR2(1) :='N';
29437: l_calculate_g_l_flag VARCHAR2(1) :='N';
29438: --
29439: l_array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29440: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29441: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
29442: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
29443: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29444: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
29437: l_calculate_g_l_flag VARCHAR2(1) :='N';
29438: --
29439: l_array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29440: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29441: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
29442: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
29443: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29444: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
29445: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
29438: --
29439: l_array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29440: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29441: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
29442: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
29443: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29444: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
29445: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
29446: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29439: l_array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29440: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29441: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
29442: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
29443: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29444: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
29445: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
29446: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29447: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
29440: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29441: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
29442: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
29443: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29444: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
29445: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
29446: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29447: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
29448: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
29441: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
29442: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
29443: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29444: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
29445: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
29446: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29447: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
29448: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
29449: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29442: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
29443: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29444: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
29445: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
29446: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29447: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
29448: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
29449: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29450: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29443: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29444: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
29445: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
29446: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29447: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
29448: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
29449: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29450: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29451: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29444: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
29445: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
29446: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29447: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
29448: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
29449: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29450: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29451: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29452: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29445: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
29446: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29447: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
29448: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
29449: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29450: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29451: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29452: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29453: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
29446: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29447: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
29448: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
29449: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29450: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29451: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29452: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29453: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
29454: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
29447: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
29448: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
29449: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29450: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29451: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29452: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29453: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
29454: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
29455: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
29448: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
29449: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29450: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29451: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29452: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29453: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
29454: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
29455: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
29456: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
29449: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29450: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29451: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29452: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29453: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
29454: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
29455: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
29456: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
29457: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
29450: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29451: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29452: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29453: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
29454: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
29455: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
29456: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
29457: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
29458: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
29451: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29452: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29453: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
29454: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
29455: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
29456: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
29457: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
29458: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
29459: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
29452: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
29453: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
29454: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
29455: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
29456: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
29457: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
29458: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
29459: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
29460: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
29453: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
29454: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
29455: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
29456: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
29457: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
29458: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
29459: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
29460: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
29461: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
29454: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
29455: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
29456: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
29457: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
29458: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
29459: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
29460: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
29461: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
29462: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
29455: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
29456: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
29457: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
29458: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
29459: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
29460: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
29461: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
29462: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
29463: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
29456: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
29457: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
29458: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
29459: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
29460: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
29461: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
29462: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
29463: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
29464: l_array_duplicate_checker XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
29457: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
29458: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
29459: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
29460: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
29461: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
29462: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
29463: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
29464: l_array_duplicate_checker XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
29465:
29458: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
29459: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
29460: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
29461: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
29462: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
29463: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
29464: l_array_duplicate_checker XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
29465:
29466: l_event_id NUMBER;
29459: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
29460: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
29461: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
29462: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
29463: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
29464: l_array_duplicate_checker XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
29465:
29466: l_event_id NUMBER;
29467: l_previous_event_id NUMBER;
29460: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
29461: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
29462: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
29463: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
29464: l_array_duplicate_checker XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
29465:
29466: l_event_id NUMBER;
29467: l_previous_event_id NUMBER;
29468: l_first_event_id NUMBER;
29478: l_event_class_name VARCHAR2(80) := 'Delivery to Expense Destination';
29479: l_description VARCHAR2(4000);
29480: l_transaction_reversal NUMBER;
29481: l_ae_header_id NUMBER;
29482: l_array_extract_line_num xla_ae_journal_entry_pkg.t_array_Num;
29483: l_log_module VARCHAR2(240);
29484: --
29485: l_acct_reversal_source VARCHAR2(30);
29486: l_trx_reversal_source VARCHAR2(30);
29818:
29819: --
29820: -- set event info as cache for other routines to refer event attributes
29821: --
29822: XLA_AE_JOURNAL_ENTRY_PKG.set_event_info
29823: (p_application_id => p_application_id
29824: ,p_primary_ledger_id => p_primary_ledger_id
29825: ,p_base_ledger_id => p_base_ledger_id
29826: ,p_target_ledger_id => p_target_ledger_id
29851:
29852: --
29853: -- set the status of entry to C_VALID (0)
29854: --
29855: XLA_AE_JOURNAL_ENTRY_PKG.g_global_status := XLA_AE_JOURNAL_ENTRY_PKG.C_VALID;
29856:
29857: --
29858: -- initialize a row for ae header
29859: --
29894: --
29895: -- initilaize the status of ae headers for diffrent balance types
29896: -- the status is initialised to C_NOT_CREATED (2)
29897: --
29898: --g_array_event(l_event_id).array_value_num('actual_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
29899: --g_array_event(l_event_id).array_value_num('budget_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
29900: --g_array_event(l_event_id).array_value_num('encumbrance_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
29901:
29902: --
29895: -- initilaize the status of ae headers for diffrent balance types
29896: -- the status is initialised to C_NOT_CREATED (2)
29897: --
29898: --g_array_event(l_event_id).array_value_num('actual_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
29899: --g_array_event(l_event_id).array_value_num('budget_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
29900: --g_array_event(l_event_id).array_value_num('encumbrance_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
29901:
29902: --
29903: -- call api to validate and store accounting attributes for header
29896: -- the status is initialised to C_NOT_CREATED (2)
29897: --
29898: --g_array_event(l_event_id).array_value_num('actual_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
29899: --g_array_event(l_event_id).array_value_num('budget_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
29900: --g_array_event(l_event_id).array_value_num('encumbrance_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
29901:
29902: --
29903: -- call api to validate and store accounting attributes for header
29904: --
29939: --
29940: l_trx_reversal_source := SUBSTR(NULL, 1,30);
29941:
29942: IF NVL(l_trx_reversal_source, 'N') NOT IN ('N','Y') THEN
29943: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
29944:
29945: xla_accounting_err_pkg.build_message
29946: (p_appli_s_name => 'XLA'
29947: ,p_msg_name => 'XLA_AP_INVALID_HDR_ATTR'
29947: ,p_msg_name => 'XLA_AP_INVALID_HDR_ATTR'
29948: ,p_token_1 => 'ACCT_ATTR_NAME'
29949: ,p_value_1 => xla_ae_sources_pkg.GetAccountingSourceName('TRX_ACCT_REVERSAL_OPTION')
29950: ,p_token_2 => 'PRODUCT_NAME'
29951: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
29952: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
29953: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
29954: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
29955:
29948: ,p_token_1 => 'ACCT_ATTR_NAME'
29949: ,p_value_1 => xla_ae_sources_pkg.GetAccountingSourceName('TRX_ACCT_REVERSAL_OPTION')
29950: ,p_token_2 => 'PRODUCT_NAME'
29951: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
29952: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
29953: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
29954: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
29955:
29956: ELSIF NVL(l_trx_reversal_source, 'N') = 'Y' THEN
29949: ,p_value_1 => xla_ae_sources_pkg.GetAccountingSourceName('TRX_ACCT_REVERSAL_OPTION')
29950: ,p_token_2 => 'PRODUCT_NAME'
29951: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
29952: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
29953: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
29954: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
29955:
29956: ELSIF NVL(l_trx_reversal_source, 'N') = 'Y' THEN
29957: --
29950: ,p_token_2 => 'PRODUCT_NAME'
29951: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
29952: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
29953: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
29954: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
29955:
29956: ELSIF NVL(l_trx_reversal_source, 'N') = 'Y' THEN
29957: --
29958: -- following sets the accounting attributes needed to reverse
29969: ----------------------------------------------------------------
29970: -- 4262811 - update the header statuses to invalid in need be
29971: ----------------------------------------------------------------
29972: --
29973: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus (p_hdr_idx => hdr_idx);
29974:
29975:
29976: -----------------------------------------------
29977: -- No accrual reversal for the event class/type
30102: ,p_module => l_log_module);
30103: END IF;
30104:
30105: --
30106: -- set the XLA_AE_JOURNAL_ENTRY_PKG.g_global_status to C_VALID (0)
30107: --
30108: XLA_AE_JOURNAL_ENTRY_PKG.g_global_status := XLA_AE_JOURNAL_ENTRY_PKG.C_VALID;
30109: --
30110: -- set event info as cache for other routines to refer event attributes
30104:
30105: --
30106: -- set the XLA_AE_JOURNAL_ENTRY_PKG.g_global_status to C_VALID (0)
30107: --
30108: XLA_AE_JOURNAL_ENTRY_PKG.g_global_status := XLA_AE_JOURNAL_ENTRY_PKG.C_VALID;
30109: --
30110: -- set event info as cache for other routines to refer event attributes
30111: --
30112:
30112:
30113: IF l_event_id <> NVL(l_previous_event_id, -1) THEN
30114: l_previous_event_id := l_event_id;
30115:
30116: XLA_AE_JOURNAL_ENTRY_PKG.set_event_info
30117: (p_application_id => p_application_id
30118: ,p_primary_ledger_id => p_primary_ledger_id
30119: ,p_base_ledger_id => p_base_ledger_id
30120: ,p_target_ledger_id => p_target_ledger_id
30153: l_acct_reversal_source := SUBSTR(NULL, 1,30);
30154:
30155: IF l_continue_with_lines THEN
30156: IF NVL(l_acct_reversal_source, 'N') NOT IN ('N','Y','B') THEN
30157: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
30158:
30159: xla_accounting_err_pkg.build_message
30160: (p_appli_s_name => 'XLA'
30161: ,p_msg_name => 'XLA_AP_INVALID_REVERSAL_OPTION'
30161: ,p_msg_name => 'XLA_AP_INVALID_REVERSAL_OPTION'
30162: ,p_token_1 => 'LINE_NUMBER'
30163: ,p_value_1 => l_array_extract_line_num(Idx)
30164: ,p_token_2 => 'PRODUCT_NAME'
30165: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
30166: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
30167: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
30168: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
30169:
30162: ,p_token_1 => 'LINE_NUMBER'
30163: ,p_value_1 => l_array_extract_line_num(Idx)
30164: ,p_token_2 => 'PRODUCT_NAME'
30165: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
30166: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
30167: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
30168: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
30169:
30170: ELSIF NVL(l_acct_reversal_source, 'N') IN ('Y','B') THEN
30163: ,p_value_1 => l_array_extract_line_num(Idx)
30164: ,p_token_2 => 'PRODUCT_NAME'
30165: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
30166: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
30167: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
30168: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
30169:
30170: ELSIF NVL(l_acct_reversal_source, 'N') IN ('Y','B') THEN
30171: --
30164: ,p_token_2 => 'PRODUCT_NAME'
30165: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
30166: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
30167: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
30168: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
30169:
30170: ELSIF NVL(l_acct_reversal_source, 'N') IN ('Y','B') THEN
30171: --
30172: -- following sets the accounting attributes needed to reverse
30985:
30986: -- only execute it if calculate g/l flag is yes, and primary or secondary ledger
30987: -- or secondary ledger that has different currency with primary
30988: -- or alc that is calculated by sla
30989: IF (((l_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
30990: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y'))
30991:
30992: -- IF((l_calculate_g_l_flag='Y' or XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id <>
30993: -- XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id)
30986: -- only execute it if calculate g/l flag is yes, and primary or secondary ledger
30987: -- or secondary ledger that has different currency with primary
30988: -- or alc that is calculated by sla
30989: IF (((l_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
30990: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y'))
30991:
30992: -- IF((l_calculate_g_l_flag='Y' or XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id <>
30993: -- XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id)
30994: AND (l_actual_flag = 'A')) THEN
30988: -- or alc that is calculated by sla
30989: IF (((l_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
30990: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y'))
30991:
30992: -- IF((l_calculate_g_l_flag='Y' or XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id <>
30993: -- XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id)
30994: AND (l_actual_flag = 'A')) THEN
30995: XLA_AE_LINES_PKG.CreateGainOrLossLines(
30996: p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
30989: IF (((l_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
30990: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y'))
30991:
30992: -- IF((l_calculate_g_l_flag='Y' or XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id <>
30993: -- XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id)
30994: AND (l_actual_flag = 'A')) THEN
30995: XLA_AE_LINES_PKG.CreateGainOrLossLines(
30996: p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
30997: ,p_application_id => p_application_id
30992: -- IF((l_calculate_g_l_flag='Y' or XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id <>
30993: -- XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id)
30994: AND (l_actual_flag = 'A')) THEN
30995: XLA_AE_LINES_PKG.CreateGainOrLossLines(
30996: p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
30997: ,p_application_id => p_application_id
30998: ,p_amb_context_code => 'DEFAULT'
30999: ,p_entity_code => xla_ae_journal_entry_pkg.g_cache_event.entity_code
31000: ,p_event_class_code => C_EVENT_CLASS_CODE
30995: XLA_AE_LINES_PKG.CreateGainOrLossLines(
30996: p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
30997: ,p_application_id => p_application_id
30998: ,p_amb_context_code => 'DEFAULT'
30999: ,p_entity_code => xla_ae_journal_entry_pkg.g_cache_event.entity_code
31000: ,p_event_class_code => C_EVENT_CLASS_CODE
31001: ,p_event_type_code => C_EVENT_TYPE_CODE
31002:
31003: ,p_gain_ccid => -1
31576:
31577: l_calculate_acctd_flag VARCHAR2(1) :='N';
31578: l_calculate_g_l_flag VARCHAR2(1) :='N';
31579: --
31580: l_array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31581: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31582: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
31583: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
31584: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31577: l_calculate_acctd_flag VARCHAR2(1) :='N';
31578: l_calculate_g_l_flag VARCHAR2(1) :='N';
31579: --
31580: l_array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31581: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31582: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
31583: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
31584: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31585: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
31578: l_calculate_g_l_flag VARCHAR2(1) :='N';
31579: --
31580: l_array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31581: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31582: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
31583: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
31584: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31585: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
31586: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
31579: --
31580: l_array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31581: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31582: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
31583: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
31584: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31585: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
31586: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
31587: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31580: l_array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31581: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31582: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
31583: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
31584: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31585: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
31586: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
31587: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31588: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
31581: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31582: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
31583: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
31584: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31585: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
31586: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
31587: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31588: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
31589: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
31582: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
31583: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
31584: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31585: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
31586: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
31587: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31588: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
31589: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
31590: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31583: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
31584: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31585: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
31586: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
31587: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31588: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
31589: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
31590: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31591: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31584: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31585: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
31586: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
31587: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31588: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
31589: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
31590: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31591: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31592: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31585: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
31586: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
31587: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31588: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
31589: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
31590: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31591: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31592: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31593: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31586: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
31587: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31588: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
31589: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
31590: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31591: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31592: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31593: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31594: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
31587: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31588: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
31589: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
31590: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31591: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31592: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31593: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31594: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
31595: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
31588: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
31589: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
31590: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31591: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31592: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31593: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31594: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
31595: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
31596: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
31589: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
31590: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31591: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31592: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31593: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31594: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
31595: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
31596: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
31597: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
31590: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31591: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31592: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31593: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31594: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
31595: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
31596: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
31597: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
31598: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
31591: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31592: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31593: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31594: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
31595: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
31596: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
31597: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
31598: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
31599: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
31592: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31593: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31594: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
31595: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
31596: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
31597: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
31598: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
31599: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
31600: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
31593: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
31594: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
31595: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
31596: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
31597: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
31598: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
31599: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
31600: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
31601: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
31594: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
31595: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
31596: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
31597: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
31598: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
31599: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
31600: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
31601: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
31602: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
31595: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
31596: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
31597: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
31598: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
31599: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
31600: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
31601: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
31602: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
31603: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
31596: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
31597: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
31598: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
31599: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
31600: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
31601: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
31602: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
31603: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
31604: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
31597: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
31598: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
31599: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
31600: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
31601: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
31602: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
31603: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
31604: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
31605: l_array_duplicate_checker XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
31598: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
31599: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
31600: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
31601: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
31602: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
31603: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
31604: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
31605: l_array_duplicate_checker XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
31606:
31599: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
31600: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
31601: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
31602: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
31603: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
31604: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
31605: l_array_duplicate_checker XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
31606:
31607: l_event_id NUMBER;
31600: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
31601: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
31602: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
31603: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
31604: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
31605: l_array_duplicate_checker XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
31606:
31607: l_event_id NUMBER;
31608: l_previous_event_id NUMBER;
31601: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
31602: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
31603: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
31604: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
31605: l_array_duplicate_checker XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
31606:
31607: l_event_id NUMBER;
31608: l_previous_event_id NUMBER;
31609: l_first_event_id NUMBER;
31619: l_event_class_name VARCHAR2(80) := 'PO Delivery into Inventory';
31620: l_description VARCHAR2(4000);
31621: l_transaction_reversal NUMBER;
31622: l_ae_header_id NUMBER;
31623: l_array_extract_line_num xla_ae_journal_entry_pkg.t_array_Num;
31624: l_log_module VARCHAR2(240);
31625: --
31626: l_acct_reversal_source VARCHAR2(30);
31627: l_trx_reversal_source VARCHAR2(30);
31952:
31953: --
31954: -- set event info as cache for other routines to refer event attributes
31955: --
31956: XLA_AE_JOURNAL_ENTRY_PKG.set_event_info
31957: (p_application_id => p_application_id
31958: ,p_primary_ledger_id => p_primary_ledger_id
31959: ,p_base_ledger_id => p_base_ledger_id
31960: ,p_target_ledger_id => p_target_ledger_id
31985:
31986: --
31987: -- set the status of entry to C_VALID (0)
31988: --
31989: XLA_AE_JOURNAL_ENTRY_PKG.g_global_status := XLA_AE_JOURNAL_ENTRY_PKG.C_VALID;
31990:
31991: --
31992: -- initialize a row for ae header
31993: --
32024: --
32025: -- initilaize the status of ae headers for diffrent balance types
32026: -- the status is initialised to C_NOT_CREATED (2)
32027: --
32028: --g_array_event(l_event_id).array_value_num('actual_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
32029: --g_array_event(l_event_id).array_value_num('budget_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
32030: --g_array_event(l_event_id).array_value_num('encumbrance_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
32031:
32032: --
32025: -- initilaize the status of ae headers for diffrent balance types
32026: -- the status is initialised to C_NOT_CREATED (2)
32027: --
32028: --g_array_event(l_event_id).array_value_num('actual_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
32029: --g_array_event(l_event_id).array_value_num('budget_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
32030: --g_array_event(l_event_id).array_value_num('encumbrance_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
32031:
32032: --
32033: -- call api to validate and store accounting attributes for header
32026: -- the status is initialised to C_NOT_CREATED (2)
32027: --
32028: --g_array_event(l_event_id).array_value_num('actual_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
32029: --g_array_event(l_event_id).array_value_num('budget_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
32030: --g_array_event(l_event_id).array_value_num('encumbrance_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
32031:
32032: --
32033: -- call api to validate and store accounting attributes for header
32034: --
32069: --
32070: l_trx_reversal_source := SUBSTR(NULL, 1,30);
32071:
32072: IF NVL(l_trx_reversal_source, 'N') NOT IN ('N','Y') THEN
32073: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
32074:
32075: xla_accounting_err_pkg.build_message
32076: (p_appli_s_name => 'XLA'
32077: ,p_msg_name => 'XLA_AP_INVALID_HDR_ATTR'
32077: ,p_msg_name => 'XLA_AP_INVALID_HDR_ATTR'
32078: ,p_token_1 => 'ACCT_ATTR_NAME'
32079: ,p_value_1 => xla_ae_sources_pkg.GetAccountingSourceName('TRX_ACCT_REVERSAL_OPTION')
32080: ,p_token_2 => 'PRODUCT_NAME'
32081: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
32082: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
32083: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
32084: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
32085:
32078: ,p_token_1 => 'ACCT_ATTR_NAME'
32079: ,p_value_1 => xla_ae_sources_pkg.GetAccountingSourceName('TRX_ACCT_REVERSAL_OPTION')
32080: ,p_token_2 => 'PRODUCT_NAME'
32081: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
32082: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
32083: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
32084: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
32085:
32086: ELSIF NVL(l_trx_reversal_source, 'N') = 'Y' THEN
32079: ,p_value_1 => xla_ae_sources_pkg.GetAccountingSourceName('TRX_ACCT_REVERSAL_OPTION')
32080: ,p_token_2 => 'PRODUCT_NAME'
32081: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
32082: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
32083: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
32084: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
32085:
32086: ELSIF NVL(l_trx_reversal_source, 'N') = 'Y' THEN
32087: --
32080: ,p_token_2 => 'PRODUCT_NAME'
32081: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
32082: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
32083: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
32084: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
32085:
32086: ELSIF NVL(l_trx_reversal_source, 'N') = 'Y' THEN
32087: --
32088: -- following sets the accounting attributes needed to reverse
32099: ----------------------------------------------------------------
32100: -- 4262811 - update the header statuses to invalid in need be
32101: ----------------------------------------------------------------
32102: --
32103: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus (p_hdr_idx => hdr_idx);
32104:
32105:
32106: -----------------------------------------------
32107: -- No accrual reversal for the event class/type
32235: ,p_module => l_log_module);
32236: END IF;
32237:
32238: --
32239: -- set the XLA_AE_JOURNAL_ENTRY_PKG.g_global_status to C_VALID (0)
32240: --
32241: XLA_AE_JOURNAL_ENTRY_PKG.g_global_status := XLA_AE_JOURNAL_ENTRY_PKG.C_VALID;
32242: --
32243: -- set event info as cache for other routines to refer event attributes
32237:
32238: --
32239: -- set the XLA_AE_JOURNAL_ENTRY_PKG.g_global_status to C_VALID (0)
32240: --
32241: XLA_AE_JOURNAL_ENTRY_PKG.g_global_status := XLA_AE_JOURNAL_ENTRY_PKG.C_VALID;
32242: --
32243: -- set event info as cache for other routines to refer event attributes
32244: --
32245:
32245:
32246: IF l_event_id <> NVL(l_previous_event_id, -1) THEN
32247: l_previous_event_id := l_event_id;
32248:
32249: XLA_AE_JOURNAL_ENTRY_PKG.set_event_info
32250: (p_application_id => p_application_id
32251: ,p_primary_ledger_id => p_primary_ledger_id
32252: ,p_base_ledger_id => p_base_ledger_id
32253: ,p_target_ledger_id => p_target_ledger_id
32286: l_acct_reversal_source := SUBSTR(NULL, 1,30);
32287:
32288: IF l_continue_with_lines THEN
32289: IF NVL(l_acct_reversal_source, 'N') NOT IN ('N','Y','B') THEN
32290: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
32291:
32292: xla_accounting_err_pkg.build_message
32293: (p_appli_s_name => 'XLA'
32294: ,p_msg_name => 'XLA_AP_INVALID_REVERSAL_OPTION'
32294: ,p_msg_name => 'XLA_AP_INVALID_REVERSAL_OPTION'
32295: ,p_token_1 => 'LINE_NUMBER'
32296: ,p_value_1 => l_array_extract_line_num(Idx)
32297: ,p_token_2 => 'PRODUCT_NAME'
32298: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
32299: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
32300: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
32301: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
32302:
32295: ,p_token_1 => 'LINE_NUMBER'
32296: ,p_value_1 => l_array_extract_line_num(Idx)
32297: ,p_token_2 => 'PRODUCT_NAME'
32298: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
32299: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
32300: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
32301: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
32302:
32303: ELSIF NVL(l_acct_reversal_source, 'N') IN ('Y','B') THEN
32296: ,p_value_1 => l_array_extract_line_num(Idx)
32297: ,p_token_2 => 'PRODUCT_NAME'
32298: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
32299: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
32300: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
32301: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
32302:
32303: ELSIF NVL(l_acct_reversal_source, 'N') IN ('Y','B') THEN
32304: --
32297: ,p_token_2 => 'PRODUCT_NAME'
32298: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
32299: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
32300: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
32301: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
32302:
32303: ELSIF NVL(l_acct_reversal_source, 'N') IN ('Y','B') THEN
32304: --
32305: -- following sets the accounting attributes needed to reverse
33063:
33064: -- only execute it if calculate g/l flag is yes, and primary or secondary ledger
33065: -- or secondary ledger that has different currency with primary
33066: -- or alc that is calculated by sla
33067: IF (((l_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
33068: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y'))
33069:
33070: -- IF((l_calculate_g_l_flag='Y' or XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id <>
33071: -- XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id)
33064: -- only execute it if calculate g/l flag is yes, and primary or secondary ledger
33065: -- or secondary ledger that has different currency with primary
33066: -- or alc that is calculated by sla
33067: IF (((l_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
33068: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y'))
33069:
33070: -- IF((l_calculate_g_l_flag='Y' or XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id <>
33071: -- XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id)
33072: AND (l_actual_flag = 'A')) THEN
33066: -- or alc that is calculated by sla
33067: IF (((l_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
33068: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y'))
33069:
33070: -- IF((l_calculate_g_l_flag='Y' or XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id <>
33071: -- XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id)
33072: AND (l_actual_flag = 'A')) THEN
33073: XLA_AE_LINES_PKG.CreateGainOrLossLines(
33074: p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
33067: IF (((l_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
33068: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y'))
33069:
33070: -- IF((l_calculate_g_l_flag='Y' or XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id <>
33071: -- XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id)
33072: AND (l_actual_flag = 'A')) THEN
33073: XLA_AE_LINES_PKG.CreateGainOrLossLines(
33074: p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
33075: ,p_application_id => p_application_id
33070: -- IF((l_calculate_g_l_flag='Y' or XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id <>
33071: -- XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id)
33072: AND (l_actual_flag = 'A')) THEN
33073: XLA_AE_LINES_PKG.CreateGainOrLossLines(
33074: p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
33075: ,p_application_id => p_application_id
33076: ,p_amb_context_code => 'DEFAULT'
33077: ,p_entity_code => xla_ae_journal_entry_pkg.g_cache_event.entity_code
33078: ,p_event_class_code => C_EVENT_CLASS_CODE
33073: XLA_AE_LINES_PKG.CreateGainOrLossLines(
33074: p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
33075: ,p_application_id => p_application_id
33076: ,p_amb_context_code => 'DEFAULT'
33077: ,p_entity_code => xla_ae_journal_entry_pkg.g_cache_event.entity_code
33078: ,p_event_class_code => C_EVENT_CLASS_CODE
33079: ,p_event_type_code => C_EVENT_TYPE_CODE
33080:
33081: ,p_gain_ccid => -1
33230: ,p_level => C_LEVEL_PROCEDURE
33231: ,p_module => l_log_module);
33232: END IF;
33233:
33234: l_language := xla_ae_journal_entry_pkg.g_cache_ledgers_info.description_language;
33235: l_currency_code := xla_ae_journal_entry_pkg.g_cache_ledgers_info.currency_code;
33236: l_sla_ledger_id := xla_ae_journal_entry_pkg.g_cache_ledgers_info.sla_ledger_id;
33237:
33238: --
33231: ,p_module => l_log_module);
33232: END IF;
33233:
33234: l_language := xla_ae_journal_entry_pkg.g_cache_ledgers_info.description_language;
33235: l_currency_code := xla_ae_journal_entry_pkg.g_cache_ledgers_info.currency_code;
33236: l_sla_ledger_id := xla_ae_journal_entry_pkg.g_cache_ledgers_info.sla_ledger_id;
33237:
33238: --
33239: -- initialize array of lines with NULL
33232: END IF;
33233:
33234: l_language := xla_ae_journal_entry_pkg.g_cache_ledgers_info.description_language;
33235: l_currency_code := xla_ae_journal_entry_pkg.g_cache_ledgers_info.currency_code;
33236: l_sla_ledger_id := xla_ae_journal_entry_pkg.g_cache_ledgers_info.sla_ledger_id;
33237:
33238: --
33239: -- initialize array of lines with NULL
33240: --
33428: ,p_level => C_LEVEL_STATEMENT
33429: ,p_module => l_log_module);
33430: END IF;
33431: --
33432: xla_ae_journal_entry_pkg.SetProductAcctDefinition
33433: (p_product_rule_code => 'FV_CST_AAD'
33434: ,p_product_rule_type_code => 'S'
33435: ,p_product_rule_version => ''
33436: ,p_product_rule_name => 'Federal Costing Application Accounting Definition'
33437: ,p_amb_context_code => 'DEFAULT'
33438: );
33439:
33440: l_array_ledgers :=
33441: xla_ae_journal_entry_pkg.GetAlternateCurrencyLedger
33442: (p_base_ledger_id => p_base_ledger_id);
33443:
33444: FOR Idx IN 1 .. l_array_ledgers.COUNT LOOP
33445: l_temp_result :=
33442: (p_base_ledger_id => p_base_ledger_id);
33443:
33444: FOR Idx IN 1 .. l_array_ledgers.COUNT LOOP
33445: l_temp_result :=
33446: XLA_AE_JOURNAL_ENTRY_PKG.GetLedgersInfo
33447: (p_application_id => p_application_id
33448: ,p_base_ledger_id => p_base_ledger_id
33449: ,p_target_ledger_id => l_array_ledgers(Idx)
33450: ,p_primary_ledger_id => p_primary_ledger_id