18: BEGIN
19:
20: if (X_init_message_flag = 'YES') then
21: fa_srvr_msg.init_server_message;
22: fa_debug_pkg.initialize;
23: end if;
24:
25: if (X_book is NULL) then
26: fa_srvr_msg.add_message(calling_fn => 'FA_CHK_BOOKSTS_PKG.faxcbsx',
50: -- h_txn_status, at this point, have value of TRUE if txn is approved
51: -- and FALSE if txn is not approved
52:
53: if (p_log_level_rec.statement_level) then
54: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxcbsx','txn status',h_txn_status, p_log_level_rec => p_log_level_rec);
55: end if;
56:
57: return(h_txn_status);
58:
187: return(FALSE);
188: end if;
189:
190: if (p_log_level_rec.statement_level) then
191: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxcrb',
192: 'sob_id',h_set_of_books_id, p_log_level_rec => p_log_level_rec);
193: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxcrb',
194: 'reporting_type',h_mrc_sob_type_code, p_log_level_rec => p_log_level_rec);
195: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxcrb',
189:
190: if (p_log_level_rec.statement_level) then
191: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxcrb',
192: 'sob_id',h_set_of_books_id, p_log_level_rec => p_log_level_rec);
193: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxcrb',
194: 'reporting_type',h_mrc_sob_type_code, p_log_level_rec => p_log_level_rec);
195: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxcrb',
196: 'last period counter',h_last_period_counter, p_log_level_rec => p_log_level_rec);
197: end if;
191: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxcrb',
192: 'sob_id',h_set_of_books_id, p_log_level_rec => p_log_level_rec);
193: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxcrb',
194: 'reporting_type',h_mrc_sob_type_code, p_log_level_rec => p_log_level_rec);
195: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxcrb',
196: 'last period counter',h_last_period_counter, p_log_level_rec => p_log_level_rec);
197: end if;
198:
199: -- check to see if the efc conversion is in process
209:
210: if (h_mrc_sob_type_code = 'P' and h_mc_source_flag = 'Y') then
211:
212: if (p_log_level_rec.statement_level) then
213: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxcrb','checking for ','Primary', p_log_level_rec => p_log_level_rec);
214: end if;
215:
216: -- check to see if mrc upgrade is in process for a reporting
217: -- book associated to this primary book
282: -- or if a mass request is locking the primary book
283:
284: elsif (h_mrc_sob_type_code = 'R' and X_trx_type <> 'RB_DEP') then
285: if (p_log_level_rec.statement_level) then
286: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxcrb','checking','reporting', p_log_level_rec => p_log_level_rec);
287: end if;
288:
289: open check_primary_sync;
290: fetch check_primary_sync into h_count;
373: raise ERROR_FOUND;
374: end if;
375:
376: if (p_log_level_rec.statement_level) then
377: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxcbs','txn_status after faxlck',X_txn_status, p_log_level_rec => p_log_level_rec);
378: end if;
379:
380: -- X_txn_status is TRUE if nothing failed so far and check any
381: -- processes on this book
396: -- faxcps above returns X_txn_status false when process is in running, inactive,
397: -- or pending status
398:
399: if (p_log_level_rec.statement_level) then
400: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxcbs','txn status after faxcps',
401: X_txn_status, p_log_level_rec => p_log_level_rec);
402: end if;
403: if (X_txn_status) then
404:
669: h_ca_request_id := 0;
670: end if;
671:
672: if (p_log_level_rec.statement_level) then
673: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxcps','book',X_book, p_log_level_rec => p_log_level_rec);
674: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxcps','mass_request_id',
675: h_request_id, p_log_level_rec => p_log_level_rec);
676: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxcps','create_accounting_request_id', h_ca_request_id, p_log_level_rec);
677: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxcps','conc_request_id',
670: end if;
671:
672: if (p_log_level_rec.statement_level) then
673: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxcps','book',X_book, p_log_level_rec => p_log_level_rec);
674: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxcps','mass_request_id',
675: h_request_id, p_log_level_rec => p_log_level_rec);
676: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxcps','create_accounting_request_id', h_ca_request_id, p_log_level_rec);
677: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxcps','conc_request_id',
678: h_conc_request_id, p_log_level_rec => p_log_level_rec);
672: if (p_log_level_rec.statement_level) then
673: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxcps','book',X_book, p_log_level_rec => p_log_level_rec);
674: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxcps','mass_request_id',
675: h_request_id, p_log_level_rec => p_log_level_rec);
676: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxcps','create_accounting_request_id', h_ca_request_id, p_log_level_rec);
677: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxcps','conc_request_id',
678: h_conc_request_id, p_log_level_rec => p_log_level_rec);
679: end if;
680:
673: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxcps','book',X_book, p_log_level_rec => p_log_level_rec);
674: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxcps','mass_request_id',
675: h_request_id, p_log_level_rec => p_log_level_rec);
676: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxcps','create_accounting_request_id', h_ca_request_id, p_log_level_rec);
677: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxcps','conc_request_id',
678: h_conc_request_id, p_log_level_rec => p_log_level_rec);
679: end if;
680:
681: if (h_request_id <> 0) then
1018: X_request_id := 0;
1019: end if;
1020:
1021: if (p_log_level_rec.statement_level) then
1022: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxcms','mass_request_id',
1023: h_mass_req_id, p_log_level_rec => p_log_level_rec);
1024: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxcms','status',h_dev_phase, p_log_level_rec => p_log_level_rec);
1025: end if;
1026:
1020:
1021: if (p_log_level_rec.statement_level) then
1022: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxcms','mass_request_id',
1023: h_mass_req_id, p_log_level_rec => p_log_level_rec);
1024: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxcms','status',h_dev_phase, p_log_level_rec => p_log_level_rec);
1025: end if;
1026:
1027: return(TRUE);
1028:
1094: X_request_id := 0;
1095: end if;
1096:
1097: if (p_log_level_rec.statement_level) then
1098: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxcca','create_accounting_request_id', h_ca_req_id, p_log_level_rec);
1099: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxcca','status',h_dev_phase, p_log_level_rec);
1100: end if;
1101:
1102: return(TRUE);
1095: end if;
1096:
1097: if (p_log_level_rec.statement_level) then
1098: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxcca','create_accounting_request_id', h_ca_req_id, p_log_level_rec);
1099: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxcca','status',h_dev_phase, p_log_level_rec);
1100: end if;
1101:
1102: return(TRUE);
1103:
1169: exit;
1170: end if;
1171:
1172: if (p_log_level_rec.statement_level) then
1173: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxptb','book',h_tax_book, p_log_level_rec => p_log_level_rec);
1174: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxptb','txn_status',X_txn_status, p_log_level_rec => p_log_level_rec);
1175: end if;
1176: end loop;
1177:
1170: end if;
1171:
1172: if (p_log_level_rec.statement_level) then
1173: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxptb','book',h_tax_book, p_log_level_rec => p_log_level_rec);
1174: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxptb','txn_status',X_txn_status, p_log_level_rec => p_log_level_rec);
1175: end if;
1176: end loop;
1177:
1178: close tax_cursor;
1239: where pr.concurrent_program_id = h_conc_program_id
1240: and pr.application_id = 140;
1241:
1242: if (p_log_level_rec.statement_level) then
1243: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxgcb','book',h_corp_book, p_log_level_rec => p_log_level_rec);
1244: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxgcb','mass_request_id',
1245: h_request_id, p_log_level_rec => p_log_level_rec);
1246: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxgcb','conflict',h_conflict, p_log_level_rec => p_log_level_rec);
1247: end if;
1240: and pr.application_id = 140;
1241:
1242: if (p_log_level_rec.statement_level) then
1243: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxgcb','book',h_corp_book, p_log_level_rec => p_log_level_rec);
1244: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxgcb','mass_request_id',
1245: h_request_id, p_log_level_rec => p_log_level_rec);
1246: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxgcb','conflict',h_conflict, p_log_level_rec => p_log_level_rec);
1247: end if;
1248:
1242: if (p_log_level_rec.statement_level) then
1243: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxgcb','book',h_corp_book, p_log_level_rec => p_log_level_rec);
1244: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxgcb','mass_request_id',
1245: h_request_id, p_log_level_rec => p_log_level_rec);
1246: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxgcb','conflict',h_conflict, p_log_level_rec => p_log_level_rec);
1247: end if;
1248:
1249: if (h_conflict <> 0) then -- curr program either FAMTFR or FAMAPT
1250: fa_srvr_msg.add_message(calling_fn => 'FA_CHK_BOOKSTS.PKG.faxgcb',
1471:
1472: end if;
1473:
1474: if (p_log_level_rec.statement_level) then
1475: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxsav','action',X_action, p_log_level_rec => p_log_level_rec);
1476: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxsav','savepoint',savepoint_set, p_log_level_rec => p_log_level_rec);
1477: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxsav','txn_status',X_txn_status, p_log_level_rec => p_log_level_rec);
1478: end if;
1479: return (TRUE);
1472: end if;
1473:
1474: if (p_log_level_rec.statement_level) then
1475: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxsav','action',X_action, p_log_level_rec => p_log_level_rec);
1476: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxsav','savepoint',savepoint_set, p_log_level_rec => p_log_level_rec);
1477: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxsav','txn_status',X_txn_status, p_log_level_rec => p_log_level_rec);
1478: end if;
1479: return (TRUE);
1480:
1473:
1474: if (p_log_level_rec.statement_level) then
1475: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxsav','action',X_action, p_log_level_rec => p_log_level_rec);
1476: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxsav','savepoint',savepoint_set, p_log_level_rec => p_log_level_rec);
1477: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxsav','txn_status',X_txn_status, p_log_level_rec => p_log_level_rec);
1478: end if;
1479: return (TRUE);
1480:
1481: EXCEPTION
1761: return(FALSE);
1762: end if;
1763:
1764: if (p_log_level_rec.statement_level) then
1765: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxcdr','book',X_book, p_log_level_rec);
1766: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxcdr','create_accounting_request_id',
1767: h_ca_request_id, p_log_level_rec);
1768: end if;
1769:
1762: end if;
1763:
1764: if (p_log_level_rec.statement_level) then
1765: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxcdr','book',X_book, p_log_level_rec);
1766: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxcdr','create_accounting_request_id',
1767: h_ca_request_id, p_log_level_rec);
1768: end if;
1769:
1770: if (h_ca_request_id <> 0) then
1794: if (l_return_status <> FND_API.G_RET_STS_SUCCESS) then
1795: return false;
1796: else
1797: if (p_log_level_rec.statement_level) then
1798: fa_debug_pkg.add('FA_CHK_BOOKSTS_PKG.faxcdr',
1799: 'successfully rolled back deprn','',p_log_level_rec);
1800: end if;
1801: end if;
1802: end if;