DBA Data[Home] [Help]

APPS.OE_ITORD_PUB SQL Statements

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

Line: 31

					OE_ITORD_PUB.insert_rules(p_Item_Orderability_Import_Tbl(i));
Line: 126

	IF p_Item_Orderability_Import_Rec.last_updated_by  is NULL then
	     fnd_message.set_name('ONT','OE_ATTRIBUTE_REQUIRED');
Line: 128

             fnd_message.set_token('ATTRIBUTE','LAST_UPDATED_BY');
Line: 134

	IF p_Item_Orderability_Import_Rec.last_update_date  is NULL then
	     fnd_message.set_name('ONT','OE_ATTRIBUTE_REQUIRED');
Line: 136

             fnd_message.set_token('ATTRIBUTE','LAST_UPDATE_DATE');
Line: 170

			     SELECT 'Y' into l_exists
			     FROM HR_OPERATING_UNITS
			     where organization_id = p_Item_Orderability_Import_Rec.org_id
			     and rownum = 1;
Line: 239

	     select 'Y' into l_exists
	     from fnd_user where user_id = p_Item_Orderability_Import_Rec.created_by
	     and end_date is NULL;
Line: 255

IF p_Item_Orderability_Import_Rec.last_updated_by  is NULL then
	     begin
	     select 'Y' into l_exists
	     from fnd_user where user_id =  p_Item_Orderability_Import_Rec.last_updated_by
	     and end_date is NULL;
Line: 264

	        fnd_message.set_token('ATTRIBUTE','LAST_UPDATED_BY');
Line: 313

		    SELECT 'Y'
		    INTO l_exists
		    FROM hz_parties party,
			hz_cust_accounts acct
		    WHERE acct.party_id = party.party_id
		    AND   acct.status = 'A'
		    AND acct.cust_account_id = p_Item_Orderability_Import_Rec.customer_id ;
Line: 358

		         SELECT 'Y'
			 INTO l_exists
			 FROM hz_cust_profile_classes cpc
			 WHERE profile_class_id = p_Item_Orderability_Import_Rec.customer_class_id ;
Line: 403

		   SELECT 'Y'
		   INTO l_exists
		   FROM ar_lookups
		   WHERE lookup_type = 'CUSTOMER_CATEGORY'
		    AND lookup_code = p_Item_Orderability_Import_Rec.customer_category_code ;
Line: 442

		    SELECT 'Y'
		    INTO l_exists
		    FROM wsh_regions_v
		   WHERE region_id = p_Item_Orderability_Import_Rec.region_id;
Line: 480

		   SELECT 'Y'
		   INTO l_exists
		   FROM oe_order_types_v
		   WHERE order_type_id = p_Item_Orderability_Import_Rec.order_type_id ;
Line: 519

		   SELECT  'Y'
		   INTO l_exists
		   FROM hz_cust_site_uses_all site
		   WHERE site.site_use_code = 'SHIP_TO'
		    AND site.site_use_id= p_Item_Orderability_Import_Rec.SHIP_TO_LOCATION_ID;
Line: 558

		   SELECT 'Y'
		   INTO l_exists
		   FROM oe_lookups
		  WHERE lookup_type = 'SALES_CHANNEL'
		    AND lookup_code =p_Item_Orderability_Import_Rec.sales_channel_code;
Line: 599

		  SELECT 'Y'
		  INTO l_exists
		  FROM ra_salesreps
		  WHERE salesrep_id = p_Item_Orderability_Import_Rec.SALES_PERSON_ID;
Line: 639

		    SELECT 'Y'
		    INTO l_exists
		    FROM hz_parties party,
			hz_cust_accounts acct
		    WHERE acct.party_id = party.party_id
		    AND acct.cust_account_id = p_Item_Orderability_Import_Rec.end_customer_id ;
Line: 680

	    SELECT 'Y'
            INTO l_exists
            FROM hz_cust_site_uses_all site
            WHERE site.site_use_code = 'BILL_TO'
            AND site.site_use_id= p_Item_Orderability_Import_Rec.BILL_TO_LOCATION_ID ;
Line: 722

	   SELECT 'Y'
           INTO l_exists
           FROM hz_cust_site_uses_all site
           WHERE site.site_use_code = 'DELIVER_TO'
           AND site.site_use_id= p_Item_Orderability_Import_Rec.DELIVER_TO_LOCATION_ID;
Line: 765

		  select 'Y' into l_exists
		  from mtl_system_items_b
		  where inventory_item_id = p_Item_Orderability_Import_Rec.inventory_item_id
		  and organization_id = oe_sys_parameters.value('MASTER_ORGANIZATION_ID',p_Item_Orderability_Import_Rec.org_id );
Line: 795

				select 'Y' into l_exists
				from mtl_categories
				where category_id = p_Item_Orderability_Import_Rec.item_category_id ;
Line: 848

				 SELECT 'Y'
				 INTO l_exists
				 FROM mtl_item_categories ic,
				    mtl_default_category_sets cs,
				    oe_item_orderability oei
				 WHERE ic.category_set_id=cs.category_set_id
				 AND cs.functional_area_id = 7
				 AND ic.organization_id = oe_sys_parameters.Value('MASTER_ORGANIZATION_ID',p_Item_Orderability_Import_Rec.org_id)
				 AND ic.inventory_item_id = p_Item_Orderability_Import_Rec.inventory_item_id
				 AND oei.enable_flag='Y'
				 AND ic.category_id = oei.item_category_id
				 and org_id = p_Item_Orderability_Import_Rec.org_id
			        AND rownum = 1;
Line: 874

			sql_stmt :=    ' select count(1) '
			             || ' from oe_item_orderability io_hdr , oe_item_orderability_rules io_rules '
				     || ' where io_hdr.orderability_id = io_rules.orderability_id '
				     || ' and io_hdr.enable_flag = ''Y'' '
				     || ' and io_rules.enable_flag=''Y'' '
				     || ' and io_hdr.org_id = '|| p_Item_Orderability_Import_Rec.org_id
				     || ' and io_hdr.inventory_item_id = ' || p_Item_Orderability_Import_Rec.inventory_item_id
				     || ' and io_rules.rule_level = ' ||''''|| p_Item_Orderability_Import_Rec.rule_level ||''''
				     || ' and io_rules.'||l_rule_level_coulmn
				     || ' = ' ;
Line: 910

			       SELECT 'Y'
			       into l_exists
			       FROM mtl_item_categories ic,
				 mtl_default_category_sets cs,
				 oe_item_orderability oei
				WHERE ic.category_set_id=cs.category_set_id
				 AND cs.functional_area_id = 7
				 AND ic.organization_id=oe_sys_parameters.Value('MASTER_ORGANIZATION_ID',p_Item_Orderability_Import_Rec.org_id)
				 AND ic.inventory_item_id = oei.inventory_item_id
				 AND oei.enable_flag='Y'
				 AND ic.category_id = p_Item_Orderability_Import_Rec.ITEM_CATEGORY_ID
				 and org_id = p_Item_Orderability_Import_Rec.org_id
				 AND rownum = 1;
Line: 937

		sql_stmt :=    ' select count(1) '
			             || ' from oe_item_orderability io_hdr , oe_item_orderability_rules io_rules '
				     || ' where io_hdr.orderability_id = io_rules.orderability_id '
				     || ' and io_hdr.enable_flag = ''Y'' '
				     || ' and io_rules.enable_flag=''Y'' '
				     || ' and io_hdr.org_id = '|| p_Item_Orderability_Import_Rec.org_id
				     || ' and io_hdr.item_category_id = ' || p_Item_Orderability_Import_Rec.item_category_id
				     || ' and io_rules.rule_level = ' ||''''|| p_Item_Orderability_Import_Rec.rule_level ||''''
				     || ' and io_rules.'||l_rule_level_coulmn
				     || ' = ' ;
Line: 1042

Procedure insert_rules( p_Item_Orderability_Import_Rec IN OUT NOCOPY  OE_ITORD_PUB.Item_Orderability_Import_Rec ) IS

l_item_orderability_rec OE_ITORD_UTIL.Item_Orderability_Rec;
Line: 1054

	oe_debug_pub.add('Entering OE_ITORD_PUB.insert_rules');
Line: 1063

				select orderability_id into l_orderability_id
				from oe_item_orderability
				where  enable_flag = 'Y'
				and org_id = p_Item_Orderability_Import_Rec.org_id
				and   item_level = p_Item_Orderability_Import_Rec.ITEM_LEVEL
				and  ( inventory_item_id = p_Item_Orderability_Import_Rec.inventory_item_id
				      OR item_category_id  = p_Item_Orderability_Import_Rec.inventory_item_id );
Line: 1079

				SELECT OE_ITEM_ORDERABILITY_S.nextval
				INTO l_orderability_id
			        FROM dual;
Line: 1092

			        l_item_orderability_rec.last_updated_by     := p_Item_Orderability_Import_Rec.last_updated_by;
Line: 1093

			        l_item_orderability_rec.last_update_date    := p_Item_Orderability_Import_Rec.last_update_date;
Line: 1096

				OE_ITORD_UTIL.INSERT_ROW (l_item_orderability_rec,l_status);
Line: 1116

			      l_item_orderability_rules_rec.LAST_UPDATED_BY        := p_Item_Orderability_Import_Rec.last_updated_by;
Line: 1117

			      l_item_orderability_rules_rec.LAST_UPDATE_DATE       := p_Item_Orderability_Import_Rec.last_update_date;
Line: 1140

			OE_ITORD_UTIL.Insert_Row( l_item_orderability_rules_rec
                              , l_status
                              , l_rowid
                              );
Line: 1147

				 select orderability_id into l_orderability_id
				 from oe_item_orderability_rules where rowid = l_rowid ;
Line: 1158

	oe_debug_pub.add('Leaving OE_ITORD_PUB.insert_rules');
Line: 1168

End insert_rules;