119: and sysdate between paf.effective_start_date and paf.effective_end_date
120: order by paf.assignment_id asc;
121:
122: begin
123: --hr_utility.trace_on(null,'oracle');
124: hr_utility.set_location('Entering: ' || l_proc || ':'|| funcmode,5);
125:
126: if ( funcmode = 'RUN' ) then
127:
120: order by paf.assignment_id asc;
121:
122: begin
123: --hr_utility.trace_on(null,'oracle');
124: hr_utility.set_location('Entering: ' || l_proc || ':'|| funcmode,5);
125:
126: if ( funcmode = 'RUN' ) then
127:
128: lv_contact_source := fnd_profile.value('HR_PAYROLL_CONTACT_SOURCE');
126: if ( funcmode = 'RUN' ) then
127:
128: lv_contact_source := fnd_profile.value('HR_PAYROLL_CONTACT_SOURCE');
129:
130: hr_utility.trace('Profile Option value is : '|| lv_contact_source);
131:
132: ln_current_assignment_id := wf_engine.GetItemAttrNumber
133: (itemtype => itemtype
134: ,itemkey => itemkey
133: (itemtype => itemtype
134: ,itemkey => itemkey
135: ,aname => 'CURRENT_ASSIGNMENT_ID');
136:
137: hr_utility.trace('Assignment Id is : '|| to_char(ln_current_assignment_id));
138:
139: lv_curr_contact_user := wf_engine.GetItemAttrText
140: (itemtype => itemtype
141: ,itemkey => itemkey
172: ln_current_assignment_id;
173: close c_gre_contact;
174:
175: else
176: hr_utility.trace('If this prints then this is bad ');
177: result := 'ERROR:UNKNOWN_CONTACT_SOURCE';
178: return;
179: end if;
180:
177: result := 'ERROR:UNKNOWN_CONTACT_SOURCE';
178: return;
179: end if;
180:
181: hr_utility.trace('Contact is ' || to_char(ln_next_contact_person_id));
182: hr_utility.trace('Assignment is ' || to_char(ln_current_assignment_id));
183:
184: if ( ln_next_contact_person_id is null ) then
185: result := 'COMPLETE:F';
178: return;
179: end if;
180:
181: hr_utility.trace('Contact is ' || to_char(ln_next_contact_person_id));
182: hr_utility.trace('Assignment is ' || to_char(ln_current_assignment_id));
183:
184: if ( ln_next_contact_person_id is null ) then
185: result := 'COMPLETE:F';
186:
208: ,itemkey => itemkey
209: ,aname => 'CONTACT_USERNAME'
210: ,avalue => lv_next_contact_user);
211:
212: hr_utility.set_location('Leaving: ' || l_proc,100);
213: result := 'COMPLETE:T';
214:
215: end if;
216: