38: /* **************************************************************************/
39: /* NAME */
40: /* recipe_exists */
41: /* DESCRIPTION */
42: /* This procedure will check if given id or name and version exist in GMD_RECIPES. */
43: /* If name and vers provided, id will be returned. */
44: /* PARAMETERS standard + recipe_id, recipe_no, recipe_vers */
45: /* RETURN VALUES standard + recipe_id */
46: /* 24Jul2001 L.R.Jackson Added "AND recipe_no is null" clause. */
68: /* recipe_id given as parameter. */
69:
70: CURSOR get_record_with_recipe_id(vRecipe_id NUMBER) IS
71: select recipe_id
72: from gmd_recipes_b
73: where recipe_id = vRecipe_id;
74:
75: --Gjha 27-Dec-2004 Bug 4073815 . Removed the Upper of UPPER(recipe_no) to improve the performance. The uniqueness is
76: -- is to be maintained for case-sensitive Recipe_no and Recipe_version.
76: -- is to be maintained for case-sensitive Recipe_no and Recipe_version.
77: CURSOR get_record_without_recipe_id(vRecipe_no VARCHAR2
78: ,vRecipe_version NUMBER) IS
79: select recipe_id
80: from gmd_recipes_b
81: where recipe_no = vRecipe_no
82: and recipe_version = vRecipe_version;
83:
84: /*** Variables ***/
140: /* ************************************************************************** */
141: /* NAME */
142: /* recipe_name */
143: /* DESCRIPTION */
144: /* This procedure will check if given name and version exist in GMD_RECIPES. */
145: /* If action_code = I and name+vers does not exist, success returned. */
146: /* If action_code = U and Nmae+vers exists, recipe_id will be returned */
147: /* PARAMETERS standard + recipe_no, recipe_vers, action_code=I(insert) or U(udpate) */
148: /* RETURN VALUES standard + recipe_id */
163: x_recipe_id OUT NOCOPY NUMBER)
164: IS
165: CURSOR get_record IS
166: select recipe_id
167: from gmd_recipes_b
168: where recipe_no = p_recipe_no
169: and recipe_version = p_recipe_version;
170:
171: /*** Variables ***/
324: x_return_code OUT NOCOPY NUMBER)
325: IS
326: CURSOR get_recipe_data IS
327: select last_update_date
328: from gmd_recipes
329: where recipe_id = p_recipe_id;
330:
331: /*** Variables ***/
332: l_api_name CONSTANT VARCHAR2(30) := 'RECIPE_FOR_UPDATE';
683:
684: /*** Variables ***/
685: l_api_name CONSTANT VARCHAR2(30) := 'RECIPE_CUST_EXISTS';
686: l_api_version CONSTANT NUMBER := 1.0;
687: l_recipe_id gmd_recipes.recipe_id%TYPE;
688:
689: BEGIN
690: /* no SAVEPOINT needed because there is no insert/update/delete */
691: IF NOT FND_API.Compatible_API_Call (l_api_version, p_api_version,