1769:
1770: EXCEPTION
1771: WHEN OTHERS THEN
1772: insert_message (
1773: p_table_name => 'gme_migration_control',
1774: p_procedure_name => 'is_GME_validated',
1775: p_parameters => l_table_name,
1776: p_message => SQLERRM,
1777: p_error_type => 'D'
1785:
1786: BEGIN
1787: l_pos := 1;
1788:
1789: UPDATE gme_migration_control
1790: SET migrated_ind = 'Y',
1791: last_update_date = g_mig_date
1792: WHERE table_name = l_table_name;
1793:
1795:
1796: EXCEPTION
1797: WHEN OTHERS THEN
1798: insert_message (
1799: p_table_name => 'gme_migration_control',
1800: p_procedure_name => 'set_GME_validated',
1801: p_parameters => l_table_name,
1802: p_message => SQLERRM || ' with pos = ' || l_pos,
1803: p_error_type => 'D'
1812: l_table_name VARCHAR2(50) := 'GME_validation';
1813:
1814: CURSOR cur_check_control (v_table_name VARCHAR2) IS
1815: SELECT migrated_ind
1816: FROM gme_migration_control
1817: WHERE table_name = v_table_name;
1818:
1819: BEGIN
1820:
1824: FETCH cur_check_control INTO l_mig_ind;
1825: l_pos := 3;
1826:
1827: IF cur_check_control%NOTFOUND THEN
1828: INSERT INTO gme_migration_control
1829: (table_name,
1830: migrated_ind,
1831: last_update_date
1832: )
1836: );
1837:
1838: l_pos := 4;
1839: ELSE
1840: UPDATE gme_migration_control
1841: SET migrated_ind = 'N',
1842: last_update_date = g_mig_date
1843: WHERE table_name = l_table_name;
1844: END IF;
1849:
1850: EXCEPTION
1851: WHEN OTHERS THEN
1852: insert_message (
1853: p_table_name => 'gme_migration_control',
1854: p_procedure_name => 'reset_GME_validated',
1855: p_parameters => l_table_name,
1856: p_message => SQLERRM || ' with pos = ' || l_pos,
1857: p_error_type => 'D'
1867:
1868:
1869: CURSOR cur_check_control (v_table_name VARCHAR2) IS
1870: SELECT migrated_ind
1871: FROM gme_migration_control
1872: WHERE table_name = v_table_name;
1873:
1874: BEGIN
1875:
1879: FETCH cur_check_control INTO l_mig_ind;
1880: l_pos := 3;
1881:
1882: IF cur_check_control%NOTFOUND THEN
1883: INSERT INTO gme_migration_control
1884: (table_name,
1885: migrated_ind,
1886: last_update_date
1887: )
1908:
1909: EXCEPTION
1910: WHEN OTHERS THEN
1911: insert_message (
1912: p_table_name => 'gme_migration_control',
1913: p_procedure_name => 'is_table_migrated',
1914: p_parameters => p_table_name,
1915: p_message => SQLERRM || ' with pos = ' || l_pos,
1916: p_error_type => 'D'
1923: x_return_status OUT NOCOPY VARCHAR2
1924: ) IS
1925: l_pos NUMBER := 0;
1926: BEGIN
1927: /* NOTE: this assumes that a record already exists in gme_migration_control
1928: for p_table_name. This is because in is_table_migrated, if the record is
1929: not found, it is created. And since is_table_migrated is always called before
1930: this procedure, we can assume that the record is there. */
1931:
1932: x_return_status := FND_API.G_RET_STS_SUCCESS;
1933:
1934: l_pos := 1;
1935:
1936: UPDATE gme_migration_control
1937: SET migrated_ind = 'Y',
1938: last_update_date = g_mig_date
1939: WHERE table_name = p_table_name;
1940:
1942:
1943: EXCEPTION
1944: WHEN OTHERS THEN
1945: insert_message (
1946: p_table_name => 'gme_migration_control',
1947: p_procedure_name => 'set_table_migrated',
1948: p_parameters => p_table_name,
1949: p_message => SQLERRM || ' with pos = ' || l_pos,
1950: p_error_type => 'D'