124:
125: -- Cursor to get the user_status_id for a specific system_status_type and system_status_code
126: CURSOR c_user_status_id (p_status_type IN VARCHAR2, p_status_code IN VARCHAR2) IS
127: SELECT user_status_id
128: FROM ams_user_statuses_b
129: WHERE system_status_type = p_status_type
130: AND system_status_code = p_status_code
131: AND default_flag = 'Y'
132: AND enabled_flag = 'Y'
134:
135: -- Cursor to get the system_status_code for a specific system_status_type and user_status_id
136: CURSOR c_user_status_code (p_status_type IN VARCHAR2, p_status_id IN NUMBER) IS
137: SELECT system_status_code
138: FROM ams_user_statuses_b
139: WHERE system_status_type = p_status_type
140: AND user_status_id = p_status_id
141: ;
142:
1604:
1605: --------------------- user_status_id ------------------------
1606: IF p_dm_model_rec.user_status_id <> FND_API.g_miss_num THEN
1607: IF AMS_Utility_PVT.check_fk_exists(
1608: 'ams_user_statuses_b',
1609: 'user_status_id',
1610: p_dm_model_rec.user_status_id
1611: ) = FND_API.g_false
1612: THEN
2705: ;
2706:
2707: CURSOR c_user_status_id IS
2708: SELECT user_status_id
2709: FROM ams_user_statuses_b
2710: WHERE system_status_type = G_MODEL_STATUS_TYPE
2711: AND system_status_code = G_MODEL_STATUS_EXPIRED
2712: ;
2713: BEGIN