The following lines contain the word 'select', 'insert', 'update' or 'delete':
procedure INSERT_ROW (
X_ROWID in out nocopy VARCHAR2,
X_hierarchy_node_map_id in out nocopy NUMBER,
X_TOPIC_ID in NUMBER,
X_HIERARCHY_ID in NUMBER,
X_USER_INTERFACE_ID in number,
X_CREATED_BY in NUMBER,
X_CREATION_DATE in DATE,
X_LAST_UPDATE_DATE in DATE,
X_LAST_UPDATED_BY in NUMBER,
X_LAST_UPDATE_LOGIN in NUMBER
) is
cursor C is select ROWID from HR_KI_HIERARCHY_NODE_MAPS
where hierarchy_node_map_id = x_hierarchy_node_map_id;
select HR_KI_HIERARCHY_NODE_MAPS_S.NEXTVAL into x_hierarchy_node_map_id from sys.dual;
insert into HR_KI_HIERARCHY_NODE_MAPS (
hierarchy_node_map_id,
TOPIC_ID,
HIERARCHY_ID,
USER_INTERFACE_ID,
CREATION_DATE,
CREATED_BY,
LAST_UPDATE_DATE,
LAST_UPDATED_BY,
LAST_UPDATE_LOGIN,
OBJECT_VERSION_NUMBER
) values (
X_hierarchy_node_map_id,
X_TOPIC_ID,
X_HIERARCHY_ID,
X_USER_INTERFACE_ID,
X_CREATION_DATE,
X_CREATED_BY,
X_LAST_UPDATE_DATE,
X_LAST_UPDATED_BY,
X_LAST_UPDATE_LOGIN,
1
);
'HR_KI_HIERARCHY_NODE_MAPS.insert_row');
end INSERT_ROW;
select topic_id
from HR_KI_TOPICS
where upper(topic_key) = upper(X_TOPIC_KEY);
select HIERARCHY_ID
from HR_KI_HIERARCHIES
where upper(HIERARCHY_KEY) = upper(X_HIERARCHY_KEY);
select USER_INTERFACE_ID
from HR_KI_USER_INTERFACES
where upper(USER_INTERFACE_KEY) = upper(X_USER_INTERFACE_KEY);
X_LAST_UPDATE_DATE in VARCHAR2,
X_CUSTOM_MODE in VARCHAR2,
X_OWNER in VARCHAR2
)
is
l_proc VARCHAR2(31) := 'HR_KI_HNM_LOAD_API.LOAD_ROW';
l_last_update_date HR_KI_HIERARCHY_NODE_MAPS.last_update_date%TYPE := SYSDATE;
l_last_updated_by HR_KI_HIERARCHY_NODE_MAPS.last_updated_by%TYPE := 0;
l_last_update_login HR_KI_HIERARCHY_NODE_MAPS.last_update_login%TYPE := 0;
db_ludate date; -- entity update date in db
select nm.hierarchy_node_map_id
from hr_ki_hierarchy_node_maps nm,
hr_ki_hierarchies h,
hr_ki_topics top
where nm.hierarchy_id = h.hierarchy_id
and nm.topic_id = top.topic_id
and
top.topic_key = x_topic_key
and
h.hierarchy_key = x_hierarchy_key
union
select nm.hierarchy_node_map_id
from hr_ki_hierarchy_node_maps nm,
hr_ki_topics top,
hr_ki_user_interfaces ui
where nm.topic_id = top.topic_id
and nm.user_interface_id = ui.user_interface_id
and top.topic_key = x_topic_key
and ui.user_interface_key =x_user_interface_key
union
select nm.hierarchy_node_map_id
from hr_ki_hierarchy_node_maps nm,
hr_ki_user_interfaces ui,
hr_ki_hierarchies hi
where nm.hierarchy_id = hi.hierarchy_id
and nm.user_interface_id = ui.user_interface_id
and ui.user_interface_key = x_user_interface_key
and hi.hierarchy_key = x_hierarchy_key;
l_last_updated_by := fnd_load_util.owner_id(X_OWNER);
l_last_update_date := nvl(to_date(X_LAST_UPDATE_DATE, 'YYYY/MM/DD hh24:mi:ss'), sysdate);
INSERT_ROW
(
X_ROWID => l_rowid
,X_HIERARCHY_NODE_MAP_ID => l_hierarchy_node_map_id
,X_TOPIC_ID => l_topic_id
,X_HIERARCHY_ID => l_hierarchy_id
,X_USER_INTERFACE_ID => l_user_interface_id
,X_CREATED_BY => l_created_by
,X_CREATION_DATE => l_creation_date
,X_LAST_UPDATE_DATE => l_last_update_date
,X_LAST_UPDATED_BY => l_last_updated_by
,X_LAST_UPDATE_LOGIN => l_last_update_login
);