FND_MESSAGE的用法

90 篇文章 1 订阅
34 篇文章 1 订阅
关于FND_MESSAGE的详细用法可以参见  http://docs.oracle.com/cd/E18727_01/doc.121/e12897/T302934T462354.htm
这里只列出几个常用的Example,方便查用

FND_MESSAGE.SET_NAME

Retrieves your message from Message Dictionary and sets it on the message stack. You call FND_MESSAGE.SET_NAME once for each message you use in your client-side PL/SQL procedure. You must call FND_MESSAGE.SET_NAME before you call FND_MESSAGE.SET_TOKEN.
Example 1
  1. /* Display a warning, asking OK/Cancel question */  
  2. FND_MESSAGE.SET_NAME ('FND''WANT_TO_CONTINUE');  
  3. FND_MESSAGE.SET_TOKEN ('PROCEDURE''Compiling this flexfield');  
  4. if (FND_MESSAGE.WARN) then  
  5.   /* User selected OK, so add appropriate logic ... */   




FND_MESSAGE.WARN

Example:
  1. /* Display a warning, asking OK/Cancel question */  
  2. FND_MESSAGE.SET_NAME ('FND''WANT TO CONTINUE');  
  3. FND_MESSAGE.SET_TOKEN ('PROCEDURE''Compiling this flexfield');  
  4. IF (FND_MESSAGE.WARN) THEN  
  5.   /* User selected OK, so add appropriate logic ... */  
  6. ELSE  
  7.   /* User selected Cancel, so add appropriate logic ... */  
  8. END IF;  



FND_MESSAGE.ERROR

Example:
  1. /* Display an error message with a translated token */  
  2. FND_MESSAGE.SET_NAME ('FND''FLEX_COMPILE_ERROR');  
  3. FND_MESSAGE.SET_TOKEN ('PROCEDURE''TRANS_PROC_NAME'TRUE);  
  4. FND_MESSAGE.ERROR;  
  5.   /* Then either raise FORM_TRIGGER_FAILURE, or exit    
  6.      routine*/     



FND_MESSAGE.SHOW

Example
  1. /* Show an informational message */  
  2. FND_MESSAGE.SET_NAME ('FND''COMPILE_CANCELLED');  
  3. FND_MESSAGE.SHOW;     



FND_MESSAGE.QUESTION

  1. Example 1  
  2.   
  3. /* Display a message with two buttons in a modal window */  
  4. FND_MESSAGE.SET_NAME('INV''MY_PRINT_MESSAGE');  
  5. FND_MESSAGE.SET_TOKEN('PRINTER''hqunx138');  
  6. FND_MESSAGE.QUESTION('PRINT-BUTTON');  
  7.   /* If 'PRINT-BUTTON' is defined with the value “Print",  
  8.      the user sees two buttons: “Print", and “Cancel".  */    
  9.          
  10. Example 2  
  11.   
  12. /* Display a message with three buttons in a modal window.  
  13.    Use the Caution icon for the window. */  
  14.   
  15. FND_MESSAGE.SET_NAME('FND''DELETE_EVERYTHING');  
  16. FND_MESSAGE.QUESTION('DELETE'NULL'CANCEL', 1, 3, 'caution');  
  17.   
  18. Example 3  
  19.   
  20. /* Display a message with two buttons in a modal window.  
  21.    "Yes" and "No" */  
  22.   
  23. FND_MESSAGE.SET_NAME('FND''REALLY');  
  24. FND_MESSAGE.QUESTION('YES''NO'NULL);  

FND_MESSAGE.DEBUG

  1. /* as the last part of an item handler */  
  2.       ELSE   
  3.          fnd_message.debug('Invalid event passed to  
  4.              ORDER.ITEM_NAME: ' || EVENT);   
  5.       END IF;  
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值