[Home] [Help]
PACKAGE BODY: APPS.ASF_ERR_REP_PKG
Source
1 PACKAGE BODY ASF_ERR_REP_PKG AS
2 /* $Header: asflerrb.pls 115.1 2000/10/26 02:42:53 pkm ship $ */
3 -- ---------------------------------------------------
4 -- Start of Comments
5 -- ---------------------------------------------------
6 -- PACKAGE NAME: ASF_ERR_REP_PKG
7 -- ---------------------------------------------------
8 -- PURPOSE:
9 -- Stores the errors in the as_ls_err_t table when the API has
10 -- a problem to perform its function.
11 --
12 -- Procedures:
13 -- (see below for specification)
14 --
15 -- NOTES
16 -- This package is publicly available for use
17 --
18 -- HISTORY
19 -- 05/23/00 SGHARAGO Created
20 --
21 -- End of Comments
22 ----------------------------------------------------------
23 /* ******* ERROR MSG TABLE VARIABLES ******** */
24 t_error_type_id as_ls_errs.error_type_id%TYPE;
25 t_error_text as_ls_errs.error_text%TYPE;
26
27 PROCEDURE process_error
28 (p_dir_flag IN VARCHAR2
29 ,p_error_num IN NUMBER
30 ,p_error_code IN VARCHAR2
31 ,p_error_text IN VARCHAR2
32 ,p_transaction_id IN NUMBER DEFAULT NULL
33 ,p_lead_id IN NUMBER DEFAULT NULL
34 ,p_partner_id IN NUMBER DEFAULT NULL
35 ) IS
36
37 BEGIN
38 /* >= 3100 and 3200 Two Task Error
39 >= 6000 and < 7000 SQL*Net Errors
40 >= 7200 and < 7500 SQL*Net Errors
41 >= 12100 and< 12300 TNS errors
42 >= 12500 and < 12700 TNS errors
43 Other are corrnection errors
44 */
45
46 IF ((p_error_num >= 3100 and p_error_num < 3200) or
47 (p_error_num >= 6000 and p_error_num < 7000) or
48 (p_error_num >= 7200 and p_error_num < 7500) or
49 (p_error_num >= 12100 and p_error_num < 12300 ) or
50 (p_error_num >= 12500 and p_error_num < 12700 ) or
51 p_error_num in (28,600,1001,1003,1004,1012,1013,1014,1033,1034,
52 1035,1071,1089,1090,1092,2122))
53 THEN
54 t_error_type_id := 1;
55 ELSE
56 t_error_type_id := 2;
57 END IF;
58
59 -- BEGIN
60 INSERT INTO as_ls_errs (error_id, dir_flag,error_status,
61 error_type_id,error_num,error_code,
62 error_text, transaction_id,
63 lead_id,partner_id,error_cre_date)
64 VALUES
65 (as_ls_errs_s.nextval,p_dir_flag,
66 'O',t_error_type_id,p_error_num,
67 p_error_code,p_error_text,
68 p_transaction_id,p_lead_id,
69 p_partner_id,sysdate);
70 -- EXCEPTION
71 --lead_share_mail;
72
73 -- WHEN others THEN
74 -- END;
75 END process_error;
76 --
77 END ASF_ERR_REP_PKG;