[Home] [Help]
PACKAGE: APPS.RLM_SHIP_DELIVERY_PATTERN_SV
Source
1 PACKAGE RLM_SHIP_DELIVERY_PATTERN_SV AUTHID CURRENT_USER as
2 /* $Header: RLMDPSDS.pls 120.0 2005/05/26 17:11:36 appldev noship $*/
3 --<TPA_PUBLIC_NAME=RLM_TPA_SV>
4 --<TPA_PUBLIC_FILE_NAME=RLMTPDP>
5
6 /*===========================================================================
7 PACKAGE NAME: rlm_ship_delivery_pattern_sv
8
9 DESCRIPTION: Contains all server side code for the Calculate Scheduled Ship
10 Date API.
11
12 CLIENT/SERVER: Server
13
14 LIBRARY NAME: None
15
16 OWNER: amitra
17
18 PROCEDURE/FUNCTIONS:
19 calc_scheduled_ship_date()
20 determine_sdp_code()
21 break_bucket()
22 default_sdp_code()
23 find_daily_percent()
24 apply_percent()
25 determine_lead_time()
26 check_rcv_date()
27 apply_lead_time()
28 check_send_date()
29 determine_recv_date()
30 determine_send_date()
31
32 GLOBALS:
33 g_SDEBUG
34 g_DEBUG
35
36
37 ===========================================================================*/
38
39 TYPE t_InputRec IS RECORD (
40 ShipDeliveryRuleName VARCHAR2(30),
41 ItemDetailSubtype VARCHAR2(30),
42 DateTypeCode VARCHAR2(30),
43 StartDateTime DATE,
44 ShipFromOrgId NUMBER,
45 CustomerId NUMBER,
46 ShipToAddressId NUMBER,
47 ShipToSiteUseId NUMBER,
48 BillToAddressId NUMBER,
49 IntShipToAddressId NUMBER,
50 CustomerItemId NUMBER,
51 --global_atp
52 ATPItemFlag BOOLEAN,
53 --
54 PrimaryQuantity NUMBER,
55 EndDateTime DATE,
56 use_edi_sdp_code_flag rlm_cust_shipto_terms.use_edi_sdp_code_flag%TYPE,
57 DefaultSDP rlm_cust_shipto_terms.ship_delivery_rule_name%TYPE,
58 ship_method rlm_cust_shipto_terms.ship_method%TYPE,
59 intransit_time rlm_cust_shipto_terms.intransit_time%TYPE,
60 time_uom_code rlm_cust_shipto_terms.time_uom_code%TYPE,
61 customer_rcv_calendar_cd rlm_cust_shipto_terms.customer_rcv_calendar_cd%TYPE,
62 supplier_shp_calendar_cd rlm_cust_shipto_terms.supplier_shp_calendar_cd%TYPE,
63 sched_horizon_start_date rlm_interface_headers.sched_horizon_start_date%TYPE,
64 exclude_non_workdays_flag rlm_cust_shipto_terms.exclude_non_workdays_flag%TYPE,
65 ShiptoCustomerId rlm_interface_lines.ship_to_customer_id%TYPE);
66
67 TYPE t_BucketRec IS RECORD (
68 ShipDeliveryRuleName VARCHAR2(30),
69 ItemDetailSubtype VARCHAR2(30),
70 DateTypeCode VARCHAR2(30),
71 StartDateTime DATE,
72 ShipToAddressId NUMBER,
73 ShipFromOrgId NUMBER,
74 CustomerItemId NUMBER,
75 PrimaryQuantity NUMBER,
76 EndDateTime DATE,
77 WholeNumber BOOLEAN);
78
79 TYPE t_OutputRec IS RECORD (
80 PlannedShipmentDate DATE,
81 PlannedReceiveDate DATE,
82 PrimaryQuantity NUMBER,
83 ItemDetailSubType rlm_interface_lines.item_detail_subtype%TYPE,
84 ReturnMessage VARCHAR2(30));
85
86 TYPE t_LeadTimeRec IS RECORD (
87 Time NUMBER,
88 Uom VARCHAR2(3));
89
90 TYPE t_ErrorMsgRec IS RECORD (
91 ErrType NUMBER,
92 ErrMessage VARCHAR2(4000),
93 ErrMessageName VARCHAR2(30) DEFAULT NULL);
94
95 TYPE t_DailyPercentTable IS TABLE OF NUMBER
96 INDEX BY BINARY_INTEGER;
97 TYPE t_BucketTable IS TABLE OF t_BucketRec
98 INDEX BY BINARY_INTEGER;
99 TYPE t_OutputTable IS TABLE OF t_OutputRec
100 INDEX BY BINARY_INTEGER;
101 TYPE t_ErrorMsgTable IS TABLE OF t_ErrorMsgRec
102 INDEX BY BINARY_INTEGER;
103
104 g_SDEBUG NUMBER :=rlm_core_sv.C_LEVEL5;
105 g_DEBUG NUMBER :=rlm_core_sv.C_LEVEL6;
106 g_PRECISION CONSTANT NUMBER :=2;
107 g_DAY CONSTANT VARCHAR2(10) := '1';
108 g_WEEK CONSTANT VARCHAR2(10) := '2';
109 g_FLEXIBLE CONSTANT VARCHAR2(10) := '3';
110 g_MONTH CONSTANT VARCHAR2(10) := '4';
111 g_QUARTER CONSTANT VARCHAR2(10) := '5';
112 g_SUCCESS CONSTANT NUMBER := 0;
113 g_WARNING CONSTANT NUMBER := 1;
114 g_ERROR CONSTANT NUMBER := 2;
115 g_SundayDOW CONSTANT VARCHAR2(1) := to_char(to_date('05/01/1997','dd/mm/yyyy'),'D');
116 g_MondayDOW CONSTANT VARCHAR2(1) := to_char(to_date('06/01/1997','dd/mm/yyyy'),'D');
117 g_TuesdayDOW CONSTANT VARCHAR2(1) := to_char(to_date('07/01/1997','dd/mm/yyyy'),'D');
118 g_WednesdayDOW CONSTANT VARCHAR2(1) := to_char(to_date('08/01/1997','dd/mm/yyyy'),'D');
119 g_ThursdayDOW CONSTANT VARCHAR2(1) := to_char(to_date('09/01/1997','dd/mm/yyyy'),'D');
120 g_FridayDOW CONSTANT VARCHAR2(1) := to_char(to_date('10/01/1997','dd/mm/yyyy'),'D');
121 g_SaturdayDOW CONSTANT VARCHAR2(1) := to_char(to_date('11/01/1997','dd/mm/yyyy'),'D');
122 g_RaiseErr CONSTANT NUMBER := -10;
123
124
125 /*===========================================================================
126 PROCEDURE NAME: calc_scheduled_ship_date
127
128 DESCRIPTION: This procedure calculates the Scheduled Ship Date based on the
129 given ship delivery pattern code, lead time and the BOM
130 calendars provided.
131
132 PARAMETERS: x_Input IN rlm_ship_delivery_pattern_sv.t_InputRec
133 x_QuantityDate OUT rlm_ship_delivery_pattern_sv.t_OutputTable
134 x_ReturnMessage OUT rlm_ship_delivery_pattern_sv.t_ErrorMsgTable
135 x_ReturnStatus OUT NUMBER
136
137 DESIGN REFERENCES: rladsdpc.rtf
138
139 ALGORITHM:
140
141 NOTES:
142
143 OPEN ISSUES:
144
145 CLOSED ISSUES:
146
147 CHANGE HISTORY: amitra 7/9/98 created
148 jckwok 1/10/03 updated (TPA-enabled)
149 ===========================================================================*/
150 PROCEDURE calc_scheduled_ship_date(x_Input IN rlm_ship_delivery_pattern_sv.t_InputRec,
151 x_QuantityDate OUT NOCOPY rlm_ship_delivery_pattern_sv.t_OutputTable,
152 x_ReturnMessage OUT NOCOPY rlm_ship_delivery_pattern_sv.t_ErrorMsgTable,
153 x_ReturnStatus OUT NOCOPY NUMBER);
154
155 --<TPA_PUBLIC_NAME>
156 /*===========================================================================
157 PROCEDURE NAME: determine_sdp_code
158
159 DESCRIPTION: This procedure determines the Ship Delivery Patter Code for
160 given setup terms SDP code and EDI SDP code based on the
161 USE EDI SDP code flag.
162
163 PARAMETERS: x_ShipDeliveryRuleName IN VARCHAR2(30)
164 x_ShipFromOrgId IN NUMBER
165 x_ShipToAddressId IN NUMBER
166 x_CustomerItemId IN NUMBER
167 x_SdpCode OUT NOCOPY VARCHAR2(30)
168 x_ReturnStatus OUT NOCOPY NUMBER
169
170 DESIGN REFERENCES: rladsdpc.rtf
171
172 ALGORITHM:
173
174 NOTES:
175
176 OPEN ISSUES:
177
178 CLOSED ISSUES:
179
180 CHANGE HISTORY: amitra 7/9/98 created
181 bsadri 11/2/00 added parameters
182 ===========================================================================*/
183
184 PROCEDURE determine_sdp_code( ShipDeliveryRuleName IN VARCHAR2,
185 use_edi_sdp_code_flag IN rlm_cust_shipto_terms.use_edi_sdp_code_flag%TYPE,
186 DefaultSDP IN rlm_cust_shipto_terms.ship_delivery_rule_name%TYPE,
187 x_customer_id IN NUMBER,
188 x_shipFromOrg IN NUMBER,
189 x_shipTo IN NUMBER,
190 x_ReturnMessage IN OUT NOCOPY t_ErrorMsgTable,
191 x_SdpCode OUT NOCOPY VARCHAR2,
192 x_ReturnStatus OUT NOCOPY NUMBER);
193
194 /*===========================================================================
195 FUNCTION NAME: find_default_sdp_code
196
197 DESCRIPTION: Not used currently.
198
199 PARAMETERS: x_ShipFromOrgId IN NUMBER
200 x_ShipToAddressId IN NUMBER
201 x_CustomerItemId IN NUMBER
202
203 DESIGN REFERENCES: rladsdpc.rtf
204
205 ALGORITHM:
206
207 NOTES:
208
209 OPEN ISSUES:
210
211 CLOSED ISSUES:
212
213 CHANGE HISTORY: amitra 7/28/98 created
214 ===========================================================================*/
215 FUNCTION find_default_sdp_code( x_ShipFromOrgId IN NUMBER,
216 x_ShipToAddressId IN NUMBER,
217 x_CustomerItemId IN NUMBER)
218 RETURN VARCHAR2;
219
220 /*===========================================================================
221 PROCEDURE NAME: set_return_status
222
223 DESCRIPTION: Checks to see if greater severity error occured, returns
224 current severity level of return status.
225
226 PARAMETERS: x_ReturnStatus IN OUT NOCOPY NUMBER
227 x_InputStatus IN NUMBER
228
229 DESIGN REFERENCES: rladsdpc.rtf
230
231 ALGORITHM:
232
233 NOTES:
234
235 OPEN ISSUES:
236
237 CLOSED ISSUES:
238
239 CHANGE HISTORY: amitra 7/28/98 created
240 ===========================================================================*/
241 PROCEDURE set_return_status(x_ReturnStatus IN OUT NOCOPY NUMBER,
242 x_InputStatus IN NUMBER);
243
244
245 /*===========================================================================
246 FUNCTION NAME: find_daily_percent
247
248 DESCRIPTION: This procedure applies the SDP rule to find daily percentages.
249
250 PARAMETERS: x_RuleName IN VARCHAR2
251
252 DESIGN REFERENCES: rladsdpc.rtf
253
254 ALGORITHM:
255
256 NOTES:
257
258 OPEN ISSUES:
259
260 CLOSED ISSUES:
261
262 CHANGE HISTORY: amitra 7/14/98 created
263 ===========================================================================*/
264 FUNCTION find_daily_percent(x_RuleName IN VARCHAR2)
265 RETURN rlm_core_sv.t_NumberTable;
266
267
268 /*===========================================================================
269 PROCEDURE NAME: break_bucket
270
271 DESCRIPTION: This procedure breaks down the monthly, quarterly, and
272 flexible buckets in to weekly buckets.
273
274 PARAMETERS: x_Input IN t_InputRec
275 x_WeeklyBucket OUT NOCOPY t_BucketTable
276 x_ReturnStatus OUT NOCOPY NUMBER
277
278 DESIGN REFERENCES: rladsdpc.rtf
279
280 ALGORITHM:
281
282 NOTES:
283
284 OPEN ISSUES:
285
286 CLOSED ISSUES:
287
288 CHANGE HISTORY: amitra 7/14/98 created
289 ===========================================================================*/
290 PROCEDURE break_bucket(x_Input IN rlm_ship_delivery_pattern_sv.t_InputRec,
291 x_ReturnMessage IN OUT NOCOPY rlm_ship_delivery_pattern_sv.t_ErrorMsgTable,
292 x_WeeklyBucket OUT NOCOPY rlm_ship_delivery_pattern_sv.t_BucketTable,
293 x_ReturnStatus OUT NOCOPY NUMBER);
294 --<TPA_PUBLIC_NAME>
295 /*===========================================================================
296 FUNCTION NAME: get_weekly_quantity
297
298 DESCRIPTION: This procedure gets the quantity for weekly buckets.
299
300 PARAMETERS: x_WholeNumber IN BOOLEAN
301 x_Count IN NUMBER
302 x_Input IN t_Inputrec
303 x_DivideBy IN NUMBER
304
305 DESIGN REFERENCES: rladsdpc.rtf
306
307 ALGORITHM:
308
309 NOTES:
310
311 OPEN ISSUES:
312
313 CLOSED ISSUES:
314
315 CHANGE HISTORY: amitra 7/23/98 created
316 ===========================================================================*/
317 FUNCTION get_weekly_quantity(
318 x_WholeNumber IN BOOLEAN,
319 x_Count IN NUMBER,
320 x_Input IN rlm_ship_delivery_pattern_sv.t_InputRec,
321 x_DivideBy IN NUMBER)
322 RETURN NUMBER;
323 --<TPA_PUBLIC_NAME>
324
325 /*===========================================================================
326 FUNCTION NAME: get_precision
327
328 DESCRIPTION: This function returns the global constant for precision.
329
330 PARAMETERS:
331
332 DESIGN REFERENCES: rladsdpc.rtf
333
334 ALGORITHM:
335
336 NOTES:
337
338 OPEN ISSUES:
339
340 CLOSED ISSUES:
341
342 CHANGE HISTORY: amitra 7/28/98 created
343 ===========================================================================*/
344 FUNCTION get_precision
345 RETURN NUMBER;
346
347
348 /*===========================================================================
349 PROCEDURE NAME: apply_sdp_to_weekly_bucket
350
351 DESCRIPTION: This procedure applies the Ship Delivery Pattern to daily
352 buckets.
353
354 PARAMETERS: x_Input IN t_InputRec
355 x_DailyPercent IN rlm_core_sv.t_NumberTable
356 x_ItemDetailSubtype IN VARCHAR2
357 x_StartDateTime IN DATE
358 x_PrimaryQuantity IN NUMBER
359 x_WholeNumber IN BOOLEAN
360 x_QuantityDate IN OUT NOCOPY t_OutputTable
361
362 DESIGN REFERENCES: rladsdpc.rtf
363
364 ALGORITHM:
365
366 NOTES:
367
368 OPEN ISSUES:
369
370 CLOSED ISSUES:
371
372 CHANGE HISTORY: amitra 7/14/98 created
373 ===========================================================================*/
374 PROCEDURE apply_sdp_to_weekly_bucket(
375 x_Input IN rlm_ship_delivery_pattern_sv.t_InputRec,
376 x_ItemDetailSubtype IN VARCHAR2,
377 x_DailyPercent IN rlm_core_sv.t_NumberTable,
378 x_StartDateTime IN DATE,
379 x_PrimaryQuantity IN NUMBER,
380 x_WholeNumber IN BOOLEAN,
381 x_QuantityDate IN OUT NOCOPY RLM_SHIP_DELIVERY_PATTERN_SV.t_OutputTable);
382 --<TPA_PUBLIC_NAME>
383
384 /*===========================================================================
385 PROCEDURE NAME: apply_sdp_to_daily_bucket
386
387 DESCRIPTION: This procedure applies the Ship Delivery Pattern to weekly
388 buckets.
389
390 PARAMETERS: x_Input IN t_InputRec
391 x_ItemDetailSubtype IN VARCHAR2
392 x_DailyPercent IN rlm_core_sv.t_NumberTable
393 x_StartDateTime IN DATE
394 x_PrimaryQuantity IN NUMBER
395 x_QuantityDate IN OUT NOCOPY t_OutputTable
396
397 DESIGN REFERENCES: rladsdpc.rtf
398
399 ALGORITHM:
400
401 NOTES:
402
403 OPEN ISSUES:
404
405 CLOSED ISSUES:
406
407 CHANGE HISTORY: amitra 7/14/98 created
408 ===========================================================================*/
409 PROCEDURE apply_sdp_to_daily_bucket(
410 x_Input IN rlm_ship_delivery_pattern_sv.t_InputRec,
411 x_ItemDetailSubtype IN VARCHAR2,
412 x_DailyPercent IN rlm_core_sv.t_NumberTable,
413 x_StartDateTime IN DATE,
414 x_PrimaryQuantity IN NUMBER,
415 x_QuantityDate IN OUT NOCOPY rlm_ship_delivery_pattern_sv.t_OutputTable);
416 --<TPA_PUBLIC_NAME>
417
418 /*===========================================================================
419 FUNCTION NAME: check_start_date
420
421 DESCRIPTION: This function checks whether the start date is valid for
422 given bucket type.
423
424 PARAMETERS: x_Input IN t_Inputrec
425 x_StartDateTime IN DATE
426 x_BucketType IN VARCHAR2
427
428 DESIGN REFERENCES: rladsdpc.rtf
429
430 ALGORITHM:
431
432 NOTES:
433
434 OPEN ISSUES:
435
436 CLOSED ISSUES:
437
438 CHANGE HISTORY: amitra 7/15/98 created
439 ===========================================================================*/
440 FUNCTION check_start_date(
441 x_Input IN rlm_ship_delivery_pattern_sv.t_Inputrec,
442 x_BucketType IN VARCHAR2)
443 RETURN BOOLEAN;
444 --<TPA_PUBLIC_NAME>
445 /*===========================================================================
446 FUNCTION NAME: find_monday_date
447
448 DESCRIPTION: This procedure finds the Monday date in the same week as given
449 date.
450
451 PARAMETERS: x_Input IN t_InputRec
452 x_Date IN DATE
453
454 DESIGN REFERENCES: rladsdpc.rtf
455
456 ALGORITHM:
457
458 NOTES:
459
460 OPEN ISSUES:
461
462 CLOSED ISSUES:
463
464 CHANGE HISTORY: amitra 7/15/98 created
465 ===========================================================================*/
466 FUNCTION find_monday_date(x_Input IN rlm_ship_delivery_pattern_sv.t_InputRec,
467 x_Date IN DATE)
468 RETURN DATE;
469 --<TPA_PUBLIC_NAME>
470 /*===========================================================================
471 FUNCTION NAME: valid_sdp_date
472
473 DESCRIPTION: This function checks if the SDP rule indicates a percentage
474 for given date.
475
476 PARAMETERS: x_Input IN t_InputRec
477 x_Date IN DATE
478 x_DailyPercent IN rlm_core_sv.t_NumberTable
479
480 DESIGN REFERENCES: rladsdpc.rtf
481
482 ALGORITHM:
483
484 NOTES:
485
486 OPEN ISSUES:
487
488 CLOSED ISSUES:
489
490 CHANGE HISTORY: amitra 7/15/98 created
491 ===========================================================================*/
492 FUNCTION valid_sdp_date(x_Input IN rlm_ship_delivery_pattern_sv.t_InputRec,
493 x_DailyPercent IN rlm_core_sv.t_NumberTable)
494 RETURN BOOLEAN;
495 --<TPA_PUBLIC_NAME>
496 /*===========================================================================
497 FUNCTION NAME: previous_valid_sdp_date
498
499 DESCRIPTION: This procedure finds the previous date based on the SDP rule
500 with a daily percent.
501
502 PARAMETERS: x_Input IN t_InputRec
503 x_Date IN DATE
504 x_DailyPercent IN rlm_core_sv.t_NumberTable
505
506 DESIGN REFERENCES: rladsdpc.rtf
507
508 ALGORITHM:
509
510 NOTES:
511
512 OPEN ISSUES:
513
514 CLOSED ISSUES:
515
516 CHANGE HISTORY: amitra 7/15/98 created
517 ===========================================================================*/
518 FUNCTION previous_valid_sdp_date(
519 x_Input IN rlm_ship_delivery_pattern_sv.t_InputRec,
520 x_Date IN DATE,
521 x_DailyPercent IN rlm_core_sv.t_NumberTable)
522 RETURN DATE;
523 --<TPA_PUBLIC_NAME>
524 /*===========================================================================
525 FUNCTION NAME: get_ship_method
526
527 DESCRIPTION: This procedure gets the ship method. Not used currently.
528
529 x_Input.ShipFromOrgId IN NUMBER
530 x_Input.ShipToAddressId IN NUMBER
531 x_Input.CustomerItemId IN NUMBER
532
533 DESIGN REFERENCES: rladsdpc.rtf
534
535 ALGORITHM:
536
537 NOTES:
538
539 OPEN ISSUES:
540
541 CLOSED ISSUES:
542
543 CHANGE HISTORY: amitra 7/20/98 created
544 ===========================================================================*/
545 FUNCTION get_ship_method(x_ShipFromOrgId IN NUMBER,
546 x_ShipToAddressId IN NUMBER,
547 x_CustomerItemId IN NUMBER)
548 RETURN VARCHAR2;
549
550
551 /*===========================================================================
552 FUNCTION NAME: determine_lead_time
553
554 DESCRIPTION: Not used currently.
555
556 x_ShipFromOrgId IN NUMBER
557 x_ShipToAddressId IN NUMBER
558 x_ShipMethod IN VARCHAR2
559
560 DESIGN REFERENCES: rladsdpc.rtf
561
562 ALGORITHM:
563
564 NOTES:
565
566 OPEN ISSUES:
567
568 CLOSED ISSUES:
569
570 CHANGE HISTORY: amitra 7/20/98 created
571 ===========================================================================*/
572 FUNCTION determine_lead_time(x_ShipFromOrgId IN NUMBER,
573 x_ShipToAddressId IN NUMBER,
574 x_ShipMethod IN VARCHAR2)
575 RETURN t_LeadTimeRec;
576
577
578 /*===========================================================================
579 FUNCTION NAME: check_receive_date
580
581 DESCRIPTION: This function checks to see if the receiving date is open
582 on receiving calendar.
583
584 PARAMETERS: x_Input IN t_InputRec
585 x_ReceiveDate IN DATE
586
587 DESIGN REFERENCES: rladsdpc.rtf
588
589 ALGORITHM:
590
591 NOTES:
592
593 OPEN ISSUES:
594
595 CLOSED ISSUES:
596
597 CHANGE HISTORY: amitra 7/20/98 created
598 ===========================================================================*/
599 FUNCTION check_receive_date(
600 x_Input IN rlm_ship_delivery_pattern_sv.t_InputRec,
601 x_ReceiveDate IN DATE)
602 RETURN BOOLEAN;
603 --<TPA_PUBLIC_NAME>
604
605 /*===========================================================================
606 PROCEDURE NAME: determine_receive_date
607
608 DESCRIPTION: This calls procedure to deterine previous valid receiving date.
609
610 PARAMETERS: x_Input IN t_InputRec
611 x_DailyPercent IN rlm_core_sv.t_NumberTable
612 x_ReceiveDate IN OUT DATE
613
614 DESIGN REFERENCES: rladsdpc.rtf
615
616 ALGORITHM:
617
618 NOTES:
619
620 OPEN ISSUES:
621
622 CLOSED ISSUES:
623
624 CHANGE HISTORY: amitra 7/20/98 created
625 ===========================================================================*/
626 PROCEDURE determine_receive_date(
627 x_Input IN rlm_ship_delivery_pattern_sv.t_InputRec,
628 x_DailyPercent IN rlm_core_sv.t_NumberTable,
629 x_ReceiveDate IN OUT NOCOPY DATE);
630 --<TPA_PUBLIC_NAME>
631
632 /*===========================================================================
633 PROCEDURE NAME: apply_lead_time
634
635 DESCRIPTION: This procedure adds or subtracts lead time based on Lead type.
636
637 PARAMETERS: x_LeadTime IN t_LeadTimeRec
638 x_QuantityDateRec IN OUT NOCOPY t_OutputRec
639 x_LeadType IN VARCHAR2
640
641 DESIGN REFERENCES: rladsdpc.rtf
642
643 ALGORITHM:
644
645 NOTES:
646
647 OPEN ISSUES:
648
649 CLOSED ISSUES:
650
651 CHANGE HISTORY: amitra 7/20/98 created
652 ===========================================================================*/
653 PROCEDURE apply_lead_time (x_LeadTime IN t_LeadTimeRec,
654 x_QuantityDateRec IN OUT NOCOPY t_OutputRec,
655 x_LeadType IN VARCHAR2);
656
657 /*===========================================================================
658 FUNCTION NAME: check_send_date
659
660 DESCRIPTION: This function checks to see if the shipping date is open
661 on shipping calendar.
662
663 PARAMETERS: x_INput IN t_inputRec
664 x_ShipmentDate IN DATE
665
666 DESIGN REFERENCES: rladsdpc.rtf
667
668 ALGORITHM:
669
670 NOTES:
671
672 OPEN ISSUES:
673
674 CLOSED ISSUES:
675
676 CHANGE HISTORY: amitra 7/20/98 created
677 ===========================================================================*/
678 FUNCTION check_send_date(x_Input IN rlm_ship_delivery_pattern_sv.t_inputRec,
679 x_ShipmentDate IN DATE)
680 RETURN BOOLEAN;
681 --<TPA_PUBLIC_NAME>
682
683 /*===========================================================================
684 PROCEDURE NAME: determine_send_date
685
686 DESCRIPTION: This calls the procedure to find previous valid send date.
687
688 PARAMETERS: x_ShipFromOrgId IN NUMBER
689 x_ShipmentDate IN OUT NOCOPY DATE
690
691 DESIGN REFERENCES: rladsdpc.rtf
692
693 ALGORITHM:
694
695 NOTES:
696
697 OPEN ISSUES:
698
699 CLOSED ISSUES:
700
701 CHANGE HISTORY: amitra 7/20/98 created
702 ===========================================================================*/
703 PROCEDURE determine_send_date(x_Input IN rlm_ship_delivery_pattern_sv.t_inputRec,
704 x_DailyPercent IN rlm_core_sv.t_NumberTable,
705 x_ShipmentDate IN OUT NOCOPY DATE );
706 --<TPA_PUBLIC_NAME>
707
708 /*=============================================================================
709 PROCEDURE NAME: get_err_message
710
711 DESCRIPTION: This procedure populates the Error message table with message.
712
713 PARAMETERS: x_ErrorMessage IN VARCHAR2
714 x_ErrorRecord IN NUMBER
715 x_ErrMsgTab IN OUT NOCOPY t_ErrorMsgTable
716
717 DESIGN REFERENCES: rladsdpc.rtf
718
719 ALGORITHM:
720
721 NOTES:
722
723 OPEN ISSUES:
724
725 CLOSED ISSUES:
726
727 CHANGE HISTORY: mnnaraya 9/03/99 created
728 ==============================================================================*/
729 PROCEDURE get_err_message (
730 x_ErrorMessage IN VARCHAR2,
731 x_ErrorMessageName IN VARCHAR2 DEFAULT NULL,
732 x_ErrorType IN NUMBER,
733 x_ErrMsgTab IN OUT NOCOPY t_ErrorMsgTable);
734
735 /*===========================================================================
736 PROCEDURE NAME: GetTPContext
737
738 DESCRIPTION: This procedure returns the tp group context.
739
740 PARAMETERS: x_Input IN t_InputRec
741 x_customer_number OUT NOCOPY VARCHAR2
742 x_ship_to_ece_locn_code OUT NOCOPY VARCHAR2
743 x_bill_to_ece_locn_code OUT NOCOPY VARCHAR2
744 x_inter_ship_to_ece_locn_code OUT NOCOPY VARCHAR2
745 x_tp_group_code OUT NOCOPY VARCHAR2
746
747 DESIGN REFERENCES: RLMDPSDD.rtf
748
749 ALGORITHM:
750
751 NOTES:
752
753 CLOSED ISSUES:
754
755 CHANGE HISTORY: created mnandell 01/18/2000
756
757 ===========================================================================*/
758 PROCEDURE GetTPContext(x_Input IN rlm_ship_delivery_pattern_sv.t_InputRec,
759 x_customer_number OUT NOCOPY VARCHAR2,
760 x_ship_to_ece_locn_code OUT NOCOPY VARCHAR2,
761 x_bill_to_ece_locn_code OUT NOCOPY VARCHAR2,
762 x_inter_ship_to_ece_locn_code OUT NOCOPY VARCHAR2,
763 x_tp_group_code OUT NOCOPY VARCHAR2);
764 --<TPA_TPS>
765 END rlm_ship_delivery_pattern_sv;