103: -- Standard Start of API savepoint
104: SAVEPOINT Get_Source_GRP;
105:
106: -- Standard call to check for call compatibility.
107: IF NOT fnd_api.compatible_api_call (l_api_version,
108: p_api_version,
109: l_api_name,
110: g_pkg_name
111: )
109: l_api_name,
110: g_pkg_name
111: )
112: THEN
113: RAISE fnd_api.g_exc_unexpected_error;
114: END IF;
115:
116: -- Initialize API return status to success
117: x_return_status := fnd_api.g_ret_sts_success;
113: RAISE fnd_api.g_exc_unexpected_error;
114: END IF;
115:
116: -- Initialize API return status to success
117: x_return_status := fnd_api.g_ret_sts_success;
118:
119: IF x_source_organization_id IS NOT NULL AND
120: x_source_subinventory IS NOT NULL THEN
121: x_return_status := fnd_api.g_ret_sts_success;
117: x_return_status := fnd_api.g_ret_sts_success;
118:
119: IF x_source_organization_id IS NOT NULL AND
120: x_source_subinventory IS NOT NULL THEN
121: x_return_status := fnd_api.g_ret_sts_success;
122: RETURN;
123: END IF;
124:
125:
166: | If mode is inventory you are done |
167: +---------------------------------------*/
168: IF p_mode = 'INVENTORY'
169: THEN
170: x_return_status := fnd_api.g_ret_sts_success;
171: RETURN;
172: END IF;
173: END IF;
174: EXCEPTION
213: | If mode is inventory you are done |
214: +---------------------------------------*/
215: IF p_mode = 'INVENTORY'
216: THEN
217: x_return_status := fnd_api.g_ret_sts_success;
218: RETURN;
219: END IF;
220: END IF;
221: EXCEPTION
258: | If mode is inventory you are done |
259: +---------------------------------------*/
260: IF p_mode = 'INVENTORY'
261: THEN
262: x_return_status := fnd_api.g_ret_sts_success;
263: RETURN;
264: END IF;
265: END IF;
266: EXCEPTION
302: | If mode is inventory you are done |
303: +---------------------------------------*/
304: IF p_mode = 'INVENTORY'
305: THEN
306: x_return_status := fnd_api.g_ret_sts_success;
307: RETURN;
308: END IF;
309: END IF;
310: EXCEPTION
322: TO_NUMBER(FND_PROFILE.VALUE('MRP_DEFAULT_ASSIGNMENT_SET'));
323:
324: IF var_set_id IS NULL
325: THEN
326: x_return_status := FND_API.G_RET_STS_ERROR ;
327: fnd_message.set_name('MRP', 'MRCONC-CANNOT GET PROFILE');
328: fnd_message.set_token('PROFILE', 'MRP_DEFAULT_ASSIGNMENT_SET');
329: RETURN;
330: END IF;
378: found_org := TRUE;
379: x_source_organization_id := var_source_org;
380: IF (p_mode = 'INVENTORY')
381: THEN
382: x_return_status := fnd_api.g_ret_sts_success;
383: RETURN;
384: END IF;
385: END IF;
386: END IF;
392: x_vendor_id := var_vendor_id;
393: x_vendor_site_code := var_new_site_code;
394: if (p_mode = 'VENDOR')
395: THEN
396: x_return_status := fnd_api.g_ret_sts_success;
397: RETURN;
398: END IF;
399: END IF;
400: IF (found_org = TRUE AND found_ven = TRUE)
398: END IF;
399: END IF;
400: IF (found_org = TRUE AND found_ven = TRUE)
401: THEN
402: x_return_status := fnd_api.g_ret_sts_success;
403: RETURN;
404: END IF;
405: END IF;
406: END LOOP;
408: found_org = FALSE) OR
409: ((p_mode = 'VENDOR' OR p_mode = 'BOTH')AND
410: found_ven = FALSE))
411: THEN
412: x_return_status := FND_API.G_RET_STS_ERROR ;
413: fnd_message.set_name('MRP', 'GEN-CANNOT SELECT');
414: fnd_message.set_token('SELECT', 'EC_SOURCE', TRUE);
415: fnd_message.set_token('ROUTINE', 'MRP_SOURCING', FALSE);
416: RETURN;
416: RETURN;
417: END IF;
418: EXCEPTION
419: WHEN NO_DATA_FOUND THEN
420: x_return_status := FND_API.G_RET_STS_ERROR ;
421: fnd_message.set_name('MRP', 'GEN-NO ROWS SELECTED');
422: fnd_message.set_token('TABLE', 'mrp_sources_v');
423: RETURN;
424: END;