1.使用alert
declare
k number;
begin
SET_ALERT_BUTTON_PROPERTY('ALERT',ALERT_BUTTON1,LABEL,'退出'); --增加一个button
SET_ALERT_BUTTON_PROPERTY('ALERT',ALERT_BUTTON2,LABEL,'确定'); --增加另一个button
SET_ALERT_PROPERTY('ALERT',ALERT_MESSAGE_TEXT,'是否退出'); --设置显示信息
SET_ALERT_PROPERTY('ALERT',TITLE,'询问'); --设置标题
k:=show_alert('ALERT');
IF k= ALERT_BUTTON1 THEN
MESSAGE('-----------------');
ELSE
MESSAGE('-----------------');
END IF;
end;
2.使用message(出现在对话框的左下方)
message('Message');
3.使用弹出提示窗
(1)使用普通弹出提示
fnd_message.debug('message');
or
fnd_message.set_string('message');
fnd_messsage.show;
(2)使用question提示
declare
v_result int;
begin
FND_MESSAGE.SET_STRING('ARE YOU SURE');
v_result:=FND_MESSAGE.QUESTION('Yes','No','Cancel',1,3,'QUESTION');
--yes,no,cancel不用的话可以用NULL占位.
IF v_result=1 then
fnd_message.debug('yes');
elsif v_result=2 then
fnd_message.debug('no');
else
fnd_message.debug('cancel');
end if;
end;
fnd_message.question默认为Yes,No,Cancel,如果不要其中一项就用Null替代;
(3)使用警告
begin
FND_MESSAGE.SET_STRING('NO DATA');
if FND_MESSAGE.warn then
fnd_message.debug('你选择了OK');
else
fnd_message.debug('你选择了取消');
end if;
end;
(4)使用错误提示
begin
FND_MESSAGE.SET_STRING('NO DATA');
FND_MESSAGE.ERROR;
end;
本文作者:网友 来源:网络
CIO之家 www.ciozj.com 微信公众号:imciow