DBA Data[Home] [Help]

APPS.PA_TXN_ACCUMS dependencies on PA_TXN_ACCUM

Line 1: PACKAGE BODY PA_TXN_ACCUMS AS

1: PACKAGE BODY PA_TXN_ACCUMS AS
2: /* $Header: PATXNACB.pls 120.13.12020000.7 2013/04/23 06:31:36 bpottipa ship $ */
3:
4: -- Initialize function
5:

Line 409: -- actual cost. The following from pa_txn_accum table is

405: END refresh_txn_accum;
406:
407: -- Procedure for refreshing transaction accum for actual costs
408: -- This procedure will refresh the transaction accum table for
409: -- actual cost. The following from pa_txn_accum table is
410: -- refreshed
411: -- tot_raw_cost
412: -- tot_burdened_cost
413: -- tot_quantity

Line 450: pa_txn_accum pta

446: pa_debug.debug('refresh_act_txn_accum: ' || x_err_stage);
447: END IF;
448:
449: UPDATE
450: pa_txn_accum pta
451: SET
452: pta.tot_raw_cost = NULL,
453: pta.tot_burdened_cost = NULL,
454: pta.tot_quantity = NULL,

Line 482: FROM pa_txn_accum_details ptad

478: AND pta.system_linkage_function =
479: NVL(x_system_linkage_function,pta.system_linkage_function)
480: AND EXISTS
481: ( SELECT 'Yes'
482: FROM pa_txn_accum_details ptad
483: WHERE pta.txn_accum_id = ptad.txn_accum_id
484: AND ptad.line_type = 'C'
485: )
486: AND EXISTS

Line 508: -- revenue. The following from pa_txn_accum table is

504: END refresh_act_txn_accum;
505:
506: -- Procedure for refreshing transaction accum for Revenue
507: -- This procedure will refresh the transaction accum table for
508: -- revenue. The following from pa_txn_accum table is
509: -- refreshed
510: -- tot_revenue
511: -- i_tot_revenue
512:

Line 531: pa_txn_accum pta

527: pa_debug.debug('refresh_rev_txn_accum: ' || x_err_stage);
528: END IF;
529:
530: UPDATE
531: pa_txn_accum pta
532: SET
533: pta.tot_revenue = NULL,
534: pta.i_tot_revenue = NULL,
535: pta.revenue_rollup_flag = 'N',

Line 546: FROM pa_txn_accum_details ptad

542: WHERE
543: pta.project_id = x_start_project_id -- BETWEEN x_start_project_id AND x_end_project_id -- Commented for bug 3736097
544: AND EXISTS
545: ( SELECT 'Yes'
546: FROM pa_txn_accum_details ptad
547: WHERE pta.txn_accum_id = ptad.txn_accum_id
548: AND ptad.line_type IN ('R','E')
549: )
550: AND EXISTS

Line 572: -- commitment cost. The following from pa_txn_accum table is

568: END refresh_rev_txn_accum;
569:
570: -- Procedure for refreshing transaction accum for commitment costs
571: -- This procedure will refresh the transaction accum table for
572: -- commitment cost. The following from pa_txn_accum table is
573: -- refreshed
574:
575: PROCEDURE refresh_cmt_txn_accum
576: ( x_start_project_id IN NUMBER,

Line 593: pa_txn_accum pta

589: pa_debug.debug('refresh_cmt_txn_accum: ' || x_err_stage);
590: END IF;
591:
592: UPDATE /*+ leading(PTA) */ /* 10144700 */
593: pa_txn_accum pta
594: SET
595: pta.tot_cmt_raw_cost = NULL,
596: pta.tot_cmt_burdened_cost = NULL,
597: pta.cmt_rollup_flag = 'N',

Line 611: FROM pa_txn_accum_details ptad

607: AND NVL(pta.system_linkage_function,'X') =
608: NVL(NVL(x_system_linkage_function,pta.system_linkage_function),'X')
609: AND EXISTS
610: ( SELECT /*+ NO_UNNEST push_subq */ 'Yes' /* 10144700 */
611: FROM pa_txn_accum_details ptad
612: WHERE pta.txn_accum_id = ptad.txn_accum_id
613: AND ptad.line_type = 'M'
614: )
615: AND EXISTS

Line 653: pa_txn_accum pta

649: pa_debug.debug('update_act_txn_accum: ' || x_err_stage);
650: END IF;
651:
652: UPDATE
653: pa_txn_accum pta
654: SET
655: pta.i_tot_raw_cost = DECODE(raw_cost_flag,'Y',
656: (NVL(i_tot_raw_cost, 0) + NVL(tot_raw_cost,0)), NULL),
657: pta.i_tot_burdened_cost = DECODE(burdened_cost_flag,'Y',

Line 705: FROM pa_txn_accum_details ptad

701: pta.project_id BETWEEN x_start_project_id AND x_end_project_id
702: AND pta.request_id <> x_request_id
703: AND EXISTS
704: ( SELECT 'Yes'
705: FROM pa_txn_accum_details ptad
706: WHERE pta.txn_accum_id = ptad.txn_accum_id
707: AND ptad.line_type IN ('C','R','E')
708: );
709:

Line 750: DELETE pa_txn_accum_details ptad

746: pa_debug.debug('delete_act_txn_accum_details: ' || x_err_stage);
747: END IF;
748:
749: LOOP
750: DELETE pa_txn_accum_details ptad
751: WHERE txn_accum_id IN
752: (SELECT txn_accum_id FROM pa_txn_accum pta
753: WHERE
754: pta.project_id = x_start_project_id -- BETWEEN x_start_project_id AND x_end_project_id -- Commented for bug 3736097

Line 752: (SELECT txn_accum_id FROM pa_txn_accum pta

748:
749: LOOP
750: DELETE pa_txn_accum_details ptad
751: WHERE txn_accum_id IN
752: (SELECT txn_accum_id FROM pa_txn_accum pta
753: WHERE
754: pta.project_id = x_start_project_id -- BETWEEN x_start_project_id AND x_end_project_id -- Commented for bug 3736097
755: AND pta.system_linkage_function =
756: NVL(x_system_linkage_function,pta.system_linkage_function)

Line 820: DELETE pa_txn_accum_details ptad

816: pa_debug.debug('delete_rev_txn_accum_details: ' || x_err_stage);
817: END IF;
818:
819: LOOP
820: DELETE pa_txn_accum_details ptad
821: WHERE txn_accum_id IN
822: (SELECT txn_accum_id FROM pa_txn_accum pta
823: WHERE
824: pta.project_id = x_start_project_id -- BETWEEN x_start_project_id AND x_end_project_id Commented for bug 3736097

Line 822: (SELECT txn_accum_id FROM pa_txn_accum pta

818:
819: LOOP
820: DELETE pa_txn_accum_details ptad
821: WHERE txn_accum_id IN
822: (SELECT txn_accum_id FROM pa_txn_accum pta
823: WHERE
824: pta.project_id = x_start_project_id -- BETWEEN x_start_project_id AND x_end_project_id Commented for bug 3736097
825: AND EXISTS
826: ( SELECT 'Yes'

Line 890: DELETE pa_txn_accum_details ptad

886: pa_debug.debug('delete_cmt_txn_accum_details: ' || x_err_stage);
887: END IF;
888:
889: LOOP
890: DELETE pa_txn_accum_details ptad
891: WHERE txn_accum_id IN
892: (SELECT txn_accum_id FROM pa_txn_accum pta
893: WHERE
894: pta.project_id = x_start_project_id -- BETWEEN x_start_project_id AND x_end_project_id Commented out for bug 3736097

Line 892: (SELECT txn_accum_id FROM pa_txn_accum pta

888:
889: LOOP
890: DELETE pa_txn_accum_details ptad
891: WHERE txn_accum_id IN
892: (SELECT txn_accum_id FROM pa_txn_accum pta
893: WHERE
894: pta.project_id = x_start_project_id -- BETWEEN x_start_project_id AND x_end_project_id Commented out for bug 3736097
895: AND NVL(pta.system_linkage_function,'X') =
896: NVL(NVL(x_system_linkage_function,pta.system_linkage_function),'X')

Line 950: INSERT INTO pa_txn_accum_details

946: BEGIN
947: x_err_code :=0;
948: x_err_stage := 'Creating transaction accum details';
949:
950: INSERT INTO pa_txn_accum_details
951: (txn_accum_id,
952: line_type,
953: expenditure_item_id,
954: line_num,

Line 993: -- Exit in the PA_TXN_ACCUM table

989:
990: END create_txn_accum_details;
991:
992: -- This procedure checks if a combinations of given column
993: -- Exit in the PA_TXN_ACCUM table
994: -- x_line_type represent the type fo line
995: -- i.e. 'C' for CDL, 'R' for revenue and 'M' for commitments
996: -- If combination does not exist it will create the row
997: -- and returns the primary key TXN_ACCUM_ID and Status

Line 1030: is_row_found := 1; /* Assume a row exist in pa_txn_accum */

1026: IS
1027: is_row_found NUMBER;
1028: BEGIN
1029:
1030: is_row_found := 1; /* Assume a row exist in pa_txn_accum */
1031: x_err_code := 0;
1032: x_err_stage := 'Creating transaction accums';
1033:
1034: <>

Line 1044: SELECT /*+ index(pta PA_TXN_ACCUM_N2)*/ txn_accum_id -- Added hint for bug 4504019

1040: -- Seperating processing where person_id is null/not null
1041: -- to take advantage of index on person_id
1042: IF ( x_person_id IS NOT NULL ) THEN
1043: -- person_id is not null
1044: SELECT /*+ index(pta PA_TXN_ACCUM_N2)*/ txn_accum_id -- Added hint for bug 4504019
1045: INTO x_txn_accum_id
1046: FROM pa_txn_accum pta
1047: WHERE x_project_id = pta.project_id
1048: AND x_task_Id = pta.task_id

Line 1046: FROM pa_txn_accum pta

1042: IF ( x_person_id IS NOT NULL ) THEN
1043: -- person_id is not null
1044: SELECT /*+ index(pta PA_TXN_ACCUM_N2)*/ txn_accum_id -- Added hint for bug 4504019
1045: INTO x_txn_accum_id
1046: FROM pa_txn_accum pta
1047: WHERE x_project_id = pta.project_id
1048: AND x_task_Id = pta.task_id
1049: AND x_pa_period = pta.pa_period
1050: AND x_gl_period = pta.gl_period

Line 1077: FROM pa_txn_accum pta

1073: ELSE
1074: -- When person_id is not available
1075: SELECT txn_accum_id
1076: INTO x_txn_accum_id
1077: FROM pa_txn_accum pta
1078: WHERE x_project_id = pta.project_id
1079: AND x_task_Id = pta.task_id
1080: AND x_pa_period = pta.pa_period
1081: AND x_gl_period = pta.gl_period

Line 1109: FROM pa_txn_accum pta

1105: ELSE
1106: /* Process Event Here */
1107: SELECT txn_accum_id
1108: INTO x_txn_accum_id
1109: FROM pa_txn_accum pta
1110: WHERE x_project_id = pta.project_id
1111: AND x_task_Id = pta.task_id
1112: AND x_pa_period = pta.pa_period
1113: AND x_gl_period = pta.gl_period

Line 1134: SELECT pa_txn_accum_s.NEXTVAL

1130: IF ( is_row_found = 0 ) THEN
1131: --- Could not find a row, for the given transaction attributes
1132: BEGIN
1133:
1134: SELECT pa_txn_accum_s.NEXTVAL
1135: INTO x_txn_accum_Id
1136: FROM SYS.DUAL;
1137:
1138: -- Insert a row in PA_TXN_ACCUM now

Line 1138: -- Insert a row in PA_TXN_ACCUM now

1134: SELECT pa_txn_accum_s.NEXTVAL
1135: INTO x_txn_accum_Id
1136: FROM SYS.DUAL;
1137:
1138: -- Insert a row in PA_TXN_ACCUM now
1139:
1140: INSERT INTO PA_TXN_ACCUM (
1141: txn_accum_id,
1142: project_id,

Line 1140: INSERT INTO PA_TXN_ACCUM (

1136: FROM SYS.DUAL;
1137:
1138: -- Insert a row in PA_TXN_ACCUM now
1139:
1140: INSERT INTO PA_TXN_ACCUM (
1141: txn_accum_id,
1142: project_id,
1143: task_Id,
1144: pa_period,

Line 1491: pa_txn_accums.cmt_line_id,

1487: RESOURCE_CLASS ,
1488: CBS_ELEMENT_ID --16461684
1489: )
1490: SELECT
1491: pa_txn_accums.cmt_line_id,
1492: pctv.project_id,
1493: pctv.task_id,
1494: pctv.transaction_source,
1495: decode(pctv.line_type,'P','P','R','R','I','I','O'),/*Bug 4050269*/

Line 1701: pa_txn_accums.cmt_line_id,

1697: BOM_EQUIPMENT_RESOURCE_ID,
1698: RESOURCE_CLASS
1699: )
1700: SELECT
1701: pa_txn_accums.cmt_line_id,
1702: pctv.project_id,
1703: pctv.task_id,
1704: pctv.transaction_source,
1705: pctv.line_type,/*Bug 4050269*/

Line 2533: -- pa_txn_accum depending if the UNIT_OF_MEASURE is 'HOURS'

2529:
2530: -- This procedure accumulates the actual cost txn in the given
2531: -- txn_accum_id. The quantity figures are accumulated in
2532: -- either tot_quantity or tot_labor_hours column on
2533: -- pa_txn_accum depending if the UNIT_OF_MEASURE is 'HOURS'
2534: -- We are assuming that for a given expenditure type we
2535: -- can have only one and only one UNIT_OF_MEASURE
2536: -- Since expenditure types is one of the transaction attributes
2537: -- for a row in pa_txn_accum it will have only one and only one

Line 2537: -- for a row in pa_txn_accum it will have only one and only one

2533: -- pa_txn_accum depending if the UNIT_OF_MEASURE is 'HOURS'
2534: -- We are assuming that for a given expenditure type we
2535: -- can have only one and only one UNIT_OF_MEASURE
2536: -- Since expenditure types is one of the transaction attributes
2537: -- for a row in pa_txn_accum it will have only one and only one
2538: -- value for UNIT_OF_MEASURE
2539:
2540: /* Start of Code changes for bug 13448783 */
2541: PROCEDURE accum_act_txn

Line 2565: UPDATE pa_txn_accum pta

2561:
2562: If x_txn_accum_id_tb2.COUNT > 0 THEN
2563: FORALL i in x_txn_accum_id_tb2.FIRST .. x_txn_accum_id_tb2.LAST
2564:
2565: UPDATE pa_txn_accum pta
2566: SET pta.i_tot_raw_cost = DECODE(raw_cost_flag,'Y',
2567: (NVL(i_tot_raw_cost, 0) + x_tot_raw_cost_tb2(i)),
2568: NULL),
2569: pta.i_tot_burdened_cost = DECODE(burdened_cost_flag,'Y',

Line 2634: UPDATE pa_txn_accum pta

2630: x_err_code :=0;
2631: x_err_stage := 'Accumulating Revenue transactions';
2632:
2633: -- accumulate revenue now
2634: UPDATE pa_txn_accum pta
2635: SET pta.i_tot_revenue = DECODE(revenue_flag,'Y',
2636: (NVL(i_tot_revenue, 0) +
2637: x_tot_revenue),NULL),
2638: pta.unit_of_measure = x_unit_of_measure,

Line 2676: UPDATE pa_txn_accum pta

2672:
2673: /* Bug# 1239605 - Included NVL for x_tot_cmt_raw_cost and
2674: x_tot_burdened_cost in the following update */
2675:
2676: UPDATE pa_txn_accum pta
2677: SET pta.tot_cmt_raw_cost = DECODE(cmt_raw_cost_flag,'Y',
2678: (NVL(tot_cmt_raw_cost, 0) +
2679: NVL(x_tot_cmt_raw_cost,0)),NULL),
2680: pta.tot_cmt_burdened_cost = DECODE(cmt_burdened_cost_flag,'Y',

Line 2713: -- and related entities for inserting into pa_txn_accum table when

2709: --
2710: -- 13-OCT-2002 Sacgupta Bug # 2580808.
2711: -- Modified for the Enhanced Period Processing effort.
2712: -- Fetching PA period name and GL period name from gl_date_period_map
2713: -- and related entities for inserting into pa_txn_accum table when
2714: -- GL and PA period name columns on cdl are null.
2715: --
2716: -- 05-NOV-2002 Sacgupta Bug # 2650900.
2717: -- Removed the condition x_mode <> I. So now both Update process and

Line 2720: -- pa_txn_accum table when GL and PA period name columns on cdl are null.

2716: -- 05-NOV-2002 Sacgupta Bug # 2650900.
2717: -- Removed the condition x_mode <> I. So now both Update process and
2718: -- Refresh process will fetch PA period name and GL period name from
2719: -- gl_date_period_map and related entities for inserting into
2720: -- pa_txn_accum table when GL and PA period name columns on cdl are null.
2721: --
2722: -- 20-MAY-2003 jwhite For r11i.PA.L Burdening Enhancements, modified the following
2723: -- cursors: selcdls1, selcdls2, selcdls3.
2724: --

Line 3032: -- Create a row for drilldown in pa_txn_accume_details Now

3028: x_txn_accum_id,
3029: x_err_stage,
3030: x_err_code);
3031:
3032: -- Create a row for drilldown in pa_txn_accume_details Now
3033:
3034: create_txn_accum_details(
3035: x_txn_accum_id,
3036: 'C', -- CDLS

Line 3166: -- and related entities for inserting into pa_txn_accum table when

3162: --
3163: -- 13-OCT-2002 Sacgupta Bug # 2580808.
3164: -- Modified for the Enhanced Period Processing effort.
3165: -- Fetching PA period name and GL period name from gl_date_period_map
3166: -- and related entities for inserting into pa_txn_accum table when
3167: -- GL and PA period name columns on rdl are null.
3168: --
3169: -- 05-NOV-2002 Sacgupta Bug # 2650900.
3170: -- Removed the condition x_mode <> I. So now both Update process and

Line 3173: -- pa_txn_accum table when GL and PA period name columns on rdl are null.

3169: -- 05-NOV-2002 Sacgupta Bug # 2650900.
3170: -- Removed the condition x_mode <> I. So now both Update process and
3171: -- Refresh process will fetch PA period name and GL period name from
3172: -- gl_date_period_map and related entities for inserting into
3173: -- pa_txn_accum table when GL and PA period name columns on rdl are null.
3174: --
3175: -- 07-Jul-2004 Sacgupta Bug # 3736097.
3176: -- Commented out all occurence of x_end_project_id.
3177: -- This is done because all the processing is done for a

Line 3334: -- Create a row for drilldown in pa_txn_accum_details Now

3330: x_txn_accum_id,
3331: x_err_stage,
3332: x_err_code);
3333:
3334: -- Create a row for drilldown in pa_txn_accum_details Now
3335:
3336: create_txn_accum_details(
3337: x_txn_accum_id,
3338: 'R', -- RDLS

Line 3394: -- and related entities for inserting into pa_txn_accum table when

3390: --
3391: -- 13-OCT-2002 Sacgupta Bug # 2580808.
3392: -- Modified for the Enhanced Period Processing effort.
3393: -- Fetching PA period name and GL period name from gl_date_period_map
3394: -- and related entities for inserting into pa_txn_accum table when
3395: -- GL and PA period name columns on erdls are null.
3396: --
3397: -- 05-NOV-2002 Sacgupta Bug # 2650900.
3398: -- Removed the condition x_mode <> I. So now both Update process and

Line 3401: -- pa_txn_accum table when GL and PA period name columns on erdls are null.

3397: -- 05-NOV-2002 Sacgupta Bug # 2650900.
3398: -- Removed the condition x_mode <> I. So now both Update process and
3399: -- Refresh process will fetch PA period name and GL period name from
3400: -- gl_date_period_map and related entities for inserting into
3401: -- pa_txn_accum table when GL and PA period name columns on erdls are null.
3402: --
3403: -- 07-JUL-2004 Sacgupta Bug # 3736097.
3404: -- Commented out all occurence of x_end_project_id.
3405: -- This is done because all the processing is done for a

Line 3552: -- Create a row for drilldown in pa_txn_accum_details Now

3548: x_txn_accum_id,
3549: x_err_stage,
3550: x_err_code);
3551:
3552: -- Create a row for drilldown in pa_txn_accum_details Now
3553:
3554: create_txn_accum_details(
3555: x_txn_accum_id,
3556: 'E', -- ERDLS

Line 3613: -- and related entities for inserting into pa_txn_accum table when

3609: --
3610: -- 13-OCT-2002 Sacgupta Bug # 2580808.
3611: -- Modified for the Enhanced Period Processing effort.
3612: -- Fetching PA period name and GL period name from gl_date_period_map
3613: -- and related entities for inserting into pa_txn_accum table when
3614: -- GL and PA period name columns on rdl are null.
3615: --
3616: -- 05-NOV-2002 Sacgupta Bug # 2650900.
3617: -- Removed the condition x_mode <> I. So now both Update process and

Line 3620: -- pa_txn_accum table when GL and PA period name columns on rdl are null.

3616: -- 05-NOV-2002 Sacgupta Bug # 2650900.
3617: -- Removed the condition x_mode <> I. So now both Update process and
3618: -- Refresh process will fetch PA period name and GL period name from
3619: -- gl_date_period_map and related entities for inserting into
3620: -- pa_txn_accum table when GL and PA period name columns on rdl are null.
3621: --
3622: -- 07-JUL-2004 Sacgupta Bug # 3736097.
3623: -- Commented out all occurence of x_end_project_id.
3624: -- This is done because all the processing is done for a

Line 3855: -- Create a row for drilldown in pa_txn_accum_details Now

3851: x_txn_accum_id,
3852: x_err_stage,
3853: x_err_code);
3854:
3855: -- Create a row for drilldown in pa_txn_accum_details Now
3856:
3857: create_txn_accum_details(
3858: x_txn_accum_id,
3859: rdlrec.line_type, -- RDLS

Line 4124: -- Create a row for drilldown in pa_txn_accume_details Now

4120: x_txn_accum_id,
4121: x_err_stage,
4122: x_err_code);
4123:
4124: -- Create a row for drilldown in pa_txn_accume_details Now
4125:
4126: create_txn_accum_details(
4127: x_txn_accum_id,
4128: 'M', -- pa_commitments_txns

Line 4321: END PA_TXN_ACCUMS;

4317: RAISE;
4318:
4319: END accum_commitments;
4320:
4321: END PA_TXN_ACCUMS;