DBA Data[Home] [Help]

APPS.GMD_RECIPE_FETCH_PUB SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 10

                             This procedure does no insert/update/delete
    P_validation_level - standard parameter
  OUT Parameters:
  x_return_status - standard parameter.  S=success,E=expected error,
                                         U=unexpected error
  x_msg_count     - standard parameter.  Num of messages generated
  x_msg_data      - standard parameter.  If only1 msg, here it is
  x_return_code   - num rows returned or SQLCODE (Database error number)*/
/*******************************************************************************
* Procedure get_recipe_id
*
* Procedure:-  This returns the recipe_id  based on the validity_rules_id
*               passed to it.
*
* Author :Pawan Kumar
*
*********************************************************************************/
PROCEDURE get_recipe_id(
        p_api_version                   IN              NUMBER          ,
        p_init_msg_list                 IN              VARCHAR2        ,
        p_recipe_validity_rule_id       IN              NUMBER          ,
        x_return_status                 OUT NOCOPY      VARCHAR2        ,
        x_msg_count                     OUT NOCOPY      NUMBER          ,
        x_msg_data                      OUT NOCOPY      VARCHAR2        ,
        x_return_code                   OUT NOCOPY      NUMBER          ,
        X_recipe_id                     OUT NOCOPY      NUMBER
) IS

/** local cursor to fetch the recipe_id from recipe_validity_rules table  **/
CURSOR get_recp IS
  SELECT recipe_id
  FROM   gmd_recipe_validity_rules
  WHERE  recipe_Validity_rule_id = p_recipe_Validity_rule_id ;
Line: 115

      SELECT routing_id
        FROM gmd_recipes_b
       WHERE recipe_id      = p_recipe_id  OR
             (recipe_no = p_recipe_no AND recipe_version = p_recipe_version);
Line: 195

   select routing_id, routing_no,routing_vers, routing_desc, routing_class, routing_qty,
	  routing_uom, delete_mark,text_code,inactive_ind,enforce_step_dependency,in_use,creation_date,created_by,
	  last_update_login, last_update_date , last_updated_by,process_loss, contiguous_ind,
	  effective_start_date, effective_end_date,owner_id,routing_status,OWNER_ORGANIZATION_ID,attribute_category,attribute1,
	  attribute2, attribute3,attribute4, attribute5, attribute6,
          attribute7,  attribute8, attribute9, attribute10,
          attribute11,  attribute12, attribute13, attribute14,
          attribute15,  attribute16, attribute17, attribute18,
          attribute19,  attribute20, attribute21, attribute22,
          attribute23,  attribute24, attribute25, attribute26,
          attribute27,  attribute28, attribute29, attribute30
   from fm_rout_hdr
   where routing_id = (select routing_id from gmd_recipes_b where recipe_id = p_recipe_id)

  ORDER BY routing_id;
Line: 233

         x_rout_out(i).delete_mark            		:= get_rec.delete_mark		;
Line: 246

       	 x_rout_out(i).last_updated_by 			:= get_rec.last_updated_by 	;
Line: 247

 	 x_rout_out(i).last_update_date 		:= get_rec.last_update_date 	;
Line: 248

 	 x_rout_out(i).last_update_login 		:= get_rec.last_update_login	;
Line: 336

      select formula_id
        from gmd_recipes_b
       where  recipe_id      = p_recipe_id OR
              (recipe_no = p_recipe_no and recipe_version = p_recipe_version);
Line: 414

  SELECT process_loss
  FROM   gmd_recipe_process_loss
  WHERE  recipe_id = p_recipe_id
  AND    organization_id = p_organization_id ;
Line: 512

        SELECT recipe_id, formulaline_id, routingstep_id, text_code,
               creation_date, created_by,last_updated_by,
               --Sriram.S   APS K Enhancements   03March2004   Bug# 3410379
               --Added the following columns to the select statement
               minimum_transfer_qty, minimum_delay, maximum_delay,
               last_update_date, last_update_login    ,
         --Rajesh Patangya DFF Enhancement 03Jan2008 Bug# 6195829
               ATTRIBUTE_CATEGORY,
               ATTRIBUTE1, ATTRIBUTE2, ATTRIBUTE3, ATTRIBUTE4, ATTRIBUTE5, ATTRIBUTE6,
               ATTRIBUTE7, ATTRIBUTE8, ATTRIBUTE9, ATTRIBUTE10, ATTRIBUTE11, ATTRIBUTE12,
               ATTRIBUTE13, ATTRIBUTE14, ATTRIBUTE15, ATTRIBUTE16, ATTRIBUTE17, ATTRIBUTE18,
               ATTRIBUTE19, ATTRIBUTE20, ATTRIBUTE21, ATTRIBUTE22, ATTRIBUTE23, ATTRIBUTE24,
               ATTRIBUTE25, ATTRIBUTE26, ATTRIBUTE27, ATTRIBUTE28, ATTRIBUTE29, ATTRIBUTE30
          FROM gmd_recipe_step_materials
         WHERE recipe_id = p_recipe_id  ;
Line: 554

 	 x_recipe_rout_matl_tbl(i).last_updated_by  := get_rec.last_updated_by ;
Line: 555

 	 x_recipe_rout_matl_tbl(i).last_update_date := get_rec.last_update_date ;
Line: 556

 	 x_recipe_rout_matl_tbl(i).last_update_login := get_rec.last_update_login;
Line: 660

  SELECT o.process_qty_uom ,d.routing_id,d.routingstep_id, d.routingstep_no, d.oprn_id, step_qty,
         d.steprelease_type,d.minimum_transfer_qty, o.oprn_no, o.oprn_vers, o.oprn_desc, d.creation_date,
         d.created_by,d.last_updated_by, d.last_update_date, d.last_update_login,
         d.attribute_category,d.attribute1,  d.attribute2, d.attribute3,
         d.attribute4, d.attribute5, d.attribute6,
         d.attribute7,  d.attribute8, d.attribute9, d.attribute10,
         d.attribute11,  d.attribute12, d.attribute13, d.attribute14,
         d.attribute15,  d.attribute16, d.attribute17, d.attribute18,
         d.attribute19,  d.attribute20, d.attribute21, d.attribute22,
         d.attribute23,  d.attribute24, d.attribute25, d.attribute26,
         d.attribute27,  d.attribute28, d.attribute29, d.attribute30
  FROM   fm_rout_dtl d, gmd_operations_vl o
  WHERE  d.routing_id = p_routing_id
  AND    d.oprn_id = o.oprn_id ;
Line: 706

       	 x_routing_step_out(i).last_updated_by	:= get_rec.last_updated_by ;
Line: 708

 	 x_routing_step_out(i).last_update_date := get_rec.last_update_date ;
Line: 710

 	 x_routing_step_out(i).last_update_login := get_rec.last_update_login;
Line: 814

    SELECT routing_id, calculate_step_quantity
    FROM   gmd_recipes_b
    WHERE  recipe_id = p_recipe_id;
Line: 819

  SELECT dtl.routingstep_no, oprn.oprn_id, oprn.oprn_no, oprn.oprn_desc, oprn.oprn_vers,
         stp.step_qty, oprn.process_qty_uom, stp.text_code, stp.routingstep_id, dtl.steprelease_type,
         dtl.minimum_transfer_qty, stp.recipe_id, stp.creation_date, stp.created_by,stp.last_updated_by,
         stp.last_update_date, stp.last_update_login, stp.attribute_category,
         stp.attribute1, stp.attribute2, stp.attribute3,  stp.attribute4,
         stp.attribute5, stp.attribute6, stp.attribute7,  stp.attribute8,
         stp.attribute9, stp.attribute10, stp.attribute11,  stp.attribute12,
         stp.attribute13, stp.attribute14, stp.attribute15,  stp.attribute16,
         stp.attribute17, stp.attribute18, stp.attribute19,  stp.attribute20,
         stp.attribute21, stp.attribute22, stp.attribute23,  stp.attribute24,
         stp.attribute25, stp.attribute26, stp.attribute27,  stp.attribute28,
         stp.attribute29, stp.attribute30
  FROM  gmd_recipe_routing_steps stp, fm_rout_dtl dtl, gmd_operations_vl oprn
  WHERE l_auto_calc = 0
        AND stp.recipe_id = p_recipe_id
        AND dtl.routingstep_id = stp.routingstep_id
        AND dtl.oprn_id = oprn.oprn_id
  UNION
  SELECT dtl.routingstep_no, oprn.oprn_id, oprn.oprn_no, oprn.oprn_desc, oprn.oprn_vers,
         dtl.step_qty, oprn.process_qty_uom,
         -- dtl.text_code,
          nvl(grrs.text_code,dtl.text_code),
         dtl.routingstep_id,dtl.steprelease_type,
         dtl.minimum_transfer_qty, 0 RECIPE_ID,
         /*dtl.creation_date, dtl.created_by,dtl.last_updated_by,
         dtl.last_update_date, dtl.last_update_login,  dtl.attribute_category,
         dtl.attribute1,  dtl.attribute2, dtl.attribute3,  dtl.attribute4,
         dtl.attribute5, dtl.attribute6, dtl.attribute7,  dtl.attribute8,
         dtl.attribute9, dtl.attribute10, dtl.attribute11,  dtl.attribute12,
         dtl.attribute13, dtl.attribute14, dtl.attribute15,  dtl.attribute16,
         dtl.attribute17, dtl.attribute18, dtl.attribute19,  dtl.attribute20,
         dtl.attribute21, dtl.attribute22, dtl.attribute23,  dtl.attribute24,
         dtl.attribute25, dtl.attribute26, dtl.attribute27,  dtl.attribute28,
         dtl.attribute29, dtl.attribute30*/
         nvl(grrs.creation_date,dtl.creation_date),
         nvl(grrs.created_by,dtl.created_by),
         nvl(grrs.last_updated_by,dtl.last_updated_by),
         nvl(grrs.last_update_date,dtl.last_update_date),
         nvl(grrs.last_update_login,dtl.last_update_login),
         nvl(grrs.attribute_category,dtl.attribute_category),
       nvl(grrs.attribute1,dtl.attribute1),
       nvl(grrs.attribute2,dtl.attribute2),
       nvl(grrs.attribute3,dtl.attribute3),
       nvl(grrs.attribute4,dtl.attribute4),
       nvl(grrs.attribute5,dtl.attribute5),
       nvl(grrs.attribute6,dtl.attribute6),
       nvl(grrs.attribute7,dtl.attribute7),
       nvl(grrs.attribute8,dtl.attribute8),
       nvl(grrs.attribute9,dtl.attribute9),
       nvl(grrs.attribute10,dtl.attribute10),
       nvl(grrs.attribute11,dtl.attribute11),
       nvl(grrs.attribute12,dtl.attribute12),
       nvl(grrs.attribute13,dtl.attribute13),
       nvl(grrs.attribute14,dtl.attribute14),
       nvl(grrs.attribute15,dtl.attribute15),
       nvl(grrs.attribute16,dtl.attribute16),
       nvl(grrs.attribute17,dtl.attribute17),
       nvl(grrs.attribute18,dtl.attribute18),
       nvl(grrs.attribute19,dtl.attribute19),
       nvl(grrs.attribute20,dtl.attribute20),
       nvl(grrs.attribute21,dtl.attribute21),
       nvl(grrs.attribute22,dtl.attribute22),
       nvl(grrs.attribute23,dtl.attribute23),
       nvl(grrs.attribute24,dtl.attribute24),
       nvl(grrs.attribute25,dtl.attribute25),
       nvl(grrs.attribute26,dtl.attribute26),
       nvl(grrs.attribute27,dtl.attribute27),
       nvl(grrs.attribute28,dtl.attribute28),
       nvl(grrs.attribute29,dtl.attribute29),
       nvl(grrs.attribute30,dtl.attribute30)
  FROM   fm_rout_dtl dtl, gmd_recipes_b recp ,  gmd_operations_vl oprn,
  gmd_recipe_routing_steps grrs /* Added in Bug No.8428182 */
  WHERE  recp.recipe_id = p_recipe_id
         AND grrs.recipe_id(+) = p_recipe_id /* Added in Bug No.8428182 */
         AND grrs.routingstep_id(+) = dtl.routingstep_id /* Added in Bug No.8428182 */
         AND dtl.routing_id = l_routing_id
         AND oprn.oprn_id = dtl.oprn_id
         AND  dtl.routingstep_id NOT IN (SELECT routingstep_id
                                           FROM gmd_recipe_routing_steps
                                          WHERE recipe_id   = p_recipe_id
                                            AND l_auto_calc = 0)
  ORDER BY routingstep_no;
Line: 906

    SELECT resources
    FROM   gmd_recipe_orgn_resources
    WHERE  routingstep_id = V_routingstep_id
    AND    recipe_id = p_recipe_id
    AND    organization_id = P_organization_id
    AND    max_capacity = V_max_capacity
    UNION
    SELECT r.resources
    FROM   fm_rout_dtl d, gmd_operation_resources r,
           gmd_operation_activities a, cr_rsrc_dtl d
    WHERE  d.routingstep_id = V_routingstep_id
    AND    d.oprn_id = a.oprn_id
    AND    a.oprn_line_id = r.oprn_line_id
    AND    r.resources = d.resources
    AND    organization_id = P_organization_id
    AND    d.max_capacity = V_max_capacity
    AND    capacity_constraint = 1
    UNION
    SELECT r.resources
    FROM   fm_rout_dtl d, gmd_operation_resources r,
           gmd_operation_activities a, cr_rsrc_mst m
    WHERE  d.routingstep_id = V_routingstep_id
    AND    d.oprn_id = a.oprn_id
    AND    a.oprn_line_id = r.oprn_line_id
    AND    r.resources = m.resources
    AND    m.max_capacity = V_max_capacity
    AND    capacity_constraint = 1;
Line: 935

  SELECT organization_code
    FROM org_access_view
   WHERE organization_id = p_organization_id;
Line: 1014

      x_recipe_step_out(i).last_updated_by   := get_rec.last_updated_by 	;
Line: 1016

      x_recipe_step_out(i).last_update_date  := get_rec.last_update_date 	;
Line: 1018

      x_recipe_step_out(i).last_update_login := get_rec.last_update_login	;
Line: 1138

        SELECT routingstep_no,dep_routingstep_no, routing_id, dep_type, rework_code,
               standard_delay, minimum_delay, max_delay, transfer_qty, RoutingStep_No_uom,
               transfer_pct, text_code, creation_date, created_by,last_updated_by,
               last_update_date, last_update_login,chargeable_ind
               --Sriram.S   APS K Enhancements   03March2004  Bug# 3410379
               --Added chargable_ind column to the select statement
        FROM   fm_rout_dep
        WHERE  routing_id = (SELECT routing_id
                               FROM gmd_recipes_b
                              WHERE recipe_id = p_recipe_id) ;
Line: 1206

       	 x_routing_depd_tbl(i).last_updated_by          := get_rec.last_updated_by ;
Line: 1208

 	 x_routing_depd_tbl(i).last_update_date         := get_rec.last_update_date ;
Line: 1210

 	 x_routing_depd_tbl(i).last_update_login        := get_rec.last_update_login;
Line: 1279

  SELECT d.routingstep_no routing_step_no,d.routingstep_id, o.oprn_no, o.oprn_desc, o.oprn_vers, o.oprn_id, o.minimum_transfer_qty,
         a.activity, fm.activity_desc,  ra.oprn_line_id oprnline_id, ra.activity_factor, a.offset_interval,
         a.break_ind, a.max_break,a.material_ind, a.sequence_dependent_ind, ra.recipe_id,
         ra.text_code,ra.creation_date, ra.created_by,ra.last_updated_by,
         ra.last_update_date, ra.last_update_login, ra.attribute_category,
         ra.attribute1, ra.attribute2, ra.attribute3,  ra.attribute4,
         ra.attribute5, ra.attribute6, ra.attribute7,  ra.attribute8,
         ra.attribute9, ra.attribute10, ra.attribute11,  ra.attribute12,
         ra.attribute13, ra.attribute14, ra.attribute15,  ra.attribute16,
         ra.attribute17, ra.attribute18, ra.attribute19,  ra.attribute20,
         ra.attribute21, ra.attribute22, ra.attribute23,  ra.attribute24,
         ra.attribute25, ra.attribute26, ra.attribute27,  ra.attribute28,
         ra.attribute29, ra.attribute30, 1 recipe_override
  FROM  gmd_recipe_orgn_activities ra, fm_rout_dtl d,
        gmd_operations_vl o, gmd_operation_activities a , fm_actv_mst fm
  WHERE ra.recipe_id = p_recipe_id
        AND  d.routingstep_id = ra.routingstep_id
        AND d.oprn_id = o.oprn_id
        AND a.activity = fm.activity
        AND ra.oprn_line_id = a.oprn_line_id
        AND (p_organization_id IS NULL  OR ra.organization_id = p_organization_id)

  UNION
  SELECT d.routingstep_no routing_step_no,d.routingstep_id, o.oprn_no, o.oprn_desc, o.oprn_vers,o.oprn_id,o.minimum_transfer_qty,
         a.activity,fm.activity_desc, a.oprn_line_id oprnline_id, a.activity_factor,a.offset_interval,
         a.break_ind, a.max_break, a.material_ind,a.sequence_dependent_ind, r.RECIPE_ID,
         a.text_code, a.creation_date, a.created_by,a.last_updated_by,
         a.last_update_date, a.last_update_login, a.attribute_category,
         a.attribute1,  a.attribute2, a.attribute3,  a.attribute4,
         a.attribute5, a.attribute6, a.attribute7,  a.attribute8,
         a.attribute9, a.attribute10, a.attribute11,  a.attribute12,
         a.attribute13, a.attribute14, a.attribute15,  a.attribute16,
         a.attribute17, a.attribute18, a.attribute19,  a.attribute20,
         a.attribute21, a.attribute22, a.attribute23,  a.attribute24,
         a.attribute25, a.attribute26, a.attribute27,  a.attribute28,
         a.attribute29, a.attribute30, 0 recipe_override
  FROM   fm_rout_dtl d, gmd_recipes_b r ,  gmd_operations_vl o, gmd_operation_activities a, fm_actv_mst fm
  WHERE  r.recipe_id = p_recipe_id
         AND d.routing_id = r.routing_id
         AND o.oprn_id = d.oprn_id
         AND a.oprn_id = o.oprn_id
         AND a.activity = fm.activity
         AND  a.oprn_line_id NOT IN (SELECT oprn_line_id
                                       FROM gmd_recipe_orgn_activities
                                      WHERE recipe_id = p_recipe_id
                                        AND (p_organization_id IS NULL or organization_id = p_organization_id))
--Added the order by for the bug 12613037.
  ORDER BY routing_step_no,offset_interval, activity, oprnline_id;
Line: 1362

       	 x_oprn_act_out(i).last_updated_by 	:= get_rec.last_updated_by ;
Line: 1363

 	 x_oprn_act_out(i).last_update_date 	:= get_rec.last_update_date ;
Line: 1364

 	 x_oprn_act_out(i).last_update_login 	:= get_rec.last_update_login;
Line: 1470

  SELECT r.recipe_id recipeid,
         d.routingstep_id , d.routingstep_no routing_step_no,
         o.oprn_id,o.oprn_no,o.oprn_vers, o.oprn_desc,
         a.activity,
         ror.oprn_line_id oprnline_id,ror.resources, ror.resource_usage, res.resource_count,
         ror.process_qty, res.prim_rsrc_ind, res.scale_type, res.cost_analysis_code,
         res.cost_cmpntcls_id, ror.usage_uom , a.offset_interval act_int, res.offset_interval res_int,
         ror.max_capacity, ror.min_capacity, m.capacity_um,m.capacity_constraint,
         m.capacity_tolerance,
         ror.process_um process_uom,
         /*
         ror.PROCESS_PARAMETER_1, ror.PROCESS_PARAMETER_2,
         ror.PROCESS_PARAMETER_3,ror.PROCESS_PARAMETER_4, ror.PROCESS_PARAMETER_5,
         */
         ror.text_code, ror.created_by,ror.last_updated_by,
         ror.last_update_date, ror.creation_date, ror.last_update_login,
         ror.attribute_category,
         ror.attribute1,  ror.attribute2, ror.attribute3, ror.attribute4,
         ror.attribute5, ror.attribute6, ror.attribute7,  ror.attribute8,
         ror.attribute9, ror.attribute10,  ror.attribute11,  ror.attribute12,
         ror.attribute13, ror.attribute14, ror.attribute15,  ror.attribute16,
         ror.attribute17, ror.attribute18, ror.attribute19,  ror.attribute20,
         ror.attribute21, ror.attribute22,ror.attribute23,  ror.attribute24,
         ror.attribute25, ror.attribute26, ror.attribute27,  ror.attribute28,
         ror.attribute29, ror.attribute30, 1 recipe_override,
         nvl(l.max_capacity,m.max_capacity)*(1+nvl(l.capacity_tolerance, m.capacity_tolerance)/100) max_calc_capacity,/*Added in bug13440294*/
         nvl(l.min_capacity, m.min_capacity)*(1-nvl(l.capacity_tolerance, m.capacity_tolerance)/100) min_calc_capacity /*Added in bug13440294*/
  FROM  gmd_recipes_b r, fm_rout_dtl d,gmd_operations_vl o,
        gmd_operation_activities a, gmd_recipe_orgn_resources ror,
        gmd_operation_resources res, cr_rsrc_mst_b m
        , cr_rsrc_dtl l /*Added in bug13440294*/
  WHERE r.recipe_id = p_recipe_id
    AND d.routing_id = r.routing_id
    AND d.oprn_id = o.oprn_id
    AND a.oprn_id = d.oprn_id
    AND a.oprn_line_id = res.oprn_line_id
    AND d.routingstep_id = ror.routingstep_id  -- Bug No.7652625
    AND ror.resources = res.resources
    AND res.resources = m.resources
    AND ror.oprn_line_id = res.oprn_line_id
    AND ror.recipe_id = r.recipe_id
    and  m.resources = l.resources (+) /*Added in bug13440294*/
--    AND (ror.organization_id = p_organization_id  OR organization_id IS NULL)
    AND (ror.organization_id = p_organization_id  OR p_organization_id IS NULL) /*Bug#7426185*/

  UNION

  SELECT r.recipe_id recipeid,
         d.routingstep_id , d.routingstep_no routing_step_no,
         o.oprn_id,o.oprn_no,o.oprn_vers, o.oprn_desc,
         a.activity,
         res.oprn_line_id oprnline_id,res.resources, res.resource_usage, res.resource_count,
         res.process_qty, prim_rsrc_ind, scale_type, cost_analysis_code, res.cost_cmpntcls_id,
         res.resource_usage_uom usage_uom, a.offset_interval act_int, res.offset_interval res_int,
         nvl(l.max_capacity,m.max_capacity) max_capacity,
         nvl(l.min_capacity, m.min_capacity) min_capacity,
         nvl(l.capacity_um,m.capacity_um) capacity_um,
         nvl(l.capacity_constraint, m.capacity_constraint) capacity_constraint,
         nvl(l.capacity_tolerance, m.capacity_tolerance) capacity_tolerance,
         res.resource_process_uom process_uom,
         /*
         PROCESS_PARAMETER_1, PROCESS_PARAMETER_2,
         PROCESS_PARAMETER_3,PROCESS_PARAMETER_4, PROCESS_PARAMETER_5,
         */
         res.text_code, res.created_by,res.last_updated_by,
         res.last_update_date, res.creation_date, res.last_update_login,
         res.attribute_category,
         res.attribute1,  res.attribute2, res.attribute3, res.attribute4,
         res.attribute5, res.attribute6, res.attribute7,  res.attribute8,
         res.attribute9, res.attribute10,  res.attribute11,  res.attribute12,
         res.attribute13, res.attribute14, res.attribute15,  res.attribute16,
         res.attribute17, res.attribute18, res.attribute19,  res.attribute20,
         res.attribute21, res.attribute22,res.attribute23,  res.attribute24,
         res.attribute25, res.attribute26, res.attribute27,  res.attribute28,
         res.attribute29, res.attribute30, 0 recipe_override,
         nvl(l.max_capacity,m.max_capacity)*(1+nvl(l.capacity_tolerance, m.capacity_tolerance)/100) max_calc_capacity,/*Added in bug13440294*/
         nvl(l.min_capacity, m.min_capacity)*(1-nvl(l.capacity_tolerance, m.capacity_tolerance)/100) min_calc_capacity /*Added in bug13440294*/

FROM    gmd_recipes_b r, fm_rout_dtl d, gmd_operations_vl o,gmd_operation_activities a,
        gmd_operation_resources res, cr_rsrc_mst_b m, cr_rsrc_dtl l
WHERE   r.recipe_id = p_recipe_id
AND     d.routing_id = r.routing_id
AND     d.oprn_id = o.oprn_id
AND     o.oprn_id = a.oprn_id
AND     a.oprn_line_id = res.oprn_line_id
AND     m.resources = res.resources
AND     m.resources = l.resources (+)
AND     l.organization_id (+) = p_organization_id
AND     (res.oprn_line_id, res.resources)
         NOT IN ( SELECT oprn_line_id, resources
                    FROM gmd_recipe_orgn_resources ror
                   WHERE recipe_id = p_recipe_id
                     AND (p_organization_id IS NULL OR organization_id = p_organization_id)
                     AND d.routingstep_id = ror.routingstep_id)  -- Bug No.7652625
 --Added the order by for the bug 12613037.
  ORDER BY recipeid, routing_step_no,act_int,activity, res_int,resources, oprnline_id ;
Line: 1622

       	 x_oprn_resc_rec(i).last_updated_by 	:= get_rec.last_updated_by ;
Line: 1624

 	 x_oprn_resc_rec(i).last_update_date 	:= get_rec.last_update_date ;
Line: 1626

 	 x_oprn_resc_rec(i).last_update_login 	:= get_rec.last_update_login;
Line: 1700

   SELECT dtl.routingstep_id, dtl.routingstep_no, act.oprn_line_id, res.resources
     FROM gmd_recipes_b rcp, fm_rout_dtl dtl,
          gmd_operation_activities act , gmd_operation_resources res
    WHERE rcp.recipe_id = p_recipe_id
      AND dtl.routing_id = rcp.routing_id
      AND dtl.oprn_id = act.oprn_id
      AND act.oprn_line_id = res.oprn_line_id;
Line: 1711

   SELECT p.parameter_id, parameter_name, parameter_description,
          units, r.target_value, r.minimum_value, r.maximum_value,p.parameter_type,r.sequence_no,
          r.created_by, r.creation_date, r.last_updated_by, r.last_update_date, r.last_update_login
     FROM gmp_resource_parameters r, gmp_process_parameters p
    WHERE p.parameter_id = r.parameter_id
      AND r.resources = V_resources
 ORDER BY r.sequence_no;
Line: 1722

  SELECT *
  FROM   gmd_oprn_process_parameters
  WHERE  oprn_line_id = V_oprn_line_id
  AND    resources = V_resources
  AND    parameter_id = V_parameter_id;
Line: 1733

  SELECT *
  FROM   gmd_recipe_process_parameters
  WHERE  recipe_id = p_recipe_id
  AND    organization_id = p_organization_id
  AND    routingstep_id = V_routingstep_id
  AND    oprn_line_id = V_oprn_line_id
  AND    resources = V_resources
  AND    parameter_id = V_parameter_id;
Line: 1746

      SELECT p.*
      FROM   gmp_plant_rsrc_parameters p, cr_rsrc_dtl c
      WHERE  p.resource_id = c.resource_id
      AND    organization_id = p_organization_id
      AND    resources = V_resources
      AND    parameter_id = V_parameter_id;
Line: 1762

    X_last_updated_by           gmd_recipe_process_parameters.last_updated_by%type      ;
Line: 1763

    X_last_update_date          gmd_recipe_process_parameters.last_update_date%type     ;
Line: 1765

    X_last_update_login         gmd_recipe_process_parameters.last_update_login%type    ;
Line: 1774

        X_last_updated_by       := l_rec.last_updated_by;
Line: 1776

        X_last_update_date      := l_rec.last_update_date;
Line: 1777

        X_last_update_login     := l_rec.last_update_login;
Line: 1791

            X_last_updated_by   := l_rcp_rec.last_updated_by;
Line: 1793

            X_last_update_date  := l_rcp_rec.last_update_date;
Line: 1794

            X_last_update_login := l_rcp_rec.last_update_login;
Line: 1810

            X_last_updated_by   := l_oprn_rec.last_updated_by;
Line: 1812

            X_last_update_date  := l_oprn_rec.last_update_date;
Line: 1813

            X_last_update_login := l_oprn_rec.last_update_login;
Line: 1829

            X_last_updated_by   := l_plnt_rec.last_updated_by;
Line: 1831

            X_last_update_date  := l_plnt_rec.last_update_date;
Line: 1832

            X_last_update_login := l_plnt_rec.last_update_login;
Line: 1855

        X_recp_resc_proc_param_tbl(X_row).last_updated_by       := X_last_updated_by;
Line: 1856

        X_recp_resc_proc_param_tbl(X_row).last_update_date      := X_last_update_date;
Line: 1857

        X_recp_resc_proc_param_tbl(X_row).last_update_login     := X_last_update_login;
Line: 1881

   SELECT parameter_description
     FROM gmp_process_parameters_tl
    WHERE parameter_id = p_parameter_id
      AND language = USERENV('LANG');
Line: 1907

 SELECT units
   FROM gmp_process_parameters_b
  WHERE parameter_id = p_parameter_id;
Line: 1944

        SELECT recipe_id, organization_id
          FROM gmd_recipe_validity_rules
         WHERE recipe_validity_rule_id = p_recipe_validity_rule_id;
Line: 1950

        SELECT contiguous_ind
          FROM gmd_recipe_process_loss
         WHERE recipe_id       = l_recp_id
           AND organization_id = l_orgn_id;
Line: 1957

        SELECT contiguous_ind
          FROM gmd_recipes_b
         WHERE recipe_id = l_recp_id;
Line: 2061

        SELECT recipe_id
          FROM gmd_recipe_validity_rules
         WHERE recipe_validity_rule_id = p_recipe_validity_rule_id;
Line: 2067

        SELECT enhanced_pi_ind
          FROM gmd_recipes_b
         WHERE recipe_id = l_recp_id;