DBA Data[Home] [Help]

PACKAGE: APPS.RLM_EXTINTERFACE_SV

Source


1 PACKAGE RLM_EXTINTERFACE_SV AUTHID CURRENT_USER as
2 /*$Header: RLMEINTS.pls 120.2.12010000.1 2008/07/21 09:44:39 appldev ship $*/
3 --<TPA_PUBLIC_NAME=RLM_TPA_SV>
4 --<TPA_PUBLIC_FILE_NAME=RLMTPDP>
5 /*==========================================================================*/
6 
7   k_TDEBUG              NUMBER := rlm_core_sv.C_LEVEL10;
8   k_SDEBUG              NUMBER := rlm_core_sv.C_LEVEL11;
9   k_DEBUG               NUMBER := rlm_core_sv.C_LEVEL12;
10   --
11   k_PLANNING            CONSTANT VARCHAR2(30) := 'PLANNING_RELEASE';
12   k_SHIPPING            CONSTANT VARCHAR2(30) := 'SHIPPING';
13   k_SEQUENCED           CONSTANT VARCHAR2(30) := 'SEQUENCED';
14   --
15   -- Currently OE requires us to provide 5 in the automotive orders for doc type
16   --
17   k_OE_DOCUMENT_TYPE    NUMBER := 5;
18   k_VNULL	  CONSTANT VARCHAR2(25) := 'THIS_IS_A_NULL_VALUE';
19   k_NNULL     CONSTANT NUMBER       := -19999999999;--Bugfix 5911991
20   --
21 
22   g_oe_header_rec                 oe_order_pub.header_rec_type;
23   g_oe_header_val_rec             oe_order_pub.header_val_rec_type;
24   g_oe_header_adj_tbl             oe_order_pub.header_adj_tbl_type;
25   g_oe_header_adj_val_tbl         oe_order_pub.header_adj_val_tbl_type;
26   g_oe_header_scredit_tbl         oe_order_pub.header_scredit_tbl_type;
27   g_oe_header_scredit_val_tbl     oe_order_pub.header_scredit_val_tbl_type;
28   -- Remove initialization of g_oe_line_tbl (bug# 1298267)
29   g_oe_line_tbl                   oe_order_pub.line_tbl_type;
30   g_oe_line_val_tbl               oe_order_pub.line_val_tbl_type;
31   g_oe_header_out_rec             oe_order_pub.header_rec_type;
32   g_oe_header_val_out_rec         oe_order_pub.header_val_rec_type;
33   g_oe_header_adj_out_tbl         oe_order_pub.header_adj_tbl_type;
34   g_oe_header_adj_val_out_tbl     oe_order_pub.header_adj_val_tbl_type;
35   g_oe_Header_price_Att_out_tbl   oe_order_pub.Header_Price_Att_Tbl_Type;
36   g_oe_Header_Adj_Att_out_tbl     oe_order_pub.Header_Adj_Att_Tbl_Type;
37   g_oe_Header_Adj_Assoc_out_tbl   oe_order_pub.Header_Adj_Assoc_Tbl_Type;
38   g_oe_header_scredit_out_tbl     oe_order_pub.header_scredit_tbl_type;
39   g_oe_hdr_scdt_val_out_tbl       oe_order_pub.header_scredit_val_tbl_type;
40   g_oe_line_out_tbl               oe_order_pub.line_tbl_type;
41   g_oe_line_val_out_tbl           oe_order_pub.line_val_tbl_type;
42   g_oe_line_adj_out_tbl           oe_order_pub.line_adj_tbl_type;
43   g_oe_line_adj_val_out_tbl       oe_order_pub.line_adj_val_tbl_type;
44   g_oe_Line_price_Att_out_tbl     OE_Order_PUB.Line_Price_Att_Tbl_Type;
45   g_oe_Line_Adj_Att_out_tbl       OE_Order_PUB.Line_Adj_Att_Tbl_Type;
46   g_oe_Line_Adj_Assoc_out_tbl     OE_Order_PUB.Line_Adj_Assoc_Tbl_Type;
47   g_oe_line_scredit_out_tbl       oe_order_pub.line_scredit_tbl_type;
48   g_oe_line_scredit_val_out_tbl   oe_order_pub.line_scredit_val_tbl_type;
49   g_oe_lot_serial_out_tbl         oe_order_pub.Lot_Serial_Tbl_Type;
50   g_oe_lot_serial_val_out_tbl     oe_order_pub.Lot_Serial_Val_Tbl_Type;
51   g_oe_action_request_out_tbl     oe_order_pub.request_tbl_type;
52   g_total_time                    NUMBER:=0;
53   g_total_lines                   NUMBER:=0;
54 
55 /*===========================================================================
56   FUNCTION/PROCEDURE NAME:BuildOELineTab
57 
58   DESCRIPTION: Builds the line_tab.
59 
60   PARAMETERS: x_req_tab IN OUT NOCOPY T_INT_TAB
61 
62   DESIGN REFERENCES:
63 
64   ALGORITHM:
65 
66   NOTES:
67 
68   OPEN ISSUES:
69 
70   CLOSED ISSUES:
71 
72   CHANGE HISTORY:               created Mnandell 05/27/99
73 /*==========================================================================*/
74 
75 PROCEDURE BuildOELineTab(x_Op_tab IN rlm_rd_sv.t_generic_tab, x_return_status OUT NOCOPY VARCHAR2);
76 
77 /*===========================================================================
78   FUNCTION/PROCEDURE NAME:ProcessOperation
79 
80   DESCRIPTION: Builds the line_tab and Calls processorder api.
81 
82   PARAMETERS: x_return_status IN OUT NOCOPY T_INT_TAB
83 
84   DESIGN REFERENCES:
85 
86   ALGORITHM:
87 
88   NOTES:
89 
90   OPEN ISSUES:
91 
92   CLOSED ISSUES:
93 
94   CHANGE HISTORY:               created Mnandell 05/27/99
95 ===========================================================================*/
96 
97 PROCEDURE ProcessOperation(x_Op_tab IN rlm_rd_sv.t_generic_tab,x_header_id IN NUMBER, x_return_status IN OUT NOCOPY VARCHAR2);
98 
99 /*===========================================================================
100 
101   FUNCTION/PROCEDURE NAME:  InsertOMMessages
102 
103   DESCRIPTION: Inserts the OM mesages into the exceptions table.
104 
105   PARAMETERS:
106 
107   DESIGN REFERENCES:
108 
109   ALGORITHM:
110 
111   NOTES:
112 
113   OPEN ISSUES:
114 
115   CLOSED ISSUES:
116 
117   CHANGE HISTORY:               created Mnandell 05/08/02
118 
119 ===========================================================================*/
120 
121 PROCEDURE InsertOMMessages(x_header_id IN NUMBER,
122                            x_customer_item_id IN NUMBER,
123                            x_msg_count  IN NUMBER,
124                            x_msg_level  IN VARCHAR2,
125                            x_token IN VARCHAR2,
126                            x_msg_name IN VARCHAR2);
127 
128 /*===========================================================================
129   FUNCTION/PROCEDURE NAME:BuildOELine
130 
131   DESCRIPTION: Builds the oe_line_rec.
132 
133   PARAMETERS:
134 
135   DESIGN REFERENCES:
136 
137   ALGORITHM:
138 
139   NOTES:
140 
141   OPEN ISSUES:
142 
143   CLOSED ISSUES:
144 
145   CHANGE HISTORY:               created Mnandell 05/27/99
146                                 tp-enabling jckwok 12/11/03
147 ===========================================================================*/
148 PROCEDURE BuildOELine(x_oe_line_rec IN OUT NOCOPY oe_order_pub.line_rec_type,
149                       x_Op_rec IN rlm_rd_sv.t_generic_rec);
150 --<TPA_PUBLIC_NAME>
151 /*===========================================================================
152   FUNCTION/PROCEDURE NAME:CallProcessConstraintAPI
153 
154   DESCRIPTION: Calls processConstraints api.
155 
156   PARAMETERS:
157 
158   DESIGN REFERENCES:
159 
160   ALGORITHM:
161 
162   NOTES:
163 
164   OPEN ISSUES:
165 
166   CLOSED ISSUES:
167 
168   CHANGE HISTORY:               created Mnandell 05/27/99
169 ===========================================================================*/
170 FUNCTION CallProcessConstraintAPI(x_Key_rec IN rlm_rd_sv.t_Key_rec,
171                            x_Qty_rec OUT NOCOPY rlm_rd_sv.t_Qty_rec,
172                            x_Operation IN VARCHAR2,
173                            x_OperationQty IN NUMBER := 0)
174 RETURN BOOLEAN;
175 
176 FUNCTION SubmitDemandProcessor(p_schedule_purpose_code VARCHAR2 DEFAULT NULL,
177                             p_from_date   DATE DEFAULT NULL,
178                             p_to_date   DATE DEFAULT NULL,
179                             p_from_customer_ext   VARCHAR2 DEFAULT NULL,
180                             p_to_customer_ext   VARCHAR2 DEFAULT NULL,
181                             p_from_ship_to_ext   VARCHAR2 DEFAULT NULL,
182                             p_to_ship_to_ext   VARCHAR2 DEFAULT NULL,
183 			    p_run_edi_loader   BOOLEAN DEFAULT FALSE)
184 return NUMBER;
185 
186 PROCEDURE GetIntransitQty (x_CustomerId 	In NUMBER,
187                            x_ShipToId   	In NUMBER,
188                            x_intmed_ship_to_org_id In NUMBER,--Bugfix 5911991
189                            x_ShipFromOrgId   	In NUMBER,
190                            x_InventoryItemId   	In NUMBER,
191 			   x_CustomerItemId     In NUMBER,
192                            x_OrderHeaderId    	In NUMBER,
193 			   x_BlanketNumber	In NUMBER,
194                            x_OrgId              In NUMBER,
195 			   x_SchedType	      	In VARCHAR2,
196                            x_ShipperRecs    	In WSH_RLM_INTERFACE.t_shipper_rec,
197 		           x_ShipmentDate   	In DATE,
198   			   x_MatchWithin        In RLM_CORE_SV.T_MATCH_REC,
199 		           x_MatchAcross	In RLM_CORE_SV.T_MATCH_REC,
200 			   x_Match_Rec      	IN WSH_RLM_INTERFACE.t_optional_match_rec,
201                            x_header_id       	IN NUMBER,
202                            x_InTransitQty    	OUT NOCOPY NUMBER,
203                            x_return_status 	OUT NOCOPY VARCHAR2);
204 
205 /*===========================================================================
206   FUNCTION/PROCEDURE NAME: CheckShippingConstraints
207 
208   DESCRIPTION: Call Shipping API to check if a particular order line
209                can be cancelled
210 
211   DESIGN REFERENCES:
212 
213   ALGORITHM:
214 
215   NOTES:
216 
217   OPEN ISSUES:
218 
219   CLOSED ISSUES:
220 
221   CHANGE HISTORY:               created JAUTOMO 11/08/01
222 ===========================================================================*/
223 
224 PROCEDURE CheckShippingConstraints (
225                    x_source_code            IN     VARCHAR2,
226                    x_changed_attributes     IN     WSH_SHIPPING_CONSTRAINTS_PKG.ChangedAttributeRecType,
227                    x_return_status          OUT NOCOPY    VARCHAR2,
228                    x_action_allowed         OUT NOCOPY    VARCHAR2,
229                    x_action_message         OUT NOCOPY    VARCHAR2,
230                    x_ord_qty_allowed        OUT NOCOPY    NUMBER,
231                    x_log_level              IN     NUMBER  DEFAULT 0,
232                    x_header_id              IN     NUMBER,
233                    x_order_header_id        IN     NUMBER);
234 
235 /*===========================================================================
236   FUNCTION/PROCEDURE NAME: GetLineStatus
237 
238   DESCRIPTION: Return the status of an Order Line.
239 
240   PARAMETERS: x_ScheduleLineId, x_OrderLineId
241 
242   DESIGN REFERENCES:
243 
244   ALGORITHM:
245 
246   NOTES:
247 
248   OPEN ISSUES:
249 
250   CLOSED ISSUES:
251 
252   CHANGE HISTORY:               created Mnandell 05/27/99
253 ===========================================================================*/
254 FUNCTION GetLineStatus(x_ScheduleLineId  In NUMBER, x_OrderLineId  In NUMBER)
255 RETURN VARCHAR2;
256 
257 /*===========================================================================
258   FUNCTION/PROCEDURE NAME: GetLocation
259 
260   DESCRIPTION: Return the Location of an Org Id.
261 
262   PARAMETERS: x_OrgId
263 
264   DESIGN REFERENCES:
265 
266   ALGORITHM:
267 
268   NOTES: The x_OrgId value can be Ship_To_Org_Id / Intrmd_Ship_To_Org_Id.
269          The Location is column from HZ_CUST_SITE_USES.
270 
271   OPEN ISSUES:
272 
273   CLOSED ISSUES:
274 
275   CHANGE HISTORY:               created ppeddama 10/12/99
276 ===========================================================================*/
277 FUNCTION GetLocation(x_OrgId  In NUMBER)
278 RETURN VARCHAR2;
279 
280 /*===========================================================================
281   FUNCTION/PROCEDURE NAME: GetAddress1
282 
283   DESCRIPTION: Return the Address1 Line for an Org Id.
284 
285   PARAMETERS: x_OrgId
286 
287   DESIGN REFERENCES:
288 
289   ALGORITHM:
290 
291   NOTES: The x_OrgId value can be Ship_To_Org_Id / Intrmd_Ship_To_Org_Id.
292          The Address1 is column from HZ_LOCATIONS.
293 
294   OPEN ISSUES:
295 
296   CLOSED ISSUES:
297 
298   CHANGE HISTORY:               created ppeddama 10/12/99
299 ===========================================================================*/
300 FUNCTION GetAddress1(x_OrgId  In NUMBER)
301 RETURN VARCHAR2;
302 
303 /*===========================================================================
304   FUNCTION/PROCEDURE NAME: BuildTPOELine
305 
306   DESCRIPTION:      Copies Tp_attributes from x_op_rec into x_oe_line_rec.
307 
308   PARAMETERS:       x_oe_line_rec  IN OUT NOCOPY oe_order_pub.line_rec_type
309                     x_Op_rec      IN rlm_rd_sv.t_generic_rec
310 
311   DESIGN REFERENCES:
312 
313   ALGORITHM:
314 
315   NOTES:
316 
317   OPEN ISSUES:
318 
319   CLOSED ISSUES:
320 
321   CHANGE HISTORY:               created mnandell 01/20/2000
322 ===========================================================================*/
323 PROCEDURE BuildTPOELine(x_oe_line_rec IN OUT NOCOPY oe_order_pub.line_rec_type,
324                         x_Op_rec      IN rlm_rd_sv.t_generic_rec);
325 --<TPA_PUBLIC_NAME>
326 
327 /*===========================================================================
328   FUNCTION/PROCEDURE NAME: BuildTPOELine
329 
330   DESCRIPTION:      Copies Tp_attributes from x_op_rec into x_oe_line_rec.
331 
332   PARAMETERS:       x_oe_line_rec  IN OUT oe_order_pub.line_rec_type
333                     x_Op_rec      IN rlm_rd_sv.t_generic_rec
334 
335   DESIGN REFERENCES:
336 
337   ALGORITHM:
338 
339   NOTES:
340 
341   OPEN ISSUES:
342 
343   CLOSED ISSUES:
344 
345   CHANGE HISTORY:               created mnandell 01/20/2000
346 ===========================================================================*/
347 PROCEDURE GetTpContext(x_Op_rec          IN rlm_rd_sv.t_generic_rec,
348                        x_customer_number OUT NOCOPY VARCHAR2,
349                        x_ship_to_ece_locn_code OUT NOCOPY VARCHAR2,
350                        x_bill_to_ece_locn_code OUT NOCOPY VARCHAR2,
351                        x_inter_ship_to_ece_locn_code OUT NOCOPY VARCHAR2,
352                        x_tp_group_code OUT NOCOPY VARCHAR2);
353 --<TPA_TPS>
354 
355 /*===========================================================================
356   PROCEDURE NAME: GetIntransitShippedLines
357 
358   DESCRIPTION:      Calculates Intransit Qty based on Shipped Lines
359 
360   PARAMETERS:       x_Sched_rec          IN     RLM_INTERFACE_HEADERS%ROWTYPE,
361                     x_Group_rec          IN     rlm_dp_sv.t_Group_rec,
362                     x_optional_match_rec IN  WSH_RLM_INTERFACE.t_optional_match_rec,
363                     x_min_horizon_date   IN VARCHAR2,
364                     x_intransit_qty      IN OUT NOCOPY NUMBERx_
365 
366   DESIGN REFERENCES:
367 
368   ALGORITHM:
369 
370   NOTES:
371 
372   OPEN ISSUES:
373 
374   CLOSED ISSUES:
375 
376   CHANGE HISTORY:               created asutar 07/10/2000
377 ===========================================================================*/
378 
379 PROCEDURE GetIntransitShippedLines (x_Sched_rec          IN     RLM_INTERFACE_HEADERS%ROWTYPE,
380                                     x_Group_rec          IN     rlm_dp_sv.t_Group_rec,
381 				    x_optional_match_rec IN      RLM_RD_SV.t_generic_rec,
382                                     x_min_horizon_date   IN VARCHAR2,
383                                     x_intransit_qty      IN OUT NOCOPY NUMBER);
384 
385 
386 END RLM_EXTINTERFACE_SV;