DBA Data[Home] [Help]

APPS.FND_FLEX_TRIGGER dependencies on FND_FLEX_VALIDATION_RULE_STATS

Line 52: /* Updates the FND_FLEX_VALIDATION_RULE_STATS table with the number */

48: /* these functions returns error. */
49: /* ----------------------------------------------------------------------- */
50:
51: /* ----------------------------------------------------------------------- */
52: /* Updates the FND_FLEX_VALIDATION_RULE_STATS table with the number */
53: /* of new rules, new include rule lines and new exclude rule lines */
54: /* for the given flexfield structure. Creates a new row in the */
55: /* rule stats table if there isn't already one there for this */
56: /* structure. Can input negative numbers to mean rules or lines */

Line 78: from FND_FLEX_VALIDATION_RULE_STATS where APPLICATION_ID = apid

74: n_excls NUMBER;
75:
76: CURSOR current_count(apid in NUMBER, fcode in VARCHAR2, fnum in NUMBER) is
77: select RULE_COUNT, INCLUDE_LINE_COUNT, EXCLUDE_LINE_COUNT
78: from FND_FLEX_VALIDATION_RULE_STATS where APPLICATION_ID = apid
79: and ID_FLEX_CODE = fcode and ID_FLEX_NUM = fnum
80: for update;
81: BEGIN
82:

Line 85: INSERT INTO fnd_flex_validation_rule_stats (

81: BEGIN
82:
83: -- create row for this structure if needed.
84: --
85: INSERT INTO fnd_flex_validation_rule_stats (
86: application_id, id_flex_code, id_flex_num, creation_date,
87: created_by, last_update_date, last_updated_by, last_update_login,
88: rule_count, include_line_count, exclude_line_count)
89: SELECT appid, flex_code, flex_num, sysdate, -1, sysdate, -1, -1, 0, 0, 0

Line 91: (SELECT NULL FROM fnd_flex_validation_rule_stats

87: created_by, last_update_date, last_updated_by, last_update_login,
88: rule_count, include_line_count, exclude_line_count)
89: SELECT appid, flex_code, flex_num, sysdate, -1, sysdate, -1, -1, 0, 0, 0
90: FROM dual WHERE NOT EXISTS
91: (SELECT NULL FROM fnd_flex_validation_rule_stats
92: WHERE application_id = appid
93: AND id_flex_code = flex_code
94: AND id_flex_num = flex_num);
95:

Line 104: UPDATE fnd_flex_validation_rule_stats

100: if((current_count%FOUND is not null) and (current_count%FOUND)) then
101: n_rules := greatest(0, n_rules + n_new_rules);
102: n_incls := greatest(0, n_incls + n_new_incls);
103: n_excls := greatest(0, n_excls + n_new_excls);
104: UPDATE fnd_flex_validation_rule_stats
105: SET last_update_date = sysdate, last_updated_by = -1,
106: rule_count = n_rules, include_line_count = n_incls,
107: exclude_line_count = n_excls
108: WHERE application_id = appid