FND_MESSAGE的用法
发布时间:2020-12-15 05:05:23 所属栏目:百科 来源:网络整理
导读:关于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 sta
关于FND_MESSAGE的详细用法可以参见
http://docs.oracle.com/cd/E18727_01/doc.121/e12897/T302934T462354.htm
这里只列出几个常用的Example,方便查用 FND_MESSAGE.SET_NAMERetrieves 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 /* Display a warning,asking OK/Cancel question */ FND_MESSAGE.SET_NAME ('FND','WANT_TO_CONTINUE'); FND_MESSAGE.SET_TOKEN ('PROCEDURE','Compiling this flexfield'); if (FND_MESSAGE.WARN) then /* User selected OK,so add appropriate logic ... */ FND_MESSAGE.WARNExample:/* Display a warning,'WANT TO CONTINUE'); FND_MESSAGE.SET_TOKEN ('PROCEDURE','Compiling this flexfield'); IF (FND_MESSAGE.WARN) THEN /* User selected OK,so add appropriate logic ... */ ELSE /* User selected Cancel,so add appropriate logic ... */ END IF; FND_MESSAGE.ERRORExample:/* Display an error message with a translated token */ FND_MESSAGE.SET_NAME ('FND','FLEX_COMPILE_ERROR'); FND_MESSAGE.SET_TOKEN ('PROCEDURE','TRANS_PROC_NAME',TRUE); FND_MESSAGE.ERROR; /* Then either raise FORM_TRIGGER_FAILURE,or exit routine*/ FND_MESSAGE.SHOWExample/* Show an informational message */ FND_MESSAGE.SET_NAME ('FND','COMPILE_CANCELLED'); FND_MESSAGE.SHOW; FND_MESSAGE.QUESTIONExample 1 /* Display a message with two buttons in a modal window */ FND_MESSAGE.SET_NAME('INV','MY_PRINT_MESSAGE'); FND_MESSAGE.SET_TOKEN('PRINTER','hqunx138'); FND_MESSAGE.QUESTION('PRINT-BUTTON'); /* If 'PRINT-BUTTON' is defined with the value “Print",the user sees two buttons: “Print",and “Cancel". */ Example 2 /* Display a message with three buttons in a modal window. Use the Caution icon for the window. */ FND_MESSAGE.SET_NAME('FND','DELETE_EVERYTHING'); FND_MESSAGE.QUESTION('DELETE',NULL,'CANCEL',1,3,'caution'); Example 3 /* Display a message with two buttons in a modal window. "Yes" and "No" */ FND_MESSAGE.SET_NAME('FND','REALLY'); FND_MESSAGE.QUESTION('YES','NO',NULL); FND_MESSAGE.DEBUG/* as the last part of an item handler */ ELSE fnd_message.debug('Invalid event passed to ORDER.ITEM_NAME: ' || EVENT); END IF; (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |