DBA Data[Home] [Help]

APPS.AP_IMPORT_INVOICES_PKG dependencies on AP_INVOICES_INTERFACE

Line 18: where entity_name = 'AP_INVOICES_INTERFACE'

14: BEGIN
15: select count(1)
16: into l_attachments_count
17: from fnd_attached_documents
18: where entity_name = 'AP_INVOICES_INTERFACE'
19: and pk1_value = p_invoice_id;
20:
21: -- only delete if there is an attachment
22: if ( l_attachments_count > 0 ) then

Line 26: X_entity_name => 'AP_INVOICES_INTERFACE',

22: if ( l_attachments_count > 0 ) then
23: -- assuming deleting only the association with related documents
24: -- need to see if that's always the case
25: fnd_attached_documents2_pkg.delete_attachments(
26: X_entity_name => 'AP_INVOICES_INTERFACE',
27: X_pk1_value => p_invoice_id,
28: X_delete_document_flag => 'N' );
29: end if;
30: return l_attachments_count;

Line 243: FROM ap_invoices_interface

239: REMIT_TO_SUPPLIER_SITE,
240: REMIT_TO_SUPPLIER_SITE_ID,
241: RELATIONSHIP_ID,
242: REMIT_TO_SUPPLIER_NUM
243: FROM ap_invoices_interface
244: WHERE ((status is NULL) OR (status = 'REJECTED'))
245: AND source = p_source
246: AND ((p_invoice_interface_id IS NULL AND
247: NVL(invoice_type_lookup_code, 'STANDARD') <> 'PAYMENT REQUEST')

Line 424: FROM ap_invoices_interface

420: REMIT_TO_SUPPLIER_SITE,
421: REMIT_TO_SUPPLIER_SITE_ID,
422: RELATIONSHIP_ID,
423: REMIT_TO_SUPPLIER_NUM
424: FROM ap_invoices_interface
425: WHERE ((status is NULL) OR (status = 'REJECTED'))
426: AND source = p_source
427: AND group_id = p_group_id
428: AND ((p_invoice_interface_id IS NULL AND

Line 604: AP_IMPORT_INVOICES_PKG.g_invoices_table := 'AP_INVOICES_INTERFACE';

600: AP_IMPORT_INVOICES_PKG.g_invoices_table := 'AP_PPA_INVOICES_GT';
601: AP_IMPORT_INVOICES_PKG.g_invoice_lines_table := 'AP_PPA_INVOICE_LINES_GT';
602: AP_IMPORT_INVOICES_PKG.g_instructions_table := 'AP_PPA_INSTRUCTIONS_GT';
603: ELSE
604: AP_IMPORT_INVOICES_PKG.g_invoices_table := 'AP_INVOICES_INTERFACE';
605: AP_IMPORT_INVOICES_PKG.g_invoice_lines_table := 'AP_INVOICE_LINES_INTERFACE';
606: AP_IMPORT_INVOICES_PKG.g_instructions_table := NULL;
607: END IF;
608:

Line 791: FROM ap_invoices_interface

787: -- different select stmts based on the parameter p_group_id
788: IF (p_group_id IS NULL) THEN
789: SELECT invoice_id
790: BULK COLLECT INTO enums
791: FROM ap_invoices_interface
792: WHERE ((status is NULL) or (status = 'REJECTED'))
793: AND source = p_source
794: AND ((p_invoice_interface_id IS NULL AND
795: NVL(invoice_type_lookup_code, 'STANDARD') <> 'PAYMENT REQUEST')

Line 811: FROM ap_invoices_interface

807: org_id is NULL));
808: ELSE
809: SELECT invoice_id
810: BULK COLLECT INTO enums
811: FROM ap_invoices_interface
812: WHERE ((status is NULL) or (status = 'REJECTED'))
813: AND source = p_source
814: AND group_id = p_group_id
815: AND ((p_invoice_interface_id IS NULL AND

Line 845: WHERE parent_table = 'AP_INVOICES_INTERFACE'

841: IF enums.COUNT > 0 THEN
842:
843: ForALL i IN enums.FIRST .. enums.LAST
844: DELETE FROM ap_interface_rejections
845: WHERE parent_table = 'AP_INVOICES_INTERFACE'
846: AND parent_id = enums(i);
847:
848: ForALL i IN enums.FIRST .. enums.LAST
849: DELETE FROM ap_interface_rejections

Line 865: UPDATE AP_INVOICES_INTERFACE

861: END IF;
862:
863: IF enums.COUNT > 0 THEN
864: ForALL i IN enums.FIRST .. enums.LAST
865: UPDATE AP_INVOICES_INTERFACE
866: SET request_id = AP_IMPORT_INVOICES_PKG.g_conc_request_id
867: WHERE invoice_id = enums(i);
868: END IF;
869: --End of Bug 6801046

Line 892: UPDATE ap_invoices_interface i

888: --Bug 6839034 Added additional filters to the update below
889: -- Coding 2 different update stmts based on p_group_id to improve performance
890:
891: IF (p_group_id IS NULL) THEN
892: UPDATE ap_invoices_interface i
893: SET org_id = (SELECT hr.organization_id org_id
894: FROM hr_operating_units hr,
895: per_business_groups per
896: WHERE hr.business_group_id = per.business_group_id

Line 911: UPDATE ap_invoices_interface i

907:
908: --Bug 6839034 Added ELSE part
909: ELSE
910:
911: UPDATE ap_invoices_interface i
912: SET org_id = (SELECT hr.organization_id org_id
913: FROM hr_operating_units hr,
914: per_business_groups per
915: WHERE hr.business_group_id = per.business_group_id

Line 959: FROM ap_invoices_interface

955: IF (p_group_id IS NULL) THEN
956: BEGIN
957: SELECT count(*)
958: INTO l_total_count
959: FROM ap_invoices_interface
960: WHERE ((status is NULL) or (status = 'REJECTED'))
961: AND source = p_source
962: AND ((p_invoice_interface_id IS NULL AND
963: NVL(invoice_type_lookup_code, 'STANDARD') <> 'PAYMENT REQUEST')

Line 991: FROM ap_invoices_interface

987: ELSE
988: BEGIN
989: SELECT count(*)
990: INTO l_total_count
991: FROM ap_invoices_interface
992: WHERE ((status is NULL) or (status = 'REJECTED'))
993: AND source = p_source
994: AND group_id = p_group_id
995: AND ((p_invoice_interface_id IS NULL AND

Line 1247: UPDATE ap_invoices_interface

1243: l_null_org_id := TRUE;
1244:
1245: ELSIF (l_ou_count = 1 AND p_org_id is NULL) THEN
1246:
1247: UPDATE ap_invoices_interface
1248: SET org_id = l_default_org_id
1249: WHERE invoice_id = l_invoice_rec.invoice_id ;
1250:
1251: l_invoice_rec.org_id := l_default_org_id;

Line 1257: UPDATE ap_invoices_interface

1253: l_null_org_id := TRUE;
1254:
1255: ELSIF (p_org_id is NOT NULL) THEN
1256:
1257: UPDATE ap_invoices_interface
1258: SET org_id = p_org_id
1259: WHERE invoice_id = l_invoice_rec.invoice_id ;
1260:
1261: l_invoice_rec.org_id := p_org_id;

Line 2981: -- Update temporary status in ap_invoices_interface for all invoices

2977: END LOOP; -- invoice group LOOP
2978:
2979: ----------------------------------------------------------------------
2980: -- Step 21
2981: -- Update temporary status in ap_invoices_interface for all invoices
2982: -- FROM 'PROCESSING' to 'PROCESSED' AND,
2983: -- 'REJECTING' to 'REJECTED'
2984: ----------------------------------------------------------------------
2985:

Line 3121: FROM ap_invoices_interface

3117: -- Removed the p_group_id where clause and added it to the cursor
3118: -- purge_invoices_group
3119: CURSOR purge_invoices IS
3120: SELECT invoice_id
3121: FROM ap_invoices_interface
3122: WHERE source = p_source
3123: AND status = 'PROCESSED'
3124: AND ((p_commit_cycles IS NULL) OR
3125: (ROWNUM <= p_commit_cycles))

Line 3141: FROM ap_invoices_interface

3137: invoice_num;
3138:
3139: CURSOR purge_invoices_group IS
3140: SELECT invoice_id
3141: FROM ap_invoices_interface
3142: WHERE source = p_source
3143: AND group_id = p_group_id
3144: AND status = 'PROCESSED'
3145: AND ((p_commit_cycles IS NULL) OR

Line 3188: FROM ap_invoices_interface

3184: IF p_group_id IS NULL THEN
3185: BEGIN
3186: SELECT count(*)
3187: INTO l_total_count
3188: FROM ap_invoices_interface
3189: WHERE source = p_source
3190: AND status = 'PROCESSED'
3191: AND ( (org_id IS NOT NULL AND
3192: p_org_id IS NOT NULL AND

Line 3207: FROM ap_invoices_interface

3203: ELSE
3204: BEGIN
3205: SELECT count(*)
3206: INTO l_total_count
3207: FROM ap_invoices_interface
3208: WHERE source = p_source
3209: AND group_id = p_group_id
3210: AND status = 'PROCESSED'
3211: AND ( (org_id IS NOT NULL AND

Line 3294: -- Step 4, Delete records for ap_invoices_interface

3290: DELETE FROM AP_INVOICE_LINES_INTERFACE
3291: WHERE invoice_id = l_invoice_id;
3292:
3293: ------------------------------------------------------------------------
3294: -- Step 4, Delete records for ap_invoices_interface
3295: -- Only one line
3296: ------------------------------------------------------------------------
3297: -- also delete attachments if any
3298: debug_info := '(Import_purge 4.1) Delete attachments if any...';

Line 3323: 'ap_invoices_interface...';

3319: END IF;
3320:
3321: -- delete the invoice_interface record now
3322: debug_info := '(Import_purge 4) Delete records in ' ||
3323: 'ap_invoices_interface...';
3324: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
3325: AP_IMPORT_UTILITIES_PKG.Print(
3326: AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
3327: END IF;

Line 3329: DELETE FROM AP_INVOICES_INTERFACE

3325: AP_IMPORT_UTILITIES_PKG.Print(
3326: AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
3327: END IF;
3328:
3329: DELETE FROM AP_INVOICES_INTERFACE
3330: WHERE invoice_id = l_invoice_id
3331: AND ( (org_id IS NOT NULL AND
3332: p_org_id IS NOT NULL AND
3333: org_id = p_org_id)

Line 3424: TYPE headerlist IS TABLE OF ap_invoices_interface.invoice_id%TYPE;

3420: FUNCTION XML_IMPORT_PURGE(
3421: p_group_id IN VARCHAR2,
3422: p_calling_sequence IN VARCHAR2) RETURN BOOLEAN IS
3423:
3424: TYPE headerlist IS TABLE OF ap_invoices_interface.invoice_id%TYPE;
3425:
3426: h_list HEADERLIST;
3427: current_calling_sequence VARCHAR2(2000);
3428: debug_info VARCHAR2(500); /* Bug 4166583 */

Line 3448: FROM ap_invoices_interface h,

3444: -- different select stmts based on the parameter p_group_id
3445: IF (p_group_id IS NULL) THEN
3446: SELECT h.invoice_id BULK COLLECT
3447: INTO h_list
3448: FROM ap_invoices_interface h,
3449: ap_invoice_lines_interface l,
3450: ap_interface_rejections r
3451: WHERE DECODE(r.parent_table, 'AP_INVOICES_INTERFACE',
3452: h.invoice_id,

Line 3451: WHERE DECODE(r.parent_table, 'AP_INVOICES_INTERFACE',

3447: INTO h_list
3448: FROM ap_invoices_interface h,
3449: ap_invoice_lines_interface l,
3450: ap_interface_rejections r
3451: WHERE DECODE(r.parent_table, 'AP_INVOICES_INTERFACE',
3452: h.invoice_id,
3453: 'AP_INVOICE_LINES_INTERFACE', l.invoice_line_id)
3454: = r.parent_id
3455: AND h.invoice_id = l.invoice_id

Line 3468: FROM ap_invoices_interface h,

3464: GROUP BY h.invoice_id;
3465: ELSE
3466: SELECT h.invoice_id BULK COLLECT
3467: INTO h_list
3468: FROM ap_invoices_interface h,
3469: ap_invoice_lines_interface l,
3470: ap_interface_rejections r
3471: WHERE DECODE(r.parent_table, 'AP_INVOICES_INTERFACE',
3472: h.invoice_id,

Line 3471: WHERE DECODE(r.parent_table, 'AP_INVOICES_INTERFACE',

3467: INTO h_list
3468: FROM ap_invoices_interface h,
3469: ap_invoice_lines_interface l,
3470: ap_interface_rejections r
3471: WHERE DECODE(r.parent_table, 'AP_INVOICES_INTERFACE',
3472: h.invoice_id,
3473: 'AP_INVOICE_LINES_INTERFACE', l.invoice_line_id)
3474: = r.parent_id
3475: AND h.invoice_id = l.invoice_id

Line 3505: AND r.parent_table = 'AP_INVOICES_INTERFACE';

3501:
3502: FORALL i IN nvl(h_list.FIRST,0) .. nvl(h_list.LAST,-1)
3503: DELETE FROM ap_interface_rejections r
3504: WHERE r.parent_id = h_list(i)
3505: AND r.parent_table = 'AP_INVOICES_INTERFACE';
3506:
3507: debug_info := '(XML Import Purge 3) before deleting line rejections';
3508: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
3509: AP_IMPORT_UTILITIES_PKG.Print(

Line 3537: -- Delete from ap_invoices_interface table

3533: AP_IMPORT_UTILITIES_PKG.Print(
3534: AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
3535: END IF;
3536:
3537: -- Delete from ap_invoices_interface table
3538: FORALL i IN nvl(h_list.FIRST,0) .. nvl(h_list.LAST,-1)
3539: DELETE FROM ap_invoices_interface h
3540: WHERE h.invoice_id = h_list(i);
3541:

Line 3539: DELETE FROM ap_invoices_interface h

3535: END IF;
3536:
3537: -- Delete from ap_invoices_interface table
3538: FORALL i IN nvl(h_list.FIRST,0) .. nvl(h_list.LAST,-1)
3539: DELETE FROM ap_invoices_interface h
3540: WHERE h.invoice_id = h_list(i);
3541:
3542: debug_info := '(XML Import Purge 6) COMMIT';
3543: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN

Line 3600: WHERE parent_table = 'AP_INVOICES_INTERFACE'

3596: SELECT parent_table,
3597: parent_id,
3598: reject_lookup_code
3599: FROM ap_interface_rejections
3600: WHERE parent_table = 'AP_INVOICES_INTERFACE'
3601: AND parent_id = p_invoice_interface_id
3602: UNION
3603: SELECT parent_table,
3604: parent_id,

Line 3637: FROM ap_invoices_interface

3633: ELSE
3634:
3635: SELECT source
3636: INTO l_source
3637: FROM ap_invoices_interface
3638: WHERE invoice_id = p_invoice_interface_id;
3639:
3640:
3641: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN