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.6.12000000.2 2007/04/10 09:34:19 degupta 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
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 'Yes'
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 1485: pa_txn_accums.cmt_line_id,

1481: BOM_EQUIPMENT_RESOURCE_ID,
1482: RESOURCE_CLASS
1483: )
1484: SELECT
1485: pa_txn_accums.cmt_line_id,
1486: pctv.project_id,
1487: pctv.task_id,
1488: pctv.transaction_source,
1489: decode(pctv.line_type,'P','P','R','R','I','I','O'),/*Bug 4050269*/

Line 1675: pa_txn_accums.cmt_line_id,

1671: BOM_EQUIPMENT_RESOURCE_ID,
1672: RESOURCE_CLASS
1673: )
1674: SELECT
1675: pa_txn_accums.cmt_line_id,
1676: pctv.project_id,
1677: pctv.task_id,
1678: pctv.transaction_source,
1679: pctv.line_type,/*Bug 4050269*/

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

2444:
2445: -- This procedure accumulates the actual cost txn in the given
2446: -- txn_accum_id. The quantity figures are accumulated in
2447: -- either tot_quantity or tot_labor_hours column on
2448: -- pa_txn_accum depending if the UNIT_OF_MEASURE is 'HOURS'
2449: -- We are assuming that for a given expenditure type we
2450: -- can have only one and only one UNIT_OF_MEASURE
2451: -- Since expenditure types is one of the transaction attributes
2452: -- for a row in pa_txn_accum it will have only one and only one

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

2448: -- pa_txn_accum depending if the UNIT_OF_MEASURE is 'HOURS'
2449: -- We are assuming that for a given expenditure type we
2450: -- can have only one and only one UNIT_OF_MEASURE
2451: -- Since expenditure types is one of the transaction attributes
2452: -- for a row in pa_txn_accum it will have only one and only one
2453: -- value for UNIT_OF_MEASURE
2454:
2455: PROCEDURE accum_act_txn
2456: ( x_txn_accum_id IN NUMBER,

Line 2476: UPDATE pa_txn_accum pta

2472: -- to labor_hours and billable_labor_hours as well
2473:
2474: x_err_stage := 'Accumulating Actual Cost transaction';
2475:
2476: UPDATE pa_txn_accum pta
2477: SET pta.i_tot_raw_cost = DECODE(raw_cost_flag,'Y',
2478: (NVL(i_tot_raw_cost, 0) + x_tot_raw_cost),
2479: NULL),
2480: pta.i_tot_burdened_cost = DECODE(burdened_cost_flag,'Y',

Line 2543: UPDATE pa_txn_accum pta

2539: x_err_code :=0;
2540: x_err_stage := 'Accumulating Revenue transactions';
2541:
2542: -- accumulate revenue now
2543: UPDATE pa_txn_accum pta
2544: SET pta.i_tot_revenue = DECODE(revenue_flag,'Y',
2545: (NVL(i_tot_revenue, 0) +
2546: x_tot_revenue),NULL),
2547: pta.unit_of_measure = x_unit_of_measure,

Line 2585: UPDATE pa_txn_accum pta

2581:
2582: /* Bug# 1239605 - Included NVL for x_tot_cmt_raw_cost and
2583: x_tot_burdened_cost in the following update */
2584:
2585: UPDATE pa_txn_accum pta
2586: SET pta.tot_cmt_raw_cost = DECODE(cmt_raw_cost_flag,'Y',
2587: (NVL(tot_cmt_raw_cost, 0) +
2588: NVL(x_tot_cmt_raw_cost,0)),NULL),
2589: pta.tot_cmt_burdened_cost = DECODE(cmt_burdened_cost_flag,'Y',

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

2618: --
2619: -- 13-OCT-2002 Sacgupta Bug # 2580808.
2620: -- Modified for the Enhanced Period Processing effort.
2621: -- Fetching PA period name and GL period name from gl_date_period_map
2622: -- and related entities for inserting into pa_txn_accum table when
2623: -- GL and PA period name columns on cdl are null.
2624: --
2625: -- 05-NOV-2002 Sacgupta Bug # 2650900.
2626: -- Removed the condition x_mode <> I. So now both Update process and

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

2625: -- 05-NOV-2002 Sacgupta Bug # 2650900.
2626: -- Removed the condition x_mode <> I. So now both Update process and
2627: -- Refresh process will fetch PA period name and GL period name from
2628: -- gl_date_period_map and related entities for inserting into
2629: -- pa_txn_accum table when GL and PA period name columns on cdl are null.
2630: --
2631: -- 20-MAY-2003 jwhite For r11i.PA.L Burdening Enhancements, modified the following
2632: -- cursors: selcdls1, selcdls2, selcdls3.
2633: --

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

2898: x_txn_accum_id,
2899: x_err_stage,
2900: x_err_code);
2901:
2902: -- Create a row for drilldown in pa_txn_accume_details Now
2903:
2904: create_txn_accum_details(
2905: x_txn_accum_id,
2906: 'C', -- CDLS

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

2982: --
2983: -- 13-OCT-2002 Sacgupta Bug # 2580808.
2984: -- Modified for the Enhanced Period Processing effort.
2985: -- Fetching PA period name and GL period name from gl_date_period_map
2986: -- and related entities for inserting into pa_txn_accum table when
2987: -- GL and PA period name columns on rdl are null.
2988: --
2989: -- 05-NOV-2002 Sacgupta Bug # 2650900.
2990: -- Removed the condition x_mode <> I. So now both Update process and

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

2989: -- 05-NOV-2002 Sacgupta Bug # 2650900.
2990: -- Removed the condition x_mode <> I. So now both Update process and
2991: -- Refresh process will fetch PA period name and GL period name from
2992: -- gl_date_period_map and related entities for inserting into
2993: -- pa_txn_accum table when GL and PA period name columns on rdl are null.
2994: --
2995: -- 07-Jul-2004 Sacgupta Bug # 3736097.
2996: -- Commented out all occurence of x_end_project_id.
2997: -- This is done because all the processing is done for a

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

3150: x_txn_accum_id,
3151: x_err_stage,
3152: x_err_code);
3153:
3154: -- Create a row for drilldown in pa_txn_accum_details Now
3155:
3156: create_txn_accum_details(
3157: x_txn_accum_id,
3158: 'R', -- RDLS

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

3210: --
3211: -- 13-OCT-2002 Sacgupta Bug # 2580808.
3212: -- Modified for the Enhanced Period Processing effort.
3213: -- Fetching PA period name and GL period name from gl_date_period_map
3214: -- and related entities for inserting into pa_txn_accum table when
3215: -- GL and PA period name columns on erdls are null.
3216: --
3217: -- 05-NOV-2002 Sacgupta Bug # 2650900.
3218: -- Removed the condition x_mode <> I. So now both Update process and

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

3217: -- 05-NOV-2002 Sacgupta Bug # 2650900.
3218: -- Removed the condition x_mode <> I. So now both Update process and
3219: -- Refresh process will fetch PA period name and GL period name from
3220: -- gl_date_period_map and related entities for inserting into
3221: -- pa_txn_accum table when GL and PA period name columns on erdls are null.
3222: --
3223: -- 07-JUL-2004 Sacgupta Bug # 3736097.
3224: -- Commented out all occurence of x_end_project_id.
3225: -- This is done because all the processing is done for a

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

3368: x_txn_accum_id,
3369: x_err_stage,
3370: x_err_code);
3371:
3372: -- Create a row for drilldown in pa_txn_accum_details Now
3373:
3374: create_txn_accum_details(
3375: x_txn_accum_id,
3376: 'E', -- ERDLS

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

3429: --
3430: -- 13-OCT-2002 Sacgupta Bug # 2580808.
3431: -- Modified for the Enhanced Period Processing effort.
3432: -- Fetching PA period name and GL period name from gl_date_period_map
3433: -- and related entities for inserting into pa_txn_accum table when
3434: -- GL and PA period name columns on rdl are null.
3435: --
3436: -- 05-NOV-2002 Sacgupta Bug # 2650900.
3437: -- Removed the condition x_mode <> I. So now both Update process and

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

3436: -- 05-NOV-2002 Sacgupta Bug # 2650900.
3437: -- Removed the condition x_mode <> I. So now both Update process and
3438: -- Refresh process will fetch PA period name and GL period name from
3439: -- gl_date_period_map and related entities for inserting into
3440: -- pa_txn_accum table when GL and PA period name columns on rdl are null.
3441: --
3442: -- 07-JUL-2004 Sacgupta Bug # 3736097.
3443: -- Commented out all occurence of x_end_project_id.
3444: -- This is done because all the processing is done for a

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

3671: x_txn_accum_id,
3672: x_err_stage,
3673: x_err_code);
3674:
3675: -- Create a row for drilldown in pa_txn_accum_details Now
3676:
3677: create_txn_accum_details(
3678: x_txn_accum_id,
3679: rdlrec.line_type, -- RDLS

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

3934: x_txn_accum_id,
3935: x_err_stage,
3936: x_err_code);
3937:
3938: -- Create a row for drilldown in pa_txn_accume_details Now
3939:
3940: create_txn_accum_details(
3941: x_txn_accum_id,
3942: 'M', -- pa_commitments_txns

Line 4135: END PA_TXN_ACCUMS;

4131: RAISE;
4132:
4133: END accum_commitments;
4134:
4135: END PA_TXN_ACCUMS;