DBA Data[Home] [Help]

APPS.FND_TERRITORIES_PKG dependencies on FND_TERRITORIES

Line 1: package body FND_TERRITORIES_PKG as

1: package body FND_TERRITORIES_PKG as
2: /* $Header: AFNLDTIB.pls 120.4.12010000.2 2008/07/31 13:20:46 jvalenti ship $ */
3:
4: procedure INSERT_ROW (
5: X_ROWID in out nocopy VARCHAR2,

Line 24: FND_TERRITORIES_PKG.INSERT_ROW(

20: X_LAST_UPDATED_BY in NUMBER,
21: X_LAST_UPDATE_LOGIN in NUMBER
22: ) is
23: begin
24: FND_TERRITORIES_PKG.INSERT_ROW(
25: X_ROWID,
26: X_TERRITORY_CODE,
27: X_EU_CODE,
28: X_ISO_NUMERIC_CODE,

Line 66: FND_TERRITORIES_PKG.INSERT_ROW(

62: X_LAST_UPDATE_LOGIN in NUMBER,
63: X_OBSOLETE_FLAG in VARCHAR2
64: ) is
65: begin
66: FND_TERRITORIES_PKG.INSERT_ROW(
67: X_ROWID,
68: X_TERRITORY_CODE,
69: X_EU_CODE,
70: X_ISO_NUMERIC_CODE,

Line 109: cursor C is select ROWID from FND_TERRITORIES

105: X_LAST_UPDATE_LOGIN in NUMBER,
106: X_OBSOLETE_FLAG in VARCHAR2,
107: X_ISO_TERRITORY_CODE in VARCHAR2
108: ) is
109: cursor C is select ROWID from FND_TERRITORIES
110: where TERRITORY_CODE = X_TERRITORY_CODE
111: ;
112: obsolete_flag varchar2(1);
113: begin

Line 117: insert into FND_TERRITORIES (

113: begin
114:
115: obsolete_flag := nvl(X_OBSOLETE_FLAG, 'N');
116:
117: insert into FND_TERRITORIES (
118: EU_CODE,
119: TERRITORY_CODE,
120: ISO_NUMERIC_CODE,
121: ALTERNATE_TERRITORY_CODE,

Line 153: insert into FND_TERRITORIES_TL (

149: obsolete_flag,
150: X_ISO_TERRITORY_CODE
151: );
152:
153: insert into FND_TERRITORIES_TL (
154: TERRITORY_CODE,
155: TERRITORY_SHORT_NAME,
156: CREATED_BY,
157: CREATION_DATE,

Line 179: from FND_TERRITORIES_TL T

175: from FND_LANGUAGES L
176: where L.INSTALLED_FLAG in ('I', 'B')
177: and not exists
178: (select NULL
179: from FND_TERRITORIES_TL T
180: where T.TERRITORY_CODE = X_TERRITORY_CODE
181: and T.LANGUAGE = L.LANGUAGE_CODE);
182:
183: open c;

Line 215: from FND_TERRITORIES

211: ADDRESS_STYLE,
212: ADDRESS_VALIDATION,
213: BANK_INFO_STYLE,
214: BANK_INFO_VALIDATION
215: from FND_TERRITORIES
216: where TERRITORY_CODE = X_TERRITORY_CODE
217: for update of TERRITORY_CODE nowait;
218: recinfo c%rowtype;
219:

Line 224: from FND_TERRITORIES_TL

220: cursor c1 is select
221: TERRITORY_SHORT_NAME,
222: DESCRIPTION,
223: decode(LANGUAGE, userenv('LANG'), 'Y', 'N') BASELANG
224: from FND_TERRITORIES_TL
225: where TERRITORY_CODE = X_TERRITORY_CODE
226: and userenv('LANG') in (LANGUAGE, SOURCE_LANG)
227: for update of TERRITORY_CODE nowait;
228: begin

Line 293: FND_TERRITORIES_PKG.UPDATE_ROW(

289: X_LAST_UPDATED_BY in NUMBER,
290: X_LAST_UPDATE_LOGIN in NUMBER
291: ) is
292: begin
293: FND_TERRITORIES_PKG.UPDATE_ROW(
294: X_TERRITORY_CODE,
295: X_EU_CODE,
296: X_ISO_NUMERIC_CODE,
297: X_ALTERNATE_TERRITORY_CODE,

Line 329: FND_TERRITORIES_PKG.UPDATE_ROW(

325: X_LAST_UPDATE_LOGIN in NUMBER,
326: X_OBSOLETE_FLAG in VARCHAR2
327: ) is
328: begin
329: FND_TERRITORIES_PKG.UPDATE_ROW(
330: X_TERRITORY_CODE,
331: X_EU_CODE,
332: X_ISO_NUMERIC_CODE,
333: X_ALTERNATE_TERRITORY_CODE,

Line 371: update FND_TERRITORIES set

367:
368: begin
369:
370: if (X_OBSOLETE_FLAG is NULL) then
371: update FND_TERRITORIES set
372: EU_CODE = X_EU_CODE,
373: ISO_NUMERIC_CODE = X_ISO_NUMERIC_CODE,
374: ALTERNATE_TERRITORY_CODE = X_ALTERNATE_TERRITORY_CODE,
375: NLS_TERRITORY = X_NLS_TERRITORY,

Line 386: update FND_TERRITORIES set

382: LAST_UPDATE_LOGIN = X_LAST_UPDATE_LOGIN,
383: ISO_TERRITORY_CODE = X_ISO_TERRITORY_CODE
384: where TERRITORY_CODE = X_TERRITORY_CODE;
385: else
386: update FND_TERRITORIES set
387: EU_CODE = X_EU_CODE,
388: ISO_NUMERIC_CODE = X_ISO_NUMERIC_CODE,
389: ALTERNATE_TERRITORY_CODE = X_ALTERNATE_TERRITORY_CODE,
390: NLS_TERRITORY = X_NLS_TERRITORY,

Line 407: update FND_TERRITORIES_TL set

403: if (sql%notfound) then
404: raise no_data_found;
405: end if;
406:
407: update FND_TERRITORIES_TL set
408: TERRITORY_SHORT_NAME = X_TERRITORY_SHORT_NAME,
409: DESCRIPTION = X_DESCRIPTION,
410: LAST_UPDATE_DATE = X_LAST_UPDATE_DATE,
411: LAST_UPDATED_BY = X_LAST_UPDATED_BY,

Line 426: delete from FND_TERRITORIES_TL

422: procedure DELETE_ROW (
423: X_TERRITORY_CODE in VARCHAR2
424: ) is
425: begin
426: delete from FND_TERRITORIES_TL
427: where TERRITORY_CODE = X_TERRITORY_CODE;
428:
429: if (sql%notfound) then
430: raise no_data_found;

Line 433: delete from FND_TERRITORIES

429: if (sql%notfound) then
430: raise no_data_found;
431: end if;
432:
433: delete from FND_TERRITORIES
434: where TERRITORY_CODE = X_TERRITORY_CODE;
435:
436: if (sql%notfound) then
437: raise no_data_found;

Line 450: delete from FND_TERRITORIES_TL T

446: /* as a quick workaround to fix the time-consuming table handler issue */
447: /* Eventually we'll need to turn them into a separate fix_language procedure */
448: /*
449:
450: delete from FND_TERRITORIES_TL T
451: where not exists
452: (select NULL
453: from FND_TERRITORIES B
454: where B.TERRITORY_CODE = T.TERRITORY_CODE

Line 453: from FND_TERRITORIES B

449:
450: delete from FND_TERRITORIES_TL T
451: where not exists
452: (select NULL
453: from FND_TERRITORIES B
454: where B.TERRITORY_CODE = T.TERRITORY_CODE
455: );
456:
457: update FND_TERRITORIES_TL T set (

Line 457: update FND_TERRITORIES_TL T set (

453: from FND_TERRITORIES B
454: where B.TERRITORY_CODE = T.TERRITORY_CODE
455: );
456:
457: update FND_TERRITORIES_TL T set (
458: TERRITORY_SHORT_NAME,
459: DESCRIPTION
460: ) = (select
461: B.TERRITORY_SHORT_NAME,

Line 463: from FND_TERRITORIES_TL B

459: DESCRIPTION
460: ) = (select
461: B.TERRITORY_SHORT_NAME,
462: B.DESCRIPTION
463: from FND_TERRITORIES_TL B
464: where B.TERRITORY_CODE = T.TERRITORY_CODE
465: and B.LANGUAGE = T.SOURCE_LANG)
466: where (
467: T.TERRITORY_CODE,

Line 472: from FND_TERRITORIES_TL SUBB, FND_TERRITORIES_TL SUBT

468: T.LANGUAGE
469: ) in (select
470: SUBT.TERRITORY_CODE,
471: SUBT.LANGUAGE
472: from FND_TERRITORIES_TL SUBB, FND_TERRITORIES_TL SUBT
473: where SUBB.TERRITORY_CODE = SUBT.TERRITORY_CODE
474: and SUBB.LANGUAGE = SUBT.SOURCE_LANG
475: and (SUBB.TERRITORY_SHORT_NAME <> SUBT.TERRITORY_SHORT_NAME
476: or SUBB.DESCRIPTION <> SUBT.DESCRIPTION

Line 482: insert into FND_TERRITORIES_TL (

478: or (SUBB.DESCRIPTION is not null and SUBT.DESCRIPTION is null)
479: ));
480: */
481:
482: insert into FND_TERRITORIES_TL (
483: TERRITORY_CODE,
484: TERRITORY_SHORT_NAME,
485: CREATED_BY,
486: CREATION_DATE,

Line 504: from FND_TERRITORIES_TL B, FND_LANGUAGES L

500: B.LAST_UPDATE_LOGIN,
501: B.DESCRIPTION,
502: L.LANGUAGE_CODE,
503: B.SOURCE_LANG
504: from FND_TERRITORIES_TL B, FND_LANGUAGES L
505: where L.INSTALLED_FLAG in ('I', 'B')
506: and B.LANGUAGE = userenv('LANG')
507: and not exists
508: (select NULL

Line 509: from FND_TERRITORIES_TL T

505: where L.INSTALLED_FLAG in ('I', 'B')
506: and B.LANGUAGE = userenv('LANG')
507: and not exists
508: (select NULL
509: from FND_TERRITORIES_TL T
510: where T.TERRITORY_CODE = B.TERRITORY_CODE
511: and T.LANGUAGE = L.LANGUAGE_CODE);
512: end ADD_LANGUAGE;
513:

Line 586: from FND_TERRITORIES_TL

582: f_ludate := nvl(to_date(X_LAST_UPDATE_DATE, 'YYYY/MM/DD'), sysdate);
583:
584: select last_updated_by, last_update_date
585: into db_luby, db_ludate
586: from FND_TERRITORIES_TL
587: where TERRITORY_CODE = X_TERRITORY_CODE
588: and language = userenv('LANG');
589:
590: if (fnd_load_util.upload_test(f_luby, f_ludate, db_luby,

Line 592: update FND_TERRITORIES_TL set

588: and language = userenv('LANG');
589:
590: if (fnd_load_util.upload_test(f_luby, f_ludate, db_luby,
591: db_ludate, X_CUSTOM_MODE)) then
592: update FND_TERRITORIES_TL set
593: DESCRIPTION = X_DESCRIPTION,
594: TERRITORY_SHORT_NAME = X_TERRITORY_SHORT_NAME,
595: LAST_UPDATE_DATE = f_ludate,
596: LAST_UPDATED_BY = f_luby,

Line 725: from FND_TERRITORIES

721:
722: begin
723: select last_updated_by, last_update_date
724: into db_luby, db_ludate
725: from FND_TERRITORIES
726: where TERRITORY_CODE = X_TERRITORY_CODE;
727:
728: -- Bug4493112 Moved decode select statement from UPDATE_ROW to LOAD_ROW.
729: -- Bug4648984 Moved sql to inside exception block to handle the

Line 733: decode(x_iso_numeric_code, fnd_territories_pkg.null_char, null,

729: -- Bug4648984 Moved sql to inside exception block to handle the
730: -- no data found.
731:
732: select
733: decode(x_iso_numeric_code, fnd_territories_pkg.null_char, null,
734: null, u.iso_numeric_code,
735: x_iso_numeric_code),
736: decode(x_alternate_territory_code,fnd_territories_pkg.null_char, null,
737: null, u.alternate_territory_code,

Line 736: decode(x_alternate_territory_code,fnd_territories_pkg.null_char, null,

732: select
733: decode(x_iso_numeric_code, fnd_territories_pkg.null_char, null,
734: null, u.iso_numeric_code,
735: x_iso_numeric_code),
736: decode(x_alternate_territory_code,fnd_territories_pkg.null_char, null,
737: null, u.alternate_territory_code,
738: x_alternate_territory_code),
739: decode(x_nls_territory, fnd_territories_pkg.null_char, null,
740: null, u.nls_territory,

Line 739: decode(x_nls_territory, fnd_territories_pkg.null_char, null,

735: x_iso_numeric_code),
736: decode(x_alternate_territory_code,fnd_territories_pkg.null_char, null,
737: null, u.alternate_territory_code,
738: x_alternate_territory_code),
739: decode(x_nls_territory, fnd_territories_pkg.null_char, null,
740: null, u.nls_territory,
741: x_nls_territory),
742: decode(x_address_style, fnd_territories_pkg.null_char, null,
743: null, u.address_style,

Line 742: decode(x_address_style, fnd_territories_pkg.null_char, null,

738: x_alternate_territory_code),
739: decode(x_nls_territory, fnd_territories_pkg.null_char, null,
740: null, u.nls_territory,
741: x_nls_territory),
742: decode(x_address_style, fnd_territories_pkg.null_char, null,
743: null, u.address_style,
744: x_address_style),
745: decode(x_address_validation, fnd_territories_pkg.null_char, null,
746: null, u.address_validation,

Line 745: decode(x_address_validation, fnd_territories_pkg.null_char, null,

741: x_nls_territory),
742: decode(x_address_style, fnd_territories_pkg.null_char, null,
743: null, u.address_style,
744: x_address_style),
745: decode(x_address_validation, fnd_territories_pkg.null_char, null,
746: null, u.address_validation,
747: x_address_validation),
748: decode(x_bank_info_style, fnd_territories_pkg.null_char, null,
749: null, u.bank_info_style,

Line 748: decode(x_bank_info_style, fnd_territories_pkg.null_char, null,

744: x_address_style),
745: decode(x_address_validation, fnd_territories_pkg.null_char, null,
746: null, u.address_validation,
747: x_address_validation),
748: decode(x_bank_info_style, fnd_territories_pkg.null_char, null,
749: null, u.bank_info_style,
750: x_bank_info_style),
751: decode(x_bank_info_validation, fnd_territories_pkg.null_char, null,
752: null, u.bank_info_validation,

Line 751: decode(x_bank_info_validation, fnd_territories_pkg.null_char, null,

747: x_address_validation),
748: decode(x_bank_info_style, fnd_territories_pkg.null_char, null,
749: null, u.bank_info_style,
750: x_bank_info_style),
751: decode(x_bank_info_validation, fnd_territories_pkg.null_char, null,
752: null, u.bank_info_validation,
753: x_bank_info_validation),
754: decode(x_eu_code, fnd_territories_pkg.null_char, null,
755: null, u.eu_code,

Line 754: decode(x_eu_code, fnd_territories_pkg.null_char, null,

750: x_bank_info_style),
751: decode(x_bank_info_validation, fnd_territories_pkg.null_char, null,
752: null, u.bank_info_validation,
753: x_bank_info_validation),
754: decode(x_eu_code, fnd_territories_pkg.null_char, null,
755: null, u.eu_code,
756: x_eu_code),
757: decode(x_iso_territory_code, fnd_territories_pkg.null_char, null,
758: null, u.iso_territory_code,

Line 757: decode(x_iso_territory_code, fnd_territories_pkg.null_char, null,

753: x_bank_info_validation),
754: decode(x_eu_code, fnd_territories_pkg.null_char, null,
755: null, u.eu_code,
756: x_eu_code),
757: decode(x_iso_territory_code, fnd_territories_pkg.null_char, null,
758: null, u.iso_territory_code,
759: x_iso_territory_code)
760: into l_iso_numeric_code, l_alternate_territory_code, l_nls_territory,
761: l_address_style, l_address_validation, l_bank_info_style,

Line 763: from fnd_territories u

759: x_iso_territory_code)
760: into l_iso_numeric_code, l_alternate_territory_code, l_nls_territory,
761: l_address_style, l_address_validation, l_bank_info_style,
762: l_bank_info_validation, l_eu_code, l_iso_territory_code
763: from fnd_territories u
764: where territory_code = x_territory_code;
765:
766: -- Bug4493112 Modified code to use local variables in UPDATE_ROW and
767: -- INSERT_ROW procedure calls.

Line 771: FND_TERRITORIES_PKG.UPDATE_ROW(

767: -- INSERT_ROW procedure calls.
768:
769: if (fnd_load_util.upload_test(f_luby, f_ludate, db_luby,
770: db_ludate, X_CUSTOM_MODE)) then
771: FND_TERRITORIES_PKG.UPDATE_ROW(
772: X_TERRITORY_CODE,
773: L_EU_CODE,
774: L_ISO_NUMERIC_CODE,
775: L_ALTERNATE_TERRITORY_CODE,

Line 796: decode(x_iso_numeric_code, fnd_territories_pkg.null_char, null,

792: -- bug7270106 - Need to correctly translate the provided NULL value
793: -- for inserting.
794:
795: select
796: decode(x_iso_numeric_code, fnd_territories_pkg.null_char, null,
797: null, null,x_iso_numeric_code),
798: decode(x_alternate_territory_code,fnd_territories_pkg.null_char, null,
799: null, null, x_alternate_territory_code),
800: decode(x_nls_territory, fnd_territories_pkg.null_char, null,

Line 798: decode(x_alternate_territory_code,fnd_territories_pkg.null_char, null,

794:
795: select
796: decode(x_iso_numeric_code, fnd_territories_pkg.null_char, null,
797: null, null,x_iso_numeric_code),
798: decode(x_alternate_territory_code,fnd_territories_pkg.null_char, null,
799: null, null, x_alternate_territory_code),
800: decode(x_nls_territory, fnd_territories_pkg.null_char, null,
801: null, null, x_nls_territory),
802: decode(x_address_style, fnd_territories_pkg.null_char, null,

Line 800: decode(x_nls_territory, fnd_territories_pkg.null_char, null,

796: decode(x_iso_numeric_code, fnd_territories_pkg.null_char, null,
797: null, null,x_iso_numeric_code),
798: decode(x_alternate_territory_code,fnd_territories_pkg.null_char, null,
799: null, null, x_alternate_territory_code),
800: decode(x_nls_territory, fnd_territories_pkg.null_char, null,
801: null, null, x_nls_territory),
802: decode(x_address_style, fnd_territories_pkg.null_char, null,
803: null, null, x_address_style),
804: decode(x_address_validation, fnd_territories_pkg.null_char, null,

Line 802: decode(x_address_style, fnd_territories_pkg.null_char, null,

798: decode(x_alternate_territory_code,fnd_territories_pkg.null_char, null,
799: null, null, x_alternate_territory_code),
800: decode(x_nls_territory, fnd_territories_pkg.null_char, null,
801: null, null, x_nls_territory),
802: decode(x_address_style, fnd_territories_pkg.null_char, null,
803: null, null, x_address_style),
804: decode(x_address_validation, fnd_territories_pkg.null_char, null,
805: null, null, x_address_validation),
806: decode(x_bank_info_style, fnd_territories_pkg.null_char, null,

Line 804: decode(x_address_validation, fnd_territories_pkg.null_char, null,

800: decode(x_nls_territory, fnd_territories_pkg.null_char, null,
801: null, null, x_nls_territory),
802: decode(x_address_style, fnd_territories_pkg.null_char, null,
803: null, null, x_address_style),
804: decode(x_address_validation, fnd_territories_pkg.null_char, null,
805: null, null, x_address_validation),
806: decode(x_bank_info_style, fnd_territories_pkg.null_char, null,
807: null, null, x_bank_info_style),
808: decode(x_bank_info_validation, fnd_territories_pkg.null_char, null,

Line 806: decode(x_bank_info_style, fnd_territories_pkg.null_char, null,

802: decode(x_address_style, fnd_territories_pkg.null_char, null,
803: null, null, x_address_style),
804: decode(x_address_validation, fnd_territories_pkg.null_char, null,
805: null, null, x_address_validation),
806: decode(x_bank_info_style, fnd_territories_pkg.null_char, null,
807: null, null, x_bank_info_style),
808: decode(x_bank_info_validation, fnd_territories_pkg.null_char, null,
809: null, null, x_bank_info_validation),
810: decode(x_eu_code, fnd_territories_pkg.null_char, null,

Line 808: decode(x_bank_info_validation, fnd_territories_pkg.null_char, null,

804: decode(x_address_validation, fnd_territories_pkg.null_char, null,
805: null, null, x_address_validation),
806: decode(x_bank_info_style, fnd_territories_pkg.null_char, null,
807: null, null, x_bank_info_style),
808: decode(x_bank_info_validation, fnd_territories_pkg.null_char, null,
809: null, null, x_bank_info_validation),
810: decode(x_eu_code, fnd_territories_pkg.null_char, null,
811: null, null, x_eu_code),
812: decode(x_iso_territory_code, fnd_territories_pkg.null_char, null,

Line 810: decode(x_eu_code, fnd_territories_pkg.null_char, null,

806: decode(x_bank_info_style, fnd_territories_pkg.null_char, null,
807: null, null, x_bank_info_style),
808: decode(x_bank_info_validation, fnd_territories_pkg.null_char, null,
809: null, null, x_bank_info_validation),
810: decode(x_eu_code, fnd_territories_pkg.null_char, null,
811: null, null, x_eu_code),
812: decode(x_iso_territory_code, fnd_territories_pkg.null_char, null,
813: null, null, x_iso_territory_code)
814: into l_iso_numeric_code, l_alternate_territory_code, l_nls_territory,

Line 812: decode(x_iso_territory_code, fnd_territories_pkg.null_char, null,

808: decode(x_bank_info_validation, fnd_territories_pkg.null_char, null,
809: null, null, x_bank_info_validation),
810: decode(x_eu_code, fnd_territories_pkg.null_char, null,
811: null, null, x_eu_code),
812: decode(x_iso_territory_code, fnd_territories_pkg.null_char, null,
813: null, null, x_iso_territory_code)
814: into l_iso_numeric_code, l_alternate_territory_code, l_nls_territory,
815: l_address_style, l_address_validation, l_bank_info_style,
816: l_bank_info_validation, l_eu_code, l_iso_territory_code

Line 819: FND_TERRITORIES_PKG.INSERT_ROW(

815: l_address_style, l_address_validation, l_bank_info_style,
816: l_bank_info_validation, l_eu_code, l_iso_territory_code
817: from dual;
818:
819: FND_TERRITORIES_PKG.INSERT_ROW(
820: X_ROWID,
821: X_TERRITORY_CODE,
822: L_EU_CODE,
823: L_ISO_NUMERIC_CODE,

Line 842: end FND_TERRITORIES_PKG;

838: L_ISO_TERRITORY_CODE);
839: end;
840: end LOAD_ROW;
841:
842: end FND_TERRITORIES_PKG;