DBA Data[Home] [Help]

PACKAGE: APPS.WSH_FTE_COMP_CONSTRAINT_GRP

Source


1 PACKAGE WSH_FTE_COMP_CONSTRAINT_GRP AUTHID CURRENT_USER as
2 /* $Header: WSHFTGPS.pls 120.0 2005/05/26 18:22:21 appldev noship $ */
3 
4 -- Global Variables
5 
6 g_package_name               CONSTANT        VARCHAR2(50) := 'WSH_FTE_COMP_CONSTRAINT_GRP';
7 
8 G_ACTION_CREATE          VARCHAR2(30) := 'CREATE';
9 G_ACTION_UPDATE          VARCHAR2(30) := 'UPDATE';
10 
11 
12 G_DELIVERY               VARCHAR2(30) := 'DLVY';
13 G_TRIP                   VARCHAR2(30) := 'TRIP';
14 
15 --   p_action_code  can be    G_ACTION_CREATE or G_ACTION_UPDATE
16 
17   TYPE wshfte_ccin_rec_type IS RECORD (
18              p_action_code                      VARCHAR2(30),                --  CREATE  /  UPDATE
19              p_entity_type                      VARCHAR2(30), -- DLVY /  TRIP
20              p_entity_id                        NUMBER ,
21              p_organization_id                  NUMBER ,
22              p_customer_id                      NUMBER ,
23              p_shipmethod_code                  VARCHAR(30) ,
24              p_carrier_id                       NUMBER ,
25              p_mode_code                        VARCHAR2(30) ,
26              p_service_level                    VARCHAR2(30) ,
27              p_veh_item_id                      NUMBER ,
28              p_sequence_num                     NUMBER ,
29              p_ship_from_location_id            NUMBER ,
30              p_ship_to_location_id              NUMBER ,
31              p_intmed_location_id               NUMBER , -- Only for delivery
32              p_planned_flag                     VARCHAR2(1) ,
33              p_status_code                      VARCHAR2(30),
34              x_validate_status                  VARCHAR2(1)  );  -- S / F for the record
35 
36   TYPE wshfte_ccin_tab_type IS TABLE OF wshfte_ccin_rec_type INDEX BY BINARY_INTEGER;
37 
38 -- Currently only supports UPDATE / CREATE for Delivery and TRIP
39 -- Is it required to support validation of constraints when no specific entity is passed
40 -- and only some attributes are passed ?
41 -- Though it is possible to validate WHATEVER has been passed against each other, it is
42 -- difficult to conceptualize that as without a context lot of validations are not required.
43 
44 PROCEDURE validate_constraint(
45              p_api_version_number     IN   NUMBER,
46              p_init_msg_list          IN   VARCHAR2,
47              p_commit                 IN   VARCHAR2 DEFAULT FND_API.G_FALSE,
48              p_entity_tab             IN OUT NOCOPY  wshfte_ccin_tab_type,
49              x_msg_count                OUT  NOCOPY  NUMBER,   -- Standard FND functionality
50              x_msg_data                 OUT  NOCOPY  VARCHAR2,  -- Will return message text only if number of messages = 1
51              x_return_status            OUT  NOCOPY   VARCHAR2);
52 
53 --***************************************************************************--
54 --========================================================================
55 -- PROCEDURE : is_valid_consol
56 --
57 -- PARAMETERS: p_init_msg_list             FND_API.G_TRUE to reset list
58 --             p_input_delivery_id_tab     Table of delivery records to process
59 --
60 --             p_target_consol_delivery_id Table of delivery ids to process
61 --             x_deconsolidation_location  deconsolidation location
62 --             x_msg_count                 Number of messages in the list
63 --             x_msg_data                  Text of messages
64 --             x_return_status             Return status
65 -- COMMENT   : This procedure is to find if a set of deliveries can be assigned to a consol delivery.
66 --             This procedure is called from WMS.
67 --
68 --========================================================================
69 PROCEDURE is_valid_consol(  p_init_msg_list             IN  VARCHAR2 DEFAULT fnd_api.g_false,
70                             p_input_delivery_id_tab     IN  WSH_UTIL_CORE.id_tab_type,
71                             p_target_consol_delivery_id IN  NUMBER,
72                             p_caller                    IN  VARCHAR2 DEFAULT NULL,
73                             x_deconsolidation_location  OUT NOCOPY NUMBER,
74                             x_return_status             OUT  NOCOPY VARCHAR2,
75                             x_msg_count                 OUT  NOCOPY NUMBER,
76                             x_msg_data                  OUT  NOCOPY VARCHAR2);
77 END WSH_FTE_COMP_CONSTRAINT_GRP;
78