DBA Data[Home] [Help]

APPS.FEM_DATA_LOADER_PKG dependencies on FEM_LD_INTERFACE_DATA_GT

Line 159: DELETE fem_ld_interface_data_gt;

155: ,p_module => g_block||'.process_request(PROCEDURE)'
156: ,p_msg_text => 'Completed process_global_id');
157:
158:
159: DELETE fem_ld_interface_data_gt;
160: DELETE fem_ld_dim_requests_gt;
161: DELETE fem_ld_hier_requests_gt;
162: DELETE fem_ld_cal_periods_gt;
163:

Line 432: DELETE fem_ld_interface_data_gt;

428: g_master_rec.DELETE;
429: g_cal_period_rec.DELETE;
430: g_interface_data_rec.DELETE;
431:
432: DELETE fem_ld_interface_data_gt;
433: DELETE fem_ld_dim_requests_gt;
434: DELETE fem_ld_hier_requests_gt;
435: DELETE fem_ld_cal_periods_gt;
436:

Line 1743: -- already reside in the fem_ld_interface_data_gt and makes no sense in querying

1739: -- This is one of the core procedure. Approach is as follows..
1740: --
1741: -- 1. Builds the dynamic SQL to get DISTINCT values
1742: -- 2. If a table name has been repeated more than once, then the distinct values
1743: -- already reside in the fem_ld_interface_data_gt and makes no sense in querying
1744: -- the interface table; updates the g*dup tables for the index
1745: -- 3. Fetches the unique set of records, populates the fem_ld_interface_data_gt
1746: -- for all the tables specified by the user
1747: -- 3a. If a table has been repeated, then it inserts the same set querying on

Line 1745: -- 3. Fetches the unique set of records, populates the fem_ld_interface_data_gt

1741: -- 1. Builds the dynamic SQL to get DISTINCT values
1742: -- 2. If a table name has been repeated more than once, then the distinct values
1743: -- already reside in the fem_ld_interface_data_gt and makes no sense in querying
1744: -- the interface table; updates the g*dup tables for the index
1745: -- 3. Fetches the unique set of records, populates the fem_ld_interface_data_gt
1746: -- for all the tables specified by the user
1747: -- 3a. If a table has been repeated, then it inserts the same set querying on
1748: -- the data for the same table in the I occurence
1749: -- 4. Fetching of unique set differs for the DATA and LEDGER load, while DATA

Line 1753: -- fem_ld_interface_data_gt table

1749: -- 4. Fetching of unique set differs for the DATA and LEDGER load, while DATA
1750: -- load relies on the table name, LEDGER load relies on the dataset balance
1751: -- type code; otherwise the concept remains the same
1752: -- 5. Then the corresponding ID's are populated for the records fetched into the
1753: -- fem_ld_interface_data_gt table
1754: -- 6. If the above updates fetches 0 records, then there is no point in proceeding
1755: -- captures this info. in g_loader_run
1756: -- 6a. If the update results in more than 0 then proceeds to the next step
1757: -- 7. The next step is to identify all the datasets that are production datasets

Line 1758: -- 8. Once this is done, the fem_ld_interface_data_gt is validated with the i/p params

1754: -- 6. If the above updates fetches 0 records, then there is no point in proceeding
1755: -- captures this info. in g_loader_run
1756: -- 6a. If the update results in more than 0 then proceeds to the next step
1757: -- 7. The next step is to identify all the datasets that are production datasets
1758: -- 8. Once this is done, the fem_ld_interface_data_gt is validated with the i/p params
1759: -- specified in the selection criteria while defining the parameters
1760: -- 9. All the records that match this crietria are marked with status = 'VALID'
1761: -- 9a. gs_valid_rows is updated with the number of records updated
1762: --10. All the records with status = 'INVALID' are deleted, these are stored in

Line 1850: -- , instead can get it from fem_ld_interface_data_gt.

1846: cal_period_end_date';
1847:
1848: -- If the same table is selected multiple times in the parameters
1849: -- screen, we need not get the DISTINCT from the interface table
1850: -- , instead can get it from fem_ld_interface_data_gt.
1851:
1852: -- So need to check for the same. The same can be done before this
1853: -- loop; since we loop on the table_name for the first time here in
1854: -- the code, keeping this piece here.

Line 1906: INSERT INTO fem_ld_interface_data_gt

1902: -- if not flag to the exception report
1903:
1904: IF l_ledger_tab.EXISTS(1) THEN
1905: FORALL k IN 1..l_ledger_tab.COUNT
1906: INSERT INTO fem_ld_interface_data_gt
1907: (ledger_display_code,
1908: dataset_display_code,
1909: source_system_display_code,
1910: cal_period_number,

Line 1942: -- from the fem_ld_interface_data_gt with the new ROW_NUMBER

1938: WHEN 'DATA_FETCHED' THEN
1939:
1940: -- Data has been retrieved from the interface table
1941: -- no point in fetching it again; instead copy the same
1942: -- from the fem_ld_interface_data_gt with the new ROW_NUMBER
1943:
1944: l_table_name := gs_table_name_tab(i);
1945: l_table_row := gs_sql_dup_indx_tab(i);
1946:

Line 1949: INSERT INTO fem_ld_interface_data_gt

1945: l_table_row := gs_sql_dup_indx_tab(i);
1946:
1947: IF gs_valid_rows(l_table_row) = 1.0 THEN
1948: FORALL k IN l_table_row+1..gs_table_name_tab.COUNT
1949: INSERT INTO fem_ld_interface_data_gt
1950: (ledger_display_code,
1951: dataset_display_code,
1952: source_system_display_code,
1953: cal_period_number,

Line 1971: FROM fem_ld_interface_data_gt

1967: table_name,
1968: gs_table_row_tab(k),
1969: ds_production_valid_flag,
1970: status
1971: FROM fem_ld_interface_data_gt
1972: WHERE table_name = l_table_name
1973: AND table_row = l_table_row
1974: AND gs_table_name_tab(k) = l_table_name;
1975: END IF;

Line 2010: UPDATE fem_ld_interface_data_gt idt

2006: ' Valid Row :: ' || gs_valid_rows(k));
2007:
2008: END LOOP;
2009:
2010: UPDATE fem_ld_interface_data_gt idt
2011: SET ledger_id = (SELECT ledger_id
2012: FROM fem_ledgers_b flb
2013: WHERE idt.ledger_display_code = flb.ledger_display_code
2014: AND personal_flag = 'N'

Line 2067: -- , instead can get it from fem_ld_interface_data_gt.

2063: encumbrance_type_code';
2064:
2065: -- If the same DS bal type is selected multiple times in the parameters
2066: -- screen, we need not get the DISTINCT from the interface table
2067: -- , instead can get it from fem_ld_interface_data_gt.
2068:
2069: FOR j IN 1..i LOOP
2070: IF gs_ds_bal_code_tab(i) = gs_ds_bal_code_tab(j) THEN
2071: l_dupe_count := l_dupe_count + 1.0;

Line 2115: INSERT INTO fem_ld_interface_data_gt

2111: -- if not flag to the exception report
2112:
2113: IF l_ledger_tab.EXISTS(1) THEN
2114: FORALL k IN 1..l_ledger_tab.COUNT
2115: INSERT INTO fem_ld_interface_data_gt
2116: (ledger_display_code,
2117: dataset_code,
2118: balance_type_code,
2119: budget_display_code,

Line 2153: -- from the fem_ld_interface_data_gt with the new ROW_NUMBER

2149: WHEN 'DATA_FETCHED' THEN
2150:
2151: -- Data has been retrieved from the interface table
2152: -- no point in fetching it again; instead copy the same
2153: -- from the fem_ld_interface_data_gt with the new ROW_NUMBER
2154:
2155: l_table_name := gs_ds_bal_code_tab(i);
2156: l_table_row := gs_sql_dup_indx_tab(i);
2157:

Line 2160: INSERT INTO fem_ld_interface_data_gt

2156: l_table_row := gs_sql_dup_indx_tab(i);
2157:
2158: IF gs_valid_rows(l_table_row) = 1.0 THEN
2159: FORALL k IN l_table_row+1..gs_table_name_tab.COUNT
2160: INSERT INTO fem_ld_interface_data_gt
2161: (ledger_display_code,
2162: dataset_code,
2163: balance_type_code,
2164: budget_display_code,

Line 2186: FROM fem_ld_interface_data_gt

2182: table_name,
2183: gs_table_row_tab(k),
2184: ds_production_valid_flag,
2185: status
2186: FROM fem_ld_interface_data_gt
2187: WHERE balance_type_code = l_table_name
2188: AND table_row = l_table_row
2189: AND gs_ds_bal_code_tab(k) = l_table_name;
2190: END IF;

Line 2226: UPDATE fem_ld_interface_data_gt idt

2222:
2223: END LOOP;
2224:
2225:
2226: UPDATE fem_ld_interface_data_gt idt
2227: SET ledger_id = (SELECT ledger_id
2228: FROM fem_ledgers_b flb
2229: WHERE idt.ledger_display_code = flb.ledger_display_code
2230: AND personal_flag = 'N'

Line 2267: UPDATE fem_ld_interface_data_gt

2263: -- If the rule is approved, can run against any dataset
2264: -- Else cannot run against the production datasets
2265:
2266: IF g_approval_flag THEN
2267: UPDATE fem_ld_interface_data_gt
2268: SET ds_production_valid_flag = 'Y';
2269: ELSE
2270: UPDATE fem_ld_interface_data_gt idt
2271: SET ds_production_valid_flag = (SELECT DECODE(dim_attribute_varchar_member,'Y','N','Y')

Line 2270: UPDATE fem_ld_interface_data_gt idt

2266: IF g_approval_flag THEN
2267: UPDATE fem_ld_interface_data_gt
2268: SET ds_production_valid_flag = 'Y';
2269: ELSE
2270: UPDATE fem_ld_interface_data_gt idt
2271: SET ds_production_valid_flag = (SELECT DECODE(dim_attribute_varchar_member,'Y','N','Y')
2272: FROM fem_datasets_attr fda
2273: WHERE fda.attribute_id = g_production_attr
2274: AND idt.dataset_code = fda.dataset_code);

Line 2278: FROM fem_ld_interface_data_gt

2274: AND idt.dataset_code = fda.dataset_code);
2275: END IF; -- g_approval_flag
2276:
2277: FOR int_rec IN (SELECT ledger_id, dataset_code, ds_production_valid_flag, table_name, table_row
2278: FROM fem_ld_interface_data_gt
2279: ORDER BY table_row, table_name)
2280: LOOP
2281: fnd_file.put_line(FND_FILE.log, ' ==========================================================');
2282: fnd_file.put_line(FND_FILE.log, ' In Evaluate parameters(1) ');

Line 2303: UPDATE fem_ld_interface_data_gt

2299:
2300: FOR i IN 1..gs_table_name_tab.COUNT LOOP
2301: IF gs_valid_rows(i) > 0.0 THEN
2302: IF g_loader_type = 'CLIENT' THEN
2303: UPDATE fem_ld_interface_data_gt
2304: SET status = 'VALID'
2305: WHERE ledger_id = DECODE(gs_ledger_tab(i),-1,ledger_id,gs_ledger_tab(i))
2306: AND dataset_code = DECODE(gs_ds_tab(i),-1,dataset_code,gs_ds_tab(i))
2307: AND source_system_code = DECODE(gs_ss_tab(i),-1,source_system_code,gs_ss_tab(i))

Line 2313: UPDATE fem_ld_interface_data_gt

2309: AND ds_production_valid_flag = 'Y'
2310: AND table_row = gs_table_row_tab(i)
2311: AND table_name = gs_table_name_tab(i);
2312: ELSIF g_loader_type = 'LEDGER' AND gs_valid_rows(i) > 0.0 THEN
2313: UPDATE fem_ld_interface_data_gt
2314: SET status = 'VALID'
2315: WHERE ledger_id = DECODE(gs_ledger_tab(i),-1,ledger_id,gs_ledger_tab(i))
2316: AND dimension_group_id = DECODE(gs_cal_grp_tab(i),-1,dimension_group_id,gs_cal_grp_tab(i))
2317: AND ds_production_valid_flag = 'Y'

Line 2331: FROM fem_ld_interface_data_gt

2327: END IF;
2328:
2329: SELECT COUNT(*)
2330: INTO l_dummy
2331: FROM fem_ld_interface_data_gt
2332: WHERE table_name = gs_table_name_tab(i)
2333: AND table_row = gs_table_row_tab(i);
2334:
2335: -- The update stmt needs to be changed as there is a direct mention of

Line 2368: FROM fem_ld_interface_data_gt

2364:
2365: END LOOP;
2366:
2367: FOR int_rec IN (SELECT ledger_id, dataset_code, ds_production_valid_flag, table_name, table_row, status
2368: FROM fem_ld_interface_data_gt
2369: ORDER BY table_row, table_name)
2370: LOOP
2371: fnd_file.put_line(FND_FILE.log, ' ==========================================================');
2372: fnd_file.put_line(FND_FILE.log, ' In Evaluate parameters(2) ');

Line 2394: DELETE fem_ld_interface_data_gt

2390: END LOOP;
2391:
2392: -- The deleted records will be used to print the exception report
2393:
2394: DELETE fem_ld_interface_data_gt
2395: WHERE status <> 'VALID'
2396: RETURNING ledger_display_code,
2397: dataset_display_code,
2398: source_system_display_code,

Line 2413: FROM fem_ld_interface_data_gt

2409: IF g_loader_type = 'LEDGER' THEN
2410:
2411: SELECT COUNT(*)
2412: INTO l_dummy
2413: FROM fem_ld_interface_data_gt
2414: WHERE budget_display_code IS NOT NULL;
2415:
2416: IF l_dummy > 0.0 THEN
2417: UPDATE fem_ld_interface_data_gt idt

Line 2417: UPDATE fem_ld_interface_data_gt idt

2413: FROM fem_ld_interface_data_gt
2414: WHERE budget_display_code IS NOT NULL;
2415:
2416: IF l_dummy > 0.0 THEN
2417: UPDATE fem_ld_interface_data_gt idt
2418: SET budget_id = (SELECT budget_id
2419: FROM fem_budgets_b fdb
2420: WHERE idt.budget_display_code = fdb.budget_display_code
2421: AND personal_flag = 'N'

Line 2428: FROM fem_ld_interface_data_gt

2424: END IF;
2425:
2426: SELECT COUNT(*)
2427: INTO l_dummy
2428: FROM fem_ld_interface_data_gt
2429: WHERE encumbrance_type_code IS NOT NULL;
2430:
2431: IF l_dummy > 0.0 THEN
2432: UPDATE fem_ld_interface_data_gt idt

Line 2432: UPDATE fem_ld_interface_data_gt idt

2428: FROM fem_ld_interface_data_gt
2429: WHERE encumbrance_type_code IS NOT NULL;
2430:
2431: IF l_dummy > 0.0 THEN
2432: UPDATE fem_ld_interface_data_gt idt
2433: SET encumbrance_type_id = (SELECT encumbrance_type_id
2434: FROM fem_encumbrance_types_b fetb
2435: WHERE fetb.enabled_flag = 'Y'
2436: AND fetb.personal_flag = 'N'

Line 2443: UPDATE fem_ld_interface_data_gt idt

2439: END IF;
2440:
2441: END IF; -- g_loader_type = 'LEDGER' AND g_loader_run
2442:
2443: UPDATE fem_ld_interface_data_gt idt
2444: SET calendar_id = (SELECT calendar_id
2445: FROM fem_hierarchies fh,
2446: fem_object_definition_b fodb,
2447: fem_ledgers_attr fla

Line 2454: UPDATE fem_ld_interface_data_gt idt

2450: AND fla.ledger_id = idt.ledger_id
2451: AND fla.attribute_id = g_cal_period_hier_attr
2452: AND fh.dimension_id = g_cal_period_dim_id);
2453:
2454: UPDATE fem_ld_interface_data_gt idt
2455: SET cal_period = TO_CHAR(idt.cal_period_end_date,'J') ||
2456: LPAD(TO_CHAR(idt.cal_period_number),15,'0') ||
2457: LPAD(TO_CHAR(idt.calendar_id),5,'0') ||
2458: LPAD(TO_CHAR(idt.time_dimension_group_key),5,'0');

Line 2545: FROM fem_ld_interface_data_gt idt

2541: fem_cal_periods_b fcpb
2542: WHERE fcpb.calendar_id = fcb.calendar_id
2543: AND fcpb.dimension_group_id = fdgb.dimension_group_id
2544: AND EXISTS ( SELECT 1
2545: FROM fem_ld_interface_data_gt idt
2546: WHERE fdgb.dimension_group_id = idt.dimension_group_id
2547: AND idt.ledger_id = gs_ledger_tab(i)
2548: AND idt.dimension_group_id = gs_cal_grp_tab(i)
2549: AND fcb.calendar_id = idt.calendar_id

Line 2574: FROM fem_ld_interface_data_gt idt

2570: fem_cal_periods_b fcpb
2571: WHERE fcpb.calendar_id = fcb.calendar_id
2572: AND fcpb.dimension_group_id = fdgb.dimension_group_id
2573: AND EXISTS ( SELECT 1
2574: FROM fem_ld_interface_data_gt idt
2575: WHERE fdgb.dimension_group_id = idt.dimension_group_id
2576: AND idt.ledger_id = gs_ledger_tab(i)
2577: AND fcb.calendar_id = idt.calendar_id
2578: AND fcpb.cal_period_id = idt.cal_period

Line 2603: FROM fem_ld_interface_data_gt

2599: (SELECT DISTINCT ledger_id,
2600: dimension_group_id,
2601: calendar_id,
2602: cal_period
2603: FROM fem_ld_interface_data_gt
2604: WHERE table_name = gs_table_name_tab(i)
2605: AND table_row = gs_table_row_tab(i)) idt
2606: WHERE fcpb.calendar_id = fcb.calendar_id
2607: AND fcpb.dimension_group_id = fdgb.dimension_group_id

Line 2632: FROM fem_ld_interface_data_gt

2628: fem_cal_periods_b fcpb,
2629: (SELECT DISTINCT ledger_id,
2630: calendar_id,
2631: cal_period
2632: FROM fem_ld_interface_data_gt
2633: WHERE table_name = gs_table_name_tab(i)
2634: AND table_row = gs_table_row_tab(i)
2635: AND dimension_group_id = gs_cal_grp_tab(i)) idt
2636: WHERE fcpb.calendar_id = fcb.calendar_id

Line 2747: FROM fem_ld_interface_data_gt idt,

2743: BULK COLLECT INTO g_ledger_id, g_cal_period_id, g_ds_code,
2744: g_budget_id, g_enc_type_id,
2745: gs_ledger_code_tab, gs_ds_code_tab, gs_budget_code_tab,
2746: gs_enc_code_tab
2747: FROM fem_ld_interface_data_gt idt,
2748: fem_ld_cal_periods_gt cpt
2749: WHERE idt.table_name = gs_table_name_tab(i)
2750: AND idt.table_row = gs_table_row_tab(i)
2751: AND idt.table_name = cpt.table_name

Line 2856: FROM fem_ld_interface_data_gt idt,

2852: idt.ledger_display_code, idt.dataset_display_code,
2853: idt.source_system_display_code
2854: BULK COLLECT INTO g_ledger_id, g_cal_period_id, g_ss_code, g_ds_code,
2855: gs_ledger_code_tab, gs_ds_code_tab, gs_ss_code_tab
2856: FROM fem_ld_interface_data_gt idt,
2857: fem_ld_cal_periods_gt cpt
2858: WHERE idt.table_name = gs_table_name_tab(i)
2859: AND idt.table_row = gs_table_row_tab(i)
2860: AND idt.table_name = cpt.table_name