DBA Data[Home] [Help]

APPS.AMS_TRIG_PVT dependencies on AMS_TRIGGERS

Line 20: -- 08-jul-2003 cgoyal Modified data insertion in ams_triggers_tl for MLS

16: -- with a manual check)
17: -- 24-sep-2001 soagrawa Removed security group id from everywhere
18: -- 10-Dec-2002 ptendulk Modified calculate_system_time api to combine two parameters into one
19: -- 22/apr/03 cgoyal added notify_flag, EXECUTE_SCHEDULE_FLAG for 11.5.8 backport
20: -- 08-jul-2003 cgoyal Modified data insertion in ams_triggers_tl for MLS
21: -- 30-jul-2003 anchaudh modified comparison operator to fix P1 bug# 3064909 in check_trig_record
22: -- 21-aug-2003 soagrawa Fixed bug 3108929 in check_trig_record
23: -- 27-aug-2003 soagrawa Fixed bug 3115141 in check_trig_record
24: -- 20-May-2004 dhsingh Modified Check_Trig_Uk_Items and c_trig_name_updt for better performance

Line 66: -- This procedure is to create a row in ams_triggers table that

62: -- NAME
63: -- Create_Trigger
64: --
65: -- PURPOSE
66: -- This procedure is to create a row in ams_triggers table that
67: -- satisfy caller needs
68: --
69: -- NOTES
70: --

Line 109: SELECT ams_triggers_s.NEXTVAL

105: l_trig_count NUMBER;
106: x_rowid VARCHAR2(30);
107:
108: CURSOR c_trig_seq IS
109: SELECT ams_triggers_s.NEXTVAL
110: FROM dual;
111:
112: CURSOR c_trig_exists(l_my_trig_id IN NUMBER) IS
113: SELECT 1

Line 116: FROM ams_triggers

112: CURSOR c_trig_exists(l_my_trig_id IN NUMBER) IS
113: SELECT 1
114: FROM dual
115: WHERE EXISTS (SELECT 1
116: FROM ams_triggers
117: WHERE trigger_id = l_my_trig_id);
118:
119: CURSOR c_trig_count(l_my_trig_id IN NUMBER) IS
120: SELECT COUNT(1)

Line 121: FROM ams_triggers

117: WHERE trigger_id = l_my_trig_id);
118:
119: CURSOR c_trig_count(l_my_trig_id IN NUMBER) IS
120: SELECT COUNT(1)
121: FROM ams_triggers
122: WHERE trigger_id = l_my_trig_id;
123:
124: BEGIN
125: --

Line 253: INSERT INTO ams_triggers

249: END LOOP;
250: END IF;
251:
252:
253: INSERT INTO ams_triggers
254: (trigger_id
255: -- standard who columns
256: ,last_update_date
257: ,last_updated_by

Line 337: INSERT INTO ams_triggers_tl

333: ,l_trig_rec.USAGE--anchaudh added for monitors,R12.
334: );
335: --cgoyal commented on 08/03 for MLS
336: /*
337: INSERT INTO ams_triggers_tl
338: (trigger_id
339: ,language
340: ,last_update_date
341: ,last_upated_by

Line 366: INSERT INTO ams_triggers_tl

362: -- removed by soagrawa on 24-sep-2001
363: -- ,l_trig_rec.security_group_id
364: ) ;
365: */
366: INSERT INTO ams_triggers_tl
367: (trigger_id
368: ,language
369: ,last_update_date
370: ,last_upated_by

Line 395: FROM ams_triggers_tl t

391: FROM fnd_languages l
392: WHERE l.installed_flag IN ('I','B')
393: AND NOT EXISTS(
394: SELECT NULL
395: FROM ams_triggers_tl t
396: WHERE t.trigger_id = l_trig_rec.trigger_id
397: AND t.language = l.language_code ) ;
398:
399: AMS_Utility_PVT.debug_message(l_full_name ||': inserted in tl table');

Line 512: -- This procedure is to delete a ams_triggers table that satisfy caller needs

508: -- NAME
509: -- Delete_Trigger
510: --
511: -- PURPOSE
512: -- This procedure is to delete a ams_triggers table that satisfy caller needs
513: --
514: -- NOTES
515: -- Buss. Rule : If the trigger is not repeating , delete trigger
516: -- If it is repeating , Delete trigger only if it hasn't run yet.

Line 569: FROM ams_triggers

565: trigger_created_for_id,
566: timezone_id,
567: start_date_time,
568: process_id
569: FROM ams_triggers
570: WHERE trigger_id = p_trigger_id ;
571:
572: /*CURSOR c_assoc_sch IS
573: SELECT count(*)

Line 678: DELETE FROM AMS_triggers_tl

674: );
675:
676: IF (l_trig_rec.process_id IS NULL OR l_trig_rec.process_id = '') THEN -- if trigger has not started yet
677:
678: DELETE FROM AMS_triggers_tl
679: WHERE trigger_id = p_trigger_id ;
680: IF (SQL%NOTFOUND) THEN
681: AMS_Utility_PVT.Error_Message('AMS_API_RECORD_NOT_FOUND');
682: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 692: DELETE FROM ams_triggers

688: p_msg_data => 'going to delete trigger_id:'||p_trigger_id,
689: p_msg_type => 'DEBUG'
690: );
691:
692: DELETE FROM ams_triggers
693: WHERE trigger_id = p_trigger_id
694: AND object_version_number = p_object_version_number ;
695:
696: IF (SQL%NOTFOUND) THEN

Line 799: -- This procedure is to lock a ams_triggers table that satisfy caller needs

795: -- NAME
796: -- Lock_Trigger
797: --
798: -- PURPOSE
799: -- This procedure is to lock a ams_triggers table that satisfy caller needs
800: --
801: -- NOTES
802: --
803: --

Line 829: CURSOR C_ams_triggers IS

825:
826: -- Status Local Variables
827: l_trigger_id NUMBER;
828:
829: CURSOR C_ams_triggers IS
830: SELECT trigger_id
831: FROM ams_triggers
832: WHERE trigger_id = p_trigger_id
833: AND object_version_number = p_object_version_number

Line 831: FROM ams_triggers

827: l_trigger_id NUMBER;
828:
829: CURSOR C_ams_triggers IS
830: SELECT trigger_id
831: FROM ams_triggers
832: WHERE trigger_id = p_trigger_id
833: AND object_version_number = p_object_version_number
834: FOR UPDATE of trigger_id NOWAIT;
835:

Line 838: FROM ams_triggers_tl

834: FOR UPDATE of trigger_id NOWAIT;
835:
836: CURSOR c_trig_tl IS
837: SELECT trigger_id
838: FROM ams_triggers_tl
839: WHERE trigger_id = p_trigger_id
840: AND USERENV('LANG') IN (language, source_lang)
841: FOR UPDATE NOWAIT;
842:

Line 887: OPEN C_ams_triggers;

883: END IF;
884:
885:
886: -- Perform the database operation
887: OPEN C_ams_triggers;
888: FETCH C_ams_triggers INTO l_trigger_id ;
889: IF (C_ams_triggers%NOTFOUND) THEN
890: CLOSE C_ams_triggers;
891: -- Error, check the msg level and added an error message to the

Line 888: FETCH C_ams_triggers INTO l_trigger_id ;

884:
885:
886: -- Perform the database operation
887: OPEN C_ams_triggers;
888: FETCH C_ams_triggers INTO l_trigger_id ;
889: IF (C_ams_triggers%NOTFOUND) THEN
890: CLOSE C_ams_triggers;
891: -- Error, check the msg level and added an error message to the
892: -- API message list

Line 889: IF (C_ams_triggers%NOTFOUND) THEN

885:
886: -- Perform the database operation
887: OPEN C_ams_triggers;
888: FETCH C_ams_triggers INTO l_trigger_id ;
889: IF (C_ams_triggers%NOTFOUND) THEN
890: CLOSE C_ams_triggers;
891: -- Error, check the msg level and added an error message to the
892: -- API message list
893: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR)

Line 890: CLOSE C_ams_triggers;

886: -- Perform the database operation
887: OPEN C_ams_triggers;
888: FETCH C_ams_triggers INTO l_trigger_id ;
889: IF (C_ams_triggers%NOTFOUND) THEN
890: CLOSE C_ams_triggers;
891: -- Error, check the msg level and added an error message to the
892: -- API message list
893: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR)
894: THEN -- MMSG

Line 901: CLOSE C_ams_triggers;

897: END IF;
898:
899: RAISE FND_API.G_EXC_ERROR;
900: END IF;
901: CLOSE C_ams_triggers;
902:
903: OPEN c_trig_tl ;
904: CLOSE c_trig_tl ;
905:

Line 981: -- This procedure is to update a ams_triggers table that satisfy caller needs

977: -- NAME
978: -- Update_Trigger
979: --
980: -- PURPOSE
981: -- This procedure is to update a ams_triggers table that satisfy caller needs
982: --
983: -- NOTES
984: --
985: --

Line 1019: FROM ams_triggers

1015:
1016: CURSOR c_trig IS
1017: SELECT repeat_frequency_type,last_run_date_time,
1018: repeat_stop_date_time
1019: FROM ams_triggers
1020: WHERE trigger_id = p_trig_rec.trigger_id ;
1021:
1022: l_trig_det_rec c_trig%ROWTYPE;
1023:

Line 1146: UPDATE ams_triggers

1142:
1143: AMS_Utility_PVT.debug_message(l_full_name ||': update');
1144: END IF;
1145:
1146: UPDATE ams_triggers
1147: SET
1148: last_update_date = SYSDATE
1149: ,last_updated_by = FND_GLOBAL.user_id
1150: ,last_update_login = FND_GLOBAL.conc_login_id

Line 1190: UPDATE ams_triggers_tl

1186: AMS_Utility_PVT.Error_Message('AMS_API_RECORD_NOT_FOUND');
1187: RAISE FND_API.g_exc_error;
1188: END IF;
1189:
1190: UPDATE ams_triggers_tl
1191: SET
1192: last_update_date = SYSDATE,
1193: last_upated_by = FND_GLOBAL.user_id,
1194: creation_date = SYSDATE,

Line 1709: -- This procedure is to validate ams_triggers items

1705: -- NAME
1706: -- Validate_Trig_UK_Items
1707: --
1708: -- PURPOSE
1709: -- This procedure is to validate ams_triggers items
1710: --
1711: -- NOTES
1712: --
1713: --

Line 1734: -- FROM AMS_TRIGGERS_VL

1730: CURSOR c_trig_name IS
1731: -- modified by dhsingh on 20.05.2004 for bug# 3631107
1732: -- SELECT 1 from dual
1733: -- WHERE EXISTS (SELECT *
1734: -- FROM AMS_TRIGGERS_VL
1735: -- WHERE UPPER(TRIGGER_NAME) = UPPER(p_trig_rec.trigger_name));
1736: SELECT 1 from dual
1737: WHERE EXISTS (SELECT *
1738: FROM AMS_TRIGGERS_TL

Line 1738: FROM AMS_TRIGGERS_TL

1734: -- FROM AMS_TRIGGERS_VL
1735: -- WHERE UPPER(TRIGGER_NAME) = UPPER(p_trig_rec.trigger_name));
1736: SELECT 1 from dual
1737: WHERE EXISTS (SELECT *
1738: FROM AMS_TRIGGERS_TL
1739: WHERE UPPER(TRIGGER_NAME) = UPPER(p_trig_rec.trigger_name)
1740: AND language = USERENV('LANG'));
1741: -- end of modification by dhsingh
1742:

Line 1747: -- FROM AMS_TRIGGERS_VL

1743: CURSOR c_trig_name_updt IS
1744: -- modified by dhsingh on 20.05.2004 for bug# 3631107
1745: -- SELECT 1 from dual
1746: -- WHERE EXISTS (SELECT *
1747: -- FROM AMS_TRIGGERS_VL
1748: -- WHERE UPPER(TRIGGER_NAME) = UPPER(p_trig_rec.trigger_name)
1749: -- AND TRIGGER_ID <> p_trig_rec.trigger_id);
1750: SELECT 1 from dual
1751: WHERE EXISTS (SELECT *

Line 1752: FROM AMS_TRIGGERS_TL

1748: -- WHERE UPPER(TRIGGER_NAME) = UPPER(p_trig_rec.trigger_name)
1749: -- AND TRIGGER_ID <> p_trig_rec.trigger_id);
1750: SELECT 1 from dual
1751: WHERE EXISTS (SELECT *
1752: FROM AMS_TRIGGERS_TL
1753: WHERE UPPER(TRIGGER_NAME) = UPPER(p_trig_rec.trigger_name)
1754: AND TRIGGER_ID <> p_trig_rec.trigger_id
1755: AND language = USERENV('LANG'));
1756: -- end of modification by dhsingh

Line 1771: 'AMS_TRIGGERS',

1767: IF p_validation_mode = JTF_PLSQL_API.g_create
1768: AND p_trig_rec.trigger_id IS NOT NULL
1769: THEN
1770: IF AMS_Utility_PVT.check_uniqueness(
1771: 'AMS_TRIGGERS',
1772: 'TRIGGER_ID = ' || p_trig_rec.trigger_id
1773: ) = FND_API.g_false
1774: THEN
1775: AMS_UTILITY_PVT.Error_Message('AMS_TRIG_DUP_TRIG_ID');

Line 1797: p_table_name => 'AMS_TRIGGERS_VL',

1793: l_where_clause := l_where_clause || ' AND TRIGGER_ID <> ' || p_trig_rec.trigger_id;
1794: END IF;
1795:
1796: IF AMS_Utility_PVT.Check_Uniqueness(
1797: p_table_name => 'AMS_TRIGGERS_VL',
1798: p_where_clause => l_where_clause
1799: ) = FND_API.g_false
1800: THEN
1801: AMS_UTILITY_PVT.Error_Message('AMS_TRIG_DUP_TRIG_NAME');

Line 1837: -- This procedure is to validate ams_triggers items

1833: -- NAME
1834: -- Check_Trig_fk_Items
1835: --
1836: -- PURPOSE
1837: -- This procedure is to validate ams_triggers items
1838: -- It will validates the Foreign keys
1839: --
1840: -- NOTES
1841: --

Line 1903: -- This procedure is to validate ams_triggers items

1899: -- NAME
1900: -- Check_Trig_lookup_Items
1901: --
1902: -- PURPOSE
1903: -- This procedure is to validate ams_triggers items
1904: -- It will validates the lookup keys
1905: -- NOTES
1906: --
1907: -- HISTORY

Line 1962: -- This procedure is to validate ams_triggers items

1958: -- NAME
1959: -- Check_Trig_Items
1960: --
1961: -- PURPOSE
1962: -- This procedure is to validate ams_triggers items
1963: -- NOTES
1964: --
1965: -- HISTORY
1966: -- 10/25/1999 ptendulk created

Line 2073: -- This procedure is to validate ams_triggers table.

2069: -- NAME
2070: -- Validate_Trig_Record
2071: --
2072: -- PURPOSE
2073: -- This procedure is to validate ams_triggers table.
2074: -- This is an example if you need to call validation procedure from the UI site.
2075: --
2076: -- NOTES
2077: --

Line 2399: FROM ams_triggers_vl

2395: IS
2396:
2397: CURSOR c_trig IS
2398: SELECT *
2399: FROM ams_triggers_vl
2400: WHERE trigger_id = p_trig_rec.trigger_id;
2401:
2402: l_trig_rec c_trig%ROWTYPE;
2403: