202:
203: -- From 11.5.9 load balancing is enabled for auto-assignment.
204: l_sr_rec.load_balance := 'Y' ;
205:
206: fnd_file.put_line(fnd_file.log,'Service Request no : ' || l_sr_number);
207:
208: CS_Assign_Resource_CON_PKG.Assign_ServiceRequest_Main
209: ( p_api_name => 'Assign_ServiceRequest_Main',
210: p_api_version => 1.0 ,
223: );
224: l_sr_count := l_sr_count + 1;
225: END LOOP ;
226: CLOSE cs_incident_id_csr ;
227: fnd_file.put_line(fnd_file.log,'+-------------------------------------------+' );
228: fnd_file.put_line(fnd_file.log,' No. of Service Requests Processed : ' || l_sr_count);
229: fnd_file.put_line(fnd_file.log,'+-------------------------------------------+' );
230:
231: END MAIN_PROCEDURE;
224: l_sr_count := l_sr_count + 1;
225: END LOOP ;
226: CLOSE cs_incident_id_csr ;
227: fnd_file.put_line(fnd_file.log,'+-------------------------------------------+' );
228: fnd_file.put_line(fnd_file.log,' No. of Service Requests Processed : ' || l_sr_count);
229: fnd_file.put_line(fnd_file.log,'+-------------------------------------------+' );
230:
231: END MAIN_PROCEDURE;
232:
225: END LOOP ;
226: CLOSE cs_incident_id_csr ;
227: fnd_file.put_line(fnd_file.log,'+-------------------------------------------+' );
228: fnd_file.put_line(fnd_file.log,' No. of Service Requests Processed : ' || l_sr_count);
229: fnd_file.put_line(fnd_file.log,'+-------------------------------------------+' );
230:
231: END MAIN_PROCEDURE;
232:
233: PROCEDURE Assign_ServiceRequest_Main
440: IF (l_owner_id IS NULL) THEN
441: FND_MESSAGE.Set_Name('CS', 'CS_API_NO_OWNER');
442: FND_MESSAGE.Set_Token('API_NAME',l_api_name_full);
443: l_msg := fnd_message.get ;
444: fnd_file.put_line(fnd_file.log,' ' || l_msg);
445: l_main_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
446: ELSE
447: l_update_own_flag := 'Y';
448: END IF;
454: FND_MSG_PUB.Initialize;
455: FND_MESSAGE.Set_Name('CS', 'CS_API_NO_OWNER');
456: FND_MESSAGE.Set_Token('API_NAME',l_api_name_full);
457: l_msg := fnd_message.get ;
458: fnd_file.put_line(fnd_file.log,' ' || l_msg);
459: l_main_return_status := FND_API.G_RET_STS_ERROR;
460: ELSE
461: FND_MESSAGE.Set_Name('CS', 'CS_API_NO_OWNER');
462: FND_MESSAGE.Set_Token('API_NAME',l_api_name_full);
460: ELSE
461: FND_MESSAGE.Set_Name('CS', 'CS_API_NO_OWNER');
462: FND_MESSAGE.Set_Token('API_NAME',l_api_name_full);
463: l_msg := fnd_message.get ;
464: fnd_file.put_line(fnd_file.log,' ' || l_msg);
465: l_main_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
466: END IF;
467: END IF;
468: END IF; /* group_type <> RS_TEAM */
469: ELSE /* l_group_id is not null */
470: -- Print all the error messages
471: FND_MESSAGE.Set_Name('CS', 'CS_API_NO_GROUP');
472: FND_MESSAGE.Set_Token('API_NAME', l_api_name_full);
473: fnd_file.put_line(fnd_file.log,' ' || l_msg);
474: l_main_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
475: END IF;
476: END IF; /* CS_SR_OWNER_AUTO_ASSIGN_LEVEL */
477: ELSE /* l_grp_return_status is not success */
482: FND_MSG_PUB.Initialize;
483: FND_MESSAGE.Set_Name('CS', 'CS_API_NO_OWNER');
484: FND_MESSAGE.Set_Token('API_NAME',l_api_name_full);
485: l_msg := fnd_message.get ;
486: fnd_file.put_line(fnd_file.log,' ' || l_msg);
487: l_main_return_status := FND_API.G_RET_STS_ERROR;
488: ELSE
489: FND_MESSAGE.Set_Name('CS', 'CS_API_NO_GROUP');
490: FND_MESSAGE.Set_Token('API_NAME', l_api_name_full);
488: ELSE
489: FND_MESSAGE.Set_Name('CS', 'CS_API_NO_GROUP');
490: FND_MESSAGE.Set_Token('API_NAME', l_api_name_full);
491: l_msg := fnd_message.get ;
492: fnd_file.put_line(fnd_file.log,' ' || l_msg);
493: l_main_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
494: END IF;
495: END IF; /* l_grp_return_status is not success */
496:
526: IF (l_owner_id IS NULL) THEN
527: FND_MESSAGE.Set_Name('CS', 'CS_API_NO_OWNER');
528: FND_MESSAGE.Set_Token('API_NAME',l_api_name_full);
529: l_msg := fnd_message.get ;
530: fnd_file.put_line(fnd_file.log,' ' || l_msg);
531: l_main_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
532: ELSE
533: l_update_own_flag := 'Y';
534: END IF;
537: FND_MSG_PUB.Initialize;
538: FND_MESSAGE.Set_Name('CS', 'CS_API_NO_OWNER');
539: FND_MESSAGE.Set_Token('API_NAME',l_api_name_full);
540: l_msg := fnd_message.get ;
541: fnd_file.put_line(fnd_file.log,' ' || l_msg);
542: l_main_return_status := FND_API.G_RET_STS_ERROR;
543: ELSE
544: FND_MESSAGE.Set_Name('CS', 'CS_API_NO_OWNER');
545: FND_MESSAGE.Set_Token('API_NAME',l_api_name_full);
543: ELSE
544: FND_MESSAGE.Set_Name('CS', 'CS_API_NO_OWNER');
545: FND_MESSAGE.Set_Token('API_NAME',l_api_name_full);
546: l_msg := fnd_message.get ;
547: fnd_file.put_line(fnd_file.log,' ' || l_msg);
548: l_main_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
549: END IF;
550: END IF;
551: END IF; /* CS_SR_OWNER_AUTO_ASSIGN_LEVEL */
615: x_owner_type := l_resource_type;
616: x_owner_group_id := l_group_id;
617: x_return_status := l_main_return_status;
618: END IF;
619: fnd_file.put_line(fnd_file.log,'Group : ' || l_group_id || ' Owner : ' || l_owner_id);
620: fnd_file.put_line(fnd_file.log,'+---------------------------------------------+');
621:
622: END Assign_Resources;
623:
616: x_owner_group_id := l_group_id;
617: x_return_status := l_main_return_status;
618: END IF;
619: fnd_file.put_line(fnd_file.log,'Group : ' || l_group_id || ' Owner : ' || l_owner_id);
620: fnd_file.put_line(fnd_file.log,'+---------------------------------------------+');
621:
622: END Assign_Resources;
623:
624: PROCEDURE Assign_Group
1315: IF (l_cal_load_return_sts <> FND_API.G_RET_STS_SUCCESS) THEN
1316: FND_MESSAGE.Set_Name('CS', 'CS_API_NO_OWNER');
1317: FND_MESSAGE.Set_Token('API_NAME',l_api_name_full);
1318: l_msg := fnd_message.get ;
1319: fnd_file.put_line(fnd_file.log,' ' || l_msg);
1320: x_return_status := FND_API.G_RET_STS_ERROR ;
1321: END IF;
1322: ELSE
1323: IF (l_resource_load_tbl.COUNT = 1) THEN
1668: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1669: FND_MESSAGE.Set_Name('CS', 'CS_TZ_API_ERR');
1670: FND_MESSAGE.Set_Token('API_NAME',l_api_name_full);
1671: l_msg := fnd_message.get ;
1672: fnd_file.put_line(fnd_file.log,' ' || l_msg);
1673: EXIT ;
1674: END IF;
1675:
1676: IF (x_return_status = FND_API.G_RET_STS_SUCCESS) THEN