78: END IF;
79:
80: /* Initialize message list if p_init_msg_list is set to TRUE. */
81: IF FND_API.to_Boolean( p_init_msg_list ) THEN
82: FND_MSG_PUB.initialize;
83: END IF;
84:
85: /* Initialize API return status to success */
86: x_return_status := FND_API.G_RET_STS_SUCCESS;
91: /* Validation to prevent System Events Log through Public API calls */
92: IF
93: (p_event_type is null OR p_event_type NOT IN ('EAM_USER_EVENTS', 'EAM_OPERATIONAL_EVENTS'))
94: THEN
95: -- fnd_msg_pub.eventtype;
96: fnd_message.set_name
97: ( application => 'EAM'
98: , name => 'EAM_EVENT_TYPE_INVALID'
99: );
96: fnd_message.set_name
97: ( application => 'EAM'
98: , name => 'EAM_EVENT_TYPE_INVALID'
99: );
100: fnd_msg_pub.add;
101: x_return_status:= fnd_api.g_ret_sts_error;
102: fnd_msg_pub.count_and_get
103: ( p_count => x_msg_count,
104: p_data => x_msg_data
98: , name => 'EAM_EVENT_TYPE_INVALID'
99: );
100: fnd_msg_pub.add;
101: x_return_status:= fnd_api.g_ret_sts_error;
102: fnd_msg_pub.count_and_get
103: ( p_count => x_msg_count,
104: p_data => x_msg_data
105: );
106: return;
245: IF FND_API.TO_BOOLEAN( P_COMMIT ) THEN
246: COMMIT WORK;
247: END IF;
248: -- Standard call to get message count and if count is 1, get message info.
249: FND_MSG_PUB.GET
250: ( p_msg_index_out => x_msg_count ,
251: p_data => x_msg_data
252: );
253:
254: EXCEPTION
255: WHEN FND_API.G_EXC_ERROR THEN
256: ROLLBACK TO EAM_ASSET_LOG_PUB_SV;
257: x_return_status := FND_API.G_RET_STS_ERROR ;
258: FND_MSG_PUB.Get
259: ( p_msg_index_out => x_msg_count ,
260: p_data => x_msg_data
261: );
262:
262:
263: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
264: ROLLBACK TO EAM_ASSET_LOG_PUB_SV;
265: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
266: FND_MSG_PUB.get
267: ( p_msg_index_out => x_msg_count ,
268: p_data => x_msg_data
269: );
270:
271: WHEN OTHERS THEN
272: ROLLBACK TO EAM_ASSET_LOG_PUB_SV;
273: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
274:
275: IF FND_MSG_PUB.Check_Msg_Level
276: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
277: THEN
278: FND_MSG_PUB.Add_Exc_Msg
279: ( G_PKG_NAME ,
272: ROLLBACK TO EAM_ASSET_LOG_PUB_SV;
273: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
274:
275: IF FND_MSG_PUB.Check_Msg_Level
276: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
277: THEN
278: FND_MSG_PUB.Add_Exc_Msg
279: ( G_PKG_NAME ,
280: l_api_name
274:
275: IF FND_MSG_PUB.Check_Msg_Level
276: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
277: THEN
278: FND_MSG_PUB.Add_Exc_Msg
279: ( G_PKG_NAME ,
280: l_api_name
281: );
282: END IF;
280: l_api_name
281: );
282: END IF;
283:
284: FND_MSG_PUB.get
285: ( p_msg_index_out => x_msg_count ,
286: p_data => x_msg_data
287: );
288: