1 PACKAGE WSH_EXCEPTIONS_GRP AS
2 /* $Header: WSHXCPGS.pls 120.0 2005/05/26 18:16:22 appldev noship $ */
3
4 TYPE XC_REC_TYPE IS RECORD
5 (exception_id NUMBER,
6 exception_name VARCHAR2(30),
7 status VARCHAR2(30)
8 );
9
10 TYPE XC_ACTION_REC_TYPE IS RECORD
11 (
12 -- The following fields are used for Logging exceptions
13 request_id NUMBER, -- Also used for Purge
14 batch_id NUMBER,
15 exception_id NUMBER,
16 exception_name VARCHAR2(30), -- Also used for Purge, Change_Status
17 logging_entity VARCHAR2(30), -- Also used for Purge, Change_Status
18 logging_entity_id NUMBER, -- Also used for Change_Status
19 manually_logged VARCHAR2(1),
20 message VARCHAR2(2000),
21 logged_at_location_code VARCHAR2(50), -- Also used for Purge
22 exception_location_code VARCHAR2(50), -- Also used for Purge
23 severity VARCHAR2(10), -- Also used for Purge
24 delivery_name VARCHAR2(30), -- Also used for Purge
25 trip_name VARCHAR2(30),
26 stop_location_id NUMBER,
27 delivery_detail_id NUMBER,
28 container_name VARCHAR2(50),
29 org_id NUMBER,
30 inventory_item_id NUMBER,
31 -- HW OPMCONV. Need to expand length of lot_number to 80
32 lot_number VARCHAR2(80),
33 -- HW OPMCONV. No need for sublot anymore
34 -- sublot_number VARCHAR2(32),
35 revision VARCHAR2(3),
36 serial_number VARCHAR2(30),
37 unit_of_measure VARCHAR2(5),
38 quantity NUMBER,
39 unit_of_measure2 VARCHAR2(3),
40 quantity2 NUMBER,
41 subinventory VARCHAR2(10),
42 locator_id NUMBER,
43 error_message VARCHAR2(500),
44 attribute_category VARCHAR2(150),
45 attribute1 VARCHAR2(150),
46 attribute2 VARCHAR2(150),
47 attribute3 VARCHAR2(150),
48 attribute4 VARCHAR2(150),
49 attribute5 VARCHAR2(150),
50 attribute6 VARCHAR2(150),
51 attribute7 VARCHAR2(150),
52 attribute8 VARCHAR2(150),
53 attribute9 VARCHAR2(150),
54 attribute10 VARCHAR2(150),
55 attribute11 VARCHAR2(150),
56 attribute12 VARCHAR2(150),
57 attribute13 VARCHAR2(150),
58 attribute14 VARCHAR2(150),
59 attribute15 VARCHAR2(150),
60 departure_date DATE, -- Also used for Purge
61 arrival_date DATE, -- Also used for Purge
62
63 -- These fields are used for the Purge action.
64 exception_type VARCHAR2(25),
65 status VARCHAR2(30),
66 departure_date_to DATE,
67 arrival_date_to DATE,
68 creation_date DATE,
69 creation_date_to DATE,
70 data_older_no_of_days NUMBER,
71
72 -- This field is used for Change_Status action.
73 new_status VARCHAR2(30),
74
75 caller VARCHAR2(100),
76 phase NUMBER
77 );
78
79 TYPE XC_TAB_TYPE IS TABLE OF XC_REC_TYPE INDEX BY BINARY_INTEGER;
80
81 /*
82 TYPE ExpInRecType is RECORD(
83 caller VARCHAR2(100),
84 phase NUMBER,
85 action_code VARCHAR2(100));
86 */
87
88
89 ------------------------------------------------------------------------------
90 -- Procedure: Get_Exceptions
91 --
92 -- Parameters: 1) p_logging_entity_id - entity id for a particular entity name
93 -- 2) p_logging_entity_name - can be 'TRIP', 'STOP', 'DELIVERY',
94 -- 'DETAIL', or 'CONTAINER'
95 -- 3) x_exceptions_tab - list of exceptions
96 --
97 -- Description: This procedure takes in a logging entity id and logging entity
98 -- name and create an exception table.
99 ------------------------------------------------------------------------------
100
101 PROCEDURE Get_Exceptions (
102 -- Standard parameters
103 p_api_version IN NUMBER,
104 p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE,
105 x_return_status OUT NOCOPY VARCHAR2,
106 x_msg_count OUT NOCOPY NUMBER,
107 x_msg_data OUT NOCOPY VARCHAR2,
108
109 -- program specific parameters
110 p_logging_entity_id IN NUMBER,
111 p_logging_entity_name IN VARCHAR2,
112
113 -- program specific out parameters
114 x_exceptions_tab OUT NOCOPY WSH_EXCEPTIONS_PUB.XC_TAB_TYPE
115 );
116
117
118 ------------------------------------------------------------------------------
119 -- Procedure: Exception_Action
120 --
121 -- Parameters:
122 --
123 -- Description: This procedure calls the corresponding procedures to Log,
124 -- Purge and Change_Status of the exceptions based on the action
125 -- code it receives through the parameter p_action.
126 ------------------------------------------------------------------------------
127
128 PROCEDURE Exception_Action (
129 -- Standard parameters
130 p_api_version IN NUMBER,
131 p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE,
132 p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL,
133 p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE,
134 x_msg_count OUT NOCOPY NUMBER,
135 x_msg_data OUT NOCOPY VARCHAR2,
136 x_return_status OUT NOCOPY VARCHAR2,
137
138 -- program specific parameters
139 p_exception_rec IN OUT NOCOPY WSH_EXCEPTIONS_PUB.XC_ACTION_REC_TYPE,
140 p_action IN VARCHAR2
141 );
142
143
144 END WSH_EXCEPTIONS_GRP;