The following lines contain the word 'select', 'insert', 'update' or 'delete':
procedure insert_constraint_entries(
p_constraint_rev_id IN NUMBER,
p_object_id IN NUMBER,
p_app_id IN NUMBER,
p_user_id IN NUMBER,
x_return_status OUT NOCOPY VARCHAR2,
p_group_code IN VARCHAR2 := NULL, -- 09.13.2005 tsho added
p_object_type IN VARCHAR2 := NULL -- 09.13.2005 tsho added
)
IS
L_API_NAME CONSTANT VARCHAR2(30) := 'insert_constraint_entries';
select application_id from fnd_concurrent_programs
where concurrent_program_id = c_conc_program_id;
select application_id from fnd_responsibility
where responsibility_id = c_resp_id;
insert into AMW_CONSTRAINT_ENTRIES (
CONSTRAINT_REV_ID,
FUNCTION_ID,
LAST_UPDATED_BY,
LAST_UPDATE_DATE,
CREATED_BY,
CREATION_DATE,
LAST_UPDATE_LOGIN,
SECURITY_GROUP_ID,
GROUP_CODE, -- 09.13.2005 tsho added
OBJECT_TYPE, -- 09.13.2005 tsho added
APPLICATION_ID -- 04.21.2006 qliu added
) values (
p_constraint_rev_id,
p_object_id,
p_user_id,
sysdate,
p_user_id,
sysdate,
p_user_id,
null,
p_group_code, -- 09.13.2005 tsho added
p_object_type, -- 09.13.2005 tsho added
l_application_id -- 04.21.2006 qliu added
);
END insert_constraint_entries;
procedure delete_constraint_entries(
p_constraint_rev_id IN NUMBER,
x_return_status OUT NOCOPY VARCHAR2
)
IS
L_API_NAME CONSTANT VARCHAR2(30) := 'delete_constraint_entries';
delete from amw_constraint_entries
where constraint_rev_id = p_constraint_rev_id;
fnd_file.put_line (fnd_file.LOG, 'No data found for AMW_LOAD_CONSTRAINT_DATA.delete_constraint_entries: constraint_rev_id = '||p_constraint_rev_id);
END delete_constraint_entries;
procedure delete_constraint_waivers(
p_constraint_rev_id IN NUMBER,
x_return_status OUT NOCOPY VARCHAR2
)
IS
L_API_NAME CONSTANT VARCHAR2(30) := 'delete_constraint_waivers';
delete from amw_constraint_waivers
where constraint_rev_id = p_constraint_rev_id;
fnd_file.put_line (fnd_file.LOG, 'No data found for AMW_LOAD_CONSTRAINT_DATA.delete_constraint_waivers: constraint_rev_id = '||p_constraint_rev_id);
END delete_constraint_waivers;
PROCEDURE update_violations (
x_return_status OUT NOCOPY VARCHAR2,
p_constraint_rev_id IN NUMBER,
p_violation_status IN VARCHAR2
)
IS
L_API_NAME CONSTANT VARCHAR2(30) := 'update_violations';
UPDATE amw_violations
SET status_code = l_violation_status
WHERE constraint_rev_id = p_constraint_rev_id;
fnd_file.put_line (fnd_file.LOG, 'No data found for AMW_LOAD_CONSTRAINT_DATA.update_violations: constraint_rev_id = '||p_constraint_rev_id);
END update_violations;
SELECT 'Y'
FROM fnd_responsibility r, fnd_compiled_menu_functions m, fnd_form_functions f
WHERE r.responsibility_id = fnd_global.resp_id
AND r.application_id=fnd_global.resp_appl_id
AND r.menu_id = m.menu_id
AND m.function_id = f.function_id
AND f.function_name = v_import_func;
SELECT 'Y'
FROM fnd_resp_functions rf, fnd_form_functions f
WHERE rf.application_id = fnd_global.resp_appl_id
AND rf.responsibility_id = fnd_global.resp_appl_id
AND rf.rule_type = 'F'
AND rf.action_id = f.function_id
AND f.function_name = v_import_func;
'SELECT person_party_id '
||' FROM '||G_AMW_USER ||' u '
||' WHERE u.user_id = :1 ';
SELECT person_party_id
INTO l_party_id
FROM FND_USER u
WHERE u.user_id = p_user_id;
PROCEDURE update_interface_with_error (
p_err_msg IN VARCHAR2,
p_table_name IN VARCHAR2,
p_interface_id IN NUMBER
)
IS
L_API_NAME CONSTANT VARCHAR2(30) := 'update_interface_with_error';
ROLLBACK; -- rollback any inserts done during the current loop process
SELECT interface_status
INTO l_interface_status
FROM amw_constraint_interface
WHERE cst_interface_id = p_interface_id;
UPDATE amw_constraint_interface
SET interface_status =
l_interface_status
|| p_err_msg
|| '**'
,error_flag = 'Y'
WHERE cst_interface_id = p_interface_id;
END update_interface_with_error;
PROCEDURE insert_constraint(
x_return_status OUT NOCOPY VARCHAR2,
x_CONSTRAINT_REV_ID OUT NOCOPY NUMBER,
p_START_DATE IN DATE,
p_END_DATE IN DATE,
p_ENTERED_BY_ID IN NUMBER,
p_TYPE_CODE IN VARCHAR2,
p_RISK_ID IN NUMBER,
p_APPROVAL_STATUS IN VARCHAR2,
p_CONSTRAINT_NAME IN VARCHAR2,
p_CONSTRAINT_DESCRIPTION IN VARCHAR2,
p_user_id IN NUMBER,
p_classification IN VARCHAR2 := NULL, -- 09.13.2005 tsho added
p_objective_code IN VARCHAR2 := 'DT' -- 09.13.2005 tsho added
)
IS
L_API_NAME CONSTANT VARCHAR2(30) := 'insert_constraint';
SELECT AMW_CONSTRAINT_REV_S.NEXTVAL
FROM dual;
SELECT work_type_id
INTO l_classification
FROM amw_work_types_b
WHERE work_type_code = 'AMW_UNDEF'
AND object_id = (SELECT object_id
FROM fnd_objects
WHERE obj_name = 'AMW_CONSTRAINT');
AMW_CONSTRAINTS_PKG.INSERT_ROW(
X_ROWID => l_row_id,
X_CONSTRAINT_ID => l_constraint_rev_id,
X_CONSTRAINT_REV_ID => l_constraint_rev_id,
X_START_DATE => p_start_date,
X_END_DATE => p_end_date,
X_ENTERED_BY_ID => p_entered_by_id,
X_TYPE_CODE => p_type_code,
X_RISK_ID => p_risk_id,
X_LAST_UPDATED_BY => p_user_id,
X_LAST_UPDATE_DATE => sysdate,
X_CREATED_BY => p_user_id,
X_CREATION_DATE => sysdate,
X_LAST_UPDATE_LOGIN => p_user_id,
X_SECURITY_GROUP_ID => NULL,
X_OBJECT_VERSION_NUMBER => 1,
X_ATTRIBUTE_CATEGORY => NULL,
X_ATTRIBUTE1 => NULL,
X_ATTRIBUTE2 => NULL,
X_ATTRIBUTE3 => NULL,
X_ATTRIBUTE4 => NULL,
X_ATTRIBUTE5 => NULL,
X_ATTRIBUTE6 => NULL,
X_ATTRIBUTE7 => NULL,
X_ATTRIBUTE8 => NULL,
X_ATTRIBUTE9 => NULL,
X_ATTRIBUTE10 => NULL,
X_ATTRIBUTE11 => NULL,
X_ATTRIBUTE12 => NULL,
X_ATTRIBUTE13 => NULL,
X_ATTRIBUTE14 => NULL,
X_ATTRIBUTE15 => NULL,
X_CONSTRAINT_NAME => p_constraint_name,
X_CONSTRAINT_DESCRIPTION => p_constraint_description,
X_APPROVAL_STATUS => p_approval_status,
X_CLASSIFICATION => l_classification, -- 09.13.2005 tsho added
X_OBJECTIVE_CODE => p_objective_code -- 09.13.2005 tsho added
);
END insert_constraint;
PROCEDURE update_constraint(
x_return_status OUT NOCOPY VARCHAR2,
p_CONSTRAINT_REV_ID IN NUMBER,
p_START_DATE IN DATE,
p_END_DATE IN DATE,
p_ENTERED_BY_ID IN NUMBER,
p_TYPE_CODE IN VARCHAR2,
p_RISK_ID IN NUMBER,
p_APPROVAL_STATUS IN VARCHAR2,
p_CONSTRAINT_NAME IN VARCHAR2,
p_CONSTRAINT_DESCRIPTION IN VARCHAR2,
p_user_id IN NUMBER,
p_classification IN VARCHAR2 := NULL, -- 09.13.2005 tsho added
p_objective_code IN VARCHAR2 := NULL -- 09.13.2005 tsho added
)
IS
L_API_NAME CONSTANT VARCHAR2(30) := 'update_constraint';
SELECT AMW_CONSTRAINT_REV_S.NEXTVAL
FROM dual;
SELECT classification
FROM amw_constraints_b
WHERE constraint_rev_id=c_cst_rev_id;
SELECT objective_code
FROM amw_constraints_b
WHERE constraint_rev_id=c_cst_rev_id;
AMW_CONSTRAINTS_PKG.UPDATE_ROW(
X_CONSTRAINT_ID => p_constraint_rev_id,
X_CONSTRAINT_REV_ID => p_constraint_rev_id,
X_START_DATE => p_start_date,
X_END_DATE => p_end_date,
X_ENTERED_BY_ID => p_entered_by_id,
X_TYPE_CODE => p_type_code,
X_RISK_ID => p_risk_id,
X_LAST_UPDATED_BY => p_user_id,
X_LAST_UPDATE_DATE => sysdate,
X_LAST_UPDATE_LOGIN => p_user_id,
X_SECURITY_GROUP_ID => NULL,
X_OBJECT_VERSION_NUMBER => 1,
X_ATTRIBUTE_CATEGORY => NULL,
X_ATTRIBUTE1 => NULL,
X_ATTRIBUTE2 => NULL,
X_ATTRIBUTE3 => NULL,
X_ATTRIBUTE4 => NULL,
X_ATTRIBUTE5 => NULL,
X_ATTRIBUTE6 => NULL,
X_ATTRIBUTE7 => NULL,
X_ATTRIBUTE8 => NULL,
X_ATTRIBUTE9 => NULL,
X_ATTRIBUTE10 => NULL,
X_ATTRIBUTE11 => NULL,
X_ATTRIBUTE12 => NULL,
X_ATTRIBUTE13 => NULL,
X_ATTRIBUTE14 => NULL,
X_ATTRIBUTE15 => NULL,
X_CONSTRAINT_NAME => p_constraint_name,
X_CONSTRAINT_DESCRIPTION => p_constraint_description,
X_APPROVAL_STATUS => p_approval_status,
X_CLASSIFICATION => l_classification, -- 09.13.2005 tsho added
X_OBJECTIVE_CODE => l_objective_code -- 09.13.2005 tsho added
);
END update_constraint;
SELECT intf.cst_name,
intf.cst_description,
intf.cst_approval_status_code,
intf.cst_start_date,
intf.cst_end_date,
intf.risk_name,
intf.entered_by_id,
intf.cst_type_code,
intf.cst_interface_id,
intf.cst_entries_function_id,
intf.cst_entries_resp_id,
intf.cst_entries_group_code, -- 09.13.2005 tsho added
intf.cst_violat_obj_type -- 09.13.2005 tsho added
FROM amw_constraint_interface intf
WHERE intf.cst_interface_id = (
SELECT min(ci.cst_interface_id)
FROM amw_constraint_interface ci
WHERE ci.cst_name = intf.cst_name
--AND created_by = DECODE (p_user_id, NULL, created_by, p_user_id)
AND batch_id = DECODE (p_batch_id, NULL, batch_id, p_batch_id)
AND process_flag IS NULL
AND error_flag IS NULL
);
SELECT b.constraint_id, b.constraint_rev_id, b.approval_status
FROM amw_constraints_b b, amw_constraints_tl tl
WHERE tl.name = l_cst_name
AND tl.language = USERENV('LANG')
AND tl.constraint_id = b.constraint_id;
SELECT cst_name,
cst_interface_id,
cst_entries_function_id,
cst_entries_resp_id,
cst_entries_group_code, -- 09.13.2005 tsho added
cst_violat_obj_type, -- 09.13.2005 tsho added
cst_entries_appl_id -- 03.23.2007 dliao added
FROM amw_constraint_interface
WHERE cst_name = l_cst_name
--AND created_by = DECODE (p_user_id, NULL, created_by, p_user_id)
AND batch_id = DECODE (p_batch_id, NULL, batch_id, p_batch_id)
AND process_flag IS NULL
AND error_flag IS NULL;
SELECT intf.cst_name,
intf.cst_start_date,
intf.cst_end_date,
intf.cst_type_code,
intf.cst_interface_id,
intf.cst_entries_function_id,
intf.cst_entries_resp_id,
intf.cst_entries_group_code, -- 09.13.2005 tsho added
intf.cst_violat_obj_type -- 09.13.2005 tsho added
FROM amw_constraint_interface intf
WHERE
--intf.created_by = DECODE (p_user_id, NULL, intf.created_by, p_user_id)
intf.batch_id = DECODE (p_batch_id, NULL, intf.batch_id, p_batch_id)
AND intf.process_flag IS NULL
AND intf.error_flag IS NULL;
select intf.cst_interface_id, intf.cst_type_code
from amw_constraint_interface intf
where intf.batch_id=p_batch_id
and exists(select ci.cst_name
from (select cst_name,count(distinct cst_entries_function_id) as ct_cst_entries_function_id,
count(distinct cst_entries_group_code) as ct_cst_entries_group_code
from amw_constraint_interface
where batch_id=p_batch_id
and (cst_type_code='SET' or cst_type_code='ME')
group by cst_name) ci
where ((cst_type_code='ME' and ci.ct_cst_entries_function_id=1) or
(cst_type_code='SET' and (ci.ct_cst_entries_group_code=1 or ci.ct_cst_entries_function_id<2) ))
and intf.cst_name=ci.cst_name
);
select intf.cst_interface_id, intf.cst_type_code
from amw_constraint_interface intf
where intf.batch_id=p_batch_id
and exists ( select ci.cst_name
from (select cst_name,count(distinct cst_entries_resp_id) as ct_cst_entries_resp_id,
count(distinct cst_entries_group_code) as ct_cst_entries_group_code
from amw_constraint_interface
where batch_id=p_batch_id
and (cst_type_code='RESPSET' or cst_type_code='RESPME')
group by cst_name) ci
where ((cst_type_code='RESPME' and ci.ct_cst_entries_resp_id=1) or
(cst_type_code='RESPSET' and (ci.ct_cst_entries_group_code=1 or ci.ct_cst_entries_resp_id<2) ))
and intf.cst_name=ci.cst_name
);
select intf.cst_interface_id
from amw_constraint_interface intf
where intf.batch_id=p_batch_id
and exists (select ci.cst_name
from (select cst_name,count(cst_name) as count_diff_const
from (select distinct cst_name,cst_type_code,cst_start_date,cst_end_date
from amw_constraint_interface
where batch_id=p_batch_id)
group by cst_name) ci
where ci.count_diff_const>1
and intf.cst_name=ci.cst_name);
select intf.cst_interface_id
from amw_constraint_interface intf
where intf.batch_id=p_batch_id
and intf.cst_violat_obj_type='CP'
and (select count(1) from fnd_concurrent_programs cp
where cp.concurrent_program_id = intf.cst_entries_function_id)>1;
select intf.cst_interface_id
from amw_constraint_interface intf
where intf.batch_id=p_batch_id
and (select count(1) from fnd_responsibility resp
where resp.responsibility_id = intf.cst_entries_resp_id
and resp.START_DATE <= SYSDATE
and (resp.END_DATE >= SYSDATE OR resp.END_DATE IS NULL)
)>1;
update_interface_with_error(
p_ERR_MSG => v_err_msg
,p_table_name => 'AMW_CONSTRAINTS_B'
,P_INTERFACE_ID => L_INTERFACE_ID);
update_interface_with_error(
p_ERR_MSG => v_err_msg
,p_table_name => 'AMW_CONSTRAINTS_B'
,P_INTERFACE_ID => L_INTERFACE_ID);
update_interface_with_error(
p_ERR_MSG => v_err_msg
,p_table_name => 'AMW_CONSTRAINTS_B'
,P_INTERFACE_ID => L_INTERFACE_ID);
update_interface_with_error(
p_ERR_MSG => v_err_msg
,p_table_name => 'AMW_CONSTRAINTS_B'
,P_INTERFACE_ID => L_INTERFACE_ID);
update_interface_with_error(
p_ERR_MSG => v_err_msg
,p_table_name => 'AMW_CONSTRAINTS_B'
,P_INTERFACE_ID => L_INTERFACE_ID);
UPDATE amw_constraint_interface
SET error_flag = 'Y',
interface_status = 'Please correct all the invalid incompatible'
||' Functions/Responsibilities defined for this'
||' Constraint'
WHERE error_flag IS NULL
AND batch_id = p_batch_id
AND (process_flag IS NULL OR process_flag = 'N')
AND CST_NAME IN ( SELECT DISTINCT CST_NAME
FROM amw_constraint_interface
WHERE error_flag = 'Y'
AND batch_id = p_batch_id
AND (process_flag IS NULL OR process_flag = 'N') );
insert_constraint(
x_return_status => x_return_status,
x_CONSTRAINT_REV_ID => l_constraint_rev_id,
p_START_DATE => constraint_rec.cst_start_date,
p_END_DATE => constraint_rec.cst_end_date,
p_ENTERED_BY_ID => l_entered_by_id,
p_TYPE_CODE => constraint_rec.cst_type_code,
p_RISK_ID => constraint_rec.risk_name,
p_APPROVAL_STATUS => constraint_rec.cst_approval_status_code,
p_CONSTRAINT_NAME => constraint_rec.cst_name,
p_CONSTRAINT_DESCRIPTION => constraint_rec.cst_description,
p_user_id => p_user_id
);
--fnd_file.put_line(fnd_file.LOG,'%%%%%%%%%%%% After AMW_LOAD_CONSTRIANT_DATA.insert_constraint %%%%%%%%%%%%');
update_interface_with_error (v_err_msg
,'AMW_CONSTRAINTS'
,l_interface_id);
insert_constraint_entries(
p_constraint_rev_id => l_constraint_rev_id,
p_object_id => constraint_entries_rec.cst_entries_resp_id,
p_app_id => constraint_entries_rec.cst_entries_appl_id,
p_user_id => p_user_id,
x_return_status => x_return_status,
p_group_code => constraint_entries_rec.cst_entries_group_code,
p_object_type => 'RESP' -- 21:04:2006 psomanat : temporary fix for Object_type column = null
); -- for responsibility constraint created via webadi
update_interface_with_error (v_err_msg
,'AMW_CONSTRAINT_ENTRIES'
,constraint_entries_rec.cst_interface_id);
insert_constraint_entries(
p_constraint_rev_id => l_constraint_rev_id,
p_object_id => constraint_entries_rec.cst_entries_resp_id,
p_app_id => constraint_entries_rec.cst_entries_appl_id,
p_user_id => p_user_id,
x_return_status => x_return_status,
p_group_code => '1', -- 21:04:2006 psomanat : group code set to 1 in self service
p_object_type => 'RESP' -- 21:04:2006 psomanat : temporary fix for Object_type column = null
); -- for responsibility constraint created via webadi
update_interface_with_error (v_err_msg
,'AMW_CONSTRAINT_ENTRIES'
,constraint_entries_rec.cst_interface_id);
insert_constraint_entries(
p_constraint_rev_id => l_constraint_rev_id,
p_object_id => constraint_entries_rec.cst_entries_function_id,
p_app_id => constraint_entries_rec.cst_entries_appl_id,
p_user_id => p_user_id,
x_return_status => x_return_status,
p_group_code => constraint_entries_rec.cst_entries_group_code,
p_object_type => constraint_entries_rec.cst_violat_obj_type
);
update_interface_with_error (v_err_msg
,'AMW_CONSTRAINT_ENTRIES'
,constraint_entries_rec.cst_interface_id);
insert_constraint_entries(
p_constraint_rev_id => l_constraint_rev_id,
p_object_id => constraint_entries_rec.cst_entries_function_id,
p_app_id => constraint_entries_rec.cst_entries_appl_id,
p_user_id => p_user_id,
x_return_status => x_return_status,
p_group_code => '1', -- 21:04:2006 psomanat : group code set to 1 in self service
p_object_type => constraint_entries_rec.cst_violat_obj_type
);
update_interface_with_error (v_err_msg
,'AMW_CONSTRAINT_ENTRIES'
,constraint_entries_rec.cst_interface_id);
update_constraint(
x_return_status => x_return_status,
p_CONSTRAINT_REV_ID => l_constraint_rev_id,
p_START_DATE => constraint_rec.cst_start_date,
p_END_DATE => constraint_rec.cst_end_date,
p_ENTERED_BY_ID => l_entered_by_id,
p_TYPE_CODE => constraint_rec.cst_type_code,
p_RISK_ID => constraint_rec.risk_name,
p_APPROVAL_STATUS => constraint_rec.cst_approval_status_code,
p_CONSTRAINT_NAME => constraint_rec.cst_name,
p_CONSTRAINT_DESCRIPTION => constraint_rec.cst_description,
p_user_id => p_user_id
);
--fnd_file.put_line(fnd_file.LOG,'%%%%%%%%%%%% After AMW_LOAD_CONSTRIANT_DATA.update_constraint %%%%%%%%%%%%');
update_interface_with_error (v_err_msg
,'AMW_CONSTRAINTS'
,l_interface_id);
update_violations (
x_return_status => x_return_status,
p_constraint_rev_id => l_constraint_rev_id,
p_violation_status => 'NA'
);
update_interface_with_error (v_err_msg
,'AMW_VIOLATIONS'
,l_interface_id);
delete_constraint_waivers(
p_constraint_rev_id => l_constraint_rev_id,
x_return_status => x_return_status
);
update_interface_with_error (v_err_msg
,'AMW_CONSTRAINT_WAIVERS'
,l_interface_id);
delete_constraint_entries(
p_constraint_rev_id => l_constraint_rev_id,
x_return_status => x_return_status
);
update_interface_with_error (v_err_msg
,'AMW_CONSTRAINT_ENTRIES'
,l_interface_id);
insert_constraint_entries(
p_constraint_rev_id => l_constraint_rev_id,
p_object_id => constraint_entries_rec.cst_entries_resp_id,
p_app_id => constraint_entries_rec.cst_entries_appl_id,
p_user_id => p_user_id,
x_return_status => x_return_status,
p_group_code => constraint_entries_rec.cst_entries_group_code,
p_object_type => 'RESP' -- 21:04:2006 psomanat : temporary fix for Object_type column = null
); -- for responsibility constraint created via webadi
update_interface_with_error (v_err_msg
,'AMW_CONSTRAINT_ENTRIES'
,constraint_entries_rec.cst_interface_id);
insert_constraint_entries(
p_constraint_rev_id => l_constraint_rev_id,
p_object_id => constraint_entries_rec.cst_entries_resp_id,
p_app_id => constraint_entries_rec.cst_entries_appl_id,
p_user_id => p_user_id,
x_return_status => x_return_status,
p_group_code => '1', -- 21:04:2006 psomanat : group code set to 1 in self service
p_object_type => 'RESP' -- 21:04:2006 psomanat : temporary fix for Object_type column = null
); -- for responsibility constraint created via webadi
update_interface_with_error (v_err_msg
,'AMW_CONSTRAINT_ENTRIES'
,constraint_entries_rec.cst_interface_id);
insert_constraint_entries(
p_constraint_rev_id => l_constraint_rev_id,
p_object_id => constraint_entries_rec.cst_entries_function_id,
p_app_id => constraint_entries_rec.cst_entries_appl_id,
p_user_id => p_user_id,
x_return_status => x_return_status,
p_group_code => constraint_entries_rec.cst_entries_group_code,
p_object_type => constraint_entries_rec.cst_violat_obj_type
);
update_interface_with_error (v_err_msg
,'AMW_CONSTRAINT_ENTRIES'
,constraint_entries_rec.cst_interface_id);
insert_constraint_entries(
p_constraint_rev_id => l_constraint_rev_id,
p_object_id => constraint_entries_rec.cst_entries_function_id,
p_app_id => constraint_entries_rec.cst_entries_appl_id,
p_user_id => p_user_id,
x_return_status => x_return_status,
p_group_code => '1', -- 21:04:2006 psomanat : group code set to 1 in self service
p_object_type => constraint_entries_rec.cst_violat_obj_type
);
update_interface_with_error (v_err_msg
,'AMW_CONSTRAINT_ENTRIES'
,constraint_entries_rec.cst_interface_id);
UPDATE amw_constraint_interface
SET process_flag = l_process_flag,
last_update_date = SYSDATE,
last_updated_by = p_user_id
WHERE batch_id = p_batch_id
AND error_flag IS NULL;
fnd_file.put_line (fnd_file.LOG,'err in update process flag: '||SUBSTR (SQLERRM, 1, 200));
DELETE FROM amw_constraint_interface
WHERE batch_id = p_batch_id
AND error_flag IS NULL;
fnd_file.put_line (fnd_file.LOG,'err in delete interface records: '||SUBSTR (SQLERRM, 1, 200));
UPDATE amw_constraint_interface
SET error_flag = 'Y',
interface_status = v_err_msg
WHERE batch_id = p_batch_id;
UPDATE amw_ap_interface
SET error_flag = 'Y',
interface_status = v_err_msg
WHERE batch_id = p_batch_id;