DBA Data[Home] [Help]

APPS.CSTPPPSC dependencies on CST_PAC_PERIODS

Line 22: /* in cst_pac_periods table for a particular LE-CT */

18: /* 9. l_period_end_date : Period end date to be opened */
19: /* IN OUT Params: */
20: /* 1. last_scheduled_close_date: It is a user defined param which */
21: /* holds the value of the max(end_date) of all the periods in */
22: /* in cst_pac_periods table for a particular LE-CT */
23: /* OUT Params: 1. prior_open_period: TRUE if this is the duplicate period to */
24: /* be opened for an LE-CT combination */
25: /* 2. improper_order: TRUE if the period being opened is not the */
26: /* subsequent period accounding to the Calender */

Line 90: from cst_pac_periods

86:
87: CURSOR first_period_cur IS
88: select
89: count(1)
90: from cst_pac_periods
91: where legal_entity = l_entity_id
92: and cost_type_id = l_cost_type_id
93: AND rownum < 2;
94:

Line 103: from cst_pac_periods

99: /* **************************************************************************** */
100:
101: CURSOR prior_period_open_cur IS
102: select pac_period_id
103: from cst_pac_periods
104: where
105: legal_entity = l_entity_id
106: and cost_type_id = l_cost_type_id
107: and pac_period_id NOT in

Line 109: from cst_pac_periods

105: legal_entity = l_entity_id
106: and cost_type_id = l_cost_type_id
107: and pac_period_id NOT in
108: (select pac_period_id
109: from cst_pac_periods
110: where legal_entity = l_entity_id
111: and cost_type_id = l_cost_type_id
112: and open_flag = 'N'
113: and period_close_date IS NOT NULL);

Line 259: /* cst_pac_periods have already been commited, hence need to be explicitly */

255:
256: /* **************************************************************************** */
257: /* In case of an error, rollback will take care of the unwanted rows in */
258: /* the cst_pac_process_phases table. However the row inserted into */
259: /* cst_pac_periods have already been commited, hence need to be explicitly */
260: /* deleted. The section below does that... */
261: /* **************************************************************************** */
262: l_stmt_num := 20;
263: delete from cst_pac_periods

Line 263: delete from cst_pac_periods

259: /* cst_pac_periods have already been commited, hence need to be explicitly */
260: /* deleted. The section below does that... */
261: /* **************************************************************************** */
262: l_stmt_num := 20;
263: delete from cst_pac_periods
264: where pac_period_id = new_pac_period_id;
265:
266: commit_complete := false;
267:

Line 339: /* Cursor to obtain the new pac period id from cst_pac_periods_s sequence */

335: distributions_flag VARCHAR2(1);
336: transfer_cost_flag VARCHAR2(1);
337:
338: /* **************************************************************************** */
339: /* Cursor to obtain the new pac period id from cst_pac_periods_s sequence */
340: /* **************************************************************************** */
341:
342: CURSOR get_new_period_id_cur IS
343: select cst_pac_periods_s.nextval

Line 343: select cst_pac_periods_s.nextval

339: /* Cursor to obtain the new pac period id from cst_pac_periods_s sequence */
340: /* **************************************************************************** */
341:
342: CURSOR get_new_period_id_cur IS
343: select cst_pac_periods_s.nextval
344: from dual;
345:
346:
347: /* **************************************************************************** */

Line 353: from cst_pac_periods

349: /* **************************************************************************** */
350:
351: CURSOR check_if_duplicating_cur IS
352: select new_pac_period_id
353: from cst_pac_periods
354: where legal_entity = l_entity_id
355: and cost_type_id = l_cost_type_id
356: and period_name = open_period_name
357: and period_year = open_period_year

Line 496: /* 1. Insert into cst_pac_periods form gl_periods table */

492: AND PRIMARY_COST_METHOD > 2;
493:
494: /* **************************************************************************** */
495: /* START OPENING THE PERIOD. The steps are... */
496: /* 1. Insert into cst_pac_periods form gl_periods table */
497: /* 2. For each an every cost group defined in the legal entity */
498: /* Insert five rows for five process statuses into */
499: /* cst_pac_process_phases */
500: /* **************************************************************************** */

Line 505: /* Insert a single row for the pac period being opened into cst_pac_periods */

501:
502:
503:
504: /* **************************************************************************** */
505: /* Insert a single row for the pac period being opened into cst_pac_periods */
506: /* Insert the rows with 'P' (Pending) status and period close date = sysdate */
507: /* **************************************************************************** */
508:
509: l_stmt_num := 30;

Line 510: INSERT INTO cst_pac_periods (

506: /* Insert the rows with 'P' (Pending) status and period close date = sysdate */
507: /* **************************************************************************** */
508:
509: l_stmt_num := 30;
510: INSERT INTO cst_pac_periods (
511: pac_period_id,
512: legal_entity,
513: cost_type_id,
514: period_start_date,

Line 555: from cst_pac_periods

551: and clct.cost_type_id = l_cost_type_id
552: and clct.primary_cost_method > 2)
553: AND (gp.period_name, gp.period_num, gp.period_year) NOT IN
554: (select period_name, period_num, period_year
555: from cst_pac_periods
556: where legal_entity = l_entity_id
557: and cost_type_id = l_cost_type_id);
558:
559: IF(SQL%ROWCOUNT = 0) THEN

Line 682: /* Update the the new pac period row in cst_pac_periods with open_flag = 'Y' */

678: close check_if_duplicating_cur;
679:
680:
681: /* **************************************************************************** */
682: /* Update the the new pac period row in cst_pac_periods with open_flag = 'Y' */
683: /* and the period close date = NULL, this declaring the period as open */
684: /* **************************************************************************** */
685: l_stmt_num := 70;
686: UPDATE cst_pac_periods

Line 686: UPDATE cst_pac_periods

682: /* Update the the new pac period row in cst_pac_periods with open_flag = 'Y' */
683: /* and the period close date = NULL, this declaring the period as open */
684: /* **************************************************************************** */
685: l_stmt_num := 70;
686: UPDATE cst_pac_periods
687: SET open_flag = 'Y',
688: period_close_date = NULL,
689: last_update_date = trunc(sysdate),
690: last_updated_by = l_user_id,

Line 705: FROM cst_pac_periods

701: /* **************************************************************************** */
702: l_stmt_num := 80;
703: SELECT NVL(MAX(period_end_date),sysdate)
704: INTO last_scheduled_close_date
705: FROM cst_pac_periods
706: WHERE legal_entity = l_entity_id
707: AND cost_type_id = l_cost_type_id;
708:
709: commit_complete := true;

Line 720: /* cst_pac_periods have already been commited, hence need to be explicitly */

716:
717: /* **************************************************************************** */
718: /* In case of an error, rollback will take care of the unwanted rows in */
719: /* the cst_pac_process_phases table. However the row inserted into */
720: /* cst_pac_periods have already been commited, hence need to be explicitly */
721: /* deleted. The section below does that... */
722: /* **************************************************************************** */
723:
724: delete from cst_pac_periods

Line 724: delete from cst_pac_periods

720: /* cst_pac_periods have already been commited, hence need to be explicitly */
721: /* deleted. The section below does that... */
722: /* **************************************************************************** */
723:
724: delete from cst_pac_periods
725: where pac_period_id = new_pac_period_id;
726:
727: commit_complete := false;
728:

Line 779: /* in cst_pac_periods table for a particular LE-CT */

775: /* 6. l_login_id : Login ID */
776: /* IN OUT Params: */
777: /* 1. last_scheduled_close_date: It is a user defined param which */
778: /* holds the value of the max(end_date) of all the periods in */
779: /* in cst_pac_periods table for a particular LE-CT */
780: /* OUT Params: */
781: /* 1. end_date_is_passed: TRUE of the user is trying to close */
782: /* whose period end date is in future */
783: /* 2. incomplete_processing: TRUE if the process status of all the */

Line 877: from cst_pac_periods

873: FROM org_acct_periods
874: WHERE open_flag IN ('Y','P')
875: AND trunc(schedule_close_date) <=
876: (select trunc(period_end_date)
877: from cst_pac_periods
878: where pac_period_id = l_closing_pac_period_id )
879: AND organization_id IN ( SELECT ccga.organization_id
880: FROM cst_cost_group_assignments ccga
881: WHERE ccga.cost_group_id = l_current_cost_group_id

Line 920: from cst_pac_periods

916: from cst_cost_group_assignments ccga
917: where ccga.cost_group_id = l_current_cost_group_id)
918: AND mmt.transaction_date >=
919: (select trunc(period_start_date)
920: from cst_pac_periods
921: where pac_period_id = l_closing_pac_period_id )
922: AND mmt.transaction_date <=
923: (select (trunc(period_end_date) + 0.99999)
924: from cst_pac_periods

Line 924: from cst_pac_periods

920: from cst_pac_periods
921: where pac_period_id = l_closing_pac_period_id )
922: AND mmt.transaction_date <=
923: (select (trunc(period_end_date) + 0.99999)
924: from cst_pac_periods
925: where pac_period_id = l_closing_pac_period_id )
926: AND rownum < 2;
927:
928: /* **************************************************************************** */

Line 962: from cst_pac_periods

958: from cst_cost_group_assignments ccga
959: where ccga.cost_group_id = l_current_cost_group_id)
960: AND wt.transaction_date >=
961: (select trunc(period_start_date)
962: from cst_pac_periods
963: where pac_period_id = l_closing_pac_period_id )
964: AND wt.transaction_date <=
965: (select (trunc(period_end_date) + 0.99999)
966: from cst_pac_periods

Line 966: from cst_pac_periods

962: from cst_pac_periods
963: where pac_period_id = l_closing_pac_period_id )
964: AND wt.transaction_date <=
965: (select (trunc(period_end_date) + 0.99999)
966: from cst_pac_periods
967: where pac_period_id = l_closing_pac_period_id )
968: AND rownum < 2;
969:
970:

Line 1005: from cst_pac_periods

1001: from cst_cost_group_assignments ccga
1002: where ccga.cost_group_id = l_current_cost_group_id)
1003: AND rt.transaction_date >=
1004: (select trunc(period_start_date)
1005: from cst_pac_periods
1006: where pac_period_id = l_closing_pac_period_id )
1007: AND rt.transaction_date <=
1008: (select (trunc(period_end_date) + 0.99999)
1009: from cst_pac_periods

Line 1009: from cst_pac_periods

1005: from cst_pac_periods
1006: where pac_period_id = l_closing_pac_period_id )
1007: AND rt.transaction_date <=
1008: (select (trunc(period_end_date) + 0.99999)
1009: from cst_pac_periods
1010: where pac_period_id = l_closing_pac_period_id )
1011: AND rownum < 2;
1012:
1013: /* **************************************************************************** */

Line 1046: from cst_pac_periods

1042: from cst_cost_group_assignments ccga
1043: where ccga.cost_group_id = l_current_cost_group_id)
1044: AND rae.transaction_date >=
1045: (select trunc(period_start_date)
1046: from cst_pac_periods
1047: where pac_period_id = l_closing_pac_period_id )
1048: AND rae.transaction_date <=
1049: (select (trunc(period_end_date) + 0.99999)
1050: from cst_pac_periods

Line 1050: from cst_pac_periods

1046: from cst_pac_periods
1047: where pac_period_id = l_closing_pac_period_id )
1048: AND rae.transaction_date <=
1049: (select (trunc(period_end_date) + 0.99999)
1050: from cst_pac_periods
1051: where pac_period_id = l_closing_pac_period_id )
1052: AND rae.event_type_id IN (7,8, 9, 10)
1053: AND rownum < 2;
1054:

Line 1089: from cst_pac_periods

1085: from cst_cost_group_assignments ccga
1086: where ccga.cost_group_id = l_current_cost_group_id)
1087: AND clat.transaction_date >=
1088: (select trunc(period_start_date)
1089: from cst_pac_periods
1090: where pac_period_id = l_closing_pac_period_id )
1091: AND clat.transaction_date <=
1092: (select (trunc(period_end_date) + 0.99999)
1093: from cst_pac_periods

Line 1093: from cst_pac_periods

1089: from cst_pac_periods
1090: where pac_period_id = l_closing_pac_period_id )
1091: AND clat.transaction_date <=
1092: (select (trunc(period_end_date) + 0.99999)
1093: from cst_pac_periods
1094: where pac_period_id = l_closing_pac_period_id )
1095: AND rownum < 2;
1096:
1097:

Line 1127: from cst_pac_periods

1123: from cst_cost_group_assignments ccga
1124: where ccga.cost_group_id = l_current_cost_group_id)
1125: AND mmtt.transaction_date >=
1126: (select trunc(period_start_date)
1127: from cst_pac_periods
1128: where pac_period_id = l_closing_pac_period_id )
1129: AND mmtt.transaction_date <=
1130: (select (trunc(period_end_date)+0.99999)
1131: from cst_pac_periods

Line 1131: from cst_pac_periods

1127: from cst_pac_periods
1128: where pac_period_id = l_closing_pac_period_id )
1129: AND mmtt.transaction_date <=
1130: (select (trunc(period_end_date)+0.99999)
1131: from cst_pac_periods
1132: where pac_period_id = l_closing_pac_period_id )
1133: AND rownum < 2;
1134:
1135: /* **************************************************************************** */

Line 1148: from cst_pac_periods

1144: from cst_cost_group_assignments ccga
1145: where ccga.cost_group_id = l_current_cost_group_id)
1146: AND mti.transaction_date >=
1147: (select trunc(period_start_date)
1148: from cst_pac_periods
1149: where pac_period_id = l_closing_pac_period_id )
1150: AND mti.transaction_date <=
1151: (select (trunc(period_end_date)+0.99999)
1152: from cst_pac_periods

Line 1152: from cst_pac_periods

1148: from cst_pac_periods
1149: where pac_period_id = l_closing_pac_period_id )
1150: AND mti.transaction_date <=
1151: (select (trunc(period_end_date)+0.99999)
1152: from cst_pac_periods
1153: where pac_period_id = l_closing_pac_period_id )
1154: AND rownum < 2;
1155:
1156: /* **************************************************************************** */

Line 1169: from cst_pac_periods

1165: from cst_cost_group_assignments ccga
1166: where ccga.cost_group_id = l_current_cost_group_id)
1167: AND wcti.transaction_date >=
1168: (select trunc(period_start_date)
1169: from cst_pac_periods
1170: where pac_period_id = l_closing_pac_period_id )
1171: AND wcti.transaction_date <=
1172: (select (trunc(period_end_date)+0.99999)
1173: from cst_pac_periods

Line 1173: from cst_pac_periods

1169: from cst_pac_periods
1170: where pac_period_id = l_closing_pac_period_id )
1171: AND wcti.transaction_date <=
1172: (select (trunc(period_end_date)+0.99999)
1173: from cst_pac_periods
1174: where pac_period_id = l_closing_pac_period_id )
1175: AND rownum < 2;
1176:
1177: /* **************************************************************************** */

Line 1192: from cst_pac_periods

1188: where ccga.cost_group_id = l_current_cost_group_id
1189: and ccga.organization_id = mp.organization_id)
1190: AND rti.transaction_date >=
1191: (select trunc(period_start_date)
1192: from cst_pac_periods
1193: where pac_period_id = l_closing_pac_period_id )
1194: AND rti.transaction_date <=
1195: (select (trunc(period_end_date)+0.99999)
1196: from cst_pac_periods

Line 1196: from cst_pac_periods

1192: from cst_pac_periods
1193: where pac_period_id = l_closing_pac_period_id )
1194: AND rti.transaction_date <=
1195: (select (trunc(period_end_date)+0.99999)
1196: from cst_pac_periods
1197: where pac_period_id = l_closing_pac_period_id )
1198: AND rownum < 2;
1199:
1200: /* **************************************************************************** */

Line 1212: from cst_pac_periods

1208: from cst_cost_group_assignments ccga
1209: where ccga.cost_group_id = l_current_cost_group_id)
1210: AND lci.transaction_date >=
1211: (select trunc(period_start_date)
1212: from cst_pac_periods
1213: where pac_period_id = l_closing_pac_period_id )
1214: AND lci.transaction_date <=
1215: (select (trunc(period_end_date)+0.99999)
1216: from cst_pac_periods

Line 1216: from cst_pac_periods

1212: from cst_pac_periods
1213: where pac_period_id = l_closing_pac_period_id )
1214: AND lci.transaction_date <=
1215: (select (trunc(period_end_date)+0.99999)
1216: from cst_pac_periods
1217: where pac_period_id = l_closing_pac_period_id )
1218: AND rownum < 2;
1219:
1220:

Line 1893: UPDATE cst_pac_periods

1889:
1890: COMMIT;
1891: l_stmt_num := 30;
1892: l_open_flag := 'P';
1893: UPDATE cst_pac_periods
1894: SET open_flag = l_open_flag,
1895: period_close_date = trunc(sysdate),
1896: last_update_date = trunc(sysdate),
1897: last_updated_by = l_user_id,

Line 1966: FROM cst_pac_periods

1962: /* **************************************************************************** */
1963:
1964: CURSOR check_still_open_to_close_cur IS
1965: SELECT pac_period_id
1966: FROM cst_pac_periods
1967: WHERE legal_entity = l_entity_id
1968: AND cost_type_id = l_cost_type_id
1969: AND pac_period_id = closing_pac_period_id
1970: AND open_flag = 'P';

Line 2114: UPDATE cst_pac_periods

2110:
2111: /* Close the period by updating the open flag to 'N' */
2112: l_stmt_num := 50;
2113: l_open_flag := 'N';
2114: UPDATE cst_pac_periods
2115: SET open_flag = l_open_flag,
2116: period_close_date = trunc(sysdate),
2117: last_update_date = trunc(sysdate),
2118: last_updated_by = l_user_id,

Line 2133: UPDATE cst_pac_periods

2129:
2130: <>
2131: ROLLBACK;
2132: l_stmt_num := 60;
2133: UPDATE cst_pac_periods
2134: SET open_flag = 'Y',
2135: period_close_date = trunc(sysdate),
2136: last_update_date = trunc(sysdate),
2137: last_updated_by = l_user_id,

Line 2168: UPDATE cst_pac_periods

2164: SQLERRM);
2165: END IF;
2166:
2167: ROLLBACK;
2168: UPDATE cst_pac_periods
2169: SET open_flag = 'Y',
2170: period_close_date = trunc(sysdate),
2171: last_update_date = trunc(sysdate),
2172: last_updated_by = l_user_id,