103: -- =========================================================================
104: -- Validate Environment
105: -- =========================================================================
106:
107: IF FND_GLOBAL.User_Id IS NULL
108: THEN
109: AMS_Utility_PVT.Error_Message(p_message_name => 'USER_PROFILE_MISSING');
110: RAISE FND_API.G_EXC_ERROR;
111: END IF;
148: l_templ_responsibility_id,
149: DECODE( p_template_res_rec.template_id, FND_API.g_miss_num, NULL, p_template_res_rec.template_id),
150: DECODE( p_template_res_rec.responsibility_id, FND_API.g_miss_num, NULL, p_template_res_rec.responsibility_id),
151: sysdate,
152: fnd_global.user_id,
153: sysdate,
154: fnd_global.user_id,
155: 1,
156: FND_GLOBAL.CONC_LOGIN_ID
150: DECODE( p_template_res_rec.responsibility_id, FND_API.g_miss_num, NULL, p_template_res_rec.responsibility_id),
151: sysdate,
152: fnd_global.user_id,
153: sysdate,
154: fnd_global.user_id,
155: 1,
156: FND_GLOBAL.CONC_LOGIN_ID
157: );
158:
152: fnd_global.user_id,
153: sysdate,
154: fnd_global.user_id,
155: 1,
156: FND_GLOBAL.CONC_LOGIN_ID
157: );
158:
159: x_templ_responsibility_id := l_templ_responsibility_id;
160: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
351: SET templ_responsibility_id = DECODE( p_template_res_rec.templ_responsibility_id, FND_API.g_miss_num, templ_responsibility_id, p_template_res_rec.templ_responsibility_id),
352: template_id = DECODE( p_template_res_rec.template_id, FND_API.g_miss_num, template_id, p_template_res_rec.template_id),
353: responsibility_id = DECODE( p_template_res_rec.responsibility_id, FND_API.g_miss_num, responsibility_id, p_template_res_rec.responsibility_id),
354: last_update_date = sysdate,
355: last_updated_by = fnd_global.user_id,
356: object_version_number = p_template_res_rec.object_version_number + 1,
357: last_update_login = FND_GLOBAL.CONC_LOGIN_ID
358: WHERE TEMPL_RESPONSIBILITY_ID = p_template_res_rec.templ_responsibility_id
359: AND object_version_number = p_template_res_rec.object_version_number;
353: responsibility_id = DECODE( p_template_res_rec.responsibility_id, FND_API.g_miss_num, responsibility_id, p_template_res_rec.responsibility_id),
354: last_update_date = sysdate,
355: last_updated_by = fnd_global.user_id,
356: object_version_number = p_template_res_rec.object_version_number + 1,
357: last_update_login = FND_GLOBAL.CONC_LOGIN_ID
358: WHERE TEMPL_RESPONSIBILITY_ID = p_template_res_rec.templ_responsibility_id
359: AND object_version_number = p_template_res_rec.object_version_number;
360:
361: IF (SQL%NOTFOUND) THEN