144: VALUES(
145: l_cell_rec.cell_id,
146: l_cell_rec.sel_type,
147: SYSDATE,
148: FND_GLOBAL.user_id,
149: SYSDATE,
150: FND_GLOBAL.user_id,
151: FND_GLOBAL.conc_login_id,
152: 1, -- object_version_number
146: l_cell_rec.sel_type,
147: SYSDATE,
148: FND_GLOBAL.user_id,
149: SYSDATE,
150: FND_GLOBAL.user_id,
151: FND_GLOBAL.conc_login_id,
152: 1, -- object_version_number
153: l_cell_rec.cell_code,
154: 'Y', -- always to be true for segment
147: SYSDATE,
148: FND_GLOBAL.user_id,
149: SYSDATE,
150: FND_GLOBAL.user_id,
151: FND_GLOBAL.conc_login_id,
152: 1, -- object_version_number
153: l_cell_rec.cell_code,
154: 'Y', -- always to be true for segment
155: NVL(l_cell_rec.enabled_flag,'Y'),
154: 'Y', -- always to be true for segment
155: NVL(l_cell_rec.enabled_flag,'Y'),
156: l_cell_rec.ORIGINAL_SIZE ,
157: l_cell_rec.PARENT_CELL_ID,
158: l_cell_rec.owner_id,--FND_GLOBAL.user_id,
159: TO_NUMBER(SUBSTRB(userenv('CLIENT_INFO'),1,10)),
160: NVL(l_cell_rec.user_status_id, 400),
161: NVL(l_cell_rec.status_code, 'DRAFT'),
162: SYSDATE,
178: SELECT
179: l_cell_rec.cell_id,
180: l.language_code,
181: SYSDATE,
182: FND_GLOBAL.user_id,
183: SYSDATE,
184: FND_GLOBAL.user_id,
185: FND_GLOBAL.conc_login_id,
186: USERENV('LANG'),
180: l.language_code,
181: SYSDATE,
182: FND_GLOBAL.user_id,
183: SYSDATE,
184: FND_GLOBAL.user_id,
185: FND_GLOBAL.conc_login_id,
186: USERENV('LANG'),
187: l_cell_rec.cell_name,
188: l_cell_rec.description
181: SYSDATE,
182: FND_GLOBAL.user_id,
183: SYSDATE,
184: FND_GLOBAL.user_id,
185: FND_GLOBAL.conc_login_id,
186: USERENV('LANG'),
187: l_cell_rec.cell_name,
188: l_cell_rec.description
189: FROM fnd_languages l
576:
577: UPDATE ams_cells_all_b SET
578: sel_type = l_cell_rec.sel_type,
579: last_update_date = SYSDATE,
580: last_updated_by = FND_GLOBAL.user_id,
581: last_update_login = FND_GLOBAL.conc_login_id,
582: object_version_number = l_cell_rec.object_version_number + 1,
583: cell_code = l_cell_rec.cell_code,
584: enabled_flag = NVL(l_cell_rec.enabled_flag,'Y'),
577: UPDATE ams_cells_all_b SET
578: sel_type = l_cell_rec.sel_type,
579: last_update_date = SYSDATE,
580: last_updated_by = FND_GLOBAL.user_id,
581: last_update_login = FND_GLOBAL.conc_login_id,
582: object_version_number = l_cell_rec.object_version_number + 1,
583: cell_code = l_cell_rec.cell_code,
584: enabled_flag = NVL(l_cell_rec.enabled_flag,'Y'),
585: parent_cell_id = l_cell_rec.parent_cell_id,
603: update ams_cells_all_tl set
604: cell_name = l_cell_rec.cell_name,
605: description = l_cell_rec.description,
606: last_update_date = SYSDATE,
607: last_updated_by = FND_GLOBAL.user_id,
608: last_update_login = FND_GLOBAL.conc_login_id,
609: source_lang = USERENV('LANG')
610: WHERE cell_id = l_cell_rec.cell_id
611: AND USERENV('LANG') IN (language, source_lang);
604: cell_name = l_cell_rec.cell_name,
605: description = l_cell_rec.description,
606: last_update_date = SYSDATE,
607: last_updated_by = FND_GLOBAL.user_id,
608: last_update_login = FND_GLOBAL.conc_login_id,
609: source_lang = USERENV('LANG')
610: WHERE cell_id = l_cell_rec.cell_id
611: AND USERENV('LANG') IN (language, source_lang);
612:
1374: -- find ' from ' position
1375: IF instr(l_sql_string, ' FROM ') > 0
1376: THEN
1377: l_from_position := instr(l_sql_string, ' FROM ');
1378: ELSIF instr(l_sql_string, FND_GLOBAL.LOCAL_CHR(10)||'FROM ') > 0
1379: THEN
1380: l_from_position := instr(l_sql_string, FND_GLOBAL.LOCAL_CHR(10)||'FROM ');
1381: ELSIF instr(l_sql_string, ' FROM'||FND_GLOBAL.LOCAL_CHR(10)) > 0
1382: THEN
1376: THEN
1377: l_from_position := instr(l_sql_string, ' FROM ');
1378: ELSIF instr(l_sql_string, FND_GLOBAL.LOCAL_CHR(10)||'FROM ') > 0
1379: THEN
1380: l_from_position := instr(l_sql_string, FND_GLOBAL.LOCAL_CHR(10)||'FROM ');
1381: ELSIF instr(l_sql_string, ' FROM'||FND_GLOBAL.LOCAL_CHR(10)) > 0
1382: THEN
1383: l_from_position := instr(l_sql_string, ' FROM'||FND_GLOBAL.LOCAL_CHR(10));
1384: ELSIF instr(l_sql_string, FND_GLOBAL.LOCAL_CHR(10)||'FROM'||FND_GLOBAL.LOCAL_CHR(10)) >0
1377: l_from_position := instr(l_sql_string, ' FROM ');
1378: ELSIF instr(l_sql_string, FND_GLOBAL.LOCAL_CHR(10)||'FROM ') > 0
1379: THEN
1380: l_from_position := instr(l_sql_string, FND_GLOBAL.LOCAL_CHR(10)||'FROM ');
1381: ELSIF instr(l_sql_string, ' FROM'||FND_GLOBAL.LOCAL_CHR(10)) > 0
1382: THEN
1383: l_from_position := instr(l_sql_string, ' FROM'||FND_GLOBAL.LOCAL_CHR(10));
1384: ELSIF instr(l_sql_string, FND_GLOBAL.LOCAL_CHR(10)||'FROM'||FND_GLOBAL.LOCAL_CHR(10)) >0
1385: THEN
1379: THEN
1380: l_from_position := instr(l_sql_string, FND_GLOBAL.LOCAL_CHR(10)||'FROM ');
1381: ELSIF instr(l_sql_string, ' FROM'||FND_GLOBAL.LOCAL_CHR(10)) > 0
1382: THEN
1383: l_from_position := instr(l_sql_string, ' FROM'||FND_GLOBAL.LOCAL_CHR(10));
1384: ELSIF instr(l_sql_string, FND_GLOBAL.LOCAL_CHR(10)||'FROM'||FND_GLOBAL.LOCAL_CHR(10)) >0
1385: THEN
1386: l_from_position := instr(l_sql_string, FND_GLOBAL.LOCAL_CHR(10)||'FROM'||FND_GLOBAL.LOCAL_CHR(10));
1387: END IF;
1380: l_from_position := instr(l_sql_string, FND_GLOBAL.LOCAL_CHR(10)||'FROM ');
1381: ELSIF instr(l_sql_string, ' FROM'||FND_GLOBAL.LOCAL_CHR(10)) > 0
1382: THEN
1383: l_from_position := instr(l_sql_string, ' FROM'||FND_GLOBAL.LOCAL_CHR(10));
1384: ELSIF instr(l_sql_string, FND_GLOBAL.LOCAL_CHR(10)||'FROM'||FND_GLOBAL.LOCAL_CHR(10)) >0
1385: THEN
1386: l_from_position := instr(l_sql_string, FND_GLOBAL.LOCAL_CHR(10)||'FROM'||FND_GLOBAL.LOCAL_CHR(10));
1387: END IF;
1388:
1382: THEN
1383: l_from_position := instr(l_sql_string, ' FROM'||FND_GLOBAL.LOCAL_CHR(10));
1384: ELSIF instr(l_sql_string, FND_GLOBAL.LOCAL_CHR(10)||'FROM'||FND_GLOBAL.LOCAL_CHR(10)) >0
1385: THEN
1386: l_from_position := instr(l_sql_string, FND_GLOBAL.LOCAL_CHR(10)||'FROM'||FND_GLOBAL.LOCAL_CHR(10));
1387: END IF;
1388:
1389: IF instr(l_sql_string, 'PARTY_ID') = 0
1390: OR l_from_position = 0
1439: )
1440: VALUES(
1441: l_act_disc_id,
1442: SYSDATE,
1443: FND_GLOBAL.user_id,
1444: SYSDATE,
1445: FND_GLOBAL.user_id,
1446: FND_GLOBAL.conc_login_id,
1447: 1,
1441: l_act_disc_id,
1442: SYSDATE,
1443: FND_GLOBAL.user_id,
1444: SYSDATE,
1445: FND_GLOBAL.user_id,
1446: FND_GLOBAL.conc_login_id,
1447: 1,
1448: l_discoverer_cell_rec.workbook_name,
1449: l_discoverer_cell_rec.workbook_owner_name,
1442: SYSDATE,
1443: FND_GLOBAL.user_id,
1444: SYSDATE,
1445: FND_GLOBAL.user_id,
1446: FND_GLOBAL.conc_login_id,
1447: 1,
1448: l_discoverer_cell_rec.workbook_name,
1449: l_discoverer_cell_rec.workbook_owner_name,
1450: l_cell_id,
1580:
1581: IF instr(l_sql_string, ' FROM ') > 0
1582: THEN
1583: l_from_position := instr(l_sql_string, ' FROM ');
1584: ELSIF instr(l_sql_string, FND_GLOBAL.LOCAL_CHR(10)||'FROM ') > 0
1585: THEN
1586: l_from_position := instr(l_sql_string, FND_GLOBAL.LOCAL_CHR(10)||'FROM ');
1587: ELSIF instr(l_sql_string, ' FROM'||FND_GLOBAL.LOCAL_CHR(10)) > 0
1588: THEN
1582: THEN
1583: l_from_position := instr(l_sql_string, ' FROM ');
1584: ELSIF instr(l_sql_string, FND_GLOBAL.LOCAL_CHR(10)||'FROM ') > 0
1585: THEN
1586: l_from_position := instr(l_sql_string, FND_GLOBAL.LOCAL_CHR(10)||'FROM ');
1587: ELSIF instr(l_sql_string, ' FROM'||FND_GLOBAL.LOCAL_CHR(10)) > 0
1588: THEN
1589: l_from_position := instr(l_sql_string, ' FROM'||FND_GLOBAL.LOCAL_CHR(10));
1590: ELSIF instr(l_sql_string, FND_GLOBAL.LOCAL_CHR(10)||'FROM'||FND_GLOBAL.LOCAL_CHR(10)) >0
1583: l_from_position := instr(l_sql_string, ' FROM ');
1584: ELSIF instr(l_sql_string, FND_GLOBAL.LOCAL_CHR(10)||'FROM ') > 0
1585: THEN
1586: l_from_position := instr(l_sql_string, FND_GLOBAL.LOCAL_CHR(10)||'FROM ');
1587: ELSIF instr(l_sql_string, ' FROM'||FND_GLOBAL.LOCAL_CHR(10)) > 0
1588: THEN
1589: l_from_position := instr(l_sql_string, ' FROM'||FND_GLOBAL.LOCAL_CHR(10));
1590: ELSIF instr(l_sql_string, FND_GLOBAL.LOCAL_CHR(10)||'FROM'||FND_GLOBAL.LOCAL_CHR(10)) >0
1591: THEN
1585: THEN
1586: l_from_position := instr(l_sql_string, FND_GLOBAL.LOCAL_CHR(10)||'FROM ');
1587: ELSIF instr(l_sql_string, ' FROM'||FND_GLOBAL.LOCAL_CHR(10)) > 0
1588: THEN
1589: l_from_position := instr(l_sql_string, ' FROM'||FND_GLOBAL.LOCAL_CHR(10));
1590: ELSIF instr(l_sql_string, FND_GLOBAL.LOCAL_CHR(10)||'FROM'||FND_GLOBAL.LOCAL_CHR(10)) >0
1591: THEN
1592: l_from_position := instr(l_sql_string, FND_GLOBAL.LOCAL_CHR(10)||'FROM'||FND_GLOBAL.LOCAL_CHR(10));
1593: END IF;
1586: l_from_position := instr(l_sql_string, FND_GLOBAL.LOCAL_CHR(10)||'FROM ');
1587: ELSIF instr(l_sql_string, ' FROM'||FND_GLOBAL.LOCAL_CHR(10)) > 0
1588: THEN
1589: l_from_position := instr(l_sql_string, ' FROM'||FND_GLOBAL.LOCAL_CHR(10));
1590: ELSIF instr(l_sql_string, FND_GLOBAL.LOCAL_CHR(10)||'FROM'||FND_GLOBAL.LOCAL_CHR(10)) >0
1591: THEN
1592: l_from_position := instr(l_sql_string, FND_GLOBAL.LOCAL_CHR(10)||'FROM'||FND_GLOBAL.LOCAL_CHR(10));
1593: END IF;
1594:
1588: THEN
1589: l_from_position := instr(l_sql_string, ' FROM'||FND_GLOBAL.LOCAL_CHR(10));
1590: ELSIF instr(l_sql_string, FND_GLOBAL.LOCAL_CHR(10)||'FROM'||FND_GLOBAL.LOCAL_CHR(10)) >0
1591: THEN
1592: l_from_position := instr(l_sql_string, FND_GLOBAL.LOCAL_CHR(10)||'FROM'||FND_GLOBAL.LOCAL_CHR(10));
1593: END IF;
1594:
1595: IF instr(l_sql_string, 'PARTY_ID') = 0
1596: OR instr(l_sql_string, 'PARTY_ID', 1, 1) > l_from_position
3080: -- find ' from ' position
3081: IF instr(l_sql_string, ' FROM ') > 0
3082: THEN
3083: l_from_position := instr(l_sql_string, ' FROM ');
3084: ELSIF instr(l_sql_string, FND_GLOBAL.LOCAL_CHR(10)||'FROM ') > 0
3085: THEN
3086: l_from_position := instr(l_sql_string, FND_GLOBAL.LOCAL_CHR(10)||'FROM ');
3087: ELSIF instr(l_sql_string, ' FROM'||FND_GLOBAL.LOCAL_CHR(10)) > 0
3088: THEN
3082: THEN
3083: l_from_position := instr(l_sql_string, ' FROM ');
3084: ELSIF instr(l_sql_string, FND_GLOBAL.LOCAL_CHR(10)||'FROM ') > 0
3085: THEN
3086: l_from_position := instr(l_sql_string, FND_GLOBAL.LOCAL_CHR(10)||'FROM ');
3087: ELSIF instr(l_sql_string, ' FROM'||FND_GLOBAL.LOCAL_CHR(10)) > 0
3088: THEN
3089: l_from_position := instr(l_sql_string, ' FROM'||FND_GLOBAL.LOCAL_CHR(10));
3090: ELSIF instr(l_sql_string, FND_GLOBAL.LOCAL_CHR(10)||'FROM'||FND_GLOBAL.LOCAL_CHR(10)) >0
3083: l_from_position := instr(l_sql_string, ' FROM ');
3084: ELSIF instr(l_sql_string, FND_GLOBAL.LOCAL_CHR(10)||'FROM ') > 0
3085: THEN
3086: l_from_position := instr(l_sql_string, FND_GLOBAL.LOCAL_CHR(10)||'FROM ');
3087: ELSIF instr(l_sql_string, ' FROM'||FND_GLOBAL.LOCAL_CHR(10)) > 0
3088: THEN
3089: l_from_position := instr(l_sql_string, ' FROM'||FND_GLOBAL.LOCAL_CHR(10));
3090: ELSIF instr(l_sql_string, FND_GLOBAL.LOCAL_CHR(10)||'FROM'||FND_GLOBAL.LOCAL_CHR(10)) >0
3091: THEN
3085: THEN
3086: l_from_position := instr(l_sql_string, FND_GLOBAL.LOCAL_CHR(10)||'FROM ');
3087: ELSIF instr(l_sql_string, ' FROM'||FND_GLOBAL.LOCAL_CHR(10)) > 0
3088: THEN
3089: l_from_position := instr(l_sql_string, ' FROM'||FND_GLOBAL.LOCAL_CHR(10));
3090: ELSIF instr(l_sql_string, FND_GLOBAL.LOCAL_CHR(10)||'FROM'||FND_GLOBAL.LOCAL_CHR(10)) >0
3091: THEN
3092: l_from_position := instr(l_sql_string, FND_GLOBAL.LOCAL_CHR(10)||'FROM'||FND_GLOBAL.LOCAL_CHR(10));
3093: END IF;
3086: l_from_position := instr(l_sql_string, FND_GLOBAL.LOCAL_CHR(10)||'FROM ');
3087: ELSIF instr(l_sql_string, ' FROM'||FND_GLOBAL.LOCAL_CHR(10)) > 0
3088: THEN
3089: l_from_position := instr(l_sql_string, ' FROM'||FND_GLOBAL.LOCAL_CHR(10));
3090: ELSIF instr(l_sql_string, FND_GLOBAL.LOCAL_CHR(10)||'FROM'||FND_GLOBAL.LOCAL_CHR(10)) >0
3091: THEN
3092: l_from_position := instr(l_sql_string, FND_GLOBAL.LOCAL_CHR(10)||'FROM'||FND_GLOBAL.LOCAL_CHR(10));
3093: END IF;
3094:
3088: THEN
3089: l_from_position := instr(l_sql_string, ' FROM'||FND_GLOBAL.LOCAL_CHR(10));
3090: ELSIF instr(l_sql_string, FND_GLOBAL.LOCAL_CHR(10)||'FROM'||FND_GLOBAL.LOCAL_CHR(10)) >0
3091: THEN
3092: l_from_position := instr(l_sql_string, FND_GLOBAL.LOCAL_CHR(10)||'FROM'||FND_GLOBAL.LOCAL_CHR(10));
3093: END IF;
3094:
3095: IF instr(l_sql_string, 'PARTY_ID') = 0
3096: OR l_from_position = 0