The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT media_id
INTO x_media_id
FROM fnd_documents_vl
WHERE document_id IN (SELECT document_id
FROM fnd_attached_documents
WHERE pk1_value = p_protest_id
AND entity_name = 'PO_PROTESTS'
AND category_id IN (SELECT category_id
FROM
fnd_document_categories_vl
WHERE name =
'CUSTOM5641'
));
SELECT category_id
INTO l_category_id
FROM fnd_document_categories_vl
WHERE name = 'CUSTOM5641';
fnd_documents_pkg.Insert_row(row_id_tmp, document_id_tmp, SYSDATE, 1,
--NVL(X_created_by,0),
SYSDATE, 1, --NVL(X_created_by,0),
1, --X_last_update_login,
6, l_category_id, --Get the value for the category id 'Documents'
1, --null,--security_type,
NULL, --security_id,
'Y', --null,--publish_flag,
NULL, --image_type,
NULL, --storage_type,
'O', --usage_type,
SYSDATE, --start_date_active,
NULL, --end_date_active,
NULL, --X_request_id, --null
NULL, --X_program_application_id, --null
NULL, --X_program_id,--null
SYSDATE, NULL, --language,
NULL, --description,
l_file_name, x_media_id);
INSERT INTO fnd_lobs
(file_id,
file_name,
file_content_type,
upload_date,
expiration_date,
program_name,
program_tag,
file_data,
LANGUAGE,
oracle_charset,
file_format)
VALUES ( x_media_id,
l_file_name,
l_file_content_type,
SYSDATE,
NULL,
NULL,
NULL,
l_blob_data,
NULL,
NULL,
'binary' );
INSERT INTO fnd_attached_documents
(attached_document_id,
document_id,
creation_date,
created_by,
last_update_date,
last_updated_by,
last_update_login,
seq_num,
entity_name,
pk1_value,
pk2_value,
pk3_value,
pk4_value,
pk5_value,
automatically_added_flag,
program_application_id,
program_id,
program_update_date,
request_id,
attribute_category,
attribute1,
attribute2,
attribute3,
attribute4,
attribute5,
attribute6,
attribute7,
attribute8,
attribute9,
attribute10,
attribute11,
attribute12,
attribute13,
attribute14,
attribute15,
column1,
category_id)
VALUES ( fnd_attached_documents_s.NEXTVAL,
document_id_tmp,
SYSDATE,
1,
SYSDATE,
1,
NULL,
10,
l_entity_name,
To_char(p_protest_id),
NULL,
NULL,
NULL,
NULL,
'N',
NULL,
NULL,
SYSDATE,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
l_category_id );
SELECT fl.file_data,
fl.file_content_type,
fl.file_name
INTO l_document, l_filecontent_type, l_filename
FROM fnd_lobs fl
WHERE fl.file_id = l_document_id;
SELECT Count(1)
INTO l_user_exists
FROM wf_roles
WHERE name = Performer_list(i);
SELECT wfl.nls_language,
wfl.nls_territory
INTO l_adhocuser_lang, l_adhocuser_territory
FROM wf_languages wfl,
fnd_languages_vl flv
WHERE wfl.code = flv.language_code
AND flv.installed_flag = 'B';
SELECT Count(1)
INTO l_performer_exists
FROM wf_roles
WHERE name = l_po_email_performer;