109: END IF;
110:
111: /* Initialize message list if p_init_msg_list is set to TRUE. */
112: IF FND_API.to_Boolean( p_init_msg_list ) THEN
113: FND_MSG_PUB.initialize;
114: END IF;
115: /* Initialize API return status to success */
116: x_return_status := FND_API.G_RET_STS_SUCCESS;
117:
140: /* validating the local flag */
141: if nvl(p_local_flag, 'N') = 'Y' then
142: if p_organization_id is null then
143: FND_MESSAGE.SET_NAME('EAM','EAM_PM_ORGID_REQUIRED');
144: FND_MSG_PUB.Add;
145: RAISE FND_API.G_EXC_ERROR;
146: end if;
147: end if;
148:
172: x_error_message => x_error_message);
173: IF (not l_validated) THEN
174: FND_MESSAGE.SET_NAME('EAM', 'EAM_INVALID_DESC_FLEX');
175: FND_MESSAGE.SET_TOKEN('ERROR_MSG', x_error_message);
176: FND_MSG_PUB.Add;
177: RAISE FND_API.G_EXC_ERROR;
178: END IF;
179:
180:
249: IF FND_API.TO_BOOLEAN( P_COMMIT ) THEN
250: COMMIT WORK;
251: END IF;
252: /* Standard call to get message count and if count is 1, get message info. */
253: FND_MSG_PUB.get
254: ( p_msg_index_out => x_msg_count ,
255: p_data => x_msg_data
256: );
257:
259: WHEN FND_API.G_EXC_ERROR THEN
260:
261: ROLLBACK TO Insert_PMSetName_PUB;
262: x_return_status := FND_API.G_RET_STS_ERROR ;
263: FND_MSG_PUB.get
264: ( p_msg_index_out => x_msg_count ,
265: p_data => x_msg_data
266: );
267:
268: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
269:
270: ROLLBACK TO Insert_PMSetName_PUB;
271: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
272: FND_MSG_PUB.get
273: ( p_msg_index_out => x_msg_count ,
274: p_data => x_msg_data
275: );
276:
278:
279: ROLLBACK TO Insert_PMSetName_PUB;
280: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
281:
282: IF FND_MSG_PUB.Check_Msg_Level
283: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
284: THEN
285: FND_MSG_PUB.Add_Exc_Msg
286: ( G_PKG_NAME ,
279: ROLLBACK TO Insert_PMSetName_PUB;
280: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
281:
282: IF FND_MSG_PUB.Check_Msg_Level
283: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
284: THEN
285: FND_MSG_PUB.Add_Exc_Msg
286: ( G_PKG_NAME ,
287: l_api_name
281:
282: IF FND_MSG_PUB.Check_Msg_Level
283: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
284: THEN
285: FND_MSG_PUB.Add_Exc_Msg
286: ( G_PKG_NAME ,
287: l_api_name
288: );
289: END IF;
287: l_api_name
288: );
289: END IF;
290:
291: FND_MSG_PUB.get
292: ( p_msg_index_out => x_msg_count ,
293: p_data => x_msg_data
294: );
295:
381: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
382: END IF;
383: /* Initialize message list if p_init_msg_list is set to TRUE. */
384: IF FND_API.to_Boolean( p_init_msg_list ) THEN
385: FND_MSG_PUB.initialize;
386: END IF;
387:
388: /* Initialize API return status to success */
389: x_return_status := FND_API.G_RET_STS_SUCCESS;
447: IF (not l_validated) THEN
448: --raise_error(x_error_message);
449: FND_MESSAGE.SET_NAME('EAM', 'EAM_INVALID_DESC_FLEX');
450: FND_MESSAGE.SET_TOKEN('ERROR_MSG', x_error_message);
451: FND_MSG_PUB.Add;
452: RAISE FND_API.G_EXC_ERROR;
453:
454: END IF;
455: --added to check whether the end date is allowed.
474: )
475: )
476: THEN
477: FND_MESSAGE.SET_NAME('EAM','EAM_SETNAME_SEED_DATE_NOUPD');
478: FND_MSG_PUB.Add;
479: RAISE FND_API.G_EXC_ERROR;
480: END IF;
481:
482:
485: if nvl(p_local_flag, 'N') = 'Y' then
486:
487: if l_set_name_id = 1 then
488: FND_MESSAGE.SET_NAME('EAM','EAM_MAIN_GLOBAL');
489: FND_MSG_PUB.Add;
490: RAISE FND_API.G_EXC_ERROR;
491: end if;
492:
493: if p_organization_id is null then
491: end if;
492:
493: if p_organization_id is null then
494: FND_MESSAGE.SET_NAME('EAM','EAM_PM_ORGID_REQUIRED');
495: FND_MSG_PUB.Add;
496: RAISE FND_API.G_EXC_ERROR;
497: end if;
498:
499: if nvl(l_local_flag, 'N') = 'N' then
516:
517: if l_exists = 'Y' then
518: FND_MESSAGE.SET_NAME('EAM','EAM_PM_SCHEDULE_EXISTS');
519: FND_MESSAGE.SET_TOKEN('ENTITY1', p_set_name);
520: FND_MSG_PUB.Add;
521: RAISE FND_API.G_EXC_ERROR;
522: end if;
523: end if;
524: end if;
561: IF FND_API.TO_BOOLEAN( P_COMMIT ) THEN
562: COMMIT WORK;
563: END IF;
564: /* Standard call to get message count and if count is 1, get message info. */
565: FND_MSG_PUB.get
566: ( p_msg_index_out => x_msg_count ,
567: p_data => x_msg_data
568: );
569:
573: WHEN FND_API.G_EXC_ERROR THEN
574:
575: ROLLBACK TO Update_PMSetName_PUB;
576: x_return_status := FND_API.G_RET_STS_ERROR ;
577: FND_MSG_PUB.get
578: ( p_msg_index_out => x_msg_count ,
579: p_data => x_msg_data
580: );
581:
582: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
583:
584: ROLLBACK TO Update_PMSetName_PUB;
585: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
586: FND_MSG_PUB.get
587: ( p_msg_index_out => x_msg_count ,
588: p_data => x_msg_data
589: );
590:
591: WHEN OTHERS THEN
592:
593: ROLLBACK TO Update_PMSetName_PUB;
594: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
595: IF FND_MSG_PUB.Check_Msg_Level
596: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
597: THEN
598: FND_MSG_PUB.Add_Exc_Msg
599: ( G_PKG_NAME ,
592:
593: ROLLBACK TO Update_PMSetName_PUB;
594: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
595: IF FND_MSG_PUB.Check_Msg_Level
596: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
597: THEN
598: FND_MSG_PUB.Add_Exc_Msg
599: ( G_PKG_NAME ,
600: l_api_name
594: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
595: IF FND_MSG_PUB.Check_Msg_Level
596: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
597: THEN
598: FND_MSG_PUB.Add_Exc_Msg
599: ( G_PKG_NAME ,
600: l_api_name
601: );
602: END IF;
600: l_api_name
601: );
602: END IF;
603:
604: FND_MSG_PUB.get
605: ( p_msg_index_out => x_msg_count ,
606: p_data => x_msg_data
607: );
608:
694: PROCEDURE RAISE_ERROR (ERROR VARCHAR2)
695: IS
696: BEGIN
697: FND_MESSAGE.SET_NAME ('EAM', ERROR);
698: FND_MSG_PUB.ADD;
699: RAISE FND_API.G_EXC_ERROR;
700: END;
701:
702: PROCEDURE print_log(info varchar2) is