[Home] [Help]
PACKAGE BODY: APPS.HXT_PA_USER_EXITS
Source
1 PACKAGE BODY HXT_PA_USER_EXITS AS
2 /* $Header: hxtpainf.pkb 120.3 2006/10/13 08:58:45 nissharm noship $ */
3 g_debug boolean := hr_utility.debug_enabled;
4
5
6 /*******************************************************************************
7 FUNCTION p_a_interface()
8
9 The p_a_interface() logic will insert pay data to the PA_Transaction_Interface
10 table.Details to be inserted will be passed in as parameters to a function
11 called p_a_interface.Because the interface to Project Accounting will vary on
12 different installations,the p_a_interface logic will be stored in the
13 HXT_USER_EXITS package.HXT_USER_EXITS is designed to contain unique code,
14 specific to a customers needs.
15
16 Following is a list of parameters to the p_a_interface function and the source
17 of each argument:
18
19 i_hours_worked -- HXT_det_hours_worked_x.hours
20 i_rate -- per_pay_proposals.proposed_salary
21 (employees hourly rate)
22 or
23 hxt_det_hours_worked_x.hourly_rate
24 (timecard override hourly rate)
25 or
26 per_pay_proposals.proposed_salary *
27 (employees hourly rate)
28 hxt_det_hours_worked_x.rate_multiple
29 (manually entered multiple from timecard)
30 or
31 per_pay_proposals.proposed_salary *
32 (employees hourly rate)
33 hxt_pay_element_types_f_ddf_v.hxt_premium_amount
34 (multiple from pay element flex)
35 or
36 hxt_pay_element_types_f_ddf_v.hxt_premium_amount/
37 (daily amount from element flex)
38 hxt_det_hours_worked_x.hours
39 (hours worked)
40 or
41 per_pay_proposals.proposed_salary *
42 (employees hourly rate)
43 hxt_pay_element_types_f_ddf_v.hxt_premium_amount - 1.0
44 (non-ot premium multiple from pay element flex minus 1.0)
45 i_premium_amount -- hxt_pay_element_types_f_ddf_v.hxt_premium_amount
46 (premium amount element flex)
47 or
48 hxt_det_hours_worked_x.amount (timecard override amount)
49 i_trans_source -- hxt_pay_element_types_f_ddf_v.hxt_earning_category
50 ||hxt_pay_element_types_f_ddf_v.hxt_premium_type
51 i_period_end -- per_time_periods.end_date
52 i_employee_number-- per_people_f.employee_number
53
54 --SIR162i_employment_cat -- fnd_common_lookups.meaning(lookup_type = 'EMP_CAT')
55 --SIR162i_emp_cat_code -- per_assignments_f.employment_category
56
57 i_oganization_name -- hr_organization_units.name
58 i_organization_id -- hr_organization_units.id
59 i_date_worked -- hxt_det_hours_worked_x.date_worked
60 i_effective_start_date -- hxt_det_hours_worked_x.effective_start_date
61 i_effective_end_date -- hxt_det_hours_worked_x.effective_end_date
62 i_hours_type -- hxt_det_hours_worked_x.element_name
63 i_salary_basis -- per_pay_proposals_v.pay_basis
64 i_time_detail_id -- hxt_det_hours_worked_x.id
65 i_hxt_earning_category -- hxt_pay_element_types_f_ddf_v.hxt_earning_category
66 i_retro_transaction -- TRUE if Retro Transaction
67 -- FALSE if Normal Transaction
68 i_standard_rate -- per_pay_proposals.proposed_salary
69 -- (employees unmodified base hourly rate)
70 i_project_id -- hxt_det_hours_worked_x.project_id
71 i_task_id -- hxt_det_hours_worked_x.task_id
72 i_segment1 -- pa_projects.segment1
73 i_task_number -- pa_tasks.task_number
74 i_project_name -- pa_projects.name
75 i_task_name -- pa_tasks.task_name
76 i_assignment_id -- per_assignments_f.assignment_id
77 i_cost_allocation_keyflex_id -- pay_cost_allocation_keyflex.cost_allocation_keyflex_id
78 i_job_definition_id -- per_job_definitions.job_definition_id
79
80 *******************************************************************************/
81
82 FUNCTION p_a_interface( i_hours_worked IN NUMBER
83 ,i_rate IN NUMBER
84 ,i_premium_amount IN NUMBER
85 ,i_trans_source IN VARCHAR2
86 ,i_period_end IN DATE
87 ,i_employee_number IN VARCHAR2
88 ,i_employment_cat IN VARCHAR2
89 ,i_element_type_id IN NUMBER --SIR162
90 --SIR162 ,i_emp_cat_code IN VARCHAR2
91 ,i_organization_name IN VARCHAR2
92 ,i_organization_id IN NUMBER
93 ,i_date_worked IN DATE
94 ,i_effective_start_date IN DATE
95 ,i_effective_end_date IN DATE
96 ,i_hours_type IN VARCHAR2
97 ,i_salary_basis IN VARCHAR2
98 ,i_time_detail_id IN NUMBER
99 ,i_hxt_earning_category IN VARCHAR2
100 ,i_retro_transaction IN BOOLEAN
101 ,i_standard_rate IN NUMBER
102 ,i_project_id IN NUMBER
103 ,i_task_id IN NUMBER
104 ,i_segment1 IN VARCHAR2
105 ,i_task_number IN VARCHAR2
106 ,i_project_name IN VARCHAR2
107 ,i_task_name IN VARCHAR2
108 ,i_assignment_id IN NUMBER
109 ,i_cost_allocation_keyflex_id IN NUMBER
110 ,i_job_definition_id IN NUMBER
111 ,o_location OUT NOCOPY VARCHAR2
112 ,o_error_text OUT NOCOPY VARCHAR2
113 ,o_system_text OUT NOCOPY VARCHAR2)
114 RETURN NUMBER IS
115
116 -- Define local variables for each coloumn to ease customizations
117
118 l_trans_source pa_transaction_interface.transaction_source%TYPE DEFAULT NULL;
119 l_batch_name pa_transaction_interface.batch_name%TYPE DEFAULT NULL;
120 l_employee_number pa_transaction_interface.employee_number%TYPE DEFAULT NULL;
121 l_project_number pa_transaction_interface.project_number%TYPE DEFAULT NULL;
122 l_task_number pa_transaction_interface.task_number%TYPE DEFAULT NULL;
123 l_quantity pa_transaction_interface.quantity%TYPE DEFAULT NULL;
124 l_raw_cost pa_transaction_interface.raw_cost%TYPE DEFAULT NULL;
125 l_expenditure_id pa_transaction_interface.expenditure_id%TYPE DEFAULT NULL;
126 l_attribute1 pa_transaction_interface.attribute1%TYPE DEFAULT NULL;
127 l_attribute2 pa_transaction_interface.attribute2%TYPE DEFAULT NULL;
128 l_attribute3 pa_transaction_interface.attribute3%TYPE DEFAULT NULL;
129 l_attribute4 pa_transaction_interface.attribute4%TYPE DEFAULT NULL;
130 l_attribute5 pa_transaction_interface.attribute5%TYPE DEFAULT NULL;
131 l_attribute6 pa_transaction_interface.attribute6%TYPE DEFAULT NULL;
132 l_attribute7 pa_transaction_interface.attribute7%TYPE DEFAULT NULL;
133 l_attribute8 pa_transaction_interface.attribute8%TYPE DEFAULT NULL;
134 l_attribute9 pa_transaction_interface.attribute9%TYPE DEFAULT NULL;
135 l_attribute10 pa_transaction_interface.attribute10%TYPE DEFAULT NULL;
136 l_raw_cost_rate pa_transaction_interface.raw_cost_rate%TYPE DEFAULT NULL;
137 l_interface_id pa_transaction_interface.interface_id%TYPE DEFAULT NULL;
138 l_org_id pa_transaction_interface.org_id%TYPE DEFAULT NULL;
139 l_gl_date pa_transaction_interface.gl_date%TYPE DEFAULT NULL;
140
141 l_sub_loc VARCHAR2(10);
142 l_organization_name VARCHAR2(240) DEFAULT NULL;
143 l_expenditure_type pa_transaction_interface.expenditure_type%TYPE DEFAULT NULL;
144
145 l_non_labor_resource_org_name VARCHAR2(240) DEFAULT NULL;
146 l_non_labor_resource pa_transaction_interface.non_labor_resource%TYPE DEFAULT NULL;
147
148 l_cdl_system_reference1 pa_transaction_interface.cdl_system_reference1%TYPE DEFAULT NULL;
149 l_cdl_system_reference2 pa_transaction_interface.cdl_system_reference2%TYPE DEFAULT NULL;
150 l_cdl_system_reference3 pa_transaction_interface.cdl_system_reference3%TYPE DEFAULT NULL;
151 l_expenditure_comment pa_transaction_interface.expenditure_comment%TYPE DEFAULT NULL;
152 l_expenditure_ending_date pa_transaction_interface.expenditure_ending_date%TYPE DEFAULT NULL;
153 l_expenditure_item_date pa_transaction_interface.expenditure_item_date%TYPE DEFAULT NULL;
154 l_transaction_status_code pa_transaction_interface.transaction_status_code%TYPE DEFAULT NULL;
155 l_attribute_category pa_transaction_interface.attribute_category%TYPE DEFAULT NULL;
156 l_expenditure_item_id pa_transaction_interface.expenditure_item_id%TYPE DEFAULT NULL;
157 l_dr_code_combination_id pa_transaction_interface.dr_code_combination_id%TYPE DEFAULT NULL;
158 l_cr_code_combination_id pa_transaction_interface.cr_code_combination_id%TYPE DEFAULT NULL;
159
160 l_transaction_rejection_code pa_transaction_interface.transaction_rejection_code%TYPE DEFAULT NULL;
161 l_orig_transaction_reference pa_transaction_interface.orig_transaction_reference%TYPE DEFAULT NULL;
162 l_unmatched_negative_txn_flag pa_transaction_interface.unmatched_negative_txn_flag%TYPE DEFAULT NULL;
163
164 l_operating_unit_id NUMBER(15);
165 l_resource_id NUMBER;
166
167 -- BEGIN SIR162
168
169 -- BEGIN GLOBAL
170 -- CURSOR exp_type IS
171 -- SELECT eltv.hxt_expenditure_type
172 -- FROM hxt_pay_element_types_f_ddf_v eltv
173 -- ,pay_element_types_f elt
174 -- where elt.element_type_id = i_element_type_id
175 -- and eltv.row_id = elt.rowid;
176
177 CURSOR exp_type IS
178 SELECT eltv.hxt_expenditure_type
179 FROM hxt_pay_element_types_f_ddf_v eltv
180 WHERE eltv.element_type_id = i_element_type_id
181 AND i_date_worked BETWEEN eltv.effective_start_date
182 AND eltv.effective_end_date;
183 -- END GLOBAL
184
185 exp_type_nf EXCEPTION;
186
187 -- END SIR162
188
189 -- Begin Bug 2177304
190 CURSOR c_denom_currency_code IS
191 SELECT hoi.org_information10
192 FROM hr_organization_information hoi
193 WHERE hoi.org_information_context = 'Business Group Information'
194 AND hoi.organization_id = i_organization_id;
195
196 l_denom_currency_code hr_organization_information.org_information10%TYPE;
197 -- End Bug 2177304
198
199 BEGIN
200 g_debug :=hr_utility.debug_enabled;
201
202 -- For bug: 5559930
203 BEGIN
204 SELECT for_person_id
205 INTO l_resource_id
206 FROM hxt_timecards_x tim
207 WHERE tim.id = (SELECT det.tim_id
208 FROM hxt_det_hours_worked_x det
209 WHERE det.id = i_time_detail_id
210 );
211 EXCEPTION
212 WHEN OTHERS THEN
213 hr_utility.set_location('Exception in HXT_PA_USER_EXITS.P_A_INTERFACE', 5);
214 END;
215
216 -- ONLY CALL THIS FOR RELEASE 12
217
218 l_operating_unit_id := hxc_timecard_properties.setup_mo_global_params(l_resource_id);
219
220 l_sub_loc := 'Step 0';
221
222 if g_debug then
223 hr_utility.set_location('HXT_PA_USER_EXITS.p_a_interface',10);
224 end if;
225
226 --begin SIR94
227 IF i_retro_transaction = TRUE THEN
228 if g_debug then
229 hr_utility.set_location('HXT_PA_USER_EXITS.p_a_interface',20);
230 end if;
231 l_batch_name := 'ADJUSTMENT'; -- no more than 10 characters!
232 ELSE
233 if g_debug then
234 hr_utility.set_location('HXT_PA_USER_EXITS.p_a_interface',30);
235 end if;
236 l_batch_name := 'INITIAL'; -- no more than 10 characters!
237 END IF;
238
239 -- HXT111 l_trans_source := 'TIMECARD';
240 l_trans_source := 'Time Management'; --HXT111
241 --end SIR94
242
243 l_sub_loc := 'Step 1';
244
245 -- SIR151 l_expenditure_ending_date := i_period_end;
246 if g_debug then
247 hr_utility.set_location('HXT_PA_USER_EXITS.p_a_interface',40);
248 end if;
249 l_expenditure_ending_date := pa_misc.get_week_ending_date(i_date_worked);
250 -- SIR151
251 if g_debug then
252 hr_utility.set_location('HXT_PA_USER_EXITS.p_a_interface',50);
253 hr_utility.trace('l_expenditure_ending_date :'||l_expenditure_ending_date);
254 end if;
255 l_employee_number := i_employee_number;
256 l_organization_name := i_organization_name;
257 l_expenditure_item_date := i_date_worked;
258
259 if g_debug then
260 hr_utility.set_location('HXT_PA_USER_EXITS.p_a_interface',50);
261 hr_utility.trace('l_employee_number :'||l_employee_number);
262 hr_utility.trace('l_organization_name :'||l_organization_name);
263 hr_utility.trace('l_expenditure_item_date:'||l_expenditure_item_date);
264 end if;
265
266 l_sub_loc := 'Step 2';
267
268 if g_debug then
269 hr_utility.set_location('HXT_PA_USER_EXITS.p_a_interface',60);
270 end if;
271 l_project_number := i_segment1; -- SIR80
272 l_task_number := i_task_number; -- SIR80
273 if g_debug then
274 hr_utility.trace('l_project_number :'||l_project_number);
275 hr_utility.trace('l_task_number :'||l_task_number);
276 end if;
277
278 OPEN c_denom_currency_code;
279 FETCH c_denom_currency_code into l_denom_currency_code;
280
281 if g_debug then
282 hr_utility.set_location('HXT_PA_USER_EXITS.p_a_interface',70);
283 hr_utility.trace('l_denom_currency_code :'||l_denom_currency_code);
284 end if;
285
286 CLOSE c_denom_currency_code;
287
288 -- SIR162 l_expenditure_type := i_employment_cat;
289 -- begin SIR162
290 OPEN exp_type;
291 if g_debug then
292 hr_utility.set_location('HXT_PA_USER_EXITS.p_a_interface',80);
293 end if;
294 FETCH exp_type INTO l_expenditure_type;
295 if g_debug then
296 hr_utility.trace('l_expenditure_type :'||l_expenditure_type);
297 end if;
298 IF exp_type%NOTFOUND OR l_expenditure_type IS NULL THEN
299 if g_debug then
300 hr_utility.set_location('HXT_PA_USER_EXITS.p_a_interface',90);
301 end if;
302 raise exp_type_nf;
303 END IF;
304 -- end SIR162
305
306 if g_debug then
307 hr_utility.set_location('HXT_PA_USER_EXITS.p_a_interface',100);
308 end if;
309 l_transaction_status_code := 'P';
310
311 l_sub_loc := 'Step 3';
312 -- HXT111 l_expenditure_id := i_cost_allocation_keyflex_id;
313 -- begin SIR77
314 l_orig_transaction_reference := fnd_date.date_to_chardate(i_effective_start_date)|| fnd_date.date_to_chardate(i_effective_end_date)|| to_char(i_time_detail_id);-- FORMS60
315 -- end SIR77
316
317 if g_debug then
318 hr_utility.trace('l_orig_transaction_reference :'
319 ||l_orig_transaction_reference);
320 end if;
321 l_sub_loc := 'Step 4';
322 -- SIR151 l_org_id := i_organization_id;
323
324 l_sub_loc := 'Step 5';
325
326 IF (nvl(fnd_profile.value('HXT_TO_PA_INCLUDE_PREM_HRS'),'Y') = 'Y') THEN
327 -- no change in the existing functionality.
328
329 -- Process flat premium amounts separately
330 IF i_premium_amount IS NOT NULL THEN
331 if g_debug then
332 hr_utility.set_location('HXT_PA_USER_EXITS.p_a_interface',110);
333 end if;
334 l_sub_loc := 'Step 6a';
335 l_quantity := 1;
336 l_raw_cost := i_premium_amount;
337 l_raw_cost_rate := NULL;
338 l_sub_loc := 'Step 6b';
339 -- Process all others as rate x hours
340 -- All rates have already been
341 -- properly adjusted if necessary
342 ELSE
343 if g_debug then
344 hr_utility.set_location('HXT_PA_USER_EXITS.p_a_interface',115);
345 end if;
346 l_sub_loc := 'Step 6c';
347 l_quantity := i_hours_worked;
348 l_raw_cost := i_hours_worked * i_rate;
349 l_raw_cost_rate := i_rate;
350 l_sub_loc := 'Step 6d';
351 END IF;
352
353 ELSIF fnd_profile.value('HXT_TO_PA_INCLUDE_PREM_HRS') = 'N' THEN
354
355 -- Process flat premium amounts separately
356 IF i_premium_amount IS NOT NULL THEN
357 if g_debug then
358 hr_utility.set_location('HXT_PA_USER_EXITS.p_a_interface',120);
359 end if;
360 l_sub_loc := 'Step 7a';
361 l_quantity := 0 ; --1;
362 l_raw_cost := i_premium_amount;
363 l_raw_cost_rate := NULL;
364 l_sub_loc := 'Step 7b';
365 -- Process all others as rate x hours
366 -- All rates have already been
367 -- properly adjusted if necessary
368 ELSE
369 if g_debug then
370 hr_utility.set_location('HXT_PA_USER_EXITS.p_a_interface',125);
371 hr_utility.trace('i_hxt_earning_category:'||i_hxt_earning_category);
372 end if;
373 l_sub_loc := 'Step 7c';
374
375 IF i_hxt_earning_category in ('OSP','OTH','SDF') THEN
376 if g_debug then
377 hr_utility.set_location('HXT_PA_USER_EXITS.p_a_interface',126);
378 end if;
379 l_quantity := 0; --i_hours_worked;
380 ELSE
381 if g_debug then
382 hr_utility.set_location('HXT_PA_USER_EXITS.p_a_interface',127);
383 end if;
384 l_quantity := i_hours_worked;
385 END IF;
386
387 l_raw_cost := i_hours_worked * i_rate;
388 l_raw_cost_rate := i_rate;
389
390 l_sub_loc := 'Step 7d';
391 END IF;
392
393 END IF; -- endif fnd_profile.value('HXT_TO_PA_INCLUDE_PREM_HRS')
394
395 l_sub_loc := 'Step 8';
396 l_unmatched_negative_txn_flag := 'Y'; --SIR94
397 l_sub_loc := 'Step 9';
398
399 if g_debug then
400 hr_utility.set_location('HXT_PA_USER_EXITS.p_a_interface',130);
401 end if;
402 --Insert Project Accounting entry to the PA Interface Table
403 if g_debug then
404 hr_utility.trace('l_trans_source :'||l_trans_source);
405 hr_utility.trace('l_batch_name :'||l_batch_name);
406 hr_utility.trace('l_expenditure_ending_date :'||l_expenditure_ending_date);
407 hr_utility.trace('i_period_end :'||i_period_end);
408 hr_utility.trace('l_employee_number :'||l_employee_number);
409 hr_utility.trace('l_organization_name :'||l_organization_name);
410 hr_utility.trace('l_expenditure_item_date :'||l_expenditure_item_date);
411 hr_utility.trace('l_project_number :'||l_project_number);
412 hr_utility.trace('l_task_number :'||l_task_number);
413 hr_utility.trace('l_expenditure_type :'||l_expenditure_type);
414 hr_utility.trace('l_non_labor_resource :'||l_non_labor_resource);
415 hr_utility.trace('l_non_labor_resource_org_name :'
416 ||l_non_labor_resource_org_name);
417 hr_utility.trace('l_quantity :'||l_quantity);
418 hr_utility.trace('l_raw_cost :'||l_raw_cost);
419 hr_utility.trace('l_expenditure_comment :'||l_expenditure_comment);
420 hr_utility.trace('l_transaction_status_code :'
421 ||l_transaction_status_code);
422 hr_utility.trace('l_transaction_rejection_code :'
423 ||l_transaction_rejection_code);
424 hr_utility.trace('l_expenditure_id :'||l_expenditure_id);
425 hr_utility.trace('l_orig_transaction_reference :'
426 ||l_orig_transaction_reference);
427 hr_utility.trace('l_attribute_category :'||l_attribute_category);
428 hr_utility.trace('l_attribute1 :'||l_attribute1);
429 hr_utility.trace('l_attribute2 :'||l_attribute2);
430 hr_utility.trace('l_attribute3 :'||l_attribute3);
431 hr_utility.trace('l_attribute4 :'||l_attribute4);
432 hr_utility.trace('l_attribute5 :'||l_attribute5);
433 hr_utility.trace('l_attribute6 :'||l_attribute6);
434 hr_utility.trace('l_attribute7 :'||l_attribute7);
435 hr_utility.trace('l_attribute8 :'||l_attribute8);
436 hr_utility.trace('l_attribute9 :'||l_attribute9);
437 hr_utility.trace('l_attribute10 :'||l_attribute10);
438 hr_utility.trace('l_raw_cost_rate :'||l_raw_cost_rate);
439 hr_utility.trace('l_denom_currency_code :'||l_denom_currency_code);
440 hr_utility.trace('l_raw_cost :'||l_raw_cost);
441 hr_utility.trace('l_interface_id :'||l_interface_id);
442 hr_utility.trace('l_unmatched_negative_txn_flag :'
443 ||l_unmatched_negative_txn_flag);
444 hr_utility.trace('l_org_id :'||l_org_id);
445 hr_utility.trace('l_dr_code_combination_id :'||l_dr_code_combination_id);
446 hr_utility.trace('l_cr_code_combination_id :'||l_cr_code_combination_id);
447 hr_utility.trace('l_cdl_system_reference1 :'||l_cdl_system_reference1);
448 hr_utility.trace('l_cdl_system_reference2 :'||l_cdl_system_reference2);
449 hr_utility.trace('l_cdl_system_reference3 :'||l_cdl_system_reference3);
450 hr_utility.trace('l_gl_date :'||l_gl_date);
451 end if;
452 INSERT INTO pa_transaction_interface_all
453 ( TRANSACTION_SOURCE
454 ,BATCH_NAME
455 ,EXPENDITURE_ENDING_DATE
456 ,EMPLOYEE_NUMBER
457 ,ORGANIZATION_NAME
458 ,EXPENDITURE_ITEM_DATE
459 ,PROJECT_NUMBER
460 ,TASK_NUMBER
461 ,EXPENDITURE_TYPE
462 ,NON_LABOR_RESOURCE
463 ,NON_LABOR_RESOURCE_ORG_NAME
464 ,QUANTITY
465 ,RAW_COST
466 ,EXPENDITURE_COMMENT
467 ,TRANSACTION_STATUS_CODE
468 ,TRANSACTION_REJECTION_CODE
469 ,EXPENDITURE_ID
470 ,ORIG_TRANSACTION_REFERENCE
471 ,ATTRIBUTE_CATEGORY
472 ,ATTRIBUTE1
473 ,ATTRIBUTE2
474 ,ATTRIBUTE3
475 ,ATTRIBUTE4
476 ,ATTRIBUTE5
477 ,ATTRIBUTE6
478 ,ATTRIBUTE7
479 ,ATTRIBUTE8
480 ,ATTRIBUTE9
481 ,ATTRIBUTE10
482 ,RAW_COST_RATE
483 ,DENOM_CURRENCY_CODE
484 ,DENOM_RAW_COST
485 ,INTERFACE_ID
486 ,UNMATCHED_NEGATIVE_TXN_FLAG
487 ,EXPENDITURE_ITEM_ID
488 ,ORG_ID
489 ,DR_CODE_COMBINATION_ID
490 ,CR_CODE_COMBINATION_ID
491 ,CDL_SYSTEM_REFERENCE1
492 ,CDL_SYSTEM_REFERENCE2
493 ,CDL_SYSTEM_REFERENCE3
494 ,GL_DATE)
495 VALUES( l_trans_source
496 ,l_batch_name
497 -- need the NVL on the following line where
498 -- pa_misc.get_week_ending_date() might return NULL.
499 -- This would happen in Columbia,or anywhere else that ExpEndDates
500 -- not set up in ProjAccting.However,i_period_end will be WRONG for
501 -- any Payroll Type other than Weekly.SIR151
502 ,nvl(l_expenditure_ending_date,i_period_end) --SIR151
503 ,l_employee_number
504 ,l_organization_name
505 ,l_expenditure_item_date
506 ,l_project_number
507 ,l_task_number
508 ,l_expenditure_type
509 ,l_non_labor_resource
510 ,l_non_labor_resource_org_name
511 ,l_quantity
512 ,l_raw_cost
513 ,l_expenditure_comment
514 ,l_transaction_status_code
515 ,l_transaction_rejection_code
516 ,l_expenditure_id
517 ,l_orig_transaction_reference
518 ,l_attribute_category
519 ,l_attribute1
520 ,l_attribute2
521 ,l_attribute3
522 ,l_attribute4
523 ,l_attribute5
524 ,l_attribute6
525 ,l_attribute7
526 ,l_attribute8
527 ,l_attribute9
528 ,l_attribute10
529 ,l_raw_cost_rate
530 --Bug2177304 ,'USD'
531 ,l_denom_currency_code
532 ,l_raw_cost
533 ,l_interface_id
534 ,l_unmatched_negative_txn_flag
535 ,l_expenditure_item_id
536 --Bug:5559930,ORG_ID
537 ,l_operating_unit_id
538 ,l_dr_code_combination_id
539 ,l_cr_code_combination_id
540 ,l_cdl_system_reference1
541 ,l_cdl_system_reference2
542 ,l_cdl_system_reference3
543 ,l_gl_date);
544
545 if g_debug then
546 hr_utility.set_location('HXT_PA_USER_EXITS.p_a_interface',140);
547 end if;
548 HXT_UTIL.DEBUG('after insert to pa_transaction_interface.'); --HXT115
549 RETURN 0;
550
551 EXCEPTION
552 WHEN exp_type_nf THEN
553 if g_debug then
554 hr_utility.set_location('HXT_PA_USER_EXITS.p_a_interface',150);
555 end if;
556 HXT_UTIL.DEBUG('exp_type not found. element_id '||to_char(i_element_type_id)||' '||l_sub_loc||' '||SQLERRM); --HXT115
557 o_location := 'hxt_pa_user_exits.p_a_interface '||l_sub_loc;
558 FND_MESSAGE.SET_NAME('HXT','HXT_39464_EXP_TYP_NOT_FND'); --HXT111
559 FND_MESSAGE.SET_TOKEN('ELEM_ID',to_char(i_element_type_id)); --HXT111
560 o_error_text := FND_MESSAGE.GET; --HXT111
561 FND_MESSAGE.CLEAR; --HXT111
562 o_system_text := SQLERRM;
563 RETURN 1;
564
565 WHEN OTHERS THEN
566 if g_debug then
567 hr_utility.set_location('HXT_PA_USER_EXITS.p_a_interface',160);
568 end if;
569 HXT_UTIL.DEBUG('exception in hxt_pa_user_exits.p_a_interface:'||l_sub_loc||' '||SQLERRM); --HXT115
570 o_location := 'hxt_pa_user_exits.p_a_interface '||l_sub_loc;
571 o_error_text := NULL;
572 o_system_text := SQLERRM;
573 RETURN 1;
574
575 END p_a_interface;
576
577 --
578
579 END HXT_PA_USER_EXITS;