1 PACKAGE WSH_CAL_ASG_VALIDATIONS AUTHID CURRENT_USER AS
2 -- $Header: WSHCAVLS.pls 120.0.12010000.1 2008/07/29 05:58:48 appldev ship $
3
4 /*+=======================================================================+
5 --| Copyright (c) 1998 Oracle Corporation |
6 --| Redwood Shores, CA, USA |
7 --| All rights reserved. |
8 --+=======================================================================+
9 --| FILENAME |
10 --| WSHCAVLS.pls |
11 --| |
12 --| DESCRIPTION |
13 --| Validation API for transportation calendar |
14 --| |
15 --| HISTORY |
16 --| 06/29/99 dmay Created |
17 --+======================================================================*/
18 --Similar in structure to the existing Bill of Materials Workday Calendar,
19 --the Transportation Calendar defines the valid shipping days for a location,
20 --supplier, customer, or carrier, and consists of a repeating pattern of days
21 --on and days off and exceptions to that pattern. Shifts associated with
22 --these calendars determine specific times during the day when material may be
23 --shipped or received.
24 --===================
25 -- PROCEDURES
26 --===================
27 --========================================================================
28 -- PROCEDURE : Get_Calendar PUBLIC
29 -- PARAMETERS: p_api_version_number known api versionerror buffer
30 -- p_init_msg_list FND_API.G_TRUE to reset list
31 -- x_return_status return status
32 -- x_msg_count number of messages in the list
33 -- x_msg_data text of messages
34 -- p_entity_type Entity - 'CUSTOMER','ORG','VENDOR'
35 -- p_entity_id Entity Id - Customer_id, vendor_id, org_id
36 -- p_location_id Location ID (optional)
37 -- x_calendar_code Return calendar code
38 -- VERSION : current version 1.0
39 -- initial version 1.0
40 -- COMMENT : Returns a calendar code for a given customer,vendor or org and
41 -- location combination. If location is not specified then this
42 -- returns the default calendar code
43 --========================================================================
44 PROCEDURE Get_Calendar
45 ( p_api_version_number IN NUMBER
46 , p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE
47 , x_return_status OUT NOCOPY VARCHAR2
48 , x_msg_count OUT NOCOPY NUMBER
49 , x_msg_data OUT NOCOPY VARCHAR2
50 , p_entity_type IN VARCHAR2
51 , p_entity_id IN NUMBER
52 , p_location_id IN NUMBER
53 , x_calendar_code OUT NOCOPY VARCHAR2);
54
55
56 --========================================================================
57 -- PROCEDURE : Transport_Dates PUBLIC
58 -- PARAMETERS: p_api_version_number known api versionerror buffer
59 -- p_init_msg_list FND_API.G_TRUE to reset list
60 -- x_return_status return status
61 -- x_msg_count number of messages in the list
62 -- x_msg_data text of messages
63 -- p_priority 'SHIP' or 'RECEIVE': which is
64 -- more important
65 -- p_ship_date Date to validate
66 -- p_ship_assoc_type Association type for ship location
67 -- p_ship_location_id Location ID (optional)
68 -- p_ship_vendor_site_id Vendor Site ID (optional)
69 -- p_ship_customer_site_use_id Customer Site Use ID (optional)
70 -- p_ship_time_matters Flag: is time important in ship date?
71 -- p_freight_code Carrier code (optional)
72 -- p_freight_org_id Carrier Organization ID (optional)
73 -- p_receive_date Date to validate
74 -- p_receive_assoc_type Association type for ship location
75 -- p_receive_location_id Location ID (optional)
76 -- p_receive_vendor_site_id Vendor Site ID (optional)
77 -- p_receive_customer_site_use_id Customer Site Use ID (optional)
78 -- p_receive_time_matters Flag: is time important in receive date?
79 -- x_return code Return code
80 -- x_suggest_ship_date Ship date suggestion
81 -- x_suggest_receive_date Receiving date suggestion
82 -- p_primary_threshold Threshold for most important date
83 -- p_secondary_threshold Threshold for least important date
84 -- VERSION : current version 1.0
85 -- initial version 1.0
86 -- COMMENT : Validates a shipping or receiving date, or both, against a
87 -- transportation calendar and against a carrier calendar
88 -- This routine accepts a shipping date, or a receiving date, or both.
89 --Whatever dates it receives it validates against calendars, also provided as
90 --parameters. If a carrier and carrier calendar are specified the date(s) are
91 --validated against that calendar as well. If both ship and receive dates are
92 --provided, the user must also specify which date is more important, the
93 --ship or receive date. The more important date is validated first. Dates may
94 --slip within a user-provided tolerance: ship dates slip back, receive dates
95 --slip forward. The user may also specify whether time of day is important.
96 --If so, dates will only validate if they are valid for that specific time.
97 -- Value of parameter x_return_code indicates the following:
98 -- 0 Complete success
99 -- 1 dates slid, within tolerance
100 -- 2 lead time had to expand
101 -- 3 carrier calendar fails
102 -- 4 secondary date out of tolerance
103 -- 5 primary date out of tolerance
104 -- 6 error condition -- bad parameters
105 -- Higher-numbered error conditions take precedence. For
106 -- instance, if the primary date is out of tolerance AND
107 -- a carrier calendar fails, return code 5 is generated
108 --========================================================================
109 PROCEDURE Transport_Dates
110 ( p_api_version_number IN NUMBER
111 , p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE
112 , x_return_status OUT NOCOPY VARCHAR2
113 , x_msg_count OUT NOCOPY NUMBER
114 , x_msg_data OUT NOCOPY VARCHAR2
115 , p_priority IN VARCHAR2
116 , p_ship_date IN DATE
117 , p_ship_assoc_type IN VARCHAR2
118 , p_ship_location_id IN NUMBER := NULL
119 , p_ship_vendor_site_id IN NUMBER := NULL
120 , p_ship_customer_site_use_id IN NUMBER := NULL
121 , p_ship_time_matters IN BOOLEAN
122 , p_freight_code IN VARCHAR2
123 , p_freight_org_id IN NUMBER
124 , p_receive_date IN DATE
125 , p_receive_assoc_type IN VARCHAR2
126 , p_receive_location_id IN NUMBER := NULL
127 , p_receive_vendor_site_id IN NUMBER := NULL
128 , p_receive_customer_site_use_id IN NUMBER := NULL
129 , p_receive_time_matters IN BOOLEAN
130 , x_return_code OUT NOCOPY NUMBER
131 , x_suggest_ship_date OUT NOCOPY DATE
132 , x_suggest_receive_date OUT NOCOPY DATE
133 , p_primary_threshold IN NUMBER
134 , p_secondary_threshold IN NUMBER
135 );
136 END WSH_CAL_ASG_VALIDATIONS;