DBA Data[Home] [Help]
Skip to content

PACKAGE: APPS.WSH_SHIPMENT_REQUEST_PUB

Source


1 PACKAGE WSH_SHIPMENT_REQUEST_PUB AUTHID CURRENT_USER as
2 /* $Header: WSHSRPBS.pls 120.0.12010000.3 2009/12/03 12:19:56 mvudugul noship $ */
3 /*#
4  * This is the public interface for the Shipment Request entity. It allows
5  * execution of various Shipment Request functions, including creation, update
6  * of Shipment Request and other actions.
7  * @rep:scope public
8  * @rep:product WSH
9  * @rep:displayname Shipment Request
10  * @rep:lifecycle active
11  * @rep:category BUSINESS_ENTITY WSH_SHIPMENT_REQUEST
12  */
13 
14 --===================
15 -- PUBLIC VARS
16 --===================
17 
18 TYPE Shipment_Details_Rec_Type IS RECORD (
19    delivery_detail_interface_id   WSH_DEL_DETAILS_INTERFACE.delivery_detail_interface_id%TYPE,
20    line_number                    WSH_DEL_DETAILS_INTERFACE.line_number%TYPE,
21    item_number                    WSH_DEL_DETAILS_INTERFACE.item_number%TYPE,
22    inventory_item_id              WSH_DEL_DETAILS_INTERFACE.inventory_item_id%TYPE,
23    item_description               WSH_DEL_DETAILS_INTERFACE.item_description%TYPE,
24    requested_quantity             WSH_DEL_DETAILS_INTERFACE.requested_quantity%TYPE,
25    requested_quantity_uom         WSH_DEL_DETAILS_INTERFACE.requested_quantity_uom%TYPE,
26    customer_item_number           WSH_DEL_DETAILS_INTERFACE.customer_item_number%TYPE,
27    customer_item_id               WSH_DEL_DETAILS_INTERFACE.customer_item_id%TYPE,
28    date_requested                 WSH_DEL_DETAILS_INTERFACE.date_requested%TYPE,
29    date_scheduled                 WSH_DEL_DETAILS_INTERFACE.date_scheduled%TYPE,
30    ship_tolerance_above           WSH_DEL_DETAILS_INTERFACE.ship_tolerance_above%TYPE,
31    ship_tolerance_below           WSH_DEL_DETAILS_INTERFACE.ship_tolerance_below%TYPE,
32    packing_instructions           WSH_DEL_DETAILS_INTERFACE.packing_instructions%TYPE,
33    shipping_instructions          WSH_DEL_DETAILS_INTERFACE.shipping_instructions%TYPE,
34    shipment_priority_code         WSH_DEL_DETAILS_INTERFACE.shipment_priority_code%TYPE,
35    ship_set_name                  WSH_DEL_DETAILS_INTERFACE.ship_set_name%TYPE,
36    subinventory                   WSH_DEL_DETAILS_INTERFACE.subinventory%TYPE,
37    revision                       WSH_DEL_DETAILS_INTERFACE.revision%TYPE,
38    locator_code                   WSH_DEL_DETAILS_INTERFACE.locator_code%TYPE,
39    locator_id                     WSH_DEL_DETAILS_INTERFACE.locator_id%TYPE,
40    lot_number                     WSH_DEL_DETAILS_INTERFACE.lot_number%TYPE,
41    unit_selling_price             WSH_DEL_DETAILS_INTERFACE.unit_selling_price%TYPE,
42    currency_code                  WSH_DEL_DETAILS_INTERFACE.currency_code%TYPE,
43    earliest_pickup_date           WSH_DEL_DETAILS_INTERFACE.earliest_pickup_date%TYPE,
44    latest_pickup_date             WSH_DEL_DETAILS_INTERFACE.latest_pickup_date%TYPE,
45    earliest_dropoff_date          WSH_DEL_DETAILS_INTERFACE.earliest_dropoff_date%TYPE,
46    latest_dropoff_date            WSH_DEL_DETAILS_INTERFACE.latest_dropoff_date%TYPE,
47    cust_po_number                 WSH_DEL_DETAILS_INTERFACE.cust_po_number%TYPE,
48    source_header_number           WSH_DEL_DETAILS_INTERFACE.source_header_number%TYPE,
49    source_line_number             WSH_DEL_DETAILS_INTERFACE.source_line_number%TYPE,
50    src_requested_quantity         WSH_DEL_DETAILS_INTERFACE.src_requested_quantity%TYPE,
51    src_requested_quantity_uom     WSH_DEL_DETAILS_INTERFACE.src_requested_quantity_uom%TYPE);
52 
53 TYPE Shipment_Details_Rec_Tab IS TABLE OF Shipment_Details_Rec_Type index by binary_integer;
54 
55 TYPE Shipment_Request_Rec_Type IS RECORD (
56    delivery_interface_id          WSH_NEW_DEL_INTERFACE.delivery_interface_id%TYPE,
57    transaction_id                 WSH_TRANSACTIONS_HISTORY.transaction_id%TYPE,
58    document_number                NUMBER,
59    document_revision              WSH_TRANSACTIONS_HISTORY.document_revision%TYPE,
60    action_type                    WSH_TRANSACTIONS_HISTORY.action_type%TYPE,
61    organization_code              WSH_NEW_DEL_INTERFACE.organization_code%TYPE,
62    customer_id                    WSH_NEW_DEL_INTERFACE.customer_id%TYPE,
63    customer_name                  WSH_NEW_DEL_INTERFACE.customer_name%TYPE,
64    ship_to_customer_id            WSH_NEW_DEL_INTERFACE.ship_to_customer_id%TYPE,
65    ship_to_customer_name          WSH_NEW_DEL_INTERFACE.ship_to_customer_name%TYPE,
66    ship_to_address_id             WSH_NEW_DEL_INTERFACE.ship_to_address_id%TYPE,
67    ship_to_address1               WSH_NEW_DEL_INTERFACE.ship_to_address1%TYPE,
68    ship_to_address2               WSH_NEW_DEL_INTERFACE.ship_to_address2%TYPE,
69    ship_to_address3               WSH_NEW_DEL_INTERFACE.ship_to_address3%TYPE,
70    ship_to_address4               WSH_NEW_DEL_INTERFACE.ship_to_address4%TYPE,
71    ship_to_city                   WSH_NEW_DEL_INTERFACE.ship_to_city%TYPE,
72    ship_to_state                  WSH_NEW_DEL_INTERFACE.ship_to_state%TYPE,
73    ship_to_country                WSH_NEW_DEL_INTERFACE.ship_to_country%TYPE,
74    ship_to_postal_code            WSH_NEW_DEL_INTERFACE.ship_to_postal_code%TYPE,
75    ship_to_contact_id             WSH_NEW_DEL_INTERFACE.ship_to_contact_id%TYPE,
76    ship_to_contact_name           WSH_NEW_DEL_INTERFACE.ship_to_contact_name%TYPE,
77    ship_to_contact_phone          WSH_NEW_DEL_INTERFACE.ship_to_contact_phone%TYPE,
78    invoice_to_customer_id         WSH_NEW_DEL_INTERFACE.invoice_to_customer_id%TYPE,
79    invoice_to_customer_name       WSH_NEW_DEL_INTERFACE.invoice_to_customer_name%TYPE,
80    invoice_to_address_id          WSH_NEW_DEL_INTERFACE.invoice_to_address_id%TYPE,
81    invoice_to_address1            WSH_NEW_DEL_INTERFACE.invoice_to_address1%TYPE,
82    invoice_to_address2            WSH_NEW_DEL_INTERFACE.invoice_to_address2%TYPE,
83    invoice_to_address3            WSH_NEW_DEL_INTERFACE.invoice_to_address3%TYPE,
84    invoice_to_address4            WSH_NEW_DEL_INTERFACE.invoice_to_address4%TYPE,
85    invoice_to_city                WSH_NEW_DEL_INTERFACE.invoice_to_city%TYPE,
86    invoice_to_state               WSH_NEW_DEL_INTERFACE.invoice_to_state%TYPE,
87    invoice_to_country             WSH_NEW_DEL_INTERFACE.invoice_to_country%TYPE,
88    invoice_to_postal_code         WSH_NEW_DEL_INTERFACE.invoice_to_postal_code%TYPE,
89    invoice_to_contact_id          WSH_NEW_DEL_INTERFACE.invoice_to_contact_id%TYPE,
90    invoice_to_contact_name        WSH_NEW_DEL_INTERFACE.invoice_to_contact_name%TYPE,
91    invoice_to_contact_phone       WSH_NEW_DEL_INTERFACE.invoice_to_contact_phone%TYPE,
92    deliver_to_customer_id         WSH_NEW_DEL_INTERFACE.deliver_to_customer_id%TYPE,
93    deliver_to_customer_name       WSH_NEW_DEL_INTERFACE.deliver_to_customer_name%TYPE,
94    deliver_to_address_id          WSH_NEW_DEL_INTERFACE.deliver_to_address_id%TYPE,
95    deliver_to_address1            WSH_NEW_DEL_INTERFACE.deliver_to_address1%TYPE,
96    deliver_to_address2            WSH_NEW_DEL_INTERFACE.deliver_to_address2%TYPE,
97    deliver_to_address3            WSH_NEW_DEL_INTERFACE.deliver_to_address3%TYPE,
98    deliver_to_address4            WSH_NEW_DEL_INTERFACE.deliver_to_address4%TYPE,
99    deliver_to_city                WSH_NEW_DEL_INTERFACE.deliver_to_city%TYPE,
100    deliver_to_state               WSH_NEW_DEL_INTERFACE.deliver_to_state%TYPE,
101    deliver_to_country             WSH_NEW_DEL_INTERFACE.deliver_to_country%TYPE,
102    deliver_to_postal_code         WSH_NEW_DEL_INTERFACE.deliver_to_postal_code%TYPE,
103    deliver_to_contact_id          WSH_NEW_DEL_INTERFACE.deliver_to_contact_id%TYPE,
104    deliver_to_contact_name        WSH_NEW_DEL_INTERFACE.deliver_to_contact_name%TYPE,
105    deliver_to_contact_phone       WSH_NEW_DEL_INTERFACE.deliver_to_contact_phone%TYPE,
106    carrier_code                   WSH_NEW_DEL_INTERFACE.carrier_code%TYPE,
107    service_level                  WSH_NEW_DEL_INTERFACE.service_level%TYPE,
108    mode_of_transport              WSH_NEW_DEL_INTERFACE.mode_of_transport%TYPE,
109    freight_terms_code             WSH_NEW_DEL_INTERFACE.freight_terms_code%TYPE,
110    fob_code                       WSH_NEW_DEL_INTERFACE.fob_code%TYPE,
111    currency_code                  WSH_NEW_DEL_INTERFACE.currency_code%TYPE,
112    transaction_type_id            WSH_NEW_DEL_INTERFACE.transaction_type_id%TYPE,
113    price_list_id                  WSH_NEW_DEL_INTERFACE.price_list_id%TYPE,
114    client_code                    WSH_NEW_DEL_INTERFACE.client_code%TYPE, --LSP PROJECT
115    shipment_details_tab           Shipment_Details_Rec_Tab
116 );
117 
118 TYPE Criteria_Rec_Type IS RECORD (
119    shipment_request_status        WSH_TRANSACTIONS_HISTORY.transaction_status%TYPE,
120    from_shipment_request_number   NUMBER,
121    to_shipment_request_number     NUMBER,
122    from_shipment_request_date     WSH_TRANSACTIONS_HISTORY.creation_date%TYPE,
123    to_shipment_request_date       WSH_TRANSACTIONS_HISTORY.creation_date%TYPE,
124    transaction_id                 WSH_TRANSACTIONS_HISTORY.transaction_id%TYPE,
125    client_code                    WSH_NEW_DEL_INTERFACE.client_code%TYPE); -- LSP PROJECT : Added Client_code
126 
127 TYPE Interface_Errors_Rec_Type IS RECORD (
128    document_number                WSH_TRANSACTIONS_HISTORY.document_number%TYPE,
129    document_revision              WSH_TRANSACTIONS_HISTORY.document_revision%TYPE,
130    line_number                    WSH_DEL_DETAILS_INTERFACE.line_number%TYPE,
131    error_message                  WSH_INTERFACE_ERRORS.error_message%TYPE);
132 
133 
134 
135 TYPE Interface_Errors_Rec_Tab IS TABLE OF Interface_Errors_Rec_Type index by binary_integer;
136 
137 
138 --===================
139 -- PROCEDURES
140 --===================
141 
142 --========================================================================
143 -- PROCEDURE : Shipment_Request         PUBLIC
144 --
145 -- PARAMETERS: p_api_version_number    known api version
146 --             p_init_msg_list         FND_API.G_TRUE to reset list
147 --             p_action_code           'QUERY', 'CREATE', 'UPDATE' or 'DELETE'
148 --	           p_shipment_request_info Attributes for the shipment request entity
149 --             x_return_status         return status
150 --             x_msg_count             number of messages in the list
151 --             x_msg_data              text of messages
152 -- VERSION   : current version         1.0
153 --             initial version         1.0
154 -- COMMENT   : Creates or Updates or Deletes Shipment Request
155 --             specified in p_shipment_request_info
156 --========================================================================
157 
158 /*#
159  * Query or Create or update or delete a shipment request with information specified in p_shipment_request_info
160  * @param p_api_version_number    version number of the API
161  * @param p_init_msg_list         messages will be initialized if set as true
162  * @param p_action_code           action to be performed, could be 'QUERY', 'CREATE' or 'UPDATE' or 'DELETE'
163  * @param p_shipment_request_info attributes for the shipment request entity
164  * @param x_interface_errors_info error messages for the shipment request entity, if any
165  * @param p_commit                commit flag
166  * @param x_return_status         return status of the API
167  * @param x_msg_count             number of messages, if any
168  * @param x_msg_data              message text, if any
169  * @rep:scope public
170  * @rep:lifecycle active
171  * @rep:displayname Query Create Update Delete Shipment Request
172  */
173   PROCEDURE Shipment_Request
174   ( p_api_version_number     IN   NUMBER,
175     p_init_msg_list          IN   VARCHAR2 DEFAULT FND_API.G_TRUE,
176     p_action_code            IN   VARCHAR2 DEFAULT NULL,
177     p_shipment_request_info  IN   OUT NOCOPY Shipment_Request_Rec_Type,
178     x_interface_errors_info  OUT NOCOPY Interface_Errors_Rec_Tab,
179     p_commit                 IN   VARCHAR2 DEFAULT FND_API.G_FALSE,
180     x_return_status          OUT NOCOPY    VARCHAR2,
181     x_msg_count              OUT NOCOPY    NUMBER,
182     x_msg_data               OUT NOCOPY    VARCHAR2);
183 
184 --========================================================================
185 -- PROCEDURE : Process_Shipment_Requests         PUBLIC
186 --
187 -- PARAMETERS: p_api_version_number    known api version
188 --             p_init_msg_list         FND_API.G_TRUE to reset list
189 --             p_process_mode          'ONLINE' or 'CONCURRENT'
190 --	           p_criteria_info         Attributes for the Process Shipment Request criteria
191 --	           p_log_level             0 or 1 to control the log messages
192 --             x_request_id            Concurrent request id when p_process_mode is 'CONCURRENT'
193 --             x_return_status         return status
194 --             x_msg_count             number of messages in the list
195 --             x_msg_data              text of messages
196 -- VERSION   : current version         1.0
197 --             initial version         1.0
198 -- COMMENT   : Processes Shipment Requests as per criteria
199 --             specified in p_criteria_info
200 --========================================================================
201 
202 /*#
203  * Processes shipment requests with information specified in p_criteria_info
204  * @param p_api_version_number  version number of the API
205  * @param p_init_msg_list       messages will be initialized if set as true
206  * @param p_process_mode        ONLINE or CONCURRENT to process shipment requests
207  * @param p_criteria_info       criteria to select shipment requests
208  * @param p_log_level           Controls the log messages generated
209  * @param p_commit              Commit flag
210  * @param x_request_id          Concurrent request Id of the 'Process Shipment Requests' program
211  * @param x_return_status       return status of the API
212  * @param x_msg_count           number of messages, if any
213  * @param x_msg_data            message text, if any
214  * @rep:scope public
215  * @rep:lifecycle active
216  * @rep:displayname Process Shipment Requests
217  */
218   PROCEDURE Process_Shipment_Requests
219   ( p_api_version_number     IN  NUMBER,
220     p_init_msg_list          IN  VARCHAR2 DEFAULT  FND_API.G_TRUE,
221     p_process_mode           IN  VARCHAR2 DEFAULT 'CONCURRENT',
222     p_criteria_info          IN  Criteria_Rec_Type,
223     p_log_level              IN  NUMBER   DEFAULT 0,
224     p_commit                 IN  VARCHAR2 DEFAULT FND_API.G_FALSE,
225     x_request_id             OUT NOCOPY    NUMBER,
226     x_return_status          OUT NOCOPY    VARCHAR2,
227     x_msg_count              OUT NOCOPY    NUMBER,
228     x_msg_data               OUT NOCOPY    VARCHAR2);
229 
230 END WSH_SHIPMENT_REQUEST_PUB;