DBA Data[Home] [Help]

APPS.HZ_IMP_ADDRESS_VAL_PKG SQL Statements

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

Line: 126

 cursor verify_imp_adapter is select count(ADAPTER_CONTENT_SOURCE)
 						  from 	 hz_imp_adapters
 						  where  batch_id = p_batch_id
 						  and    send_flag = 'Y';
Line: 131

 cursor imp_adapter_cur is select adapter_id,adapter_content_source,nvl(MAXIMUM_BATCH_SIZE,DEFAULT_BATCH_SIZE),
 							  DEFAULT_REPLACE_STATUS_LEVEL
   					   from   hz_adapters
   					   where  enabled_flag = 'Y'
   					   and    adapter_content_source in
   					   			(select distinct ADAPTER_CONTENT_SOURCE
   					   			 from 	 hz_imp_adapters
 						  	         where  batch_id = p_batch_id
 						  		 and    send_flag = 'Y') ;
Line: 141

 cursor imp_addresss_cur(v_adapter varchar2) is select rowid
 						from   hz_imp_addresses_int
 						where  batch_id = p_batch_id
 						and   country in
 							(select country_code from hz_imp_adapters
 							 where  adapter_content_source = v_adapter
 							 and    batch_id = p_batch_id
 							 and    send_flag = 'Y');
Line: 150

								not exists (select 'X' from fnd_territories
 										where TERRITORY_CODE = country)
 							);
Line: 155

 							(select territory_code from hz_adapter_territories
 							 where  adapter_id = v_adapter_id
 							 and default_flag = 'Y');*/
Line: 159

 cursor adapter_cur is select adapter_id,adapter_content_source,nvl(MAXIMUM_BATCH_SIZE,DEFAULT_BATCH_SIZE),
 							  DEFAULT_REPLACE_STATUS_LEVEL
   					   from   hz_adapters
   					   where  enabled_flag = 'Y'
   					   and    adapter_id in
   					   		(select distinct HZ_LOCATION_SERVICES_PUB.get_adapter_id(null,country)
  					   	 	 from   hz_imp_addresses_int
  							 where  batch_id = p_batch_id
							 --Bug No:3347996.Added conditions to overcome unnecessary calls to
							 --HZ_LOCATION_SERVICES_PUB.get_adapter_id.
							 and    country in (select distinct territory_code
								       from   hz_adapter_territories t,
								               hz_adapters ad
								       where  ad.adapter_id =t.adapter_id
								       and    ad.enabled_flag='Y'
								       and    t.enabled_flag='Y'
								       and    t.default_flag = 'Y')
							 and   exists (select 'X' from fnd_territories
 								       where TERRITORY_CODE = country)
							 ----End of Bug No:3347996
							);
Line: 181

 cursor addresss_cur(v_adapter_id number) is select rowid
 						from   hz_imp_addresses_int
 						where  batch_id = p_batch_id
 						and    country in
 							(select territory_code from hz_adapter_territories t,
							                            hz_adapters ad
 							 where  t.adapter_id = v_adapter_id
							 and    ad.adapter_id =t.adapter_id
							 and    ad.enabled_flag='Y'
							 and    t.enabled_flag='Y' --Bug No:3347996
 							 and    t.default_flag = 'Y')
 						and  exists (select 'X' from fnd_territories
 									 where TERRITORY_CODE = country);
Line: 195

 cursor addresss_cur_default is select rowid
 						from   hz_imp_addresses_int
 						where  batch_id = p_batch_id
						--Bug No:3347996
 						and    country not in ((select distinct territory_code
								        from   hz_adapter_territories t,
									       hz_adapters ad
								        where ad.adapter_id=t.adapter_id
									and    ad.enabled_flag='Y'
									and    t.enabled_flag='Y'
								        and    t.default_flag = 'Y'
									)UNION
									(select distinct country_code
									 from hz_imp_adapters
									 where batch_id = p_batch_id
									 and   send_flag= 'Y')
								        );
Line: 214

						--Bug No:3347996--and not exists (select 'X' from fnd_territories
 						--Bug No:3347996			where TERRITORY_CODE = country);
Line: 217

 cursor default_adapter is select  adapter_id,adapter_content_source,nvl(MAXIMUM_BATCH_SIZE,DEFAULT_BATCH_SIZE),
 							  DEFAULT_REPLACE_STATUS_LEVEL
 						   from  hz_adapters
 						   where enabled_flag = 'Y'
 						   and   adapter_id = to_number(fnd_profile.value('HZ_DEFAULT_LOC_ADAPTER'));
Line: 224

 		select 	country,count(decode(ACCEPT_STANDARDIZED_FLAG,'Y','Y',null))Validated_rec,
       			count(decode(ACCEPT_STANDARDIZED_FLAG,'N','N',null))Failed_rec,
       			count(ACCEPT_STANDARDIZED_FLAG)Total_rec
		from  	hz_imp_addresses_int
		where 	batch_id = p_batch_id
		and   	ACCEPT_STANDARDIZED_FLAG is not null
		group by country;
Line: 232

 cursor find_imp_country(p_country_code  varchar2) is select 'X' from hz_imp_adapters
 							where batch_id = p_batch_id
 							and country_code = p_country_code;
Line: 322

		    update HZ_IMP_BATCH_SUMMARY set ADDR_VAL_STATUS = 'ERROR'
		    where batch_id = l_batch_id;
Line: 358

      	 	update hz_imp_adapters
      	 	set RECORDS_PASSED_VALIDATION = rec.Validated_rec,
      	 		RECORDS_FAILED_VALIDATION = rec.Failed_rec,
      	 		TOTAL_RECORDS_VALIDATED = rec.Total_rec
      	 	where batch_id = p_batch_id
      	 	and COUNTRY_CODE = rec.country;
Line: 365

      	 	insert into hz_imp_adapters
      	 		(batch_id,country_code,RECORDS_PASSED_VALIDATION,
      	 	     RECORDS_FAILED_VALIDATION,TOTAL_RECORDS_VALIDATED,
      	 	     CREATED_BY,CREATION_DATE,LAST_UPDATED_BY,
				 LAST_UPDATE_DATE)
      	 	values(p_batch_id,rec.country,rec.Validated_rec,
      	 	       rec.Failed_rec,rec.Total_rec,
      	 	       -1,sysdate,-1,sysdate);
Line: 377

      update HZ_IMP_BATCH_SUMMARY set ADDR_VAL_STATUS = 'COMPLETED'
      where batch_id = l_batch_id;
Line: 431

	update HZ_IMP_BATCH_SUMMARY set ADDR_VAL_STATUS  = 'PROCESSING'
	where batch_id = l_batch_id returning ORIGINAL_SYSTEM into l_orig_system;
Line: 465

				update hz_imp_addresses_int
				set validation_subset_id = l_counter,
				    adapter_content_source = l_adapter_content_source(i)
				where rowid = l_row_id(j);
Line: 477

				      update HZ_IMP_BATCH_SUMMARY set ADDR_VAL_STATUS = 'ERROR'
				      where batch_id = l_batch_id;
Line: 521

	        update HZ_IMP_BATCH_SUMMARY set ADDR_VAL_STATUS  = 'ERROR'
		where batch_id = l_batch_id
		returning ORIGINAL_SYSTEM into l_orig_system;
Line: 549

			    UPDATE hz_imp_addresses_int
			    SET validation_subset_id = l_counter,
				adapter_content_source = l_adapter_content_source(i)
			    WHERE rowid = l_row_id(j);
Line: 561

			      UPDATE HZ_IMP_BATCH_SUMMARY set ADDR_VAL_STATUS = 'ERROR'
			      WHERE batch_id = l_batch_id;
Line: 635

Procedure  update_validated_address(
  p_SITE_ORIG_SYSTEM_REFERENCE  in	VARCHAR2 ,
  p_SITE_ORIG_SYSTEM	 		in	VARCHAR2 ,
  p_batch_id	 				in NUMBER,
  p_Address1	 				in VARCHAR2 DEFAULT NULL,
  p_Address2	 				in VARCHAR2 DEFAULT NULL,
  p_Address3	 				in VARCHAR2 DEFAULT NULL,
  p_Address4	 				in VARCHAR2 DEFAULT NULL,
  p_city	 	 				in VARCHAR2 DEFAULT NULL,
  p_county	 	 				in VARCHAR2 DEFAULT NULL,
  p_CountrySubEntity 			in VARCHAR2 DEFAULT NULL,
  p_country	 	 				in VARCHAR2 DEFAULT NULL,
  p_postal_code	 				in VARCHAR2 DEFAULT NULL,
  p_status		 				in VARCHAR2 DEFAULT NULL,
  P_OVERWRITE_THRESHOLD 		in VARCHAR2 DEFAULT NULL )is

begin

 UPDATE HZ_IMP_ADDRESSES_INT SET
 	Address1_std = p_Address1,
 	Address2_std = p_Address2,
	Address3_std = p_Address3,
	Address4_std = p_Address4,
	city_std   	 = p_city,
	county_std   = p_county,
	PROV_STATE_ADMIN_CODE_STD = p_CountrySubEntity,
	country_std  = nvl(upper(p_country), upper(country)),
	postal_code_std = p_postal_code,
	ACCEPT_STANDARDIZED_FLAG = compare_treshhold(p_status,P_OVERWRITE_THRESHOLD),
	DATE_VALIDATED = trunc(sysdate),
	ADDR_VALID_STATUS_CODE = p_status
 WHERE SITE_ORIG_SYSTEM_REFERENCE = P_SITE_ORIG_SYSTEM_REFERENCE
   AND SITE_ORIG_SYSTEM = P_SITE_ORIG_SYSTEM
   AND BATCH_ID = p_batch_id;
Line: 672

        FND_FILE.put_line(fnd_file.log,'Can not find record for update HZ_IMP_ADDRESSES_INT: ');
Line: 678

    	FND_FILE.put_line(fnd_file.log,'update_validated_address: Aborting processing inboundxml for this batch');
Line: 835

	  l_parameter_list.DELETE;