DBA Data[Home] [Help]

APPS.AP_APPROVAL_PKG dependencies on AP_HOLDS

Line 624: hold_lookup_code ap_holds_all.hold_lookup_code%type,

620: p_invoice_id IN NUMBER,
621: p_calling_sequence IN VARCHAR2);
622:
623: TYPE holds_rec_type IS RECORD (
624: hold_lookup_code ap_holds_all.hold_lookup_code%type,
625: hold_status varchar2(30),
626: invoice_id ap_holds_all.invoice_id%type,
627: hold_reason ap_holds_all.hold_reason%type,
628: release_lookup_code ap_holds_all.release_lookup_code%type,

Line 626: invoice_id ap_holds_all.invoice_id%type,

622:
623: TYPE holds_rec_type IS RECORD (
624: hold_lookup_code ap_holds_all.hold_lookup_code%type,
625: hold_status varchar2(30),
626: invoice_id ap_holds_all.invoice_id%type,
627: hold_reason ap_holds_all.hold_reason%type,
628: release_lookup_code ap_holds_all.release_lookup_code%type,
629: line_location_id ap_holds_all.line_location_id%type,
630: rcv_transaction_id ap_holds_all.rcv_transaction_id%type,

Line 627: hold_reason ap_holds_all.hold_reason%type,

623: TYPE holds_rec_type IS RECORD (
624: hold_lookup_code ap_holds_all.hold_lookup_code%type,
625: hold_status varchar2(30),
626: invoice_id ap_holds_all.invoice_id%type,
627: hold_reason ap_holds_all.hold_reason%type,
628: release_lookup_code ap_holds_all.release_lookup_code%type,
629: line_location_id ap_holds_all.line_location_id%type,
630: rcv_transaction_id ap_holds_all.rcv_transaction_id%type,
631: last_updated_by ap_holds_all.last_updated_by%type,

Line 628: release_lookup_code ap_holds_all.release_lookup_code%type,

624: hold_lookup_code ap_holds_all.hold_lookup_code%type,
625: hold_status varchar2(30),
626: invoice_id ap_holds_all.invoice_id%type,
627: hold_reason ap_holds_all.hold_reason%type,
628: release_lookup_code ap_holds_all.release_lookup_code%type,
629: line_location_id ap_holds_all.line_location_id%type,
630: rcv_transaction_id ap_holds_all.rcv_transaction_id%type,
631: last_updated_by ap_holds_all.last_updated_by%type,
632: responsibility_id ap_holds_all.responsibility_id%type);

Line 629: line_location_id ap_holds_all.line_location_id%type,

625: hold_status varchar2(30),
626: invoice_id ap_holds_all.invoice_id%type,
627: hold_reason ap_holds_all.hold_reason%type,
628: release_lookup_code ap_holds_all.release_lookup_code%type,
629: line_location_id ap_holds_all.line_location_id%type,
630: rcv_transaction_id ap_holds_all.rcv_transaction_id%type,
631: last_updated_by ap_holds_all.last_updated_by%type,
632: responsibility_id ap_holds_all.responsibility_id%type);
633:

Line 630: rcv_transaction_id ap_holds_all.rcv_transaction_id%type,

626: invoice_id ap_holds_all.invoice_id%type,
627: hold_reason ap_holds_all.hold_reason%type,
628: release_lookup_code ap_holds_all.release_lookup_code%type,
629: line_location_id ap_holds_all.line_location_id%type,
630: rcv_transaction_id ap_holds_all.rcv_transaction_id%type,
631: last_updated_by ap_holds_all.last_updated_by%type,
632: responsibility_id ap_holds_all.responsibility_id%type);
633:
634: TYPE holds_tab_type IS TABLE OF holds_rec_type INDEX BY BINARY_INTEGER;

Line 631: last_updated_by ap_holds_all.last_updated_by%type,

627: hold_reason ap_holds_all.hold_reason%type,
628: release_lookup_code ap_holds_all.release_lookup_code%type,
629: line_location_id ap_holds_all.line_location_id%type,
630: rcv_transaction_id ap_holds_all.rcv_transaction_id%type,
631: last_updated_by ap_holds_all.last_updated_by%type,
632: responsibility_id ap_holds_all.responsibility_id%type);
633:
634: TYPE holds_tab_type IS TABLE OF holds_rec_type INDEX BY BINARY_INTEGER;
635:

Line 632: responsibility_id ap_holds_all.responsibility_id%type);

628: release_lookup_code ap_holds_all.release_lookup_code%type,
629: line_location_id ap_holds_all.line_location_id%type,
630: rcv_transaction_id ap_holds_all.rcv_transaction_id%type,
631: last_updated_by ap_holds_all.last_updated_by%type,
632: responsibility_id ap_holds_all.responsibility_id%type);
633:
634: TYPE holds_tab_type IS TABLE OF holds_rec_type INDEX BY BINARY_INTEGER;
635:
636: g_holds_tab holds_tab_type;

Line 2177: FROM ap_holds H, ap_hold_codes C

2173: SELECT 'Y'
2174: INTO l_unpostable_holds_exist
2175: FROM dual
2176: WHERE EXISTS (SELECT 1
2177: FROM ap_holds H, ap_hold_codes C
2178: WHERE H.invoice_id = l_invoice_id
2179: AND H.hold_lookup_code = C.hold_lookup_code
2180: AND ((H.release_lookup_code IS NULL)
2181: AND ((C.postable_flag = 'N') OR (C.postable_flag = 'X')) AND C.user_releaseable_flag = 'N'));

Line 3646: FROM ap_holds_all

3642: IF ( p_inv_line_rec.distribution_set_id is not null) THEN
3643:
3644: SELECT hold_lookup_code
3645: INTO l_hold_code
3646: FROM ap_holds_all
3647: WHERE invoice_id = p_inv_line_rec.invoice_id
3648: AND hold_lookup_code in ('DISTRIBUTION SET INACTIVE','SKELETON DISTRIBUTION SET',
3649: 'CANNOT OVERLAY ACCOUNT','INVALID DEFAULT ACCOUNT')
3650: AND release_lookup_code IS NULL;

Line 3657: FROM ap_holds_all

3653: l_alloc_rule_type is not null ) THEN
3654:
3655: SELECT hold_lookup_code
3656: INTO l_hold_code
3657: FROM ap_holds_all
3658: WHERE invoice_id = p_inv_line_rec.invoice_id
3659: AND hold_lookup_code = 'CANNOT EXECUTE ALLOCATION'
3660: AND release_lookup_code IS NULL;
3661:

Line 3666: FROM ap_holds_all

3662: ELSE
3663:
3664: SELECT hold_lookup_code
3665: INTO l_hold_code
3666: FROM ap_holds_all
3667: WHERE invoice_id = p_inv_line_rec.invoice_id
3668: AND hold_lookup_code in ('CANNOT OVERLAY ACCOUNT','INVALID DEFAULT ACCOUNT',
3669: 'PERIOD CLOSED','PROJECT GL DATE CLOSED')
3670: AND release_lookup_code IS NULL;

Line 6023: FROM ap_holds AH,

6019: FROM ap_invoice_distributions_all AID1
6020: WHERE AID1.invoice_id = AI.invoice_id
6021: AND AID1.awt_group_id IS NOT NULL)
6022: AND NOT EXISTS (SELECT 'Unreleased System holds exist'
6023: FROM ap_holds AH,
6024: ap_hold_codes AHC
6025: WHERE AH.invoice_id = AI.invoice_id
6026: AND AH.release_lookup_code IS NULL
6027: AND AH.hold_lookup_code <> 'AWT ERROR'

Line 6113: FROM ap_holds AH,

6109: l_invoice_num
6110: FROM ap_invoices_all AI
6111: WHERE AI.invoice_id = p_invoice_id
6112: AND NOT EXISTS (SELECT 'Unreleased System holds exist'
6113: FROM ap_holds AH,
6114: ap_hold_codes AHC
6115: WHERE AH.invoice_id = AI.invoice_id
6116: AND AH.release_lookup_code IS NULL
6117: AND AH.hold_lookup_code <> 'AWT ERROR'

Line 6325: FROM ap_holds H, ap_hold_codes C

6321: WHERE match_status_flag = 'T'
6322: AND D.invoice_id = p_invoice_id
6323: AND ((NOT EXISTS
6324: (SELECT invoice_id
6325: FROM ap_holds H, ap_hold_codes C
6326: WHERE H.invoice_id = D.invoice_id
6327: AND H.hold_lookup_code = C.hold_lookup_code
6328: AND ((H.release_lookup_code IS NULL) AND
6329: ((C.postable_flag = 'N') OR

Line 6345: FROM ap_holds H, ap_hold_codes C

6341: WHERE match_status_flag = 'T'
6342: AND D.invoice_id = p_invoice_id
6343: AND ((NOT EXISTS
6344: (SELECT invoice_id
6345: FROM ap_holds H, ap_hold_codes C
6346: WHERE H.invoice_id = D.invoice_id
6347: AND H.hold_lookup_code = C.hold_lookup_code
6348: AND ((H.release_lookup_code IS NULL) AND
6349: ((C.postable_flag = 'N') OR

Line 6528: UPDATE ap_holds

6524: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_debug_loc,l_debug_info);
6525: END IF;
6526: -------------------------------------------
6527:
6528: UPDATE ap_holds
6529: SET responsibility_id = NULL
6530: WHERE invoice_id = p_invoice_id
6531: AND hold_lookup_code = 'INSUFFICIENT FUNDS';
6532:

Line 6878: l_old_wf_status AP_HOLDS_ALL.WF_STATUS%TYPE ; -- Bug 8323412

6874: l_release_lookup_code VARCHAR2(30);
6875: l_debug_loc VARCHAR2(30) := 'Release_Hold';
6876: l_curr_calling_sequence VARCHAR2(2000);
6877: l_debug_info VARCHAR2(1000);
6878: l_old_wf_status AP_HOLDS_ALL.WF_STATUS%TYPE ; -- Bug 8323412
6879: l_hold_id AP_HOLDS_ALL.HOLD_ID%TYPE ; -- Bug 8323412
6880: BEGIN
6881:
6882: l_curr_calling_sequence := 'AP_APPROVAL_PKG.'||l_debug_loc||'<-'||

Line 6879: l_hold_id AP_HOLDS_ALL.HOLD_ID%TYPE ; -- Bug 8323412

6875: l_debug_loc VARCHAR2(30) := 'Release_Hold';
6876: l_curr_calling_sequence VARCHAR2(2000);
6877: l_debug_info VARCHAR2(1000);
6878: l_old_wf_status AP_HOLDS_ALL.WF_STATUS%TYPE ; -- Bug 8323412
6879: l_hold_id AP_HOLDS_ALL.HOLD_ID%TYPE ; -- Bug 8323412
6880: BEGIN
6881:
6882: l_curr_calling_sequence := 'AP_APPROVAL_PKG.'||l_debug_loc||'<-'||
6883: p_calling_sequence;

Line 6903: l_debug_info := 'Updating AP_HOLDS with release info';

6899: l_release_lookup_code,
6900: l_curr_calling_sequence);
6901:
6902: -------------------------------------------
6903: l_debug_info := 'Updating AP_HOLDS with release info';
6904: -- Print_Debug(l_debug_loc, l_debug_info);
6905: IF g_debug_mode = 'Y' THEN
6906: AP_Debug_Pkg.Print(g_debug_mode, l_debug_info );
6907: END IF;

Line 6919: FROM ap_holds

6915: SELECT wf_status,
6916: hold_id
6917: INTO l_old_wf_status,
6918: l_hold_id
6919: FROM ap_holds
6920: WHERE invoice_id = p_invoice_id
6921: AND nvl(line_location_id, -1) = nvl(p_line_location_id, -1)
6922: AND nvl(rcv_transaction_id, -1) = nvl(rcv_transaction_id, -1)
6923: AND hold_lookup_code = p_hold_lookup_code

Line 6932: FROM ap_holds

6928: END IF ;
6929: -- Bug 8323412 ends
6930: */
6931: FOR c_wf_status IN ( SELECT hold_id
6932: FROM ap_holds
6933: WHERE invoice_id = p_invoice_id
6934: AND nvl(line_location_id, -1) = nvl(p_line_location_id, -1)
6935: AND nvl(rcv_transaction_id, -1) = nvl(rcv_transaction_id, -1)
6936: AND hold_lookup_code = p_hold_lookup_code

Line 6945: UPDATE ap_holds

6941: AP_WORKFLOW_PKG.abort_holds_workflow( c_wf_status.hold_id ) ;
6942: END LOOP ;
6943:
6944:
6945: UPDATE ap_holds
6946: SET release_lookup_code = l_release_lookup_code,
6947: release_reason = (SELECT description
6948: FROM ap_lookup_codes
6949: WHERE lookup_code = l_release_lookup_code

Line 6998: (p_table_name => 'AP_HOLDS',

6994: (p_invoice_id => p_invoice_id,
6995: p_calling_sequence => l_curr_calling_sequence);
6996:
6997: AP_DBI_PKG.Maintain_DBI_Summary
6998: (p_table_name => 'AP_HOLDS',
6999: p_operation => 'U',
7000: p_key_value1 => p_invoice_id,
7001: p_calling_sequence => l_curr_calling_sequence);
7002:

Line 7073: l_debug_info := 'Inserting Into AP_HOLDS';

7069: l_curr_calling_sequence := 'AP_APPROVAL_PKG.'||l_debug_loc||'<-'||
7070: p_calling_sequence;
7071:
7072: -------------------------------------------
7073: l_debug_info := 'Inserting Into AP_HOLDS';
7074: -- Print_Debug(l_debug_loc, l_debug_info);
7075: IF g_debug_mode = 'Y' THEN
7076: AP_Debug_Pkg.Print(g_debug_mode, l_debug_info );
7077: END IF;

Line 7084: SELECT ap_holds_s.nextval

7080: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_debug_loc,l_debug_info);
7081: END IF;
7082: -------------------------------------------
7083:
7084: SELECT ap_holds_s.nextval
7085: INTO l_hold_id
7086: FROM DUAL;
7087:
7088: --Introduced select stmt for 8691645

Line 7093: INSERT INTO ap_holds (

7089:
7090: select org_id into l_org_id
7091: from ap_invoices where invoice_id = p_invoice_id;
7092:
7093: INSERT INTO ap_holds (
7094: invoice_id,
7095: line_location_id,
7096: rcv_transaction_id,
7097: hold_lookup_code,

Line 7189: (p_table_name => 'AP_HOLDS',

7185:
7186: END IF;
7187:
7188: AP_DBI_PKG.Maintain_DBI_Summary
7189: (p_table_name => 'AP_HOLDS',
7190: p_operation => 'I',
7191: p_key_value1 => p_invoice_id,
7192: p_calling_sequence => l_curr_calling_sequence);
7193:

Line 9834: FROM AP_HOLDS_ALL H

9830: AND D2.CANCELLATION_FLAG = ''Y''
9831: )
9832: UNION ALL
9833: SELECT 1
9834: FROM AP_HOLDS_ALL H
9835: WHERE H.INVOICE_ID = AI.INVOICE_ID
9836: AND ((H.HOLD_LOOKUP_CODE IN
9837: (''QTY ORD'', ''QTY REC'', ''AMT ORD'', ''AMT REC'', ''QUALITY'',
9838: ''PRICE'', ''TAX DIFFERENCE'', ''CURRENCY DIFFERENCE'',

Line 11474: FROM ap_holds_all

11470: -- bug6783517 starts
11471: CURSOR dist_gen_holds(p_invoice_id NUMBER)
11472: IS
11473: SELECT hold_lookup_code
11474: FROM ap_holds_all
11475: WHERE hold_lookup_code IN ('DISTRIBUTION SET INACTIVE',
11476: 'SKELETON DISTRIBUTION SET',
11477: 'CANNOT OVERLAY ACCOUNT',
11478: 'INVALID DEFAULT ACCOUNT',

Line 11488: TABLE OF AP_HOLDS_ALL.HOLD_LOOKUP_CODE%TYPE

11484: AND release_lookup_code IS NULL
11485: AND invoice_id = p_invoice_id;
11486:
11487: TYPE holds_tab_type IS
11488: TABLE OF AP_HOLDS_ALL.HOLD_LOOKUP_CODE%TYPE
11489: INDEX BY BINARY_INTEGER;
11490:
11491: t_holds_tab holds_tab_type;
11492: -- bug6783517 ends

Line 11608: FROM ap_holds_all aha

11604: --Bug8820542 / 10295316
11605: BEGIN
11606: SELECT COUNT(1)
11607: INTO l_disc_chrge_line
11608: FROM ap_holds_all aha
11609: WHERE aha.invoice_id = p_invoice_rec.invoice_id
11610: AND aha.hold_lookup_code = 'CANNOT EXECUTE ALLOCATION'
11611: AND aha.release_lookup_code IS NULL
11612: AND NOT EXISTS ( SELECT 1

Line 11972: From ap_holds

11968: line_location_id,
11969: rcv_transaction_id,
11970: last_updated_by,
11971: responsibility_id
11972: From ap_holds
11973: Where invoice_id = c_invoice_id
11974: Order By 1, 2 DESC;
11975:
11976: j NUMBER := 1;

Line 12211: FROM ap_holds_all

12207:
12208: CURSOR dist_gen_holds(p_invoice_id NUMBER)
12209: IS
12210: SELECT hold_lookup_code
12211: FROM ap_holds_all
12212: WHERE hold_lookup_code IN ('DISTRIBUTION SET INACTIVE',
12213: 'SKELETON DISTRIBUTION SET',
12214: 'CANNOT OVERLAY ACCOUNT',
12215: 'INVALID DEFAULT ACCOUNT',

Line 12223: TABLE OF AP_HOLDS_ALL.HOLD_LOOKUP_CODE%TYPE

12219: AND release_lookup_code IS NULL
12220: AND invoice_id = p_invoice_id;
12221:
12222: TYPE holds_tab_type IS
12223: TABLE OF AP_HOLDS_ALL.HOLD_LOOKUP_CODE%TYPE
12224: INDEX BY BINARY_INTEGER;
12225:
12226: t_holds_tab holds_tab_type;
12227:

Line 12593: FROM ap_holds AH,

12589:
12590: l_debug_info := 'Before getting the count of unreleased fund holds';
12591: SELECT count(*)
12592: INTO l_chk_encum
12593: FROM ap_holds AH,
12594: ap_hold_codes AHC
12595: WHERE AH.invoice_id = P_invoice_id
12596: AND AH.hold_lookup_code = AHC.hold_lookup_code
12597: AND AH.release_lookup_code IS NULL