42: --
43: -- 2. Serial Number Detailing in Picking
44: -- Currently the serial number detailing is quite simple. If the caller
45: -- gives a range (start, and end) serial numbers in the move order line
46: -- and pass p_suggest_serial as fnd_api.true, the engine will filter
47: -- the locations found from a rule, and suggest unused serial numbers
48: -- in the locator. If p_suggest_serial is passed as fnd_api.g_false
49: -- (default), the engine will not give serial numbers in the output.
50: --
44: -- Currently the serial number detailing is quite simple. If the caller
45: -- gives a range (start, and end) serial numbers in the move order line
46: -- and pass p_suggest_serial as fnd_api.true, the engine will filter
47: -- the locations found from a rule, and suggest unused serial numbers
48: -- in the locator. If p_suggest_serial is passed as fnd_api.g_false
49: -- (default), the engine will not give serial numbers in the output.
50: --
51: -- Input Parameters
52: -- p_api_version_number standard input parameter
78: -- This project is available only in for R121 and mainline. To retain dual maintenance INV code changes are made in branchline, however it will not affect any existing flow.
79: PROCEDURE create_suggestions
80: (
81: p_api_version IN NUMBER,
82: p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false,
83: p_commit IN VARCHAR2 DEFAULT fnd_api.g_false,
84: p_validation_level IN NUMBER DEFAULT fnd_api.g_valid_level_none,
85: x_return_status OUT NOCOPY VARCHAR2,
86: x_msg_count OUT NOCOPY NUMBER,
79: PROCEDURE create_suggestions
80: (
81: p_api_version IN NUMBER,
82: p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false,
83: p_commit IN VARCHAR2 DEFAULT fnd_api.g_false,
84: p_validation_level IN NUMBER DEFAULT fnd_api.g_valid_level_none,
85: x_return_status OUT NOCOPY VARCHAR2,
86: x_msg_count OUT NOCOPY NUMBER,
87: x_msg_data OUT NOCOPY VARCHAR2,
80: (
81: p_api_version IN NUMBER,
82: p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false,
83: p_commit IN VARCHAR2 DEFAULT fnd_api.g_false,
84: p_validation_level IN NUMBER DEFAULT fnd_api.g_valid_level_none,
85: x_return_status OUT NOCOPY VARCHAR2,
86: x_msg_count OUT NOCOPY NUMBER,
87: x_msg_data OUT NOCOPY VARCHAR2,
88: p_transaction_temp_id IN NUMBER,
86: x_msg_count OUT NOCOPY NUMBER,
87: x_msg_data OUT NOCOPY VARCHAR2,
88: p_transaction_temp_id IN NUMBER,
89: p_reservations IN inv_reservation_global.mtl_reservation_tbl_type,
90: p_suggest_serial IN VARCHAR2 DEFAULT fnd_api.g_false,
91: p_plan_tasks IN BOOLEAN,
92: p_quick_pick_flag IN VARCHAR2 DEFAULT 'N',
93: p_organization_id IN NUMBER,
94: p_wave_simulation_mode IN VARCHAR2 DEFAULT 'N'
94: p_wave_simulation_mode IN VARCHAR2 DEFAULT 'N'
95: ) is
96: l_api_version CONSTANT NUMBER := 1.0;
97: l_api_name CONSTANT VARCHAR2(30) := 'Create_Suggestions';
98: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
99: l_msg_count NUMBER;
100: l_msg_data VARCHAR2(2000);
101: l_wms_installed BOOLEAN;
102: l_org_id NUMBER;
121: END IF;
122: -- end of debugging section
123: --
124: -- Standard Call to check for call compatibility
125: IF NOT fnd_api.Compatible_API_Call(l_api_version
126: , p_api_version
127: , l_api_name
128: , g_pkg_name) THEN
129: RAISE fnd_api.g_exc_unexpected_error;
125: IF NOT fnd_api.Compatible_API_Call(l_api_version
126: , p_api_version
127: , l_api_name
128: , g_pkg_name) THEN
129: RAISE fnd_api.g_exc_unexpected_error;
130: END IF;
131: --
132: -- Initialize message list if p_init_msg_list is set to true
133: IF fnd_api.to_boolean(p_init_msg_list) THEN
129: RAISE fnd_api.g_exc_unexpected_error;
130: END IF;
131: --
132: -- Initialize message list if p_init_msg_list is set to true
133: IF fnd_api.to_boolean(p_init_msg_list) THEN
134: fnd_msg_pub.initialize;
135: END IF;
136: --
137: -- Initialisize API return status to access
134: fnd_msg_pub.initialize;
135: END IF;
136: --
137: -- Initialisize API return status to access
138: x_return_status := fnd_api.g_ret_sts_success;
139: --
140: -- Detailing starts here
141: --
142: -- Fix 5264987 : Query DB only if p_organization_id is not passed/-9999
166: x_msg_data => l_msg_data,
167: p_organization_id => l_org_id); */
168: l_return_value := INV_CACHE.set_wms_installed(l_org_id);
169: If NOT l_return_value Then
170: RAISE fnd_api.g_exc_unexpected_error;
171: End If;
172: l_wms_installed := INV_CACHE.wms_installed;
173: --End of Changes for Bug#3153166
174:
181: THEN
182: gmi_reservation_util.println('calling inv crreate_sugg');
183: inv_autodetail.create_suggestions
184: ( p_api_version => 1.0,
185: p_init_msg_list => fnd_api.g_false,
186: p_commit => fnd_api.g_false,
187: p_validation_level => p_validation_level,
188: x_return_status => l_return_status,
189: x_msg_count => l_msg_count,
182: gmi_reservation_util.println('calling inv crreate_sugg');
183: inv_autodetail.create_suggestions
184: ( p_api_version => 1.0,
185: p_init_msg_list => fnd_api.g_false,
186: p_commit => fnd_api.g_false,
187: p_validation_level => p_validation_level,
188: x_return_status => l_return_status,
189: x_msg_count => l_msg_count,
190: x_msg_data => l_msg_data,
196: IF (l_current_release_level >= l_j_release_level ) THEN
197: gmi_reservation_util.println(' calling >=J wms create_sugg, 11511 is included');
198: wms_engine_pvt.create_suggestions
199: ( p_api_version => 1.0,
200: p_init_msg_list => fnd_api.g_false,
201: p_commit => fnd_api.g_false,
202: p_validation_level => p_validation_level,
203: x_return_status => l_return_status,
204: x_msg_count => l_msg_count,
197: gmi_reservation_util.println(' calling >=J wms create_sugg, 11511 is included');
198: wms_engine_pvt.create_suggestions
199: ( p_api_version => 1.0,
200: p_init_msg_list => fnd_api.g_false,
201: p_commit => fnd_api.g_false,
202: p_validation_level => p_validation_level,
203: x_return_status => l_return_status,
204: x_msg_count => l_msg_count,
205: x_msg_data => l_msg_data,
213: ELSE
214: gmi_reservation_util.println(' calling
216: ( p_api_version => 1.0,
217: p_init_msg_list => fnd_api.g_false,
218: p_commit => fnd_api.g_false,
219: p_validation_level => p_validation_level,
220: x_return_status => l_return_status,
221: x_msg_count => l_msg_count,
214: gmi_reservation_util.println(' calling
216: ( p_api_version => 1.0,
217: p_init_msg_list => fnd_api.g_false,
218: p_commit => fnd_api.g_false,
219: p_validation_level => p_validation_level,
220: x_return_status => l_return_status,
221: x_msg_count => l_msg_count,
222: x_msg_data => l_msg_data,
227: );
228: END IF;
229: END IF;
230:
231: IF l_return_status = fnd_api.g_ret_sts_error THEN
232: RAISE fnd_api.g_exc_error;
233: END IF;
234: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
235: RAISE fnd_api.g_exc_unexpected_error;
228: END IF;
229: END IF;
230:
231: IF l_return_status = fnd_api.g_ret_sts_error THEN
232: RAISE fnd_api.g_exc_error;
233: END IF;
234: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
235: RAISE fnd_api.g_exc_unexpected_error;
236: END IF;
230:
231: IF l_return_status = fnd_api.g_ret_sts_error THEN
232: RAISE fnd_api.g_exc_error;
233: END IF;
234: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
235: RAISE fnd_api.g_exc_unexpected_error;
236: END IF;
237: -- Standard check of p_commit
238: IF fnd_api.to_boolean(p_commit) THEN
231: IF l_return_status = fnd_api.g_ret_sts_error THEN
232: RAISE fnd_api.g_exc_error;
233: END IF;
234: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
235: RAISE fnd_api.g_exc_unexpected_error;
236: END IF;
237: -- Standard check of p_commit
238: IF fnd_api.to_boolean(p_commit) THEN
239: COMMIT;
234: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
235: RAISE fnd_api.g_exc_unexpected_error;
236: END IF;
237: -- Standard check of p_commit
238: IF fnd_api.to_boolean(p_commit) THEN
239: COMMIT;
240: END IF;
241: --
242: -- debugging section
246: END IF;
247: -- end of debugging section
248: --
249: EXCEPTION
250: WHEN fnd_api.g_exc_error THEN
251: x_return_status := fnd_api.g_ret_sts_error;
252: fnd_msg_pub.Count_And_Get
253: ( p_count => x_msg_count
254: ,p_data => x_msg_data);
247: -- end of debugging section
248: --
249: EXCEPTION
250: WHEN fnd_api.g_exc_error THEN
251: x_return_status := fnd_api.g_ret_sts_error;
252: fnd_msg_pub.Count_And_Get
253: ( p_count => x_msg_count
254: ,p_data => x_msg_data);
255: --
252: fnd_msg_pub.Count_And_Get
253: ( p_count => x_msg_count
254: ,p_data => x_msg_data);
255: --
256: WHEN fnd_api.g_exc_unexpected_error THEN
257: x_return_status := fnd_api.g_ret_sts_unexp_error;
258: fnd_msg_pub.Count_And_Get
259: ( p_count => x_msg_count
260: ,p_data => x_msg_data);
253: ( p_count => x_msg_count
254: ,p_data => x_msg_data);
255: --
256: WHEN fnd_api.g_exc_unexpected_error THEN
257: x_return_status := fnd_api.g_ret_sts_unexp_error;
258: fnd_msg_pub.Count_And_Get
259: ( p_count => x_msg_count
260: ,p_data => x_msg_data);
261: --
259: ( p_count => x_msg_count
260: ,p_data => x_msg_data);
261: --
262: WHEN OTHERS THEN
263: x_return_status := fnd_api.g_ret_sts_unexp_error;
264: IF fnd_msg_pub.Check_Msg_Level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
265: fnd_msg_pub.Add_Exc_Msg(g_pkg_name, l_api_name);
266: END IF;
267: fnd_msg_pub.count_and_get
272: -- Create_suggestions api is overloaded for Performance bug fix 5264987
273: PROCEDURE create_suggestions
274: (
275: p_api_version IN NUMBER,
276: p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false,
277: p_commit IN VARCHAR2 DEFAULT fnd_api.g_false,
278: p_validation_level IN NUMBER DEFAULT fnd_api.g_valid_level_none,
279: x_return_status OUT NOCOPY VARCHAR2,
280: x_msg_count OUT NOCOPY NUMBER,
273: PROCEDURE create_suggestions
274: (
275: p_api_version IN NUMBER,
276: p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false,
277: p_commit IN VARCHAR2 DEFAULT fnd_api.g_false,
278: p_validation_level IN NUMBER DEFAULT fnd_api.g_valid_level_none,
279: x_return_status OUT NOCOPY VARCHAR2,
280: x_msg_count OUT NOCOPY NUMBER,
281: x_msg_data OUT NOCOPY VARCHAR2,
274: (
275: p_api_version IN NUMBER,
276: p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false,
277: p_commit IN VARCHAR2 DEFAULT fnd_api.g_false,
278: p_validation_level IN NUMBER DEFAULT fnd_api.g_valid_level_none,
279: x_return_status OUT NOCOPY VARCHAR2,
280: x_msg_count OUT NOCOPY NUMBER,
281: x_msg_data OUT NOCOPY VARCHAR2,
282: p_transaction_temp_id IN NUMBER,
280: x_msg_count OUT NOCOPY NUMBER,
281: x_msg_data OUT NOCOPY VARCHAR2,
282: p_transaction_temp_id IN NUMBER,
283: p_reservations IN inv_reservation_global.mtl_reservation_tbl_type,
284: p_suggest_serial IN VARCHAR2 DEFAULT fnd_api.g_false,
285: p_plan_tasks IN BOOLEAN,
286: p_quick_pick_flag IN VARCHAR2 DEFAULT 'N',
287: p_wave_simulation_mode IN VARCHAR2 DEFAULT 'N'
288: ) is