首页 > 数据库 > Oracle > FND_MESSAGE的用法
/* 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 ... */
/* 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 ... */ ELSE /* User selected Cancel, so add appropriate logic ... */ END IF;
/* 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*/ /* Show an informational message */ FND_MESSAGE.SET_NAME (\'FND\', \'COMPILE_CANCELLED\'); FND_MESSAGE.SHOW;
Example 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);
/* as the last part of an item handler */
ELSE
fnd_message.debug(\'Invalid event passed to
ORDER.ITEM_NAME: \' || EVENT);
END IF;来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/26687597/viewspace-1203655/ ,如需转载,请注明出处,否则将追究法律责任。