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 119: from cst_pac_periods

115:
116: CURSOR first_period_cur IS
117: select
118: count(1)
119: from cst_pac_periods
120: where legal_entity = l_entity_id
121: and cost_type_id = l_cost_type_id
122: AND rownum < 2;
123:

Line 132: from cst_pac_periods

128: /* **************************************************************************** */
129:
130: CURSOR prior_period_open_cur IS
131: select pac_period_id
132: from cst_pac_periods
133: where
134: legal_entity = l_entity_id
135: and cost_type_id = l_cost_type_id
136: and pac_period_id NOT in

Line 138: from cst_pac_periods

134: legal_entity = l_entity_id
135: and cost_type_id = l_cost_type_id
136: and pac_period_id NOT in
137: (select pac_period_id
138: from cst_pac_periods
139: where legal_entity = l_entity_id
140: and cost_type_id = l_cost_type_id
141: and open_flag = 'N'
142: and period_close_date IS NOT NULL);

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

284:
285: /* **************************************************************************** */
286: /* In case of an error, rollback will take care of the unwanted rows in */
287: /* the cst_pac_process_phases table. However the row inserted into */
288: /* cst_pac_periods have already been commited, hence need to be explicitly */
289: /* deleted. The section below does that... */
290: /* **************************************************************************** */
291: l_stmt_num := 20;
292: delete from cst_pac_periods

Line 292: delete from cst_pac_periods

288: /* cst_pac_periods have already been commited, hence need to be explicitly */
289: /* deleted. The section below does that... */
290: /* **************************************************************************** */
291: l_stmt_num := 20;
292: delete from cst_pac_periods
293: where pac_period_id = new_pac_period_id;
294:
295: commit_complete := false;
296:

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

364: distributions_flag VARCHAR2(1);
365: transfer_cost_flag VARCHAR2(1);
366:
367: /* **************************************************************************** */
368: /* Cursor to obtain the new pac period id from cst_pac_periods_s sequence */
369: /* **************************************************************************** */
370:
371: CURSOR get_new_period_id_cur IS
372: select cst_pac_periods_s.nextval

Line 372: select cst_pac_periods_s.nextval

368: /* Cursor to obtain the new pac period id from cst_pac_periods_s sequence */
369: /* **************************************************************************** */
370:
371: CURSOR get_new_period_id_cur IS
372: select cst_pac_periods_s.nextval
373: from dual;
374:
375:
376: /* **************************************************************************** */

Line 382: from cst_pac_periods

378: /* **************************************************************************** */
379:
380: CURSOR check_if_duplicating_cur IS
381: select new_pac_period_id
382: from cst_pac_periods
383: where legal_entity = l_entity_id
384: and cost_type_id = l_cost_type_id
385: and period_name = open_period_name
386: and period_year = open_period_year

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

521: AND PRIMARY_COST_METHOD > 2;
522:
523: /* **************************************************************************** */
524: /* START OPENING THE PERIOD. The steps are... */
525: /* 1. Insert into cst_pac_periods form gl_periods table */
526: /* 2. For each an every cost group defined in the legal entity */
527: /* Insert five rows for five process statuses into */
528: /* cst_pac_process_phases */
529: /* **************************************************************************** */

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

530:
531:
532:
533: /* **************************************************************************** */
534: /* Insert a single row for the pac period being opened into cst_pac_periods */
535: /* Insert the rows with 'P' (Pending) status and period close date = sysdate */
536: /* **************************************************************************** */
537:
538: l_stmt_num := 30;

Line 539: INSERT INTO cst_pac_periods (

535: /* Insert the rows with 'P' (Pending) status and period close date = sysdate */
536: /* **************************************************************************** */
537:
538: l_stmt_num := 30;
539: INSERT INTO cst_pac_periods (
540: pac_period_id,
541: legal_entity,
542: cost_type_id,
543: period_start_date,

Line 584: from cst_pac_periods

580: and clct.cost_type_id = l_cost_type_id
581: and clct.primary_cost_method > 2)
582: AND (gp.period_name, gp.period_num, gp.period_year) NOT IN
583: (select period_name, period_num, period_year
584: from cst_pac_periods
585: where legal_entity = l_entity_id
586: and cost_type_id = l_cost_type_id);
587:
588: IF(SQL%ROWCOUNT = 0) THEN

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

707: close check_if_duplicating_cur;
708:
709:
710: /* **************************************************************************** */
711: /* Update the the new pac period row in cst_pac_periods with open_flag = 'Y' */
712: /* and the period close date = NULL, this declaring the period as open */
713: /* **************************************************************************** */
714: l_stmt_num := 70;
715: UPDATE cst_pac_periods

Line 715: UPDATE cst_pac_periods

711: /* Update the the new pac period row in cst_pac_periods with open_flag = 'Y' */
712: /* and the period close date = NULL, this declaring the period as open */
713: /* **************************************************************************** */
714: l_stmt_num := 70;
715: UPDATE cst_pac_periods
716: SET open_flag = 'Y',
717: period_close_date = NULL,
718: last_update_date = trunc(sysdate),
719: last_updated_by = l_user_id,

Line 734: FROM cst_pac_periods

730: /* **************************************************************************** */
731: l_stmt_num := 80;
732: SELECT NVL(MAX(period_end_date),sysdate)
733: INTO last_scheduled_close_date
734: FROM cst_pac_periods
735: WHERE legal_entity = l_entity_id
736: AND cost_type_id = l_cost_type_id;
737:
738: commit_complete := true;

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

745:
746: /* **************************************************************************** */
747: /* In case of an error, rollback will take care of the unwanted rows in */
748: /* the cst_pac_process_phases table. However the row inserted into */
749: /* cst_pac_periods have already been commited, hence need to be explicitly */
750: /* deleted. The section below does that... */
751: /* **************************************************************************** */
752:
753: delete from cst_pac_periods

Line 753: delete from cst_pac_periods

749: /* cst_pac_periods have already been commited, hence need to be explicitly */
750: /* deleted. The section below does that... */
751: /* **************************************************************************** */
752:
753: delete from cst_pac_periods
754: where pac_period_id = new_pac_period_id;
755:
756: commit_complete := false;
757:

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

804: /* 6. l_login_id : Login ID */
805: /* IN OUT Params: */
806: /* 1. last_scheduled_close_date: It is a user defined param which */
807: /* holds the value of the max(end_date) of all the periods in */
808: /* in cst_pac_periods table for a particular LE-CT */
809: /* OUT Params: */
810: /* 1. end_date_is_passed: TRUE of the user is trying to close */
811: /* whose period end date is in future */
812: /* 2. incomplete_processing: TRUE if the process status of all the */

Line 914: from cst_pac_periods

910: FROM org_acct_periods
911: WHERE open_flag IN ('Y','P')
912: AND trunc(schedule_close_date) <=
913: (select trunc(period_end_date)
914: from cst_pac_periods
915: where pac_period_id = l_closing_pac_period_id )
916: AND organization_id IN ( SELECT ccga.organization_id
917: FROM cst_cost_group_assignments ccga
918: WHERE ccga.cost_group_id = l_current_cost_group_id

Line 935: from cst_pac_periods

931: from cst_cost_group_assignments ccga
932: where ccga.cost_group_id = l_current_cost_group_id)
933: AND mmt.transaction_date >=
934: (select trunc(period_start_date)
935: from cst_pac_periods
936: where pac_period_id = l_closing_pac_period_id )
937: AND mmt.transaction_date <=
938: (select (trunc(period_end_date)+0.99999)
939: from cst_pac_periods

Line 939: from cst_pac_periods

935: from cst_pac_periods
936: where pac_period_id = l_closing_pac_period_id )
937: AND mmt.transaction_date <=
938: (select (trunc(period_end_date)+0.99999)
939: from cst_pac_periods
940: where pac_period_id = l_closing_pac_period_id )
941: AND mmt.costed_flag in ('N', 'E')
942: AND rownum < 2;
943:

Line 979: from cst_pac_periods

975: from cst_cost_group_assignments ccga
976: where ccga.cost_group_id = l_current_cost_group_id)
977: AND mmt.transaction_date >=
978: (select trunc(period_start_date)
979: from cst_pac_periods
980: where pac_period_id = l_closing_pac_period_id )
981: AND mmt.transaction_date <=
982: (select (trunc(period_end_date) + 0.99999)
983: from cst_pac_periods

Line 983: from cst_pac_periods

979: from cst_pac_periods
980: where pac_period_id = l_closing_pac_period_id )
981: AND mmt.transaction_date <=
982: (select (trunc(period_end_date) + 0.99999)
983: from cst_pac_periods
984: where pac_period_id = l_closing_pac_period_id )
985: AND rownum < 2;
986:
987: /* **************************************************************************** */

Line 1021: from cst_pac_periods

1017: from cst_cost_group_assignments ccga
1018: where ccga.cost_group_id = l_current_cost_group_id)
1019: AND wt.transaction_date >=
1020: (select trunc(period_start_date)
1021: from cst_pac_periods
1022: where pac_period_id = l_closing_pac_period_id )
1023: AND wt.transaction_date <=
1024: (select (trunc(period_end_date) + 0.99999)
1025: from cst_pac_periods

Line 1025: from cst_pac_periods

1021: from cst_pac_periods
1022: where pac_period_id = l_closing_pac_period_id )
1023: AND wt.transaction_date <=
1024: (select (trunc(period_end_date) + 0.99999)
1025: from cst_pac_periods
1026: where pac_period_id = l_closing_pac_period_id )
1027: AND rownum < 2;
1028:
1029:

Line 1064: from cst_pac_periods

1060: from cst_cost_group_assignments ccga
1061: where ccga.cost_group_id = l_current_cost_group_id)
1062: AND rt.transaction_date >=
1063: (select trunc(period_start_date)
1064: from cst_pac_periods
1065: where pac_period_id = l_closing_pac_period_id )
1066: AND rt.transaction_date <=
1067: (select (trunc(period_end_date) + 0.99999)
1068: from cst_pac_periods

Line 1068: from cst_pac_periods

1064: from cst_pac_periods
1065: where pac_period_id = l_closing_pac_period_id )
1066: AND rt.transaction_date <=
1067: (select (trunc(period_end_date) + 0.99999)
1068: from cst_pac_periods
1069: where pac_period_id = l_closing_pac_period_id )
1070: AND rownum < 2;
1071:
1072: /* **************************************************************************** */

Line 1105: from cst_pac_periods

1101: from cst_cost_group_assignments ccga
1102: where ccga.cost_group_id = l_current_cost_group_id)
1103: AND rae.transaction_date >=
1104: (select trunc(period_start_date)
1105: from cst_pac_periods
1106: where pac_period_id = l_closing_pac_period_id )
1107: AND rae.transaction_date <=
1108: (select (trunc(period_end_date) + 0.99999)
1109: from cst_pac_periods

Line 1109: from cst_pac_periods

1105: from cst_pac_periods
1106: where pac_period_id = l_closing_pac_period_id )
1107: AND rae.transaction_date <=
1108: (select (trunc(period_end_date) + 0.99999)
1109: from cst_pac_periods
1110: where pac_period_id = l_closing_pac_period_id )
1111: AND rae.event_type_id IN (7,8, 9, 10)
1112: AND rownum < 2;
1113:

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 clat.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 clat.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 clat.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 1186: from cst_pac_periods

1182: from cst_cost_group_assignments ccga
1183: where ccga.cost_group_id = l_current_cost_group_id)
1184: AND mmtt.transaction_date >=
1185: (select trunc(period_start_date)
1186: from cst_pac_periods
1187: where pac_period_id = l_closing_pac_period_id )
1188: AND mmtt.transaction_date <=
1189: (select (trunc(period_end_date)+0.99999)
1190: from cst_pac_periods

Line 1190: from cst_pac_periods

1186: from cst_pac_periods
1187: where pac_period_id = l_closing_pac_period_id )
1188: AND mmtt.transaction_date <=
1189: (select (trunc(period_end_date)+0.99999)
1190: from cst_pac_periods
1191: where pac_period_id = l_closing_pac_period_id )
1192: AND rownum < 2;
1193:
1194: /* **************************************************************************** */

Line 1207: from cst_pac_periods

1203: from cst_cost_group_assignments ccga
1204: where ccga.cost_group_id = l_current_cost_group_id)
1205: AND mti.transaction_date >=
1206: (select trunc(period_start_date)
1207: from cst_pac_periods
1208: where pac_period_id = l_closing_pac_period_id )
1209: AND mti.transaction_date <=
1210: (select (trunc(period_end_date)+0.99999)
1211: from cst_pac_periods

Line 1211: from cst_pac_periods

1207: from cst_pac_periods
1208: where pac_period_id = l_closing_pac_period_id )
1209: AND mti.transaction_date <=
1210: (select (trunc(period_end_date)+0.99999)
1211: from cst_pac_periods
1212: where pac_period_id = l_closing_pac_period_id )
1213: AND rownum < 2;
1214:
1215: /* **************************************************************************** */

Line 1228: from cst_pac_periods

1224: from cst_cost_group_assignments ccga
1225: where ccga.cost_group_id = l_current_cost_group_id)
1226: AND wcti.transaction_date >=
1227: (select trunc(period_start_date)
1228: from cst_pac_periods
1229: where pac_period_id = l_closing_pac_period_id )
1230: AND wcti.transaction_date <=
1231: (select (trunc(period_end_date)+0.99999)
1232: from cst_pac_periods

Line 1232: from cst_pac_periods

1228: from cst_pac_periods
1229: where pac_period_id = l_closing_pac_period_id )
1230: AND wcti.transaction_date <=
1231: (select (trunc(period_end_date)+0.99999)
1232: from cst_pac_periods
1233: where pac_period_id = l_closing_pac_period_id )
1234: AND rownum < 2;
1235:
1236: /* **************************************************************************** */

Line 1251: from cst_pac_periods

1247: where ccga.cost_group_id = l_current_cost_group_id
1248: and ccga.organization_id = mp.organization_id)
1249: AND rti.transaction_date >=
1250: (select trunc(period_start_date)
1251: from cst_pac_periods
1252: where pac_period_id = l_closing_pac_period_id )
1253: AND rti.transaction_date <=
1254: (select (trunc(period_end_date)+0.99999)
1255: from cst_pac_periods

Line 1255: from cst_pac_periods

1251: from cst_pac_periods
1252: where pac_period_id = l_closing_pac_period_id )
1253: AND rti.transaction_date <=
1254: (select (trunc(period_end_date)+0.99999)
1255: from cst_pac_periods
1256: where pac_period_id = l_closing_pac_period_id )
1257: AND rownum < 2;
1258:
1259: /* **************************************************************************** */

Line 1271: from cst_pac_periods

1267: from cst_cost_group_assignments ccga
1268: where ccga.cost_group_id = l_current_cost_group_id)
1269: AND lci.transaction_date >=
1270: (select trunc(period_start_date)
1271: from cst_pac_periods
1272: where pac_period_id = l_closing_pac_period_id )
1273: AND lci.transaction_date <=
1274: (select (trunc(period_end_date)+0.99999)
1275: from cst_pac_periods

Line 1275: from cst_pac_periods

1271: from cst_pac_periods
1272: where pac_period_id = l_closing_pac_period_id )
1273: AND lci.transaction_date <=
1274: (select (trunc(period_end_date)+0.99999)
1275: from cst_pac_periods
1276: where pac_period_id = l_closing_pac_period_id )
1277: AND rownum < 2;
1278:
1279:

Line 2096: UPDATE cst_pac_periods

2092:
2093: COMMIT;
2094: l_stmt_num := 30;
2095: l_open_flag := 'P';
2096: UPDATE cst_pac_periods
2097: SET open_flag = l_open_flag,
2098: period_close_date = trunc(sysdate),
2099: last_update_date = trunc(sysdate),
2100: last_updated_by = l_user_id,

Line 2169: FROM cst_pac_periods

2165: /* **************************************************************************** */
2166:
2167: CURSOR check_still_open_to_close_cur IS
2168: SELECT pac_period_id
2169: FROM cst_pac_periods
2170: WHERE legal_entity = l_entity_id
2171: AND cost_type_id = l_cost_type_id
2172: AND pac_period_id = closing_pac_period_id
2173: AND open_flag = 'P';

Line 2317: UPDATE cst_pac_periods

2313:
2314: /* Close the period by updating the open flag to 'N' */
2315: l_stmt_num := 50;
2316: l_open_flag := 'N';
2317: UPDATE cst_pac_periods
2318: SET open_flag = l_open_flag,
2319: period_close_date = trunc(sysdate),
2320: last_update_date = trunc(sysdate),
2321: last_updated_by = l_user_id,

Line 2336: UPDATE cst_pac_periods

2332:
2333: <>
2334: ROLLBACK;
2335: l_stmt_num := 60;
2336: UPDATE cst_pac_periods
2337: SET open_flag = 'Y',
2338: period_close_date = trunc(sysdate),
2339: last_update_date = trunc(sysdate),
2340: last_updated_by = l_user_id,

Line 2371: UPDATE cst_pac_periods

2367: SQLERRM);
2368: END IF;
2369:
2370: ROLLBACK;
2371: UPDATE cst_pac_periods
2372: SET open_flag = 'Y',
2373: period_close_date = trunc(sysdate),
2374: last_update_date = trunc(sysdate),
2375: last_updated_by = l_user_id,