DBA Data[Home] [Help]

APPS.FFDBITEM dependencies on DBMS_SQL

Line 328: dbitem_cursor := dbms_sql.open_cursor;

324: rows_fetched integer;
325: begin
326: hr_utility.set_location('ffdbitem.get_dbitem_value',1);
327: -- open a new cursor for the DB item select statement
328: dbitem_cursor := dbms_sql.open_cursor;
329: hr_utility.set_location('ffdbitem.get_dbitem_value',2);
330: hr_utility.trace(p_item_info.item_sql);
331: -- parse the SQL passed in
332: dbms_sql.parse(dbitem_cursor, p_item_info.item_sql, dbms_sql.v7);

Line 332: dbms_sql.parse(dbitem_cursor, p_item_info.item_sql, dbms_sql.v7);

328: dbitem_cursor := dbms_sql.open_cursor;
329: hr_utility.set_location('ffdbitem.get_dbitem_value',2);
330: hr_utility.trace(p_item_info.item_sql);
331: -- parse the SQL passed in
332: dbms_sql.parse(dbitem_cursor, p_item_info.item_sql, dbms_sql.v7);
333: --
334: hr_utility.set_location('ffdbitem.get_dbitem_value',3);
335: for i in 1..p_item_info.contexts.context_count loop
336: hr_utility.set_location('ffdbitem.get_dbitem_value',4);

Line 338: dbms_sql.bind_variable(dbitem_cursor,

334: hr_utility.set_location('ffdbitem.get_dbitem_value',3);
335: for i in 1..p_item_info.contexts.context_count loop
336: hr_utility.set_location('ffdbitem.get_dbitem_value',4);
337: hr_utility.trace(p_item_info.contexts.bind_names(i));
338: dbms_sql.bind_variable(dbitem_cursor,
339: p_item_info.contexts.bind_names(i),
340: p_item_info.contexts.bind_values(i));
341: end loop;
342: hr_utility.set_location('ffdbitem.get_dbitem_value',5);

Line 347: dbms_sql.define_column(dbitem_cursor, 1, dbitem_text_value, 255);

343: -- Define an appropriately typed variable
344: if (p_item_info.data_type = 'T') then
345: hr_utility.set_location('ffdbitem.get_dbitem_value',6);
346: -- Define the (single) select list item as a varchar2
347: dbms_sql.define_column(dbitem_cursor, 1, dbitem_text_value, 255);
348: elsif (p_item_info.data_type = 'N') then
349: hr_utility.set_location('ffdbitem.get_dbitem_value',7);
350: -- Define the (single) select list item as a number
351: dbms_sql.define_column(dbitem_cursor, 1, dbitem_number_value);

Line 351: dbms_sql.define_column(dbitem_cursor, 1, dbitem_number_value);

347: dbms_sql.define_column(dbitem_cursor, 1, dbitem_text_value, 255);
348: elsif (p_item_info.data_type = 'N') then
349: hr_utility.set_location('ffdbitem.get_dbitem_value',7);
350: -- Define the (single) select list item as a number
351: dbms_sql.define_column(dbitem_cursor, 1, dbitem_number_value);
352: elsif (p_item_info.data_type = 'D') then
353: hr_utility.set_location('ffdbitem.get_dbitem_value',8);
354: -- Define the (single) select list item as a date
355: dbms_sql.define_column(dbitem_cursor, 1, dbitem_date_value);

Line 355: dbms_sql.define_column(dbitem_cursor, 1, dbitem_date_value);

351: dbms_sql.define_column(dbitem_cursor, 1, dbitem_number_value);
352: elsif (p_item_info.data_type = 'D') then
353: hr_utility.set_location('ffdbitem.get_dbitem_value',8);
354: -- Define the (single) select list item as a date
355: dbms_sql.define_column(dbitem_cursor, 1, dbitem_date_value);
356: else
357: hr_utility.set_message (802, 'BAD_DATA_TYPE');
358: hr_utility.set_message_token ('1',p_item_info.item_name);
359: hr_utility.raise_error;

Line 364: execute_status := dbms_sql.execute(dbitem_cursor);

360: end if;
361: hr_utility.set_location('ffdbitem.get_dbitem_value',9);
362: --
363: -- Execute the cursor
364: execute_status := dbms_sql.execute(dbitem_cursor);
365: --
366: hr_utility.set_location('ffdbitem.get_dbitem_value',10);
367: -- Fetch the rows (only 1 row should be fetched for database items)
368: rows_fetched := dbms_sql.fetch_rows(dbitem_cursor);

Line 368: rows_fetched := dbms_sql.fetch_rows(dbitem_cursor);

364: execute_status := dbms_sql.execute(dbitem_cursor);
365: --
366: hr_utility.set_location('ffdbitem.get_dbitem_value',10);
367: -- Fetch the rows (only 1 row should be fetched for database items)
368: rows_fetched := dbms_sql.fetch_rows(dbitem_cursor);
369: hr_utility.set_location('ffdbitem.get_dbitem_value',11);
370: if (rows_fetched = 1) then
371: hr_utility.set_location('ffdbitem.get_dbitem_value',12);
372: -- get column value according to data type of item

Line 376: dbms_sql.column_value(dbitem_cursor, 1, dbitem_text_value);

372: -- get column value according to data type of item
373: if (p_item_info.data_type = 'T') then
374: hr_utility.set_location('ffdbitem.get_dbitem_value',13);
375: -- Define the (single) select list item as a varchar2
376: dbms_sql.column_value(dbitem_cursor, 1, dbitem_text_value);
377: hr_utility.set_location('ffdbitem.get_dbitem_value',14);
378: if (dbitem_text_value is null and not p_item_info.null_ok) then
379: execute_error('FFX00_NULL_VALUE', p_item_info.item_name, '1', '');
380: end if;

Line 384: dbms_sql.column_value(dbitem_cursor, 1, dbitem_number_value);

380: end if;
381: elsif (p_item_info.data_type = 'N') then
382: hr_utility.set_location('ffdbitem.get_dbitem_value',15);
383: -- Define the (single) select list item as a number
384: dbms_sql.column_value(dbitem_cursor, 1, dbitem_number_value);
385: hr_utility.set_location('ffdbitem.get_dbitem_value',16);
386: if (dbitem_number_value is null and not p_item_info.null_ok) then
387: execute_error('FFX00_NULL_VALUE', p_item_info.item_name, '1', '');
388: end if;

Line 393: dbms_sql.column_value(dbitem_cursor, 1, dbitem_date_value);

389: dbitem_text_value := to_char(dbitem_number_value);
390: else
391: hr_utility.set_location('ffdbitem.get_dbitem_value',17);
392: -- Define the (single) select list item as a date
393: dbms_sql.column_value(dbitem_cursor, 1, dbitem_date_value);
394: hr_utility.set_location('ffdbitem.get_dbitem_value',18);
395: if (dbitem_date_value is null and not p_item_info.null_ok ) then
396: execute_error('FFX00_NULL_VALUE', p_item_info.item_name, '1', '');
397: end if;

Line 412: dbms_sql.close_cursor(dbitem_cursor);

408: execute_error('FFX00_TOO_MANY_ROWS', p_item_info.item_name, '1', '');
409: end if;
410: -- Close cursor
411: hr_utility.set_location('ffdbitem.get_dbitem_value',20);
412: dbms_sql.close_cursor(dbitem_cursor);
413: hr_utility.set_location('ffdbitem.get_dbitem_value',21);
414: -- return value
415: return dbitem_text_value;
416: exception

Line 419: if dbms_sql.is_open(dbitem_cursor) then

415: return dbitem_text_value;
416: exception
417: when others then
418: -- Close cursor if it is open
419: if dbms_sql.is_open(dbitem_cursor) then
420: dbms_sql.close_cursor(dbitem_cursor);
421: end if;
422: -- re-raise the exception
423: raise;

Line 420: dbms_sql.close_cursor(dbitem_cursor);

416: exception
417: when others then
418: -- Close cursor if it is open
419: if dbms_sql.is_open(dbitem_cursor) then
420: dbms_sql.close_cursor(dbitem_cursor);
421: end if;
422: -- re-raise the exception
423: raise;
424: end get_dbitem_value;