DBA Data[Home] [Help]

APPS.PAY_TRGL_PKG dependencies on PAY_COSTS

Line 13: PAY_TRGL_PKG - Procedure to transfer pay costs to General Ledger.

9: PRODUCT
10: Oracle*Payroll
11: --
12: NAME
13: PAY_TRGL_PKG - Procedure to transfer pay costs to General Ledger.
14: --
15: --
16: DESCRIPTION
17: The procedure sums are costs for each cost centre for all payroll runs

Line 28: trans_pay_costs_mt for better perf.

24: 0 in pay_gl_interface and gl_interface
25: tables for other side of Dr/Cr value.
26: Bug 14528715
27: 115.49 pparate 26-FEB-2009 Added change to query in procedure
28: trans_pay_costs_mt for better perf.
29: Bug 8278294
30: 115.48 pparate 16-SEP-2008 Added an OR condition for binding sql
31: variables in case of costing of payments.
32: (Fix for bug 7401269).

Line 62: 115.32 alogue 15-NOV-2004 Use of transfer_to_gl_flag in pay_costs.

58: date if TGL_DATE_USED set to 'EVE'.
59: Bug 4709735.
60: 115.34 alogue 07-OCT-2005 Support of Sub Ledger Accouting (SLA).
61: 115.33 alogue 22-AUG-2005 Support of Payment Costs.
62: 115.32 alogue 15-NOV-2004 Use of transfer_to_gl_flag in pay_costs.
63: Bug 4013881.
64: 115.31 alogue 03-NOV-2004 Always get transfer_to_gl_flag from
65: distributed element for distributed
66: costs. Bug 3972448.

Line 83: in trans_pay_costs_mt. Bug 2919000.

79: 115.26 alogue 02-JUN-2003 Support of TGL_REVB_ACC_DATE action
80: parameter. Population of reference24
81: in gl_interface. Bug 2987235.
82: 115.25 alogue 24-APR-2003 Hints in gl_interface insert statement
83: in trans_pay_costs_mt. Bug 2919000.
84: 115.24 alogue 10-FEB-2003 Support of Estimate Cost Process.
85: Bug 2794030.
86: 115.23 alogue 21-NOV-2002 Support of grandchild (and further)
87: Run child actions.

Line 243: PROCEDURE trans_pay_costs

239: g_date_used VARCHAR2(80) := null;
240:
241: /* SINGLE-THREADED SOLUTION */
242: --
243: PROCEDURE trans_pay_costs
244: (i_payroll_action_id NUMBER)
245: IS
246: --
247: --

Line 333: hr_utility.set_location('pytrgl.trans_pay_costs',10);

329: l_group_id VARCHAR2(80);
330: --
331: BEGIN
332: --
333: hr_utility.set_location('pytrgl.trans_pay_costs',10);
334: --
335: sql_curs :=dbms_sql.open_cursor;
336: --
337: OPEN transfer_payrolls (i_payroll_action_id);

Line 339: hr_utility.set_location('pytrgl.trans_pay_costs',20);

335: sql_curs :=dbms_sql.open_cursor;
336: --
337: OPEN transfer_payrolls (i_payroll_action_id);
338: --
339: hr_utility.set_location('pytrgl.trans_pay_costs',20);
340: --
341: -- Bug 1066820 avoid passing in hard coded strings.
342: --
343: select user_je_source_name

Line 348: hr_utility.set_location('pytrgl.trans_pay_costs',25);

344: into l_source_name
345: from gl_je_sources_vl
346: where je_source_name = 'Payroll';
347: --
348: hr_utility.set_location('pytrgl.trans_pay_costs',25);
349: --
350: select user_je_category_name
351: into l_category_name
352: from gl_je_categories_vl

Line 355: hr_utility.set_location('pytrgl.trans_pay_costs',27);

351: into l_category_name
352: from gl_je_categories_vl
353: where je_category_name = 'Payroll';
354: --
355: hr_utility.set_location('pytrgl.trans_pay_costs',27);
356: --
357: -- Find if use an accouting date of date_earned
358: -- (default is effective_date)
359: --

Line 370: hr_utility.set_location('pytrgl.trans_pay_costs',28);

366: when others then
367: l_date_used := 'P';
368: end;
369: --
370: hr_utility.set_location('pytrgl.trans_pay_costs',28);
371: --
372: -- Find if use an accouting date of date_earned
373: -- (default is effective_date)
374: --

Line 385: hr_utility.set_location('pytrgl.trans_pay_costs',29);

381: when others then
382: l_rvb_acc_date := 'P';
383: end;
384: --
385: hr_utility.set_location('pytrgl.trans_pay_costs',29);
386: --
387: -- Find if should populate gl_interface.group_id
388: -- (default is to leave this column blank)
389: -- If so we populate it with the TGL payroll_action_id

Line 401: hr_utility.set_location('pytrgl.trans_pay_costs',30);

397: when others then
398: l_group_id := 'N';
399: end;
400: --
401: hr_utility.set_location('pytrgl.trans_pay_costs',30);
402: --
403: -- Process each run action in turn. Each run action may be for
404: -- several payrolls. Each payroll will be processed separately.
405: LOOP

Line 413: hr_utility.set_location('pytrgl.trans_pay_costs',31);

409: c_cost_action_id, -- cost action
410: c_payroll_id,
411: c_set_of_books_id;
412: --
413: hr_utility.set_location('pytrgl.trans_pay_costs',31);
414: --
415: EXIT WHEN transfer_payrolls%NOTFOUND;
416: --
417: hr_utility.set_location('pytrgl.trans_pay_costs',32);

Line 417: hr_utility.set_location('pytrgl.trans_pay_costs',32);

413: hr_utility.set_location('pytrgl.trans_pay_costs',31);
414: --
415: EXIT WHEN transfer_payrolls%NOTFOUND;
416: --
417: hr_utility.set_location('pytrgl.trans_pay_costs',32);
418: --
419: select decode(ppa1.action_type, 'S', ppa1.effective_date,
420: decode(ppa2.action_type, 'B', decode(l_rvb_acc_date, 'C', ppa1.effective_date,
421: ppa2.effective_date),

Line 438: hr_utility.set_location('pytrgl.trans_pay_costs',35);

434: pay_payroll_actions ppa2 -- Payroll run action
435: where ppa1.payroll_action_id = c_cost_action_id
436: and ppa2.payroll_action_id = c_run_action_id;
437: --
438: hr_utility.set_location('pytrgl.trans_pay_costs',35);
439: --
440: -- Get payrolls currency conversion rate type
441: -- handle fact that it may be null
442: --

Line 451: hr_utility.set_location('pytrgl.trans_pay_costs',37);

447: c_conversion_date := c_accounting_date;
448:
449: exception
450: when no_data_found then
451: hr_utility.set_location('pytrgl.trans_pay_costs',37);
452: l_currency_type := null;
453: c_conversion_date := null;
454: end;
455: --

Line 466: hr_utility.set_location('pytrgl.trans_pay_costs',40);

462: --
463: pay_segment_list := NULL;
464: gl_segment_list := NULL;
465: --
466: hr_utility.set_location('pytrgl.trans_pay_costs',40);
467: --
468: -- Dynamically build up the segment lists for the payroll.
469: FOR flex_segs IN flex_segments ( c_payroll_id, c_set_of_books_id )
470: LOOP

Line 472: hr_utility.set_location('pytrgl.trans_pay_costs',50);

468: -- Dynamically build up the segment lists for the payroll.
469: FOR flex_segs IN flex_segments ( c_payroll_id, c_set_of_books_id )
470: LOOP
471: --
472: hr_utility.set_location('pytrgl.trans_pay_costs',50);
473: --
474: gl_segment_list := gl_segment_list ||
475: flex_segs.gl_account_segment ||',';
476: --

Line 477: hr_utility.set_location('pytrgl.trans_pay_costs',60);

473: --
474: gl_segment_list := gl_segment_list ||
475: flex_segs.gl_account_segment ||',';
476: --
477: hr_utility.set_location('pytrgl.trans_pay_costs',60);
478: --
479: -- Payroll segment list needs to MIN() function as not grouped
480: -- by each segment.
481: --

Line 492: hr_utility.set_location('pytrgl.trans_pay_costs',70);

488: --
489: prev_payroll_id := c_payroll_id;
490: prev_sob_id := c_set_of_books_id;
491: --
492: hr_utility.set_location('pytrgl.trans_pay_costs',70);
493: --
494: -- Put the statement into the cursor and parse. Don't know how long
495: -- the segment list is so we cannot bind to variables.
496: --

Line 554: pay_costs cst,

550: pay_assignment_actions pa1, -- Cost assignment action
551: pay_action_interlocks pi2, -- interlock to run
552: pay_assignment_actions pa3, -- run master assignment action
553: pay_assignment_actions pa2, -- run assignment action
554: pay_costs cst,
555: pay_cost_allocation_keyflex caf,
556: pay_run_results rr,
557: pay_input_values_f IV,
558: pay_element_types_f et

Line 758: pay_costs cst,

754: pay_assignment_actions pa1, -- Cost assignment action
755: pay_action_interlocks pi2, -- interlock to run
756: pay_assignment_actions pa3, -- run master assignment action
757: pay_assignment_actions pa2, -- run assignment action
758: pay_costs cst,
759: pay_cost_allocation_keyflex caf,
760: pay_run_results rr,
761: pay_input_values_f IV,
762: pay_element_types_f et

Line 910: hr_utility.set_location('pytrgl.trans_pay_costs',80);

906: decode (IV.uom, ''M'', et.output_currency_code, ''STAT'')',
907: dbms_sql.v7);
908: end if;
909: --
910: hr_utility.set_location('pytrgl.trans_pay_costs',80);
911: --
912: -- Bind the variable values to the cursor values.
913: --
914: dbms_sql.bind_variable(sql_curs,'c_run_action_id',

Line 943: hr_utility.set_location('pytrgl.trans_pay_costs',90);

939: -- Execute the insert statment.
940: --
941: rows_processed := dbms_sql.execute(sql_curs);
942: --
943: hr_utility.set_location('pytrgl.trans_pay_costs',90);
944: --
945: -- Update the assignment actions. Mark as processed.
946: --
947: UPDATE pay_assignment_actions pa

Line 972: hr_utility.set_location('pytrgl.trans_pay_costs', 100);

968: AND ppa2.effective_date
969: BETWEEN per.effective_start_date
970: AND per.effective_end_date);
971: --
972: hr_utility.set_location('pytrgl.trans_pay_costs', 100);
973: --
974: COMMIT;
975: --
976: END LOOP;

Line 978: hr_utility.set_location('pytrgl.trans_pay_costs',110);

974: COMMIT;
975: --
976: END LOOP;
977: --
978: hr_utility.set_location('pytrgl.trans_pay_costs',110);
979: --
980: CLOSE transfer_payrolls;
981: --
982: dbms_sql.close_cursor(sql_curs);

Line 984: hr_utility.set_location('pytrgl.trans_pay_costs',120);

980: CLOSE transfer_payrolls;
981: --
982: dbms_sql.close_cursor(sql_curs);
983: --
984: hr_utility.set_location('pytrgl.trans_pay_costs',120);
985: --
986: END trans_pay_costs;
987:
988: --

Line 986: END trans_pay_costs;

982: dbms_sql.close_cursor(sql_curs);
983: --
984: hr_utility.set_location('pytrgl.trans_pay_costs',120);
985: --
986: END trans_pay_costs;
987:
988: --
989: /* MULTI-THREADED SOLUTION */
990: --

Line 991: PROCEDURE trans_pay_costs_mt

987:
988: --
989: /* MULTI-THREADED SOLUTION */
990: --
991: PROCEDURE trans_pay_costs_mt
992: (i_payroll_action_id NUMBER)
993: IS
994: --
995: --

Line 1133: hr_utility.set_location('pytrgl.trans_pay_costs_mt',10);

1129: l_asg_join VARCHAR2(500);
1130: --
1131: BEGIN
1132: --
1133: hr_utility.set_location('pytrgl.trans_pay_costs_mt',10);
1134: --
1135: sql_curs := dbms_sql.open_cursor;
1136: --
1137: OPEN transfer_payrolls (i_payroll_action_id);

Line 1139: hr_utility.set_location('pytrgl.trans_pay_costs_mt',20);

1135: sql_curs := dbms_sql.open_cursor;
1136: --
1137: OPEN transfer_payrolls (i_payroll_action_id);
1138: --
1139: hr_utility.set_location('pytrgl.trans_pay_costs_mt',20);
1140: --
1141: -- Bug 1066820 avoid passing in hard coded strings.
1142: --
1143: select user_je_source_name

Line 1148: hr_utility.set_location('pytrgl.trans_pay_costs_mt',25);

1144: into l_source_name
1145: from gl_je_sources_vl
1146: where je_source_name = 'Payroll';
1147: --
1148: hr_utility.set_location('pytrgl.trans_pay_costs_mt',25);
1149: --
1150: select user_je_category_name
1151: into l_category_name
1152: from gl_je_categories_vl

Line 1155: hr_utility.set_location('pytrgl.trans_pay_costs_mt',27);

1151: into l_category_name
1152: from gl_je_categories_vl
1153: where je_category_name = 'Payroll';
1154: --
1155: hr_utility.set_location('pytrgl.trans_pay_costs_mt',27);
1156: --
1157: select bus.currency_code, bus.business_group_id
1158: into l_bus_currency_code, l_bus_grp_id
1159: from per_business_groups_perf bus,

Line 1164: hr_utility.set_location('pytrgl.trans_pay_costs',28);

1160: pay_payroll_actions ppa
1161: where ppa.payroll_action_id = i_payroll_action_id
1162: and bus.business_group_id = ppa.business_group_id;
1163: --
1164: hr_utility.set_location('pytrgl.trans_pay_costs',28);
1165: --
1166: -- Find if use an accouting date of date_earned
1167: -- (default is effective_date)
1168: --

Line 1192: hr_utility.set_location('pytrgl.trans_pay_costs',29);

1188: when others then
1189: l_rvb_acc_date := 'P';
1190: end;
1191: --
1192: hr_utility.set_location('pytrgl.trans_pay_costs',29);
1193: --
1194: -- Find if should populate gl_interface.group_id
1195: -- (default is to leave this column blank)
1196: -- If so we populate it with the TGL payroll_action_id

Line 1220: hr_utility.set_location('pytrgl.trans_pay_costs_mt',30);

1216: c_payroll_id,
1217: c_set_of_books_id,
1218: c_pay_id;
1219: --
1220: hr_utility.set_location('pytrgl.trans_pay_costs_mt',30);
1221: --
1222: EXIT WHEN transfer_payrolls%NOTFOUND;
1223: --
1224: hr_utility.set_location('pytrgl.trans_pay_costs_mt',32);

Line 1224: hr_utility.set_location('pytrgl.trans_pay_costs_mt',32);

1220: hr_utility.set_location('pytrgl.trans_pay_costs_mt',30);
1221: --
1222: EXIT WHEN transfer_payrolls%NOTFOUND;
1223: --
1224: hr_utility.set_location('pytrgl.trans_pay_costs_mt',32);
1225: --
1226: if (c_action_type in ('C', 'S')) then
1227:
1228: select decode(ppa1.action_type, 'S', ppa1.effective_date,

Line 1261: hr_utility.set_location('pytrgl.trans_pay_costs_mt',33);

1257: -- required payroll. Use string concatenation method to avoid performance hit
1258: -- ie only join to per_all_assignments_f if have to.
1259: if ((c_action_type = 'EC' or c_action_type = 'CP') and
1260: c_pay_id is null) then
1261: hr_utility.set_location('pytrgl.trans_pay_costs_mt',33);
1262: l_asg_tab := 'per_all_assignments_f paf,';
1263: l_asg_join :=
1264: 'AND paf.assignment_id = '||'p'||'a.assignment_id
1265: AND :c_run_date between paf.effective_start_date

Line 1269: hr_utility.set_location('pytrgl.trans_pay_costs_mt',34);

1265: AND :c_run_date between paf.effective_start_date
1266: and paf.effective_end_date
1267: AND paf.payroll_id = :c_payroll_id';
1268: else
1269: hr_utility.set_location('pytrgl.trans_pay_costs_mt',34);
1270: l_asg_tab := '';
1271: l_asg_join := '';
1272: end if;
1273:

Line 1275: hr_utility.set_location('pytrgl.trans_pay_costs_mt',35);

1271: l_asg_join := '';
1272: end if;
1273:
1274: --
1275: hr_utility.set_location('pytrgl.trans_pay_costs_mt',35);
1276: --
1277: -- Get payrolls currency conversion rate type
1278: -- handle fact that it may be null
1279: --

Line 1288: hr_utility.set_location('pytrgl.trans_pay_costs',37);

1284: c_conversion_date := c_accounting_date;
1285:
1286: exception
1287: when no_data_found then
1288: hr_utility.set_location('pytrgl.trans_pay_costs',37);
1289: l_currency_type := null;
1290: c_conversion_date := null;
1291: end;
1292: --

Line 1303: hr_utility.set_location('pytrgl.trans_pay_costs_mt',40);

1299: --
1300: pay_segment_list := NULL;
1301: gl_segment_list := NULL;
1302: --
1303: hr_utility.set_location('pytrgl.trans_pay_costs_mt',40);
1304: --
1305: -- Dynamically build up the segment lists for the payroll.
1306: FOR flex_segs IN flex_segments ( c_payroll_id, c_set_of_books_id )
1307: LOOP

Line 1309: hr_utility.set_location('pytrgl.trans_pay_costs_mt',50);

1305: -- Dynamically build up the segment lists for the payroll.
1306: FOR flex_segs IN flex_segments ( c_payroll_id, c_set_of_books_id )
1307: LOOP
1308: --
1309: hr_utility.set_location('pytrgl.trans_pay_costs_mt',50);
1310: --
1311: gl_segment_list := gl_segment_list ||
1312: flex_segs.gl_account_segment ||',';
1313: --

Line 1314: hr_utility.set_location('pytrgl.trans_pay_costs_mt',60);

1310: --
1311: gl_segment_list := gl_segment_list ||
1312: flex_segs.gl_account_segment ||',';
1313: --
1314: hr_utility.set_location('pytrgl.trans_pay_costs_mt',60);
1315: --
1316: -- Payroll segment list needs to MIN() function as not grouped
1317: -- by each segment.
1318: --

Line 1329: hr_utility.set_location('pytrgl.trans_pay_costs_mt',65);

1325: --
1326: prev_payroll_id := c_payroll_id;
1327: prev_sob_id := c_set_of_books_id;
1328: --
1329: hr_utility.set_location('pytrgl.trans_pay_costs_mt',65);
1330: --
1331: -- For Payment Costs should not populate segment columns
1332: -- in gl_interface : bug 6169000
1333: --

Line 1342: hr_utility.set_location('pytrgl.trans_pay_costs_mt',70);

1338: l_pay_segment_list := pay_segment_list;
1339: l_gl_segment_list := gl_segment_list;
1340: end if;
1341: --
1342: hr_utility.set_location('pytrgl.trans_pay_costs_mt',70);
1343: --
1344: -- Put the statement into the cursor and parse. Don't know how long
1345: -- the segment list is so we cannot bind to variables.
1346: --

Line 1490: hr_utility.set_location('pytrgl.trans_pay_costs_mt',80);

1486: pgl.currency_code',
1487: dbms_sql.v7);
1488: end if;
1489: --
1490: hr_utility.set_location('pytrgl.trans_pay_costs_mt',80);
1491: --
1492: -- Bind the variable values to the cursor values.
1493: --
1494: dbms_sql.bind_variable(sql_curs,'c_run_action_id',

Line 1534: hr_utility.set_location('pytrgl.trans_pay_costs_mt',90);

1530: -- Execute the insert statment.
1531: --
1532: rows_processed := dbms_sql.execute(sql_curs);
1533: --
1534: hr_utility.set_location('pytrgl.trans_pay_costs_mt',90);
1535: --
1536: END LOOP;
1537: --
1538: hr_utility.set_location('pytrgl.trans_pay_costs_mt',100);

Line 1538: hr_utility.set_location('pytrgl.trans_pay_costs_mt',100);

1534: hr_utility.set_location('pytrgl.trans_pay_costs_mt',90);
1535: --
1536: END LOOP;
1537: --
1538: hr_utility.set_location('pytrgl.trans_pay_costs_mt',100);
1539: --
1540: CLOSE transfer_payrolls;
1541: --
1542: dbms_sql.close_cursor(sql_curs);

Line 1544: hr_utility.set_location('pytrgl.trans_pay_costs_mt',110);

1540: CLOSE transfer_payrolls;
1541: --
1542: dbms_sql.close_cursor(sql_curs);
1543: --
1544: hr_utility.set_location('pytrgl.trans_pay_costs_mt',110);
1545: --
1546: COMMIT;
1547: --
1548: hr_utility.set_location('pytrgl.trans_pay_costs_mt',120);

Line 1548: hr_utility.set_location('pytrgl.trans_pay_costs_mt',120);

1544: hr_utility.set_location('pytrgl.trans_pay_costs_mt',110);
1545: --
1546: COMMIT;
1547: --
1548: hr_utility.set_location('pytrgl.trans_pay_costs_mt',120);
1549: --
1550: END trans_pay_costs_mt;
1551: --
1552: PROCEDURE trans_ass_costs

Line 1550: END trans_pay_costs_mt;

1546: COMMIT;
1547: --
1548: hr_utility.set_location('pytrgl.trans_pay_costs_mt',120);
1549: --
1550: END trans_pay_costs_mt;
1551: --
1552: PROCEDURE trans_ass_costs
1553: (i_assignment_action_id NUMBER,
1554: sla_mode NUMBER)

Line 1606: -- in pay_costs.

1602: --
1603: if (c_action_type IN ('C', 'S')) then
1604: --
1605: -- Costing or Retrocostong hence know run result populated
1606: -- in pay_costs.
1607: --
1608: hr_utility.set_location('pytrgl.trans_ass_costs',20);
1609: --
1610: SELECT pa2.assignment_action_id,

Line 1646: pay_costs cst,

1642: SUM(DECODE(cst.debit_or_credit,'D',cst.costed_value,null)),
1643: SUM(DECODE(cst.debit_or_credit,'C',cst.costed_value,null))
1644: FROM pay_payroll_actions ppa, -- run payroll action
1645: pay_assignment_actions raa,
1646: pay_costs cst,
1647: pay_run_results rr,
1648: pay_element_types_f et,
1649: pay_input_values_f IV
1650: WHERE cst.assignment_action_id = c_assignment_action_id

Line 1793: -- in pay_costs.

1789: --
1790: elsif (c_action_type = 'EC') then
1791: --
1792: -- Estimate Costing hence run result not populated
1793: -- in pay_costs.
1794: --
1795: hr_utility.set_location('pytrgl.trans_ass_costs',50);
1796: --
1797: --

Line 1814: hr_utility.set_location('pytrgl.trans_pay_costs',29);

1810: end;
1811: end if;
1812: l_date_used := g_date_used;
1813: --
1814: hr_utility.set_location('pytrgl.trans_pay_costs',29);
1815: --
1816: -- get accounting_date according to TGL_DATE_USED
1817: -- for use with the reversal costs
1818: --

Line 1858: pay_costs cst,

1854: SUM(DECODE(cst.debit_or_credit,'D',cst.costed_value,null)),
1855: SUM(DECODE(cst.debit_or_credit,'C',cst.costed_value,null)),
1856: decode (CST.source_id, null, null, l_accounting_date)
1857: FROM pay_payroll_actions ppa, -- TGL payroll action
1858: pay_costs cst,
1859: pay_input_values_f IV,
1860: pay_element_types_f et
1861: WHERE ppa.payroll_action_id = t_payroll_action_id
1862: AND cst.assignment_action_id = c_assignment_action_id