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 478: IF NOT FND_API.Compatible_API_Call (l_api_version,

474: l_res_Timezone_id Number;
475:
476: BEGIN
477: -- Standard call to check for call compatibility.
478: IF NOT FND_API.Compatible_API_Call (l_api_version,
479: p_api_version,
480: l_api_name,
481: G_PKG_NAME)
482: THEN

Line 483: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

479: p_api_version,
480: l_api_name,
481: G_PKG_NAME)
482: THEN
483: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
484: END IF;
485:
486: -- Initialize message list if p_init_msg_list is set to TRUE.
487: IF FND_API.to_Boolean( p_init_msg_list ) THEN

Line 487: IF FND_API.to_Boolean( p_init_msg_list ) THEN

483: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
484: END IF;
485:
486: -- Initialize message list if p_init_msg_list is set to TRUE.
487: IF FND_API.to_Boolean( p_init_msg_list ) THEN
488: FND_MSG_PUB.initialize;
489: END IF;
490:
491: -- Call to check for required fields

Line 502: x_return_status := FND_API.G_RET_STS_SUCCESS;

498: RAISE G_EXC_REQUIRED_FIELDS_NULL;
499: END IF;
500:
501: -- Initialize API return status to success
502: x_return_status := FND_API.G_RET_STS_SUCCESS;
503:
504: l_shift_date := trunc(p_start_date);
505:
506: while l_shift_date <= p_end_date loop

Line 732: x_return_status := fnd_api.g_ret_sts_error ;

728: end loop;
729: --
730: -- Update return status to Success if there is atleast one available time slot
731: if x_shift.count = 0 then
732: x_return_status := fnd_api.g_ret_sts_error ;
733: fnd_message.set_name('JTF','JTF_CAL_NO_SHIFT_CONSTR_FOUND');
734: --fnd_message.set_name('JTF','JTF_CAL_NO_SHIFTS_FOR_RESOURCE');
735: --fnd_message.set_token('P_RESOURCE_NAME', l_resource_name);
736: fnd_msg_pub.add;

Line 750: x_return_status := fnd_api.g_ret_sts_error ;

746: end if;
747:
748: EXCEPTION
749: when g_exc_required_fields_null then
750: x_return_status := fnd_api.g_ret_sts_error ;
751: fnd_message.set_name('JTF','JTF_CAL_REQUIRED_PARAMETERS');
752: fnd_message.set_token('P_PARAMETER', l_parameters);
753: fnd_msg_pub.add;
754: fnd_msg_pub.count_and_get ( p_count => x_msg_count

Line 757: when fnd_api.g_exc_unexpected_error then

753: fnd_msg_pub.add;
754: fnd_msg_pub.count_and_get ( p_count => x_msg_count
755: , p_data => x_msg_data );
756:
757: when fnd_api.g_exc_unexpected_error then
758: x_return_status := fnd_api.g_ret_sts_unexp_error;
759: fnd_msg_pub.count_and_get ( p_count => x_msg_count
760: , p_data => x_msg_data );
761:

Line 758: x_return_status := fnd_api.g_ret_sts_unexp_error;

754: fnd_msg_pub.count_and_get ( p_count => x_msg_count
755: , p_data => x_msg_data );
756:
757: when fnd_api.g_exc_unexpected_error then
758: x_return_status := fnd_api.g_ret_sts_unexp_error;
759: fnd_msg_pub.count_and_get ( p_count => x_msg_count
760: , p_data => x_msg_data );
761:
762: when others then

Line 763: x_return_status := fnd_api.g_ret_sts_unexp_error ;

759: fnd_msg_pub.count_and_get ( p_count => x_msg_count
760: , p_data => x_msg_data );
761:
762: when others then
763: x_return_status := fnd_api.g_ret_sts_unexp_error ;
764: fnd_message.set_name('JTF','JTF_CAL_UNEXPECTED_ERROR');
765: fnd_message.set_token('ERROR_CODE',sqlcode);
766: fnd_message.set_token('ERROR_MESSAGE',sqlerrm);
767: fnd_msg_pub.count_and_get ( p_count => x_msg_count

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

773: -- ****************** Get Available Time Slot **********************
774: --
775: PROCEDURE Get_Available_Slot
776: (p_api_version IN NUMBER ,
777: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
778: p_resource_id IN NUMBER ,
779: p_resource_type IN VARCHAR2 ,
780: p_start_date_time IN DATE ,
781: p_end_date_time IN DATE ,

Line 806: IF NOT FND_API.Compatible_API_Call (l_api_version ,

802: i number;
803:
804: BEGIN
805: -- Standard call to check for call compatibility.
806: IF NOT FND_API.Compatible_API_Call (l_api_version ,
807: p_api_version ,
808: l_api_name ,
809: G_PKG_NAME )
810: THEN

Line 811: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

807: p_api_version ,
808: l_api_name ,
809: G_PKG_NAME )
810: THEN
811: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
812: END IF;
813:
814: -- Initialize message list if p_init_msg_list is set to TRUE.
815: IF FND_API.to_Boolean( p_init_msg_list ) THEN

Line 815: IF FND_API.to_Boolean( p_init_msg_list ) THEN

811: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
812: END IF;
813:
814: -- Initialize message list if p_init_msg_list is set to TRUE.
815: IF FND_API.to_Boolean( p_init_msg_list ) THEN
816: FND_MSG_PUB.initialize;
817: END IF;
818:
819: -- Call to check for required fields

Line 831: x_return_status := FND_API.G_RET_STS_SUCCESS;

827: RAISE G_EXC_REQUIRED_FIELDS_NULL;
828: END IF;
829:
830: -- Initialize API return status to success
831: x_return_status := FND_API.G_RET_STS_SUCCESS;
832: --
833: JTF_CALENDAR_PUB_24hr.Get_Available_Slot
834: ( p_api_version => l_api_version ,
835: p_init_msg_list => p_init_msg_list,

Line 850: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

846: x_shift_construct_id => x_shift_construct_id,
847: x_availability_type => x_availability_type );
848:
849: EXCEPTION
850: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
851: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
852: FND_MSG_PUB.Count_And_Get
853: ( p_count => x_msg_count,
854: p_data => x_msg_data

Line 851: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

847: x_availability_type => x_availability_type );
848:
849: EXCEPTION
850: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
851: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
852: FND_MSG_PUB.Count_And_Get
853: ( p_count => x_msg_count,
854: p_data => x_msg_data
855: );

Line 857: x_return_status := FND_API.G_RET_STS_ERROR ;

853: ( p_count => x_msg_count,
854: p_data => x_msg_data
855: );
856: WHEN G_EXC_REQUIRED_FIELDS_NULL THEN
857: x_return_status := FND_API.G_RET_STS_ERROR ;
858: fnd_message.set_name('JTF','JTF_CAL_REQUIRED_PARAMETERS');
859: fnd_message.set_token('P_PARAMETER', l_parameters);
860: fnd_msg_pub.add;
861: FND_MSG_PUB.Count_And_Get

Line 866: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

862: (p_count => x_msg_count,
863: p_data => x_msg_data
864: );
865: WHEN OTHERS THEN
866: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
867: fnd_message.set_name('JTF','JTF_CAL_UNEXPECTED_ERROR');
868: fnd_message.set_token('ERROR_CODE',SQLCODE);
869: fnd_message.set_token('ERROR_MESSAGE', SQLERRM);
870: fnd_msg_pub.add;

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

969:
970: l_server_tz_id Number := to_number (fnd_profile.value_specific('SERVER_TIMEZONE_ID'));
971: l_res_Timezone_id Number;
972:
973: l_return_status varchar2(1) := FND_API.G_RET_STS_ERROR ;
974:
975: l_resource_name jtf_task_resources_vl.resource_name%TYPE;-- bug # 2418561
976:
977: BEGIN

Line 979: if not fnd_api.compatible_api_call

975: l_resource_name jtf_task_resources_vl.resource_name%TYPE;-- bug # 2418561
976:
977: BEGIN
978: -- standard call to check for call compatibility.
979: if not fnd_api.compatible_api_call
980: ( l_api_version
981: , p_api_version
982: , l_api_name
983: , JTF_CALENDAR_PUB.g_pkg_name )

Line 985: raise fnd_api.g_exc_unexpected_error;

981: , p_api_version
982: , l_api_name
983: , JTF_CALENDAR_PUB.g_pkg_name )
984: then
985: raise fnd_api.g_exc_unexpected_error;
986: end if;
987:
988: -- initialize message list if p_init_msg_list is set to true.
989: if fnd_api.to_boolean ( p_init_msg_list )

Line 989: if fnd_api.to_boolean ( p_init_msg_list )

985: raise fnd_api.g_exc_unexpected_error;
986: end if;
987:
988: -- initialize message list if p_init_msg_list is set to true.
989: if fnd_api.to_boolean ( p_init_msg_list )
990: then
991: fnd_msg_pub.initialize;
992: end if;
993:

Line 1006: x_return_status := fnd_api.g_ret_sts_success;

1002: raise g_exc_required_fields_null;
1003: end if;
1004:
1005: -- initialize api return status to success
1006: x_return_status := fnd_api.g_ret_sts_success;
1007:
1008: -- bug# 1344222
1009: -- Comment out by jawang on 06/17/2002
1010:

Line 1050: l_return_status := FND_API.G_RET_STS_SUCCESS;

1046: -- 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'));
1047: and l_shift_date between trunc(a.start_date_time) and nvl(trunc(a.end_date_time),l_shift_date);
1048:
1049: -- Added for bug 3270116
1050: l_return_status := FND_API.G_RET_STS_SUCCESS;
1051:
1052: -- if condition added for bug 3270116 by ABRAINA
1053: IF Validate_Cal_Date(l_calendar_id, l_shift_date)
1054: THEN

Line 1261: x_return_status := FND_API.G_RET_STS_ERROR ;

1257: end if;
1258: end loop;
1259: exception
1260: when no_data_found then
1261: x_return_status := FND_API.G_RET_STS_ERROR ;
1262: -- Added for bug 3270116
1263: l_return_status := FND_API.G_RET_STS_ERROR ;
1264: -- end
1265: fnd_message.set_name('JTF','JTF_CAL_NO_SHIFTS');

Line 1263: l_return_status := FND_API.G_RET_STS_ERROR ;

1259: exception
1260: when no_data_found then
1261: x_return_status := FND_API.G_RET_STS_ERROR ;
1262: -- Added for bug 3270116
1263: l_return_status := FND_API.G_RET_STS_ERROR ;
1264: -- end
1265: fnd_message.set_name('JTF','JTF_CAL_NO_SHIFTS');
1266: fnd_message.set_token('P_CAL_NAME', l_calendar_name);
1267: fnd_msg_pub.add;

Line 1276: x_return_status := FND_API.G_RET_STS_ERROR ;

1272: end; --2
1273: end if; -- valid cal end if
1274: exception
1275: when no_data_found then
1276: x_return_status := FND_API.G_RET_STS_ERROR ;
1277: -- No Need to set l_return_status to FND_API.G_RET_STS_ERROR
1278: -- as for this exception we want to handle it.
1279: -- For a resource, even if a single shift is returned for a search window
1280: -- it will return 'S'. This is as per requirement from Field service and Gantt guys.

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

1273: end if; -- valid cal end if
1274: exception
1275: when no_data_found then
1276: x_return_status := FND_API.G_RET_STS_ERROR ;
1277: -- No Need to set l_return_status to FND_API.G_RET_STS_ERROR
1278: -- as for this exception we want to handle it.
1279: -- For a resource, even if a single shift is returned for a search window
1280: -- it will return 'S'. This is as per requirement from Field service and Gantt guys.
1281: l_tbl.delete; -- to delete the record from TOR if no shift found

Line 1299: x_return_status := fnd_api.g_ret_sts_error ;

1295:
1296: -- see if shift constructs have been found
1297: if x_shift.count = 0
1298: then
1299: x_return_status := fnd_api.g_ret_sts_error ;
1300: -- Added for bug 3270116
1301: l_return_status := FND_API.G_RET_STS_ERROR ;
1302: -- end
1303: fnd_message.set_name('JTF','JTF_CAL_NO_SHIFT_CONSTR_FOUND');

Line 1301: l_return_status := FND_API.G_RET_STS_ERROR ;

1297: if x_shift.count = 0
1298: then
1299: x_return_status := fnd_api.g_ret_sts_error ;
1300: -- Added for bug 3270116
1301: l_return_status := FND_API.G_RET_STS_ERROR ;
1302: -- end
1303: fnd_message.set_name('JTF','JTF_CAL_NO_SHIFT_CONSTR_FOUND');
1304: fnd_msg_pub.add;
1305:

Line 1320: if l_return_status = FND_API.G_RET_STS_SUCCESS then

1316:
1317: -- Added for bug 3270116
1318: -- For a resource, even if a single shift is returned for any search window
1319: -- it will return 'S'. This is as per requirement from Field service and Gantt guys.
1320: if l_return_status = FND_API.G_RET_STS_SUCCESS then
1321: x_return_status := FND_API.G_RET_STS_SUCCESS;
1322: else
1323: x_return_status := FND_API.G_RET_STS_ERROR ;
1324: end if;

Line 1321: x_return_status := FND_API.G_RET_STS_SUCCESS;

1317: -- Added for bug 3270116
1318: -- For a resource, even if a single shift is returned for any search window
1319: -- it will return 'S'. This is as per requirement from Field service and Gantt guys.
1320: if l_return_status = FND_API.G_RET_STS_SUCCESS then
1321: x_return_status := FND_API.G_RET_STS_SUCCESS;
1322: else
1323: x_return_status := FND_API.G_RET_STS_ERROR ;
1324: end if;
1325: -- end

Line 1323: x_return_status := FND_API.G_RET_STS_ERROR ;

1319: -- it will return 'S'. This is as per requirement from Field service and Gantt guys.
1320: if l_return_status = FND_API.G_RET_STS_SUCCESS then
1321: x_return_status := FND_API.G_RET_STS_SUCCESS;
1322: else
1323: x_return_status := FND_API.G_RET_STS_ERROR ;
1324: end if;
1325: -- end
1326: EXCEPTION
1327: when g_exc_required_fields_null then

Line 1328: x_return_status := fnd_api.g_ret_sts_error ;

1324: end if;
1325: -- end
1326: EXCEPTION
1327: when g_exc_required_fields_null then
1328: x_return_status := fnd_api.g_ret_sts_error ;
1329: fnd_message.set_name('JTF','JTF_CAL_REQUIRED_PARAMETERS');
1330: fnd_message.set_token('P_PARAMETER', l_parameters);
1331: fnd_msg_pub.add;
1332: fnd_msg_pub.count_and_get ( p_count => x_msg_count

Line 1335: when fnd_api.g_exc_unexpected_error then

1331: fnd_msg_pub.add;
1332: fnd_msg_pub.count_and_get ( p_count => x_msg_count
1333: , p_data => x_msg_data );
1334:
1335: when fnd_api.g_exc_unexpected_error then
1336: x_return_status := fnd_api.g_ret_sts_unexp_error;
1337: fnd_msg_pub.count_and_get ( p_count => x_msg_count
1338: , p_data => x_msg_data );
1339: when others then

Line 1336: x_return_status := fnd_api.g_ret_sts_unexp_error;

1332: fnd_msg_pub.count_and_get ( p_count => x_msg_count
1333: , p_data => x_msg_data );
1334:
1335: when fnd_api.g_exc_unexpected_error then
1336: x_return_status := fnd_api.g_ret_sts_unexp_error;
1337: fnd_msg_pub.count_and_get ( p_count => x_msg_count
1338: , p_data => x_msg_data );
1339: when others then
1340: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 1340: x_return_status := fnd_api.g_ret_sts_unexp_error ;

1336: x_return_status := fnd_api.g_ret_sts_unexp_error;
1337: fnd_msg_pub.count_and_get ( p_count => x_msg_count
1338: , p_data => x_msg_data );
1339: when others then
1340: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1341: fnd_message.set_name('JTF','JTF_CAL_UNEXPECTED_ERROR');
1342: fnd_message.set_token('ERROR_CODE',sqlcode);
1343: fnd_message.set_token('ERROR_MESSAGE',sqlerrm);
1344: fnd_msg_pub.count_and_get ( p_count => x_msg_count

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

1482: l_st_time date;
1483: l_server_tz_id Number := to_number (fnd_profile.value_specific('SERVER_TIMEZONE_ID'));
1484: l_res_Timezone_id Number;
1485:
1486: l_return_status varchar2(1) := FND_API.G_RET_STS_ERROR ;
1487:
1488: l_resource_name jtf_task_resources_vl.resource_name%TYPE;-- bug # 2418561
1489:
1490: BEGIN

Line 1493: if not fnd_api.compatible_api_call

1489:
1490: BEGIN
1491:
1492: -- standard call to check for call compatibility.
1493: if not fnd_api.compatible_api_call
1494: ( l_api_version
1495: , p_api_version
1496: , l_api_name
1497: , JTF_CALENDAR_PUB.g_pkg_name )

Line 1499: raise fnd_api.g_exc_unexpected_error;

1495: , p_api_version
1496: , l_api_name
1497: , JTF_CALENDAR_PUB.g_pkg_name )
1498: then
1499: raise fnd_api.g_exc_unexpected_error;
1500: end if;
1501:
1502: -- initialize message list if p_init_msg_list is set to true.
1503: if fnd_api.to_boolean ( p_init_msg_list )

Line 1503: if fnd_api.to_boolean ( p_init_msg_list )

1499: raise fnd_api.g_exc_unexpected_error;
1500: end if;
1501:
1502: -- initialize message list if p_init_msg_list is set to true.
1503: if fnd_api.to_boolean ( p_init_msg_list )
1504: then
1505: fnd_msg_pub.initialize;
1506: end if;
1507:

Line 1520: x_return_status := fnd_api.g_ret_sts_success;

1516: raise g_exc_required_fields_null;
1517: end if;
1518:
1519: -- initialize api return status to success
1520: x_return_status := fnd_api.g_ret_sts_success;
1521:
1522: -- bug# 1344222
1523: -- Comment out by jawang on 06/17/2002
1524:

Line 1565: l_return_status := FND_API.G_RET_STS_SUCCESS;

1561: -- 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'));
1562: and l_shift_date between trunc(a.start_date_time) and nvl(trunc(a.end_date_time),l_shift_date);
1563:
1564: -- Added for bug 3270116
1565: l_return_status := FND_API.G_RET_STS_SUCCESS;
1566:
1567: --added l_shift_date in valid_cal loop bug #1355824
1568: -- if condition added for bug 3270116 by ABRAINA
1569: IF Validate_Cal_Date(l_calendar_id, l_shift_date)

Line 1922: x_return_status := FND_API.G_RET_STS_ERROR ;

1918: end if;
1919: end loop;
1920: exception
1921: when no_data_found then
1922: x_return_status := FND_API.G_RET_STS_ERROR ;
1923: -- Added for bug 3270116
1924: l_return_status := FND_API.G_RET_STS_ERROR ;
1925: -- end
1926: fnd_message.set_name('JTF','JTF_CAL_NO_SHIFTS');

Line 1924: l_return_status := FND_API.G_RET_STS_ERROR ;

1920: exception
1921: when no_data_found then
1922: x_return_status := FND_API.G_RET_STS_ERROR ;
1923: -- Added for bug 3270116
1924: l_return_status := FND_API.G_RET_STS_ERROR ;
1925: -- end
1926: fnd_message.set_name('JTF','JTF_CAL_NO_SHIFTS');
1927: fnd_message.set_token('P_CAL_NAME', l_calendar_name);
1928: fnd_msg_pub.add;

Line 1937: x_return_status := FND_API.G_RET_STS_ERROR ;

1933: end; --2
1934: end if; -- valid cal end if
1935: exception
1936: when no_data_found then
1937: x_return_status := FND_API.G_RET_STS_ERROR ;
1938: -- No Need to set l_return_status to FND_API.G_RET_STS_ERROR
1939: -- as for this exception we want to handle it.
1940: -- For a resource, even if a single shift is returned for a search window
1941: -- it will return 'S'. This is as per requirement from Field service and Gantt guys.

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

1934: end if; -- valid cal end if
1935: exception
1936: when no_data_found then
1937: x_return_status := FND_API.G_RET_STS_ERROR ;
1938: -- No Need to set l_return_status to FND_API.G_RET_STS_ERROR
1939: -- as for this exception we want to handle it.
1940: -- For a resource, even if a single shift is returned for a search window
1941: -- it will return 'S'. This is as per requirement from Field service and Gantt guys.
1942: l_tbl.delete; -- to delete the record from TOR if no shift found

Line 1961: x_return_status := fnd_api.g_ret_sts_error ;

1957:
1958: -- see if shift constructs have been found
1959: if x_shift.count = 0
1960: then
1961: x_return_status := fnd_api.g_ret_sts_error ;
1962: -- Added for bug 3270116
1963: l_return_status := FND_API.G_RET_STS_ERROR ;
1964: -- end
1965: fnd_message.set_name('JTF','JTF_CAL_NO_SHIFT_CONSTR_FOUND');

Line 1963: l_return_status := FND_API.G_RET_STS_ERROR ;

1959: if x_shift.count = 0
1960: then
1961: x_return_status := fnd_api.g_ret_sts_error ;
1962: -- Added for bug 3270116
1963: l_return_status := FND_API.G_RET_STS_ERROR ;
1964: -- end
1965: fnd_message.set_name('JTF','JTF_CAL_NO_SHIFT_CONSTR_FOUND');
1966: fnd_msg_pub.add;
1967:

Line 1982: if l_return_status = FND_API.G_RET_STS_SUCCESS then

1978:
1979: -- Added for bug 3270116
1980: -- For a resource, even if a single shift is returned for any search window
1981: -- it will return 'S'. This is as per requirement from Field service and Gantt guys.
1982: if l_return_status = FND_API.G_RET_STS_SUCCESS then
1983: x_return_status := FND_API.G_RET_STS_SUCCESS;
1984: else
1985: x_return_status := FND_API.G_RET_STS_ERROR ;
1986: end if;

Line 1983: x_return_status := FND_API.G_RET_STS_SUCCESS;

1979: -- Added for bug 3270116
1980: -- For a resource, even if a single shift is returned for any search window
1981: -- it will return 'S'. This is as per requirement from Field service and Gantt guys.
1982: if l_return_status = FND_API.G_RET_STS_SUCCESS then
1983: x_return_status := FND_API.G_RET_STS_SUCCESS;
1984: else
1985: x_return_status := FND_API.G_RET_STS_ERROR ;
1986: end if;
1987: -- end

Line 1985: x_return_status := FND_API.G_RET_STS_ERROR ;

1981: -- it will return 'S'. This is as per requirement from Field service and Gantt guys.
1982: if l_return_status = FND_API.G_RET_STS_SUCCESS then
1983: x_return_status := FND_API.G_RET_STS_SUCCESS;
1984: else
1985: x_return_status := FND_API.G_RET_STS_ERROR ;
1986: end if;
1987: -- end
1988:
1989: EXCEPTION

Line 1991: x_return_status := fnd_api.g_ret_sts_error ;

1987: -- end
1988:
1989: EXCEPTION
1990: when g_exc_required_fields_null then
1991: x_return_status := fnd_api.g_ret_sts_error ;
1992: fnd_message.set_name('JTF','JTF_CAL_REQUIRED_PARAMETERS');
1993: fnd_message.set_token('P_PARAMETER', l_parameters);
1994: fnd_msg_pub.add;
1995: fnd_msg_pub.count_and_get ( p_count => x_msg_count

Line 1998: when fnd_api.g_exc_unexpected_error then

1994: fnd_msg_pub.add;
1995: fnd_msg_pub.count_and_get ( p_count => x_msg_count
1996: , p_data => x_msg_data );
1997:
1998: when fnd_api.g_exc_unexpected_error then
1999: x_return_status := fnd_api.g_ret_sts_unexp_error;
2000: fnd_msg_pub.count_and_get ( p_count => x_msg_count
2001: , p_data => x_msg_data );
2002: when others then

Line 1999: x_return_status := fnd_api.g_ret_sts_unexp_error;

1995: fnd_msg_pub.count_and_get ( p_count => x_msg_count
1996: , p_data => x_msg_data );
1997:
1998: when fnd_api.g_exc_unexpected_error then
1999: x_return_status := fnd_api.g_ret_sts_unexp_error;
2000: fnd_msg_pub.count_and_get ( p_count => x_msg_count
2001: , p_data => x_msg_data );
2002: when others then
2003: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 2003: x_return_status := fnd_api.g_ret_sts_unexp_error ;

1999: x_return_status := fnd_api.g_ret_sts_unexp_error;
2000: fnd_msg_pub.count_and_get ( p_count => x_msg_count
2001: , p_data => x_msg_data );
2002: when others then
2003: x_return_status := fnd_api.g_ret_sts_unexp_error ;
2004: fnd_message.set_name('JTF','JTF_CAL_UNEXPECTED_ERROR');
2005: fnd_message.set_token('ERROR_CODE',sqlcode);
2006: fnd_message.set_token('ERROR_MESSAGE',sqlerrm);
2007: fnd_msg_pub.count_and_get ( p_count => x_msg_count

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

2013: -- ********** Get Resource Schedule **************
2014: --
2015: PROCEDURE Get_Res_Schedule
2016: ( p_api_version IN NUMBER ,
2017: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE ,
2018: p_resource_id IN NUMBER ,
2019: p_resource_type IN VARCHAR2 ,
2020: p_start_date IN DATE ,
2021: p_end_date IN DATE ,

Line 2168: IF NOT FND_API.Compatible_API_Call ( l_api_version ,

2164: l_resource_name jtf_task_resources_vl.resource_name%TYPE;-- bug # 2418561
2165:
2166: BEGIN
2167: -- Standard call to check for call compatibility.
2168: IF NOT FND_API.Compatible_API_Call ( l_api_version ,
2169: p_api_version ,
2170: l_api_name ,
2171: G_PKG_NAME )
2172: THEN

Line 2173: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

2169: p_api_version ,
2170: l_api_name ,
2171: G_PKG_NAME )
2172: THEN
2173: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2174: END IF;
2175: -- Initialize message list if p_init_msg_list is set to TRUE.
2176: IF FND_API.to_Boolean( p_init_msg_list ) THEN
2177: FND_MSG_PUB.initialize;

Line 2176: IF FND_API.to_Boolean( p_init_msg_list ) THEN

2172: THEN
2173: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2174: END IF;
2175: -- Initialize message list if p_init_msg_list is set to TRUE.
2176: IF FND_API.to_Boolean( p_init_msg_list ) THEN
2177: FND_MSG_PUB.initialize;
2178: END IF;
2179: -- Call to check for required fields
2180: IF not check_for_required_fields (p_resource_id =>p_resource_id,

Line 2189: x_return_status := FND_API.G_RET_STS_SUCCESS;

2185: l_parameters := 'p_resource_id, p_resource_type, p_start_date, p_end_date';
2186: RAISE G_EXC_REQUIRED_FIELDS_NULL;
2187: END IF;
2188: -- Initialize API return status to success
2189: x_return_status := FND_API.G_RET_STS_SUCCESS;
2190:
2191: -- This code is added to get resource name to be printed in error message.
2192: -- Added for Bug 4063687
2193: BEGIN

Line 2405: x_return_status := FND_API.G_RET_STS_ERROR ;

2401:
2402: END LOOP;
2403: exception
2404: when no_data_found then
2405: x_return_status := FND_API.G_RET_STS_ERROR ;
2406: fnd_message.set_name('JTF','JTF_CAL_NO_SHIFTS');
2407: fnd_message.set_token('P_CAL_NAME', l_calendar_name);
2408: fnd_msg_pub.add;
2409: FND_MSG_PUB.Count_And_Get

Line 2417: x_return_status := FND_API.G_RET_STS_ERROR ;

2413: end; --(2)
2414: end if; --(1)
2415: exception
2416: when no_data_found then
2417: x_return_status := FND_API.G_RET_STS_ERROR ;
2418: fnd_message.set_name('JTF','JTF_CAL_RES_NO_CAL');
2419: fnd_message.set_token('P_RES_NAME', l_resource_name);
2420: fnd_message.set_token('P_SHIFT_DATE', l_shift_date);
2421: fnd_msg_pub.add;

Line 2432: x_return_status := FND_API.G_RET_STS_SUCCESS;

2428: end loop;
2429: --
2430: -- Update return status to Success if there is atleast one available time slot
2431: IF x_shift.count > 0 and x_return_status = 'E' THEN
2432: x_return_status := FND_API.G_RET_STS_SUCCESS;
2433: END IF;
2434:
2435: -- Added sort by jawang on 06/27/2002
2436: if x_shift.count > 0

Line 2443: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

2439: sort_tab(x_shift);
2440: end if;
2441:
2442: EXCEPTION
2443: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2444: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
2445: FND_MSG_PUB.Count_And_Get
2446: ( p_count => x_msg_count,
2447: p_data => x_msg_data

Line 2444: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

2440: end if;
2441:
2442: EXCEPTION
2443: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2444: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
2445: FND_MSG_PUB.Count_And_Get
2446: ( p_count => x_msg_count,
2447: p_data => x_msg_data
2448: );

Line 2450: x_return_status := FND_API.G_RET_STS_ERROR ;

2446: ( p_count => x_msg_count,
2447: p_data => x_msg_data
2448: );
2449: WHEN G_EXC_REQUIRED_FIELDS_NULL THEN
2450: x_return_status := FND_API.G_RET_STS_ERROR ;
2451: fnd_message.set_name('JTF','JTF_CAL_REQUIRED_PARAMETERS');
2452: fnd_message.set_token('P_PARAMETER', l_parameters);
2453: fnd_msg_pub.add;
2454: FND_MSG_PUB.Count_And_Get

Line 2459: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

2455: (p_count => x_msg_count,
2456: p_data => x_msg_data
2457: );
2458: WHEN OTHERS THEN
2459: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
2460: fnd_message.set_name('JTF','JTF_CAL_UNEXPECTED_ERROR');
2461: fnd_message.set_token('ERROR_CODE',SQLCODE);
2462: fnd_message.set_token('ERROR_MESSAGE', SQLERRM);
2463: fnd_msg_pub.add;

Line 2473: return(fnd_api.g_false);

2469: END Get_Res_Schedule;
2470:
2471: function get_g_false return varchar2 is
2472: begin
2473: return(fnd_api.g_false);
2474: end get_g_false;
2475:
2476:
2477: function get_g_miss_num return number is

Line 2479: return(fnd_api.g_miss_num);

2475:
2476:
2477: function get_g_miss_num return number is
2478: begin
2479: return(fnd_api.g_miss_num);
2480: end get_g_miss_num;
2481:
2482: function get_g_miss_char return varchar2 is
2483: begin

Line 2484: return(fnd_api.g_miss_char);

2480: end get_g_miss_num;
2481:
2482: function get_g_miss_char return varchar2 is
2483: begin
2484: return(fnd_api.g_miss_char);
2485: end get_g_miss_char;
2486:
2487: function get_g_miss_date return date is
2488: begin

Line 2489: return(fnd_api.g_miss_date);

2485: end get_g_miss_char;
2486:
2487: function get_g_miss_date return date is
2488: begin
2489: return(fnd_api.g_miss_date);
2490: end get_g_miss_date;
2491:
2492: --
2493: -- Function ResourceDt_To_ServerDT Added for Simplex Timezone Enh # 3040681 by ABRAINA

Line 2516: IF NOT FND_API.Compatible_API_Call (l_api_version ,

2512:
2513: BEGIN
2514:
2515: -- Standard call to check for call compatibility.
2516: IF NOT FND_API.Compatible_API_Call (l_api_version ,
2517: p_api_version ,
2518: l_api_name ,
2519: G_PKG_NAME )
2520: THEN

Line 2521: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

2517: p_api_version ,
2518: l_api_name ,
2519: G_PKG_NAME )
2520: THEN
2521: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2522: END IF;
2523:
2524: -- Initialize message list if p_init_msg_list is set to TRUE.
2525: IF FND_API.to_Boolean( p_init_msg_list ) THEN

Line 2525: IF FND_API.to_Boolean( p_init_msg_list ) THEN

2521: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2522: END IF;
2523:
2524: -- Initialize message list if p_init_msg_list is set to TRUE.
2525: IF FND_API.to_Boolean( p_init_msg_list ) THEN
2526: FND_MSG_PUB.initialize;
2527: END IF;
2528:
2529: -- Initialize API return status to success

Line 2530: x_return_status := FND_API.G_RET_STS_SUCCESS;

2526: FND_MSG_PUB.initialize;
2527: END IF;
2528:
2529: -- Initialize API return status to success
2530: x_return_status := FND_API.G_RET_STS_SUCCESS;
2531:
2532: HZ_TIMEZONE_PUB.Get_Time( l_API_VERSION
2533: , l_INIT_MSG_LIST
2534: , P_Resource_TZ_Id

Line 2545: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

2541:
2542: Return x_Server_time;
2543:
2544: EXCEPTION
2545: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2546: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
2547: FND_MSG_PUB.Count_And_Get
2548: ( p_count => x_msg_count,
2549: p_data => x_msg_data

Line 2546: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

2542: Return x_Server_time;
2543:
2544: EXCEPTION
2545: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2546: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
2547: FND_MSG_PUB.Count_And_Get
2548: ( p_count => x_msg_count,
2549: p_data => x_msg_data
2550: );

Line 2552: x_return_status := FND_API.G_RET_STS_ERROR ;

2548: ( p_count => x_msg_count,
2549: p_data => x_msg_data
2550: );
2551: WHEN G_EXC_REQUIRED_FIELDS_NULL THEN
2552: x_return_status := FND_API.G_RET_STS_ERROR ;
2553: fnd_message.set_name('JTF','JTF_CAL_REQUIRED_PARAMETERS');
2554: fnd_message.set_token('P_PARAMETER', l_parameters);
2555: fnd_msg_pub.add;
2556: FND_MSG_PUB.Count_And_Get

Line 2561: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

2557: (p_count => x_msg_count,
2558: p_data => x_msg_data
2559: );
2560: WHEN OTHERS THEN
2561: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
2562: fnd_message.set_name('JTF','JTF_CAL_UNEXPECTED_ERROR');
2563: fnd_message.set_token('ERROR_CODE',SQLCODE);
2564: fnd_message.set_token('ERROR_MESSAGE', SQLERRM);
2565: fnd_msg_pub.add;