Académique Documents
Professionnel Documents
Culture Documents
select TO_CHAR(SYSDATE,'DDMMYYYYHHMMSS')
into l_time
from DUAL ;
l_role_name := l_role_name || l_time ;
l_role_display_name := l_role_display_name || l_time ;
*/
IF funcmode = 'RUN'
THEN
l_trainingreq_no :=
wf_engine.getitemattrnumber (itemtype => itemtype,
itemkey => itemkey,
aname => 'TRAINING_REQ_NUMBER');
l_max_count :=
wf_engine.getitemattrnumber (itemtype => itemtype,
itemkey => itemkey,
aname => 'XXAPPROVALCOUNT');
l_current_value :=
wf_engine.getitemattrnumber (itemtype => itemtype,
itemkey => itemkey,
aname => 'XXCURAPPR_VAL');
l_supervisor_id :=
wf_engine.getitemattrnumber (itemtype => itemtype,
itemkey => itemkey,
aname => 'SUPERVISOR_ID');
l_employee_number :=
wf_engine.GetItemAttrText (itemtype => itemtype,
itemkey => itemkey,
aname => 'EMPLOYEE_NUMBER');
xxpo_ppc_utils.create_log (
'XXOLA:ITEMKEY 1:' || itemkey,
'Supplier ID: '
|| l_supervisor_id
|| ' Current Val: '
|| l_current_value
|| ' MAX COUNT: '
|| l_max_count
|| ' TRE REQ. NO: '
|| l_trainingreq_no
);
FOR l_rec
IN (SELECT fu.user_name
FROM fnd_user fu,
per_all_people_f papf,
per_all_assignments_f paaf,
per_business_groups pbg
WHERE TRUNC (SYSDATE) BETWEEN NVL (fu.start_date,
TRUNC (SYSDATE))
AND NVL (fu.end_date,
TRUNC (SYSDATE))
AND fu.employee_id = papf.person_id
AND papf.current_employee_flag = 'Y'
AND TRUNC (SYSDATE) BETWEEN papf.effective_start_date
AND papf.effective_end_date
AND papf.person_id = paaf.person_id
AND papf.business_group_id = paaf.business_group_id
AND pbg.business_group_id = papf.business_group_id
AND pbg.business_group_id = 81
AND TRUNC (SYSDATE) BETWEEN paaf.effective_start_date
AND paaf.effective_end_date
AND papf.employee_number IN
(SELECT flv.meaning
FROM fnd_lookup_values flv,
fnd_lookup_types_tl fltt
WHERE flv.description IN
('Payroll Administrator',
'Procurement Section Head',
'Relations and Awareness Section
Head')
AND TRUNC (SYSDATE) BETWEEN NVL (
flv.start_date_active,
TRUNC(SYSDATE)
)
AND NVL (
flv.end_date_active,
TRUNC(SYSDATE)
)
AND flv.lookup_type =
fltt.lookup_type
AND fltt.lookup_type =
'XXSSDC_HRSSA_APPROVERS'
AND fltt.LANGUAGE = flv.LANGUAGE
AND fltt.LANGUAGE =
USERENV ('LANG')))
LOOP
lcount := lcount + 1;
xxpo_ppc_utils.create_log (
'XXOLA:ITEMKEY 3:' || itemkey,
'Supplier ID: '
|| l_supervisor_id
|| ' Current Val: '
|| l_current_value
|| ' MAX COUNT: '
|| l_max_count
|| ' TRE REQ. NO: '
|| l_trainingreq_no
);
IF lcount = 1
THEN
l_users := l_rec.user_name;
ELSE
l_users := l_users || ' ' || l_rec.user_name;
END IF;
------- Added Employee also for FYI
END LOOP;
IF lc_ticket_status =
'Pending Approval for after training approval request'
THEN
UPDATE XXOLA_ENROLLMENT_HDR
SET TICKET_STATUS = 'Closed',
APPROVAL_STATUS = 'Approved'
WHERE TRAINING_REQ_NUMBER = l_trainingreq_no;
ELSE
UPDATE XXOLA_ENROLLMENT_HDR
SET TICKET_STATUS = 'Approved',
APPROVAL_STATUS = 'Approved'
WHERE TRAINING_REQ_NUMBER = l_trainingreq_no;
END IF;
END IF;