DBA Data[Home] [Help]

APPS.FA_ADDITIONS_PKG dependencies on FA_ADDITIONS

Line 1: PACKAGE BODY FA_ADDITIONS_PKG as

1: PACKAGE BODY FA_ADDITIONS_PKG as
2: /* $Header: faxiadb.pls 120.8 2009/04/10 07:35:48 deemitta ship $ */
3:
4: PROCEDURE Insert_Row(X_Rowid IN OUT NOCOPY VARCHAR2,
5: X_Asset_Id IN OUT NOCOPY NUMBER,

Line 92: CURSOR C IS SELECT rowid FROM fa_additions_B

88: , p_log_level_rec IN FA_API_TYPES.log_level_rec_type) IS
89:
90: h_error_message varchar2(255);
91:
92: CURSOR C IS SELECT rowid FROM fa_additions_B
93: WHERE asset_id = X_Asset_Id;
94: CURSOR C2 IS SELECT fa_additions_s.nextval FROM sys.dual;
95:
96: l_attribute15 varchar2(150);

Line 94: CURSOR C2 IS SELECT fa_additions_s.nextval FROM sys.dual;

90: h_error_message varchar2(255);
91:
92: CURSOR C IS SELECT rowid FROM fa_additions_B
93: WHERE asset_id = X_Asset_Id;
94: CURSOR C2 IS SELECT fa_additions_s.nextval FROM sys.dual;
95:
96: l_attribute15 varchar2(150);
97:
98: BEGIN

Line 114: INSERT INTO fa_additions_B(

110: else
111: l_attribute15 := X_attribute15;
112: end if;
113:
114: INSERT INTO fa_additions_B(
115: asset_id,
116: asset_number,
117: asset_key_ccid,
118: current_units,

Line 279: insert into FA_ADDITIONS_TL (

275: X_Created_By,
276: X_Creation_Date,
277: X_Last_Update_Login
278: );
279: insert into FA_ADDITIONS_TL (
280: LAST_UPDATED_BY,
281: CREATED_BY,
282: CREATION_DATE,
283: LAST_UPDATE_LOGIN,

Line 303: from FA_ADDITIONS_TL T

299: from FND_LANGUAGES L
300: where L.INSTALLED_FLAG in ('I', 'B')
301: and not exists
302: (select NULL
303: from FA_ADDITIONS_TL T
304: where T.ASSET_ID = X_ASSET_ID
305: and T.LANGUAGE = L.LANGUAGE_CODE);
306:
307:

Line 322: if instr (h_error_message, 'FA_ADDITIONS_B_U2') <> 0 then

318: exception
319: when dup_val_on_index then
320: h_error_message := SQLERRM;
321:
322: if instr (h_error_message, 'FA_ADDITIONS_B_U2') <> 0 then
323: FA_SRVR_MSG.add_message(
324: CALLING_FN => 'fa_additions_pkg.insert_row',
325: NAME => 'FA_ADD_ASSET_NUMBER_EXISTS',
326: TOKEN1 => 'ASSET_NUMBER',

Line 324: CALLING_FN => 'fa_additions_pkg.insert_row',

320: h_error_message := SQLERRM;
321:
322: if instr (h_error_message, 'FA_ADDITIONS_B_U2') <> 0 then
323: FA_SRVR_MSG.add_message(
324: CALLING_FN => 'fa_additions_pkg.insert_row',
325: NAME => 'FA_ADD_ASSET_NUMBER_EXISTS',
326: TOKEN1 => 'ASSET_NUMBER',
327: VALUE1 => X_Asset_Number, p_log_level_rec => p_log_level_rec);
328: FA_SRVR_MSG.ADD_SQL_ERROR (

Line 329: CALLING_FN => 'fa_additions_pkg.insert_row', p_log_level_rec => p_log_level_rec);

325: NAME => 'FA_ADD_ASSET_NUMBER_EXISTS',
326: TOKEN1 => 'ASSET_NUMBER',
327: VALUE1 => X_Asset_Number, p_log_level_rec => p_log_level_rec);
328: FA_SRVR_MSG.ADD_SQL_ERROR (
329: CALLING_FN => 'fa_additions_pkg.insert_row', p_log_level_rec => p_log_level_rec);
330: raise;
331:
332: elsif instr (h_error_message, 'FA_ADDITIONS_B_U3') <> 0 then
333: FA_SRVR_MSG.add_message(

Line 332: elsif instr (h_error_message, 'FA_ADDITIONS_B_U3') <> 0 then

328: FA_SRVR_MSG.ADD_SQL_ERROR (
329: CALLING_FN => 'fa_additions_pkg.insert_row', p_log_level_rec => p_log_level_rec);
330: raise;
331:
332: elsif instr (h_error_message, 'FA_ADDITIONS_B_U3') <> 0 then
333: FA_SRVR_MSG.add_message(
334: CALLING_FN => 'fa_additions_pkg.insert_row',
335: NAME => 'FA_ADD_TAG_NUMBER_EXISTS',
336: TOKEN1 => 'TAG_NUMBER',

Line 334: CALLING_FN => 'fa_additions_pkg.insert_row',

330: raise;
331:
332: elsif instr (h_error_message, 'FA_ADDITIONS_B_U3') <> 0 then
333: FA_SRVR_MSG.add_message(
334: CALLING_FN => 'fa_additions_pkg.insert_row',
335: NAME => 'FA_ADD_TAG_NUMBER_EXISTS',
336: TOKEN1 => 'TAG_NUMBER',
337: VALUE1 => X_Tag_Number, p_log_level_rec => p_log_level_rec);
338: FA_SRVR_MSG.ADD_SQL_ERROR (

Line 339: CALLING_FN => 'fa_additions_pkg.insert_row', p_log_level_rec => p_log_level_rec);

335: NAME => 'FA_ADD_TAG_NUMBER_EXISTS',
336: TOKEN1 => 'TAG_NUMBER',
337: VALUE1 => X_Tag_Number, p_log_level_rec => p_log_level_rec);
338: FA_SRVR_MSG.ADD_SQL_ERROR (
339: CALLING_FN => 'fa_additions_pkg.insert_row', p_log_level_rec => p_log_level_rec);
340: raise;
341:
342: else
343: FA_SRVR_MSG.ADD_SQL_ERROR (

Line 344: CALLING_FN => 'fa_additions_pkg.insert_row', p_log_level_rec => p_log_level_rec);

340: raise;
341:
342: else
343: FA_SRVR_MSG.ADD_SQL_ERROR (
344: CALLING_FN => 'fa_additions_pkg.insert_row', p_log_level_rec => p_log_level_rec);
345: raise;
346:
347: end if;
348:

Line 351: CALLING_FN => 'fa_additions_pkg.insert_row', p_log_level_rec => p_log_level_rec);

347: end if;
348:
349: when others then
350: FA_SRVR_MSG.ADD_SQL_ERROR (
351: CALLING_FN => 'fa_additions_pkg.insert_row', p_log_level_rec => p_log_level_rec);
352: raise;
353:
354: END Insert_Row;
355:

Line 417: FROM fa_additions_b

413: X_Calling_Fn VARCHAR2
414: , p_log_level_rec IN FA_API_TYPES.log_level_rec_type) IS
415: CURSOR C IS
416: SELECT *
417: FROM fa_additions_b
418: WHERE rowid = X_Rowid
419: FOR UPDATE of Asset_Id NOWAIT;
420: Recinfo C%ROWTYPE;
421:

Line 424: from fa_additions_tl

420: Recinfo C%ROWTYPE;
421:
422: cursor c1 is
423: select description,decode(language,userenv('LANG'),'Y','N') BASELANG
424: from fa_additions_tl
425: where asset_id = x_asset_id
426: and userenv('LANG') in (LANGUAGE,SOURCE_LANG)
427: for update of asset_id nowait;
428:

Line 696: from fa_additions_b

692: BEGIN
693: if (X_Rowid is NULL) then
694: select rowid
695: into l_rowid
696: from fa_additions_b
697: where asset_id = X_Asset_Id;
698: else
699: l_rowid := X_Rowid;
700: end if;

Line 708: UPDATE fa_additions_b

704: else
705: l_temp_attribute15 := X_attribute15;
706: end if;
707:
708: UPDATE fa_additions_b
709: SET
710: asset_id = decode(X_Asset_Id,
711: NULL, asset_id,
712: FND_API.G_MISS_NUM, NULL,

Line 1032: from fa_additions

1028:
1029: if (X_asset_id is NULL) then
1030: select asset_id
1031: into l_asset_id
1032: from fa_additions
1033: where rowid = X_rowid;
1034: else
1035: l_asset_id := X_asset_id;
1036: end if;

Line 1038: update FA_ADDITIONS_TL set

1034: else
1035: l_asset_id := X_asset_id;
1036: end if;
1037:
1038: update FA_ADDITIONS_TL set
1039: DESCRIPTION = decode(X_DESCRIPTION,
1040: NULL, description,
1041: FND_API.G_MISS_CHAR, NULL,
1042: X_description),

Line 1067: CALLING_FN => 'FA_ADDITIONS_PKG.Update_Row', p_log_level_rec => p_log_level_rec);

1063:
1064: exception
1065: when others then
1066: FA_SRVR_MSG.Add_SQL_Error(
1067: CALLING_FN => 'FA_ADDITIONS_PKG.Update_Row', p_log_level_rec => p_log_level_rec);
1068: X_Return_Status := FALSE;
1069: raise;
1070: END Update_Row;
1071:

Line 1076: -- CURSOR C IS SELECT asset_id FROM fa_additions_B

1072: PROCEDURE Delete_Row(X_Rowid VARCHAR2,
1073: X_Asset_Id number,
1074: X_calling_Fn VARCHAR2, p_log_level_rec IN FA_API_TYPES.log_level_rec_type) IS
1075:
1076: -- CURSOR C IS SELECT asset_id FROM fa_additions_B
1077: -- WHERE rowid = X_Rowid;
1078: h_asset_id number(15);
1079: BEGIN
1080:

Line 1085: delete from FA_ADDITIONS_TL

1081: -- OPEN C;
1082: -- FETCH C INTO h_asset_id;
1083: -- CLOSE C;
1084:
1085: delete from FA_ADDITIONS_TL
1086: where ASSET_ID = X_asset_id;
1087:
1088: if (sql%notfound) then
1089: raise no_data_found;

Line 1092: DELETE FROM fa_additions_b

1088: if (sql%notfound) then
1089: raise no_data_found;
1090: end if;
1091:
1092: DELETE FROM fa_additions_b
1093: WHERE asset_id = X_asset_id;
1094:
1095: if (SQL%NOTFOUND) then
1096: Raise NO_DATA_FOUND;

Line 1102: CALLING_FN => 'fa_additions_pkg.delete_row', p_log_level_rec => p_log_level_rec);

1098:
1099: exception
1100: when others then
1101: FA_SRVR_MSG.ADD_SQL_ERROR (
1102: CALLING_FN => 'fa_additions_pkg.delete_row', p_log_level_rec => p_log_level_rec);
1103: raise;
1104:
1105: END Delete_Row;
1106:

Line 1112: UPDATE fa_additions_b

1108:
1109: PROCEDURE Update_Units(X_Asset_Id NUMBER,
1110: X_Calling_Fn VARCHAR2, p_log_level_rec IN FA_API_TYPES.log_level_rec_type) IS
1111: BEGIN
1112: UPDATE fa_additions_b
1113: SET current_units = (select units from fa_asset_history
1114: where asset_id = X_Asset_Id
1115: and date_ineffective is null)
1116: WHERE asset_id = X_Asset_Id;

Line 1124: CALLING_FN => 'fa_additions_pkg.update_units', p_log_level_rec => p_log_level_rec);

1120:
1121: exception
1122: when others then
1123: FA_SRVR_MSG.ADD_SQL_ERROR (
1124: CALLING_FN => 'fa_additions_pkg.update_units', p_log_level_rec => p_log_level_rec);
1125: raise;
1126:
1127: END Update_Units;
1128:

Line 1139: delete from FA_ADDITIONS_TL T

1135:
1136: BEGIN
1137:
1138: -- delete from tl table if same asset doesn't exist in base table
1139: delete from FA_ADDITIONS_TL T
1140: where not exists
1141: (select NULL
1142: from FA_ADDITIONS_B B
1143: where B.ASSET_ID = T.ASSET_ID

Line 1142: from FA_ADDITIONS_B B

1138: -- delete from tl table if same asset doesn't exist in base table
1139: delete from FA_ADDITIONS_TL T
1140: where not exists
1141: (select NULL
1142: from FA_ADDITIONS_B B
1143: where B.ASSET_ID = T.ASSET_ID
1144: );
1145:
1146: -- repair description in tl table

Line 1147: update FA_ADDITIONS_TL T

1143: where B.ASSET_ID = T.ASSET_ID
1144: );
1145:
1146: -- repair description in tl table
1147: update FA_ADDITIONS_TL T
1148: set (DESCRIPTION) =
1149: (select B.DESCRIPTION
1150: from FA_ADDITIONS_TL B
1151: where B.ASSET_ID = T.ASSET_ID

Line 1150: from FA_ADDITIONS_TL B

1146: -- repair description in tl table
1147: update FA_ADDITIONS_TL T
1148: set (DESCRIPTION) =
1149: (select B.DESCRIPTION
1150: from FA_ADDITIONS_TL B
1151: where B.ASSET_ID = T.ASSET_ID
1152: and B.LANGUAGE = T.SOURCE_LANG)
1153: where (T.ASSET_ID, T.LANGUAGE) in
1154: (select SUBT.ASSET_ID,

Line 1156: from FA_ADDITIONS_TL SUBB, FA_ADDITIONS_TL SUBT

1152: and B.LANGUAGE = T.SOURCE_LANG)
1153: where (T.ASSET_ID, T.LANGUAGE) in
1154: (select SUBT.ASSET_ID,
1155: SUBT.LANGUAGE
1156: from FA_ADDITIONS_TL SUBB, FA_ADDITIONS_TL SUBT
1157: where SUBB.ASSET_ID = SUBT.ASSET_ID
1158: and SUBB.LANGUAGE = SUBT.SOURCE_LANG
1159: and (SUBB.DESCRIPTION <> SUBT.DESCRIPTION));
1160:

Line 1161: -- insert new row into fa_additions_tl for new language

1157: where SUBB.ASSET_ID = SUBT.ASSET_ID
1158: and SUBB.LANGUAGE = SUBT.SOURCE_LANG
1159: and (SUBB.DESCRIPTION <> SUBT.DESCRIPTION));
1160:
1161: -- insert new row into fa_additions_tl for new language
1162:
1163: insert into FA_ADDITIONS_TL (
1164: LAST_UPDATED_BY,
1165: CREATED_BY,

Line 1163: insert into FA_ADDITIONS_TL (

1159: and (SUBB.DESCRIPTION <> SUBT.DESCRIPTION));
1160:
1161: -- insert new row into fa_additions_tl for new language
1162:
1163: insert into FA_ADDITIONS_TL (
1164: LAST_UPDATED_BY,
1165: CREATED_BY,
1166: CREATION_DATE,
1167: LAST_UPDATE_LOGIN,

Line 1183: from FA_ADDITIONS_TL B, FND_LANGUAGES L

1179: B.DESCRIPTION,
1180: B.LAST_UPDATE_DATE,
1181: L.LANGUAGE_CODE,
1182: B.SOURCE_LANG
1183: from FA_ADDITIONS_TL B, FND_LANGUAGES L
1184: where L.INSTALLED_FLAG in ('I', 'B')
1185: and B.LANGUAGE = userenv('LANG')
1186: and not exists
1187: (select NULL

Line 1188: from FA_ADDITIONS_TL T

1184: where L.INSTALLED_FLAG in ('I', 'B')
1185: and B.LANGUAGE = userenv('LANG')
1186: and not exists
1187: (select NULL
1188: from FA_ADDITIONS_TL T
1189: where T.ASSET_ID = B.ASSET_ID
1190: and T.LANGUAGE = L.LANGUAGE_CODE);
1191: end ADD_LANGUAGE;
1192:

Line 1291: from fa_additions_b

1287: user_id := 0;
1288:
1289: select count(*)
1290: into h_record_exists
1291: from fa_additions_b
1292: where asset_id = X_Asset_Id;
1293:
1294: if (h_record_exists > 0) then
1295:

Line 1296: fa_additions_pkg.Update_Row(

1292: where asset_id = X_Asset_Id;
1293:
1294: if (h_record_exists > 0) then
1295:
1296: fa_additions_pkg.Update_Row(
1297: X_Asset_Id => h_asset_id,
1298: X_Asset_Number => h_asset_number,
1299: X_Asset_Key_Ccid => X_Asset_Key_Ccid,
1300: X_Current_Units => X_Current_Units,

Line 1378: X_Calling_Fn => 'fa_additions_pkg.load_row'

1374: X_Last_Update_Date => sysdate,
1375: X_Last_Updated_By => user_id,
1376: X_Last_Update_Login => 0,
1377: X_Return_Status => return_status,
1378: X_Calling_Fn => 'fa_additions_pkg.load_row'
1379: , p_log_level_rec => p_log_level_rec);
1380: else
1381: fa_additions_pkg.Insert_Row(
1382: X_Rowid => row_id,

Line 1381: fa_additions_pkg.Insert_Row(

1377: X_Return_Status => return_status,
1378: X_Calling_Fn => 'fa_additions_pkg.load_row'
1379: , p_log_level_rec => p_log_level_rec);
1380: else
1381: fa_additions_pkg.Insert_Row(
1382: X_Rowid => row_id,
1383: X_Asset_Id => h_asset_id,
1384: X_Asset_Number => h_asset_number,
1385: X_Asset_Key_Ccid => X_Asset_Key_Ccid,

Line 1465: X_Calling_Fn => 'fa_additions_pkg.load_row'

1461: X_Last_Updated_By => user_id,
1462: X_Created_By => user_id,
1463: X_Creation_Date => sysdate,
1464: X_Last_Update_Login => 0,
1465: X_Calling_Fn => 'fa_additions_pkg.load_row'
1466: , p_log_level_rec => p_log_level_rec);
1467: end if;
1468:
1469: exception

Line 1472: CALLING_FN => 'fa_additions_pkg.load_row', p_log_level_rec => p_log_level_rec);

1468:
1469: exception
1470: when others then
1471: FA_SRVR_MSG.ADD_SQL_ERROR (
1472: CALLING_FN => 'fa_additions_pkg.load_row', p_log_level_rec => p_log_level_rec);
1473: raise;
1474:
1475: end LOAD_ROW;
1476:

Line 1581: from fa_additions_b

1577: user_id := fnd_load_util.owner_id (X_Owner);
1578:
1579: select count(*)
1580: into h_record_exists
1581: from fa_additions_b
1582: where asset_id = X_Asset_Id;
1583:
1584: if (h_record_exists > 0) then
1585:

Line 1588: from fa_additions_b

1584: if (h_record_exists > 0) then
1585:
1586: select last_updated_by, last_update_date
1587: into db_last_updated_by, db_last_update_date
1588: from fa_additions_b
1589: where asset_id = X_Asset_Id;
1590:
1591: if (fnd_load_util.upload_test(user_id, x_last_update_date,
1592: db_last_updated_by, db_last_update_date,

Line 1596: fa_additions_pkg.Update_Row(

1592: db_last_updated_by, db_last_update_date,
1593: X_CUSTOM_MODE
1594: )) then
1595:
1596: fa_additions_pkg.Update_Row(
1597: X_Asset_Id => h_asset_id,
1598: X_Asset_Number => h_asset_number,
1599: X_Asset_Key_Ccid => X_Asset_Key_Ccid,
1600: X_Current_Units => X_Current_Units,

Line 1678: X_Calling_Fn => 'fa_additions_pkg.load_row',

1674: X_Last_Update_Date => sysdate,
1675: X_Last_Updated_By => user_id,
1676: X_Last_Update_Login => 0,
1677: X_Return_Status => return_status,
1678: X_Calling_Fn => 'fa_additions_pkg.load_row',
1679: p_log_level_rec => p_log_level_rec);
1680: end if;
1681:
1682: else

Line 1683: fa_additions_pkg.Insert_Row(

1679: p_log_level_rec => p_log_level_rec);
1680: end if;
1681:
1682: else
1683: fa_additions_pkg.Insert_Row(
1684: X_Rowid => row_id,
1685: X_Asset_Id => h_asset_id,
1686: X_Asset_Number => h_asset_number,
1687: X_Asset_Key_Ccid => X_Asset_Key_Ccid,

Line 1767: X_Calling_Fn => 'fa_additions_pkg.load_row'

1763: X_Last_Updated_By => user_id,
1764: X_Created_By => user_id,
1765: X_Creation_Date => sysdate,
1766: X_Last_Update_Login => 0,
1767: X_Calling_Fn => 'fa_additions_pkg.load_row'
1768: ,p_log_level_rec => p_log_level_rec);
1769: end if;
1770:
1771: EXCEPTION

Line 1774: CALLING_FN => 'fa_additions_pkg.load_row'

1770:
1771: EXCEPTION
1772: when others then
1773: FA_SRVR_MSG.ADD_SQL_ERROR (
1774: CALLING_FN => 'fa_additions_pkg.load_row'
1775: ,p_log_level_rec => p_log_level_rec);
1776: raise;
1777:
1778: end LOAD_ROW;

Line 1788: update FA_ADDITIONS_TL set

1784: , p_log_level_rec IN FA_API_TYPES.log_level_rec_type) IS
1785:
1786: begin
1787:
1788: update FA_ADDITIONS_TL set
1789: DESCRIPTION = nvl(X_Description, DESCRIPTION),
1790: LAST_UPDATE_DATE = sysdate,
1791: LAST_UPDATED_BY = 0,
1792: LAST_UPDATE_LOGIN = 0,

Line 1802: CALLING_FN => 'fa_additions_pkg.translate_row', p_log_level_rec => p_log_level_rec);

1798: when no_data_found then null;
1799:
1800: when others then
1801: FA_SRVR_MSG.ADD_SQL_ERROR (
1802: CALLING_FN => 'fa_additions_pkg.translate_row', p_log_level_rec => p_log_level_rec);
1803: raise;
1804:
1805: end TRANSLATE_ROW;
1806:

Line 1825: from fa_additions_tl

1821: BEGIN
1822:
1823: select last_updated_by, last_update_date
1824: into db_last_updated_by, db_last_update_date
1825: from fa_additions_tl
1826: where userenv('LANG') in (LANGUAGE, SOURCE_LANG)
1827: and asset_id = X_Asset_ID;
1828:
1829: user_id := fnd_load_util.owner_id (X_Owner);

Line 1835: update FA_ADDITIONS_TL set

1831: if (fnd_load_util.upload_test(user_id, x_last_update_date,
1832: db_last_updated_by, db_last_update_date,
1833: X_CUSTOM_MODE )) then
1834:
1835: update FA_ADDITIONS_TL set
1836: DESCRIPTION = nvl(X_Description, DESCRIPTION),
1837: LAST_UPDATE_DATE = sysdate,
1838: LAST_UPDATED_BY = 0,
1839: LAST_UPDATE_LOGIN = 0,

Line 1851: CALLING_FN => 'fa_additions_pkg.translate_row'

1847: when no_data_found then null;
1848:
1849: when others then
1850: FA_SRVR_MSG.ADD_SQL_ERROR (
1851: CALLING_FN => 'fa_additions_pkg.translate_row'
1852: ,p_log_level_rec => p_log_level_rec);
1853: raise;
1854:
1855: END TRANSLATE_ROW;

Line 1945: fa_additions_pkg.TRANSLATE_ROW (

1941:
1942: BEGIN
1943:
1944: if (x_upload_mode = 'NLS') then
1945: fa_additions_pkg.TRANSLATE_ROW (
1946: x_custom_mode => x_custom_mode,
1947: x_asset_id => x_asset_id,
1948: x_owner => x_owner,
1949: x_last_update_date => x_last_update_date,

Line 1953: fa_additions_pkg.LOAD_ROW (

1949: x_last_update_date => x_last_update_date,
1950: x_description => x_description
1951: ,p_log_level_rec => p_log_level_rec);
1952: else
1953: fa_additions_pkg.LOAD_ROW (
1954: x_custom_mode => x_custom_mode,
1955: x_asset_id => x_asset_id,
1956: x_owner => x_owner,
1957: x_last_update_date => x_last_update_date,

Line 2038: END FA_ADDITIONS_PKG;

2034: end if;
2035:
2036: END LOAD_SEED_ROW;
2037:
2038: END FA_ADDITIONS_PKG;