DBA Data[Home] [Help]

APPS.PV_PARTNER_GEO_MATCH_PVT dependencies on JTF_LOC_HIERARCHIES_VL

Line 101: from JTF_LOC_HIERARCHIES_VL LH

97: 'CREGION', 5,
98: 'COUNTRY', 6,
99: 'AREA2', 7,
100: 'AREA1', 8) LOC_TYPE
101: from JTF_LOC_HIERARCHIES_VL LH
102: where LH.location_hierarchy_id in (
103: SELECT * FROM TABLE (CAST(p_geo_hierarchy_id AS JTF_NUMBER_TABLE))
104: )
105: and lh.location_type_code in ('AREA1', 'AREA2', 'COUNTRY', 'CREGION', 'STATE', 'SREGION', 'CITY', 'POSTAL_CODE')

Line 118: from JTF_LOC_HIERARCHIES_VL LH

114:
115: CURSOR c_exist_postal (cv_postal_code VARCHAR2, cv_city_code VARCHAR2,
116: cv_state_code VARCHAR2, cv_country_code VARCHAR2) IS
117: select 'x'
118: from JTF_LOC_HIERARCHIES_VL LH
119: where LH.postal_code_start <= cv_postal_code
120: and LH.postal_code_end >= cv_postal_code
121: and LH.city_code = cv_city_code
122: and LH.state_code = cv_state_code

Line 130: from JTF_LOC_HIERARCHIES_VL LH

126: CURSOR c_exist_postal_sregion (cv_postal_code VARCHAR2, cv_city_code VARCHAR2,
127: cv_state_region_code VARCHAR2, cv_state_code VARCHAR2,
128: cv_country_code VARCHAR2) IS
129: select 'x'
130: from JTF_LOC_HIERARCHIES_VL LH
131: where LH.postal_code_start <= cv_postal_code
132: and LH.postal_code_end >= cv_postal_code
133: and LH.city_code = cv_city_code
134: and LH.state_region_code = cv_state_region_code

Line 143: from JTF_LOC_HIERARCHIES_VL LH

139: CURSOR c_exist_postal_cregion (cv_postal_code VARCHAR2, cv_city_code VARCHAR2,
140: cv_state_code VARCHAR2, cv_country_region_code VARCHAR2,
141: cv_country_code VARCHAR2) IS
142: select 'x'
143: from JTF_LOC_HIERARCHIES_VL LH
144: where LH.postal_code_start <= cv_postal_code
145: and LH.postal_code_end >= cv_postal_code
146: and LH.city_code = cv_city_code
147: and LH.state_code = cv_state_code

Line 155: from JTF_LOC_HIERARCHIES_VL LH

151:
152: CURSOR c_exist_city (cv_city_code VARCHAR2, cv_state_code VARCHAR2,
153: cv_country_code VARCHAR2) IS
154: select 'x'
155: from JTF_LOC_HIERARCHIES_VL LH
156: where LH.city_code = cv_city_code
157: and LH.state_code = cv_state_code
158: and LH.country_code = cv_country_code
159: and LH.location_type_code = 'CITY';

Line 164: from JTF_LOC_HIERARCHIES_VL LH

160:
161: CURSOR c_exist_city_sregion (cv_city_code VARCHAR2, cv_state_code VARCHAR2,
162: cv_state_region_code VARCHAR2, cv_country_code VARCHAR2) IS
163: select 'x'
164: from JTF_LOC_HIERARCHIES_VL LH
165: where LH.city_code = cv_city_code
166: and LH.state_region_code = cv_state_region_code
167: and LH.state_code = cv_state_code
168: and LH.country_code = cv_country_code

Line 174: from JTF_LOC_HIERARCHIES_VL LH

170:
171: CURSOR c_exist_city_cregion (cv_city_code VARCHAR2, cv_state_code VARCHAR2,
172: cv_country_code VARCHAR2, cv_country_region_code VARCHAR2) IS
173: select 'x'
174: from JTF_LOC_HIERARCHIES_VL LH
175: where LH.city_code = cv_city_code
176: and LH.state_code = cv_state_code
177: and LH.country_region_code = cv_country_region_code
178: and LH.country_code = cv_country_code

Line 183: from JTF_LOC_HIERARCHIES_VL LH

179: and LH.location_type_code = 'CITY';
180:
181: CURSOR c_exist_state (cv_state_code VARCHAR2, cv_country_code VARCHAR2) IS
182: select 'x'
183: from JTF_LOC_HIERARCHIES_VL LH
184: where LH.state_code = cv_state_code
185: and LH.country_code = cv_country_code
186: and lh.location_type_code = 'STATE';
187:

Line 191: from JTF_LOC_HIERARCHIES_VL LH

187:
188: CURSOR c_exist_state_cregion (cv_state_code VARCHAR2, cv_country_code VARCHAR2,
189: cv_country_region_code VARCHAR2) IS
190: select 'x'
191: from JTF_LOC_HIERARCHIES_VL LH
192: where LH.state_code = cv_state_code
193: and LH.country_region_code = cv_country_region_code
194: and LH.country_code = cv_country_code
195: and LH.location_type_code = 'STATE';

Line 199: from JTF_LOC_HIERARCHIES_VL LH

195: and LH.location_type_code = 'STATE';
196:
197: CURSOR c_exist_country (cv_country_code VARCHAR2) IS
198: select 'x'
199: from JTF_LOC_HIERARCHIES_VL LH
200: where LH.country_code = cv_country_code
201: and LH.location_type_code = 'COUNTRY';
202:
203: CURSOR c_exist_country_area2 (cv_country_code VARCHAR2, cv_area2_code VARCHAR2) IS

Line 205: from JTF_LOC_HIERARCHIES_VL LH

201: and LH.location_type_code = 'COUNTRY';
202:
203: CURSOR c_exist_country_area2 (cv_country_code VARCHAR2, cv_area2_code VARCHAR2) IS
204: select 'x'
205: from JTF_LOC_HIERARCHIES_VL LH
206: where LH.country_code = cv_country_code
207: and LH.area2_code = cv_area2_code
208: and LH.location_type_code = 'COUNTRY';
209:

Line 212: from JTF_LOC_HIERARCHIES_VL LH

208: and LH.location_type_code = 'COUNTRY';
209:
210: CURSOR c_exist_country_area1 (cv_country_code VARCHAR2, cv_area1_code VARCHAR2) IS
211: select 'x'
212: from JTF_LOC_HIERARCHIES_VL LH
213: where LH.country_code = cv_country_code
214: and LH.area1_code = cv_area1_code
215: and LH.location_type_code = 'COUNTRY';
216:

Line 272: -- exists in JTF_LOC_HIERARCHIES_VL.

268: FOR l_ordered_loc_rec IN c_get_ordered_loc
269: LOOP
270: IF l_ordered_loc_rec.type_code = 'POSTAL_CODE' THEN
271: -- If the code is the same, try to see if the partner address
272: -- exists in JTF_LOC_HIERARCHIES_VL.
273: SELECT substr(l_ordered_loc_rec.lowest_code, instr(l_ordered_loc_rec.lowest_code, '-')+1)
274: INTO l_postal_code_start
275: FROM dual;
276:

Line 305: -- exists in JTF_LOC_HIERARCHIES_VL.

301:
302: ELSIF l_ordered_loc_rec.type_code = 'CITY' THEN
303: IF l_ordered_loc_rec.lowest_code = l_address_rec.city THEN
304: -- If the code is the same, try to see if the partner address
305: -- exists in JTF_LOC_HIERARCHIES_VL.
306: -- call c_exist_city
307: FOR x IN c_exist_city(l_address_rec.city,
308: l_address_rec.state,
309: l_address_rec.country) LOOP

Line 331: -- If the l_address_rec.postal_code doesn't exist in JTF_LOC_HIERARCHIES_VL,

327: l_geo_hierarchy_id := l_ordered_loc_rec.location_hierarchy_id;
328: EXIT ordered_loc_loop;
329: END LOOP;
330:
331: -- If the l_address_rec.postal_code doesn't exist in JTF_LOC_HIERARCHIES_VL,
332: -- the city might exist. We drop the postal_code and try to match from city up.
333: -- call c_exist_city_sregion
334: FOR x IN c_exist_city_sregion(l_address_rec.city,
335: l_ordered_loc_rec.lowest_code,

Line 369: -- If the l_address_rec.postal_code doesn't exist in JTF_LOC_HIERARCHIES_VL,

365: l_geo_hierarchy_id := l_ordered_loc_rec.location_hierarchy_id;
366: EXIT ordered_loc_loop;
367: END LOOP;
368:
369: -- If the l_address_rec.postal_code doesn't exist in JTF_LOC_HIERARCHIES_VL,
370: -- the city might exist. We drop the postal_code and then try to
371: -- match from city up.
372: -- call c_exist_city_cregion
373: FOR x IN c_exist_city_cregion(l_address_rec.city,

Line 382: -- If the l_address_rec.postal_code doesn't exist in JTF_LOC_HIERARCHIES_VL,

378: l_geo_hierarchy_id := l_ordered_loc_rec.location_hierarchy_id;
379: EXIT ordered_loc_loop;
380: END LOOP;
381:
382: -- If the l_address_rec.postal_code doesn't exist in JTF_LOC_HIERARCHIES_VL,
383: -- the city might exist. We drop the postal_code and city and then try to
384: -- match from state up.
385: -- call c_exist_state_cregion
386: FOR x IN c_exist_state_cregion(l_address_rec.state,

Line 397: -- exists in JTF_LOC_HIERARCHIES_VL.

393:
394: ELSIF l_ordered_loc_rec.type_code = 'COUNTRY' THEN
395: IF l_ordered_loc_rec.lowest_code = l_address_rec.country THEN
396: -- If the code is the same, try to see if the partner address
397: -- exists in JTF_LOC_HIERARCHIES_VL.
398: -- call c_exist_country
399: FOR x IN c_exist_country(l_address_rec.country) LOOP
400: -- if found, get l_ordered_loc_rec.location_hierarchy_id
401: l_geo_hierarchy_id := l_ordered_loc_rec.location_hierarchy_id;

Line 510: from JTF_LOC_HIERARCHIES_VL LH

506: DECODE(LH.LOCATION_TYPE_CODE,
507: 'COUNTRY', 6,
508: 'AREA2', 7,
509: 'AREA1', 8) LOC_TYPE
510: from JTF_LOC_HIERARCHIES_VL LH
511: where LH.location_hierarchy_id in (
512: SELECT * FROM TABLE (CAST(p_geo_hierarchy_id AS JTF_NUMBER_TABLE))
513: )
514: and LH.LOCATION_TYPE_CODE in ('AREA1', 'AREA2', 'COUNTRY')

Line 519: from JTF_LOC_HIERARCHIES_VL LH

515: order by loc_type;
516:
517: CURSOR c_exist_country (cv_country_code VARCHAR2) IS
518: select 'x'
519: from JTF_LOC_HIERARCHIES_VL LH
520: where LH.country_code = cv_country_code
521: and LH.location_type_code = 'COUNTRY';
522:
523: CURSOR c_exist_country_area2 (cv_country_code VARCHAR2, cv_area2_code VARCHAR2) IS

Line 525: from JTF_LOC_HIERARCHIES_VL LH

521: and LH.location_type_code = 'COUNTRY';
522:
523: CURSOR c_exist_country_area2 (cv_country_code VARCHAR2, cv_area2_code VARCHAR2) IS
524: select 'x'
525: from JTF_LOC_HIERARCHIES_VL LH
526: where LH.country_code = cv_country_code
527: and LH.area2_code = cv_area2_code
528: and LH.location_type_code = 'COUNTRY';
529:

Line 532: from JTF_LOC_HIERARCHIES_VL LH

528: and LH.location_type_code = 'COUNTRY';
529:
530: CURSOR c_exist_country_area1 (cv_country_code VARCHAR2, cv_area1_code VARCHAR2) IS
531: select 'x'
532: from JTF_LOC_HIERARCHIES_VL LH
533: where LH.country_code = cv_country_code
534: and LH.area1_code = cv_area1_code
535: and LH.location_type_code = 'COUNTRY';
536:

Line 548: -- exists in JTF_LOC_HIERARCHIES_VL.

544: LOOP
545: IF l_ordered_loc_rec.type_code = 'COUNTRY' THEN
546: IF l_ordered_loc_rec.lowest_code = p_country THEN
547: -- If the code is the same, try to see if the partner address
548: -- exists in JTF_LOC_HIERARCHIES_VL.
549: -- call c_exist_country
550: FOR x IN c_exist_country(p_country) LOOP
551: -- if found, get l_ordered_loc_rec.location_hierarchy_id
552: l_geo_hierarchy_id := l_ordered_loc_rec.location_hierarchy_id;