DBA Data[Home] [Help]

APPS.PA_BC_COSTING dependencies on PA_BC_PACKETS

Line 12: PROCEDURE populate_pa_bc_packets( x_return_status OUT NOCOPY NUMBER

8: ,x_error_code OUT NOCOPY VARCHAR2
9: ,x_error_stage OUT NOCOPY VARCHAR2
10: );
11:
12: PROCEDURE populate_pa_bc_packets( x_return_status OUT NOCOPY NUMBER
13: ,x_error_code OUT NOCOPY VARCHAR2
14: ,x_error_stage OUT NOCOPY VARCHAR2
15: ) ;
16:

Line 17: PROCEDURE populate_pa_bc_packets_cwk( x_return_status OUT NOCOPY NUMBER

13: ,x_error_code OUT NOCOPY VARCHAR2
14: ,x_error_stage OUT NOCOPY VARCHAR2
15: ) ;
16:
17: PROCEDURE populate_pa_bc_packets_cwk( x_return_status OUT NOCOPY NUMBER
18: ,x_error_code OUT NOCOPY VARCHAR2
19: ,x_error_stage OUT NOCOPY VARCHAR2
20: ) ;
21:

Line 32: g_packet_id pa_bc_packets.packet_id%TYPE;

28: g_last_update_login pa_expenditure_items.last_update_login%TYPE := FND_GLOBAL.LOGIN_ID;
29: g_request_id pa_cost_distribution_lines.request_id%TYPE ;
30: g_program_application_id pa_cost_distribution_lines.program_application_id%TYPE := FND_GLOBAL.PROG_APPL_ID;
31: g_program_id pa_cost_distribution_lines.program_id%TYPE := FND_GLOBAL.CONC_PROGRAM_ID;
32: g_packet_id pa_bc_packets.packet_id%TYPE;
33: g_sob_id pa_implementations.set_of_books_id%TYPE;
34:
35: /*
36: * Package level Pl/Sql Tables.

Line 93: * 1. Sends Credit/Debit raw lines created during this run into pa_bc_packets.

89:
90: /*
91: * This procedure can be the same for both ER Distribution and VI Adjustment processes.
92: * The following procedure,
93: * 1. Sends Credit/Debit raw lines created during this run into pa_bc_packets.
94: * -- Credit lines in case of reversing CDLs
95: * -- Debit lines in case of new CDLs.
96: * 2. Inserts Credit burden lines for reversing CDLs.
97: * -- FChecked burden amount is,

Line 597: * Call Autonomous Procedure to insert the pl/sql tables into pa_bc_packets.

593: pa_debug.write_file('costing_fc_proc: ' || pa_debug.g_err_stage);
594: END IF;
595:
596: /*
597: * Call Autonomous Procedure to insert the pl/sql tables into pa_bc_packets.
598: */
599: pa_debug.g_err_stage := TO_CHAR(l_stage) || ':Before Calling populate_pa_bc_packets.';
600: IF P_DEBUG_MODE = 'Y' THEN
601: pa_debug.write_file('costing_fc_proc: ' || pa_debug.g_err_stage);

Line 599: pa_debug.g_err_stage := TO_CHAR(l_stage) || ':Before Calling populate_pa_bc_packets.';

595:
596: /*
597: * Call Autonomous Procedure to insert the pl/sql tables into pa_bc_packets.
598: */
599: pa_debug.g_err_stage := TO_CHAR(l_stage) || ':Before Calling populate_pa_bc_packets.';
600: IF P_DEBUG_MODE = 'Y' THEN
601: pa_debug.write_file('costing_fc_proc: ' || pa_debug.g_err_stage);
602: END IF;
603:

Line 605: populate_pa_bc_packets( l_return_status

601: pa_debug.write_file('costing_fc_proc: ' || pa_debug.g_err_stage);
602: END IF;
603:
604: l_stage := 600;
605: populate_pa_bc_packets( l_return_status
606: ,l_error_code
607: ,l_error_stage
608: );
609:

Line 611: pa_debug.g_err_stage := TO_CHAR(l_stage) || ':After calling populate_pa_bc_packets l_return_status = [' ||

607: ,l_error_stage
608: );
609:
610:
611: pa_debug.g_err_stage := TO_CHAR(l_stage) || ':After calling populate_pa_bc_packets l_return_status = [' ||
612: l_return_status || '] l_error_stage = [' || l_error_stage ||
613: '] l_error_code = [' || l_error_code || ']' ;
614: IF P_DEBUG_MODE = 'Y' THEN
615: pa_debug.write_file('costing_fc_proc: ' || pa_debug.g_err_stage);

Line 623: pa_debug.g_err_stage := 'Error occurred while call to populate_pa_bc_packets. x_return_status [' ||

619: * Check l_return_status,l_error_code,l_error_stage and take appropriate action.
620: */
621: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS)
622: THEN
623: pa_debug.g_err_stage := 'Error occurred while call to populate_pa_bc_packets. x_return_status [' ||
624: l_return_status || ']';
625: IF P_DEBUG_MODE = 'Y' THEN
626: pa_debug.write_file('costing_fc_proc: ' || pa_debug.g_err_stage);
627: END IF;

Line 631: pa_debug.g_err_stage := TO_CHAR(l_stage) || ':After Inserting Records into PA_BC_PACKETS.';

627: END IF;
628: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
629: END IF;
630:
631: pa_debug.g_err_stage := TO_CHAR(l_stage) || ':After Inserting Records into PA_BC_PACKETS.';
632: IF P_DEBUG_MODE = 'Y' THEN
633: pa_debug.write_file('costing_fc_proc: ' || pa_debug.g_err_stage);
634: END IF;
635:

Line 917: l_budget_version_id pa_bc_packets.budget_version_id%TYPE;

913: l_debug_stage VARCHAR2(2000);
914:
915: l_prev_project_id pa_cost_distribution_lines.project_id%TYPE;
916: l_prev_flag VARCHAR2(1);
917: l_budget_version_id pa_bc_packets.budget_version_id%TYPE;
918: l_resource_list_id pa_budget_versions.resource_list_id%TYPE;
919: l_entry_level_code pa_budget_versions.budget_entry_method_code%TYPE;
920: l_resource_list_member_id pa_bc_packets.resource_list_member_id%TYPE;
921: l_budget_ccid pa_cost_distribution_lines.budget_ccid%TYPE;

Line 920: l_resource_list_member_id pa_bc_packets.resource_list_member_id%TYPE;

916: l_prev_flag VARCHAR2(1);
917: l_budget_version_id pa_bc_packets.budget_version_id%TYPE;
918: l_resource_list_id pa_budget_versions.resource_list_id%TYPE;
919: l_entry_level_code pa_budget_versions.budget_entry_method_code%TYPE;
920: l_resource_list_member_id pa_bc_packets.resource_list_member_id%TYPE;
921: l_budget_ccid pa_cost_distribution_lines.budget_ccid%TYPE;
922: l_budget_line_id pa_cost_distribution_lines.budget_line_id%TYPE;
923: l_prev_reslist_id Number;
924: l_fnd_reqd_flag VARCHAR2(1);

Line 1466: * also, then line_num also has to be selected above from pa_bc_packets.

1462: * These records will be marked with a NOT NULL value for ei.cost_dist_rejection_code.
1463: *
1464: * I think its enough to check for eiid and request_id to identify CDLs
1465: * that were created during this run. But if its needed to check against line_num
1466: * also, then line_num also has to be selected above from pa_bc_packets.
1467: */
1468: l_stage := 300;
1469: FORALL i IN l_rejected_eiid_tab.FIRST .. l_rejected_eiid_tab.LAST
1470: DELETE

Line 1582: PROCEDURE populate_pa_bc_packets( x_return_status OUT NOCOPY NUMBER

1578: RAISE;
1579: END; -- process_rejected_exp_items
1580:
1581: ------------------------------------------------------------------------
1582: PROCEDURE populate_pa_bc_packets( x_return_status OUT NOCOPY NUMBER
1583: ,x_error_code OUT NOCOPY VARCHAR2
1584: ,x_error_stage OUT NOCOPY VARCHAR2
1585: )
1586: IS

Line 1595: pa_debug.init_err_stack('pa_bc_costing.populate_pa_bc_packets');

1591: l_stage NUMBER ;
1592:
1593: BEGIN
1594:
1595: pa_debug.init_err_stack('pa_bc_costing.populate_pa_bc_packets');
1596:
1597: fnd_profile.get('PA_DEBUG_MODE',l_debug_mode);
1598: l_debug_mode := NVL(l_debug_mode, 'Y');
1599:

Line 1603: pa_debug.g_err_stage := TO_CHAR(l_stage) || ':From populate_pa_bc_packets';

1599:
1600: pa_debug.set_process('PLSQL','LOG',l_debug_mode);
1601:
1602: l_stage := 100;
1603: pa_debug.g_err_stage := TO_CHAR(l_stage) || ':From populate_pa_bc_packets';
1604: pa_debug.write_file(pa_debug.g_err_stage);
1605:
1606: pa_debug.g_err_stage := TO_CHAR(l_stage) || ':Before Inserting Raw lines into pa_bc_packets.' ;
1607: pa_debug.write_file(pa_debug.g_err_stage);

Line 1606: pa_debug.g_err_stage := TO_CHAR(l_stage) || ':Before Inserting Raw lines into pa_bc_packets.' ;

1602: l_stage := 100;
1603: pa_debug.g_err_stage := TO_CHAR(l_stage) || ':From populate_pa_bc_packets';
1604: pa_debug.write_file(pa_debug.g_err_stage);
1605:
1606: pa_debug.g_err_stage := TO_CHAR(l_stage) || ':Before Inserting Raw lines into pa_bc_packets.' ;
1607: pa_debug.write_file(pa_debug.g_err_stage);
1608:
1609: pa_debug.g_err_stage := TO_CHAR(l_stage) || ':ORACLE error occurred while Bulk inserting into pa_bc_packets.' ;
1610:

Line 1609: pa_debug.g_err_stage := TO_CHAR(l_stage) || ':ORACLE error occurred while Bulk inserting into pa_bc_packets.' ;

1605:
1606: pa_debug.g_err_stage := TO_CHAR(l_stage) || ':Before Inserting Raw lines into pa_bc_packets.' ;
1607: pa_debug.write_file(pa_debug.g_err_stage);
1608:
1609: pa_debug.g_err_stage := TO_CHAR(l_stage) || ':ORACLE error occurred while Bulk inserting into pa_bc_packets.' ;
1610:
1611: /*
1612: * Insert Raw lines.
1613: *

Line 1627: INTO pa_bc_packets( packet_id

1623: */
1624: l_stage := 200;
1625: FORALL i IN l_expenditure_item_id_tab.FIRST .. l_expenditure_item_id_tab.LAST
1626: INSERT
1627: INTO pa_bc_packets( packet_id
1628: ,project_id
1629: ,task_id
1630: ,budget_version_id
1631: ,expenditure_type

Line 1690: ,pa_bc_packets_s.NEXTVAL -- bc_packet_id

1686: ,l_document_line_id_tab(i) -- document_line_id
1687: ,l_dr_code_combination_id_tab(i) -- txn_ccid
1688: ,l_acct_raw_cost_tab(i) -- accounted_dr
1689: ,l_acct_raw_cost_tab(i) -- entered_dr
1690: ,pa_bc_packets_s.NEXTVAL -- bc_packet_id
1691: ,l_parent_bc_packet_id_tab(i) -- parent_bc_packet_id
1692: ,l_org_id_tab(i) -- org_id
1693: ,'N' -- balance_posted_flag
1694: ,g_program_id -- program_id

Line 1711: pa_debug.g_err_stage := TO_CHAR(l_stage) || ':After Inserting Raw lines into pa_bc_packets.' ;

1707: ;
1708:
1709: l_records_affected := SQL%ROWCOUNT;
1710:
1711: pa_debug.g_err_stage := TO_CHAR(l_stage) || ':After Inserting Raw lines into pa_bc_packets.' ;
1712: pa_debug.write_file(pa_debug.g_err_stage);
1713:
1714: pa_debug.g_err_stage := TO_CHAR(l_stage) || ':Inserted [' || TO_CHAR(l_records_affected) ||
1715: '] Raw lines into pa_bc_packets.';

Line 1715: '] Raw lines into pa_bc_packets.';

1711: pa_debug.g_err_stage := TO_CHAR(l_stage) || ':After Inserting Raw lines into pa_bc_packets.' ;
1712: pa_debug.write_file(pa_debug.g_err_stage);
1713:
1714: pa_debug.g_err_stage := TO_CHAR(l_stage) || ':Inserted [' || TO_CHAR(l_records_affected) ||
1715: '] Raw lines into pa_bc_packets.';
1716: pa_debug.write_file(pa_debug.g_err_stage);
1717:
1718: /*
1719: * Insert Burden lines - if the project is burdened.

Line 1746: pa_debug.g_err_stage := TO_CHAR(l_stage) || ':Inserting Burden lines into pa_bc_packets (display_method = S).' ;

1742: *
1743: * burden_cost_flag is populated 'O' for Burden lines.
1744: */
1745:
1746: pa_debug.g_err_stage := TO_CHAR(l_stage) || ':Inserting Burden lines into pa_bc_packets (display_method = S).' ;
1747: pa_debug.write_file(pa_debug.g_err_stage);
1748:
1749: pa_debug.g_err_stage := TO_CHAR(l_stage) || ':ORACLE error occurred while inserting into pa_bc_packets' ;
1750:

Line 1749: pa_debug.g_err_stage := TO_CHAR(l_stage) || ':ORACLE error occurred while inserting into pa_bc_packets' ;

1745:
1746: pa_debug.g_err_stage := TO_CHAR(l_stage) || ':Inserting Burden lines into pa_bc_packets (display_method = S).' ;
1747: pa_debug.write_file(pa_debug.g_err_stage);
1748:
1749: pa_debug.g_err_stage := TO_CHAR(l_stage) || ':ORACLE error occurred while inserting into pa_bc_packets' ;
1750:
1751: l_stage := 300;
1752: FORALL i IN l_expenditure_item_id_tab.FIRST .. l_expenditure_item_id_tab.LAST
1753: INSERT

Line 1754: INTO pa_bc_packets( packet_id

1750:
1751: l_stage := 300;
1752: FORALL i IN l_expenditure_item_id_tab.FIRST .. l_expenditure_item_id_tab.LAST
1753: INSERT
1754: INTO pa_bc_packets( packet_id
1755: ,project_id
1756: ,task_id
1757: ,budget_version_id
1758: ,expenditure_type

Line 1817: ,pa_bc_packets_s.NEXTVAL -- pa_bc_packet_id

1813: ,l_document_line_id_tab(i) -- document_line_id
1814: ,l_dr_code_combination_id_tab(i) -- txn_ccid
1815: ,(l_acct_burdened_cost_tab(i) - l_acct_raw_cost_tab(i)) -- accounted_dr
1816: ,(l_acct_burdened_cost_tab(i) - l_acct_raw_cost_tab(i)) -- entered_dr
1817: ,pa_bc_packets_s.NEXTVAL -- pa_bc_packet_id
1818: --,DECODE(l_line_num_reversed_tab(i), NULL, NULL, bcpk.bc_packet_id) -- parent_bc_packet_id
1819: ,DECODE(l_line_type_tab(i), 'I', NULL, DECODE(l_line_num_reversed_tab(i), NULL, NULL, bcpk.bc_packet_id)) -- parent_bc_packet_id
1820: ,l_org_id_tab(i) -- org_id
1821: ,'N' -- balance_posted_flag

Line 1835: FROM pa_bc_packets bcpk -- to get the raw line in bc_packets

1831: ,g_request_id
1832: ,l_pkt_reference1_Tab(i)
1833: ,l_pkt_reference2_Tab(i)
1834: ,l_pkt_reference3_Tab(i)
1835: FROM pa_bc_packets bcpk -- to get the raw line in bc_packets
1836: WHERE l_line_num_reversed_tab(i) IS NOT NULL
1837: AND l_burden_amt_disp_method_tab(i) = 'S'
1838: AND l_burden_cost_flag_tab(i) = 'Y'
1839: AND bcpk.document_header_id = l_expenditure_item_id_tab(i)

Line 1846: pa_debug.g_err_stage := TO_CHAR(l_stage) || ':After Inserting Burden lines into pa_bc_packets (display_method = S).' ;

1842: ;
1843:
1844: l_records_affected := TO_CHAR(SQL%ROWCOUNT) ;
1845:
1846: pa_debug.g_err_stage := TO_CHAR(l_stage) || ':After Inserting Burden lines into pa_bc_packets (display_method = S).' ;
1847: pa_debug.write_file(pa_debug.g_err_stage);
1848:
1849: pa_debug.g_err_stage := TO_CHAR(l_stage) || ':Inserted [' || TO_CHAR(l_records_affected) ||
1850: '] Burden lines into pa_bc_packets';

Line 1850: '] Burden lines into pa_bc_packets';

1846: pa_debug.g_err_stage := TO_CHAR(l_stage) || ':After Inserting Burden lines into pa_bc_packets (display_method = S).' ;
1847: pa_debug.write_file(pa_debug.g_err_stage);
1848:
1849: pa_debug.g_err_stage := TO_CHAR(l_stage) || ':Inserted [' || TO_CHAR(l_records_affected) ||
1850: '] Burden lines into pa_bc_packets';
1851: pa_debug.write_file(pa_debug.g_err_stage);
1852:
1853: pa_debug.g_err_stage := TO_CHAR(l_stage) || ':Inserting Burden lines into pa_bc_packets (disp_method = D).' ;
1854: pa_debug.write_file(pa_debug.g_err_stage);

Line 1853: pa_debug.g_err_stage := TO_CHAR(l_stage) || ':Inserting Burden lines into pa_bc_packets (disp_method = D).' ;

1849: pa_debug.g_err_stage := TO_CHAR(l_stage) || ':Inserted [' || TO_CHAR(l_records_affected) ||
1850: '] Burden lines into pa_bc_packets';
1851: pa_debug.write_file(pa_debug.g_err_stage);
1852:
1853: pa_debug.g_err_stage := TO_CHAR(l_stage) || ':Inserting Burden lines into pa_bc_packets (disp_method = D).' ;
1854: pa_debug.write_file(pa_debug.g_err_stage);
1855:
1856: pa_debug.g_err_stage := TO_CHAR(l_stage) || ':ORACLE error occurred while inserting Burden lines into bc_pk dis_meth = D' ;
1857: /*

Line 1859: * The bc_packet_id in pa_bc_packets for the *R* line for this EI is populated as

1855:
1856: pa_debug.g_err_stage := TO_CHAR(l_stage) || ':ORACLE error occurred while inserting Burden lines into bc_pk dis_meth = D' ;
1857: /*
1858: * For burden_amt_display_method = D, Burdened amount has to be derived.
1859: * The bc_packet_id in pa_bc_packets for the *R* line for this EI is populated as
1860: * parent_bc_packet_id in the burden line in pa_bc_packets.
1861: * *R* line in pa_bc_packets will be identified by a NULL in the parent_bc_packet_id
1862: * column.
1863: */

Line 1860: * parent_bc_packet_id in the burden line in pa_bc_packets.

1856: pa_debug.g_err_stage := TO_CHAR(l_stage) || ':ORACLE error occurred while inserting Burden lines into bc_pk dis_meth = D' ;
1857: /*
1858: * For burden_amt_display_method = D, Burdened amount has to be derived.
1859: * The bc_packet_id in pa_bc_packets for the *R* line for this EI is populated as
1860: * parent_bc_packet_id in the burden line in pa_bc_packets.
1861: * *R* line in pa_bc_packets will be identified by a NULL in the parent_bc_packet_id
1862: * column.
1863: */
1864: l_stage := 400;

Line 1861: * *R* line in pa_bc_packets will be identified by a NULL in the parent_bc_packet_id

1857: /*
1858: * For burden_amt_display_method = D, Burdened amount has to be derived.
1859: * The bc_packet_id in pa_bc_packets for the *R* line for this EI is populated as
1860: * parent_bc_packet_id in the burden line in pa_bc_packets.
1861: * *R* line in pa_bc_packets will be identified by a NULL in the parent_bc_packet_id
1862: * column.
1863: */
1864: l_stage := 400;
1865: FORALL i IN l_expenditure_item_id_tab.FIRST .. l_expenditure_item_id_tab.LAST

Line 1867: INTO pa_bc_packets( packet_id

1863: */
1864: l_stage := 400;
1865: FORALL i IN l_expenditure_item_id_tab.FIRST .. l_expenditure_item_id_tab.LAST
1866: INSERT
1867: INTO pa_bc_packets( packet_id
1868: ,project_id
1869: ,task_id
1870: ,budget_version_id
1871: ,expenditure_type

Line 1930: ,pa_bc_packets_s.NEXTVAL -- bc_packet_id

1926: ,l_document_line_id_tab(i) -- document_line_id
1927: ,l_dr_code_combination_id_tab(i) -- txn_ccid
1928: ,ROUND(l_acct_raw_cost_tab(i) * cm.compiled_multiplier,2) -- accounted_dr
1929: ,ROUND(l_acct_raw_cost_tab(i) * cm.compiled_multiplier,2) -- entered_dr
1930: ,pa_bc_packets_s.NEXTVAL -- bc_packet_id
1931: --,DECODE(l_line_num_reversed_tab(i), NULL, NULL, bcpk.bc_packet_id) -- parent_bc_packet_id
1932: ,DECODE(l_line_type_tab(i), 'I', NULL, DECODE(l_line_num_reversed_tab(i), NULL, NULL, bcpk.bc_packet_id)) -- parent_bc_packet_id
1933: ,l_org_id_tab(i) -- org_id
1934: ,'N' -- balance_posted_flag

Line 1954: ,PA_BC_PACKETS bcpk

1950: PA_COST_BASE_EXP_TYPES CBET,
1951: PA_COST_BASES CB,
1952: PA_IND_RATE_SCH_REVISIONS IRSR,
1953: PA_IND_RATE_SCHEDULES_ALL_BG IRS
1954: ,PA_BC_PACKETS bcpk
1955: WHERE ics.ind_rate_sch_revision_id = irsr.ind_rate_sch_revision_id
1956: AND irs.ind_rate_sch_id = irsr.ind_rate_sch_id
1957: AND irsr.cost_plus_structure = cbet.cost_plus_structure
1958: AND cbet.cost_base = cm.cost_base

Line 1980: pa_debug.g_err_stage := TO_CHAR(l_stage) || ':Inserted [' || TO_CHAR(l_records_affected) || '] Burden lines into pa_bc_packets';

1976: ;
1977:
1978: l_records_affected := SQL%ROWCOUNT ;
1979:
1980: pa_debug.g_err_stage := TO_CHAR(l_stage) || ':Inserted [' || TO_CHAR(l_records_affected) || '] Burden lines into pa_bc_packets';
1981: pa_debug.write_file(pa_debug.g_err_stage);
1982:
1983: pa_debug.g_err_stage := TO_CHAR(l_stage) || ':After Inserting Burden lines into pa_bc_packets (disp_method = D).' ;
1984: pa_debug.write_file(pa_debug.g_err_stage);

Line 1983: pa_debug.g_err_stage := TO_CHAR(l_stage) || ':After Inserting Burden lines into pa_bc_packets (disp_method = D).' ;

1979:
1980: pa_debug.g_err_stage := TO_CHAR(l_stage) || ':Inserted [' || TO_CHAR(l_records_affected) || '] Burden lines into pa_bc_packets';
1981: pa_debug.write_file(pa_debug.g_err_stage);
1982:
1983: pa_debug.g_err_stage := TO_CHAR(l_stage) || ':After Inserting Burden lines into pa_bc_packets (disp_method = D).' ;
1984: pa_debug.write_file(pa_debug.g_err_stage);
1985:
1986: pa_debug.g_err_stage := TO_CHAR(l_stage) || ':Committing work!!' ;
1987: pa_debug.write_file(pa_debug.g_err_stage);

Line 1989: pa_debug.g_err_stage := TO_CHAR(l_stage) || ':Leaving populate_pa_bc_packets.' ;

1985:
1986: pa_debug.g_err_stage := TO_CHAR(l_stage) || ':Committing work!!' ;
1987: pa_debug.write_file(pa_debug.g_err_stage);
1988:
1989: pa_debug.g_err_stage := TO_CHAR(l_stage) || ':Leaving populate_pa_bc_packets.' ;
1990: pa_debug.write_file(pa_debug.g_err_stage);
1991:
1992: l_stage := 500;
1993: COMMIT;

Line 2003: END; -- populate_pa_bc_packets

1999: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
2000: x_error_code := TO_CHAR(SQLCODE) || SQLERRM ;
2001: x_error_stage := l_stage ;
2002: RAISE;
2003: END; -- populate_pa_bc_packets
2004:
2005: --------------------------------------------------------------------------------------
2006: /*
2007: *

Line 2035: l_budget_version_id pa_bc_packets.budget_version_id%TYPE;

2031: l_cdls_deleted NUMBER := 0;
2032:
2033: l_prev_project_id pa_cost_distribution_lines.project_id%TYPE;
2034: l_prev_flag VARCHAR2(1);
2035: l_budget_version_id pa_bc_packets.budget_version_id%TYPE;
2036: l_resource_list_id pa_budget_versions.resource_list_id%TYPE;
2037: l_entry_level_code pa_budget_versions.budget_entry_method_code%TYPE; --???
2038: l_resource_list_member_id pa_bc_packets.resource_list_member_id%TYPE;
2039: l_budget_ccid pa_cost_distribution_lines.budget_ccid%TYPE;

Line 2038: l_resource_list_member_id pa_bc_packets.resource_list_member_id%TYPE;

2034: l_prev_flag VARCHAR2(1);
2035: l_budget_version_id pa_bc_packets.budget_version_id%TYPE;
2036: l_resource_list_id pa_budget_versions.resource_list_id%TYPE;
2037: l_entry_level_code pa_budget_versions.budget_entry_method_code%TYPE; --???
2038: l_resource_list_member_id pa_bc_packets.resource_list_member_id%TYPE;
2039: l_budget_ccid pa_cost_distribution_lines.budget_ccid%TYPE;
2040:
2041: l_fnd_reqd_flag VARCHAR2(1);
2042:

Line 2727: | Call Autonomous Procedure to insert the pl/sql tables into pa_bc_packets.|

2723: pa_debug.write_file(l_proc_name || ': ' || pa_debug.g_err_stage);
2724: END IF;
2725:
2726: /*==========================================================================+
2727: | Call Autonomous Procedure to insert the pl/sql tables into pa_bc_packets.|
2728: +==========================================================================*/
2729: pa_debug.g_err_stage := TO_CHAR(l_stage) || ': Before Calling populate_pa_bc_packets.';
2730: IF P_DEBUG_MODE = 'Y' THEN
2731: pa_debug.write_file(l_proc_name || ': ' || pa_debug.g_err_stage);

Line 2729: pa_debug.g_err_stage := TO_CHAR(l_stage) || ': Before Calling populate_pa_bc_packets.';

2725:
2726: /*==========================================================================+
2727: | Call Autonomous Procedure to insert the pl/sql tables into pa_bc_packets.|
2728: +==========================================================================*/
2729: pa_debug.g_err_stage := TO_CHAR(l_stage) || ': Before Calling populate_pa_bc_packets.';
2730: IF P_DEBUG_MODE = 'Y' THEN
2731: pa_debug.write_file(l_proc_name || ': ' || pa_debug.g_err_stage);
2732: END IF;
2733:

Line 2735: populate_pa_bc_packets_cwk( l_return_status

2731: pa_debug.write_file(l_proc_name || ': ' || pa_debug.g_err_stage);
2732: END IF;
2733:
2734: l_stage := 600;
2735: populate_pa_bc_packets_cwk( l_return_status
2736: ,l_error_code
2737: ,l_error_stage
2738: );
2739:

Line 2740: pa_debug.g_err_stage := TO_CHAR(l_stage) || ': After calling populate_pa_bc_packets l_return_status = [' ||

2736: ,l_error_code
2737: ,l_error_stage
2738: );
2739:
2740: pa_debug.g_err_stage := TO_CHAR(l_stage) || ': After calling populate_pa_bc_packets l_return_status = [' ||
2741: l_return_status || '] l_error_stage = [' || l_error_stage ||
2742: '] l_error_code = [' || l_error_code || ']' ;
2743: IF P_DEBUG_MODE = 'Y' THEN
2744: pa_debug.write_file(l_proc_name || ':' || pa_debug.g_err_stage);

Line 2752: pa_debug.g_err_stage := 'Error occurred while call to populate_pa_bc_packets. x_return_status [' ||

2748: | Exception Processing. |
2749: +========================*/
2750: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS)
2751: THEN
2752: pa_debug.g_err_stage := 'Error occurred while call to populate_pa_bc_packets. x_return_status [' ||
2753: l_return_status || ']';
2754: IF P_DEBUG_MODE = 'Y' THEN
2755: pa_debug.write_file(l_proc_name || ':' || pa_debug.g_err_stage);
2756: END IF;

Line 2760: pa_debug.g_err_stage := TO_CHAR(l_stage) || ':After Inserting Records into PA_BC_PACKETS.';

2756: END IF;
2757: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2758: END IF;
2759:
2760: pa_debug.g_err_stage := TO_CHAR(l_stage) || ':After Inserting Records into PA_BC_PACKETS.';
2761: IF P_DEBUG_MODE = 'Y' THEN
2762: pa_debug.write_file(l_proc_name || ':' || pa_debug.g_err_stage);
2763: END IF;
2764:

Line 2974: PROCEDURE populate_pa_bc_packets_cwk( x_return_status OUT NOCOPY NUMBER

2970: x_error_code := TO_CHAR(SQLCODE) || SQLERRM ;
2971: x_error_stage := l_stage ;
2972: END costing_fc_proc_cwk;
2973: --------------------------------------------------------------------------------------
2974: PROCEDURE populate_pa_bc_packets_cwk( x_return_status OUT NOCOPY NUMBER
2975: ,x_error_code OUT NOCOPY VARCHAR2
2976: ,x_error_stage OUT NOCOPY VARCHAR2
2977: )
2978: IS

Line 3043: l_po_raw_bc_packet_id pa_bc_packets.bc_packet_id%TYPE;

3039: /*==================+
3040: | Scalar variables |
3041: +==================*/
3042:
3043: l_po_raw_bc_packet_id pa_bc_packets.bc_packet_id%TYPE;
3044: l_exp_raw_bc_packet_id pa_bc_packets.bc_packet_id%TYPE;
3045: l_cur_new_raw_amt_relieved pa_bc_packets.entered_dr%TYPE;
3046: l_cur_new_bd_amt_relieved pa_bc_packets.entered_dr%TYPE;
3047: l_debug_mode VARCHAR2(1);

Line 3044: l_exp_raw_bc_packet_id pa_bc_packets.bc_packet_id%TYPE;

3040: | Scalar variables |
3041: +==================*/
3042:
3043: l_po_raw_bc_packet_id pa_bc_packets.bc_packet_id%TYPE;
3044: l_exp_raw_bc_packet_id pa_bc_packets.bc_packet_id%TYPE;
3045: l_cur_new_raw_amt_relieved pa_bc_packets.entered_dr%TYPE;
3046: l_cur_new_bd_amt_relieved pa_bc_packets.entered_dr%TYPE;
3047: l_debug_mode VARCHAR2(1);
3048: l_proc_name VARCHAR2(50) := 'populate_pa_bc_packets_cwk';

Line 3045: l_cur_new_raw_amt_relieved pa_bc_packets.entered_dr%TYPE;

3041: +==================*/
3042:
3043: l_po_raw_bc_packet_id pa_bc_packets.bc_packet_id%TYPE;
3044: l_exp_raw_bc_packet_id pa_bc_packets.bc_packet_id%TYPE;
3045: l_cur_new_raw_amt_relieved pa_bc_packets.entered_dr%TYPE;
3046: l_cur_new_bd_amt_relieved pa_bc_packets.entered_dr%TYPE;
3047: l_debug_mode VARCHAR2(1);
3048: l_proc_name VARCHAR2(50) := 'populate_pa_bc_packets_cwk';
3049: l_i_raw_po_rec NUMBER;

Line 3046: l_cur_new_bd_amt_relieved pa_bc_packets.entered_dr%TYPE;

3042:
3043: l_po_raw_bc_packet_id pa_bc_packets.bc_packet_id%TYPE;
3044: l_exp_raw_bc_packet_id pa_bc_packets.bc_packet_id%TYPE;
3045: l_cur_new_raw_amt_relieved pa_bc_packets.entered_dr%TYPE;
3046: l_cur_new_bd_amt_relieved pa_bc_packets.entered_dr%TYPE;
3047: l_debug_mode VARCHAR2(1);
3048: l_proc_name VARCHAR2(50) := 'populate_pa_bc_packets_cwk';
3049: l_i_raw_po_rec NUMBER;
3050: l_records_affected NUMBER := 0;

Line 3048: l_proc_name VARCHAR2(50) := 'populate_pa_bc_packets_cwk';

3044: l_exp_raw_bc_packet_id pa_bc_packets.bc_packet_id%TYPE;
3045: l_cur_new_raw_amt_relieved pa_bc_packets.entered_dr%TYPE;
3046: l_cur_new_bd_amt_relieved pa_bc_packets.entered_dr%TYPE;
3047: l_debug_mode VARCHAR2(1);
3048: l_proc_name VARCHAR2(50) := 'populate_pa_bc_packets_cwk';
3049: l_i_raw_po_rec NUMBER;
3050: l_records_affected NUMBER := 0;
3051: l_stage VARCHAR2(300) ;
3052: i NUMBER := 0;

Line 3106: pa_debug.init_err_stack('pa_bc_costing.populate_pa_bc_packets_cwk');

3102: END ;
3103:
3104: BEGIN
3105:
3106: pa_debug.init_err_stack('pa_bc_costing.populate_pa_bc_packets_cwk');
3107:
3108: fnd_profile.get('PA_DEBUG_MODE',l_debug_mode);
3109: l_debug_mode := NVL(l_debug_mode, 'Y');
3110:

Line 3138: | Select summary information from either pa_bc_packets or |

3134: +========================================================*/
3135: IF ( l_line_num_tab(i) = 1 )
3136: THEN
3137: /*====================================================================+
3138: | Select summary information from either pa_bc_packets or |
3139: | pa_bc_commitments_all. Populate the summary information into |
3140: | host plsql tables. |
3141: | If the summary information of the current txn already exist in the |
3142: | plsql table, proceed with further processing. Otherwise get the |

Line 3203: | try pa_bc_packets. |

3199: RAISE;
3200: END; -- anonymous block
3201: /*=================================================+
3202: | If a record is not found in pa_bc_commitments, |
3203: | try pa_bc_packets. |
3204: +=================================================*/
3205: /*=========================================+
3206: | Bug 4230083 : Added 'C' to status_code. |
3207: +=========================================*/

Line 3210: pa_debug.g_err_stage := 'Hitting PA_BC_PACKETS for Summary record';

3206: | Bug 4230083 : Added 'C' to status_code. |
3207: +=========================================*/
3208: IF ( l_temp_Tot_Raw_Amt_tab.COUNT = 0 )
3209: THEN
3210: pa_debug.g_err_stage := 'Hitting PA_BC_PACKETS for Summary record';
3211: pa_debug.write_file(l_stage || pa_debug.g_err_stage);
3212: BEGIN
3213: SELECT pabc.Comm_Tot_Raw_Amt
3214: ,pabc.Comm_Tot_Bd_Amt

Line 3220: ,'PA_BC_PACKETS'

3216: ,pabc.Comm_Bd_Amt_Relieved
3217: ,pabc.compiled_multiplier
3218: ,pabc.parent_bc_packet_id
3219: ,pabc.expenditure_type
3220: ,'PA_BC_PACKETS'
3221: BULK COLLECT
3222: INTO l_temp_Tot_Raw_Amt_tab
3223: ,l_temp_Tot_Bd_Amt_tab
3224: ,l_temp_Raw_Amt_Relieved_tab

Line 3230: FROM pa_bc_packets pabc

3226: ,l_temp_compiled_multiplier_tab
3227: ,l_temp_parent_bc_packet_id_tab
3228: ,l_temp_expenditure_type_tab
3229: ,l_temp_comm_source_tab
3230: FROM pa_bc_packets pabc
3231: WHERE pabc.document_header_id = l_document_header_id_tab(i)
3232: AND pabc.document_line_id = l_document_line_id_tab(i)
3233: AND pabc.project_id = l_project_id_tab(i)
3234: AND pabc.task_id = l_task_id_tab(i)

Line 3380: | inserted into pa_bc_packets. |

3376: /*=========================================================+
3377: | Step 1 : Populate Raw PO relieving record. |
3378: | |
3379: | Note :- ins_rec is the index for the plsql tables to be |
3380: | inserted into pa_bc_packets. |
3381: +=========================================================*/
3382: pa_debug.g_err_stage := 'Inserting Raw PO relieving record.';
3383: pa_debug.write_file(l_stage || pa_debug.g_err_stage);
3384: ins_rec := ins_rec + 1;

Line 3394: SELECT pa_bc_packets_s.NEXTVAL

3390: l_ins_document_dist_id_tab(ins_rec) := -9999;
3391:
3392: BEGIN
3393: pa_debug.g_err_stage := 'ORACLE error selecting sequence';
3394: SELECT pa_bc_packets_s.NEXTVAL
3395: INTO l_ins_bc_packet_id_tab(ins_rec)
3396: FROM DUAL;
3397: EXCEPTION
3398: WHEN OTHERS THEN

Line 3473: SELECT pa_bc_packets_s.NEXTVAL

3469: +===========================================================*/
3470: l_ins_document_dist_id_tab(ins_rec) := -9999;
3471:
3472: BEGIN
3473: SELECT pa_bc_packets_s.NEXTVAL
3474: INTO l_ins_bc_packet_id_tab(ins_rec)
3475: FROM DUAL;
3476: EXCEPTION
3477: WHEN OTHERS THEN RAISE;

Line 3668: SELECT pa_bc_packets_s.NEXTVAL

3664: | on Prithi's advice. |
3665: +===========================================================*/
3666: l_ins_document_dist_id_tab(ins_rec) := -9999;
3667: BEGIN
3668: SELECT pa_bc_packets_s.NEXTVAL
3669: INTO l_ins_bc_packet_id_tab(ins_rec)
3670: FROM DUAL;
3671: EXCEPTION
3672: WHEN OTHERS THEN RAISE;

Line 3715: SELECT pa_bc_packets_s.NEXTVAL

3711: pa_debug.g_err_stage := 'Inserting raw EXP record ins_rec is [' || to_char(ins_rec) || ']';
3712: pa_debug.write_file(l_stage || pa_debug.g_err_stage);
3713: copy_common_attributes( i ,ins_rec );
3714: BEGIN
3715: SELECT pa_bc_packets_s.NEXTVAL
3716: INTO l_ins_bc_packet_id_tab(ins_rec)
3717: FROM DUAL;
3718: EXCEPTION
3719: WHEN OTHERS THEN RAISE;

Line 3749: SELECT pa_bc_packets_s.NEXTVAL

3745: pa_debug.g_err_stage := 'inserting burden same line exp record ins_rec is [' || to_char(ins_rec) || ']';
3746: pa_debug.write_file(l_stage || pa_debug.g_err_stage);
3747: copy_common_attributes( i ,ins_rec );
3748: BEGIN
3749: SELECT pa_bc_packets_s.NEXTVAL
3750: INTO l_ins_bc_packet_id_tab(ins_rec)
3751: FROM DUAL;
3752: EXCEPTION
3753: WHEN OTHERS THEN RAISE;

Line 3786: SELECT pa_bc_packets_s.NEXTVAL

3782: ins_rec := ins_rec + 1;
3783: pa_debug.write_file('inserting burden sep line exp record ins_rec is [' || to_char(ins_rec) || ']');
3784: copy_common_attributes( i ,ins_rec );
3785: BEGIN
3786: SELECT pa_bc_packets_s.NEXTVAL
3787: INTO l_ins_bc_packet_id_tab(ins_rec)
3788: FROM DUAL;
3789: EXCEPTION
3790: WHEN OTHERS THEN RAISE;

Line 3882: | Insert into pa_bc_packets. |

3878: pa_debug.write_file(pa_debug.g_err_stage);
3879: END LOOP;
3880: END IF;
3881: /*==================================+
3882: | Insert into pa_bc_packets. |
3883: +==================================*/
3884: /* ?????????? This IF is added because the update gives numeric/value error
3885: * when there are no records to insert. Ideally this should not happen. This
3886: * has to be figured out. ??????????????????

Line 3893: pa_debug.g_err_stage := 'ORACLE error while Inserting PA_BC_PACKETS.' ;

3889: THEN
3890: pa_debug.g_err_stage := 'Before inserting into pa_bc_pacets';
3891: pa_debug.write_file(l_stage || pa_debug.g_err_stage);
3892:
3893: pa_debug.g_err_stage := 'ORACLE error while Inserting PA_BC_PACKETS.' ;
3894: FORALL ins_rec IN l_ins_packet_id_tab.FIRST .. l_ins_packet_id_tab.LAST
3895: INSERT
3896: INTO pa_bc_packets( packet_id
3897: ,project_id

Line 3896: INTO pa_bc_packets( packet_id

3892:
3893: pa_debug.g_err_stage := 'ORACLE error while Inserting PA_BC_PACKETS.' ;
3894: FORALL ins_rec IN l_ins_packet_id_tab.FIRST .. l_ins_packet_id_tab.LAST
3895: INSERT
3896: INTO pa_bc_packets( packet_id
3897: ,project_id
3898: ,task_id
3899: ,budget_version_id
3900: ,expenditure_type

Line 3988: '] Records into pa_bc_packets.';

3984:
3985: l_records_affected := SQL%ROWCOUNT;
3986:
3987: pa_debug.g_err_stage := 'Inserted [' || TO_CHAR(l_records_affected) ||
3988: '] Records into pa_bc_packets.';
3989: pa_debug.write_file(l_stage || pa_debug.g_err_stage);
3990:
3991: /*==========================+
3992: | Deleting plsql tables. |

Line 4050: pa_debug.g_err_stage := 'Leaving populate_pa_bc_packets_cwk.' ;

4046: pa_debug.write_file(l_stage || pa_debug.g_err_stage);
4047:
4048: COMMIT;
4049:
4050: pa_debug.g_err_stage := 'Leaving populate_pa_bc_packets_cwk.' ;
4051: pa_debug.write_file(l_stage || pa_debug.g_err_stage);
4052:
4053: pa_debug.reset_err_stack;
4054: EXCEPTION

Line 4062: END; -- populate_pa_bc_packets_cwk

4058: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
4059: x_error_code := TO_CHAR(SQLCODE) || SQLERRM ;
4060: x_error_stage := l_stage ;
4061: RAISE;
4062: END; -- populate_pa_bc_packets_cwk
4063: --------------------------------------------------------------------------------------
4064:
4065:
4066: END pa_bc_costing;