1 PACKAGE gme_api_grp AS
2 /* $Header: GMEGAPIS.pls 120.19.12010000.1 2008/07/25 10:28:36 appldev ship $ */
3 TYPE g_gmo_resvns IS REF CURSOR;
4 TYPE g_gmo_pplots IS REF CURSOR;
5 TYPE g_gmo_txns IS REF CURSOR;
6 TYPE g_gmo_lot_txns IS REF CURSOR;
7
8 PROCEDURE gme_pre_process_txns (
9 p_header_id IN NUMBER
10 ,x_return_status OUT NOCOPY VARCHAR2);
11
12 PROCEDURE gme_post_process_txns (
13 p_transaction_id IN NUMBER
14 ,x_return_status OUT NOCOPY VARCHAR2
15 ,x_message_data OUT NOCOPY VARCHAR2);
16
17 PROCEDURE update_material_date (
18 p_material_detail_id IN NUMBER
19 ,p_material_date IN DATE
20 ,x_return_status OUT NOCOPY VARCHAR2);
21
22 PROCEDURE validate_supply_demand
23 ( x_return_status OUT NOCOPY VARCHAR2
24 , x_msg_count OUT NOCOPY NUMBER
25 , x_msg_data OUT NOCOPY VARCHAR2
26 , x_valid_status OUT NOCOPY VARCHAR2
27 , p_organization_id IN NUMBER
28 , p_item_id IN NUMBER
29 , p_supply_demand_code IN NUMBER
30 , p_supply_demand_type_id IN NUMBER
31 , p_supply_demand_header_id IN NUMBER
32 , p_supply_demand_line_id IN NUMBER
33 , p_supply_demand_line_detail IN NUMBER DEFAULT FND_API.G_MISS_NUM
34 , p_demand_ship_date IN DATE
35 , p_expected_receipt_date IN DATE
36 , p_api_version_number IN NUMBER DEFAULT 1.0
37 , p_init_msg_lst IN VARCHAR2 DEFAULT FND_API.G_FALSE
38 );
39
40 PROCEDURE get_available_supply_demand
41 ( x_return_status OUT NOCOPY VARCHAR2
42 , x_msg_count OUT NOCOPY NUMBER
43 , x_msg_data OUT NOCOPY VARCHAR2
44 , x_available_quantity OUT NOCOPY NUMBER
45 , x_source_uom_code OUT NOCOPY VARCHAR2
46 , x_source_primary_uom_code OUT NOCOPY VARCHAR2
47 , p_organization_id IN NUMBER DEFAULT NULL
48 , p_item_id IN NUMBER DEFAULT NULL
49 , p_revision IN VARCHAR2 DEFAULT NULL
50 , p_lot_number IN VARCHAR2 DEFAULT NULL
51 , p_subinventory_code IN VARCHAR2 DEFAULT NULL
52 , p_locator_id IN NUMBER DEFAULT NULL
53 , p_supply_demand_code IN NUMBER
54 , p_supply_demand_type_id IN NUMBER
55 , p_supply_demand_header_id IN NUMBER
56 , p_supply_demand_line_id IN NUMBER
57 , p_supply_demand_line_detail IN NUMBER DEFAULT FND_API.G_MISS_NUM
58 , p_lpn_id IN NUMBER DEFAULT FND_API.G_MISS_NUM
59 , p_project_id IN NUMBER DEFAULT NULL
60 , p_task_id IN NUMBER DEFAULT NULL
61 , p_api_version_number IN NUMBER DEFAULT 1.0
62 , p_init_msg_lst IN VARCHAR2 DEFAULT FND_API.G_FALSE
63 );
64
65
66 PROCEDURE update_step_quality_status (
67 p_batchstep_id IN NUMBER
68 ,p_org_id IN NUMBER
69 ,p_quality_status IN NUMBER
70 ,x_return_status OUT NOCOPY VARCHAR2);
71
72
73
74
75 PROCEDURE get_batch_shortages (
76 p_api_version_number IN NUMBER DEFAULT 1.0
77 ,p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE
78 ,x_msg_count OUT NOCOPY NUMBER
79 ,x_msg_data OUT NOCOPY VARCHAR2
80 ,p_organization_id IN NUMBER
81 ,p_batch_id IN NUMBER
82 ,p_invoke_mode IN VARCHAR2
83 ,p_tree_mode IN NUMBER
84 ,x_return_status OUT NOCOPY VARCHAR2
85 ,x_exception_tbl OUT NOCOPY gme_common_pvt.exceptions_tab);
86
87 PROCEDURE get_material_reservations (
88 p_api_version_number IN NUMBER DEFAULT 1.0
89 ,p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE
90 ,x_msg_count OUT NOCOPY NUMBER
91 ,x_msg_data OUT NOCOPY VARCHAR2
92 ,p_organization_id IN NUMBER
93 ,p_batch_id IN NUMBER
94 ,p_material_detail_id IN NUMBER
95 ,x_return_status OUT NOCOPY VARCHAR2
96 ,x_reservations_tbl OUT NOCOPY gme_common_pvt.reservations_tab);
97
98 PROCEDURE CREATE_LCF_BATCH (
99 p_api_version IN NUMBER DEFAULT 1.0
100 ,p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE
101 ,p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE
102 ,x_message_count OUT NOCOPY NUMBER
103 ,x_message_list OUT NOCOPY VARCHAR2
104 ,x_return_status OUT NOCOPY VARCHAR2
105 ,p_batch_header_rec IN gme_batch_header%rowtype
106 ,p_formula_dtl_tbl IN gmdfmval_pub.formula_detail_tbl
107 ,p_recipe_rout_tbl IN gmd_recipe_fetch_pub.recipe_rout_tbl
108 ,p_recipe_step_tbl IN gmd_recipe_fetch_pub.recipe_step_tbl
109 ,p_routing_depd_tbl IN gmd_recipe_fetch_pub.routing_depd_tbl
110 ,p_oprn_act_tbl IN gmd_recipe_fetch_pub.oprn_act_tbl
111 ,p_oprn_resc_tbl IN gmd_recipe_fetch_pub.oprn_resc_tbl
112 ,p_proc_param_tbl IN gmd_recipe_fetch_pub.recp_resc_proc_param_tbl
113 ,p_use_workday_cal IN VARCHAR2 DEFAULT FND_API.G_TRUE
114 ,p_contiguity_override IN VARCHAR2 DEFAULT FND_API.G_TRUE
115 ,x_batch_header_rec OUT NOCOPY gme_batch_header%rowtype
116 ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab
117 );
118
119 FUNCTION get_planning_open_qty (
120 p_organization_id IN NUMBER
121 ,p_batch_id IN NUMBER
122 ,p_material_detail_id IN NUMBER
123 ,p_prim_plan_qty IN NUMBER
124 ,p_prim_wip_plan_qty IN NUMBER
125 ,p_prim_actual_qty IN NUMBER
126 ,p_prim_uom IN VARCHAR2)
127 RETURN NUMBER;
128
129
130 FUNCTION IS_RESERVATION_FULLY_SPECIFIED(p_reservation_id IN NUMBER)
131 RETURN NUMBER;
132
133 /*======================================================================
134 -- PROCEDURE:
135 -- substitute_ingredients
136 --
137 -- DESCRIPTION:
138 -- Procedure to substitute ingredients for the passed item_no,
139 -- org_id, from and to batch_no, start and end dates.
140 --
141 -- HISTORY:
142 ======================================================================*/
143 PROCEDURE substitute_ingredients (
144 errbuf OUT NOCOPY VARCHAR2,
145 retcode OUT NOCOPY VARCHAR2,
146 p_org_id IN NUMBER,
147 p_from_batch_no IN VARCHAR2,
148 p_to_batch_no IN VARCHAR2,
149 p_item_id IN NUMBER,
150 p_start_date IN VARCHAR2,
151 p_end_date IN VARCHAR2
152 );
153
154 /*======================================================================
155 -- PROCEDURE:
156 -- get_total_qty
157 --
158 -- DESCRIPTION:
159 -- Procedure to sum up all product quantities
160 --
161 -- HISTORY:
162 --- SivakumarG FPBug#4684029 Created.
163 --- SivakumarG Bug#5111078 Added x_total_wip_plan_qty parameter
164 ======================================================================*/
165 PROCEDURE get_total_qty(
166 p_batch_id IN NUMBER,
167 p_line_type IN NUMBER,
168 p_uom IN VARCHAR2,
169 x_total_plan_qty OUT NOCOPY NUMBER,
170 x_total_wip_plan_qty OUT NOCOPY NUMBER,
171 x_total_actual_qty OUT NOCOPY NUMBER,
172 x_uom OUT NOCOPY VARCHAR2,
173 x_return_status OUT NOCOPY VARCHAR2
174 );
175 /*======================================================================
176 -- PROCEDURE:
177 -- check_inv_negative
178 --
179 -- DESCRIPTION:
180 -- Procedure to check whether inventory will be driven negative.
181 -- RETURNS TRUE WHEN
182 -- Org does not allow negative and transaction will drive qty -ve
183 -- OR
184 -- Org allows negative but reservations exist and transaction
185 -- will drive qty -ve
186 --
187 -- HISTORY:
188 -- Jalaj Srivastava Created for Bug 5021522
189 ======================================================================*/
190 PROCEDURE check_inv_negative
191 ( p_transaction_id IN NUMBER
192 ,p_item_no IN VARCHAR2
193 ,x_msg_count OUT NOCOPY NUMBER
194 ,x_msg_data OUT NOCOPY VARCHAR2
195 ,x_return_status OUT NOCOPY VARCHAR2
196 );
197
198 --nsinghi bug#5674398 Added following API
199 /*======================================================================
200 -- FUNCTION:
201 -- get_ingred_sub_date
202 --
203 -- DESCRIPTION:
204 -- Function to return the substitution effective date.
205 -- HISTORY:
206 -- Namit S. 27-NOV-2006 bug#5674398
207 ======================================================================*/
208
209 FUNCTION get_ingr_sub_date
210 ( p_batch_id IN gme_batch_header.batch_id%TYPE,
211 p_material_detail_id IN gme_material_details.material_detail_id%TYPE
212 ) RETURN DATE;
213
214 /* Bug 5597385 Added below procedures */
215 PROCEDURE get_mat_resvns(p_organization_id IN NUMBER,
216 p_mat_det_id IN NUMBER,
217 p_batch_id IN NUMBER,
218 x_resvns_cur OUT NOCOPY g_gmo_resvns,
219 x_return_status OUT NOCOPY VARCHAR2);
220 PROCEDURE get_mat_pplots(p_mat_det_id IN NUMBER,
221 x_pplot_cur OUT NOCOPY g_gmo_pplots,
222 x_return_status OUT NOCOPY VARCHAR2);
223 PROCEDURE get_mat_trans(p_organization_id IN NUMBER,
224 p_mat_det_id IN NUMBER,
225 p_batch_id IN NUMBER,
226 x_txns_cur OUT NOCOPY g_gmo_txns,
227 x_return_status OUT NOCOPY VARCHAR2);
228 PROCEDURE get_lot_trans(p_transaction_id IN NUMBER,
229 x_lot_txns_cur OUT NOCOPY g_gmo_lot_txns,
230 x_return_status OUT NOCOPY VARCHAR2);
231 PROCEDURE create_material_txn(p_mmti_rec IN mtl_transactions_interface%ROWTYPE,
232 p_mmli_tbl IN gme_common_pvt.mtl_trans_lots_inter_tbl,
233 x_return_status OUT NOCOPY VARCHAR2);
234 PROCEDURE update_material_txn(p_transaction_id IN NUMBER,
235 p_mmti_rec IN mtl_transactions_interface%ROWTYPE,
236 p_mmli_tbl IN gme_common_pvt.mtl_trans_lots_inter_tbl,
237 x_return_status OUT NOCOPY VARCHAR2);
238 PROCEDURE delete_material_txn(p_organization_id IN NUMBER,
239 p_transaction_id IN NUMBER,
240 x_return_status OUT NOCOPY VARCHAR2);
241 PROCEDURE create_resource_txn(p_rsrc_txn_gtmp_rec IN gme_resource_txns_gtmp%ROWTYPE,
242 x_rsrc_txn_gtmp_rec OUT NOCOPY gme_resource_txns_gtmp%ROWTYPE,
243 x_return_status OUT NOCOPY VARCHAR2);
244 PROCEDURE update_resource_txn(p_rsrc_txn_gtmp_rec IN gme_resource_txns_gtmp%ROWTYPE,
245 x_return_status OUT NOCOPY VARCHAR2);
246 PROCEDURE delete_resource_txn(p_rsrc_txn_gtmp_rec IN gme_resource_txns_gtmp%ROWTYPE,
247 x_return_status OUT NOCOPY VARCHAR2);
248 END gme_api_grp;