DBA Data[Home] [Help]

APPS.WIP_FLOW_DERIVE SQL Statements

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

Line: 171

	     select BOR.COMPLETION_SUBINVENTORY
	     into   p_comp_sub
             from   BOM_OPERATIONAL_ROUTINGS BOR
             where  BOR.ORGANIZATION_ID = p_org_id
             and    BOR.ASSEMBLY_ITEM_ID = p_item_id
             and    NVL(BOR.ALTERNATE_ROUTING_DESIGNATOR,'@@@') =
                          NVL(p_alt_rtg_des, '@@@');
Line: 206

               select BOR.COMPLETION_SUBINVENTORY,
                      BOR.COMPLETION_LOCATOR_ID
               into   p_rout_comp_sub,
                      p_rout_comp_loc
               from   BOM_OPERATIONAL_ROUTINGS BOR
               where  BOR.ORGANIZATION_ID = p_org_id
               and    BOR.ASSEMBLY_ITEM_ID = p_item_id
               and    NVL(BOR.ALTERNATE_ROUTING_DESIGNATOR,'@@@') =
                            NVL(p_alt_rtg_des, '@@@') ;
Line: 284

      select count(*) into l_success
      from mtl_item_locations
      where inventory_location_id = p_comp_loc
      and organization_id = p_org_id
      and subinventory_code = p_comp_sub ;
Line: 336

                select count(*) into x_loc_seg_exists
                from mtl_transactions_interface
                where transaction_interface_id = p_txn_int_id
                and (  LOC_SEGMENT1 is not null
                       or LOC_SEGMENT2 is not null
                       or LOC_SEGMENT3 is not null
                       or LOC_SEGMENT4 is not null
                       or LOC_SEGMENT5 is not null
                       or LOC_SEGMENT6 is not null
                       or LOC_SEGMENT7 is not null
                       or LOC_SEGMENT8 is not null
                       or LOC_SEGMENT9 is not null
                       or LOC_SEGMENT10 is not null
                       or LOC_SEGMENT11 is not null
                       or LOC_SEGMENT12 is not null
                       or LOC_SEGMENT13 is not null
                       or LOC_SEGMENT14 is not null
                       or LOC_SEGMENT15 is not null
                       or LOC_SEGMENT16 is not null
                       or LOC_SEGMENT17 is not null
                       or LOC_SEGMENT18 is not null
                       or LOC_SEGMENT19 is not null
                       or LOC_SEGMENT20 is not null
                   ) ;
Line: 401

		     select count(*) into x_success
		     from mtl_item_locations
		     where inventory_location_id = p_comp_loc
		     and organization_id = p_org_id
		     and subinventory_code = p_comp_sub ;
Line: 511

                select WIP_JOB_NUMBER_S.nextval into p_sched_num
                from dual ;
Line: 526

function Last_Updated_Id(p_last_up_by_name in out NOCOPY varchar2,
			      p_last_up_id in out NOCOPY number) return number is
x_success number := 0;
Line: 533

	   select USER_ID
	   into p_last_up_id
	   from FND_USER
	   where USER_NAME = p_last_up_by_name ;
Line: 540

           select USER_NAME
           into p_last_up_by_name
           from FND_USER
           where USER_ID = p_last_up_id ;
Line: 553

END Last_Updated_Id;
Line: 562

           select USER_ID
	   into p_created_id
           from FND_USER
           where USER_NAME = p_created_by_name ;
Line: 569

           select USER_NAME
           into p_created_by_name
           from FND_USER
           where USER_ID = p_created_id ;
Line: 593

	    select ORGANIZATION_ID
	    into p_org_id
	    --from ORG_ORGANIZATION_DEFINITIONS
            from mtl_parameters
	    where ORGANIZATION_CODE = p_org_name ;
Line: 601

            select ORGANIZATION_CODE
            into p_org_name
            --from ORG_ORGANIZATION_DEFINITIONS
            from mtl_parameters
            where ORGANIZATION_ID = p_org_id ;
Line: 640

		select wip_entity_id
		into p_txn_src_id
		from wip_entities we
		where we.organization_id = p_org_id
		and we.wip_entity_name  = p_txn_src_name ;
Line: 648

                select wip_entity_name
                into p_txn_src_name
                from wip_entities we
                where we.organization_id = p_org_id
                and we.wip_entity_id  = p_txn_src_id ;
Line: 691

	select
		nvl(p_sched_num, schedule_number),
		nvl(p_src_proj_id,project_id),
		nvl(p_src_task_id,task_id),
		nvl(p_proj_id,project_id),
		nvl(p_task_id,task_id),
		nvl(p_bom_rev,bom_revision),
		nvl(p_bom_rev_date,bom_revision_date),
		nvl(p_rout_rev,routing_revision),
		nvl(p_rout_rev_date,routing_revision_date),
		Decode(p_txn_action_id, 30, NULL, nvl(p_comp_sub,completion_subinventory)),-- CFM Scrap
		nvl(p_class_code,class_code),
		nvl(p_wip_entity_type,4),  -- Work Order-less Completions
		-- fix bug#956467
		Decode(p_txn_action_id, 30, NULL,nvl(p_comp_loc,completion_locator_id)),-- CFM Scrap
		nvl(p_alt_rtg_des,alternate_routing_designator),
		nvl(p_alt_bom_des,alternate_bom_designator),
		scheduled_completion_date
	into
		p_sched_num,
		p_src_proj_id,
		p_src_task_id,
		p_proj_id,
		p_task_id,
		p_bom_rev,
		p_bom_rev_date,
		p_rout_rev,
		p_rout_rev_date,
		p_comp_sub,
		p_class_code,
		p_wip_entity_type,
		p_comp_loc,
		p_alt_rtg_des,
		p_alt_bom_des,
		x_sched_cmp_date
	from
		wip_flow_schedules
	where
		wip_entity_id = p_txn_src_id
		and organization_id = p_org_id ;
Line: 840

               select null,null           /*completion subinventory is inactive */
               into p_comp_sub,p_comp_loc
               from   mtl_secondary_inventories
               where  organization_id = p_org_id
               and    secondary_inventory_name = p_comp_sub
               and   (
                        NVL(disable_date, TRUNC(p_start_date)+1) <= TRUNC(p_start_date)
                              OR
                       /*Bug3784658. Consider material status */
                        wip_utilities.is_status_applicable(NULL,
                                                           p_txn_type_id,
                                                           NULL,
                                                           NULL,
                                                           p_org_id,
                                                           p_item_id,
                                                           p_comp_sub,
                                                           NULL,
                                                           NULL,
                                                           NULL,
                                                           'Z') = 'N');