284: /* Bug 3748697 - Recipe should only be created for automatic */
285: /* or optional setup */
286: CURSOR cur_recipe_enable (V_orgn_id NUMBER) IS
287: SELECT creation_type
288: FROM gmd_recipe_generation
289: WHERE organization_id = V_orgn_id
290: AND creation_type IN (1,2)
291: UNION
292: SELECT creation_type
289: WHERE organization_id = V_orgn_id
290: AND creation_type IN (1,2)
291: UNION
292: SELECT creation_type
293: FROM gmd_recipe_generation
294: WHERE organization_id IS NULL
295: AND creation_type IN (1,2)
296: AND NOT EXISTS (SELECT 1
297: FROM gmd_recipe_generation
293: FROM gmd_recipe_generation
294: WHERE organization_id IS NULL
295: AND creation_type IN (1,2)
296: AND NOT EXISTS (SELECT 1
297: FROM gmd_recipe_generation
298: WHERE organization_id = V_orgn_id);
299: l_creation_type NUMBER(5);
300: BEGIN
301: