Tuesday, 28 May 2013

Alerts in Oracle Applications

Alerts are basically used automate the system maintenance, provide reports in the format chosen, for database activity/Business Requirement as it occurs..

few scenarios:
- A database event which was supposed to be monitored for instance insert into some table(event based alert).
- A SQL statement which provides specific information (event based alert).
- The frequency we want the report of a SQL statement(periodic alert)

Responsibility Name: Alert Manager

Pre-requisites:
Navigation: Alert Manager --> System --> Options
-- Electronic Account Mail setup
-- Oracle Alert Mailbox 
Navigation: Alert Manager --> System --> Installations
-- Setup if there are any CUSTOM application where the Alert needs to be created.

Types of Alerts: Event based and Periodic
-- Both types of alerts are defined by SQL statement specified in the SQL section.



Periodic Alert: Navigate to alert form and select the periodic Alert option and then below tasks to be performed.
- Application Name : Application name that owns the alert
- Alert Name : Name of the alert(up to 50 chars) with some meaningful description(up to 240 chars) and check the enabled field.
- Frequency : Select the frequency of the alert,below are the available options.
On Demand
On Day of the month
On Day of the week
Every N calendar Days
Every Day
Every Other Day
Every N Business Days
Every Business Day
Every Other Business Day
Also Start time and end time, number of times in 24 hours and end date if not required after some date.

- SQL : Enter a SQL Statement that retrieves all the alert information, that can used for actions to be planned.The statement should have INTO clause and one 

output field.
Example: Input field    :INPUT_NAME
     Output field   &OUTPUT_NAME
Oracle Alert does not support pl/sql statements, but we have a provision to create the database function and use in the SQL statement.
Example: SELECT PACKAGE.FUNCTION_NAME(:INPUT_VALUE) INTO &OUTPUT_VALUE FROM DUAL;

IMPORT Option: Rather than creating a SQL statement, we can also import from file and can use in the application.


Event Alert: Navigate to alert form and select the Event Alert option and then below tasks to be performed.
- Application Name : Application name that owns the alert
- Alert Name : Name of the alert(up to 50 chars) with some meaningful description(up to 240 chars) and check the enabled field
- Specify the event table name (application be different that the table resides) but privileges should be present.
- Check the insert/update, when the alert has to be fired.

- SQL : Enter a SQL Statement that retrieves all the alert information, that can used for actions to be planned.The statement should have INTO clause and one 

output field.
Example: Input field    :INPUT_NAME
     Output field   &OUTPUT_NAME
Oracle Alert does not support pl/sql statements, but we have a provision to create the database function and use in the SQL statement.
Also make sure there is a condition based on the event table in the SQL, by using :ROWID condition.

Example:
SELECT user_name INTO &NEWUSER FROM fnd_user WHERE rowid = :ROWID;

The SQL statement should be verified, run then it should be saved in the alert.


- Alert Details: Provide the input,output and installation/user id details.

- Action: Create the action Name and click on the action details.
Action type can be set as Message,SQL Statement script and operating system script.
and provide the details for the message details like To list and message data.

- Action sets: Once the alert actions are created, those alert actions can be included in the action sets.

Tuesday, 7 May 2013

Oracle Inventory --- Purchasing Category:

Oracle Inventory – Purchasing Category: Purchasing category is nothing but an Oracle Inventory category which is attached to a category set mapped to Purchasing functional area. Following setup steps need to be performed to setup a Purchasing category.

Step-1: Define "Item Category" flexfield structure

Responsibility: "Inventory Superuser" or similar
Navigate to: Setup -> Flexfields -> Key -> Segments
Query for Application "Inventory" and Flexfield Title "Item Categories".

There is already one seeded structure for the purchasing category as "PO_ITEM_CATEGORY" but if you want to define a custom one for your business please create it by entering the Structure code, title and description. Add the required category segments to the structure.

Step-2: Define Item Categories

Navigate to: Setup -> Items -> Categories -> Category Codes.
Enter the structure name and click on the "Find" button.
Define the Item category codes and description in the "Categories" form.

Step-3: Define Category Set

Navigate to: Setup -> Items -> Categories -> Category Sets
Enter the category set name, description, flex structure (the one you have setup in the Step-1), Controlled at and Default Category values.
Add the category codes defined in the previous step to the details section of the "Category Sets" form.

Step-4: Assign the category set to the functional area

Navigate to: Setup -> Items -> Categories -> Default Category Sets
Assign the category set name defined in the Step-3 to the "Purchasing" functional area.

Now the purchasing category setup is complete.


--