Search This Blog

Thursday, August 18, 2011

Oracle Api: Messaging

In Oracle application messaging is typically handled in different way. If you are working in Oracle application you may notice different types of alert window you will get depending upon the condition. In oracle application this would be typical handled by whole set of bundle API , which is called as FND_MessageAPI.
Then the very next question is what is FND_MESSAGE
In simple word , Messaging functionality controlled by FND_MESSAGE package and in the FNDSQF library.
What this API's do
-Manipulate messages which normally defined in the Message Dictionary under application developer responsibility.
-Client and Server-side procedures place messages on the message stack or in the global area.
-Client-side procedures retrieve messages from the stack and display them from the currently running form
Depending upon the development need , lets understand the various function in three different way.
  1. Server side
  2. client Side
Here are the list of Procedure and Functions which can be used for retrieving and Buffer Messages at Client Side.
  1. Set_Name :Retrieves message from Message Dictionary and sets it on the stack
  2. Set_String :P rocedure, used to place the passed string on the message stack.
  3. Set_Token :Substitutes token with specified value
  4. Retrieve :Retrieves a message from the server-side buffer, translates and substitutes tokens, and sets message on the stack
  5. Get (function) :Retrieves a message from the stack. Returns the retrieved message
  6. Clear : Clears the message stack
  7. Get_Encoded :This is a function, returns an encoded message from the message stack.
  8. Parse_encoded :This is a procedure used to parse the Application Short Name and the message Name out of an encoded message
For the retrieving and Buffer Messages at Server Side here are some standard procedure:
  1. Set_Name Sets a message name in the global area without retrieving it from the Message Dictionary
  2. Set_Token Adds a token/value pair to the global area without doing the substitution
  3. Clear Clears the message stack
  4. Get_Number :This is function, returns number of the specified message. Function returns 0 if the message has no number, or the message number is zero. If the message can not be found, function returns NULL
  5. Raise_error :This is Procedure that can raises an application error, returning the message information contained in the package variables
In fact for displaying purpose these are the standard procedures and Functions we can use from API, these are mostly used for displaying message at Client Side.
  • Error :D isplays an error message in a forms modal window.
  • Show :D isplays an informational message in a forms modal window.:
  • Warn (function) :D isplays a warning message in a forms modal window. Allows user to accept or cancel the operation. Returns TRUE if user accepts.:
  • Question :Displays a message and up to three buttons in a forms modal window. Similar to a Forms Alert.
  • Hint :D isplays a message in the forms status line.
  • Erase :Clears the forms status line.
  • Debug :Used for debugging. Display the specified string.
    Example: FND_Message.Debug('here is errorĂ¢€¦');
Apart from this you may also used few other like:
  • WORKING :This is used to display a message in a dialog box without any buttons. The dialog box must be closed explicitly with WORKING_CLOSE.
  • WORKING_CLOSE This can used to close the dialog box invoked by the WORKING procedure.
  • HISTORY :used to display a message in a dialog box, with the History button. If the user presses this button they see all the
    messages on the stack
Is there any way to displaying Messages from Concurrent Programs
Yes, there are two procedure which can be used :
  • Show :D isplays top message on the stack in the out file. Does not print message number
  • Error :D isplays top message on the stack in the log file. Prints the message number if it is not zero
Hope this would be great help in understanding and utilizing the functionality. Next will discuss how to implement these.

No comments:

Post a Comment