1 PACKAGE WSH_INTEGRATION as
2 /* $Header: WSHINTGS.pls 120.2.12000000.2 2007/04/10 23:16:07 rvarghes ship $ */
3
4 --================ CONSTANT DECLARATION ==================
5 C_SDEBUG CONSTANT NUMBER := wsh_debug_sv.C_LEVEL1;
6 C_DEBUG CONSTANT NUMBER := wsh_debug_sv.C_LEVEL2;
7
8 --================ TYPE DECLARATION ==================
9 TYPE MsgRecType is RECORD (
10 message_name VARCHAR2(30),
11 message_type VARCHAR2(1),
12 message_text VARCHAR2(2000));
13
14 TYPE MSG_TABLE IS TABLE OF MsgRecType index by binary_integer ;
15
16 TYPE MinMaxInRecType is RECORD (
17 api_version_number NUMBER,
18 source_code VARCHAR2(5),
19 line_id NUMBER
20 );
21
22 TYPE MinMaxOutRecType is RECORD (
23 quantity_uom VARCHAR2(3),
24 min_remaining_quantity NUMBER,
25 max_remaining_quantity NUMBER,
26 quantity2_uom VARCHAR2(3),
27 min_remaining_quantity2 NUMBER,
28 max_remaining_quantity2 NUMBER
29 );
30
31 TYPE MinMaxInOutRecType is RECORD (
32 dummy_quantity NUMBER
33 );
34
35
36 TYPE ShpgUnTrxdInRecType is RECORD (
37 api_version_number NUMBER,
38 source_code VARCHAR2(5),
39 closing_fm_date DATE,
40 closing_to_date DATE,
41 organization_id NUMBER);
42
43 TYPE ShpgUnTrxdOutRecType is RECORD (
44 untrxd_rec_count NUMBER,
45 receiving_rec_count NUMBER
46 );
47
48 TYPE ShpgUnTrxdInOutRecType is RECORD (
49 dummy_count NUMBER);
50
51 -- 2465199
52 TYPE LineIntfInRecType is RECORD (
53 api_version_number NUMBER,
54 source_code VARCHAR2(5),
55 line_id NUMBER);
56
57 TYPE LineIntfOutRecType is RECORD (
58 nonintf_line_qty NUMBER);
59
60 TYPE LineIntfInOutRecType is RECORD (
61 dummy_count NUMBER);
62
63 -- This record type contains information needed to identify the delivery detail which is being backordered
64 -- in the case of Ship Sets and SMC when Enforce Ship Set / SMC option is set
65 TYPE BackorderRecType IS RECORD
66 ( move_order_line_id NUMBER,
67 delivery_detail_id NUMBER,
68 ship_set_id NUMBER,
69 ship_model_id NUMBER
70 );
71
72 TYPE BackorderRec_Tbl IS TABLE OF BackorderRecType INDEX BY BINARY_INTEGER;
73
74 G_BackorderRec_Tbl BackorderRec_Tbl;
75
76 G_MSG_TABLE MSG_TABLE ;
77
78 -- For the issue in 2678601 porting to Pack I
79 -- For bug 2805603, added transaction_temp_id in both record structures
80 TYPE InvPCInRecType is RECORD (
81 api_version_number NUMBER,
82 source_code VARCHAR2(5),
83 transaction_id NUMBER,
84 transaction_temp_id NUMBER
85 );
86
87 TYPE InvPCOutRecType is RECORD (
88 transaction_id NUMBER,
89 transaction_temp_id NUMBER
90 );
91
92 -- Create SUBTYPE
93 SUBTYPE GRP_ATTR_REC_TYPE IS WSH_DELIVERY_AUTOCREATE.GRP_ATTR_REC_TYPE;
94 SUBTYPE GRP_ATTR_TAB_TYPE IS WSH_DELIVERY_AUTOCREATE.GRP_ATTR_TAB_TYPE;
95 SUBTYPE ACTION_REC_TYPE IS WSH_DELIVERY_AUTOCREATE.ACTION_REC_TYPE;
96 SUBTYPE OUT_REC_TYPE IS WSH_DELIVERY_AUTOCREATE.OUT_REC_TYPE;
97
98 --================ PROCEDURE/FUNCTION DECLARATION ==================
99 PROCEDURE Get_Min_Max_Tolerance_Quantity
100 ( p_in_attributes IN MinMaxInRecType,
101 p_out_attributes OUT NOCOPY MinMaxOutRecType,
102 p_inout_attributes IN OUT NOCOPY MinMaxInOutRecType,
103 x_return_status OUT NOCOPY VARCHAR2,
104 x_msg_count OUT NOCOPY NUMBER,
105 x_msg_data OUT NOCOPY VARCHAR2
106 );
107 PROCEDURE Get_Untrxd_Shpg_Lines_Count
108 ( p_in_attributes IN ShpgUnTrxdInRecType,
109 p_out_attributes OUT NOCOPY ShpgUnTrxdOutRecType,
110 p_inout_attributes IN OUT NOCOPY ShpgUnTrxdInOutRecType,
111 x_return_status OUT NOCOPY VARCHAR2,
112 x_msg_count OUT NOCOPY NUMBER,
113 x_msg_data OUT NOCOPY VARCHAR2
114 );
115 PROCEDURE Get_NonIntf_Shpg_Line_Qty
116 ( p_in_attributes IN LineIntfInRecType,
117 p_out_attributes OUT NOCOPY LineIntfOutRecType,
118 p_inout_attributes IN OUT NOCOPY LineIntfInOutRecType,
119 x_return_status OUT NOCOPY VARCHAR2,
120 x_msg_count OUT NOCOPY NUMBER,
121 x_msg_data OUT NOCOPY VARCHAR2
122 );
123
124 PROCEDURE Ins_Backorder_SS_SMC_Rec (
125 p_api_version_number IN NUMBER,
126 p_source_code IN VARCHAR2,
127 p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE,
128 p_backorder_rec IN BackorderRecType,
129 x_return_status OUT NOCOPY VARCHAR2,
130 x_msg_count OUT NOCOPY NUMBER,
131 x_msg_data OUT NOCOPY VARCHAR2
132 );
133
134 /*
135 ** -- The Following API has been copied from WMS file WSHPRASS.pls.
136 */
137
138 /*
139 *******************************************************************
140 * Copyright (c) 2002 Oracle Corporation, Redwood Shores, CA, USA *
141 * All rights reserved. *
142 * *
143 * FILENAME *
144 * WSHPRASS.pls *
145 * *
146 * DESCRIPTION *
147 * Spec of package WSH_PRINTER_ASSIGNMENT_PVT *
148 * This contains the procedure to update WSH_REPORT_PRINTERS *
149 * appropriately when called from the new mobile sign on page *
150 * *
151 * This API is capable of enabling/disabling specific *
152 * printers or all printers if the API is called w/o a *
153 * printer name. The default printer is the printer which *
154 * has been lately enabled. *
155 * *
156 * The following is an explanation for the input parameters *
157 * -------------------------------------------------------- *
158 * p_application_id - Application ID. *
159 * p_conc_program_id - Docuemnt ID. *
160 * p_level_type_id - Level Type (Site, App, Resp, User *
161 * p_level_value_id - Level Value for specific Level Type *
162 * p_organization_id - Organization ID (Not currently used) *
163 * p_printer_name - Printer to be enabled *
164 * p_enabled_flag - Enable/Disable *
165 *******************************************************************/
166 -- NOTES
167 --
168 -- HISTORY
169 --
170 -- 05-June-2002 Created By Johnson Abraham (joabraha@us)
171 PROCEDURE update_printer_assignment(
172 x_msg_count OUT NOCOPY NUMBER
173 , x_msg_data OUT NOCOPY VARCHAR2
174 , x_return_status OUT NOCOPY VARCHAR2
175 , p_application_id IN NUMBER DEFAULT NULL
176 , p_conc_program_id IN NUMBER DEFAULT NULL
177 , p_level_type_id IN NUMBER DEFAULT NULL
178 , p_level_value_id IN NUMBER DEFAULT NULL
179 , p_organization_id IN NUMBER DEFAULT NULL
180 , p_printer_name IN VARCHAR2 DEFAULT NULL
181 , p_enabled_flag IN VARCHAR2 DEFAULT NULL);
182
183
184 PROCEDURE Set_Inv_PC_Attributes
185 ( p_in_attributes IN InvPCInRecType,
186 x_return_status OUT NOCOPY VARCHAR2,
187 x_msg_count OUT NOCOPY NUMBER,
188 x_msg_data OUT NOCOPY VARCHAR2
189 );
190
191 PROCEDURE Get_Inv_PC_Attributes
192 ( p_out_attributes OUT NOCOPY InvPCOutRecType,
193 x_return_status OUT NOCOPY VARCHAR2,
194 x_msg_count OUT NOCOPY NUMBER,
195 x_msg_data OUT NOCOPY VARCHAR2
196 );
197
198
199 -- DBI Project, Added in 11.5.10+
200 -- Check if DBI is Installed
201 Function DBI_Installed return VARCHAR2;
202
203 -- Call DBI API for updates in Delivery Detail
204 PROCEDURE DBI_Update_Detail_Log
205 (p_delivery_detail_id_tab IN WSH_UTIL_CORE.id_tab_type,
206 p_dml_type IN VARCHAR2,
207 x_return_status OUT NOCOPY VARCHAR2);
208
209 -- Call DBI API for Create/Update/Delete of Trip Stop, Create/Delete Delivery Leg
210 PROCEDURE DBI_Update_Trip_Stop_Log
211 (p_stop_id_tab IN WSH_UTIL_CORE.id_tab_type,
212 p_dml_type IN VARCHAR2,
213 x_return_status OUT NOCOPY VARCHAR2);
214
215 /***********************************
216 -- R12, X-dock, record structures for X-dock integration
217 -- the data types are different from WSHDEAUS, as they do not refer to the table
218 TYPE GRP_ATTR_REC_TYPE IS RECORD (
219 batch_id number,
220 group_id number,
221 entity_id number,
222 entity_type varchar2(30),
223 status_code varchar2(30),
224 planned_flag varchar2(1),
225 ship_to_location_id number,
226 ship_from_location_id number,
227 customer_id number,
228 intmed_ship_to_location_id number,
229 fob_code varchar2(30),
230 freight_terms_code varchar2(30),
231 ship_method_code varchar2(30),
232 carrier_id number,
233 source_header_id number,
234 deliver_to_location_id number,
235 organization_id number,
236 date_scheduled date,
237 date_requested date,
238 delivery_id number,
239 ignore_for_planning varchar2(1) DEFAULT 'N',
240 line_direction varchar2(30),
241 shipping_control varchar2(30),
242 vendor_id number,
243 party_id number,
244 mode_of_transport varchar2(30),
245 service_level varchar2(30),
246 lpn_id number,
247 inventory_item_id number,
248 source_code varchar2(30),
249 container_flag varchar2(1),
250 l1_hash_string varchar2(1000),
251 l1_hash_value number);
252
253 TYPE grp_attr_tab_type IS TABLE OF GRP_ATTR_REC_TYPE INDEX BY BINARY_INTEGER;
254
255 type action_rec_type is record (action varchar2(30),
256 caller varchar2(30),
257 group_by_header_flag varchar2(1),
258 group_by_delivery_flag varchar2(1),
259 output_format_type varchar2(30),
260 output_entity_type varchar2(30),
261 check_single_grp varchar2(1));
262
263 type out_rec_type is record (query_string varchar2(4000),
264 single_group varchar2(1),
265 bind_hash_value number,
266 bind_hash_string varchar2(1000),
267 bind_batch_id number,
268 bind_header_id number,
269 bind_carrier_id number,
270 bind_mode_of_transport varchar2(30),
271 bind_service_level varchar2(30));
272
273 *******************************/
274
275 --procedure for X-dock integration
276 PROCEDURE Find_Matching_Groups
277 (p_attr_tab IN OUT NOCOPY GRP_ATTR_TAB_TYPE,
278 p_action_rec IN ACTION_REC_TYPE,
279 p_target_rec IN GRP_ATTR_REC_TYPE,
280 p_group_tab IN OUT NOCOPY GRP_ATTR_TAB_TYPE,
281 x_matched_entities OUT NOCOPY WSH_UTIL_CORE.ID_TAB_TYPE,
282 x_out_rec OUT NOCOPY OUT_REC_TYPE,
283 x_return_status OUT NOCOPY VARCHAR2);
284
285
286 -- 5870774
287 PROCEDURE Get_Cancel_Qty_Allowed
288 ( p_source_code IN VARCHAR2,
289 p_source_line_id IN NUMBER,
290 x_cancel_qty_allowed OUT NOCOPY NUMBER,
291 x_return_status OUT NOCOPY VARCHAR2,
292 x_msg_count OUT NOCOPY NUMBER,
293 x_msg_data OUT NOCOPY VARCHAR2
294 );
295
296
297 END WSH_INTEGRATION;