212: and type='OTA_LEARNING_PATH';*/
213:
214: begin
215:
216: hr_utility.set_location('Entering:'||l_proc, 5);
217: if p_obj_type='COURSE' then
218: OPEN course_eff_date;
219: FETCH course_eff_date INTO l_eff_date;
220: if course_eff_date%notfound then
223: CLOSE course_eff_date;
224: else
225: select trunc(sysdate) into l_eff_date from dual;
226: end if;
227: hr_utility.set_location('Leaving:'||l_proc, 5);
228: return l_eff_date;
229:
230: Exception
231:
303: ,p_item_key => p_item_key);
304:
305: END IF;
306:
307: hr_utility.set_location('Before chk transaction step'||l_proc, 5);
308:
309: if (hr_transaction_api.transaction_step_exist (p_item_type => p_item_type
310: ,p_item_key => p_item_key
311: ,p_activity_id => l_activity_id) and p_from is null ) then
329:
330: --
331: -- Create a transaction step
332: --
333: hr_utility.set_location('Me Entering Create transaction step'||l_proc, 5);
334:
335: if p_from ='SS' then
336: l_transaction_step_id := wf_engine.GetItemAttrNumber(itemtype => p_item_type
337: ,itemkey => p_item_key
361:
362:
363: end if;
364: --
365: hr_utility.set_location('out of Create transaction step'||l_proc, 5);
366: HR_UTILITY.TRACE ('tranasction step id: ' || to_char (l_transaction_step_id));
367: l_count := 1;
368: l_transaction_table(l_count).param_name := 'P_COMPETENCE';
369: l_transaction_table(l_count).param_value := p_competence_id;
362:
363: end if;
364: --
365: hr_utility.set_location('out of Create transaction step'||l_proc, 5);
366: HR_UTILITY.TRACE ('tranasction step id: ' || to_char (l_transaction_step_id));
367: l_count := 1;
368: l_transaction_table(l_count).param_name := 'P_COMPETENCE';
369: l_transaction_table(l_count).param_value := p_competence_id;
370: l_transaction_table(l_count).param_data_type := 'VARCHAR2';
441: p_item_key,
442: 'OTA_TRANSACTION_STEP_ID',
443: l_transaction_step_id);
444:
445: hr_utility.set_location('Before save transaction step'||l_proc, 5);
446: hr_transaction_ss.save_transaction_step
447: (p_item_type => p_item_type
448: ,p_item_key => p_item_key
449: ,p_actid => l_activity_id
452: ,p_api_name => g_package || '.PROCESS_API'
453: ,p_function_id => 0 ---not used
454: ,p_transaction_data => l_transaction_table);
455:
456: hr_utility.set_location('After save transaction step'||l_proc, 50);
457:
458: if p_from ='SS' then
459: hr_transaction_api.update_transaction
460: (p_transaction_id => l_transaction_id
464: );
465: end if;
466:
467: EXCEPTION
468: /* WHEN hr_utility.hr_error THEN
469: -- -------------------------------------------
470: -- an application error has been raised so we must
471: -- redisplay the web form to display the error
472: -- --------------------------------------------
509: l_error_text varchar2(2000);
510: l_result varchar2(25);
511:
512: begin
513: hr_utility.set_location('ENTERING Update Competence', 10);
514:
515: hr_multi_message.disable_message_list;
516:
517: IF (funcmode='RUN') THEN
551: When others then
552:
553: rollback to commit_transaction;
554: --
555: hr_utility.set_location('ERROR Update Competence', 10);
556:
557: l_error_text := hr_utility.get_message;
558: if l_error_text is null then
559: l_error_text := fnd_message.get;
553: rollback to commit_transaction;
554: --
555: hr_utility.set_location('ERROR Update Competence', 10);
556:
557: l_error_text := hr_utility.get_message;
558: if l_error_text is null then
559: l_error_text := fnd_message.get;
560: end if;
561: -- 1903606
570: (itemtype => itemtype
571: ,itemkey => itemkey
572: ,aname => 'ERROR_MESSAGE_TEXT'
573: ,avalue => nvl(l_error_text, sqlerrm));
574: hr_utility.trace('l_error_text' || nvl(l_error_text, sqlerrm));
575: -- update the transaction table status
576: hr_transaction_api.update_transaction(
577: p_transaction_id => hr_transaction_ss.get_transaction_id
578: (p_item_type => itemtype
601: l_error_text varchar2(2000);
602: l_result varchar2(25);
603:
604: begin
605: hr_utility.set_location('ENTERING check Update Competence', 10);
606: hr_multi_message.disable_message_list;
607: IF (funcmode='RUN') THEN
608: -- savepoint commit_transaction;
609:
616: process_api(true,l_transaction_step_id);
617: l_result := wf_engine.GetItemAttrText(itemtype => itemtype
618: ,itemkey => itemkey
619: ,aname => 'HR_FLOW_NAME_ATTR');
620: hr_utility.trace('l_result chk_proceed' || l_result);
621: if l_result = 'PROCEED' then
622: resultout := 'COMPLETE:Y' ;
623: else
624: resultout := 'COMPLETE:N';
641: When others then
642:
643: -- rollback to commit_transaction;
644: --
645: hr_utility.set_location('ERROR Update Competence', 10);
646:
647: l_error_text := hr_utility.get_message;
648: if l_error_text is null then
649: l_error_text := fnd_message.get;
643: -- rollback to commit_transaction;
644: --
645: hr_utility.set_location('ERROR Update Competence', 10);
646:
647: l_error_text := hr_utility.get_message;
648: if l_error_text is null then
649: l_error_text := fnd_message.get;
650: end if;
651: -- 1903606
660: (itemtype => itemtype
661: ,itemkey => itemkey
662: ,aname => 'ERROR_MESSAGE_TEXT'
663: ,avalue => nvl(l_error_text, sqlerrm));
664: hr_utility.trace('l_error_text' || nvl(l_error_text, sqlerrm));
665: -- update the transaction table status
666: hr_transaction_api.update_transaction(
667: p_transaction_id => hr_transaction_ss.get_transaction_id
668: (p_item_type => itemtype
733: AND paf.primary_flag ='Y'
734: AND paf.assignment_type in ('E','A', 'C');
735:
736: BEGIN
737: hr_utility.set_location('ENTERING get_approval_req', 10);
738: IF (funcmode='RUN') THEN
739:
740: l_cert_id := wf_engine.getItemAttrNumber(itemtype => itemtype
741: ,itemkey => itemkey
787: if l_item_value is null then
788:
789: OPEN getActAttrValue;
790: FETCH getActAttrValue INTO l_item_value;
791: hr_utility.trace('l_item_value' || l_item_value);
792: close getActAttrValue;
793:
794: end if;
795: -- if getActAttrValue%FOUND then
820: resultout:='COMPLETE';
821:
822:
823: end if;
824: hr_utility.trace('l_resultout' || resultout);
825: l_ntf_url := generate_url(l_item_value);
826: WF_ENGINE.setitemattrtext(itemtype, itemkey, 'APPROVAL_GENERIC_URL', l_ntf_url);
827: WF_ENGINE.setitemattrtext(itemtype, itemkey, 'HR_REVIEW_TEMPLATE_RN_ATTR', 'OTA_LIST_COMP_NTF');
828: /* END IF; -- cursor
836: END IF;
837: Exception
838:
839: when others then
840: hr_utility.set_location('ENTERING exception get_approval_req', 10);
841:
842:
843:
844: end get_approval_req;
1035: get_value(inString =>l_comp_ids,
1036: startPos =>l_comp_startPos,
1037: endPos => l_comp_endPos,
1038: retValue => l_comp_retValue);
1039: hr_utility.trace ('l_comp_retValue ' ||l_comp_retValue);
1040:
1041: l_comp_startPos := l_comp_endPos+1;
1042:
1043: get_value(inString =>l_level_ids,
1071: get_value(inString =>l_dtFrom,
1072: startPos =>l_dtFrom_startPos,
1073: endPos => l_dtFrom_endPos,
1074: retValue => l_dtFrom_retValue);
1075: hr_utility.trace ('l_dtFrom_retValue ' ||l_dtFrom_retValue);
1076: l_dtFrom_startPos := l_dtFrom_endPos+1;
1077:
1078: if l_dtFrom_retValue ='-1' then
1079:
1090: get_value(inString =>l_dtTo,
1091: startPos =>l_dtTo_startPos,
1092: endPos => l_dtTo_endPos,
1093: retValue => l_dtTo_retValue);
1094: hr_utility.trace ('l_dtTo_retValue ' ||l_dtTo_retValue);
1095: l_dtTo_startPos := l_dtTo_endPos+1;
1096:
1097: if l_dtTo_retValue ='-1' then
1098:
1177: CLOSE Comp_level;
1178:
1179: --if ((l_level_value_to_use is not null and l_old_level_id <= l_level_value_to_use) or l_old_level_id is null) then
1180:
1181: hr_utility.set_location('BEFORE call to competence element api', 100);
1182:
1183: hr_competence_element_api.maintain_student_comp_element
1184: (p_person_id => l_person_id
1185: ,p_competence_id => l_comp_retValue
1194: ,p_comments => l_comments_retValue
1195: ,p_effective_date => trunc(sysdate)
1196: -- ,p_validate => p_validate
1197: ,p_competence_created => l_competence_created);
1198: hr_utility.set_location('After call to competence element api', 100);
1199: hr_utility.trace ('l_competence_created ' ||l_competence_created);
1200:
1201:
1202:
1195: ,p_effective_date => trunc(sysdate)
1196: -- ,p_validate => p_validate
1197: ,p_competence_created => l_competence_created);
1198: hr_utility.set_location('After call to competence element api', 100);
1199: hr_utility.trace ('l_competence_created ' ||l_competence_created);
1200:
1201:
1202:
1203: if l_competence_created <> 0 and (l_attr_chk) then
1226: WF_ENGINE.setitemattrtext(l_item_type, l_item_key, 'HR_FLOW_NAME_ATTR', 'STOP');
1227: else
1228: WF_ENGINE.setitemattrtext(l_item_type, l_item_key, 'HR_FLOW_NAME_ATTR', 'PROCEED');
1229: end if;
1230: hr_utility.set_location('Leaving'||l_proc, 5);
1231:
1232: EXCEPTION
1233: WHEN OTHERS THEN
1234: hr_utility.set_location('Leaving with error:'||l_proc, 25);
1230: hr_utility.set_location('Leaving'||l_proc, 5);
1231:
1232: EXCEPTION
1233: WHEN OTHERS THEN
1234: hr_utility.set_location('Leaving with error:'||l_proc, 25);
1235: rollback to validate_competence;
1236: -- In case of Approvla required Error notification shud go to approving manager
1237: -- In case of auto competence update error notification shud go to learner
1238: l_fwd_to_username:= nvl(wf_engine.getitemattrtext
1253: );
1254: */
1255: -- change date message to a more meaningful one.
1256: l_msg_name:= sqlerrm;
1257: hr_utility.trace('l_msg_name' || sqlerrm);
1258: if instr(l_msg_name,'_51647_')>0 then
1259: hr_utility.set_location('MESSAGE CHANGED', 10);
1260: fnd_message.set_name('OTA', 'OTA_443335_COMP_UPD_FAIL');
1261: --fnd_message.raise_error;
1255: -- change date message to a more meaningful one.
1256: l_msg_name:= sqlerrm;
1257: hr_utility.trace('l_msg_name' || sqlerrm);
1258: if instr(l_msg_name,'_51647_')>0 then
1259: hr_utility.set_location('MESSAGE CHANGED', 10);
1260: fnd_message.set_name('OTA', 'OTA_443335_COMP_UPD_FAIL');
1261: --fnd_message.raise_error;
1262: end if;
1263: RAISE;
1338: get_value(inString =>l_comp_ids,
1339: startPos =>l_comp_startPos,
1340: endPos => l_comp_endPos,
1341: retValue => l_comp_retValue);
1342: hr_utility.trace ('l_comp_retValue ' ||l_comp_retValue);
1343:
1344: l_comp_startPos := l_comp_endPos+1;
1345:
1346: get_value(inString =>l_level_ids,
1554: l_business_group_id per_all_people_f.business_group_id%type;
1555:
1556:
1557: BEGIN
1558: hr_utility.set_location('Entering:'||l_proc, 5);
1559:
1560: OPEN chk_person_business_grp;
1561: FETCH chk_person_business_grp INTO l_business_group_id;
1562: if chk_person_business_grp%found then
1574: ,p_eff_date_to => l_eff_date_to);
1575:
1576: --Retrieve comp. info for each of the LP's to be stored in tt table ,
1577: --create separate worklfow process for each LP.
1578: hr_utility.trace ('l_LP_idsssss ' ||l_LP_ids);
1579:
1580: -- code required for object type to be set in notifications
1581: if p_learningpath_ids is not null then
1582: l_LP_lookup_meaning := ota_utility.get_lookup_meaning(p_lookup_type => 'OTA_CATALOG_OBJECT_TYPE',
1598: get_value(inString =>l_LP_ids,
1599: startPos =>l_LP_startPos,
1600: endPos => l_LP_endPos,
1601: retValue => l_LP_retValue);
1602: hr_utility.trace ('l_LP_retValue ' ||l_LP_retValue);
1603:
1604: l_LP_startPos := l_LP_endPos+1;
1605:
1606: --Retrieve comp. info for the course first , to be stored in tt table
1610: , p_level_ids =>l_level_ids
1611: ,p_eff_date_from => l_eff_date_from);
1612:
1613: end if;
1614: hr_utility.trace ('l_comp_idssssssssss ' ||l_comp_ids);
1615: --l_current_user_Id := 12725;
1616: */
1617: --Start transaction and workflow only when competencies are attached
1618: /*if l_comp_ids is not null then
1667: FETCH certification_name INTO l_course_name;
1668: CLOSE certification_name;
1669: end if;
1670:
1671: hr_utility.set_location('Entering:'||l_proc, 10);
1672: -- Get the next item key from the sequence
1673: select hr_workflow_item_key_s.nextval
1674: into l_item_key
1675: from sys.dual;
1677:
1678: WF_ENGINE.CREATEPROCESS(l_item_type, l_item_key, l_process);
1679:
1680: if p_Learningpath_ids is not null then
1681: hr_utility.set_location('before OTA_OBJECT_TYPE'||l_proc, 140);
1682: WF_ENGINE.setitemattrtext(l_item_type,
1683: l_item_key,
1684: 'REVIEW_OBJECT',
1685: l_LP_lookup_meaning);
1682: WF_ENGINE.setitemattrtext(l_item_type,
1683: l_item_key,
1684: 'REVIEW_OBJECT',
1685: l_LP_lookup_meaning);
1686: hr_utility.set_location('after OTA_OBJECT_TYPE'||l_proc, 240);
1687: elsif p_eventid is not null then
1688: hr_utility.set_location('before OTA_OBJECT_TYPE 2'||l_proc, 340);
1689: WF_ENGINE.setitemattrtext(l_item_type,
1690: l_item_key,
1684: 'REVIEW_OBJECT',
1685: l_LP_lookup_meaning);
1686: hr_utility.set_location('after OTA_OBJECT_TYPE'||l_proc, 240);
1687: elsif p_eventid is not null then
1688: hr_utility.set_location('before OTA_OBJECT_TYPE 2'||l_proc, 340);
1689: WF_ENGINE.setitemattrtext(l_item_type,
1690: l_item_key,
1691: 'REVIEW_OBJECT',
1692: l_CRS_lookup_meaning);
1689: WF_ENGINE.setitemattrtext(l_item_type,
1690: l_item_key,
1691: 'REVIEW_OBJECT',
1692: l_CRS_lookup_meaning);
1693: hr_utility.set_location('after OTA_OBJECT_TYPE 2'||l_proc, 440);
1694: else
1695: WF_ENGINE.setitemattrtext(l_item_type,
1696: l_item_key,
1697: 'REVIEW_OBJECT',
1711: --WF_ENGINE.setitemattrtext(p_itemtype, l_item_key,'P_EFFECTIVE_DATE',trunc(sysdate));
1712: WF_ENGINE.setitemattrDate(p_itemtype, l_item_key,'CURRENT_EFFECTIVE_DATE',trunc(sysdate));
1713: -- Get and set owner role
1714:
1715: hr_utility.set_location('Before Getting Owner'||l_proc, 10);
1716:
1717: WF_DIRECTORY.GetRoleName(p_orig_system =>'PER',
1718: p_orig_system_id => l_creator_person_id,
1719: p_name =>l_role_name,
1724: itemtype => l_item_type,
1725: itemkey =>l_item_key,
1726: owner =>l_role_name);
1727:
1728: hr_utility.set_location('After Setting Owner'||l_proc, 10);
1729:
1730: --modified for bug 7308160
1731:
1732: /*l_person_details := ota_learner_enroll_ss.Get_Person_To_Enroll_Details(p_person_id => p_person_id);
1753: l_person_full_name);
1754: END IF;
1755:
1756:
1757: HR_UTILITY.TRACE ('item key: ' || l_item_key);
1758:
1759:
1760:
1761:
1769: p_date_from =>l_eff_date_from,
1770: p_date_to => l_eff_date_to);
1771:
1772:
1773: hr_utility.set_location('before supervisor'||l_proc, 30);
1774: WF_ENGINE.setitemattrtext(l_item_type, l_item_key, 'HR_CUSTOM_RETURN_FOR_CORR','Y');
1775:
1776: --always set to Y
1777: WF_ENGINE.setitemattrtext(l_item_type, l_item_key, 'HR_RUNTIME_APPROVAL_REQ_FLAG', 'YES');
1774: WF_ENGINE.setitemattrtext(l_item_type, l_item_key, 'HR_CUSTOM_RETURN_FOR_CORR','Y');
1775:
1776: --always set to Y
1777: WF_ENGINE.setitemattrtext(l_item_type, l_item_key, 'HR_RUNTIME_APPROVAL_REQ_FLAG', 'YES');
1778: hr_utility.set_location('before supervisor'||l_proc, 40);
1779: WF_ENGINE.setitemattrtext(l_item_type, l_item_key, 'P_ASSIGNMENT_ID', l_assignment);
1780: hr_utility.set_location('before supervisor'||l_proc, 50);
1781: WF_ENGINE.setitemattrNumber(l_item_type, l_item_key, 'CURRENT_ASSIGNMENT_ID', to_number(l_assignment));
1782:
1776: --always set to Y
1777: WF_ENGINE.setitemattrtext(l_item_type, l_item_key, 'HR_RUNTIME_APPROVAL_REQ_FLAG', 'YES');
1778: hr_utility.set_location('before supervisor'||l_proc, 40);
1779: WF_ENGINE.setitemattrtext(l_item_type, l_item_key, 'P_ASSIGNMENT_ID', l_assignment);
1780: hr_utility.set_location('before supervisor'||l_proc, 50);
1781: WF_ENGINE.setitemattrNumber(l_item_type, l_item_key, 'CURRENT_ASSIGNMENT_ID', to_number(l_assignment));
1782:
1783: if p_eventId is not null then
1784: WF_ENGINE.setitemattrText(l_item_type, l_item_key, 'OTA_EVENT_TITLE', l_event_name);
1790: WF_ENGINE.setitemattrtext(l_item_type, l_item_key, 'HR_AME_TRAN_TYPE_ATTR','OTA');
1791: WF_ENGINE.setitemattrNumber(l_item_type, l_item_key, 'HR_AME_APP_ID_ATTR', 810);
1792: --WF_ENGINE.setitemattrtext(l_item_type, l_item_key, 'TRAN_SUBMIT','Y');
1793: --WF_ENGINE.SetItemattrtext(p_itemtype,p_item_key, 'EVENT_OWNER',l_user_name);
1794: hr_utility.set_location('before supervisor'||l_proc, 20);
1795:
1796: FOR a IN csr_supervisor_id LOOP
1797: l_supervisor_id := a.supervisor_id;
1798: l_supervisor_full_name := a.full_name;
1802: FOR b IN csr_supervisor_user LOOP
1803: l_supervisor_username := b.user_name;
1804: END LOOP;
1805:
1806: hr_utility.set_location('after supervisor cursor'||l_proc, 20);
1807:
1808: wf_engine.setitemattrtext
1809: (l_item_type,
1810: l_item_key,
1809: (l_item_type,
1810: l_item_key,
1811: 'SUPERVISOR_USERNAME',
1812: l_supervisor_username);
1813: hr_utility.set_location('after supervisor username'||l_proc, 20);
1814:
1815: wf_engine.setitemattrtext
1816: (l_item_type,
1817: l_item_key,
1816: (l_item_type,
1817: l_item_key,
1818: 'SUPERVISOR_DISPLAY_NAME',
1819: l_supervisor_full_name);
1820: hr_utility.set_location('after supervisor disp name'||l_proc, 20);
1821: wf_engine.setitemattrtext
1822: (l_item_type,
1823: l_item_key,
1824: 'SUPERVISOR_ID',
1822: (l_item_type,
1823: l_item_key,
1824: 'SUPERVISOR_ID',
1825: l_supervisor_id);
1826: hr_utility.set_location('before start process'||l_proc, 20);
1827: if p_learningpath_ids is not null then
1828:
1829: /*hr_approval_wf.create_item_attrib_if_notexist
1830: (p_item_type => l_item_type
1859:
1860: p_itemkey:=l_item_key;
1861:
1862:
1863: hr_utility.set_location('leaving:'||l_proc, 20);
1864: EXCEPTION
1865: WHEN OTHERS THEN
1866: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1867: -- Raise;
1884: l_amp varchar2(2) := '&';
1885: l_func varchar2(80);
1886:
1887: begin
1888: hr_utility.set_location('Entering'||l_proc, 5);
1889:
1890: --l_jsp_apps_agent := fnd_profile.value('APPS_FRAMEWORK_AGENT');
1891: --HR_UTILITY.TRACE ('Agent :: ' || l_jsp_apps_agent);
1892: if p_func='APPROVAL' then
1887: begin
1888: hr_utility.set_location('Entering'||l_proc, 5);
1889:
1890: --l_jsp_apps_agent := fnd_profile.value('APPS_FRAMEWORK_AGENT');
1891: --HR_UTILITY.TRACE ('Agent :: ' || l_jsp_apps_agent);
1892: if p_func='APPROVAL' then
1893: l_func:='OTA_ADMIN_COMPETENCE_UPDATE';
1894: else
1895: l_func:='OTA_ADMIN_COMPETENCE_VIEW';
1897: end if;
1898:
1899: l_url := 'JSP:' || '/OA_HTML/OA.jsp?OAFunc=' || l_func || l_amp || 'NtfId=-NID-' || l_amp || 'retainAM=Y';
1900:
1901: HR_UTILITY.TRACE ('URL :: ' || l_url);
1902:
1903: return l_url;
1904:
1905: hr_utility.set_location('Leaving'||l_proc, 5);
1901: HR_UTILITY.TRACE ('URL :: ' || l_url);
1902:
1903: return l_url;
1904:
1905: hr_utility.set_location('Leaving'||l_proc, 5);
1906: end generate_url;
1907:
1908: -- ---------------------------------------------------------------------------
1909: -- |----------------------< COMP_RETREIVE >--------------------------|
1963:
1964:
1965: BEGIN
1966:
1967: hr_utility.set_location('Entering:'||l_proc, 5);
1968: IF p_learning_path_ids = '' or p_learning_path_ids is null THEN
1969: l_learning_path_ids := NULL;
1970: ELSE
1971: l_learning_path_ids:= p_learning_path_ids;
1970: ELSE
1971: l_learning_path_ids:= p_learning_path_ids;
1972: END IF;
1973: IF p_event_id IS not NULL THEN
1974: hr_utility.set_location('l_:'||l_proc, 10);
1975: FOR crs_comp_rec IN csr_get_crs_comps LOOP
1976: IF p_comp_ids IS NULL OR p_comp_ids = '' THEN
1977: p_comp_ids := crs_comp_rec.CompetenceId;
1978: p_level_ids := crs_comp_rec.LevelId;
1985: END LOOP;
1986: END IF;
1987:
1988: IF l_learning_path_ids IS NOT NULL THEN
1989: hr_utility.set_location('Entering:'||l_proc, 15);
1990: /* LOOP
1991: l_rightpos := INSTR(p_learning_path_ids,'^',1,l_count);
1992: IF l_rightpos = 0 THEN
1993: l_learning_path_id := to_number(SUBSTR(l_learning_path_ids,l_leftpos,length(p_learning_path_ids) - l_leftpos +1));
1997: l_leftpos := l_rightpos + 1;
1998: l_count := l_count +1; */
1999:
2000: l_learning_path_id := to_number(l_learning_path_ids);
2001: hr_utility.trace ('l_learning_path_id ' ||l_learning_path_id);
2002: FOR lps_comp_rec IN csr_get_lp_comps LOOP
2003: hr_utility.set_location('Entering:'||l_proc, 20);
2004: IF p_comp_ids IS NULL OR p_comp_ids = '' THEN
2005: hr_utility.set_location('Entering:'||l_proc, 25);
1999:
2000: l_learning_path_id := to_number(l_learning_path_ids);
2001: hr_utility.trace ('l_learning_path_id ' ||l_learning_path_id);
2002: FOR lps_comp_rec IN csr_get_lp_comps LOOP
2003: hr_utility.set_location('Entering:'||l_proc, 20);
2004: IF p_comp_ids IS NULL OR p_comp_ids = '' THEN
2005: hr_utility.set_location('Entering:'||l_proc, 25);
2006: p_comp_ids := lps_comp_rec.CompetenceId;
2007: p_level_ids := lps_comp_rec.LevelId;
2001: hr_utility.trace ('l_learning_path_id ' ||l_learning_path_id);
2002: FOR lps_comp_rec IN csr_get_lp_comps LOOP
2003: hr_utility.set_location('Entering:'||l_proc, 20);
2004: IF p_comp_ids IS NULL OR p_comp_ids = '' THEN
2005: hr_utility.set_location('Entering:'||l_proc, 25);
2006: p_comp_ids := lps_comp_rec.CompetenceId;
2007: p_level_ids := lps_comp_rec.LevelId;
2008: hr_utility.set_location('Entering:'||l_proc, 35);
2009: l_eff_date_from := to_char(get_competence_eff_date(p_comp_id=> lps_comp_rec.CompetenceId,p_id=>l_learning_path_id,p_obj_type=>'LP'),g_date_format) ;
2004: IF p_comp_ids IS NULL OR p_comp_ids = '' THEN
2005: hr_utility.set_location('Entering:'||l_proc, 25);
2006: p_comp_ids := lps_comp_rec.CompetenceId;
2007: p_level_ids := lps_comp_rec.LevelId;
2008: hr_utility.set_location('Entering:'||l_proc, 35);
2009: l_eff_date_from := to_char(get_competence_eff_date(p_comp_id=> lps_comp_rec.CompetenceId,p_id=>l_learning_path_id,p_obj_type=>'LP'),g_date_format) ;
2010: hr_utility.set_location('Entering:'||l_proc, 45);
2011:
2012: ELSE
2006: p_comp_ids := lps_comp_rec.CompetenceId;
2007: p_level_ids := lps_comp_rec.LevelId;
2008: hr_utility.set_location('Entering:'||l_proc, 35);
2009: l_eff_date_from := to_char(get_competence_eff_date(p_comp_id=> lps_comp_rec.CompetenceId,p_id=>l_learning_path_id,p_obj_type=>'LP'),g_date_format) ;
2010: hr_utility.set_location('Entering:'||l_proc, 45);
2011:
2012: ELSE
2013: p_comp_ids := p_comp_ids || '^' || lps_comp_rec.CompetenceId;
2014: p_level_ids := p_level_ids || '^' || lps_comp_rec.LevelId;
2050: END IF;
2051: p_eff_date_from :=l_eff_date_from;
2052: p_eff_date_to := l_eff_date_to;
2053:
2054: hr_utility.set_location('Leaving:'||l_proc, 5);
2055:
2056: Exception
2057:
2058: when others then