107: p_status IN NUMBER,
108: p_err_msg IN VARCHAR2
109: )
110: AS
111: TYPE t_ae_header_id IS TABLE OF xla_ae_headers.ae_header_id%TYPE;
112:
113: TYPE t_event_id IS TABLE OF xla_ae_headers.event_id%TYPE;
114:
115: l_ae_header_id t_ae_header_id;
109: )
110: AS
111: TYPE t_ae_header_id IS TABLE OF xla_ae_headers.ae_header_id%TYPE;
112:
113: TYPE t_event_id IS TABLE OF xla_ae_headers.event_id%TYPE;
114:
115: l_ae_header_id t_ae_header_id;
116: l_ccid t_ccid_table;
117: l_event_id t_event_id;
266: SET xal.code_combination_id = p_new_ccid
267: WHERE application_id = p_application_id
268: AND ae_header_id IN (
269: SELECT ae_header_id
270: FROM xla_ae_headers
271: WHERE accounting_batch_id = p_accounting_batch_id
272: AND application_id = p_application_id
273: AND ledger_id = p_ledger_id)
274: AND code_combination_id = l_ccid (i);
296: SET xal.code_combination_id = p_status -- -2
297: WHERE application_id = p_application_id
298: AND ae_header_id IN (
299: SELECT ae_header_id
300: FROM xla_ae_headers
301: WHERE accounting_batch_id = p_accounting_batch_id
302: AND application_id = p_application_id
303: AND ledger_id = p_ledger_id)
304: AND code_combination_id = l_ccid (i)
305: RETURNING ae_header_id
306: BULK COLLECT INTO l_ae_header_id;
307: print_logfile ('No. of xla_ae_lines Records ' || SQL%ROWCOUNT);
308: FORALL j IN l_ae_header_id.FIRST .. l_ae_header_id.LAST
309: UPDATE xla_ae_headers
310: SET accounting_entry_status_code = 'I'
311: WHERE application_id = p_application_id
312: AND accounting_batch_id = p_accounting_batch_id
313: AND ae_header_id = l_ae_header_id (j)
312: AND accounting_batch_id = p_accounting_batch_id
313: AND ae_header_id = l_ae_header_id (j)
314: RETURNING event_id
315: BULK COLLECT INTO l_event_id;
316: print_logfile ('No. of xla_ae_headers Records ' || SQL%ROWCOUNT);
317: FORALL k IN l_event_id.FIRST .. l_event_id.LAST
318: UPDATE xla_ae_headers
319: SET accounting_entry_status_code = 'R'
320: WHERE event_id = l_event_id (k)
314: RETURNING event_id
315: BULK COLLECT INTO l_event_id;
316: print_logfile ('No. of xla_ae_headers Records ' || SQL%ROWCOUNT);
317: FORALL k IN l_event_id.FIRST .. l_event_id.LAST
318: UPDATE xla_ae_headers
319: SET accounting_entry_status_code = 'R'
320: WHERE event_id = l_event_id (k)
321: AND application_id = p_application_id
322: AND accounting_batch_id = p_accounting_batch_id
320: WHERE event_id = l_event_id (k)
321: AND application_id = p_application_id
322: AND accounting_batch_id = p_accounting_batch_id
323: AND accounting_entry_status_code <> 'I';
324: print_logfile ( 'No. of Related xla_ae_headers Records '
325: || SQL%ROWCOUNT
326: );
327: FORALL l IN l_event_id.FIRST .. l_event_id.LAST
328: UPDATE xla_events
341: FOR n IN l_ae_header_id.FIRST .. l_ae_header_id.LAST
342: LOOP
343: SELECT ledger_id, entity_id, event_id
344: INTO l_ledger_id, l_entity_id, l_vent_id
345: FROM xla_ae_headers
346: WHERE ae_header_id = l_ae_header_id (n);
347:
348: ----------------------------------------------------------------------------
349: -- As the BPEL Prcoess faild to process the ccids with external system