The following lines contain the word 'select', 'insert', 'update' or 'delete':
select displayed_field
into C_address_at_top
from po_lookup_codes
where lookup_type = 'PO_POXPRRFP_XMLP_PKG'
and lookup_code = 'ADDRESS AT TOP';
UPDATE po_headers
SET printed_date = sysdate
, print_count = nvl(print_count,0) + 1
, status_lookup_code = 'P'
WHERE po_header_id = poh_po_header_id;
UPDATE po_rfq_vendors
SET printed_date = sysdate
, print_count = nvl(print_count,0) + 1
, print_flag = 'N'
WHERE po_header_id = poh_po_header_id
AND sequence_num = poh_sequence_num;
UPDATE po_headers
SET printed_date = sysdate
, print_count = nvl(print_count,0) + 1
, status_lookup_code = 'P'
WHERE po_header_id = poh_po_header_id;
UPDATE po_rfq_vendors
SET printed_date = sysdate
, print_count = nvl(print_count,0) + 1
, print_flag = 'N'
WHERE po_header_id = poh_po_header_id
AND sequence_num = poh_sequence_num;
select 'This PO is OK to be displayed so far as security is concerned'
into l_dummy
from dual
where poh_rfq_num in
(select ph.segment1
from PO_HEADERS PH,
PO_DOCUMENT_TYPES_ALL_TL T, PO_DOCUMENT_TYPES_ALL_B B ,
fnd_user fnd,
po_system_parameters psp
WHERE fnd.user_id = P_user_id
and fnd.employee_id is not null
and ph.type_lookup_code = 'RFQ'
and B.DOCUMENT_TYPE_CODE = T.DOCUMENT_TYPE_CODE
AND B.DOCUMENT_SUBTYPE = T.DOCUMENT_SUBTYPE
AND B.ORG_ID = T.ORG_ID AND B.ORG_ID = PH.ORG_ID AND T.LANGUAGE = USERENV('LANG')
and B.document_type_code = ph.type_lookup_code
and B.document_subtype = 'STANDARD'
and ( ph.agent_id = fnd.employee_id
OR B.security_level_code = 'PUBLIC'
OR
( B.security_level_code = 'PURCHASING'
AND EXISTS
( SELECT 'Is the user an agent'
FROM PO_AGENTS POA
WHERE POA.AGENT_ID =
fnd.employee_id ))
OR
( B.security_level_code = 'HIERARCHY'
AND fnd.employee_id IN
( SELECT POEH.SUPERIOR_ID
FROM PO_EMPLOYEE_HIERARCHIES POEH
WHERE POEH.EMPLOYEE_ID =
PH.AGENT_ID
AND POEH.POSITION_STRUCTURE_ID =
PSP.SECURITY_POSITION_STRUCTURE_ID)))) ;
select substr(userenv('LANGUAGE'),1,instr(userenv('LANGUAGE'),'_')-1)
into SESSION_LANGUAGE
from dual;
select nls_language
into BASE_LANGUAGE
from fnd_languages
where installed_flag = 'B';
execute immediate 'select attribute_column_name
from ak_translated_columns atc,
ak_language_attribute_xrefs alax
where atc.table_name = ' || '''PO_LINES''' ||
' and atc.column_name = ' || '''ITEM_DESCRIPTION''' ||
' and alax.translated_column_number = atc.translated_column_number
and alax.language = ' || '''' || SESSION_LANGUAGE || ''''
into temp_col_name;
execute immediate 'select alax.attribute_column_name
from ak_translated_columns atc,
ak_language_attribute_xrefs alax
where atc.table_name = ' || '''MTL_UNITS_OF_MEASURE''' ||
' and atc.column_name = ' || '''UNIT_OF_MEASURE''' || 'and alax.translated_column_number = atc.translated_column_number
and alax.language = ' || '''' || SESSION_LANGUAGE || ''''
into temp_col_name;
sql_stmt := 'select multi_lingual_flag
into :MLS_FLAG
from fnd_product_groups';
select short_text
into short_note
from fnd_documents_short_text
where media_id = header_note_media_id;
select long_text
into long_note
from fnd_documents_long_text
where media_id = header_note_media_id;
select short_text
into short_note
from fnd_documents_short_text
where media_id = line_note_media_id;
select long_text
into long_note
from fnd_documents_long_text
where media_id = line_note_media_id;
select short_text
into short_note
from fnd_documents_short_text
where media_id = item_note_media_id;
select long_text
into long_note
from fnd_documents_long_text
where media_id = item_note_media_id;