The following lines contain the word 'select', 'insert', 'update' or 'delete':
PROCEDURE Update_Row(
x_indicator_resp_id in number
,x_target_level_id in number
,x_responsibility_id in number
,x_last_updated_by in number
,x_last_update_date in date
,x_last_update_login in number
);
, p_last_updated_by IN NUMBER
, p_owner IN VARCHAR
, x_return_status OUT NOCOPY VARCHAR
, x_return_msg OUT NOCOPY VARCHAR
) IS
l_responsibility_id NUMBER;
l_last_updated_by NUMBER;
SELECT BIS_INDICATOR_RESPS_S.nextval
INTO l_indicator_resp_id
FROM DUAL;
IF (p_last_updated_by IS NULL) THEN
l_last_updated_by := l_user_id;
l_last_updated_by := p_last_updated_by;
Insert_Row
(
x_rowid => l_row_id
,x_indicator_resp_id => l_indicator_resp_id
,x_target_level_id => l_target_level_id
,x_responsibility_id => l_responsibility_id
,x_created_by => l_created_by
,x_creation_date => sysdate
,x_last_updated_by => l_last_updated_by
,x_last_update_date => sysdate
,x_last_update_login => l_login_id
);
Update_Row(
x_indicator_resp_id => l_target_level_id
,x_target_level_id => l_target_level_id
,x_responsibility_id => l_responsibility_id
,x_last_updated_by => l_last_updated_by
,x_last_update_date => sysdate
,x_last_update_login => l_login_id
);
SELECT count(1)
INTO l_count
FROM bis_indicator_resps
WHERE target_level_id = p_target_level_id
AND responsibility_id = p_responsibility_id; -- BIS_UTILITIES_PUB.put_line(p_text => ' l_count = ' || l_count ) ;
SELECT responsibility_id
INTO l_responsibility_id
FROM fnd_responsibility
WHERE responsibility_key = p_responsibility_key ;
SELECT target_level_id
INTO l_target_level_id
FROM bis_target_levels
WHERE short_name = p_target_level_short_name ;
PROCEDURE Insert_Row(
x_rowid in out NOCOPY varchar2
,x_indicator_resp_id in out NOCOPY number
,x_target_level_id in number
,x_responsibility_id in number
,x_created_by in number
,x_creation_date in date
,x_last_updated_by in number
,x_last_update_date in date
,x_last_update_login in number
)
IS
CURSOR CROWID IS SELECT rowid FROM bis_indicator_resps
WHERE indicator_resp_id = x_indicator_resp_id;
CURSOR CID IS SELECT bis_indicator_resps_s.nextval
FROM sys.dual;
INSERT INTO bis_indicator_resps (
indicator_resp_id
,target_level_id
,responsibility_id
,created_by
,creation_date
,last_updated_by
,last_update_date
,last_update_login
)
Values
(
x_indicator_resp_id
,x_target_level_id
,x_responsibility_id
,x_created_by
,x_creation_date
,x_last_updated_by
,x_last_update_date
,x_last_update_login
);
END Insert_Row;
,x_last_updated_by in number
,x_last_update_date in date
,x_last_update_login in number
)
IS
CURSOR C IS
SELECT *
FROM bis_indicator_resps
WHERE rowid = x_rowid
FOR UPDATE OF indicator_resp_id NOWAIT;
FND_MESSAGE.Set_Name('FND', 'FORM_RECORD_DELETED');
AND (Recinfo.last_updated_by = x_last_updated_by)
AND (Recinfo.last_update_date = x_last_update_date)
AND ( (Recinfo.last_update_login = x_last_update_login)
OR ( (recinfo.last_update_login IS NULL)
AND(x_last_update_login IS NULL)))
) then
return;
PROCEDURE Update_Row(
x_rowid in varchar2
,x_indicator_resp_id in number
,x_target_level_id in number
,x_responsibility_id in number
,x_created_by in number
,x_creation_date in date
,x_last_updated_by in number
,x_last_update_date in date
,x_last_update_login in number
)
IS
l_temp_msg VARCHAR2(100);
UPDATE bis_indicator_resps
SET
target_level_id = x_target_level_id
,responsibility_id = x_responsibility_id
,last_updated_by = x_last_updated_by
,last_update_date = x_last_update_date
,last_update_login = x_last_update_login
WHERE rowid = x_rowid;
END Update_Row;
PROCEDURE Update_Row(
x_indicator_resp_id in number
,x_target_level_id in number
,x_responsibility_id in number
,x_last_updated_by in number
,x_last_update_date in date
,x_last_update_login in number
)
IS
l_temp_msg VARCHAR2(100);
UPDATE bis_indicator_resps
SET
last_updated_by = x_last_updated_by
,last_update_date = x_last_update_date
,last_update_login = x_last_update_login
WHERE
target_level_id = x_target_level_id
AND responsibility_id = x_responsibility_id ;
END Update_Row;
PROCEDURE Delete_Row(
x_rowid in varchar2
)
IS
BEGIN
DELETE FROM bis_indicator_resps
WHERE rowid = x_rowid;
END Delete_Row;
SELECT COUNT(1)
FROM bis_indicator_resps
WHERE target_level_id = x_target_level_id
AND responsibility_id = x_responsibility_id
AND ((x_rowid is null) OR (rowid <> x_rowid));