125:
126: --
127: -- Debug Message
128: --
129: AMS_Utility_PVT.debug_message(l_api_name || ': start');
130:
131: --
132: -- Initialize message list IF p_init_msg_list is set to TRUE.
133: --
156: OPEN c_status('ACTIVE') ;
157: FETCH c_status INTO l_status_id ;
158: IF c_status%NOTFOUND THEN
159: CLOSE c_status;
160: AMS_Utility_PVT.error_message('AMS_EVENT_BAD_USER_STATUS');
161: RETURN ;
162: END IF ;
163: CLOSE c_status ;
164:
190: FETCH c_EVENT_status INTO l_parent_status_id;
191: CLOSE c_EVENT_status;
192:
193: -- Getting the system_status_code of Parent
194: l_parent_system_status_code := Ams_Utility_Pvt.get_system_status_code(l_parent_status_id);
195:
196: END IF;
197:
198: IF l_parent_system_status_code = 'ACTIVE' THEN*/
259: FETCH c_PROGRAM_status INTO l_parent_status_id;
260: CLOSE c_PROGRAM_status;
261:
262: /* Getting the system_status_code of Parent */
263: l_parent_system_status_code := Ams_Utility_Pvt.get_system_status_code(l_parent_status_id);
264:
265: END IF;
266:
267: IF l_parent_system_status_code = 'ACTIVE' OR l_parent_id IS NULL THEN
323: OPEN c_status('COMPLETED') ;
324: FETCH c_status INTO l_status_id ;
325: IF c_status%NOTFOUND THEN
326: CLOSE c_status;
327: AMS_Utility_PVT.error_message('AMS_EVENT_BAD_USER_STATUS');
328: RETURN ;
329: END IF ;
330: CLOSE c_status ;
331:
331:
332: --Added for time Zone issue FIX : BUG 4482556 ANSKUMAR
333: l_user_timezone_id:= FND_PROFILE.VALUE('CLIENT_TIMEZONE_ID');
334: --API to convert the sysdate to usertimezone Date : BUG 4482556 ANSKUMAR
335: AMS_UTILITY_PVT.Convert_Timezone(
336: p_init_msg_list => FND_API.G_TRUE,
337: x_return_status => l_return_status,
338: x_msg_count => l_msg_count,
339: x_msg_data => l_msg_data,
426: p_data => x_msg_data,
427: p_encoded => FND_API.G_FALSE
428: );
429:
430: AMS_Utility_PVT.debug_message(l_api_name ||' : end Status : ' || x_return_status);
431: --dbms_output.put_line(l_api_name ||' : end Status : ' || x_return_status);
432:
433: IF (l_return_flag = 'Y') THEN
434: x_return_status := FND_API.G_RET_STS_SUCCESS;
528: x_msg_data => l_msg_data
529: );
530:
531: -- Write_log ;
532: Ams_Utility_Pvt.Write_Conc_log ;
533:
534: IF(l_return_status = FND_API.G_RET_STS_SUCCESS)THEN
535: retcode :=0;
536: ELSE