DBA Data[Home] [Help]

PACKAGE: APPS.WSH_CONTAINER_GRP

Source


1 PACKAGE WSH_CONTAINER_GRP AUTHID CURRENT_USER AS
2 /* $Header: WSHCOGPS.pls 120.0.12010000.1 2008/07/29 05:59:00 appldev ship $ */
3 
4 
5 TYPE ChangedAttributeTabType IS TABLE OF WSH_INTERFACE.ChangedAttributeRecType
6         INDEX BY BINARY_INTEGER;
7 
8 C_DELIVERY_DETAIL_CALL  NUMBER := 1000001212;
9 
10 
11 ------------------------------------------------------------------------------
12 -- Procedure:	Create_Containers
13 --
14 -- Parameters:	1) container_item_id (key flex id)
15 --		2) container_item_name (concatinated name for container item)
16 --		3) container_item_seg (flex field seg array for item name)
17 --		4) organization_id - organization id for container
18 --		5) organization_code - organization code for container
19 --		6) name_prefix - container name prefix
20 --		7) name_suffix - container name suffix
21 --		8) base_number - starting number for numeric portion of name
22 --		9) num_digits - precision for number of digits
23 --		10) quantity - number of containers
24 --		11) container_name - container name if creating 1 container
25 --		12) table of container ids - out table of ids
26 --		13) other standard parameters
27 --
28 -- Description: This procedure takes in a container item id or container item
29 -- name and other necessary parameters to create one or more containers and
30 -- creates the required containers. It returns a table of container instance
31 -- ids (delivery detail ids) along with the standard out parameters.
32 ------------------------------------------------------------------------------
33 
34 PROCEDURE Create_Containers (
35 	-- Standard parameters
36 	p_api_version		IN	NUMBER,
37 	p_init_msg_list		IN	VARCHAR2  DEFAULT FND_API.G_FALSE,
38 	p_commit		IN	VARCHAR2  DEFAULT FND_API.G_FALSE,
39 	p_validation_level	IN	NUMBER    DEFAULT FND_API.G_VALID_LEVEL_FULL,
40 	x_return_status    	OUT NOCOPY 	VARCHAR2,
41 	x_msg_count 		OUT NOCOPY 	NUMBER,
42 	x_msg_data 		OUT NOCOPY 	VARCHAR2,
43 
44 	-- program specific parameters
45 	p_container_item_id	IN	NUMBER,
46 	p_container_item_name 	IN	VARCHAR2,
47 	p_container_item_seg 	IN 	FND_FLEX_EXT.SegmentArray,
48 	p_organization_id	IN 	NUMBER,
49 	p_organization_code	IN 	VARCHAR2,
50 	p_name_prefix		IN	VARCHAR2,
51 	p_name_suffix		IN 	VARCHAR2,
52 	p_base_number		IN 	NUMBER,
53 	p_num_digits		IN 	NUMBER,
54 	p_quantity		IN 	NUMBER,
55 	p_container_name	IN 	VARCHAR2,
56         p_lpn_ids               IN      WSH_UTIL_CORE.ID_TAB_TYPE,
57 
58 	-- program specific out parameters
59 	x_container_ids		OUT NOCOPY 	WSH_UTIL_CORE.ID_TAB_TYPE,
60         p_caller                IN      VARCHAR2 DEFAULT 'WMS'
61 );
62 
63 
64 ------------------------------------------------------------------------------
65 -- Procedure:	Update_Container
66 --
67 -- Parameters:	1) container_rec - container record of type
68 --		wsh_delivery_details_grp.changedattributerectype
69 --		2) other standard parameters
70 --
71 -- Description: This procedure takes in a record of container attributes that
72 -- contains the name and delivery detail id of container to update the
73 -- container record in WSH_DELIVERY_DETAILS with the attributes input in the
74 -- container rec type. The API validates the container name and detail id and
75 -- calls the wsh_delivery_details_grp.update_shipping_attributes public API.
76 ------------------------------------------------------------------------------
77 
78 PROCEDURE Update_Container (
79 	-- Standard parameters
80 	p_api_version		IN	NUMBER,
81 	p_init_msg_list		IN	VARCHAR2  DEFAULT FND_API.G_FALSE,
82 	p_commit		IN	VARCHAR2  DEFAULT FND_API.G_FALSE,
83 	p_validation_level	IN	NUMBER    DEFAULT FND_API.G_VALID_LEVEL_FULL,
84 	x_return_status    	OUT NOCOPY 	VARCHAR2,
85 	x_msg_count 		OUT NOCOPY 	NUMBER,
86 	x_msg_data 		OUT NOCOPY 	VARCHAR2,
87 
88 	-- program specific parameters
89 	p_container_rec		IN	WSH_CONTAINER_GRP.CHANGEDATTRIBUTETABTYPE
90 
91 );
92 
93 
94 ------------------------------------------------------------------------------
95 -- Procedure:	Auto_Pack
96 --
97 -- Parameters:	1) entity_tab - table of ids of either lines or containers or
98 --			deliveries that need to be autopacked
99 --		2) entity_type - type of entity id contained in the entity_tab
100 --			that needs to be autopacked ('L' - lines,
101 --			'C' - containers OR 'D' - deliveries)
102 --		3) group_id_tab - table of ids (numbers that determine
103 --			the grouping of lines for packing into containers)
104 --		4) container_instance_tab - table of delivery detail ids of
105 --			containers that are created during the autopacking
106 --		5) pack cont flag - a 'Y' or 'N' value to determine whether to
107 --			to autopack the detail containers that are created into
108 --			parent containers.
109 --		6) other standard parameters
110 --
111 -- Description: This procedure takes in a table of ids of either delivery lines
112 -- or container or deliveries and autopacks the lines/containers/deliveries
113 -- into detail containers. The grouping id table is used only if the input
114 -- table of entities are lines or containers only. The packing of lines and
115 -- containers into parent containers is determined by the grouping id for each
116 -- line/container. If the grouping id table is not input, the API determines
117 -- the grouping ids for the lines/containers based on the grouping attributes
118 -- of the lines/containers. The lines/containers are then autopacked into
119 -- detail containers and the detail containers are packed into parent/master
120 -- containers based on whether the pack cont flag is set to 'Y' or 'N'. The
121 -- API returns a table of container instance ids created during the autopacking
122 -- operation. If the detail containers are packed into parent containers, the
123 -- output table of ids will contain both the detail and parent containers'
124 -- delivery detail ids.
125 ------------------------------------------------------------------------------
126 
127 PROCEDURE Auto_Pack (
128 	-- Standard parameters
129 	p_api_version		IN	NUMBER,
130 	p_init_msg_list		IN	VARCHAR2  DEFAULT FND_API.G_FALSE,
131 	p_commit		IN	VARCHAR2  DEFAULT FND_API.G_FALSE,
132 	p_validation_level	IN	NUMBER    DEFAULT FND_API.G_VALID_LEVEL_FULL,
133 	x_return_status    	OUT NOCOPY 	VARCHAR2,
134 	x_msg_count 		OUT NOCOPY 	NUMBER,
135 	x_msg_data 		OUT NOCOPY 	VARCHAR2,
136 
137 	-- program specific parameters
138 	p_entity_tab		IN 	WSH_UTIL_CORE.ID_TAB_TYPE,
139 	p_entity_type		IN	VARCHAR2,
140 	p_group_id_tab		IN 	WSH_UTIL_CORE.ID_TAB_TYPE,
141 	p_pack_cont_flag	IN	VARCHAR2,
142 
143 	-- program specific out parameters
144 	x_cont_inst_tab		OUT NOCOPY  	WSH_UTIL_CORE.ID_TAB_TYPE
145 
146 );
147 
148 
149 
153 -- Parameters:	1) detail_tab - input table of delivery detail ids
150 ------------------------------------------------------------------------------
151 -- Procedure:	Container_Actions
152 --
154 --		2) container_instance_id - delivery detail id of parent
155 --			container that is being packed.
156 --		3) container_name - container name if id is not known
157 --		4) container_flag - 'Y' or 'N' depending on whether to unpack
158 --			or not. ('Y' is unpack)
159 --		5) delivery_flag - 'Y' or 'N' if container needs to be
160 --			unassigned from delivery. ('Y' if unassign from del)
161 --		6) delivery_id - delivery id to assign container to.
162 --		7) delivery_name - name of delivery that container is being
166 --		9) other standard parameters
163 --			assigned to.
164 --		8) action_code - action code 'Pack', 'Assign', 'Unpack' or
165 --			'Unassign' to specify what action to perform.
167 --
168 -- Description: This procedure takes in a table of delivery detail ids and
169 -- name and/or delivery detail id of container to pack. If the action code is
170 -- is assign then delivery id and delivery name must be specified. The API
171 -- determines what action to perform based on the action code and then calls
172 -- appropriate private pack/assign/unpack/unassign API.
173 -- The input table of ids could be lines or containers. The delivery lines and
174 -- containers are separated from the input table and validated before the
175 -- appropriate private APIs are called
176 -- THIS PROCEDURE IS ONLY TO BE CALLED FROM
177 -- WSH_DELIVERY_DETAIL_GRP.Delivery_Detail_Action
178 
179 ------------------------------------------------------------------------------
180 
181 
182 PROCEDURE Container_Actions (
183 	-- Standard parameters
184 	p_api_version		IN	NUMBER,
185 	p_init_msg_list		IN	VARCHAR2  DEFAULT FND_API.G_FALSE,
186 	p_commit		IN	VARCHAR2  DEFAULT FND_API.G_FALSE,
187 	p_validation_level	IN	NUMBER    DEFAULT FND_API.G_VALID_LEVEL_FULL,
188 	x_return_status    	OUT NOCOPY 	VARCHAR2,
189 	x_msg_count 		OUT NOCOPY 	NUMBER,
190 	x_msg_data 		OUT NOCOPY 	VARCHAR2,
191 
192 	-- program specific parameters
193 	p_detail_tab		IN	WSH_UTIL_CORE.ID_TAB_TYPE,
194 	p_container_name	IN 	VARCHAR2 DEFAULT NULL,
195 	p_cont_instance_id 	IN	NUMBER DEFAULT NULL,
196 	p_container_flag	IN	VARCHAR2  DEFAULT 'N',
197 	p_delivery_flag		IN	VARCHAR2  DEFAULT 'N',
198 	p_delivery_id		IN 	NUMBER DEFAULT NULL,
199 	p_delivery_name		IN 	VARCHAR2 DEFAULT NULL,
200 	p_action_code		IN	VARCHAR2 ,
201         p_caller                IN      VARCHAR2 DEFAULT 'WMS'
202 );
203 
204 END WSH_CONTAINER_GRP;