DBA Data[Home] [Help]

APPS.XLA_UPGRADE_PUB dependencies on GL_PERIOD_STATUSES

Line 49: | -602 to 3 for Hotpatch in GL_PERIOD_STATUSES |

45: | 24-AUG-2009 VGOPISET Bug 8834301 Resetting the Periods to NULL from |
46: | PENDING when EXCEPTION is raised by Product API|
47: | 10-Mar-2011 11854401 Change the Last_Updated_By from |
48: | -601 to 2 for Downtime |
49: | -602 to 3 for Hotpatch in GL_PERIOD_STATUSES |
50: +===========================================================================*/
51: --=============================================================================
52: -- **************** declarations ********************
53: --=============================================================================

Line 219: UPDATE gl_period_statuses gps

215: -- Commented as Project's is not participating in this Upgrade.
216: /*
217: FOR i IN 1..g_array_ledger_id.COUNT
218: LOOP
219: UPDATE gl_period_statuses gps
220: SET migration_status_code = NULL
221: WHERE gps.migration_status_code = 'P'
222: AND gps.application_id IN (275, 8721)
223: AND gps.adjustment_period_flag = 'N'

Line 233: UPDATE gl_period_statuses gps

229: END LOOP;
230: */
231: ELSE
232: FOR i IN 1.. g_array_ledger_id.COUNT LOOP
233: UPDATE gl_period_statuses gps
234: SET migration_status_code = NULL
235: WHERE gps.migration_status_code = 'P'
236: AND gps.application_id = p_application_id
237: AND gps.adjustment_period_flag = 'N'

Line 860: update gl_period_statuses

856: if ( l_set_of_books_id is null ) then
857:
858: if (l_period_name is null and l_period_year is null) then
859:
860: update gl_period_statuses
861: set migration_status_code = 'U'
862: where application_id = l_application_id
863: and migration_status_code = 'P';
864:

Line 871: update gl_period_statuses

867: return p_status_code;
868:
869: elsif l_period_name is null then
870:
871: update gl_period_statuses
872: set migration_status_code = 'U'
873: where period_year = l_period_year
874: and migration_status_code = 'P'
875: and application_id = l_application_id;

Line 883: update gl_period_statuses

879: return p_status_code;
880:
881: elsif l_period_year is null then
882:
883: update gl_period_statuses
884: set migration_status_code = 'U'
885: where period_name = l_period_name
886: and migration_status_code = 'P'
887: and application_id = l_application_id;

Line 895: update gl_period_statuses

891: return p_status_code;
892:
893: elsif (l_period_name is not null and l_period_year is not null) then
894:
895: update gl_period_statuses
896: set migration_status_code = 'U'
897: where period_year = l_period_year
898: and period_name = l_period_name
899: and migration_status_code = 'P'

Line 914: update gl_period_statuses

910: /* Set_Of_Books_ID is not null */
911:
912: if (l_period_name is null and l_period_year is null) then
913:
914: update gl_period_statuses
915: set migration_status_code = 'U'
916: where application_id = l_application_id
917: and migration_status_code = 'P'
918: and ledger_id = l_set_of_books_id;

Line 926: update gl_period_statuses

922: return p_status_code;
923:
924: elsif l_period_name is null then
925:
926: update gl_period_statuses
927: set migration_status_code = 'U'
928: where period_year = l_period_year
929: and migration_status_code = 'P'
930: and ledger_id = l_set_of_books_id

Line 939: update gl_period_statuses

935: return p_status_code;
936:
937: elsif l_period_year is null then
938:
939: update gl_period_statuses
940: set migration_status_code = 'U'
941: where period_name = l_period_name
942: and migration_status_code = 'P'
943: and ledger_id = l_set_of_books_id

Line 952: update gl_period_statuses

948: return p_status_code;
949:
950: elsif (l_period_name is not null and l_period_year is not null) then
951:
952: update gl_period_statuses
953: set migration_status_code = 'U'
954: where period_year = l_period_year
955: and period_name = l_period_name
956: and migration_status_code = 'P'

Line 1056: FROM gl_period_statuses gps

1052: -- Projects use 275 application of Oralce Grants(8721)
1053: CURSOR c_pa_last_date(i_ledger_id NUMBER) IS
1054: SELECT gps.ledger_id ledger_id,
1055: Min(gps.start_date) last_date
1056: FROM gl_period_statuses gps
1057: WHERE gps.migration_status_code = 'U'
1058: AND gps.application_id IN (275,8721)
1059: AND gps.ledger_id IN (SELECT l.ledger_id
1060: FROM gl_ledgers l

Line 1078: FROM gl_period_statuses gps

1074: CURSOR c_last_date(i_application_id NUMBER,
1075: i_ledger_id NUMBER) IS
1076: SELECT gps.ledger_id ledger_id,
1077: Min(start_date) last_date
1078: FROM gl_period_statuses gps
1079: WHERE gps.migration_status_code = 'U'
1080: AND gps.application_id = i_application_id
1081: AND gps.ledger_id IN (SELECT l.ledger_id
1082: FROM gl_ledgers l

Line 1245: FROM gl_period_statuses gps

1241: -- Since Application ID 275(Projects) might have periods either iby 275
1242: -- or 8721 , so query both the application_ids'
1243: SELECT gps.start_date
1244: INTO l_start_date
1245: FROM gl_period_statuses gps
1246: WHERE gps.application_id IN (275, 8721)
1247: AND gps.ledger_id = p_ledger_id
1248: AND gps.period_name = p_period_name;
1249:

Line 1259: FROM gl_period_statuses gps

1255: END IF;
1256:
1257: SELECT min(gps.start_date)
1258: INTO l_end_date
1259: FROM gl_period_statuses gps
1260: WHERE gps.migration_status_code = 'U'
1261: AND gps.ledger_id = p_ledger_id
1262: AND gps.application_id IN (275, 8721) ;
1263:

Line 1270: from gl_period_statuses gps

1266: IF l_end_date IS NOT NULL THEN
1267:
1268: select distinct gps.period_name
1269: into l_upgraded_period_name
1270: from gl_period_statuses gps
1271: WHERE gps.migration_status_code = 'U'
1272: AND gps.ledger_id = p_ledger_id
1273: AND gps.start_date = l_end_date
1274: AND gps.application_id IN (275, 8721) ;

Line 1280: FROM gl_period_statuses gps

1276: END IF;
1277:
1278: SELECT count(*)
1279: INTO l_pending_periods
1280: FROM gl_period_statuses gps
1281: WHERE gps.migration_status_code = 'P'
1282: AND gps.application_id IN (275, 8721)
1283: AND gps.ledger_id IN ( SELECT l.ledger_id
1284: FROM gl_ledgers l

Line 1302: FROM gl_period_statuses gps

1298: ELSE
1299: -- Choosing the start date of the first period that has to be migrated.
1300: SELECT gps.start_date
1301: INTO l_start_date
1302: FROM gl_period_statuses gps
1303: WHERE gps.application_id = l_application_id
1304: AND gps.ledger_id = p_ledger_id
1305: AND gps.period_name = p_period_name;
1306:

Line 1316: FROM gl_period_statuses gps

1312:
1313: -- Choosing the start date of the last period that was migrated.
1314: SELECT Min(gps.start_date)
1315: INTO l_end_date
1316: FROM gl_period_statuses gps
1317: WHERE gps.migration_status_code = 'U'
1318: AND gps.ledger_id = p_ledger_id
1319: AND gps.application_id = l_application_id;
1320:

Line 1327: from gl_period_statuses gps

1323: IF l_end_date IS NOT NULL THEN
1324:
1325: select gps.period_name
1326: into l_upgraded_period_name
1327: from gl_period_statuses gps
1328: WHERE gps.migration_status_code = 'U'
1329: AND gps.ledger_id = p_ledger_id
1330: AND gps.start_date = l_end_date
1331: AND gps.application_id = l_application_id ;

Line 1341: FROM gl_period_statuses gps

1337: END IF;
1338:
1339: SELECT Count(*)
1340: INTO l_pending_periods
1341: FROM gl_period_statuses gps
1342: WHERE gps.migration_status_code = 'P'
1343: AND gps.application_id = l_application_id
1344: AND gps.ledger_id IN (SELECT l.ledger_id
1345: FROM gl_ledgers l

Line 1503: UPDATE gl_period_statuses

1499: -- Projects are not participating in this upgrade, so for time being commented
1500: /*
1501: FOR i_ledger_periods IN c_pa_last_date( p_ledger_id )
1502: LOOP
1503: UPDATE gl_period_statuses
1504: SET migration_status_code = 'P'
1505: ,last_update_date = SYSDATE
1506: ,last_updated_by = 3 -- -169 changed to 3 for bug11854401
1507: -- ,last_update_login = 3 -- -169 changed to 3 for bug11854401

Line 1523: UPDATE gl_period_statuses

1519: END LOOP ;
1520: */
1521: ELSE
1522: FOR i_ledger_periods IN c_last_date(l_application_id,p_ledger_id) LOOP
1523: UPDATE gl_period_statuses
1524: SET migration_status_code = 'P'
1525: ,last_update_date = SYSDATE
1526: ,last_updated_by = 3 -- -169 changed to 3 for bug11854401
1527: -- ,last_update_login = 3 -- -169 changed to 3 for bug11854401

Line 1556: FROM gl_period_statuses gps

1552: ,end_date)
1553: SELECT gps.ledger_id
1554: ,min(start_date)
1555: ,max(end_date)
1556: FROM gl_period_statuses gps
1557: WHERE gps.migration_status_code = 'P'
1558: AND gps.application_id IN (275, 8721)
1559: AND gps.ledger_id = v_array_ledger_id(i)
1560: GROUP BY gps.ledger_id ;

Line 1571: FROM gl_period_statuses gps

1567: end_date)
1568: SELECT gps.ledger_id,
1569: Min(start_date),
1570: Max(end_date)
1571: FROM gl_period_statuses gps
1572: WHERE gps.migration_status_code = 'P'
1573: AND gps.application_id = l_application_id
1574: AND gps.ledger_id = G_array_ledger_id(i)
1575: GROUP BY gps.ledger_id;

Line 1755: FROM gl_period_statuses gps

1751: 'Purchasing',201,
1752: -101),ledger_id,period_name) IN (SELECT gps.application_id,
1753: gps.ledger_id,
1754: gps.period_name
1755: FROM gl_period_statuses gps
1756: WHERE gps.end_date >= l_start_date
1757: AND gps.end_date < l_end_date
1758: AND gps.ledger_id = G_array_ledger_id(i)
1759: AND gps.application_id = l_application_id

Line 2030: -- no rows in GL_PERIOD_STATUSES corresponding to Application ID 707.

2026: -- l_application_id :=101;
2027: -- END IF;
2028:
2029: -- Check with application id 707 is done separately, since there will be
2030: -- no rows in GL_PERIOD_STATUSES corresponding to Application ID 707.
2031: -- Associated Applications are 201 (PO) and 401 (INV).
2032:
2033: -- IF p_application_id = 707 then
2034:

Line 2035: -- Since Application ID 707 will have no rows in GL_PERIOD_STATUSES

2031: -- Associated Applications are 201 (PO) and 401 (INV).
2032:
2033: -- IF p_application_id = 707 then
2034:
2035: -- Since Application ID 707 will have no rows in GL_PERIOD_STATUSES
2036: -- we are getting the minimum of start date for one of the two
2037: -- applications which are associated with Costing (707)
2038:
2039: -- SELECT start_date

Line 2041: -- FROM gl_period_statuses

2037: -- applications which are associated with Costing (707)
2038:
2039: -- SELECT start_date
2040: -- INTO l_start_date
2041: -- FROM gl_period_statuses
2042: -- WHERE application_id = 401
2043: -- AND ledger_id = p_ledger_id
2044: -- AND period_name = p_period_name;
2045:

Line 2055: -- FROM gl_period_statuses

2051: -- END IF;
2052:
2053: -- SELECT min(start_date)
2054: -- INTO l_end_date
2055: -- FROM gl_period_statuses
2056: -- WHERE migration_status_code = 'U'
2057: -- AND ledger_id = p_ledger_id
2058: -- AND application_id = 401;
2059:

Line 2075: -- Updation of GL Period Statuses.

2071: -- IF l_end_date is NULL THEN
2072: -- RAISE NO_UPGRADE;
2073: -- END IF;
2074:
2075: -- Updation of GL Period Statuses.
2076:
2077: -- UPDATE gl_period_statuses
2078: -- SET migration_status_code = 'P'
2079: -- WHERE ledger_id = l_ledger_id

Line 2077: -- UPDATE gl_period_statuses

2073: -- END IF;
2074:
2075: -- Updation of GL Period Statuses.
2076:
2077: -- UPDATE gl_period_statuses
2078: -- SET migration_status_code = 'P'
2079: -- WHERE ledger_id = l_ledger_id
2080: -- AND (start_date >= l_start_date
2081: -- and end_date < l_end_date)

Line 2089: -- trace('Updated gl_period_statuses. '

2085:
2086: --fnd_file.put_line(fnd_file.log, '*Periods updated to P : '|| to_char(SQL%ROWCOUNT));
2087:
2088: -- IF (C_LEVEL_STATEMENT >= g_log_level) THEN
2089: -- trace('Updated gl_period_statuses. '
2090: -- , C_LEVEL_STATEMENT, l_Log_module);
2091: -- END IF;
2092:
2093: -- ELSE /*End for 707 Case and begin for all other applications*/

Line 2100: -- FROM gl_period_statuses

2096: -- has to be migrated.
2097:
2098: -- SELECT start_date
2099: -- INTO l_start_date
2100: -- FROM gl_period_statuses
2101: -- WHERE application_id = l_application_id
2102: -- AND ledger_id = p_ledger_id
2103: -- AND period_name = p_period_name;
2104:

Line 2117: -- FROM gl_period_statuses

2113: -- was migrated.
2114:
2115: -- SELECT min(start_date)
2116: -- INTO l_end_date
2117: -- FROM gl_period_statuses
2118: -- WHERE migration_status_code = 'U'
2119: -- AND ledger_id = p_ledger_id
2120: -- AND application_id = l_application_id;
2121:

Line 2133: -- UPDATE gl_period_statuses

2129: -- trace('Ending date of upgrade '|| l_end_date,
2130: -- C_LEVEL_STATEMENT, l_Log_module);
2131: -- END IF;
2132:
2133: -- UPDATE gl_period_statuses
2134: -- SET migration_status_code = 'P'
2135: -- WHERE application_id = l_application_id
2136: -- AND ledger_id = l_ledger_id
2137: -- AND (start_date >= l_start_date

Line 2145: -- trace('Updated gl_period_statuses',

2141:
2142: --fnd_file.put_line(fnd_file.log, '*Periods updated to P : '|| to_char(SQL%ROWCOUNT));
2143:
2144: -- IF (C_LEVEL_STATEMENT >= g_log_level) THEN
2145: -- trace('Updated gl_period_statuses',
2146: -- C_LEVEL_STATEMENT, l_Log_module);
2147: -- END IF;
2148:
2149: -- END IF;

Line 2273: -- FROM gl_period_statuses b

2269: -- SET a.je_from_sla_flag = 'U'
2270: -- WHERE (decode(a.je_source, l_source_name, p_application_id)
2271: -- ,ledger_id, period_name) in
2272: -- (SELECT application_id, ledger_id, period_name
2273: -- FROM gl_period_statuses b
2274: -- WHERE b.start_date >= l_start_date
2275: -- AND b.end_date < l_end_date
2276: -- AND b.ledger_id = l_ledger_id
2277: -- AND application_id = p_application_id)

Line 2294: -- FROM gl_period_statuses b

2290: -- SET a.je_from_sla_flag = 'U'
2291: -- WHERE (decode(a.je_source,'Purchasing',201,'Inventory',401)
2292: -- ,ledger_id, period_name) in
2293: -- (SELECT application_id, ledger_id, period_name
2294: -- FROM gl_period_statuses b
2295: -- WHERE b.start_date >= l_start_date
2296: -- AND b.end_date < l_end_date
2297: -- AND b.ledger_id = l_ledger_id
2298: -- AND application_id in (201,401))

Line 2315: -- UPDATE gl_period_statuses

2311: -- ELSE
2312:
2313: -- IF p_application_id = 707 THEN
2314:
2315: -- UPDATE gl_period_statuses
2316: -- SET migration_status_code = NULL
2317: -- WHERE ledger_id = l_ledger_id
2318: -- AND (start_date >= l_start_date
2319: -- and end_date < l_end_date)

Line 2328: -- UPDATE gl_period_statuses

2324: --fnd_file.put_line(fnd_file.log, '*Migration status code back to NULL : '|| to_char(SQL%ROWCOUNT));
2325:
2326: -- ELSE
2327:
2328: -- UPDATE gl_period_statuses
2329: -- SET migration_status_code = NULL
2330: -- WHERE application_id = l_application_id
2331: -- AND ledger_id = l_ledger_id
2332: -- AND (start_date >= l_start_date

Line 2818: FROM gl_period_statuses;

2814: p_start_date IN VARCHAR2
2815: ) IS
2816:
2817: CURSOR CUR_ALL_LEDGERS IS SELECT DISTINCT ledger_id
2818: FROM gl_period_statuses;
2819:
2820: l_migrate_all_ledgers VARCHAR2(30);
2821: l_ledger_id NUMBER;
2822: l_start_date date;

Line 2872: FROM gl_period_statuses

2868: IF l_migrate_all_ledgers = 'N' THEN
2869:
2870: SELECT min(start_date) - 1
2871: INTO l_end_date
2872: FROM gl_period_statuses
2873: WHERE migration_status_code = 'P'
2874: AND ledger_id = l_ledger_id
2875: AND application_id in (200,222,275,201,401,101,8721);
2876:

Line 2881: FROM gl_period_statuses

2877: IF l_end_date is NULL THEN
2878:
2879: SELECT max(end_date)
2880: INTO l_end_date
2881: FROM gl_period_statuses
2882: WHERE ledger_id = l_ledger_id
2883: AND application_id IN (200,222,275,201,401,101,8721);
2884: END IF;
2885:

Line 2886: UPDATE gl_period_statuses

2882: WHERE ledger_id = l_ledger_id
2883: AND application_id IN (200,222,275,201,401,101,8721);
2884: END IF;
2885:
2886: UPDATE gl_period_statuses
2887: SET migration_status_code = 'P'
2888: WHERE ledger_id = l_ledger_id
2889: AND (start_date >= l_start_date
2890: and end_date <= l_end_date)

Line 2904: FROM gl_period_statuses

2900: EXIT when CUR_ALL_LEDGERS%notfound;
2901:
2902: SELECT min(start_date) - 1
2903: INTO l_end_date
2904: FROM gl_period_statuses
2905: WHERE migration_status_code = 'P'
2906: AND ledger_id = l_all_ledgers.ledger_id
2907: AND application_id in (200,222,275,201,401,101,8721);
2908:

Line 2913: FROM gl_period_statuses

2909: IF l_end_date is NULL THEN
2910:
2911: SELECT max(end_date)
2912: INTO l_end_date
2913: FROM gl_period_statuses
2914: WHERE ledger_id = l_all_ledgers.ledger_id
2915: AND application_id in (200,222,275,201,401,101,8721);
2916:
2917: END IF;

Line 2919: -- Updation of GL Period Statuses.

2915: AND application_id in (200,222,275,201,401,101,8721);
2916:
2917: END IF;
2918:
2919: -- Updation of GL Period Statuses.
2920:
2921: UPDATE gl_period_statuses
2922: SET migration_status_code = 'P'
2923: WHERE ledger_id = l_all_ledgers.ledger_id

Line 2921: UPDATE gl_period_statuses

2917: END IF;
2918:
2919: -- Updation of GL Period Statuses.
2920:
2921: UPDATE gl_period_statuses
2922: SET migration_status_code = 'P'
2923: WHERE ledger_id = l_all_ledgers.ledger_id
2924: AND (start_date >= l_start_date
2925: and end_date <= l_end_date)

Line 2932: trace('Updated gl_period_statuses.'

2928: AND migration_status_code IS NULL;
2929:
2930:
2931: IF (C_LEVEL_STATEMENT >= g_log_level) THEN
2932: trace('Updated gl_period_statuses.'
2933: , C_LEVEL_STATEMENT, l_Log_module);
2934: END IF;
2935:
2936: END LOOP;