1: PACKAGE BODY po_core_s3 AS
2: /* $Header: POXCOC3B.pls 120.2.12020000.9 2013/05/02 11:42:52 inagdeo ship $*/
3:
4: /*===========================================================================
5:
168: RETURN l_umb_prog_name;
169:
170: EXCEPTION
171: WHEN OTHERS THEN
172: po_message_s.sql_error('po_core_s3.get_umb_prog_name', l_progress, SQLCODE);
173: RAISE;
174: END get_umb_prog_name;
175:
176: /*===========================================================================
196:
197: RETURN l_fon_name;
198: EXCEPTION
199: WHEN OTHERS THEN
200: po_message_s.sql_error('po_core_s3.get_fon_name', l_progress, SQLCODE);
201: RAISE;
202: END get_fon_name;
203: /*===========================================================================
204: FUNCTION NAME: get_umb_prog_id()
223:
224: RETURN l_umb_prog_id ;
225: EXCEPTION
226: WHEN OTHERS THEN
227: po_message_s.sql_error('po_core_s3.get_umb_prog_id', l_progress, SQLCODE);
228: RAISE;
229: END get_umb_prog_id;
230: -- Procedure used to get values from global table of type object_po_special_contract_tbl
231: PROCEDURE get_spec_cont_type_rules(
301: IS
302: l_key number;
303: BEGIN
304: -- pick a new key for temp table
305: l_key := PO_CORE_S.get_session_gt_nextval;
306: -- insert into temp table distribution_id with required payment_sequence to be updated.
307: IF p_line_id IS NULL THEN
308: -- payment instr code is from header level.
309: IF p_payment_instr_code = 'SEQ_ACRN_ORDER' THEN
348: rec.seq_num
349: FROM po_distributions_all pd,
350: (SELECT fiscal_year,
351: rownum AS seq_num
352: FROM (SELECT DISTINCT PO_CORE_S3.get_fiscal_year_from_ccid(set_of_books_id, code_combination_id) as fiscal_year
353: FROM po_distributions_all
354: WHERE po_header_id = p_po_header_id
355: ORDER BY fiscal_year)) rec
356: WHERE PO_CORE_S3.get_fiscal_year_from_ccid(pd.set_of_books_id, pd.code_combination_id) = rec.fiscal_year
352: FROM (SELECT DISTINCT PO_CORE_S3.get_fiscal_year_from_ccid(set_of_books_id, code_combination_id) as fiscal_year
353: FROM po_distributions_all
354: WHERE po_header_id = p_po_header_id
355: ORDER BY fiscal_year)) rec
356: WHERE PO_CORE_S3.get_fiscal_year_from_ccid(pd.set_of_books_id, pd.code_combination_id) = rec.fiscal_year
357: AND pd.po_header_id = p_po_header_id;
358:
359: ELSIF p_payment_instr_code = 'BY_CANCELLATION_DATE' THEN
360:
367: rec.seq_num
368: FROM po_distributions_all pd,
369: (SELECT cancellation_date,
370: rownum AS seq_num
371: FROM (SELECT DISTINCT PO_CORE_S3.get_ccid_cancellation_date(set_of_books_id, code_combination_id) as cancellation_date
372: FROM po_distributions_all
373: WHERE po_header_id = p_po_header_id
374: ORDER BY cancellation_date)) rec
375: WHERE PO_CORE_S3.get_ccid_cancellation_date(pd.set_of_books_id, pd.code_combination_id)= rec.cancellation_date
371: FROM (SELECT DISTINCT PO_CORE_S3.get_ccid_cancellation_date(set_of_books_id, code_combination_id) as cancellation_date
372: FROM po_distributions_all
373: WHERE po_header_id = p_po_header_id
374: ORDER BY cancellation_date)) rec
375: WHERE PO_CORE_S3.get_ccid_cancellation_date(pd.set_of_books_id, pd.code_combination_id)= rec.cancellation_date
376: AND pd.po_header_id = p_po_header_id;
377:
378: END IF; -- for payment_instr_code
379:
423: rec.seq_num
424: FROM po_distributions_all pd,
425: (SELECT fiscal_year,
426: rownum AS seq_num
427: FROM (SELECT DISTINCT PO_CORE_S3.get_fiscal_year_from_ccid(set_of_books_id, code_combination_id) as fiscal_year
428: FROM po_distributions_all
429: WHERE po_header_id = p_po_header_id
430: AND po_line_id = p_line_id
431: ORDER BY fiscal_year )) rec
428: FROM po_distributions_all
429: WHERE po_header_id = p_po_header_id
430: AND po_line_id = p_line_id
431: ORDER BY fiscal_year )) rec
432: WHERE PO_CORE_S3.get_fiscal_year_from_ccid(pd.set_of_books_id, pd.code_combination_id) = rec.fiscal_year
433: AND pd.po_line_id = p_line_id
434: AND pd.po_header_id = p_po_header_id;
435:
436: ELSIF p_payment_instr_code = 'BY_CANCELLATION_DATE' THEN
444: rec.seq_num
445: FROM po_distributions_all pd,
446: (SELECT cancellation_date,
447: rownum AS seq_num
448: FROM (SELECT DISTINCT PO_CORE_S3.get_ccid_cancellation_date(set_of_books_id, code_combination_id) as cancellation_date
449: FROM po_distributions_all
450: WHERE po_header_id = p_po_header_id
451: AND po_line_id = p_line_id
452: ORDER BY cancellation_date)) rec
449: FROM po_distributions_all
450: WHERE po_header_id = p_po_header_id
451: AND po_line_id = p_line_id
452: ORDER BY cancellation_date)) rec
453: WHERE PO_CORE_S3.get_ccid_cancellation_date(pd.set_of_books_id, pd.code_combination_id) = rec.cancellation_date
454: AND pd.po_line_id = p_line_id
455: AND pd.po_header_id = p_po_header_id;
456:
457:
560:
561: IF x_return_status = '0' THEN
562: RETURN x_fiscal_year;
563: ELSE
564: RAISE PO_CORE_S.g_early_return_exc;
565: END IF;
566: EXCEPTION
567: WHEN PO_CORE_S.g_early_return_exc THEN
568: IF (x_return_status = '-1') THEN
563: ELSE
564: RAISE PO_CORE_S.g_early_return_exc;
565: END IF;
566: EXCEPTION
567: WHEN PO_CORE_S.g_early_return_exc THEN
568: IF (x_return_status = '-1') THEN
569: IF (PO_LOG.d_exc) THEN
570: PO_LOG.exc('PO_CORE_S3.get_fiscal_year_from_ccid', '000', x_return_msg);
571: END IF;
566: EXCEPTION
567: WHEN PO_CORE_S.g_early_return_exc THEN
568: IF (x_return_status = '-1') THEN
569: IF (PO_LOG.d_exc) THEN
570: PO_LOG.exc('PO_CORE_S3.get_fiscal_year_from_ccid', '000', x_return_msg);
571: END IF;
572: END IF;
573: RETURN null;
574: END get_fiscal_year_from_ccid;
598:
599: IF x_return_status = '0' THEN
600: RETURN x_fund_cancellation_date;
601: ELSE
602: RAISE PO_CORE_S.g_early_return_exc;
603: END IF;
604: EXCEPTION
605: WHEN PO_CORE_S.g_early_return_exc THEN
606: IF (x_return_status = '-1') THEN
601: ELSE
602: RAISE PO_CORE_S.g_early_return_exc;
603: END IF;
604: EXCEPTION
605: WHEN PO_CORE_S.g_early_return_exc THEN
606: IF (x_return_status = '-1') THEN
607: IF (PO_LOG.d_exc) THEN
608: PO_LOG.exc('PO_CORE_S3.get_ccid_cancellation_date', '000', x_return_msg);
609: END IF;
604: EXCEPTION
605: WHEN PO_CORE_S.g_early_return_exc THEN
606: IF (x_return_status = '-1') THEN
607: IF (PO_LOG.d_exc) THEN
608: PO_LOG.exc('PO_CORE_S3.get_ccid_cancellation_date', '000', x_return_msg);
609: END IF;
610: END IF;
611: RETURN null;
612: END get_ccid_cancellation_date;
639:
640: IF x_return_status = '0' THEN
641: RETURN x_non_annual_fund_flag;
642: ELSE
643: RAISE PO_CORE_S.g_early_return_exc;
644: END IF;
645:
646: EXCEPTION
647:
644: END IF;
645:
646: EXCEPTION
647:
648: WHEN PO_CORE_S.g_early_return_exc THEN
649: IF (x_return_status = '-1') THEN
650: IF (PO_LOG.d_exc) THEN
651: PO_LOG.exc('PO_CORE_S3.is_non_annual_fund', '000', x_return_msg);
652: END IF;
647:
648: WHEN PO_CORE_S.g_early_return_exc THEN
649: IF (x_return_status = '-1') THEN
650: IF (PO_LOG.d_exc) THEN
651: PO_LOG.exc('PO_CORE_S3.is_non_annual_fund', '000', x_return_msg);
652: END IF;
653: END IF;
654: RETURN null;
655:
681: EXCEPTION
682:
683: WHEN OTHERS THEN
684: IF (PO_LOG.d_exc) THEN
685: PO_LOG.exc('PO_CORE_S3.get_fiscal_year_end_date', '000', sqlerrm);
686: END IF;
687: RETURN NULL;
688:
689: END get_fiscal_year;
807: g_object_special_contract_tbl('OBLIGATION_DOC').EXEMPTION_REASON := 'INTER_AGENCY_TRANSFER';
808: g_object_special_contract_tbl('OBLIGATION_DOC').CCR_EXCEPTION_REASON := 'NA';
809: g_object_special_contract_tbl('OBLIGATION_DOC').BYPASS_SGD_GENERATION := 'Y';
810:
811: END PO_CORE_S3;