DBA Data[Home] [Help]

APPS.JTF_CALENDAR_PUB dependencies on FND_API

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

174: -- *************** Is Resource Available *********************
175: --
176: PROCEDURE Is_Res_Available
177: ( p_api_version IN NUMBER,
178: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
179: p_resource_id IN NUMBER,
180: p_resource_type IN VARCHAR2,
181: p_start_date_time IN DATE,
182: p_duration IN NUMBER,

Line 200: IF NOT FND_API.Compatible_API_Call (l_api_version ,

196: v_end_time VARCHAR2(5);
197:
198: BEGIN
199: -- Standard call to check for call compatibility.
200: IF NOT FND_API.Compatible_API_Call (l_api_version ,
201: p_api_version ,
202: l_api_name ,
203: G_PKG_NAME )
204: THEN

Line 205: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

201: p_api_version ,
202: l_api_name ,
203: G_PKG_NAME )
204: THEN
205: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
206: END IF;
207:
208: -- Initialize message list if p_init_msg_list is set to TRUE.
209: IF FND_API.to_Boolean( p_init_msg_list ) THEN

Line 209: IF FND_API.to_Boolean( p_init_msg_list ) THEN

205: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
206: END IF;
207:
208: -- Initialize message list if p_init_msg_list is set to TRUE.
209: IF FND_API.to_Boolean( p_init_msg_list ) THEN
210: FND_MSG_PUB.initialize;
211: END IF;
212:
213: -- Call to check for required fields

Line 224: x_return_status := FND_API.G_RET_STS_SUCCESS;

220: RAISE G_EXC_REQUIRED_FIELDS_NULL;
221: END IF;
222:
223: -- Initialize API return status to success
224: x_return_status := FND_API.G_RET_STS_SUCCESS;
225:
226: JTF_CALENDAR_PUB.Get_Available_Time
227: ( p_api_version => 1.0,
228: p_resource_id => p_resource_id,

Line 254: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

250: end loop;
251: END IF;
252:
253: EXCEPTION
254: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
255: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
256: FND_MSG_PUB.Count_And_Get
257: ( p_count => x_msg_count,
258: p_data => x_msg_data

Line 255: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

251: END IF;
252:
253: EXCEPTION
254: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
255: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
256: FND_MSG_PUB.Count_And_Get
257: ( p_count => x_msg_count,
258: p_data => x_msg_data
259: );

Line 261: x_return_status := FND_API.G_RET_STS_ERROR ;

257: ( p_count => x_msg_count,
258: p_data => x_msg_data
259: );
260: WHEN G_EXC_REQUIRED_FIELDS_NULL THEN
261: x_return_status := FND_API.G_RET_STS_ERROR ;
262: fnd_message.set_name('JTF','JTF_CAL_REQUIRED_PARAMETERS');
263: fnd_message.set_token('P_PARAMETER', l_parameters);
264: fnd_msg_pub.add;
265: FND_MSG_PUB.Count_And_Get

Line 270: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

266: (p_count => x_msg_count,
267: p_data => x_msg_data
268: );
269: WHEN OTHERS THEN
270: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
271: fnd_message.set_name('JTF','JTF_CAL_UNEXPECTED_ERROR');
272: fnd_message.set_token('ERROR_CODE',SQLCODE);
273: fnd_message.set_token('ERROR_MESSAGE', SQLERRM);
274: fnd_msg_pub.add;

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

282: -- ****************** Get Available Time **********************
283: --
284: PROCEDURE Get_Available_Time
285: ( p_api_version IN NUMBER,
286: p_init_msg_list IN VARCHAR2:=FND_API.G_FALSE,
287: p_resource_id IN NUMBER,
288: p_resource_type IN VARCHAR2,
289: p_start_date IN DATE,
290: p_end_date IN DATE,

Line 436: IF NOT FND_API.Compatible_API_Call (l_api_version,

432: l_res_Timezone_id Number;
433:
434: BEGIN
435: -- Standard call to check for call compatibility.
436: IF NOT FND_API.Compatible_API_Call (l_api_version,
437: p_api_version,
438: l_api_name,
439: G_PKG_NAME)
440: THEN

Line 441: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

437: p_api_version,
438: l_api_name,
439: G_PKG_NAME)
440: THEN
441: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
442: END IF;
443:
444: -- Initialize message list if p_init_msg_list is set to TRUE.
445: IF FND_API.to_Boolean( p_init_msg_list ) THEN

Line 445: IF FND_API.to_Boolean( p_init_msg_list ) THEN

441: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
442: END IF;
443:
444: -- Initialize message list if p_init_msg_list is set to TRUE.
445: IF FND_API.to_Boolean( p_init_msg_list ) THEN
446: FND_MSG_PUB.initialize;
447: END IF;
448:
449: -- Call to check for required fields

Line 460: x_return_status := FND_API.G_RET_STS_SUCCESS;

456: RAISE G_EXC_REQUIRED_FIELDS_NULL;
457: END IF;
458:
459: -- Initialize API return status to success
460: x_return_status := FND_API.G_RET_STS_SUCCESS;
461:
462: l_shift_date := trunc(p_start_date);
463:
464: while l_shift_date <= p_end_date loop

Line 690: x_return_status := fnd_api.g_ret_sts_error ;

686: end loop;
687: --
688: -- Update return status to Success if there is atleast one available time slot
689: if x_shift.count = 0 then
690: x_return_status := fnd_api.g_ret_sts_error ;
691: fnd_message.set_name('JTF','JTF_CAL_NO_SHIFT_CONSTR_FOUND');
692: --fnd_message.set_name('JTF','JTF_CAL_NO_SHIFTS_FOR_RESOURCE');
693: --fnd_message.set_token('P_RESOURCE_NAME', l_resource_name);
694: fnd_msg_pub.add;

Line 708: x_return_status := fnd_api.g_ret_sts_error ;

704: end if;
705:
706: EXCEPTION
707: when g_exc_required_fields_null then
708: x_return_status := fnd_api.g_ret_sts_error ;
709: fnd_message.set_name('JTF','JTF_CAL_REQUIRED_PARAMETERS');
710: fnd_message.set_token('P_PARAMETER', l_parameters);
711: fnd_msg_pub.add;
712: fnd_msg_pub.count_and_get ( p_count => x_msg_count

Line 715: when fnd_api.g_exc_unexpected_error then

711: fnd_msg_pub.add;
712: fnd_msg_pub.count_and_get ( p_count => x_msg_count
713: , p_data => x_msg_data );
714:
715: when fnd_api.g_exc_unexpected_error then
716: x_return_status := fnd_api.g_ret_sts_unexp_error;
717: fnd_msg_pub.count_and_get ( p_count => x_msg_count
718: , p_data => x_msg_data );
719:

Line 716: x_return_status := fnd_api.g_ret_sts_unexp_error;

712: fnd_msg_pub.count_and_get ( p_count => x_msg_count
713: , p_data => x_msg_data );
714:
715: when fnd_api.g_exc_unexpected_error then
716: x_return_status := fnd_api.g_ret_sts_unexp_error;
717: fnd_msg_pub.count_and_get ( p_count => x_msg_count
718: , p_data => x_msg_data );
719:
720: when others then

Line 721: x_return_status := fnd_api.g_ret_sts_unexp_error ;

717: fnd_msg_pub.count_and_get ( p_count => x_msg_count
718: , p_data => x_msg_data );
719:
720: when others then
721: x_return_status := fnd_api.g_ret_sts_unexp_error ;
722: fnd_message.set_name('JTF','JTF_CAL_UNEXPECTED_ERROR');
723: fnd_message.set_token('ERROR_CODE',sqlcode);
724: fnd_message.set_token('ERROR_MESSAGE',sqlerrm);
725: fnd_msg_pub.count_and_get ( p_count => x_msg_count

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

731: -- ****************** Get Available Time Slot **********************
732: --
733: PROCEDURE Get_Available_Slot
734: (p_api_version IN NUMBER ,
735: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
736: p_resource_id IN NUMBER ,
737: p_resource_type IN VARCHAR2 ,
738: p_start_date_time IN DATE ,
739: p_end_date_time IN DATE ,

Line 764: IF NOT FND_API.Compatible_API_Call (l_api_version ,

760: i number;
761:
762: BEGIN
763: -- Standard call to check for call compatibility.
764: IF NOT FND_API.Compatible_API_Call (l_api_version ,
765: p_api_version ,
766: l_api_name ,
767: G_PKG_NAME )
768: THEN

Line 769: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

765: p_api_version ,
766: l_api_name ,
767: G_PKG_NAME )
768: THEN
769: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
770: END IF;
771:
772: -- Initialize message list if p_init_msg_list is set to TRUE.
773: IF FND_API.to_Boolean( p_init_msg_list ) THEN

Line 773: IF FND_API.to_Boolean( p_init_msg_list ) THEN

769: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
770: END IF;
771:
772: -- Initialize message list if p_init_msg_list is set to TRUE.
773: IF FND_API.to_Boolean( p_init_msg_list ) THEN
774: FND_MSG_PUB.initialize;
775: END IF;
776:
777: -- Call to check for required fields

Line 789: x_return_status := FND_API.G_RET_STS_SUCCESS;

785: RAISE G_EXC_REQUIRED_FIELDS_NULL;
786: END IF;
787:
788: -- Initialize API return status to success
789: x_return_status := FND_API.G_RET_STS_SUCCESS;
790: --
791: JTF_CALENDAR_PUB_24hr.Get_Available_Slot
792: ( p_api_version => l_api_version ,
793: p_init_msg_list => p_init_msg_list,

Line 808: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

804: x_shift_construct_id => x_shift_construct_id,
805: x_availability_type => x_availability_type );
806:
807: EXCEPTION
808: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
809: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
810: FND_MSG_PUB.Count_And_Get
811: ( p_count => x_msg_count,
812: p_data => x_msg_data

Line 809: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

805: x_availability_type => x_availability_type );
806:
807: EXCEPTION
808: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
809: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
810: FND_MSG_PUB.Count_And_Get
811: ( p_count => x_msg_count,
812: p_data => x_msg_data
813: );

Line 815: x_return_status := FND_API.G_RET_STS_ERROR ;

811: ( p_count => x_msg_count,
812: p_data => x_msg_data
813: );
814: WHEN G_EXC_REQUIRED_FIELDS_NULL THEN
815: x_return_status := FND_API.G_RET_STS_ERROR ;
816: fnd_message.set_name('JTF','JTF_CAL_REQUIRED_PARAMETERS');
817: fnd_message.set_token('P_PARAMETER', l_parameters);
818: fnd_msg_pub.add;
819: FND_MSG_PUB.Count_And_Get

Line 824: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

820: (p_count => x_msg_count,
821: p_data => x_msg_data
822: );
823: WHEN OTHERS THEN
824: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
825: fnd_message.set_name('JTF','JTF_CAL_UNEXPECTED_ERROR');
826: fnd_message.set_token('ERROR_CODE',SQLCODE);
827: fnd_message.set_token('ERROR_MESSAGE', SQLERRM);
828: fnd_msg_pub.add;

Line 931: l_return_status varchar2(1) := FND_API.G_RET_STS_ERROR ;

927:
928: l_server_tz_id Number := to_number (fnd_profile.value_specific('SERVER_TIMEZONE_ID'));
929: l_res_Timezone_id Number;
930:
931: l_return_status varchar2(1) := FND_API.G_RET_STS_ERROR ;
932:
933: l_resource_name jtf_task_resources_vl.resource_name%TYPE;-- bug # 2418561
934:
935: BEGIN

Line 937: if not fnd_api.compatible_api_call

933: l_resource_name jtf_task_resources_vl.resource_name%TYPE;-- bug # 2418561
934:
935: BEGIN
936: -- standard call to check for call compatibility.
937: if not fnd_api.compatible_api_call
938: ( l_api_version
939: , p_api_version
940: , l_api_name
941: , JTF_CALENDAR_PUB.g_pkg_name )

Line 943: raise fnd_api.g_exc_unexpected_error;

939: , p_api_version
940: , l_api_name
941: , JTF_CALENDAR_PUB.g_pkg_name )
942: then
943: raise fnd_api.g_exc_unexpected_error;
944: end if;
945:
946: -- initialize message list if p_init_msg_list is set to true.
947: if fnd_api.to_boolean ( p_init_msg_list )

Line 947: if fnd_api.to_boolean ( p_init_msg_list )

943: raise fnd_api.g_exc_unexpected_error;
944: end if;
945:
946: -- initialize message list if p_init_msg_list is set to true.
947: if fnd_api.to_boolean ( p_init_msg_list )
948: then
949: fnd_msg_pub.initialize;
950: end if;
951:

Line 964: x_return_status := fnd_api.g_ret_sts_success;

960: raise g_exc_required_fields_null;
961: end if;
962:
963: -- initialize api return status to success
964: x_return_status := fnd_api.g_ret_sts_success;
965:
966: -- bug# 1344222
967: -- Comment out by jawang on 06/17/2002
968:

Line 1008: l_return_status := FND_API.G_RET_STS_SUCCESS;

1004: -- and l_shift_date between trunc(a.start_date_time) and nvl(trunc(a.end_date_time),to_date(get_g_miss_date,'DD/MM/RRRR'));
1005: and l_shift_date between trunc(a.start_date_time) and nvl(trunc(a.end_date_time),l_shift_date);
1006:
1007: -- Added for bug 3270116
1008: l_return_status := FND_API.G_RET_STS_SUCCESS;
1009:
1010: -- if condition added for bug 3270116 by ABRAINA
1011: IF Validate_Cal_Date(l_calendar_id, l_shift_date)
1012: THEN

Line 1216: x_return_status := FND_API.G_RET_STS_ERROR ;

1212: end if;
1213: end loop;
1214: exception
1215: when no_data_found then
1216: x_return_status := FND_API.G_RET_STS_ERROR ;
1217: -- Added for bug 3270116
1218: l_return_status := FND_API.G_RET_STS_ERROR ;
1219: -- end
1220: fnd_message.set_name('JTF','JTF_CAL_NO_SHIFTS');

Line 1218: l_return_status := FND_API.G_RET_STS_ERROR ;

1214: exception
1215: when no_data_found then
1216: x_return_status := FND_API.G_RET_STS_ERROR ;
1217: -- Added for bug 3270116
1218: l_return_status := FND_API.G_RET_STS_ERROR ;
1219: -- end
1220: fnd_message.set_name('JTF','JTF_CAL_NO_SHIFTS');
1221: fnd_message.set_token('P_CAL_NAME', l_calendar_name);
1222: fnd_msg_pub.add;

Line 1231: x_return_status := FND_API.G_RET_STS_ERROR ;

1227: end; --2
1228: end if; -- valid cal end if
1229: exception
1230: when no_data_found then
1231: x_return_status := FND_API.G_RET_STS_ERROR ;
1232: -- No Need to set l_return_status to FND_API.G_RET_STS_ERROR
1233: -- as for this exception we want to handle it.
1234: -- For a resource, even if a single shift is returned for a search window
1235: -- it will return 'S'. This is as per requirement from Field service and Gantt guys.

Line 1232: -- No Need to set l_return_status to FND_API.G_RET_STS_ERROR

1228: end if; -- valid cal end if
1229: exception
1230: when no_data_found then
1231: x_return_status := FND_API.G_RET_STS_ERROR ;
1232: -- No Need to set l_return_status to FND_API.G_RET_STS_ERROR
1233: -- as for this exception we want to handle it.
1234: -- For a resource, even if a single shift is returned for a search window
1235: -- it will return 'S'. This is as per requirement from Field service and Gantt guys.
1236: l_tbl.delete; -- to delete the record from TOR if no shift found

Line 1254: x_return_status := fnd_api.g_ret_sts_error ;

1250:
1251: -- see if shift constructs have been found
1252: if x_shift.count = 0
1253: then
1254: x_return_status := fnd_api.g_ret_sts_error ;
1255: -- Added for bug 3270116
1256: l_return_status := FND_API.G_RET_STS_ERROR ;
1257: -- end
1258: fnd_message.set_name('JTF','JTF_CAL_NO_SHIFT_CONSTR_FOUND');

Line 1256: l_return_status := FND_API.G_RET_STS_ERROR ;

1252: if x_shift.count = 0
1253: then
1254: x_return_status := fnd_api.g_ret_sts_error ;
1255: -- Added for bug 3270116
1256: l_return_status := FND_API.G_RET_STS_ERROR ;
1257: -- end
1258: fnd_message.set_name('JTF','JTF_CAL_NO_SHIFT_CONSTR_FOUND');
1259: fnd_msg_pub.add;
1260:

Line 1275: if l_return_status = FND_API.G_RET_STS_SUCCESS then

1271:
1272: -- Added for bug 3270116
1273: -- For a resource, even if a single shift is returned for any search window
1274: -- it will return 'S'. This is as per requirement from Field service and Gantt guys.
1275: if l_return_status = FND_API.G_RET_STS_SUCCESS then
1276: x_return_status := FND_API.G_RET_STS_SUCCESS;
1277: else
1278: x_return_status := FND_API.G_RET_STS_ERROR ;
1279: end if;

Line 1276: x_return_status := FND_API.G_RET_STS_SUCCESS;

1272: -- Added for bug 3270116
1273: -- For a resource, even if a single shift is returned for any search window
1274: -- it will return 'S'. This is as per requirement from Field service and Gantt guys.
1275: if l_return_status = FND_API.G_RET_STS_SUCCESS then
1276: x_return_status := FND_API.G_RET_STS_SUCCESS;
1277: else
1278: x_return_status := FND_API.G_RET_STS_ERROR ;
1279: end if;
1280: -- end

Line 1278: x_return_status := FND_API.G_RET_STS_ERROR ;

1274: -- it will return 'S'. This is as per requirement from Field service and Gantt guys.
1275: if l_return_status = FND_API.G_RET_STS_SUCCESS then
1276: x_return_status := FND_API.G_RET_STS_SUCCESS;
1277: else
1278: x_return_status := FND_API.G_RET_STS_ERROR ;
1279: end if;
1280: -- end
1281: EXCEPTION
1282: when g_exc_required_fields_null then

Line 1283: x_return_status := fnd_api.g_ret_sts_error ;

1279: end if;
1280: -- end
1281: EXCEPTION
1282: when g_exc_required_fields_null then
1283: x_return_status := fnd_api.g_ret_sts_error ;
1284: fnd_message.set_name('JTF','JTF_CAL_REQUIRED_PARAMETERS');
1285: fnd_message.set_token('P_PARAMETER', l_parameters);
1286: fnd_msg_pub.add;
1287: fnd_msg_pub.count_and_get ( p_count => x_msg_count

Line 1290: when fnd_api.g_exc_unexpected_error then

1286: fnd_msg_pub.add;
1287: fnd_msg_pub.count_and_get ( p_count => x_msg_count
1288: , p_data => x_msg_data );
1289:
1290: when fnd_api.g_exc_unexpected_error then
1291: x_return_status := fnd_api.g_ret_sts_unexp_error;
1292: fnd_msg_pub.count_and_get ( p_count => x_msg_count
1293: , p_data => x_msg_data );
1294: when others then

Line 1291: x_return_status := fnd_api.g_ret_sts_unexp_error;

1287: fnd_msg_pub.count_and_get ( p_count => x_msg_count
1288: , p_data => x_msg_data );
1289:
1290: when fnd_api.g_exc_unexpected_error then
1291: x_return_status := fnd_api.g_ret_sts_unexp_error;
1292: fnd_msg_pub.count_and_get ( p_count => x_msg_count
1293: , p_data => x_msg_data );
1294: when others then
1295: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 1295: x_return_status := fnd_api.g_ret_sts_unexp_error ;

1291: x_return_status := fnd_api.g_ret_sts_unexp_error;
1292: fnd_msg_pub.count_and_get ( p_count => x_msg_count
1293: , p_data => x_msg_data );
1294: when others then
1295: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1296: fnd_message.set_name('JTF','JTF_CAL_UNEXPECTED_ERROR');
1297: fnd_message.set_token('ERROR_CODE',sqlcode);
1298: fnd_message.set_token('ERROR_MESSAGE',sqlerrm);
1299: fnd_msg_pub.count_and_get ( p_count => x_msg_count

Line 1441: l_return_status varchar2(1) := FND_API.G_RET_STS_ERROR ;

1437: l_st_time date;
1438: l_server_tz_id Number := to_number (fnd_profile.value_specific('SERVER_TIMEZONE_ID'));
1439: l_res_Timezone_id Number;
1440:
1441: l_return_status varchar2(1) := FND_API.G_RET_STS_ERROR ;
1442:
1443: l_resource_name jtf_task_resources_vl.resource_name%TYPE;-- bug # 2418561
1444:
1445: BEGIN

Line 1448: if not fnd_api.compatible_api_call

1444:
1445: BEGIN
1446:
1447: -- standard call to check for call compatibility.
1448: if not fnd_api.compatible_api_call
1449: ( l_api_version
1450: , p_api_version
1451: , l_api_name
1452: , JTF_CALENDAR_PUB.g_pkg_name )

Line 1454: raise fnd_api.g_exc_unexpected_error;

1450: , p_api_version
1451: , l_api_name
1452: , JTF_CALENDAR_PUB.g_pkg_name )
1453: then
1454: raise fnd_api.g_exc_unexpected_error;
1455: end if;
1456:
1457: -- initialize message list if p_init_msg_list is set to true.
1458: if fnd_api.to_boolean ( p_init_msg_list )

Line 1458: if fnd_api.to_boolean ( p_init_msg_list )

1454: raise fnd_api.g_exc_unexpected_error;
1455: end if;
1456:
1457: -- initialize message list if p_init_msg_list is set to true.
1458: if fnd_api.to_boolean ( p_init_msg_list )
1459: then
1460: fnd_msg_pub.initialize;
1461: end if;
1462:

Line 1475: x_return_status := fnd_api.g_ret_sts_success;

1471: raise g_exc_required_fields_null;
1472: end if;
1473:
1474: -- initialize api return status to success
1475: x_return_status := fnd_api.g_ret_sts_success;
1476:
1477: -- bug# 1344222
1478: -- Comment out by jawang on 06/17/2002
1479:

Line 1520: l_return_status := FND_API.G_RET_STS_SUCCESS;

1516: -- and l_shift_date between trunc(a.start_date_time) and nvl(trunc(a.end_date_time),to_date(get_g_miss_date,'DD/MM/RRRR'));
1517: and l_shift_date between trunc(a.start_date_time) and nvl(trunc(a.end_date_time),l_shift_date);
1518:
1519: -- Added for bug 3270116
1520: l_return_status := FND_API.G_RET_STS_SUCCESS;
1521:
1522: --added l_shift_date in valid_cal loop bug #1355824
1523: -- if condition added for bug 3270116 by ABRAINA
1524: IF Validate_Cal_Date(l_calendar_id, l_shift_date)

Line 1873: x_return_status := FND_API.G_RET_STS_ERROR ;

1869: end if;
1870: end loop;
1871: exception
1872: when no_data_found then
1873: x_return_status := FND_API.G_RET_STS_ERROR ;
1874: -- Added for bug 3270116
1875: l_return_status := FND_API.G_RET_STS_ERROR ;
1876: -- end
1877: fnd_message.set_name('JTF','JTF_CAL_NO_SHIFTS');

Line 1875: l_return_status := FND_API.G_RET_STS_ERROR ;

1871: exception
1872: when no_data_found then
1873: x_return_status := FND_API.G_RET_STS_ERROR ;
1874: -- Added for bug 3270116
1875: l_return_status := FND_API.G_RET_STS_ERROR ;
1876: -- end
1877: fnd_message.set_name('JTF','JTF_CAL_NO_SHIFTS');
1878: fnd_message.set_token('P_CAL_NAME', l_calendar_name);
1879: fnd_msg_pub.add;

Line 1888: x_return_status := FND_API.G_RET_STS_ERROR ;

1884: end; --2
1885: end if; -- valid cal end if
1886: exception
1887: when no_data_found then
1888: x_return_status := FND_API.G_RET_STS_ERROR ;
1889: -- No Need to set l_return_status to FND_API.G_RET_STS_ERROR
1890: -- as for this exception we want to handle it.
1891: -- For a resource, even if a single shift is returned for a search window
1892: -- it will return 'S'. This is as per requirement from Field service and Gantt guys.

Line 1889: -- No Need to set l_return_status to FND_API.G_RET_STS_ERROR

1885: end if; -- valid cal end if
1886: exception
1887: when no_data_found then
1888: x_return_status := FND_API.G_RET_STS_ERROR ;
1889: -- No Need to set l_return_status to FND_API.G_RET_STS_ERROR
1890: -- as for this exception we want to handle it.
1891: -- For a resource, even if a single shift is returned for a search window
1892: -- it will return 'S'. This is as per requirement from Field service and Gantt guys.
1893: l_tbl.delete; -- to delete the record from TOR if no shift found

Line 1911: x_return_status := fnd_api.g_ret_sts_error ;

1907:
1908: -- see if shift constructs have been found
1909: if x_shift.count = 0
1910: then
1911: x_return_status := fnd_api.g_ret_sts_error ;
1912: -- Added for bug 3270116
1913: l_return_status := FND_API.G_RET_STS_ERROR ;
1914: -- end
1915: fnd_message.set_name('JTF','JTF_CAL_NO_SHIFT_CONSTR_FOUND');

Line 1913: l_return_status := FND_API.G_RET_STS_ERROR ;

1909: if x_shift.count = 0
1910: then
1911: x_return_status := fnd_api.g_ret_sts_error ;
1912: -- Added for bug 3270116
1913: l_return_status := FND_API.G_RET_STS_ERROR ;
1914: -- end
1915: fnd_message.set_name('JTF','JTF_CAL_NO_SHIFT_CONSTR_FOUND');
1916: fnd_msg_pub.add;
1917:

Line 1932: if l_return_status = FND_API.G_RET_STS_SUCCESS then

1928:
1929: -- Added for bug 3270116
1930: -- For a resource, even if a single shift is returned for any search window
1931: -- it will return 'S'. This is as per requirement from Field service and Gantt guys.
1932: if l_return_status = FND_API.G_RET_STS_SUCCESS then
1933: x_return_status := FND_API.G_RET_STS_SUCCESS;
1934: else
1935: x_return_status := FND_API.G_RET_STS_ERROR ;
1936: end if;

Line 1933: x_return_status := FND_API.G_RET_STS_SUCCESS;

1929: -- Added for bug 3270116
1930: -- For a resource, even if a single shift is returned for any search window
1931: -- it will return 'S'. This is as per requirement from Field service and Gantt guys.
1932: if l_return_status = FND_API.G_RET_STS_SUCCESS then
1933: x_return_status := FND_API.G_RET_STS_SUCCESS;
1934: else
1935: x_return_status := FND_API.G_RET_STS_ERROR ;
1936: end if;
1937: -- end

Line 1935: x_return_status := FND_API.G_RET_STS_ERROR ;

1931: -- it will return 'S'. This is as per requirement from Field service and Gantt guys.
1932: if l_return_status = FND_API.G_RET_STS_SUCCESS then
1933: x_return_status := FND_API.G_RET_STS_SUCCESS;
1934: else
1935: x_return_status := FND_API.G_RET_STS_ERROR ;
1936: end if;
1937: -- end
1938:
1939: EXCEPTION

Line 1941: x_return_status := fnd_api.g_ret_sts_error ;

1937: -- end
1938:
1939: EXCEPTION
1940: when g_exc_required_fields_null then
1941: x_return_status := fnd_api.g_ret_sts_error ;
1942: fnd_message.set_name('JTF','JTF_CAL_REQUIRED_PARAMETERS');
1943: fnd_message.set_token('P_PARAMETER', l_parameters);
1944: fnd_msg_pub.add;
1945: fnd_msg_pub.count_and_get ( p_count => x_msg_count

Line 1948: when fnd_api.g_exc_unexpected_error then

1944: fnd_msg_pub.add;
1945: fnd_msg_pub.count_and_get ( p_count => x_msg_count
1946: , p_data => x_msg_data );
1947:
1948: when fnd_api.g_exc_unexpected_error then
1949: x_return_status := fnd_api.g_ret_sts_unexp_error;
1950: fnd_msg_pub.count_and_get ( p_count => x_msg_count
1951: , p_data => x_msg_data );
1952: when others then

Line 1949: x_return_status := fnd_api.g_ret_sts_unexp_error;

1945: fnd_msg_pub.count_and_get ( p_count => x_msg_count
1946: , p_data => x_msg_data );
1947:
1948: when fnd_api.g_exc_unexpected_error then
1949: x_return_status := fnd_api.g_ret_sts_unexp_error;
1950: fnd_msg_pub.count_and_get ( p_count => x_msg_count
1951: , p_data => x_msg_data );
1952: when others then
1953: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 1953: x_return_status := fnd_api.g_ret_sts_unexp_error ;

1949: x_return_status := fnd_api.g_ret_sts_unexp_error;
1950: fnd_msg_pub.count_and_get ( p_count => x_msg_count
1951: , p_data => x_msg_data );
1952: when others then
1953: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1954: fnd_message.set_name('JTF','JTF_CAL_UNEXPECTED_ERROR');
1955: fnd_message.set_token('ERROR_CODE',sqlcode);
1956: fnd_message.set_token('ERROR_MESSAGE',sqlerrm);
1957: fnd_msg_pub.count_and_get ( p_count => x_msg_count

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

1963: -- ********** Get Resource Schedule **************
1964: --
1965: PROCEDURE Get_Res_Schedule
1966: ( p_api_version IN NUMBER ,
1967: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE ,
1968: p_resource_id IN NUMBER ,
1969: p_resource_type IN VARCHAR2 ,
1970: p_start_date IN DATE ,
1971: p_end_date IN DATE ,

Line 2118: IF NOT FND_API.Compatible_API_Call ( l_api_version ,

2114: l_resource_name jtf_task_resources_vl.resource_name%TYPE;-- bug # 2418561
2115:
2116: BEGIN
2117: -- Standard call to check for call compatibility.
2118: IF NOT FND_API.Compatible_API_Call ( l_api_version ,
2119: p_api_version ,
2120: l_api_name ,
2121: G_PKG_NAME )
2122: THEN

Line 2123: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

2119: p_api_version ,
2120: l_api_name ,
2121: G_PKG_NAME )
2122: THEN
2123: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2124: END IF;
2125: -- Initialize message list if p_init_msg_list is set to TRUE.
2126: IF FND_API.to_Boolean( p_init_msg_list ) THEN
2127: FND_MSG_PUB.initialize;

Line 2126: IF FND_API.to_Boolean( p_init_msg_list ) THEN

2122: THEN
2123: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2124: END IF;
2125: -- Initialize message list if p_init_msg_list is set to TRUE.
2126: IF FND_API.to_Boolean( p_init_msg_list ) THEN
2127: FND_MSG_PUB.initialize;
2128: END IF;
2129: -- Call to check for required fields
2130: IF not check_for_required_fields (p_resource_id =>p_resource_id,

Line 2139: x_return_status := FND_API.G_RET_STS_SUCCESS;

2135: l_parameters := 'p_resource_id, p_resource_type, p_start_date, p_end_date';
2136: RAISE G_EXC_REQUIRED_FIELDS_NULL;
2137: END IF;
2138: -- Initialize API return status to success
2139: x_return_status := FND_API.G_RET_STS_SUCCESS;
2140:
2141: -- This code is added to get resource name to be printed in error message.
2142: -- Added for Bug 4063687
2143: BEGIN

Line 2355: x_return_status := FND_API.G_RET_STS_ERROR ;

2351:
2352: END LOOP;
2353: exception
2354: when no_data_found then
2355: x_return_status := FND_API.G_RET_STS_ERROR ;
2356: fnd_message.set_name('JTF','JTF_CAL_NO_SHIFTS');
2357: fnd_message.set_token('P_CAL_NAME', l_calendar_name);
2358: fnd_msg_pub.add;
2359: FND_MSG_PUB.Count_And_Get

Line 2367: x_return_status := FND_API.G_RET_STS_ERROR ;

2363: end; --(2)
2364: end if; --(1)
2365: exception
2366: when no_data_found then
2367: x_return_status := FND_API.G_RET_STS_ERROR ;
2368: fnd_message.set_name('JTF','JTF_CAL_RES_NO_CAL');
2369: fnd_message.set_token('P_RES_NAME', l_resource_name);
2370: fnd_message.set_token('P_SHIFT_DATE', l_shift_date);
2371: fnd_msg_pub.add;

Line 2382: x_return_status := FND_API.G_RET_STS_SUCCESS;

2378: end loop;
2379: --
2380: -- Update return status to Success if there is atleast one available time slot
2381: IF x_shift.count > 0 and x_return_status = 'E' THEN
2382: x_return_status := FND_API.G_RET_STS_SUCCESS;
2383: END IF;
2384:
2385: -- Added sort by jawang on 06/27/2002
2386: if x_shift.count > 0

Line 2393: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

2389: sort_tab(x_shift);
2390: end if;
2391:
2392: EXCEPTION
2393: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2394: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
2395: FND_MSG_PUB.Count_And_Get
2396: ( p_count => x_msg_count,
2397: p_data => x_msg_data

Line 2394: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

2390: end if;
2391:
2392: EXCEPTION
2393: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2394: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
2395: FND_MSG_PUB.Count_And_Get
2396: ( p_count => x_msg_count,
2397: p_data => x_msg_data
2398: );

Line 2400: x_return_status := FND_API.G_RET_STS_ERROR ;

2396: ( p_count => x_msg_count,
2397: p_data => x_msg_data
2398: );
2399: WHEN G_EXC_REQUIRED_FIELDS_NULL THEN
2400: x_return_status := FND_API.G_RET_STS_ERROR ;
2401: fnd_message.set_name('JTF','JTF_CAL_REQUIRED_PARAMETERS');
2402: fnd_message.set_token('P_PARAMETER', l_parameters);
2403: fnd_msg_pub.add;
2404: FND_MSG_PUB.Count_And_Get

Line 2409: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

2405: (p_count => x_msg_count,
2406: p_data => x_msg_data
2407: );
2408: WHEN OTHERS THEN
2409: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
2410: fnd_message.set_name('JTF','JTF_CAL_UNEXPECTED_ERROR');
2411: fnd_message.set_token('ERROR_CODE',SQLCODE);
2412: fnd_message.set_token('ERROR_MESSAGE', SQLERRM);
2413: fnd_msg_pub.add;

Line 2423: return(fnd_api.g_false);

2419: END Get_Res_Schedule;
2420:
2421: function get_g_false return varchar2 is
2422: begin
2423: return(fnd_api.g_false);
2424: end get_g_false;
2425:
2426:
2427: function get_g_miss_num return number is

Line 2429: return(fnd_api.g_miss_num);

2425:
2426:
2427: function get_g_miss_num return number is
2428: begin
2429: return(fnd_api.g_miss_num);
2430: end get_g_miss_num;
2431:
2432: function get_g_miss_char return varchar2 is
2433: begin

Line 2434: return(fnd_api.g_miss_char);

2430: end get_g_miss_num;
2431:
2432: function get_g_miss_char return varchar2 is
2433: begin
2434: return(fnd_api.g_miss_char);
2435: end get_g_miss_char;
2436:
2437: function get_g_miss_date return date is
2438: begin

Line 2439: return(fnd_api.g_miss_date);

2435: end get_g_miss_char;
2436:
2437: function get_g_miss_date return date is
2438: begin
2439: return(fnd_api.g_miss_date);
2440: end get_g_miss_date;
2441:
2442: --
2443: -- Function ResourceDt_To_ServerDT Added for Simplex Timezone Enh # 3040681 by ABRAINA

Line 2466: IF NOT FND_API.Compatible_API_Call (l_api_version ,

2462:
2463: BEGIN
2464:
2465: -- Standard call to check for call compatibility.
2466: IF NOT FND_API.Compatible_API_Call (l_api_version ,
2467: p_api_version ,
2468: l_api_name ,
2469: G_PKG_NAME )
2470: THEN

Line 2471: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

2467: p_api_version ,
2468: l_api_name ,
2469: G_PKG_NAME )
2470: THEN
2471: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2472: END IF;
2473:
2474: -- Initialize message list if p_init_msg_list is set to TRUE.
2475: IF FND_API.to_Boolean( p_init_msg_list ) THEN

Line 2475: IF FND_API.to_Boolean( p_init_msg_list ) THEN

2471: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2472: END IF;
2473:
2474: -- Initialize message list if p_init_msg_list is set to TRUE.
2475: IF FND_API.to_Boolean( p_init_msg_list ) THEN
2476: FND_MSG_PUB.initialize;
2477: END IF;
2478:
2479: -- Initialize API return status to success

Line 2480: x_return_status := FND_API.G_RET_STS_SUCCESS;

2476: FND_MSG_PUB.initialize;
2477: END IF;
2478:
2479: -- Initialize API return status to success
2480: x_return_status := FND_API.G_RET_STS_SUCCESS;
2481:
2482: HZ_TIMEZONE_PUB.Get_Time( l_API_VERSION
2483: , l_INIT_MSG_LIST
2484: , P_Resource_TZ_Id

Line 2495: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

2491:
2492: Return x_Server_time;
2493:
2494: EXCEPTION
2495: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2496: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
2497: FND_MSG_PUB.Count_And_Get
2498: ( p_count => x_msg_count,
2499: p_data => x_msg_data

Line 2496: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

2492: Return x_Server_time;
2493:
2494: EXCEPTION
2495: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2496: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
2497: FND_MSG_PUB.Count_And_Get
2498: ( p_count => x_msg_count,
2499: p_data => x_msg_data
2500: );

Line 2502: x_return_status := FND_API.G_RET_STS_ERROR ;

2498: ( p_count => x_msg_count,
2499: p_data => x_msg_data
2500: );
2501: WHEN G_EXC_REQUIRED_FIELDS_NULL THEN
2502: x_return_status := FND_API.G_RET_STS_ERROR ;
2503: fnd_message.set_name('JTF','JTF_CAL_REQUIRED_PARAMETERS');
2504: fnd_message.set_token('P_PARAMETER', l_parameters);
2505: fnd_msg_pub.add;
2506: FND_MSG_PUB.Count_And_Get

Line 2511: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

2507: (p_count => x_msg_count,
2508: p_data => x_msg_data
2509: );
2510: WHEN OTHERS THEN
2511: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
2512: fnd_message.set_name('JTF','JTF_CAL_UNEXPECTED_ERROR');
2513: fnd_message.set_token('ERROR_CODE',SQLCODE);
2514: fnd_message.set_token('ERROR_MESSAGE', SQLERRM);
2515: fnd_msg_pub.add;