elsif ( event = 'PRE-UPDATE') then
select count(1) into rec_count
from cux_l_ehr_dept_map_v edv
where edv.dept_value = :CUX_L_EHR_DEPT_MAP_V.DEPT_VALUE
and edv.status_flag = 'Y';
if rec_count > 0 then
fnd_message.set_name('FND', 'FND_GENERIC_MESSAGE');
fnd_message.set_token('MESSAGE', '此EHR部门已存在,请在已有记录上修改!');
fnd_message.show;
raise form_trigger_failure;
end if;
fnd_standard.set_who;
重要:set_name 的报错方式时 报错消息不能为空,否则可能会跳出
无法读取例程 &ROUTINE 中配置文件选项 PROXY_USER_ID 的值。 这个错误!
fnd_message.set_name('FND', 'FND_GENERIC_MESSAGE');
fnd_message.set_token('MESSAGE',v_msg);
fnd_message.show;
----------------------------------------------
FOR cur_po_line
IN (SELECT pla.line_num, pla.list_price_per_unit
FROM cux_vpo_lines_all pla
WHERE pla.vpo_header_id = :po_headers.vpo_header_id
and NVL(pla.cancel_flag,'N')<>'Y')
LOOP
IF cur_po_line.list_price_per_unit IS NULL
THEN
l_price_null_flag := 'Y';
fnd_message.debug (
'参考价格不能为空!请查看采购行序号:' || cur_po_line.line_num
);
RAISE form_trigger_failure;
EXIT;
END IF;
END LOOP;
-------------------------------------------------
IF :parameter.cux_position_id = -1 AND :po_headers.attribute9 IS NULL
THEN
fnd_message.set_string('当前采购合同为疑似关联方交易,将经过法律合规部关联方交易审批人审核。附加信息中的定价方式不能为空!');
fnd_message.error;
RAISE form_trigger_failure;
END IF;
-----------------------------------------------------
EXCEPTION
WHEN OTHERS
THEN
fnd_message.debug ('供应商评估信息没设置!');
RAISE form_trigger_failure;
NULL;
END;
--------------------------------------------------------