, , ,

How to use Oracle Message Dictionary in Oracle Apps – FND MESSAGES?

How to use Oracle Message Dictionary in Oracle Apps – FND MESSAGES?

Oracle Message Dictionary provides flexibility to store pre-formatted text as part of its catalog to display them as error/warning/note messages in Forms, Log Files, OAF Pages, Reports, etc.,

These messages mainly provide information about business rule errors, such as missing or incorrect data, and how to resolve them, warn about the consequences of intended actions, inform about the status of an application, pages, or business objects, and indicate that processes and actions are performing or are completed.

Advantages of Message Dictionary:

  1. Change or translate the message text to different languages without regenerating or recompiling the code.
  2. It provides consistent look and feel of the message text, since it is pre-formatted.

Steps to Create a Message from Oracle Forms:

Navigate to Application Developer responsibility –> Application –> Messages

Create a Message from Oracle Forms

Steps to Create a Message from OAF Page:

Navigate to Functional Administrator responsibility –> Core Services –> Messages

Create a Message from OAF Page

Purpose of different fields on Messages form

COMPONENT NAME DESCRIPTION
Name Every message must have a unique name. You should include a unique prefix that makes it easier to find your custom messages and that helps to avoid name conflicts with non-custom messages.
Language Select the language that your message is written in.
Application Select the application that the message belongs, this will usually be the custom application.
Current Message Text Message text is required. This is a brief statement of the operation attempted and the problem that occurred as a result, or information that the user needs to know. The maximum field size for messages stored in the Message Dictionary is 240 characters.
Number A unique and persistent message number can be included with each message. When displayed, the number takes the format of (Application ShortnameNumber). If the message does not have a message number, the formatted number is not displayed.
Type The message type indicates which message components are applicable, determines whether implicit logging and incident creation occurs, and determines the logging level if the message is logged.
Maximum Length Maximum number of display characters the translators can use to translate the message.
Description Description of the Message.
Alert Category This will allow user interfaces and other programs to filter exception messages based on category. The types are Product, System, Security and User.
Alert Severity This will allow user interfaces and other programs to filter exception messages based on severity. The types can be: Critical, Error or Warning.
Log Severity This group indicates the Log severity levels like: Unexpected, Error, Exception, Event, Procedure, Statement or Off.

How to use Message Dictionary in PL/SQL Procedures

Oracle has provided FND_MESSAGE API to Set, Retrieve, Clear the messages in Message Stack.

Below is a small example to get the message text:

DECLARE
  msg VARCHAR2(2000);
BEGIN
  fnd_message.set_name ('FND', 'XX_TEST_ORACLE_ERP_APPS_GUIDE');
  msg := fnd_message.get;
  dbms_output.put_line(msg);
END;
/

where ‘FND’ is the application short name in which the message is defined and ‘XX_TEST_ORACLE_ERP_APPS_GUIDE’ the name of the message.

FND_MESSAGE.SET_NAME : this Sets a message name in the global area without actually retrieving the message from Message Dictionary.

FND_MESSAGE.GET : Retrieves a translated and token-substituted message from the message stack and then clears that message from the message stack. GET returns up to 2000 bytes of message.

Learn More about FND Message Functions, Click Here

Tokens to change Message content dynamically

Tokens are identified in the message text by their use of ampersand (&) or curly brackets ({}) and all uppercase letters. The token values are supplied at run time by the code that raises the message. For example, the following token &USER is replaced by a user name when the user receives this message on their screen:

New User Creation

DECLARE
  l_user_name VARCHAR2(200);
  msg         VARCHAR2(2000);
BEGIN
  --
  SELECT user_name
  INTO l_user_name
  FROM fnd_user
  WHERE user_id = '84857';
  --
  fnd_message.set_name ('FND', 'XX_TEST_CREATE_USER');
  fnd_message.set_token('USER', l_user_name);
  msg := fnd_message.get;
  dbms_output.put_line(msg);
END;
/

Using Fnd Message on OAF page

Below line can be used to show FND_MESSAGE from oaf page  which is created using Application Developer responsibility.
import oracle.apps.fnd.common.MessageToken;
public class xxcusHelloWorldMainCO extends HelloWorldMainCO {
 
    public void processFormRequest(OAPageContext pageContext,
                                   OAWebBean webBean) {
 
     if (pageContext.getParameter("Go") != null) {
String getUserName = String.valueOf(pageContext.getUserName());
     MessageToken[] msgtoken = {new MessageToken("USER",getUserName) };
throw new OAException("FND", "XX_TEST_CREATE_USER", msgtoken, OAException.ERROR, null);
    }
}
, , ,

How to Create RMA in R12 Order Management

How to create RMA in Oracle Order Management:

I am taking the case of creation of Return Sales Order with Receipt and Credit Memo.

1.Create New Sales Order with Order Type = “Return Only . ( we can take Mixed or any other that allow return line)

2.Since Header Order Type is “Return Only”, based on the transaction Type Setup ,  System will default Line Type .In transaction type set the Default RMA = “Return (Receipt)” , with this Setup system will populate the Line Type = “Return (Receipt)”  , enter other details like
Item #
Qty etc.

3.Go to Return tab ( Lines) and Enter Return Reason (There is LOV for Return Reason select any relevent value from LOV ).
4.Book the RMA.

5.Requery the RMA , check the Line Status , It should be “Awaiting Return”.

6.Select Receipt (Purchasing Responsibility) 

7.Goto Customer Tab and Enter the RMA Num .

8.Press Find Button.

9.Ignore the receipt Header , and go to Receipts form 

10.Select the line

11.Press Save,System will ask for the Sub Inventory.Best bet is enter “Stores” ( Here I am taking the case Routing = Direct Delivery)

12.Press Save Button. Save action will automatically submit the “Receiving Transaction Processor (RTP) concurrent Program.

13.Check Order line status , it should be “Returned”.

14.Go to View > request . Submit Concurrent Program “Workflow background Process”
              with Item Type = OM Order Line
              Process Deferred = Yes
              Process Timeout = No.

Query Order line again , Status Should be “Closed”

15.Step # 14 also submit “Autoinvoice” concurrent Program.
16.Goto Transaction (Receivable Responsibility)

            Go to Find Window
             Enter Sales Order # in Sales Order Number Field
             Press Find
System should display your Invoice (Credit memo)

Examine the Invoice and you are good to go.
, ,

Oracle R12 – RFQ to PO Receipt Cycle

This Post is about Oracle applications RFQ to Receipt Cycle.In this Post I will explain the Cycle from RFQ to PO Receipt with screen shots.

High -Lights of this Cycle is  to Create:

  • RFQ
  • Quote
  • Purchase Order
  • Receive against PO.

Once RFQ is created , Submit concurrent job “Request to Print the RFQ” for a supplier. On completion this job will increment print count for that supplier as shown below.

In below  Oracle Apps UIs we can see
  1. RFQ # 308,
  2. Supplier Info from Supplier List and
  3. Price Breaks.
 
Print RFQ for all the Suppliers by means of Concurrent Program available in Oracle Apps


Once we print the RFQ , status of RFQ become Printed , and print count will increment for all suppliers .Since we got response from the Office Supplier , Inc Site – OFFICESUPPLIER , Responded field populated for this supplier only . 

  
 
From the RFQ , Select Tools > Copy Doc .It will Create Quotations as shown below.
  1. Enter the Supplier Name for whom you want to create Quote.
  2. Press OK and it will Create Quotation.
  1.  Query for Quotation # 502.
  2. Create Purchase Order Agreement from Quotation by selected Tools > Copy Doc
  3. Press Ok and it will Create Purchase Order Agreement. 
 Query for PO Agreement and Approve it
Once Oracle Purchase agreement got approved , creates the releases for Blanket PO Agreement .In our example PO Agreement Release we have item Test001 , BUT Item Test001 has restricted to be ordered from supplier from “Approval Supplier list”, and as  our Supplier is not part of any Approve Supplier list , system will throw Error.
 
For my test , I just remove the Item Test001 and Approve the Oracle Purchase Order Release and finally did the receipt against PO.