The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT lookup_code INTO x_lookup_code
FROM FND_LOOKUP_VALUES_VL
WHERE lookup_type = p_lookup_type
AND lookup_code = p_lookup_code
AND sysdate between start_date_active
AND nvl(end_date_active,sysdate);
SELECT lookup_code INTO x_lookup_code
FROM FND_LOOKUP_VALUES_VL
WHERE lookup_type = p_lookup_type
AND meaning = p_meaning
AND sysdate between start_date_active
AND nvl(end_date_active,sysdate);
SELECT document_id
FROM AHL_DOCUMENTS_B
WHERE document_no = c_document_no;
SELECT doc_revision_id
FROM AHL_DOC_REVISIONS_B
WHERE revision_no = c_revision_no
AND document_id = c_document_id;
SELECT COUNT(*)
FROM AHL_DOC_REVISIONS_B
WHERE document_id = c_document_id;
SELECT doc_revision_id, revision_no
FROM AHL_DOC_REVISIONS_B
WHERE document_id = c_document_id;
l_association_tbl(i).delete_flag := p_x_association_tbl(i).delete_flag;
/* description : Updates and removes the association */
/* record */
/* */
/*------------------------------------------------------*/
PROCEDURE MODIFY_ASSOCIATION
(
p_api_version IN NUMBER := 1.0 ,
p_init_msg_list IN VARCHAR2 := FND_API.G_TRUE ,
p_commit IN VARCHAR2 := FND_API.G_FALSE ,
p_validate_only IN VARCHAR2 := FND_API.G_TRUE ,
p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
p_x_association_tbl IN OUT NOCOPY association_tbl ,
p_module_type IN VARCHAR2 ,
x_return_status OUT NOCOPY VARCHAR2 ,
x_msg_count OUT NOCOPY NUMBER ,
x_msg_data OUT NOCOPY VARCHAR2
)
IS
-- {{ adharia -- bug #2450326 - added- 9/7/2002
--To retrieve document id
CURSOR get_doc_id_info(c_document_no VARCHAR2)
IS
SELECT document_id
FROM AHL_DOCUMENTS_B
WHERE document_no = c_document_no;
SELECT COUNT(*)
FROM AHL_DOC_REVISIONS_B
WHERE document_id = c_document_id;
SELECT doc_revision_id, revision_no
FROM AHL_DOC_REVISIONS_B
WHERE document_id = c_document_id;
SELECT doc_revision_id
FROM AHL_DOC_REVISIONS_B A
WHERE revision_no = c_revision_no
AND document_id = c_document_id;
IF (p_x_association_tbl(i).delete_flag <> 'Y')
THEN
IF (p_x_association_tbl(i).document_no IS NULL) OR
(p_x_association_tbl(i).document_no = FND_API.G_MISS_CHAR)
THEN
FND_MESSAGE.SET_NAME('AHL','AHL_DI_DOCUMENT_NO_NULL');
ELSIF (p_x_association_tbl(i).delete_flag = 'Y')
THEN
--For Document Id,
IF (p_x_association_tbl(i).document_id IS NULL OR
p_x_association_tbl(i).document_id = FND_API.G_MISS_NUM)
THEN
-- If name is available
IF (p_x_association_tbl(i).document_no IS NOT NULL) AND
(p_x_association_tbl(i).document_no <> FND_API.G_MISS_CHAR)
THEN
OPEN get_doc_id_info(p_x_association_tbl(i).document_no);
END IF;--END IF DELETE FLAG
l_association_tbl(i).delete_flag := p_x_association_tbl(i).delete_flag;
SELECT document_id
FROM AHL_DOCUMENTS_B
WHERE document_no = c_document_no;
SELECT doc_revision_id
FROM AHL_DOC_REVISIONS_B A
WHERE revision_no = c_revision_no
AND document_id = c_document_id;
l_association_tbl(i).delete_flag := p_x_association_tblm(i).delete_flag;
l_association_tblc(i).delete_flag := p_x_association_tblc(i).delete_flag;