DBA Data[Home] [Help]

APPS.CN_CALC_SUBMISSION_PUB dependencies on FND_API

Line 91: x_return_status := FND_API.G_RET_STS_SUCCESS;

87: 'Beginning of validate_calc_sub_batch ...');
88: end if;
89:
90: -- Initialize API return status to success
91: x_return_status := FND_API.G_RET_STS_SUCCESS;
92: x_loading_status := p_loading_status;
93:
94: -- Start of API body
95:

Line 103: x_loading_status => x_loading_status) = FND_API.G_TRUE) THEN

99: IF (cn_api.chk_miss_null_char_para
100: (p_char_para => p_calc_submission_rec.batch_name,
101: p_obj_name => g_calc_sub_name,
102: p_loading_status => x_loading_status,
103: x_loading_status => x_loading_status) = FND_API.G_TRUE) THEN
104: RAISE FND_API.G_EXC_ERROR ;
105: END IF;
106:
107: OPEN l_batch_name_csr;

Line 104: RAISE FND_API.G_EXC_ERROR ;

100: (p_char_para => p_calc_submission_rec.batch_name,
101: p_obj_name => g_calc_sub_name,
102: p_loading_status => x_loading_status,
103: x_loading_status => x_loading_status) = FND_API.G_TRUE) THEN
104: RAISE FND_API.G_EXC_ERROR ;
105: END IF;
106:
107: OPEN l_batch_name_csr;
108: FETCH l_batch_name_csr INTO l_counter;

Line 127: RAISE FND_API.G_EXC_ERROR ;

123: FND_MSG_PUB.Add;
124: END IF;
125:
126: x_loading_status := 'CN_CALC_SUB_EXISTS';
127: RAISE FND_API.G_EXC_ERROR ;
128: END IF;
129: END IF; -- end of p_name_validate_flag
130:
131: -- start_date can not be null/missing

Line 137: p_end_date_nullable => FND_API.G_TRUE,

133: -- start_date < end_date
134: IF ( (cn_api.invalid_date_range
135: (p_start_date => p_calc_submission_rec.start_date,
136: p_end_date => p_calc_submission_rec.end_date,
137: p_end_date_nullable => FND_API.G_TRUE,
138: p_loading_status => x_loading_status,
139: x_loading_status => x_loading_status)) = FND_API.G_TRUE ) THEN
140: RAISE FND_API.G_EXC_ERROR ;
141: END IF;

Line 139: x_loading_status => x_loading_status)) = FND_API.G_TRUE ) THEN

135: (p_start_date => p_calc_submission_rec.start_date,
136: p_end_date => p_calc_submission_rec.end_date,
137: p_end_date_nullable => FND_API.G_TRUE,
138: p_loading_status => x_loading_status,
139: x_loading_status => x_loading_status)) = FND_API.G_TRUE ) THEN
140: RAISE FND_API.G_EXC_ERROR ;
141: END IF;
142:
143: -- start_date / end_date must be within open period

Line 140: RAISE FND_API.G_EXC_ERROR ;

136: p_end_date => p_calc_submission_rec.end_date,
137: p_end_date_nullable => FND_API.G_TRUE,
138: p_loading_status => x_loading_status,
139: x_loading_status => x_loading_status)) = FND_API.G_TRUE ) THEN
140: RAISE FND_API.G_EXC_ERROR ;
141: END IF;
142:
143: -- start_date / end_date must be within open period
144: open l_ctr_csr( p_calc_submission_rec.start_date);

Line 164: RAISE FND_API.G_EXC_ERROR ;

160: FND_MSG_PUB.Add;
161: END IF;
162:
163: x_loading_status := 'CN_CALC_SUB_OPEN_DATE';
164: RAISE FND_API.G_EXC_ERROR ;
165: END IF;
166:
167: open l_ctr_csr( p_calc_submission_rec.end_date);
168: fetch l_ctr_csr into l_counter;

Line 187: RAISE FND_API.G_EXC_ERROR ;

183: FND_MSG_PUB.Add;
184: END IF;
185:
186: x_loading_status := 'CN_CALC_SUB_OPEN_DATE';
187: RAISE FND_API.G_EXC_ERROR ;
188: END IF;
189:
190: -- calculation_type can not be null/missing, must be valid value
191: IF ( (cn_api.chk_miss_null_char_para

Line 195: x_loading_status => x_loading_status)) = FND_API.G_TRUE ) THEN

191: IF ( (cn_api.chk_miss_null_char_para
192: (p_char_para => p_calc_submission_rec.calculation_type,
193: p_obj_name => g_calc_sub_calc_type,
194: p_loading_status => x_loading_status,
195: x_loading_status => x_loading_status)) = FND_API.G_TRUE ) THEN
196: RAISE FND_API.G_EXC_ERROR ;
197: END IF;
198:
199: IF ( p_calc_submission_rec.calculation_type NOT IN ('COMMISSION', 'BONUS')) THEN

Line 196: RAISE FND_API.G_EXC_ERROR ;

192: (p_char_para => p_calc_submission_rec.calculation_type,
193: p_obj_name => g_calc_sub_calc_type,
194: p_loading_status => x_loading_status,
195: x_loading_status => x_loading_status)) = FND_API.G_TRUE ) THEN
196: RAISE FND_API.G_EXC_ERROR ;
197: END IF;
198:
199: IF ( p_calc_submission_rec.calculation_type NOT IN ('COMMISSION', 'BONUS')) THEN
200: FND_MESSAGE.SET_NAME ('CN' , 'CN_INVALID_DATA');

Line 214: RAISE FND_API.G_EXC_ERROR ;

210: FND_MESSAGE.SET_TOKEN('OBJ_NAME', g_calc_sub_calc_type);
211: FND_MSG_PUB.Add;
212: END IF;
213: x_loading_status := 'CN_INVALID_DATA';
214: RAISE FND_API.G_EXC_ERROR ;
215: END IF;
216:
217: -- salesrep_option can not be null/missing, must be valid value
218: IF ( (cn_api.chk_miss_null_char_para

Line 222: x_loading_status => x_loading_status)) = FND_API.G_TRUE ) THEN

218: IF ( (cn_api.chk_miss_null_char_para
219: (p_char_para => p_calc_submission_rec.salesrep_option,
220: p_obj_name => g_calc_sub_salesrep_option,
221: p_loading_status => x_loading_status,
222: x_loading_status => x_loading_status)) = FND_API.G_TRUE ) THEN
223: RAISE FND_API.G_EXC_ERROR ;
224: END IF;
225:
226: IF p_calc_submission_rec.salesrep_option NOT IN ('ALL_REPS', 'USER_SPECIFY', 'REPS_IN_NOTIFY_LOG')

Line 223: RAISE FND_API.G_EXC_ERROR ;

219: (p_char_para => p_calc_submission_rec.salesrep_option,
220: p_obj_name => g_calc_sub_salesrep_option,
221: p_loading_status => x_loading_status,
222: x_loading_status => x_loading_status)) = FND_API.G_TRUE ) THEN
223: RAISE FND_API.G_EXC_ERROR ;
224: END IF;
225:
226: IF p_calc_submission_rec.salesrep_option NOT IN ('ALL_REPS', 'USER_SPECIFY', 'REPS_IN_NOTIFY_LOG')
227: OR ( p_calc_submission_rec.calculation_type = 'BONUS'

Line 244: RAISE FND_API.G_EXC_ERROR ;

240: FND_MESSAGE.SET_TOKEN('OBJ_NAME',g_calc_sub_salesrep_option );
241: FND_MSG_PUB.Add;
242: END IF;
243: x_loading_status := 'CN_INVALID_DATA';
244: RAISE FND_API.G_EXC_ERROR ;
245: END IF;
246:
247: -- entire_hierarchy can not be null/missing, must be valid value
248: IF ( (cn_api.chk_miss_null_char_para

Line 252: x_loading_status => x_loading_status)) = FND_API.G_TRUE ) THEN

248: IF ( (cn_api.chk_miss_null_char_para
249: (p_char_para => p_calc_submission_rec.entire_hierarchy,
250: p_obj_name => g_calc_sub_hierarchy_flag,
251: p_loading_status => x_loading_status,
252: x_loading_status => x_loading_status)) = FND_API.G_TRUE ) THEN
253: RAISE FND_API.G_EXC_ERROR ;
254: END IF;
255:
256: IF p_calc_submission_rec.entire_hierarchy NOT IN ('Y', 'N')

Line 253: RAISE FND_API.G_EXC_ERROR ;

249: (p_char_para => p_calc_submission_rec.entire_hierarchy,
250: p_obj_name => g_calc_sub_hierarchy_flag,
251: p_loading_status => x_loading_status,
252: x_loading_status => x_loading_status)) = FND_API.G_TRUE ) THEN
253: RAISE FND_API.G_EXC_ERROR ;
254: END IF;
255:
256: IF p_calc_submission_rec.entire_hierarchy NOT IN ('Y', 'N')
257: OR ( p_calc_submission_rec.salesrep_option IN ('ALL_REPS', 'REPS_IN_NOTIFY_LOG')

Line 274: RAISE FND_API.G_EXC_ERROR ;

270: FND_MESSAGE.SET_TOKEN('OBJ_NAME', g_calc_sub_hierarchy_flag );
271: FND_MSG_PUB.Add;
272: END IF;
273: x_loading_status := 'CN_INVALID_DATA';
274: RAISE FND_API.G_EXC_ERROR ;
275: END IF;
276:
277: -- concurrent_calculation can not be null/missing, must be valid value
278: IF ( (cn_api.chk_miss_null_char_para

Line 282: x_loading_status => x_loading_status)) = FND_API.G_TRUE ) THEN

278: IF ( (cn_api.chk_miss_null_char_para
279: (p_char_para => p_calc_submission_rec.concurrent_calculation,
280: p_obj_name => g_calc_sub_concurrent_flag,
281: p_loading_status => x_loading_status,
282: x_loading_status => x_loading_status)) = FND_API.G_TRUE ) THEN
283: RAISE FND_API.G_EXC_ERROR ;
284: END IF;
285:
286: IF p_calc_submission_rec.concurrent_calculation NOT IN ('Y', 'N') THEN

Line 283: RAISE FND_API.G_EXC_ERROR ;

279: (p_char_para => p_calc_submission_rec.concurrent_calculation,
280: p_obj_name => g_calc_sub_concurrent_flag,
281: p_loading_status => x_loading_status,
282: x_loading_status => x_loading_status)) = FND_API.G_TRUE ) THEN
283: RAISE FND_API.G_EXC_ERROR ;
284: END IF;
285:
286: IF p_calc_submission_rec.concurrent_calculation NOT IN ('Y', 'N') THEN
287: FND_MESSAGE.SET_NAME ('CN' , 'CN_INVALID_DATA');

Line 301: RAISE FND_API.G_EXC_ERROR ;

297: FND_MESSAGE.SET_TOKEN('OBJ_NAME',g_calc_sub_concurrent_flag );
298: FND_MSG_PUB.Add;
299: END IF;
300: x_loading_status := 'CN_INVALID_DATA';
301: RAISE FND_API.G_EXC_ERROR ;
302: END IF;
303:
304: -- incremental_calculation can not be null/missing , must be valid value
305: IF ( (cn_api.chk_miss_null_char_para

Line 309: x_loading_status => x_loading_status)) = FND_API.G_TRUE ) THEN

305: IF ( (cn_api.chk_miss_null_char_para
306: (p_char_para => p_calc_submission_rec.incremental_calculation,
307: p_obj_name => g_calc_sub_intelligent_flag,
308: p_loading_status => x_loading_status,
309: x_loading_status => x_loading_status)) = FND_API.G_TRUE ) THEN
310: RAISE FND_API.G_EXC_ERROR ;
311: END IF;
312:
313: IF p_calc_submission_rec.incremental_calculation NOT IN ('Y', 'N')

Line 310: RAISE FND_API.G_EXC_ERROR ;

306: (p_char_para => p_calc_submission_rec.incremental_calculation,
307: p_obj_name => g_calc_sub_intelligent_flag,
308: p_loading_status => x_loading_status,
309: x_loading_status => x_loading_status)) = FND_API.G_TRUE ) THEN
310: RAISE FND_API.G_EXC_ERROR ;
311: END IF;
312:
313: IF p_calc_submission_rec.incremental_calculation NOT IN ('Y', 'N')
314: OR ( p_calc_submission_rec.calculation_type = 'BONUS'

Line 333: RAISE FND_API.G_EXC_ERROR ;

329: FND_MESSAGE.SET_TOKEN('OBJ_NAME',g_calc_sub_intelligent_flag );
330: FND_MSG_PUB.Add;
331: END IF;
332: x_loading_status := 'CN_INVALID_DATA';
333: RAISE FND_API.G_EXC_ERROR ;
334: END IF;
335:
336: -- interval_type can not be null/missing, must be valid value if calc_type = 'BONUS'
337: IF p_calc_submission_rec.calculation_type = 'BONUS' THEN

Line 342: x_loading_status => x_loading_status)) = FND_API.G_TRUE ) THEN

338: IF ( (cn_api.chk_miss_null_char_para
339: (p_char_para => p_calc_submission_rec.interval_type,
340: p_obj_name => g_calc_sub_interval_type,
341: p_loading_status => x_loading_status,
342: x_loading_status => x_loading_status)) = FND_API.G_TRUE ) THEN
343: RAISE FND_API.G_EXC_ERROR ;
344: END IF;
345:
346: IF p_calc_submission_rec.interval_type NOT IN ('ALL', 'PERIOD', 'QUARTER', 'YEAR' ) THEN

Line 343: RAISE FND_API.G_EXC_ERROR ;

339: (p_char_para => p_calc_submission_rec.interval_type,
340: p_obj_name => g_calc_sub_interval_type,
341: p_loading_status => x_loading_status,
342: x_loading_status => x_loading_status)) = FND_API.G_TRUE ) THEN
343: RAISE FND_API.G_EXC_ERROR ;
344: END IF;
345:
346: IF p_calc_submission_rec.interval_type NOT IN ('ALL', 'PERIOD', 'QUARTER', 'YEAR' ) THEN
347: FND_MESSAGE.SET_NAME ('CN' , 'CN_INVALID_DATA');

Line 361: RAISE FND_API.G_EXC_ERROR ;

357: FND_MESSAGE.SET_TOKEN('OBJ_NAME', g_calc_sub_interval_type );
358: FND_MSG_PUB.Add;
359: END IF;
360: x_loading_status := 'CN_INVALID_DATA';
361: RAISE FND_API.G_EXC_ERROR ;
362: END IF;
363: END IF;
364:
365: -- End of API body.

Line 371: p_encoded => FND_API.G_FALSE

367: -- Standard call to get message count and if count is 1, get message info.
368: FND_MSG_PUB.Count_And_Get
369: (p_count => x_msg_count ,
370: p_data => x_msg_data ,
371: p_encoded => FND_API.G_FALSE
372: );
373:
374: if (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
375: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE,

Line 381: WHEN FND_API.G_EXC_ERROR THEN

377: 'End of validate_calc_sub_batch.');
378: end if;
379:
380: EXCEPTION
381: WHEN FND_API.G_EXC_ERROR THEN
382: x_return_status := FND_API.G_RET_STS_ERROR ;
383: FND_MSG_PUB.Count_And_Get
384: (
385: p_count => x_msg_count ,

Line 382: x_return_status := FND_API.G_RET_STS_ERROR ;

378: end if;
379:
380: EXCEPTION
381: WHEN FND_API.G_EXC_ERROR THEN
382: x_return_status := FND_API.G_RET_STS_ERROR ;
383: FND_MSG_PUB.Count_And_Get
384: (
385: p_count => x_msg_count ,
386: p_data => x_msg_data ,

Line 387: p_encoded => FND_API.G_FALSE

383: FND_MSG_PUB.Count_And_Get
384: (
385: p_count => x_msg_count ,
386: p_data => x_msg_data ,
387: p_encoded => FND_API.G_FALSE
388: );
389: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
390: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
391: x_loading_status := 'UNEXPECTED_ERR';

Line 389: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

385: p_count => x_msg_count ,
386: p_data => x_msg_data ,
387: p_encoded => FND_API.G_FALSE
388: );
389: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
390: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
391: x_loading_status := 'UNEXPECTED_ERR';
392: FND_MSG_PUB.Count_And_Get
393: (

Line 390: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

386: p_data => x_msg_data ,
387: p_encoded => FND_API.G_FALSE
388: );
389: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
390: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
391: x_loading_status := 'UNEXPECTED_ERR';
392: FND_MSG_PUB.Count_And_Get
393: (
394: p_count => x_msg_count ,

Line 396: p_encoded => FND_API.G_FALSE

392: FND_MSG_PUB.Count_And_Get
393: (
394: p_count => x_msg_count ,
395: p_data => x_msg_data ,
396: p_encoded => FND_API.G_FALSE
397: );
398: WHEN OTHERS THEN
399: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
400: x_loading_status := 'UNEXPECTED_ERR';

Line 399: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

395: p_data => x_msg_data ,
396: p_encoded => FND_API.G_FALSE
397: );
398: WHEN OTHERS THEN
399: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
400: x_loading_status := 'UNEXPECTED_ERR';
401: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
402: THEN
403: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME ,l_api_name );

Line 409: p_encoded => FND_API.G_FALSE

405: FND_MSG_PUB.Count_And_Get
406: (
407: p_count => x_msg_count ,
408: p_data => x_msg_data ,
409: p_encoded => FND_API.G_FALSE
410: );
411:
412: if (FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
413: FND_LOG.STRING(FND_LOG.LEVEL_UNEXPECTED,

Line 441: x_loading_status => x_loading_status) = FND_API.G_TRUE) THEN

437: IF (cn_api.chk_miss_char_para
438: (p_char_para => p_salesrep_rec.employee_number,
439: p_para_name => g_calc_sub_emp_num,
440: p_loading_status => x_loading_status,
441: x_loading_status => x_loading_status) = FND_API.G_TRUE) THEN
442: RETURN FALSE;
443: END IF;
444:
445: -- type can not be missing

Line 450: x_loading_status => x_loading_status) = FND_API.G_TRUE) THEN

446: IF (cn_api.chk_miss_char_para
447: (p_char_para => p_salesrep_rec.TYPE,
448: p_para_name => g_calc_sub_emp_type,
449: p_loading_status => x_loading_status,
450: x_loading_status => x_loading_status) = FND_API.G_TRUE) THEN
451: RETURN FALSE;
452: END IF;
453:
454: if (nvl(p_salesrep_rec.hierarchy_flag, 'N') not in ('N', 'Y')) then

Line 479: p_show_message => FND_API.G_TRUE);

475: p_org_id => g_org_id,
476: x_salesrep_id => l_salesrep_id,
477: x_return_status => l_return_status,
478: x_loading_status => x_loading_status,
479: p_show_message => FND_API.G_TRUE);
480: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS ) THEN
481: RETURN FALSE;
482: END IF;
483:

Line 480: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS ) THEN

476: x_salesrep_id => l_salesrep_id,
477: x_return_status => l_return_status,
478: x_loading_status => x_loading_status,
479: p_show_message => FND_API.G_TRUE);
480: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS ) THEN
481: RETURN FALSE;
482: END IF;
483:
484: OPEN l_has_had_comp_plan_csr( l_salesrep_id );

Line 589: x_return_status := FND_API.G_RET_STS_SUCCESS;

585: 'Beginning of validate_salesrep_entries ...');
586: end if;
587:
588: -- Initialize API return status to success
589: x_return_status := FND_API.G_RET_STS_SUCCESS;
590: x_loading_status := p_loading_status;
591:
592: -- Start of API body
593:

Line 607: RAISE FND_API.g_exc_error;

603: FND_MESSAGE.SET_NAME ('CN' , 'CN_CALC_NO_SALESREP');
604: FND_MSG_PUB.Add;
605: END IF;
606: x_loading_status := 'CN_CALC_NO_SALESREP';
607: RAISE FND_API.g_exc_error;
608: ELSE
609: FOR ctr IN 1 .. p_salesrep_tbl.COUNT LOOP
610: IF validate_salesrep( p_salesrep_rec => p_salesrep_tbl(ctr),
611: x_salesrep_id => l_salesrep_id,

Line 615: RAISE FND_API.g_exc_error;

611: x_salesrep_id => l_salesrep_id,
612: x_loading_status => x_loading_status ) THEN
613: x_salesreps_id_tbl(ctr) := l_salesrep_id;
614: ELSE
615: RAISE FND_API.g_exc_error;
616: END IF;
617: END LOOP;
618: END IF;
619:

Line 626: p_encoded => FND_API.G_FALSE

622: -- Standard call to get message count and if count is 1, get message info.
623: FND_MSG_PUB.Count_And_Get
624: (p_count => x_msg_count ,
625: p_data => x_msg_data ,
626: p_encoded => FND_API.G_FALSE
627: );
628:
629: if (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
630: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE,

Line 636: WHEN FND_API.G_EXC_ERROR THEN

632: 'End of validate_salesrep_entries.');
633: end if;
634:
635: EXCEPTION
636: WHEN FND_API.G_EXC_ERROR THEN
637: x_return_status := FND_API.G_RET_STS_ERROR ;
638: FND_MSG_PUB.Count_And_Get
639: (
640: p_count => x_msg_count ,

Line 637: x_return_status := FND_API.G_RET_STS_ERROR ;

633: end if;
634:
635: EXCEPTION
636: WHEN FND_API.G_EXC_ERROR THEN
637: x_return_status := FND_API.G_RET_STS_ERROR ;
638: FND_MSG_PUB.Count_And_Get
639: (
640: p_count => x_msg_count ,
641: p_data => x_msg_data ,

Line 642: p_encoded => FND_API.G_FALSE

638: FND_MSG_PUB.Count_And_Get
639: (
640: p_count => x_msg_count ,
641: p_data => x_msg_data ,
642: p_encoded => FND_API.G_FALSE
643: );
644: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
645: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
646: x_loading_status := 'UNEXPECTED_ERR';

Line 644: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

640: p_count => x_msg_count ,
641: p_data => x_msg_data ,
642: p_encoded => FND_API.G_FALSE
643: );
644: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
645: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
646: x_loading_status := 'UNEXPECTED_ERR';
647: FND_MSG_PUB.Count_And_Get
648: (

Line 645: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

641: p_data => x_msg_data ,
642: p_encoded => FND_API.G_FALSE
643: );
644: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
645: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
646: x_loading_status := 'UNEXPECTED_ERR';
647: FND_MSG_PUB.Count_And_Get
648: (
649: p_count => x_msg_count ,

Line 651: p_encoded => FND_API.G_FALSE

647: FND_MSG_PUB.Count_And_Get
648: (
649: p_count => x_msg_count ,
650: p_data => x_msg_data ,
651: p_encoded => FND_API.G_FALSE
652: );
653: WHEN OTHERS THEN
654: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
655: x_loading_status := 'UNEXPECTED_ERR';

Line 654: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

650: p_data => x_msg_data ,
651: p_encoded => FND_API.G_FALSE
652: );
653: WHEN OTHERS THEN
654: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
655: x_loading_status := 'UNEXPECTED_ERR';
656: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
657: THEN
658: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME ,l_api_name );

Line 664: p_encoded => FND_API.G_FALSE

660: FND_MSG_PUB.Count_And_Get
661: (
662: p_count => x_msg_count ,
663: p_data => x_msg_data ,
664: p_encoded => FND_API.G_FALSE
665: );
666:
667: if (FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
668: FND_LOG.STRING(FND_LOG.LEVEL_UNEXPECTED,

Line 704: x_return_status := FND_API.G_RET_STS_SUCCESS;

700: 'Beginning of validate_bonus_pe_entries ...');
701: end if;
702:
703: -- Initialize API return status to success
704: x_return_status := FND_API.G_RET_STS_SUCCESS;
705: x_loading_status := p_loading_status;
706:
707: -- Start of API body
708: FOR ctr IN 1 .. p_bonus_pe_tbl.COUNT LOOP

Line 715: RAISE FND_API.g_exc_error;

711: x_quota_id => l_quota_id,
712: x_loading_status => x_loading_status ) THEN
713: x_bonus_pe_id_tbl(ctr) := l_quota_id;
714: ELSE
715: RAISE FND_API.g_exc_error;
716: END IF;
717: END LOOP;
718:
719: -- End of API body.

Line 725: p_encoded => FND_API.G_FALSE

721: -- Standard call to get message count and if count is 1, get message info.
722: FND_MSG_PUB.Count_And_Get
723: (p_count => x_msg_count ,
724: p_data => x_msg_data ,
725: p_encoded => FND_API.G_FALSE
726: );
727:
728: if (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
729: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE,

Line 735: WHEN FND_API.G_EXC_ERROR THEN

731: 'End of validate_bonus_pe_entries.');
732: end if;
733:
734: EXCEPTION
735: WHEN FND_API.G_EXC_ERROR THEN
736: x_return_status := FND_API.G_RET_STS_ERROR ;
737: FND_MSG_PUB.Count_And_Get
738: (
739: p_count => x_msg_count ,

Line 736: x_return_status := FND_API.G_RET_STS_ERROR ;

732: end if;
733:
734: EXCEPTION
735: WHEN FND_API.G_EXC_ERROR THEN
736: x_return_status := FND_API.G_RET_STS_ERROR ;
737: FND_MSG_PUB.Count_And_Get
738: (
739: p_count => x_msg_count ,
740: p_data => x_msg_data ,

Line 741: p_encoded => FND_API.G_FALSE

737: FND_MSG_PUB.Count_And_Get
738: (
739: p_count => x_msg_count ,
740: p_data => x_msg_data ,
741: p_encoded => FND_API.G_FALSE
742: );
743: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
744: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
745: x_loading_status := 'UNEXPECTED_ERR';

Line 743: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

739: p_count => x_msg_count ,
740: p_data => x_msg_data ,
741: p_encoded => FND_API.G_FALSE
742: );
743: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
744: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
745: x_loading_status := 'UNEXPECTED_ERR';
746: FND_MSG_PUB.Count_And_Get
747: (

Line 744: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

740: p_data => x_msg_data ,
741: p_encoded => FND_API.G_FALSE
742: );
743: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
744: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
745: x_loading_status := 'UNEXPECTED_ERR';
746: FND_MSG_PUB.Count_And_Get
747: (
748: p_count => x_msg_count ,

Line 750: p_encoded => FND_API.G_FALSE

746: FND_MSG_PUB.Count_And_Get
747: (
748: p_count => x_msg_count ,
749: p_data => x_msg_data ,
750: p_encoded => FND_API.G_FALSE
751: );
752: WHEN OTHERS THEN
753: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
754: x_loading_status := 'UNEXPECTED_ERR';

Line 753: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

749: p_data => x_msg_data ,
750: p_encoded => FND_API.G_FALSE
751: );
752: WHEN OTHERS THEN
753: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
754: x_loading_status := 'UNEXPECTED_ERR';
755: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
756: THEN
757: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME ,l_api_name );

Line 763: p_encoded => FND_API.G_FALSE

759: FND_MSG_PUB.Count_And_Get
760: (
761: p_count => x_msg_count ,
762: p_data => x_msg_data ,
763: p_encoded => FND_API.G_FALSE
764: );
765:
766: if (FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
767: FND_LOG.STRING(FND_LOG.LEVEL_UNEXPECTED,

Line 800: x_return_status := FND_API.G_RET_STS_SUCCESS;

796: 'Beginning of validate_app_user_resp ...');
797: end if;
798:
799: -- Initialize API return status to success
800: x_return_status := FND_API.G_RET_STS_SUCCESS;
801: x_loading_status := p_loading_status;
802:
803: -- Start of API body
804:

Line 810: x_loading_status => x_loading_status)) = FND_API.G_TRUE ) THEN

806: IF ( (cn_api.chk_miss_null_char_para
807: (p_char_para => p_app_user_resp_rec.user_name,
808: p_obj_name => g_calc_sub_user_name,
809: p_loading_status => x_loading_status,
810: x_loading_status => x_loading_status)) = FND_API.G_TRUE ) THEN
811: RAISE FND_API.G_EXC_ERROR ;
812: END IF;
813:
814: BEGIN

Line 811: RAISE FND_API.G_EXC_ERROR ;

807: (p_char_para => p_app_user_resp_rec.user_name,
808: p_obj_name => g_calc_sub_user_name,
809: p_loading_status => x_loading_status,
810: x_loading_status => x_loading_status)) = FND_API.G_TRUE ) THEN
811: RAISE FND_API.G_EXC_ERROR ;
812: END IF;
813:
814: BEGIN
815: SELECT user_id INTO x_user_id

Line 835: RAISE FND_API.G_EXC_ERROR ;

831: fnd_message.set_token('USER_NAME', p_app_user_resp_rec.user_name );
832: FND_MSG_PUB.Add;
833: END IF;
834: x_loading_status := 'CN_CALC_USER_NOT_EXIST';
835: RAISE FND_API.G_EXC_ERROR ;
836: WHEN OTHERS THEN
837: if (FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
838: FND_LOG.STRING(FND_LOG.LEVEL_UNEXPECTED,
839: 'cn.plsql.cn_calc_submission_pub.validate_app_user_resp.exception',

Line 843: RAISE FND_API.G_EXC_ERROR ;

839: 'cn.plsql.cn_calc_submission_pub.validate_app_user_resp.exception',
840: sqlerrm);
841: end if;
842:
843: RAISE FND_API.G_EXC_ERROR ;
844: END;
845:
846: -- responsibility_name can not be missing/null
847: IF ( (cn_api.chk_miss_null_char_para

Line 851: x_loading_status => x_loading_status)) = FND_API.G_TRUE ) THEN

847: IF ( (cn_api.chk_miss_null_char_para
848: (p_char_para => p_app_user_resp_rec.responsibility_name,
849: p_obj_name => g_calc_sub_resp_name,
850: p_loading_status => x_loading_status,
851: x_loading_status => x_loading_status)) = FND_API.G_TRUE ) THEN
852: RAISE FND_API.G_EXC_ERROR ;
853: END IF;
854:
855: BEGIN

Line 852: RAISE FND_API.G_EXC_ERROR ;

848: (p_char_para => p_app_user_resp_rec.responsibility_name,
849: p_obj_name => g_calc_sub_resp_name,
850: p_loading_status => x_loading_status,
851: x_loading_status => x_loading_status)) = FND_API.G_TRUE ) THEN
852: RAISE FND_API.G_EXC_ERROR ;
853: END IF;
854:
855: BEGIN
856: -- clku, bug 3683443, added hints to do index skip scan

Line 878: RAISE FND_API.G_EXC_ERROR ;

874: fnd_message.set_token('RESP_NAME', p_app_user_resp_rec.responsibility_name );
875: FND_MSG_PUB.Add;
876: END IF;
877: x_loading_status := 'CN_CALC_RESP_NOT_EXIST';
878: RAISE FND_API.G_EXC_ERROR ;
879:
880: WHEN OTHERS THEN
881: if (FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
882: FND_LOG.STRING(FND_LOG.LEVEL_UNEXPECTED,

Line 887: RAISE FND_API.G_EXC_ERROR ;

883: 'cn.plsql.cn_calc_submission_pub.validate_app_user_resp.exception',
884: sqlerrm);
885: end if;
886:
887: RAISE FND_API.G_EXC_ERROR ;
888: END;
889:
890: -- End of API body.
891:

Line 896: p_encoded => FND_API.G_FALSE

892: -- Standard call to get message count and if count is 1, get message info.
893: FND_MSG_PUB.Count_And_Get
894: (p_count => x_msg_count ,
895: p_data => x_msg_data ,
896: p_encoded => FND_API.G_FALSE
897: );
898:
899: if (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
900: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE,

Line 906: WHEN FND_API.G_EXC_ERROR THEN

902: 'End of validate_app_user_resp.');
903: end if;
904:
905: EXCEPTION
906: WHEN FND_API.G_EXC_ERROR THEN
907: x_return_status := FND_API.G_RET_STS_ERROR ;
908: FND_MSG_PUB.Count_And_Get
909: (
910: p_count => x_msg_count ,

Line 907: x_return_status := FND_API.G_RET_STS_ERROR ;

903: end if;
904:
905: EXCEPTION
906: WHEN FND_API.G_EXC_ERROR THEN
907: x_return_status := FND_API.G_RET_STS_ERROR ;
908: FND_MSG_PUB.Count_And_Get
909: (
910: p_count => x_msg_count ,
911: p_data => x_msg_data ,

Line 912: p_encoded => FND_API.G_FALSE

908: FND_MSG_PUB.Count_And_Get
909: (
910: p_count => x_msg_count ,
911: p_data => x_msg_data ,
912: p_encoded => FND_API.G_FALSE
913: );
914: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
915: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
916: x_loading_status := 'UNEXPECTED_ERR';

Line 914: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

910: p_count => x_msg_count ,
911: p_data => x_msg_data ,
912: p_encoded => FND_API.G_FALSE
913: );
914: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
915: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
916: x_loading_status := 'UNEXPECTED_ERR';
917: FND_MSG_PUB.Count_And_Get
918: (

Line 915: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

911: p_data => x_msg_data ,
912: p_encoded => FND_API.G_FALSE
913: );
914: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
915: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
916: x_loading_status := 'UNEXPECTED_ERR';
917: FND_MSG_PUB.Count_And_Get
918: (
919: p_count => x_msg_count ,

Line 921: p_encoded => FND_API.G_FALSE

917: FND_MSG_PUB.Count_And_Get
918: (
919: p_count => x_msg_count ,
920: p_data => x_msg_data ,
921: p_encoded => FND_API.G_FALSE
922: );
923: WHEN OTHERS THEN
924: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
925: x_loading_status := 'UNEXPECTED_ERR';

Line 924: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

920: p_data => x_msg_data ,
921: p_encoded => FND_API.G_FALSE
922: );
923: WHEN OTHERS THEN
924: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
925: x_loading_status := 'UNEXPECTED_ERR';
926: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
927: THEN
928: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME ,l_api_name );

Line 934: p_encoded => FND_API.G_FALSE

930: FND_MSG_PUB.Count_And_Get
931: (
932: p_count => x_msg_count ,
933: p_data => x_msg_data ,
934: p_encoded => FND_API.G_FALSE
935: );
936:
937: if (FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
938: FND_LOG.STRING(FND_LOG.LEVEL_UNEXPECTED,

Line 973: -- Default = FND_API.G_FALSE

969: -- salesreps/ passed_in bonus plan elements
970: -- Parameters :
971: -- IN : p_api_version IN NUMBER Require
972: -- p_init_msg_list IN VARCHAR2 Optional
973: -- Default = FND_API.G_FALSE
974: -- p_commit IN VARCHAR2 Optional
975: -- Default = FND_API.G_FALSE
976: -- p_validation_level IN NUMBER Optional
977: -- Default = FND_API.G_VALID_LEVEL_FULL

Line 975: -- Default = FND_API.G_FALSE

971: -- IN : p_api_version IN NUMBER Require
972: -- p_init_msg_list IN VARCHAR2 Optional
973: -- Default = FND_API.G_FALSE
974: -- p_commit IN VARCHAR2 Optional
975: -- Default = FND_API.G_FALSE
976: -- p_validation_level IN NUMBER Optional
977: -- Default = FND_API.G_VALID_LEVEL_FULL
978: -- OUT : x_return_status OUT VARCHAR2(1)
979: -- x_msg_count OUT NUMBER

Line 977: -- Default = FND_API.G_VALID_LEVEL_FULL

973: -- Default = FND_API.G_FALSE
974: -- p_commit IN VARCHAR2 Optional
975: -- Default = FND_API.G_FALSE
976: -- p_validation_level IN NUMBER Optional
977: -- Default = FND_API.G_VALID_LEVEL_FULL
978: -- OUT : x_return_status OUT VARCHAR2(1)
979: -- x_msg_count OUT NUMBER
980: -- x_msg_data OUT VARCHAR2(2000)
981: -- IN : p_calc_submission_rec IN calc_submission_rec_type

Line 1032: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,

1028: -- End of comments
1029: PROCEDURE Create_Calc_Submission
1030: (
1031: p_api_version IN NUMBER,
1032: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
1033: p_commit IN VARCHAR2 := FND_API.G_FALSE,
1034: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
1035: x_return_status OUT NOCOPY VARCHAR2,
1036: x_msg_count OUT NOCOPY NUMBER,

Line 1033: p_commit IN VARCHAR2 := FND_API.G_FALSE,

1029: PROCEDURE Create_Calc_Submission
1030: (
1031: p_api_version IN NUMBER,
1032: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
1033: p_commit IN VARCHAR2 := FND_API.G_FALSE,
1034: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
1035: x_return_status OUT NOCOPY VARCHAR2,
1036: x_msg_count OUT NOCOPY NUMBER,
1037: x_msg_data OUT NOCOPY VARCHAR2,

Line 1034: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,

1030: (
1031: p_api_version IN NUMBER,
1032: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
1033: p_commit IN VARCHAR2 := FND_API.G_FALSE,
1034: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
1035: x_return_status OUT NOCOPY VARCHAR2,
1036: x_msg_count OUT NOCOPY NUMBER,
1037: x_msg_data OUT NOCOPY VARCHAR2,
1038: p_calc_submission_rec IN calc_submission_rec_type := g_miss_calc_submission_rec,

Line 1078: IF NOT FND_API.compatible_api_call

1074:
1075: -- Standard Start of API savepoint
1076: SAVEPOINT create_calc_submission;
1077: -- Standard call to check for call compatibility.
1078: IF NOT FND_API.compatible_api_call
1079: ( l_api_version ,p_api_version ,l_api_name ,G_PKG_NAME )
1080: THEN
1081: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1082: END IF;

Line 1081: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

1077: -- Standard call to check for call compatibility.
1078: IF NOT FND_API.compatible_api_call
1079: ( l_api_version ,p_api_version ,l_api_name ,G_PKG_NAME )
1080: THEN
1081: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1082: END IF;
1083: -- Initialize message list if p_init_msg_list is set to TRUE.
1084: IF FND_API.to_Boolean( p_init_msg_list ) THEN
1085: FND_MSG_PUB.initialize;

Line 1084: IF FND_API.to_Boolean( p_init_msg_list ) THEN

1080: THEN
1081: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1082: END IF;
1083: -- Initialize message list if p_init_msg_list is set to TRUE.
1084: IF FND_API.to_Boolean( p_init_msg_list ) THEN
1085: FND_MSG_PUB.initialize;
1086: END IF;
1087:
1088: -- Initialize API return status to success

Line 1089: x_return_status := FND_API.G_RET_STS_SUCCESS;

1085: FND_MSG_PUB.initialize;
1086: END IF;
1087:
1088: -- Initialize API return status to success
1089: x_return_status := FND_API.G_RET_STS_SUCCESS;
1090: x_loading_status := 'CN_INSERTED';
1091:
1092: -- API body starts here
1093: l_p_calc_submission_rec := p_calc_submission_rec;

Line 1098: if (p_calc_submission_rec.entire_hierarchy = fnd_api.g_miss_char) then

1094:
1095: -- Due to the change of moving this flag to the rep level, the caller can choose not to
1096: -- pass a value for entire_hierarchy when running calculation. However, for backward
1097: -- compatibility, we still recognize entire_hierarchy if it is specified as 'Y'
1098: if (p_calc_submission_rec.entire_hierarchy = fnd_api.g_miss_char) then
1099: l_p_calc_submission_rec.entire_hierarchy := 'N';
1100: end if;
1101:
1102: -- validate user_name/responsibility name

Line 1114: IF x_return_status <> FND_API.g_ret_sts_success THEN

1110: x_responsibility_id => l_responsibility_id,
1111: x_loading_status => x_loading_status
1112: );
1113:
1114: IF x_return_status <> FND_API.g_ret_sts_success THEN
1115: RAISE FND_API.G_EXC_ERROR ;
1116: END IF;
1117: END IF;
1118:

Line 1115: RAISE FND_API.G_EXC_ERROR ;

1111: x_loading_status => x_loading_status
1112: );
1113:
1114: IF x_return_status <> FND_API.g_ret_sts_success THEN
1115: RAISE FND_API.G_EXC_ERROR ;
1116: END IF;
1117: END IF;
1118:
1119: fnd_global.apps_initialize (user_id => l_user_id,

Line 1143: p_commit => FND_API.G_FALSE,

1139:
1140: CN_CALC_SUBMISSION_CUHK.create_calc_submission_pre
1141: ( p_api_version => p_api_version,
1142: p_init_msg_list => p_init_msg_list,
1143: p_commit => FND_API.G_FALSE,
1144: p_validation_level => p_validation_level,
1145: x_return_status => x_return_status,
1146: x_msg_count => x_msg_count,
1147: x_msg_data => x_msg_data,

Line 1151: if ( x_return_status = FND_API.G_RET_STS_ERROR ) then

1147: x_msg_data => x_msg_data,
1148: p_calc_submission_rec => l_p_calc_submission_rec,
1149: x_loading_status => x_loading_status
1150: );
1151: if ( x_return_status = FND_API.G_RET_STS_ERROR ) then
1152: RAISE FND_API.G_EXC_ERROR;
1153: elsif (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) then
1154: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1155: end if;

Line 1152: RAISE FND_API.G_EXC_ERROR;

1148: p_calc_submission_rec => l_p_calc_submission_rec,
1149: x_loading_status => x_loading_status
1150: );
1151: if ( x_return_status = FND_API.G_RET_STS_ERROR ) then
1152: RAISE FND_API.G_EXC_ERROR;
1153: elsif (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) then
1154: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1155: end if;
1156: end if;

Line 1153: elsif (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) then

1149: x_loading_status => x_loading_status
1150: );
1151: if ( x_return_status = FND_API.G_RET_STS_ERROR ) then
1152: RAISE FND_API.G_EXC_ERROR;
1153: elsif (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) then
1154: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1155: end if;
1156: end if;
1157:

Line 1154: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

1150: );
1151: if ( x_return_status = FND_API.G_RET_STS_ERROR ) then
1152: RAISE FND_API.G_EXC_ERROR;
1153: elsif (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) then
1154: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1155: end if;
1156: end if;
1157:
1158: if JTF_USR_HKS.Ok_to_Execute( 'CN_CALC_SUBMISSION_PUB',

Line 1163: p_commit => FND_API.G_FALSE,

1159: 'CREATE_CALC_SUBMISSION', 'B', 'V' ) then
1160: cn_calc_submission_VUHK.create_calc_submission_pre
1161: ( p_api_version => p_api_version,
1162: p_init_msg_list => p_init_msg_list,
1163: p_commit => FND_API.G_FALSE,
1164: p_validation_level => p_validation_level,
1165: x_return_status => x_return_status,
1166: x_msg_count => x_msg_count,
1167: x_msg_data => x_msg_data,

Line 1171: if ( x_return_status = FND_API.G_RET_STS_ERROR ) then

1167: x_msg_data => x_msg_data,
1168: p_calc_submission_rec => l_p_calc_submission_rec,
1169: x_loading_status => x_loading_status
1170: );
1171: if ( x_return_status = FND_API.G_RET_STS_ERROR ) then
1172: RAISE FND_API.G_EXC_ERROR;
1173: elsif (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) then
1174: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1175: end if;

Line 1172: RAISE FND_API.G_EXC_ERROR;

1168: p_calc_submission_rec => l_p_calc_submission_rec,
1169: x_loading_status => x_loading_status
1170: );
1171: if ( x_return_status = FND_API.G_RET_STS_ERROR ) then
1172: RAISE FND_API.G_EXC_ERROR;
1173: elsif (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) then
1174: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1175: end if;
1176: END IF;

Line 1173: elsif (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) then

1169: x_loading_status => x_loading_status
1170: );
1171: if ( x_return_status = FND_API.G_RET_STS_ERROR ) then
1172: RAISE FND_API.G_EXC_ERROR;
1173: elsif (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) then
1174: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1175: end if;
1176: END IF;
1177:

Line 1174: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

1170: );
1171: if ( x_return_status = FND_API.G_RET_STS_ERROR ) then
1172: RAISE FND_API.G_EXC_ERROR;
1173: elsif (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) then
1174: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1175: end if;
1176: END IF;
1177:
1178: --+

Line 1189: IF (x_return_status <> FND_API.g_ret_sts_success) THEN

1185: p_loading_status => x_loading_status,
1186: x_loading_status => x_loading_status
1187: );
1188:
1189: IF (x_return_status <> FND_API.g_ret_sts_success) THEN
1190: RAISE FND_API.G_EXC_ERROR ;
1191: END IF;
1192:
1193: -- continue to validate salesrep_entries

Line 1190: RAISE FND_API.G_EXC_ERROR ;

1186: x_loading_status => x_loading_status
1187: );
1188:
1189: IF (x_return_status <> FND_API.g_ret_sts_success) THEN
1190: RAISE FND_API.G_EXC_ERROR ;
1191: END IF;
1192:
1193: -- continue to validate salesrep_entries
1194: IF l_p_calc_submission_rec.salesrep_option = 'USER_SPECIFY' THEN

Line 1204: IF x_return_status <> FND_API.g_ret_sts_success THEN

1200: x_salesreps_id_tbl => l_salesreps_id_tbl,
1201: x_loading_status => x_loading_status
1202: );
1203:
1204: IF x_return_status <> FND_API.g_ret_sts_success THEN
1205: RAISE FND_API.G_EXC_ERROR ;
1206: END IF;
1207: END IF;
1208:

Line 1205: RAISE FND_API.G_EXC_ERROR ;

1201: x_loading_status => x_loading_status
1202: );
1203:
1204: IF x_return_status <> FND_API.g_ret_sts_success THEN
1205: RAISE FND_API.G_EXC_ERROR ;
1206: END IF;
1207: END IF;
1208:
1209: -- continue to validate bonus plan elements

Line 1221: IF x_return_status <> FND_API.g_ret_sts_success THEN

1217: x_bonus_pe_id_tbl => l_bonus_pe_id_tbl,
1218: x_loading_status => x_loading_status
1219: );
1220:
1221: IF x_return_status <> FND_API.g_ret_sts_success THEN
1222: RAISE FND_API.G_EXC_ERROR ;
1223: END IF;
1224: END IF;
1225:

Line 1222: RAISE FND_API.G_EXC_ERROR ;

1218: x_loading_status => x_loading_status
1219: );
1220:
1221: IF x_return_status <> FND_API.g_ret_sts_success THEN
1222: RAISE FND_API.G_EXC_ERROR ;
1223: END IF;
1224: END IF;
1225:
1226:

Line 1337: IF FND_API.To_Boolean( p_commit ) THEN

1333: END LOOP;
1334: END IF;
1335:
1336: -- only if p_commit is true then submit the calculation
1337: IF FND_API.To_Boolean( p_commit ) THEN
1338: -- initialize apps enviroment for concurrent submission
1339: IF l_p_calc_submission_rec.concurrent_calculation = 'Y' THEN
1340:
1341: -- we have to do commit first

Line 1391: x_return_status := FND_API.G_RET_STS_SUCCESS;

1387: END IF;
1388: END IF; -- p_commit;
1389:
1390: -- API return status to success
1391: x_return_status := FND_API.G_RET_STS_SUCCESS;
1392: x_loading_status := 'CN_INSERTED';
1393:
1394:
1395: -- End of API body.

Line 1404: p_commit => FND_API.G_FALSE,

1400: 'CREATE_CALC_SUBMISSION', 'A', 'V' ) then
1401: cn_calc_submission_VUHK.create_calc_submission_post
1402: ( p_api_version => p_api_version,
1403: p_init_msg_list => p_init_msg_list,
1404: p_commit => FND_API.G_FALSE,
1405: p_validation_level => p_validation_level,
1406: x_return_status => x_return_status,
1407: x_msg_count => x_msg_count,
1408: x_msg_data => x_msg_data,

Line 1412: if ( x_return_status = FND_API.G_RET_STS_ERROR ) then

1408: x_msg_data => x_msg_data,
1409: p_calc_submission_rec => l_p_calc_submission_rec,
1410: x_loading_status => x_loading_status
1411: );
1412: if ( x_return_status = FND_API.G_RET_STS_ERROR ) then
1413: RAISE FND_API.G_EXC_ERROR;
1414: elsif (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) then
1415: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1416: end if;

Line 1413: RAISE FND_API.G_EXC_ERROR;

1409: p_calc_submission_rec => l_p_calc_submission_rec,
1410: x_loading_status => x_loading_status
1411: );
1412: if ( x_return_status = FND_API.G_RET_STS_ERROR ) then
1413: RAISE FND_API.G_EXC_ERROR;
1414: elsif (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) then
1415: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1416: end if;
1417: end if;

Line 1414: elsif (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) then

1410: x_loading_status => x_loading_status
1411: );
1412: if ( x_return_status = FND_API.G_RET_STS_ERROR ) then
1413: RAISE FND_API.G_EXC_ERROR;
1414: elsif (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) then
1415: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1416: end if;
1417: end if;
1418:

Line 1415: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

1411: );
1412: if ( x_return_status = FND_API.G_RET_STS_ERROR ) then
1413: RAISE FND_API.G_EXC_ERROR;
1414: elsif (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) then
1415: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1416: end if;
1417: end if;
1418:
1419: if JTF_USR_HKS.Ok_to_Execute( 'CN_CALC_SUBMISSION_PUB',

Line 1425: p_commit => FND_API.G_FALSE,

1421:
1422: CN_CALC_SUBMISSION_CUHK.create_calc_submission_post
1423: ( p_api_version => p_api_version,
1424: p_init_msg_list => p_init_msg_list,
1425: p_commit => FND_API.G_FALSE,
1426: p_validation_level => p_validation_level,
1427: x_return_status => x_return_status,
1428: x_msg_count => x_msg_count,
1429: x_msg_data => x_msg_data,

Line 1433: if ( x_return_status = FND_API.G_RET_STS_ERROR ) then

1429: x_msg_data => x_msg_data,
1430: p_calc_submission_rec => l_p_calc_submission_rec,
1431: x_loading_status => x_loading_status
1432: );
1433: if ( x_return_status = FND_API.G_RET_STS_ERROR ) then
1434: RAISE FND_API.G_EXC_ERROR;
1435: elsif (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) then
1436: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1437: end if;

Line 1434: RAISE FND_API.G_EXC_ERROR;

1430: p_calc_submission_rec => l_p_calc_submission_rec,
1431: x_loading_status => x_loading_status
1432: );
1433: if ( x_return_status = FND_API.G_RET_STS_ERROR ) then
1434: RAISE FND_API.G_EXC_ERROR;
1435: elsif (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) then
1436: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1437: end if;
1438: end if;

Line 1435: elsif (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) then

1431: x_loading_status => x_loading_status
1432: );
1433: if ( x_return_status = FND_API.G_RET_STS_ERROR ) then
1434: RAISE FND_API.G_EXC_ERROR;
1435: elsif (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) then
1436: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1437: end if;
1438: end if;
1439:

Line 1436: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

1432: );
1433: if ( x_return_status = FND_API.G_RET_STS_ERROR ) then
1434: RAISE FND_API.G_EXC_ERROR;
1435: elsif (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) then
1436: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1437: end if;
1438: end if;
1439:
1440: -- Following code is for message generation

Line 1459: if ( x_return_status = FND_API.G_RET_STS_ERROR ) then

1455: p_action_code => 'I', -- Insert
1456: p_bind_data_id => l_bind_data_id,
1457: x_return_code => x_return_status
1458: );
1459: if ( x_return_status = FND_API.G_RET_STS_ERROR ) then
1460: RAISE FND_API.G_EXC_ERROR;
1461: elsif (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) then
1462: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1463: end if;

Line 1460: RAISE FND_API.G_EXC_ERROR;

1456: p_bind_data_id => l_bind_data_id,
1457: x_return_code => x_return_status
1458: );
1459: if ( x_return_status = FND_API.G_RET_STS_ERROR ) then
1460: RAISE FND_API.G_EXC_ERROR;
1461: elsif (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) then
1462: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1463: end if;
1464: END IF;

Line 1461: elsif (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) then

1457: x_return_code => x_return_status
1458: );
1459: if ( x_return_status = FND_API.G_RET_STS_ERROR ) then
1460: RAISE FND_API.G_EXC_ERROR;
1461: elsif (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) then
1462: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1463: end if;
1464: END IF;
1465: end if;

Line 1462: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

1458: );
1459: if ( x_return_status = FND_API.G_RET_STS_ERROR ) then
1460: RAISE FND_API.G_EXC_ERROR;
1461: elsif (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) then
1462: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1463: end if;
1464: END IF;
1465: end if;
1466:

Line 1467: x_return_status := FND_API.G_RET_STS_SUCCESS;

1463: end if;
1464: END IF;
1465: end if;
1466:
1467: x_return_status := FND_API.G_RET_STS_SUCCESS;
1468:
1469: -- Standard check of p_commit.
1470: IF FND_API.To_Boolean( p_commit ) THEN
1471: COMMIT WORK;

Line 1470: IF FND_API.To_Boolean( p_commit ) THEN

1466:
1467: x_return_status := FND_API.G_RET_STS_SUCCESS;
1468:
1469: -- Standard check of p_commit.
1470: IF FND_API.To_Boolean( p_commit ) THEN
1471: COMMIT WORK;
1472: END IF;
1473: -- Standard call to get message count and if count is 1, get message info.
1474: FND_MSG_PUB.Count_And_Get

Line 1478: p_encoded => FND_API.G_FALSE

1474: FND_MSG_PUB.Count_And_Get
1475: (
1476: p_count => x_msg_count ,
1477: p_data => x_msg_data ,
1478: p_encoded => FND_API.G_FALSE
1479: );
1480:
1481: if (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
1482: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE,

Line 1488: WHEN FND_API.G_EXC_ERROR THEN

1484: 'End of create_calc_submission.');
1485: end if;
1486:
1487: EXCEPTION
1488: WHEN FND_API.G_EXC_ERROR THEN
1489: ROLLBACK TO create_calc_submission;
1490: x_return_status := FND_API.G_RET_STS_ERROR ;
1491: FND_MSG_PUB.Count_And_Get
1492: (

Line 1490: x_return_status := FND_API.G_RET_STS_ERROR ;

1486:
1487: EXCEPTION
1488: WHEN FND_API.G_EXC_ERROR THEN
1489: ROLLBACK TO create_calc_submission;
1490: x_return_status := FND_API.G_RET_STS_ERROR ;
1491: FND_MSG_PUB.Count_And_Get
1492: (
1493: p_count => x_msg_count ,
1494: p_data => x_msg_data ,

Line 1495: p_encoded => FND_API.G_FALSE

1491: FND_MSG_PUB.Count_And_Get
1492: (
1493: p_count => x_msg_count ,
1494: p_data => x_msg_data ,
1495: p_encoded => FND_API.G_FALSE
1496: );
1497: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1498: ROLLBACK TO create_calc_submission;
1499: x_loading_status := 'UNEXPECTED_ERR';

Line 1497: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

1493: p_count => x_msg_count ,
1494: p_data => x_msg_data ,
1495: p_encoded => FND_API.G_FALSE
1496: );
1497: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1498: ROLLBACK TO create_calc_submission;
1499: x_loading_status := 'UNEXPECTED_ERR';
1500: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1501: FND_MSG_PUB.Count_And_Get

Line 1500: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

1496: );
1497: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1498: ROLLBACK TO create_calc_submission;
1499: x_loading_status := 'UNEXPECTED_ERR';
1500: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1501: FND_MSG_PUB.Count_And_Get
1502: (
1503: p_count => x_msg_count ,
1504: p_data => x_msg_data ,

Line 1505: p_encoded => FND_API.G_FALSE

1501: FND_MSG_PUB.Count_And_Get
1502: (
1503: p_count => x_msg_count ,
1504: p_data => x_msg_data ,
1505: p_encoded => FND_API.G_FALSE
1506: );
1507: WHEN OTHERS THEN
1508: ROLLBACK TO create_calc_submission;
1509: x_loading_status := 'UNEXPECTED_ERR';

Line 1510: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

1506: );
1507: WHEN OTHERS THEN
1508: ROLLBACK TO create_calc_submission;
1509: x_loading_status := 'UNEXPECTED_ERR';
1510: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1511: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1512: THEN
1513: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME ,l_api_name );
1514: END IF;

Line 1519: p_encoded => FND_API.G_FALSE

1515: FND_MSG_PUB.Count_And_Get
1516: (
1517: p_count => x_msg_count ,
1518: p_data => x_msg_data ,
1519: p_encoded => FND_API.G_FALSE
1520: );
1521:
1522: if (FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
1523: FND_LOG.STRING(FND_LOG.LEVEL_UNEXPECTED,

Line 1542: -- Default = FND_API.G_FALSE

1538: -- salesreps/ passed_in bonus plan elements
1539: -- Parameters :
1540: -- IN : p_api_version IN NUMBER Require
1541: -- p_init_msg_list IN VARCHAR2 Optional
1542: -- Default = FND_API.G_FALSE
1543: -- p_commit IN VARCHAR2 Optional
1544: -- Default = FND_API.G_FALSE
1545: -- p_validation_level IN NUMBER Optional
1546: -- Default = FND_API.G_VALID_LEVEL_FULL

Line 1544: -- Default = FND_API.G_FALSE

1540: -- IN : p_api_version IN NUMBER Require
1541: -- p_init_msg_list IN VARCHAR2 Optional
1542: -- Default = FND_API.G_FALSE
1543: -- p_commit IN VARCHAR2 Optional
1544: -- Default = FND_API.G_FALSE
1545: -- p_validation_level IN NUMBER Optional
1546: -- Default = FND_API.G_VALID_LEVEL_FULL
1547: -- OUT : x_return_status OUT VARCHAR2(1)
1548: -- x_msg_count OUT NUMBER

Line 1546: -- Default = FND_API.G_VALID_LEVEL_FULL

1542: -- Default = FND_API.G_FALSE
1543: -- p_commit IN VARCHAR2 Optional
1544: -- Default = FND_API.G_FALSE
1545: -- p_validation_level IN NUMBER Optional
1546: -- Default = FND_API.G_VALID_LEVEL_FULL
1547: -- OUT : x_return_status OUT VARCHAR2(1)
1548: -- x_msg_count OUT NUMBER
1549: -- x_msg_data OUT VARCHAR2(2000)
1550: -- IN : p_calc_submission_rec IN calc_submission_rec_type

Line 1598: -- IF p_commit is not fnd_api.g_true, then the calculation will not be submitted even if all

1594: -- if the plan element already exists or there are duplicates in p_bonus_pe_tbl,
1595: -- give out a message without failing the call
1596: --
1597: -- Special Notes:
1598: -- IF p_commit is not fnd_api.g_true, then the calculation will not be submitted even if all
1599: -- the validations are successful.
1600: --
1601: --
1602: -- End of comments

Line 1609: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,

1605:
1606: PROCEDURE Update_Calc_Submission
1607: (
1608: p_api_version IN NUMBER,
1609: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
1610: p_commit IN VARCHAR2 := FND_API.G_FALSE,
1611: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
1612: x_return_status OUT NOCOPY VARCHAR2,
1613: x_msg_count OUT NOCOPY NUMBER,

Line 1610: p_commit IN VARCHAR2 := FND_API.G_FALSE,

1606: PROCEDURE Update_Calc_Submission
1607: (
1608: p_api_version IN NUMBER,
1609: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
1610: p_commit IN VARCHAR2 := FND_API.G_FALSE,
1611: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
1612: x_return_status OUT NOCOPY VARCHAR2,
1613: x_msg_count OUT NOCOPY NUMBER,
1614: x_msg_data OUT NOCOPY VARCHAR2,

Line 1611: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,

1607: (
1608: p_api_version IN NUMBER,
1609: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
1610: p_commit IN VARCHAR2 := FND_API.G_FALSE,
1611: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
1612: x_return_status OUT NOCOPY VARCHAR2,
1613: x_msg_count OUT NOCOPY NUMBER,
1614: x_msg_data OUT NOCOPY VARCHAR2,
1615: p_calc_submission_rec_old IN calc_submission_rec_type := g_miss_calc_submission_rec,

Line 1689: IF NOT FND_API.Compatible_API_Call ( l_api_version ,

1685: SAVEPOINT update_calc_submission;
1686:
1687: -- Standard call to check for call compatibility.
1688:
1689: IF NOT FND_API.Compatible_API_Call ( l_api_version ,
1690: p_api_version ,
1691: l_api_name ,
1692: G_PKG_NAME )
1693: THEN

Line 1694: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

1690: p_api_version ,
1691: l_api_name ,
1692: G_PKG_NAME )
1693: THEN
1694: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1695: END IF;
1696:
1697: -- Initialize message list if p_init_msg_list is set to TRUE.
1698: IF FND_API.to_Boolean( p_init_msg_list ) THEN

Line 1698: IF FND_API.to_Boolean( p_init_msg_list ) THEN

1694: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1695: END IF;
1696:
1697: -- Initialize message list if p_init_msg_list is set to TRUE.
1698: IF FND_API.to_Boolean( p_init_msg_list ) THEN
1699: FND_MSG_PUB.initialize;
1700: END IF;
1701:
1702: -- Initialize API return status to success

Line 1703: x_return_status := FND_API.G_RET_STS_SUCCESS;

1699: FND_MSG_PUB.initialize;
1700: END IF;
1701:
1702: -- Initialize API return status to success
1703: x_return_status := FND_API.G_RET_STS_SUCCESS;
1704: x_loading_status := 'CN_UPDATED';
1705:
1706: -- continue to validate user_name/responsibility name
1707: IF l_p_calc_submission_rec.concurrent_calculation = 'Y' THEN

Line 1718: IF x_return_status <> FND_API.g_ret_sts_success THEN

1714: x_responsibility_id => l_responsibility_id,
1715: x_loading_status => x_loading_status
1716: );
1717:
1718: IF x_return_status <> FND_API.g_ret_sts_success THEN
1719: RAISE FND_API.G_EXC_ERROR ;
1720: END IF;
1721: END IF;
1722:

Line 1719: RAISE FND_API.G_EXC_ERROR ;

1715: x_loading_status => x_loading_status
1716: );
1717:
1718: IF x_return_status <> FND_API.g_ret_sts_success THEN
1719: RAISE FND_API.G_EXC_ERROR ;
1720: END IF;
1721: END IF;
1722:
1723: fnd_global.apps_initialize ( user_id => l_user_id,

Line 1751: RAISE FND_API.G_EXC_ERROR ;

1747: FND_MESSAGE.SET_NAME ('FND' , 'FND_MO_OU_CANNOT_UPDATE');
1748: FND_MSG_PUB.Add;
1749: END IF;
1750:
1751: RAISE FND_API.G_EXC_ERROR ;
1752: end if;
1753:
1754: --+
1755: -- Start of API body

Line 1767: p_commit => FND_API.G_FALSE,

1763:
1764: CN_CALC_SUBMISSION_CUHK.create_calc_submission_pre
1765: ( p_api_version => p_api_version,
1766: p_init_msg_list => p_init_msg_list,
1767: p_commit => FND_API.G_FALSE,
1768: p_validation_level => p_validation_level,
1769: x_return_status => x_return_status,
1770: x_msg_count => x_msg_count,
1771: x_msg_data => x_msg_data,

Line 1775: if ( x_return_status = FND_API.G_RET_STS_ERROR ) then

1771: x_msg_data => x_msg_data,
1772: p_calc_submission_rec => l_p_calc_submission_rec,
1773: x_loading_status => x_loading_status
1774: );
1775: if ( x_return_status = FND_API.G_RET_STS_ERROR ) then
1776: RAISE FND_API.G_EXC_ERROR;
1777: elsif (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) then
1778: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1779: end if;

Line 1776: RAISE FND_API.G_EXC_ERROR;

1772: p_calc_submission_rec => l_p_calc_submission_rec,
1773: x_loading_status => x_loading_status
1774: );
1775: if ( x_return_status = FND_API.G_RET_STS_ERROR ) then
1776: RAISE FND_API.G_EXC_ERROR;
1777: elsif (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) then
1778: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1779: end if;
1780: end if;

Line 1777: elsif (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) then

1773: x_loading_status => x_loading_status
1774: );
1775: if ( x_return_status = FND_API.G_RET_STS_ERROR ) then
1776: RAISE FND_API.G_EXC_ERROR;
1777: elsif (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) then
1778: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1779: end if;
1780: end if;
1781:

Line 1778: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

1774: );
1775: if ( x_return_status = FND_API.G_RET_STS_ERROR ) then
1776: RAISE FND_API.G_EXC_ERROR;
1777: elsif (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) then
1778: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1779: end if;
1780: end if;
1781:
1782: if JTF_USR_HKS.Ok_to_Execute( 'CN_CALC_SUBMISSION_PUB',

Line 1787: p_commit => FND_API.G_FALSE,

1783: 'CREATE_CALC_SUBMISSION', 'B', 'V' ) then
1784: cn_calc_submission_VUHK.create_calc_submission_pre
1785: ( p_api_version => p_api_version,
1786: p_init_msg_list => p_init_msg_list,
1787: p_commit => FND_API.G_FALSE,
1788: p_validation_level => p_validation_level,
1789: x_return_status => x_return_status,
1790: x_msg_count => x_msg_count,
1791: x_msg_data => x_msg_data,

Line 1795: if ( x_return_status = FND_API.G_RET_STS_ERROR ) then

1791: x_msg_data => x_msg_data,
1792: p_calc_submission_rec => l_p_calc_submission_rec,
1793: x_loading_status => x_loading_status
1794: );
1795: if ( x_return_status = FND_API.G_RET_STS_ERROR ) then
1796: RAISE FND_API.G_EXC_ERROR;
1797: elsif (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) then
1798: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1799: end if;

Line 1796: RAISE FND_API.G_EXC_ERROR;

1792: p_calc_submission_rec => l_p_calc_submission_rec,
1793: x_loading_status => x_loading_status
1794: );
1795: if ( x_return_status = FND_API.G_RET_STS_ERROR ) then
1796: RAISE FND_API.G_EXC_ERROR;
1797: elsif (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) then
1798: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1799: end if;
1800: END IF;

Line 1797: elsif (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) then

1793: x_loading_status => x_loading_status
1794: );
1795: if ( x_return_status = FND_API.G_RET_STS_ERROR ) then
1796: RAISE FND_API.G_EXC_ERROR;
1797: elsif (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) then
1798: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1799: end if;
1800: END IF;
1801:

Line 1798: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

1794: );
1795: if ( x_return_status = FND_API.G_RET_STS_ERROR ) then
1796: RAISE FND_API.G_EXC_ERROR;
1797: elsif (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) then
1798: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1799: end if;
1800: END IF;
1801:
1802:

Line 1810: x_loading_status => x_loading_status) = FND_API.G_TRUE) THEN

1806: IF (cn_api.chk_miss_null_char_para
1807: (p_char_para => p_calc_submission_rec_old.batch_name,
1808: p_obj_name => g_calc_sub_name,
1809: p_loading_status => x_loading_status,
1810: x_loading_status => x_loading_status) = FND_API.G_TRUE) THEN
1811: RAISE FND_API.G_EXC_ERROR ;
1812: END IF;
1813:
1814: OPEN l_calc_sub_batch_csr( p_calc_submission_rec_old.batch_name);

Line 1811: RAISE FND_API.G_EXC_ERROR ;

1807: (p_char_para => p_calc_submission_rec_old.batch_name,
1808: p_obj_name => g_calc_sub_name,
1809: p_loading_status => x_loading_status,
1810: x_loading_status => x_loading_status) = FND_API.G_TRUE) THEN
1811: RAISE FND_API.G_EXC_ERROR ;
1812: END IF;
1813:
1814: OPEN l_calc_sub_batch_csr( p_calc_submission_rec_old.batch_name);
1815: FETCH l_calc_sub_batch_csr INTO l_calc_sub_batch_rec;

Line 1835: RAISE FND_API.G_EXC_ERROR ;

1831: FND_MSG_PUB.Add;
1832: END IF;
1833:
1834: x_loading_status := 'CN_CALC_SUB_NOT_EXIST';
1835: RAISE FND_API.G_EXC_ERROR ;
1836: END IF;
1837:
1838: CLOSE l_calc_sub_batch_csr;
1839:

Line 1857: RAISE FND_API.G_EXC_ERROR ;

1853: FND_MSG_PUB.Add;
1854: END IF;
1855:
1856: x_loading_status := 'CN_CALC_SUB_NOT_UPDATEABLE';
1857: RAISE FND_API.G_EXC_ERROR ;
1858: END IF;
1859:
1860: -- handling g_miss_* in l_p_calc_submission_rec_new
1861: SELECT Decode( l_p_calc_submission_rec.batch_name, fnd_api.g_miss_char,

Line 1861: SELECT Decode( l_p_calc_submission_rec.batch_name, fnd_api.g_miss_char,

1857: RAISE FND_API.G_EXC_ERROR ;
1858: END IF;
1859:
1860: -- handling g_miss_* in l_p_calc_submission_rec_new
1861: SELECT Decode( l_p_calc_submission_rec.batch_name, fnd_api.g_miss_char,
1862: l_calc_sub_batch_rec.name, l_p_calc_submission_rec.batch_name )
1863: INTO l_p_calc_submission_rec.batch_name
1864: FROM dual;
1865:

Line 1872: SELECT Decode( l_p_calc_submission_rec.start_date, fnd_api.g_miss_date,

1868: ELSE
1869: l_name_validate_flag := 'Y';
1870: END IF;
1871:
1872: SELECT Decode( l_p_calc_submission_rec.start_date, fnd_api.g_miss_date,
1873: l_calc_sub_batch_rec.start_date, l_p_calc_submission_rec.start_date )
1874: INTO l_p_calc_submission_rec.start_date
1875: FROM dual;
1876:

Line 1877: SELECT Decode( l_p_calc_submission_rec.end_date, fnd_api.g_miss_date,

1873: l_calc_sub_batch_rec.start_date, l_p_calc_submission_rec.start_date )
1874: INTO l_p_calc_submission_rec.start_date
1875: FROM dual;
1876:
1877: SELECT Decode( l_p_calc_submission_rec.end_date, fnd_api.g_miss_date,
1878: l_calc_sub_batch_rec.end_date, l_p_calc_submission_rec.end_date )
1879: INTO l_p_calc_submission_rec.end_date
1880: FROM dual;
1881:

Line 1882: SELECT Decode( l_p_calc_submission_rec.calculation_type, fnd_api.g_miss_char,

1878: l_calc_sub_batch_rec.end_date, l_p_calc_submission_rec.end_date )
1879: INTO l_p_calc_submission_rec.end_date
1880: FROM dual;
1881:
1882: SELECT Decode( l_p_calc_submission_rec.calculation_type, fnd_api.g_miss_char,
1883: l_calc_sub_batch_rec.calc_type, l_p_calc_submission_rec.calculation_type )
1884: INTO l_p_calc_submission_rec.calculation_type
1885: FROM dual;
1886:

Line 1887: SELECT Decode( l_p_calc_submission_rec.salesrep_option, fnd_api.g_miss_char,

1883: l_calc_sub_batch_rec.calc_type, l_p_calc_submission_rec.calculation_type )
1884: INTO l_p_calc_submission_rec.calculation_type
1885: FROM dual;
1886:
1887: SELECT Decode( l_p_calc_submission_rec.salesrep_option, fnd_api.g_miss_char,
1888: l_calc_sub_batch_rec.salesrep_option, l_p_calc_submission_rec.salesrep_option )
1889: INTO l_p_calc_submission_rec.salesrep_option
1890: FROM dual;
1891:

Line 1892: SELECT Decode( l_p_calc_submission_rec.entire_hierarchy, fnd_api.g_miss_char,

1888: l_calc_sub_batch_rec.salesrep_option, l_p_calc_submission_rec.salesrep_option )
1889: INTO l_p_calc_submission_rec.salesrep_option
1890: FROM dual;
1891:
1892: SELECT Decode( l_p_calc_submission_rec.entire_hierarchy, fnd_api.g_miss_char,
1893: l_calc_sub_batch_rec.hierarchy_flag, l_p_calc_submission_rec.entire_hierarchy )
1894: INTO l_p_calc_submission_rec.entire_hierarchy
1895: FROM dual;
1896:

Line 1897: SELECT Decode( l_p_calc_submission_rec.concurrent_calculation, fnd_api.g_miss_char,

1893: l_calc_sub_batch_rec.hierarchy_flag, l_p_calc_submission_rec.entire_hierarchy )
1894: INTO l_p_calc_submission_rec.entire_hierarchy
1895: FROM dual;
1896:
1897: SELECT Decode( l_p_calc_submission_rec.concurrent_calculation, fnd_api.g_miss_char,
1898: l_calc_sub_batch_rec.concurrent_flag, l_p_calc_submission_rec.concurrent_calculation )
1899: INTO l_p_calc_submission_rec.concurrent_calculation
1900: FROM dual;
1901:

Line 1902: SELECT Decode( l_p_calc_submission_rec.incremental_calculation, fnd_api.g_miss_char,

1898: l_calc_sub_batch_rec.concurrent_flag, l_p_calc_submission_rec.concurrent_calculation )
1899: INTO l_p_calc_submission_rec.concurrent_calculation
1900: FROM dual;
1901:
1902: SELECT Decode( l_p_calc_submission_rec.incremental_calculation, fnd_api.g_miss_char,
1903: l_calc_sub_batch_rec.intelligent_flag, l_p_calc_submission_rec.incremental_calculation )
1904: INTO l_p_calc_submission_rec.incremental_calculation
1905: FROM dual;
1906:

Line 1907: SELECT Decode( l_p_calc_submission_rec.interval_type, fnd_api.g_miss_char,

1903: l_calc_sub_batch_rec.intelligent_flag, l_p_calc_submission_rec.incremental_calculation )
1904: INTO l_p_calc_submission_rec.incremental_calculation
1905: FROM dual;
1906:
1907: SELECT Decode( l_p_calc_submission_rec.interval_type, fnd_api.g_miss_char,
1908: Decode( l_calc_sub_batch_rec.interval_type_id, NULL, NULL, -1000, 'PERIOD',
1909: -1001, 'QUARTER', -1002, 'YEAR', -1003 , 'ALL' ),
1910: l_p_calc_submission_rec.interval_type )
1911: INTO l_p_calc_submission_rec.interval_type

Line 1914: SELECT Decode( l_p_calc_submission_rec.attribute_category, fnd_api.g_miss_char,

1910: l_p_calc_submission_rec.interval_type )
1911: INTO l_p_calc_submission_rec.interval_type
1912: FROM dual;
1913:
1914: SELECT Decode( l_p_calc_submission_rec.attribute_category, fnd_api.g_miss_char,
1915: l_calc_sub_batch_rec.attribute_category, l_p_calc_submission_rec.attribute_category )
1916: INTO l_p_calc_submission_rec.attribute_category
1917: FROM dual;
1918:

Line 1919: SELECT Decode( l_p_calc_submission_rec.attribute1, fnd_api.g_miss_char,

1915: l_calc_sub_batch_rec.attribute_category, l_p_calc_submission_rec.attribute_category )
1916: INTO l_p_calc_submission_rec.attribute_category
1917: FROM dual;
1918:
1919: SELECT Decode( l_p_calc_submission_rec.attribute1, fnd_api.g_miss_char,
1920: l_calc_sub_batch_rec.attribute1, l_p_calc_submission_rec.attribute1 )
1921: INTO l_p_calc_submission_rec.attribute1
1922: FROM dual;
1923:

Line 1924: SELECT Decode( l_p_calc_submission_rec.attribute2, fnd_api.g_miss_char,

1920: l_calc_sub_batch_rec.attribute1, l_p_calc_submission_rec.attribute1 )
1921: INTO l_p_calc_submission_rec.attribute1
1922: FROM dual;
1923:
1924: SELECT Decode( l_p_calc_submission_rec.attribute2, fnd_api.g_miss_char,
1925: l_calc_sub_batch_rec.attribute2, l_p_calc_submission_rec.attribute2 )
1926: INTO l_p_calc_submission_rec.attribute2
1927: FROM dual;
1928:

Line 1929: SELECT Decode( l_p_calc_submission_rec.attribute3, fnd_api.g_miss_char,

1925: l_calc_sub_batch_rec.attribute2, l_p_calc_submission_rec.attribute2 )
1926: INTO l_p_calc_submission_rec.attribute2
1927: FROM dual;
1928:
1929: SELECT Decode( l_p_calc_submission_rec.attribute3, fnd_api.g_miss_char,
1930: l_calc_sub_batch_rec.attribute3, l_p_calc_submission_rec.attribute3 )
1931: INTO l_p_calc_submission_rec.attribute3
1932: FROM dual;
1933:

Line 1934: SELECT Decode( l_p_calc_submission_rec.attribute4, fnd_api.g_miss_char,

1930: l_calc_sub_batch_rec.attribute3, l_p_calc_submission_rec.attribute3 )
1931: INTO l_p_calc_submission_rec.attribute3
1932: FROM dual;
1933:
1934: SELECT Decode( l_p_calc_submission_rec.attribute4, fnd_api.g_miss_char,
1935: l_calc_sub_batch_rec.attribute4, l_p_calc_submission_rec.attribute4 )
1936: INTO l_p_calc_submission_rec.attribute4
1937: FROM dual;
1938:

Line 1939: SELECT Decode( l_p_calc_submission_rec.attribute5, fnd_api.g_miss_char,

1935: l_calc_sub_batch_rec.attribute4, l_p_calc_submission_rec.attribute4 )
1936: INTO l_p_calc_submission_rec.attribute4
1937: FROM dual;
1938:
1939: SELECT Decode( l_p_calc_submission_rec.attribute5, fnd_api.g_miss_char,
1940: l_calc_sub_batch_rec.attribute5, l_p_calc_submission_rec.attribute5 )
1941: INTO l_p_calc_submission_rec.attribute5
1942: FROM dual;
1943:

Line 1944: SELECT Decode( l_p_calc_submission_rec.attribute6, fnd_api.g_miss_char,

1940: l_calc_sub_batch_rec.attribute5, l_p_calc_submission_rec.attribute5 )
1941: INTO l_p_calc_submission_rec.attribute5
1942: FROM dual;
1943:
1944: SELECT Decode( l_p_calc_submission_rec.attribute6, fnd_api.g_miss_char,
1945: l_calc_sub_batch_rec.attribute6, l_p_calc_submission_rec.attribute6 )
1946: INTO l_p_calc_submission_rec.attribute6
1947: FROM dual;
1948:

Line 1949: SELECT Decode( l_p_calc_submission_rec.attribute7, fnd_api.g_miss_char,

1945: l_calc_sub_batch_rec.attribute6, l_p_calc_submission_rec.attribute6 )
1946: INTO l_p_calc_submission_rec.attribute6
1947: FROM dual;
1948:
1949: SELECT Decode( l_p_calc_submission_rec.attribute7, fnd_api.g_miss_char,
1950: l_calc_sub_batch_rec.attribute7, l_p_calc_submission_rec.attribute7 )
1951: INTO l_p_calc_submission_rec.attribute7
1952: FROM dual;
1953:

Line 1954: SELECT Decode( l_p_calc_submission_rec.attribute8, fnd_api.g_miss_char,

1950: l_calc_sub_batch_rec.attribute7, l_p_calc_submission_rec.attribute7 )
1951: INTO l_p_calc_submission_rec.attribute7
1952: FROM dual;
1953:
1954: SELECT Decode( l_p_calc_submission_rec.attribute8, fnd_api.g_miss_char,
1955: l_calc_sub_batch_rec.attribute8, l_p_calc_submission_rec.attribute8 )
1956: INTO l_p_calc_submission_rec.attribute8
1957: FROM dual;
1958:

Line 1959: SELECT Decode( l_p_calc_submission_rec.attribute9, fnd_api.g_miss_char,

1955: l_calc_sub_batch_rec.attribute8, l_p_calc_submission_rec.attribute8 )
1956: INTO l_p_calc_submission_rec.attribute8
1957: FROM dual;
1958:
1959: SELECT Decode( l_p_calc_submission_rec.attribute9, fnd_api.g_miss_char,
1960: l_calc_sub_batch_rec.attribute9, l_p_calc_submission_rec.attribute9 )
1961: INTO l_p_calc_submission_rec.attribute9
1962: FROM dual;
1963:

Line 1964: SELECT Decode( l_p_calc_submission_rec.attribute10, fnd_api.g_miss_char,

1960: l_calc_sub_batch_rec.attribute9, l_p_calc_submission_rec.attribute9 )
1961: INTO l_p_calc_submission_rec.attribute9
1962: FROM dual;
1963:
1964: SELECT Decode( l_p_calc_submission_rec.attribute10, fnd_api.g_miss_char,
1965: l_calc_sub_batch_rec.attribute10, l_p_calc_submission_rec.attribute10 )
1966: INTO l_p_calc_submission_rec.attribute10
1967: FROM dual;
1968:

Line 1969: SELECT Decode( l_p_calc_submission_rec.attribute11, fnd_api.g_miss_char,

1965: l_calc_sub_batch_rec.attribute10, l_p_calc_submission_rec.attribute10 )
1966: INTO l_p_calc_submission_rec.attribute10
1967: FROM dual;
1968:
1969: SELECT Decode( l_p_calc_submission_rec.attribute11, fnd_api.g_miss_char,
1970: l_calc_sub_batch_rec.attribute11, l_p_calc_submission_rec.attribute11 )
1971: INTO l_p_calc_submission_rec.attribute11
1972: FROM dual;
1973:

Line 1974: SELECT Decode( l_p_calc_submission_rec.attribute12, fnd_api.g_miss_char,

1970: l_calc_sub_batch_rec.attribute11, l_p_calc_submission_rec.attribute11 )
1971: INTO l_p_calc_submission_rec.attribute11
1972: FROM dual;
1973:
1974: SELECT Decode( l_p_calc_submission_rec.attribute12, fnd_api.g_miss_char,
1975: l_calc_sub_batch_rec.attribute12, l_p_calc_submission_rec.attribute12 )
1976: INTO l_p_calc_submission_rec.attribute12
1977: FROM dual;
1978:

Line 1979: SELECT Decode( l_p_calc_submission_rec.attribute13, fnd_api.g_miss_char,

1975: l_calc_sub_batch_rec.attribute12, l_p_calc_submission_rec.attribute12 )
1976: INTO l_p_calc_submission_rec.attribute12
1977: FROM dual;
1978:
1979: SELECT Decode( l_p_calc_submission_rec.attribute13, fnd_api.g_miss_char,
1980: l_calc_sub_batch_rec.attribute13, l_p_calc_submission_rec.attribute13 )
1981: INTO l_p_calc_submission_rec.attribute13
1982: FROM dual;
1983:

Line 1984: SELECT Decode( l_p_calc_submission_rec.attribute14, fnd_api.g_miss_char,

1980: l_calc_sub_batch_rec.attribute13, l_p_calc_submission_rec.attribute13 )
1981: INTO l_p_calc_submission_rec.attribute13
1982: FROM dual;
1983:
1984: SELECT Decode( l_p_calc_submission_rec.attribute14, fnd_api.g_miss_char,
1985: l_calc_sub_batch_rec.attribute14, l_p_calc_submission_rec.attribute14 )
1986: INTO l_p_calc_submission_rec.attribute14
1987: FROM dual;
1988:

Line 1989: SELECT Decode( l_p_calc_submission_rec.attribute15, fnd_api.g_miss_char,

1985: l_calc_sub_batch_rec.attribute14, l_p_calc_submission_rec.attribute14 )
1986: INTO l_p_calc_submission_rec.attribute14
1987: FROM dual;
1988:
1989: SELECT Decode( l_p_calc_submission_rec.attribute15, fnd_api.g_miss_char,
1990: l_calc_sub_batch_rec.attribute15, l_p_calc_submission_rec.attribute1 )
1991: INTO l_p_calc_submission_rec.attribute15
1992: FROM dual;
1993:

Line 2006: IF (x_return_status <> FND_API.g_ret_sts_success) THEN

2002: p_name_validate_flag => l_name_validate_flag,
2003: x_loading_status => x_loading_status
2004: );
2005:
2006: IF (x_return_status <> FND_API.g_ret_sts_success) THEN
2007: RAISE FND_API.G_EXC_ERROR ;
2008: END IF;
2009:
2010: -- continue to validate salesrep_entries

Line 2007: RAISE FND_API.G_EXC_ERROR ;

2003: x_loading_status => x_loading_status
2004: );
2005:
2006: IF (x_return_status <> FND_API.g_ret_sts_success) THEN
2007: RAISE FND_API.G_EXC_ERROR ;
2008: END IF;
2009:
2010: -- continue to validate salesrep_entries
2011: IF l_p_calc_submission_rec.salesrep_option = 'USER_SPECIFY' THEN

Line 2023: IF x_return_status <> FND_API.g_ret_sts_success THEN

2019: x_loading_status => x_loading_status
2020: );
2021: END IF;
2022:
2023: IF x_return_status <> FND_API.g_ret_sts_success THEN
2024: RAISE FND_API.G_EXC_ERROR ;
2025: END IF;
2026: END IF;
2027:

Line 2024: RAISE FND_API.G_EXC_ERROR ;

2020: );
2021: END IF;
2022:
2023: IF x_return_status <> FND_API.g_ret_sts_success THEN
2024: RAISE FND_API.G_EXC_ERROR ;
2025: END IF;
2026: END IF;
2027:
2028: -- continue to validate bonus plan elements

Line 2040: IF x_return_status <> FND_API.g_ret_sts_success THEN

2036: x_bonus_pe_id_tbl => l_bonus_pe_id_tbl,
2037: x_loading_status => x_loading_status
2038: );
2039:
2040: IF x_return_status <> FND_API.g_ret_sts_success THEN
2041: RAISE FND_API.G_EXC_ERROR ;
2042: END IF;
2043: END IF;
2044:

Line 2041: RAISE FND_API.G_EXC_ERROR ;

2037: x_loading_status => x_loading_status
2038: );
2039:
2040: IF x_return_status <> FND_API.g_ret_sts_success THEN
2041: RAISE FND_API.G_EXC_ERROR ;
2042: END IF;
2043: END IF;
2044:
2045:

Line 2190: RAISE FND_API.g_exc_error;

2186: FND_MESSAGE.SET_NAME ('CN' , 'CN_CALC_NO_SALESREP');
2187: FND_MSG_PUB.Add;
2188: END IF;
2189: x_loading_status := 'CN_CALC_NO_SALESREP';
2190: RAISE FND_API.g_exc_error;
2191: ELSE
2192: CLOSE l_salesrep_count_csr;
2193: END IF;
2194: END ;

Line 2245: IF FND_API.To_Boolean( p_commit ) THEN

2241: END IF;
2242: END IF;
2243:
2244: -- only if p_commit is true then submit the calculation
2245: IF FND_API.To_Boolean( p_commit ) THEN
2246: -- initialize apps enviroment for concurrent submission
2247: IF l_p_calc_submission_rec.concurrent_calculation = 'Y' THEN
2248:
2249: -- we have to do commit first

Line 2305: x_return_status := FND_API.G_RET_STS_SUCCESS;

2301: END IF;
2302: END IF; -- p_commit;
2303:
2304: -- Initialize API return status to success
2305: x_return_status := FND_API.G_RET_STS_SUCCESS;
2306: x_loading_status := 'CN_UPDATED';
2307:
2308: --+
2309: -- End of API body.

Line 2318: p_commit => FND_API.G_FALSE,

2314: 'CREATE_CALC_SUBMISSION', 'A', 'V' ) then
2315: cn_calc_submission_VUHK.create_calc_submission_post
2316: ( p_api_version => p_api_version,
2317: p_init_msg_list => p_init_msg_list,
2318: p_commit => FND_API.G_FALSE,
2319: p_validation_level => p_validation_level,
2320: x_return_status => x_return_status,
2321: x_msg_count => x_msg_count,
2322: x_msg_data => x_msg_data,

Line 2326: if ( x_return_status = FND_API.G_RET_STS_ERROR ) then

2322: x_msg_data => x_msg_data,
2323: p_calc_submission_rec => l_p_calc_submission_rec,
2324: x_loading_status => x_loading_status
2325: );
2326: if ( x_return_status = FND_API.G_RET_STS_ERROR ) then
2327: RAISE FND_API.G_EXC_ERROR;
2328: elsif (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) then
2329: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2330: end if;

Line 2327: RAISE FND_API.G_EXC_ERROR;

2323: p_calc_submission_rec => l_p_calc_submission_rec,
2324: x_loading_status => x_loading_status
2325: );
2326: if ( x_return_status = FND_API.G_RET_STS_ERROR ) then
2327: RAISE FND_API.G_EXC_ERROR;
2328: elsif (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) then
2329: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2330: end if;
2331: end if;

Line 2328: elsif (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) then

2324: x_loading_status => x_loading_status
2325: );
2326: if ( x_return_status = FND_API.G_RET_STS_ERROR ) then
2327: RAISE FND_API.G_EXC_ERROR;
2328: elsif (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) then
2329: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2330: end if;
2331: end if;
2332:

Line 2329: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

2325: );
2326: if ( x_return_status = FND_API.G_RET_STS_ERROR ) then
2327: RAISE FND_API.G_EXC_ERROR;
2328: elsif (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) then
2329: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2330: end if;
2331: end if;
2332:
2333: --dbms_output.put_line('vertical post processing API x_loading_status is ' || x_loading_status);

Line 2341: p_commit => FND_API.G_FALSE,

2337:
2338: CN_CALC_SUBMISSION_CUHK.create_calc_submission_post
2339: ( p_api_version => p_api_version,
2340: p_init_msg_list => p_init_msg_list,
2341: p_commit => FND_API.G_FALSE,
2342: p_validation_level => p_validation_level,
2343: x_return_status => x_return_status,
2344: x_msg_count => x_msg_count,
2345: x_msg_data => x_msg_data,

Line 2349: if ( x_return_status = FND_API.G_RET_STS_ERROR ) then

2345: x_msg_data => x_msg_data,
2346: p_calc_submission_rec => l_p_calc_submission_rec,
2347: x_loading_status => x_loading_status
2348: );
2349: if ( x_return_status = FND_API.G_RET_STS_ERROR ) then
2350: RAISE FND_API.G_EXC_ERROR;
2351: elsif (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) then
2352: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2353: end if;

Line 2350: RAISE FND_API.G_EXC_ERROR;

2346: p_calc_submission_rec => l_p_calc_submission_rec,
2347: x_loading_status => x_loading_status
2348: );
2349: if ( x_return_status = FND_API.G_RET_STS_ERROR ) then
2350: RAISE FND_API.G_EXC_ERROR;
2351: elsif (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) then
2352: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2353: end if;
2354: end if;

Line 2351: elsif (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) then

2347: x_loading_status => x_loading_status
2348: );
2349: if ( x_return_status = FND_API.G_RET_STS_ERROR ) then
2350: RAISE FND_API.G_EXC_ERROR;
2351: elsif (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) then
2352: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2353: end if;
2354: end if;
2355:

Line 2352: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

2348: );
2349: if ( x_return_status = FND_API.G_RET_STS_ERROR ) then
2350: RAISE FND_API.G_EXC_ERROR;
2351: elsif (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) then
2352: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2353: end if;
2354: end if;
2355:
2356: -- Following code is for message generation

Line 2376: if ( x_return_status = FND_API.G_RET_STS_ERROR ) then

2372: p_bind_data_id => l_bind_data_id,
2373: x_return_code => x_return_status
2374: );
2375:
2376: if ( x_return_status = FND_API.G_RET_STS_ERROR ) then
2377: RAISE FND_API.G_EXC_ERROR;
2378: elsif (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) then
2379: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2380: end if;

Line 2377: RAISE FND_API.G_EXC_ERROR;

2373: x_return_code => x_return_status
2374: );
2375:
2376: if ( x_return_status = FND_API.G_RET_STS_ERROR ) then
2377: RAISE FND_API.G_EXC_ERROR;
2378: elsif (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) then
2379: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2380: end if;
2381: END IF;

Line 2378: elsif (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) then

2374: );
2375:
2376: if ( x_return_status = FND_API.G_RET_STS_ERROR ) then
2377: RAISE FND_API.G_EXC_ERROR;
2378: elsif (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) then
2379: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2380: end if;
2381: END IF;
2382: end if;

Line 2379: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

2375:
2376: if ( x_return_status = FND_API.G_RET_STS_ERROR ) then
2377: RAISE FND_API.G_EXC_ERROR;
2378: elsif (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) then
2379: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2380: end if;
2381: END IF;
2382: end if;
2383:

Line 2384: x_return_status := FND_API.G_RET_STS_SUCCESS;

2380: end if;
2381: END IF;
2382: end if;
2383:
2384: x_return_status := FND_API.G_RET_STS_SUCCESS;
2385:
2386: -- Standard check of p_commit.
2387: -- +
2388: IF FND_API.To_Boolean( p_commit ) THEN

Line 2388: IF FND_API.To_Boolean( p_commit ) THEN

2384: x_return_status := FND_API.G_RET_STS_SUCCESS;
2385:
2386: -- Standard check of p_commit.
2387: -- +
2388: IF FND_API.To_Boolean( p_commit ) THEN
2389: COMMIT WORK;
2390: END IF;
2391:
2392: --+

Line 2399: p_encoded => FND_API.G_FALSE

2395: FND_MSG_PUB.Count_And_Get
2396: (
2397: p_count => x_msg_count ,
2398: p_data => x_msg_data ,
2399: p_encoded => FND_API.G_FALSE
2400: );
2401:
2402: if (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
2403: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE,

Line 2409: WHEN FND_API.G_EXC_ERROR THEN

2405: 'End of update_calc_submission.');
2406: end if;
2407:
2408: EXCEPTION
2409: WHEN FND_API.G_EXC_ERROR THEN
2410: ROLLBACK TO update_calc_submission;
2411: x_return_status := FND_API.G_RET_STS_ERROR ;
2412: FND_MSG_PUB.Count_And_Get
2413: (

Line 2411: x_return_status := FND_API.G_RET_STS_ERROR ;

2407:
2408: EXCEPTION
2409: WHEN FND_API.G_EXC_ERROR THEN
2410: ROLLBACK TO update_calc_submission;
2411: x_return_status := FND_API.G_RET_STS_ERROR ;
2412: FND_MSG_PUB.Count_And_Get
2413: (
2414: p_count => x_msg_count ,
2415: p_data => x_msg_data ,

Line 2416: p_encoded => FND_API.G_FALSE

2412: FND_MSG_PUB.Count_And_Get
2413: (
2414: p_count => x_msg_count ,
2415: p_data => x_msg_data ,
2416: p_encoded => FND_API.G_FALSE
2417: );
2418: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2419: ROLLBACK TO update_calc_submission;
2420: x_loading_status := 'UNEXPECTED_ERR';

Line 2418: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

2414: p_count => x_msg_count ,
2415: p_data => x_msg_data ,
2416: p_encoded => FND_API.G_FALSE
2417: );
2418: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2419: ROLLBACK TO update_calc_submission;
2420: x_loading_status := 'UNEXPECTED_ERR';
2421: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
2422: FND_MSG_PUB.Count_And_Get

Line 2421: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

2417: );
2418: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2419: ROLLBACK TO update_calc_submission;
2420: x_loading_status := 'UNEXPECTED_ERR';
2421: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
2422: FND_MSG_PUB.Count_And_Get
2423: (
2424: p_count => x_msg_count ,
2425: p_data => x_msg_data ,

Line 2426: p_encoded => FND_API.G_FALSE

2422: FND_MSG_PUB.Count_And_Get
2423: (
2424: p_count => x_msg_count ,
2425: p_data => x_msg_data ,
2426: p_encoded => FND_API.G_FALSE
2427: );
2428: WHEN OTHERS THEN
2429: ROLLBACK TO update_calc_submission;
2430: x_loading_status := 'UNEXPECTED_ERR';

Line 2431: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

2427: );
2428: WHEN OTHERS THEN
2429: ROLLBACK TO update_calc_submission;
2430: x_loading_status := 'UNEXPECTED_ERR';
2431: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
2432: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
2433: THEN
2434: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME ,l_api_name );
2435: END IF;

Line 2440: p_encoded => FND_API.G_FALSE

2436: FND_MSG_PUB.Count_And_Get
2437: (
2438: p_count => x_msg_count ,
2439: p_data => x_msg_data ,
2440: p_encoded => FND_API.G_FALSE
2441: );
2442:
2443: if (FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
2444: FND_LOG.STRING(FND_LOG.LEVEL_UNEXPECTED,