DBA Data[Home] [Help]

APPS.PO_AUTO_HEADER_PROCESS_PVT dependencies on PO_DEBUG

Line 6: g_debug_stmt CONSTANT BOOLEAN := PO_DEBUG.is_debug_stmt_on;

2: /* $Header: PO_AUTO_HEADER_PROCESS_PVT.plb 120.18.12020000.4 2013/05/08 08:36:22 akyanama ship $ */
3:
4: g_pkg_name CONSTANT VARCHAR2(1000) := 'PO_AUTO_HEADER_PROCESS_PVT';
5: g_log_head CONSTANT VARCHAR2(1000) := 'po.plsql.PO_AUTO_HEADER_PROCESS_PVT.';
6: g_debug_stmt CONSTANT BOOLEAN := PO_DEBUG.is_debug_stmt_on;
7: g_debug_unexp CONSTANT BOOLEAN := PO_DEBUG.is_debug_unexp_on;
8: -- Derive and validate Vendor related attributes
9: g_vendor_ship_to_loc_id NUMBER;
10: g_vendor_bill_to_loc_id NUMBER;

Line 7: g_debug_unexp CONSTANT BOOLEAN := PO_DEBUG.is_debug_unexp_on;

3:
4: g_pkg_name CONSTANT VARCHAR2(1000) := 'PO_AUTO_HEADER_PROCESS_PVT';
5: g_log_head CONSTANT VARCHAR2(1000) := 'po.plsql.PO_AUTO_HEADER_PROCESS_PVT.';
6: g_debug_stmt CONSTANT BOOLEAN := PO_DEBUG.is_debug_stmt_on;
7: g_debug_unexp CONSTANT BOOLEAN := PO_DEBUG.is_debug_unexp_on;
8: -- Derive and validate Vendor related attributes
9: g_vendor_ship_to_loc_id NUMBER;
10: g_vendor_bill_to_loc_id NUMBER;
11: g_terms_id PO_HEADERS.terms_id%TYPE;

Line 57: PO_DEBUG.debug_begin(p_log_head => g_log_head||l_api_name);

53:
54: BEGIN
55:
56: IF g_debug_stmt THEN
57: PO_DEBUG.debug_begin(p_log_head => g_log_head||l_api_name);
58: END IF;
59:
60: PO_AUTOCREATE_PARAMS.g_interface_header_id := p_interface_header_id;
61:

Line 647: PO_DEBUG.debug_end(p_log_head => g_log_head||l_api_name);

643:
644: END IF ;
645:
646: IF g_debug_stmt THEN
647: PO_DEBUG.debug_end(p_log_head => g_log_head||l_api_name);
648: END IF;
649:
650: EXCEPTION
651: WHEN OTHERS THEN

Line 653: PO_DEBUG.debug_exc(p_log_head => g_log_head||l_api_name, p_progress => l_progress);

649:
650: EXCEPTION
651: WHEN OTHERS THEN
652: IF g_debug_unexp THEN --< Bug 3210331: use proper debugging >
653: PO_DEBUG.debug_exc(p_log_head => g_log_head||l_api_name, p_progress => l_progress);
654: END IF;
655:
656: --CLM Phase 2 changes : error handling
657: PO_AUTOCREATE_PVT.report_error('PO_AUTO_HEADER_FETCH_ERR',x_token1_value => sqlerrm);

Line 717: PO_DEBUG.debug_begin(p_log_head => g_log_head||l_api_name);

713:
714: BEGIN
715:
716: IF g_debug_stmt THEN
717: PO_DEBUG.debug_begin(p_log_head => g_log_head||l_api_name);
718: END IF;
719:
720: /*
721: ** If we are using automatic numbering, get segment1

Line 762: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress, p_message => 'After getting the po_header_id: po_header_id :'|| x_headers.po_header_id);

758:
759: END IF; -- PO_AUTOCREATE_PARAMS.g_mode = 'ADD'
760:
761: IF g_debug_stmt THEN
762: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress, p_message => 'After getting the po_header_id: po_header_id :'|| x_headers.po_header_id);
763: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress, p_message => 'After getting the po_header_id: document_num :'|| x_headers.document_num);
764: END IF;
765:
766: l_progress := '030';

Line 763: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress, p_message => 'After getting the po_header_id: document_num :'|| x_headers.document_num);

759: END IF; -- PO_AUTOCREATE_PARAMS.g_mode = 'ADD'
760:
761: IF g_debug_stmt THEN
762: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress, p_message => 'After getting the po_header_id: po_header_id :'|| x_headers.po_header_id);
763: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress, p_message => 'After getting the po_header_id: document_num :'|| x_headers.document_num);
764: END IF;
765:
766: l_progress := '030';
767: /* Complex PO - Check to find out is there a Complex work PO */

Line 786: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress, p_message => 'Before deriving vendor related info.');

782: IF(x_headers.vendor_id IS NOT NULL) THEN
783: l_progress := '040';
784:
785: IF g_debug_stmt THEN
786: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress, p_message => 'Before deriving vendor related info.');
787: END IF;
788:
789: x_headers.ship_via_lookup_code := NULL;
790: x_headers.fob := NULL;

Line 842: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress, p_message => 'After deriving the vendor related info');

838: --Derive vendor related info ends here
839:
840: l_progress := '060';
841: IF g_debug_stmt THEN
842: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress, p_message => 'After deriving the vendor related info');
843: END IF;
844:
845: -- Get the conversion rate between PO Currency and Req Functional Currency for
846: -- Default Rate type of Purchasing Org.

Line 853: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress, p_message => 'Before deriving the rate info');

849: BEGIN
850: l_progress := '070';
851:
852: IF g_debug_stmt THEN
853: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress, p_message => 'Before deriving the rate info');
854: END IF;
855:
856: SELECT req_fsp.set_of_books_id
857: INTO l_req_ou_sob_id

Line 884: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress, p_message => 'Getting rate type:'||l_rate_type);

880: l_rate_type := x_headers.rate_type;
881: END IF;
882:
883: IF g_debug_stmt THEN
884: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress, p_message => 'Getting rate type:'||l_rate_type);
885: END IF;
886:
887: -- Returns the conversion rate between PO Currency and Req Functional Currency
888: po_currency_sv.get_rate(PO_AUTOCREATE_PARAMS.g_hdr_requesting_ou_id,

Line 898: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress, p_message => 'After deriving the rate info: rate ='||PO_AUTOCREATE_PARAMS.g_rate_for_req_fields);

894: l_display_rate);
895:
896: l_progress := '075';
897: IF g_debug_stmt THEN
898: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress, p_message => 'After deriving the rate info: rate ='||PO_AUTOCREATE_PARAMS.g_rate_for_req_fields);
899: END IF;
900:
901: EXCEPTION
902: WHEN OTHERS THEN

Line 904: PO_DEBUG.debug_exc(p_log_head => g_log_head||l_api_name, p_progress => l_progress);

900:
901: EXCEPTION
902: WHEN OTHERS THEN
903: IF g_debug_unexp THEN
904: PO_DEBUG.debug_exc(p_log_head => g_log_head||l_api_name, p_progress => l_progress);
905: END IF;
906: po_message_s.sql_error('GET_RATE_FOR_REQ_PRICE',l_progress,SQLCODE);
907: END;
908:

Line 984: PO_DEBUG.debug_end(p_log_head => g_log_head||l_api_name);

980: x_emp_id));
981: END IF;
982: /*bug 12987412*/
983: IF g_debug_stmt THEN
984: PO_DEBUG.debug_end(p_log_head => g_log_head||l_api_name);
985: END IF;
986:
987: EXCEPTION
988: WHEN OTHERS THEN

Line 990: PO_DEBUG.debug_exc(p_log_head => g_log_head||l_api_name, p_progress => l_progress);

986:
987: EXCEPTION
988: WHEN OTHERS THEN
989: IF g_debug_unexp THEN --< Bug 3210331: use proper debugging >
990: PO_DEBUG.debug_exc(p_log_head => g_log_head||l_api_name, p_progress => l_progress);
991: END IF;
992:
993: --CLM Phase 2 changes : error handling
994: PO_AUTOCREATE_PVT.report_error('PO_AUTO_HEADER_DEFAULT_ERR',x_token1_value => sqlerrm);

Line 1032: PO_DEBUG.debug_begin(p_log_head => g_log_head||l_api_name);

1028:
1029: BEGIN
1030:
1031: IF g_debug_stmt THEN
1032: PO_DEBUG.debug_begin(p_log_head => g_log_head||l_api_name);
1033: END IF;
1034:
1035: -- Validate ship_to and bill_to
1036: IF (PO_AUTOCREATE_PARAMS.g_interface_source_code = 'SOURCING') THEN

Line 1055: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress, p_message => 'NO_DATA_FOUND: '||SQLERRM);

1051: AND NVL(TRUNC(inactive_date),TRUNC(SYSDATE)+1) > TRUNC(SYSDATE);
1052: EXCEPTION
1053: WHEN NO_DATA_FOUND THEN
1054: IF g_debug_stmt THEN
1055: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress, p_message => 'NO_DATA_FOUND: '||SQLERRM);
1056: END IF;
1057: x_is_valid :='N';
1058: x_valid_ship_to := NULL;
1059: WHEN OTHERS THEN

Line 1061: PO_DEBUG.debug_exc(p_log_head => g_log_head||l_api_name, p_progress => l_progress);

1057: x_is_valid :='N';
1058: x_valid_ship_to := NULL;
1059: WHEN OTHERS THEN
1060: IF g_debug_unexp THEN
1061: PO_DEBUG.debug_exc(p_log_head => g_log_head||l_api_name, p_progress => l_progress);
1062: END IF;
1063: raise;
1064: END;
1065:

Line 1067: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress, p_message => 'After validating ship_to : x_is_valid :'||x_is_valid);

1063: raise;
1064: END;
1065:
1066: IF g_debug_stmt THEN
1067: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress, p_message => 'After validating ship_to : x_is_valid :'||x_is_valid);
1068: END IF;
1069:
1070: l_progress:= '020';
1071: BEGIN

Line 1081: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress, p_message => 'NO_DATA_FOUND: '||SQLERRM);

1077: AND NVL(TRUNC(inactive_date),TRUNC(SYSDATE)+1) > TRUNC(SYSDATE);
1078: EXCEPTION
1079: WHEN NO_DATA_FOUND THEN
1080: IF g_debug_stmt THEN --< Bug 3210331: use proper debugging >
1081: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress, p_message => 'NO_DATA_FOUND: '||SQLERRM);
1082: END IF;
1083: x_is_valid :='N';
1084: x_valid_bill_to := NULL;
1085: WHEN OTHERS THEN

Line 1087: PO_DEBUG.debug_exc(p_log_head => g_log_head||l_api_name, p_progress => l_progress);

1083: x_is_valid :='N';
1084: x_valid_bill_to := NULL;
1085: WHEN OTHERS THEN
1086: IF g_debug_unexp THEN --< Bug 3210331: use proper debugging >
1087: PO_DEBUG.debug_exc(p_log_head => g_log_head||l_api_name, p_progress => l_progress);
1088: END IF;
1089: raise;
1090: END;
1091:

Line 1093: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress, p_message => 'After validating bill_to_to : x_is_valid :'||x_is_valid);

1089: raise;
1090: END;
1091:
1092: IF g_debug_stmt THEN
1093: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress, p_message => 'After validating bill_to_to : x_is_valid :'||x_is_valid);
1094: END IF;
1095:
1096:
1097: --Bug 14369833

Line 1169: PO_DEBUG.debug_end(p_log_head => g_log_head||l_api_name);

1165:
1166: /* Validation of vendor related attributes ends here */
1167: l_progress := '080';
1168: IF g_debug_stmt THEN
1169: PO_DEBUG.debug_end(p_log_head => g_log_head||l_api_name);
1170: END IF;
1171:
1172: EXCEPTION
1173: WHEN OTHERS THEN

Line 1175: PO_DEBUG.debug_exc(p_log_head => g_log_head||l_api_name, p_progress => l_progress);

1171:
1172: EXCEPTION
1173: WHEN OTHERS THEN
1174: IF g_debug_unexp THEN
1175: PO_DEBUG.debug_exc(p_log_head => g_log_head||l_api_name, p_progress => l_progress);
1176: END IF;
1177:
1178: --CLM Phase 2 changes : error handling
1179: PO_AUTOCREATE_PVT.report_error('PO_AUTO_HEADER_VALIDATE_ERR',x_token1_value => sqlerrm);

Line 1216: PO_DEBUG.debug_begin(p_log_head => g_log_head||l_api_name);

1212:
1213: BEGIN
1214:
1215: IF g_debug_stmt THEN
1216: PO_DEBUG.debug_begin(p_log_head => g_log_head||l_api_name);
1217: END IF;
1218:
1219: IF PO_AUTOCREATE_PARAMS.g_mode = 'ADD' THEN
1220:

Line 1251: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress, p_message => 'After updating the existing draft');

1247: last_update_login = x_headers.last_update_login
1248: WHERE draft_id = x_headers.draft_id;
1249:
1250: IF g_debug_stmt THEN
1251: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress, p_message => 'After updating the existing draft');
1252: END IF;
1253:
1254: ELSE -- Draft not exists PO_AUTOCREATE_PARAMS.g_draft_id is null or -1
1255: l_progress := '030';

Line 1273: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress, p_message => 'Getting new draft id for existing document:'||x_headers.draft_id);

1269: -- Indicates Draft exists for that document
1270: PO_AUTOCREATE_PARAMS.g_is_mod_exists := FALSE;
1271:
1272: IF g_debug_stmt THEN
1273: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress, p_message => 'Getting new draft id for existing document:'||x_headers.draft_id);
1274: END IF;
1275:
1276: -- If draft not exists then create a new entry in drafts and headers
1277: -- draft table.

Line 1587: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress, p_message => 'Getting new draft id for new document:'||x_headers.draft_id);

1583: -- Indecates Draft exists for that document
1584: PO_AUTOCREATE_PARAMS.g_is_mod_exists := FALSE;
1585:
1586: IF g_debug_stmt THEN
1587: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress, p_message => 'Getting new draft id for new document:'||x_headers.draft_id);
1588: END IF;
1589: -- Create a new entry in drafts and headers draft table
1590: -- for new document
1591: -- Insert into Draft table

Line 1898: PO_DEBUG.debug_end(p_log_head => g_log_head||l_api_name);

1894: draft_id = x_headers.draft_id
1895: WHERE interface_header_id = x_headers.intf_header_id;
1896:
1897: IF g_debug_stmt THEN
1898: PO_DEBUG.debug_end(p_log_head => g_log_head||l_api_name);
1899: END IF;
1900:
1901: EXCEPTION
1902: WHEN OTHERS THEN

Line 1904: PO_DEBUG.debug_exc(p_log_head => g_log_head||l_api_name, p_progress => l_progress);

1900:
1901: EXCEPTION
1902: WHEN OTHERS THEN
1903: IF g_debug_unexp THEN
1904: PO_DEBUG.debug_exc(p_log_head => g_log_head||l_api_name, p_progress => l_progress);
1905: END IF;
1906:
1907: --CLM Phase 2 changes : error handling
1908: PO_AUTOCREATE_PVT.report_error('PO_AUTO_HEADER_MERGE_ERR',x_token1_value => sqlerrm);

Line 1935: PO_DEBUG.debug_begin(p_log_head => g_log_head||l_api_name);

1931:
1932: BEGIN
1933:
1934: IF g_debug_stmt THEN
1935: PO_DEBUG.debug_begin(p_log_head => g_log_head||l_api_name);
1936: END IF;
1937:
1938: -- For new document, create a ga_org_assignments_draft record
1939: IF PO_AUTOCREATE_PARAMS.g_document_type = 'PA' AND PO_AUTOCREATE_PARAMS.g_mode = 'NEW' THEN

Line 1982: PO_DEBUG.debug_end(p_log_head => g_log_head||l_api_name);

1978:
1979: END IF;
1980:
1981: IF g_debug_stmt THEN
1982: PO_DEBUG.debug_end(p_log_head => g_log_head||l_api_name);
1983: END IF;
1984:
1985: EXCEPTION
1986: WHEN OTHERS THEN

Line 1989: PO_DEBUG.debug_exc(p_log_head => g_log_head||l_api_name, p_progress => l_progress);

1985: EXCEPTION
1986: WHEN OTHERS THEN
1987:
1988: IF g_debug_unexp THEN
1989: PO_DEBUG.debug_exc(p_log_head => g_log_head||l_api_name, p_progress => l_progress);
1990: END IF;
1991:
1992: --CLM Phase 2 changes : error handling
1993: PO_AUTOCREATE_PVT.report_error('PO_AUTO_HDR_MRG_ORG_ASSIGN_ERR',x_token1_value => sqlerrm);

Line 2017: PO_DEBUG.debug_begin(p_log_head => g_log_head||l_api_name);

2013:
2014: BEGIN
2015:
2016: IF g_debug_stmt THEN
2017: PO_DEBUG.debug_begin(p_log_head => g_log_head||l_api_name);
2018: END IF;
2019:
2020: IF (X_vendor_site_id IS NOT NULL) THEN
2021: l_progress := '010';

Line 2049: PO_DEBUG.debug_end(p_log_head => g_log_head||l_api_name);

2045: FROM ap_product_setup aps;
2046: END IF;
2047:
2048: IF g_debug_stmt THEN
2049: PO_DEBUG.debug_end(p_log_head => g_log_head||l_api_name);
2050: END IF;
2051:
2052: EXCEPTION
2053: WHEN OTHERS THEN

Line 2055: PO_DEBUG.debug_exc(p_log_head => g_log_head||l_api_name, p_progress => l_progress);

2051:
2052: EXCEPTION
2053: WHEN OTHERS THEN
2054: IF g_debug_unexp THEN
2055: PO_DEBUG.debug_exc(p_log_head => g_log_head||l_api_name, p_progress => l_progress);
2056: END IF;
2057:
2058: --CLM Phase 2 changes : error handling
2059: PO_AUTOCREATE_PVT.report_error('PO_AUTO_HEADER_INV_MATCH_ERR',x_token1_value => sqlerrm);