DBA Data[Home] [Help]

APPS.AP_HOLDS_PKG dependencies on AP_HOLDS

Line 1: PACKAGE BODY AP_HOLDS_PKG AS

1: PACKAGE BODY AP_HOLDS_PKG AS
2: /* $Header: apiholdb.pls 120.10.12010000.2 2008/11/12 10:46:14 kpasikan ship $ */
3:
4:
5: /* */

Line 6: G_PKG_NAME CONSTANT VARCHAR2(30) := 'AP_HOLDS_PKG';

2: /* $Header: apiholdb.pls 120.10.12010000.2 2008/11/12 10:46:14 kpasikan ship $ */
3:
4:
5: /* */
6: G_PKG_NAME CONSTANT VARCHAR2(30) := 'AP_HOLDS_PKG';
7: G_MSG_UERROR CONSTANT NUMBER := FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR;
8: G_MSG_ERROR CONSTANT NUMBER := FND_MSG_PUB.G_MSG_LVL_ERROR;
9: G_MSG_SUCCESS CONSTANT NUMBER := FND_MSG_PUB.G_MSG_LVL_SUCCESS;
10: G_MSG_HIGH CONSTANT NUMBER := FND_MSG_PUB.G_MSG_LVL_DEBUG_HIGH;

Line 22: G_MODULE_NAME CONSTANT VARCHAR2(100) := 'AP.PLSQL.AP_HOLDS_PKG.';

18: G_LEVEL_EXCEPTION CONSTANT NUMBER := FND_LOG.LEVEL_EXCEPTION;
19: G_LEVEL_EVENT CONSTANT NUMBER := FND_LOG.LEVEL_EVENT;
20: G_LEVEL_PROCEDURE CONSTANT NUMBER := FND_LOG.LEVEL_PROCEDURE;
21: G_LEVEL_STATEMENT CONSTANT NUMBER := FND_LOG.LEVEL_STATEMENT;
22: G_MODULE_NAME CONSTANT VARCHAR2(100) := 'AP.PLSQL.AP_HOLDS_PKG.';
23:
24: PROCEDURE Insert_Row(X_Rowid IN OUT NOCOPY VARCHAR2,
25: x_hold_id in out nocopy number, --5128839
26: X_Invoice_Id NUMBER,

Line 60: CURSOR C IS SELECT rowid FROM AP_HOLDS

56: X_Attribute_Category VARCHAR2,
57: X_Org_Id NUMBER,
58: X_calling_sequence IN VARCHAR2
59: ) IS
60: CURSOR C IS SELECT rowid FROM AP_HOLDS
61: WHERE invoice_id = X_Invoice_Id
62: AND ( (line_location_id = X_Line_Location_Id)
63: or (line_location_id is NULL and X_Line_Location_Id is NULL))
64: AND hold_lookup_code = X_Hold_Lookup_Code;

Line 74: current_calling_sequence := 'AP_HOLDS_PKG.INSERT_ROW<-' ||

70: BEGIN
71:
72: -- Update the calling sequence
73: --
74: current_calling_sequence := 'AP_HOLDS_PKG.INSERT_ROW<-' ||
75: X_calling_sequence;
76:
77:
78: select ap_holds_s.nextval

Line 78: select ap_holds_s.nextval

74: current_calling_sequence := 'AP_HOLDS_PKG.INSERT_ROW<-' ||
75: X_calling_sequence;
76:
77:
78: select ap_holds_s.nextval
79: into x_hold_id
80: from dual;
81:
82: debug_info := 'Insert into AP_HOLDS';

Line 82: debug_info := 'Insert into AP_HOLDS';

78: select ap_holds_s.nextval
79: into x_hold_id
80: from dual;
81:
82: debug_info := 'Insert into AP_HOLDS';
83: INSERT INTO AP_HOLDS(
84: hold_id,
85: invoice_id,
86: line_location_id,

Line 83: INSERT INTO AP_HOLDS(

79: into x_hold_id
80: from dual;
81:
82: debug_info := 'Insert into AP_HOLDS';
83: INSERT INTO AP_HOLDS(
84: hold_id,
85: invoice_id,
86: line_location_id,
87: hold_lookup_code,

Line 173: (p_table_name => 'AP_HOLDS',

169: END IF;
170:
171: --Bug 4539462 DBI logging
172: AP_DBI_PKG.Maintain_DBI_Summary
173: (p_table_name => 'AP_HOLDS',
174: p_operation => 'I',
175: p_key_value1 => X_invoice_id,
176: p_calling_sequence => current_calling_sequence);
177:

Line 242: FROM AP_HOLDS

238: X_calling_sequence IN VARCHAR2
239: ) IS
240: CURSOR C IS
241: SELECT *
242: FROM AP_HOLDS
243: WHERE rowid = X_Rowid
244: FOR UPDATE of Invoice_Id NOWAIT;
245: Recinfo C%ROWTYPE;
246: current_calling_sequence VARCHAR2(2000);

Line 253: current_calling_sequence := 'AP_HOLDS_PKG.LOCK_ROW<-' ||

249:
250: BEGIN
251: -- Update the calling sequence
252: --
253: current_calling_sequence := 'AP_HOLDS_PKG.LOCK_ROW<-' ||
254: X_calling_sequence;
255: debug_info := 'Open cursor C';
256: OPEN C;
257: debug_info := 'Fetch cursor C';

Line 420: current_calling_sequence := 'AP_HOLDS_PKG.UPDATE_ROW<-' ||

416:
417: BEGIN
418: -- Update the calling sequence
419: --
420: current_calling_sequence := 'AP_HOLDS_PKG.UPDATE_ROW<-' ||
421: X_calling_sequence;
422: debug_info := 'Update AP_HOLDS';
423: UPDATE AP_HOLDS
424: SET

Line 422: debug_info := 'Update AP_HOLDS';

418: -- Update the calling sequence
419: --
420: current_calling_sequence := 'AP_HOLDS_PKG.UPDATE_ROW<-' ||
421: X_calling_sequence;
422: debug_info := 'Update AP_HOLDS';
423: UPDATE AP_HOLDS
424: SET
425: invoice_id = X_Invoice_Id,
426: line_location_id = X_Line_Location_Id,

Line 423: UPDATE AP_HOLDS

419: --
420: current_calling_sequence := 'AP_HOLDS_PKG.UPDATE_ROW<-' ||
421: X_calling_sequence;
422: debug_info := 'Update AP_HOLDS';
423: UPDATE AP_HOLDS
424: SET
425: invoice_id = X_Invoice_Id,
426: line_location_id = X_Line_Location_Id,
427: hold_lookup_code = X_Hold_Lookup_Code,

Line 461: (p_table_name => 'AP_HOLDS',

457: WHERE rowid = X_Rowid;
458:
459: --Bug 4539462 DBI logging
460: AP_DBI_PKG.Maintain_DBI_Summary
461: (p_table_name => 'AP_HOLDS',
462: p_operation => 'U',
463: p_key_value1 => X_invoice_id,
464: p_calling_sequence => current_calling_sequence);
465:

Line 570: current_calling_sequence := 'AP_HOLDS_PKG.DELETE_ROW<-' ||

566:
567: BEGIN
568: -- Update the calling sequence
569: --
570: current_calling_sequence := 'AP_HOLDS_PKG.DELETE_ROW<-' ||
571: X_calling_sequence;
572:
573: --Bug 4539462 Need the invoice_id
574: Select invoice_id

Line 576: From ap_holds

572:
573: --Bug 4539462 Need the invoice_id
574: Select invoice_id
575: Into l_invoice_id
576: From ap_holds
577: Where rowid = X_Rowid;
578:
579: debug_info := 'Delete from AP_HOLDS';
580: DELETE FROM AP_HOLDS

Line 579: debug_info := 'Delete from AP_HOLDS';

575: Into l_invoice_id
576: From ap_holds
577: Where rowid = X_Rowid;
578:
579: debug_info := 'Delete from AP_HOLDS';
580: DELETE FROM AP_HOLDS
581: WHERE rowid = X_Rowid;
582:
583: if (SQL%NOTFOUND) then

Line 580: DELETE FROM AP_HOLDS

576: From ap_holds
577: Where rowid = X_Rowid;
578:
579: debug_info := 'Delete from AP_HOLDS';
580: DELETE FROM AP_HOLDS
581: WHERE rowid = X_Rowid;
582:
583: if (SQL%NOTFOUND) then
584: Raise NO_DATA_FOUND;

Line 589: (p_table_name => 'AP_HOLDS',

585: end if;
586:
587: --Bug 4539462 DBI logging
588: AP_DBI_PKG.Maintain_DBI_Summary
589: (p_table_name => 'AP_HOLDS',
590: p_operation => 'D',
591: p_key_value1 => l_invoice_id,
592: p_calling_sequence => current_calling_sequence);
593:

Line 609: -- the AP_HOLDS table given a record in ap_invoices.

605: END Delete_Row;
606:
607: -----------------------------------------------------------------------
608: -- PROCEDURE insert_single_hold inserts a single record into
609: -- the AP_HOLDS table given a record in ap_invoices.
610: -----------------------------------------------------------------------
611: PROCEDURE insert_single_hold (X_invoice_id IN number,
612: X_hold_lookup_code IN varchar2,
613: X_hold_type IN varchar2 DEFAULT NULL,

Line 620: l_hold_reason ap_holds.hold_reason%TYPE; --bug 1188566

616: X_calling_sequence IN varchar2 DEFAULT NULL)
617: IS
618: current_calling_sequence VARCHAR2(2000);
619: debug_info VARCHAR2(100);
620: l_hold_reason ap_holds.hold_reason%TYPE; --bug 1188566
621:
622: cursor hold_cursor is
623: select description
624: from ap_hold_codes

Line 629: l_hold_id ap_holds_all.hold_id%type;

625: where hold_type = nvl(X_hold_type,hold_type)
626: and hold_lookup_code = X_hold_lookup_code;
627:
628: l_api_name varchar2(50);
629: l_hold_id ap_holds_all.hold_id%type;
630:
631: BEGIN
632:
633: -- Update the calling sequence

Line 636: 'AP_HOLDS_PKG.insert_single_hold<-'||

632:
633: -- Update the calling sequence
634: --
635: current_calling_sequence :=
636: 'AP_HOLDS_PKG.insert_single_hold<-'||
637: X_calling_sequence;
638: l_api_name := 'Insert_Single_Hold';
639:
640: -- If no hold_code was passed to the procedure, abort the call

Line 668: debug_info := 'Insert into AP_HOLDS';

664: else
665: l_hold_reason := X_hold_reason;
666: end if;
667:
668: debug_info := 'Insert into AP_HOLDS';
669: IF (G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL) THEN
670: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name,debug_info);
671: END IF;
672:

Line 674: SELECT ap_holds_s.nextval

670: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name,debug_info);
671: END IF;
672:
673: --bugfix:5523240
674: SELECT ap_holds_s.nextval
675: INTO l_hold_id
676: FROM DUAL;
677:
678: INSERT INTO AP_HOLDS

Line 678: INSERT INTO AP_HOLDS

674: SELECT ap_holds_s.nextval
675: INTO l_hold_id
676: FROM DUAL;
677:
678: INSERT INTO AP_HOLDS
679: (INVOICE_ID, HOLD_LOOKUP_CODE, HOLD_DATE,
680: CREATED_BY, CREATION_DATE, LAST_UPDATE_LOGIN,
681: LAST_UPDATE_DATE, LAST_UPDATED_BY,
682: HELD_BY, HOLD_REASON, ORG_ID, HOLD_ID)

Line 697: FROM ap_holds

693: FROM ap_invoices
694: WHERE invoice_id = X_invoice_id
695: AND not exists
696: (SELECT 'Already on this hold'
697: FROM ap_holds
698: WHERE invoice_id = X_invoice_id
699: AND hold_lookup_code = X_hold_lookup_code
700: AND release_lookup_code IS NULL);
701:

Line 704: (p_table_name => 'AP_HOLDS',

700: AND release_lookup_code IS NULL);
701:
702: --Bug 4539462 DBI logging
703: AP_DBI_PKG.Maintain_DBI_Summary
704: (p_table_name => 'AP_HOLDS',
705: p_operation => 'I',
706: p_key_value1 => X_invoice_id,
707: p_calling_sequence => current_calling_sequence);
708:

Line 733: -- record in AP_HOLDS with a release_lookup_code

729: END insert_single_hold;
730:
731: -----------------------------------------------------------------------
732: -- PROCEDURE release_single_hold releases a hold by updating a single
733: -- record in AP_HOLDS with a release_lookup_code
734: -----------------------------------------------------------------------
735: PROCEDURE release_single_hold (X_invoice_id IN number,
736: X_hold_lookup_code IN varchar2,
737: X_release_lookup_code IN varchar2,

Line 758: 'AP_HOLDS_PKG.release_single_hold<-'||

754:
755: -- Update the calling sequence
756: --
757: current_calling_sequence :=
758: 'AP_HOLDS_PKG.release_single_hold<-'||
759: X_calling_sequence;
760:
761: debug_info := 'Select from AP_INVOICES';
762:

Line 767: debug_info := 'Update AP_HOLDS';

763: open invoice_who_cursor;
764: fetch invoice_who_cursor into l_last_updated_by, l_last_update_login;
765: close invoice_who_cursor;
766:
767: debug_info := 'Update AP_HOLDS';
768:
769: UPDATE ap_holds
770: SET release_lookup_code = X_release_lookup_code,
771: release_reason = (SELECT description

Line 769: UPDATE ap_holds

765: close invoice_who_cursor;
766:
767: debug_info := 'Update AP_HOLDS';
768:
769: UPDATE ap_holds
770: SET release_lookup_code = X_release_lookup_code,
771: release_reason = (SELECT description
772: FROM ap_lookup_codes
773: WHERE lookup_type = 'HOLD CODE'

Line 785: (p_table_name => 'AP_HOLDS',

781: AND hold_lookup_code = X_hold_lookup_code;
782:
783: --Bug 4539462 DBI logging
784: AP_DBI_PKG.Maintain_DBI_Summary
785: (p_table_name => 'AP_HOLDS',
786: p_operation => 'U',
787: p_key_value1 => X_invoice_id,
788: p_calling_sequence => current_calling_sequence);
789:

Line 845: from ap_holds

841: where invoice_id = X_invoice_id;
842:
843: cursor tax_holds_cursor is
844: select hold_lookup_code
845: from ap_holds
846: where invoice_id = x_invoice_id
847: and hold_lookup_code IN ('TAX AMOUNT RANGE','TAX VARIANCE')
848: and release_lookup_code IS NULL;
849:

Line 855: 'AP_HOLDS_PKG.quick_release<-'||

851:
852: -- Update the calling sequence
853: --
854: current_calling_sequence :=
855: 'AP_HOLDS_PKG.quick_release<-'||
856: X_calling_sequence;
857:
858: FOR num IN 1..10 LOOP
859: l_tax_hold_codes(num) := NULL;

Line 873: FROM AP_HOLDS H

869: WHERE D.invoice_id = X_invoice_id
870: AND ((X_hold_lookup_code = 'CANT CLOSE PO') OR
871: ((X_hold_lookup_code = 'ALL')
872: AND EXISTS(SELECT 'X'
873: FROM AP_HOLDS H
874: WHERE H.invoice_id = X_invoice_id
875: AND H.hold_lookup_code = 'CANT CLOSE PO'
876: AND H.release_lookup_code IS NULL)));
877:

Line 890: debug_info := 'Update AP_HOLDS';

886: ------------------------------------------------------------------------
887: -- Release single hold if pass hold_lookup_code or all holds if pass 'ALL'
888: -- in hold_lookup_code
889: ------------------------------------------------------------------------
890: debug_info := 'Update AP_HOLDS';
891:
892: UPDATE ap_holds H
893: SET H.release_lookup_code = X_release_lookup_code,
894: H.release_reason = X_release_reason,

Line 892: UPDATE ap_holds H

888: -- in hold_lookup_code
889: ------------------------------------------------------------------------
890: debug_info := 'Update AP_HOLDS';
891:
892: UPDATE ap_holds H
893: SET H.release_lookup_code = X_release_lookup_code,
894: H.release_reason = X_release_reason,
895: H.responsibility_id = X_responsibility_id,
896: H.last_update_date = X_last_update_date,

Line 908: (p_table_name => 'AP_HOLDS',

904: AND H.release_lookup_code is null;
905:
906: --Bug 4539462 DBI logging
907: AP_DBI_PKG.Maintain_DBI_Summary
908: (p_table_name => 'AP_HOLDS',
909: p_operation => 'U',
910: p_key_value1 => X_invoice_id,
911: p_calling_sequence => current_calling_sequence);
912:

Line 1009: END AP_HOLDS_PKG;

1005:
1006:
1007:
1008:
1009: END AP_HOLDS_PKG;
1010: