39
Oracle Alerts Trish Donahue Financial Services Coordinator Virginia Beach [email protected] Ajith Vijayan Sr. Oracle HRMS/Financials Developer WSSC [email protected]

Creating Excel Reports using XML - · PDF fileWhat is an Alert? • Oracle Alert is a complete Exception Control and Reporting System. • Oracle Alert facilitates the flow of information

Embed Size (px)

Citation preview

Page 1: Creating Excel Reports using XML - · PDF fileWhat is an Alert? • Oracle Alert is a complete Exception Control and Reporting System. • Oracle Alert facilitates the flow of information

Oracle Alerts

Trish Donahue Financial Services CoordinatorVirginia [email protected]

Ajith Vijayan Sr. Oracle HRMS/Financials DeveloperWSSC [email protected]

Page 2: Creating Excel Reports using XML - · PDF fileWhat is an Alert? • Oracle Alert is a complete Exception Control and Reporting System. • Oracle Alert facilitates the flow of information

City of Virginia Beach

Who We AreThe City of Virginia Beach, home to more than 450,000 people, is the largest city in the Commonwealth of Virginia and the 39th largest city in America. Named one of America’s ‘50 Best Cities to Live’ by 24/7 Wall Street, Virginia Beach is internationally recognized as one of the best places to live, work and do business. Virginia Beach has more than 38 miles of beaches and is one of the most technologically advanced city of its size in America according to the Center for Digital Government.

Oracle EBS HistoryThe City of Virginia Beach implemented Oracle Financials including GL, AP, PO, Cash Management, Fixed Assets and Budget in 1998, and then added HCMS – HR, Payroll, OAB, and OTL in 2009. Last year, we implemented both Taleo Recruit and Learn. We are presently hosted by Oracle Managed Cloud Services.

Page 3: Creating Excel Reports using XML - · PDF fileWhat is an Alert? • Oracle Alert is a complete Exception Control and Reporting System. • Oracle Alert facilitates the flow of information

Washington Suburban Sanitary Commission

Who We AreEstablished in 1918, WSSC is currently among the largest water and wastewater utilities in the nation, with a network of nearly 5,794 miles of fresh water pipeline and over 5,600 miles of sewer pipeline. Our service area spans nearly 1,000 square miles in Prince George’s and Montgomery counties, and we serve 1.8 million residents through approximately 475,000 customer accounts. WSSC drinking water has always met or exceeded federal standards.

Oracle EBS HistoryWSSC Implemented Oracle EBS (GL, HR, Payroll and T&A) in 1997-98 & OTL and Employee SSHR implemented in 2011-12 ,additional modules (OAB, inventory, isupplier).Presently planning for 12.2 upgrade.

Page 4: Creating Excel Reports using XML - · PDF fileWhat is an Alert? • Oracle Alert is a complete Exception Control and Reporting System. • Oracle Alert facilitates the flow of information

What is an Alert?

• Oracle Alert is a complete Exception Control and Reporting System.

• Oracle Alert facilitates the flow of information within your organization by

letting you create entities called Alerts to monitor your business information

and to notify you of the information you want.

• Oracle Alert is available to HCMS and Financials modules. Notifications can

be sent to e-mail addresses specified by the alert designer. Notifications can

be designed to contain transaction data, general descriptions in the detailed

or summary message.

• Alerts are frequently used to identify specific transactions or to retrieve

specific database information. Our organizations use alerts to electronically

monitor unusual events and potential trouble transactions.

Page 5: Creating Excel Reports using XML - · PDF fileWhat is an Alert? • Oracle Alert is a complete Exception Control and Reporting System. • Oracle Alert facilitates the flow of information

Alerts are of TWO types

• Event – This type of alert notifies you of activity in the database as it occurs. This type

of alert is IMMEDIATE.

• i.e. Sends an e-mail to the purchasing manager when the buyer uses the wrong

fiscal year.

• Periodic – This type of alert checks the database for information that you have defined

on the schedule and frequency that is defined. This type of alert is PERIODIC.

• i.e. Sends an e-mail to the purchasing manager listing the number of approved

requisition lines each buyer placed on purchase orders for the day

Page 6: Creating Excel Reports using XML - · PDF fileWhat is an Alert? • Oracle Alert is a complete Exception Control and Reporting System. • Oracle Alert facilitates the flow of information

What’s the difference?

• Event Alert :

- Notifies immediately as the EVENT occurs.

- What we need to specify?

• The event to be monitored.

• The selection criteria; i.e., the SQL

statement.

• The action to betaken

• Periodic Alert:

- Checks the database as per the schedule we

define.

- What we need to specify?

• The Frequency.

• The selection criteria; i.e., the SQL

statement.

• The action to betaken

Page 7: Creating Excel Reports using XML - · PDF fileWhat is an Alert? • Oracle Alert is a complete Exception Control and Reporting System. • Oracle Alert facilitates the flow of information

What’s an Event?

• An event can be Insert/Update on any particular record(s) of the database.

• An Event Alert is similar to any database trigger. The only difference is in the choice of

‘Actions’ provided. In a trigger, this action can only be to Insert/Update/Delete any records

from the database; that is, running an SQL statement script.

• For each event alert database triggers are created. The trigger name is created by prefixing

the table name with ALR_ and suffixing the table name with _IAR (after insert) or _UAR

(after update).

Page 8: Creating Excel Reports using XML - · PDF fileWhat is an Alert? • Oracle Alert is a complete Exception Control and Reporting System. • Oracle Alert facilitates the flow of information

What can the “Action” be?

• Oracle Alert can be configured to perform any or all of the following functions:

• Sending the retrieved information to someone in a(reasonably formatted) e-mail message .

• Invocation of a

– Concurrent Program,

– Operating Script,

– SQL Statement Script.

Page 9: Creating Excel Reports using XML - · PDF fileWhat is an Alert? • Oracle Alert is a complete Exception Control and Reporting System. • Oracle Alert facilitates the flow of information

Other important features :

• Keep us informed of exception conditions through a single point; our electronic mail.

• Take predefined actions when it finds exceptions in our database, without user intervention.

• Take the actions we specify, depending upon our response to an alert message.

• Perform routine database tasks automatically, according to the schedule we define.

• Be fully integrated with our e-mail system: it is configurable with Oracle Office, Unix mail,

Windows NT mail, and VMS mail.

• Allows definition of distribution list, so that one can avoid typing the same set of recipients

for many messages

Page 10: Creating Excel Reports using XML - · PDF fileWhat is an Alert? • Oracle Alert is a complete Exception Control and Reporting System. • Oracle Alert facilitates the flow of information

Other important features : contd

• Alert can send messages or perform pre defined actions in an action set when important

events occur.

• Alerts can be defined to any of the Oracle Applications; viz., Oracle Financials, Oracle

Manufacturing, Oracle Human Resources, or Oracle Public Sector Financials application as

well as any custom Oracle application

• Easy to define.

• Easy customization (of Frequency, Actions,etc.)

• Actions for singular exception, a combination of exceptions, or no-exception condition

• Alert History is maintained

Page 11: Creating Excel Reports using XML - · PDF fileWhat is an Alert? • Oracle Alert is a complete Exception Control and Reporting System. • Oracle Alert facilitates the flow of information

Two types of Actions :

• Oracle Alert automatically determines whether to perform detail actions or summary action

depending on the number of exceptions

Detail Action• Individual action is taken for each

exceptionE.g., Mails are sent to each person individually.

Summary Action• Action is taken collectively per type of

exceptionE.g., A common mail is sent to a set of people. Oracle Alert automatically determines whether to perform detail actions or summary action depending on the number of exceptions.

Page 12: Creating Excel Reports using XML - · PDF fileWhat is an Alert? • Oracle Alert is a complete Exception Control and Reporting System. • Oracle Alert facilitates the flow of information

Response Processing

• Oracle Alert can process responses to the alert messages. When Oracle Alert receives a

response to a specific alert message, it automatically performs the actions you define.

• Optionally, respondents can supply values that Oracle Alert uses to perform these actions.

• Response processing lets you automate routine user – entry transactions, streamlining your

organization’s operations.

• We must have a Windows NT MAPI – compliant mail server and define at least one

mailbox in this mail application if we want to use response processing.

Page 13: Creating Excel Reports using XML - · PDF fileWhat is an Alert? • Oracle Alert is a complete Exception Control and Reporting System. • Oracle Alert facilitates the flow of information

The Periodic Alert Scheduler

• The Periodic Alert Scheduler (ALEPPE) is a concurrent program that automatically checks

the scheduled periodic alerts.

• The Periodic Alert Scheduler runs at each day at 12AM. When it runs, the Periodic Alert

Scheduler looks for all periodic alerts scheduled to be checked that day, and then submits

one concurrent request for each scheduled check.

Page 14: Creating Excel Reports using XML - · PDF fileWhat is an Alert? • Oracle Alert is a complete Exception Control and Reporting System. • Oracle Alert facilitates the flow of information

Periodic Alert vs. Event Alert

• Event Alert is less preferred because each database event(Insert or Update) that occurs in

an actively used table i.e. PER_ALL_PEOPLE_F,PER_ALL_ASSIGNMENTS_F, etc triggers

a request to the Concurrent Manager queue, hence causing congestion to the queue.

• Periodic Alert is more desirable because each alert run sends only one request to the

Concurrent Manager, even though there might be more than one exception found in the

request

• However, if you are running an alert to identify when someone may be entering an incorrect

transaction into the system – you will want the keyer to be immediately notified, so may

want to use an event alert.

Page 15: Creating Excel Reports using XML - · PDF fileWhat is an Alert? • Oracle Alert is a complete Exception Control and Reporting System. • Oracle Alert facilitates the flow of information

How to create Alerts

• To create an alert, you need : Alert Manager Responsibility

Page 16: Creating Excel Reports using XML - · PDF fileWhat is an Alert? • Oracle Alert is a complete Exception Control and Reporting System. • Oracle Alert facilitates the flow of information

• How to Create a Periodic Alert

In Alert Manager, navigate to Alert > Define

Page 17: Creating Excel Reports using XML - · PDF fileWhat is an Alert? • Oracle Alert is a complete Exception Control and Reporting System. • Oracle Alert facilitates the flow of information

This is an empty Alert form

Page 18: Creating Excel Reports using XML - · PDF fileWhat is an Alert? • Oracle Alert is a complete Exception Control and Reporting System. • Oracle Alert facilitates the flow of information

Choose the Application that owns the alert i.e. Oracle Human Resources

Enter Name & Description for the alert

Enabled flag – for activation of alert. You can leave it unchecked until you are ready to run the alert

Choose Periodic tab. Enter the Frequency and Start Time you want the alert to run.

Specify the number of days you want to keep the alert history logs in Keep Days.

Enter SQL statement shown below

Choose Verify to parse the Select statement. The results will be displayed in a Note window.

Choose Run to execute the Select statement. It will display the number of rows returned in a Note window.

Save your work.

Page 19: Creating Excel Reports using XML - · PDF fileWhat is an Alert? • Oracle Alert is a complete Exception Control and Reporting System. • Oracle Alert facilitates the flow of information

Sample Sql used

select ppx.employee_number,ppx.full_name ,ppei.PEI_INFORMATION5 Visa_type,ppei.PEI_INFORMATION6 visa_number,TO_CHAR(TO_DATE(ppei.PEI_INFORMATION7,'YYYY/MM/DD HH24:MI:SS'),'DD-MON-YYYY')issue_date,TO_CHAR(TO_DATE(ppei.PEI_INFORMATION8,'YYYY/MM/DD HH24:MI:SS'),'DD-MON-YYYY')expiry_date,ADD_MONTHS(TO_CHAR(TO_DATE(ppei.PEI_INFORMATION8,'YYYY/MM/DD HH24:MI:SS'),'DD-MON-YYYY'),-6) expiry_date_6monts,round(months_between (TO_CHAR(TO_DATE(ppei.PEI_INFORMATION8,'YYYY/MM/DD HH24:MI:SS'),'DD-MON-YYYY'),SYSDATE),2) differenceINTO&EMP_NUM,&FULL_NAME,&VISA_TYPE,&VISA_NUM,&ISSUE_DATE,&EXPIRY_DATE,&EXPIRY_6_MONTH,&DIFFERENCEfrom PER_PEOPLE_EXTRA_INFO ppei ,per_people_x ppx,(Select Opt.Profile_Option_Value Instance_Name

From fnd_profile_options pro, fnd_profile_options_tl ptl, fnd_profile_option_values opt

Where ptl.user_profile_option_name = 'Site Name'And opt.profile_option_id = pro.profile_option_idAnd ptl.language = USERENV ( 'LANG' )And ptl.profile_option_name = pro.profile_option_name) Inst_Name

where ppei.person_id =ppx.person_id and ppei.information_type ='PER_US_VISA_DETAILS'AND Inst_Name.Instance_Name = 'ERPPROD'and round(months_between (TO_CHAR(TO_DATE(ppei.PEI_INFORMATION8,'YYYY/MM/DD HH24:MI:SS'),'DD-MON-YYYY'),SYSDATE),2) =6

Page 20: Creating Excel Reports using XML - · PDF fileWhat is an Alert? • Oracle Alert is a complete Exception Control and Reporting System. • Oracle Alert facilitates the flow of information

How to Create an Event Alert• Choose the Application that owns the

alert ie. Oracle Human Resources

• Enter Name & Description for the alert

• Enabled flag – for activation of alert. You can leave it unchecked until you are ready to run the alert

• Choose Event tab.

• Choose the Application and database table you want Oracle Alert to monitor.

• Check After Insert and/or After Update if you want the eventalert to run when a user inserts and/or updates a row in the database table.

• Specify the number of days you want to keep the alert history logs in Keep Days.

• Enter SQL statement in Select Statement

Page 21: Creating Excel Reports using XML - · PDF fileWhat is an Alert? • Oracle Alert is a complete Exception Control and Reporting System. • Oracle Alert facilitates the flow of information

Sql codeSELECT DISTINCT TO_NUMBER ( per.employee_number ) Employee_Number

, per.full_name Full_Name, pps.date_start Hire_Date, org.name||' ( '||org.attribute3||' )' Organization_Name, past.user_status Assignment_Status, pps.actual_termination_date, lkp.meaning Leaving_Reason,decode(hapf.attribute4,'N','No','Y','Yes') FD_FILER, opt.profile_option_value Instance_Name

INTO &EMPNO, &EMPNAME, &HIREDT, &ORGN, &ASSTAT, &TERMDT, &LEAVREAS,&FD_FILER, &INSTAN

FROM APPS.per_all_assignments_f paf, APPS.per_assignment_status_types past, APPS.hr_all_organization_units org, APPS.per_all_people_f per, APPS.per_person_types ppt,APPS.hr_all_positions_f hapf, APPS.per_periods_of_service pps, APPS.hr_lookups lkp, fnd_user usr, fnd_user_resp_groups res, fnd_profile_options pro, fnd_profile_options_tl ptl, fnd_profile_option_values opt

WHERE paf.business_group_id+0 = 101AND paf.assignment_type = 'E'AND ( pps.actual_termination_date + 1 ) BETWEEN paf.effective_start_date AND paf.effective_end_dateAND past.assignment_status_type_id = paf.assignment_status_type_idAND org.organization_id = paf.organization_id AND hapf.position_id = paf.position_id(+) AND per.person_id = paf.person_id AND ( pps.actual_termination_date + 1 ) BETWEEN per.effective_start_date AND per.effective_end_dateAND ppt.person_type_id = per.person_type_id AND ppt.active_flag ='Y'AND pps.person_id(+) = per.person_id AND pps.actual_termination_date IS NOT NULLAND paf.rowid = :ROWID AND lkp.lookup_code = pps.leaving_reasonAND lkp.lookup_type = 'LEAV_REAS‘ AND usr.user_id = pps.last_updated_byAND res.user_id = usr.user_idAND NVL ( pro.application_id, 0 ) = DECODE ( res.responsibility_application_id , 0, res.responsibility_application_id , 0 )AND ptl.profile_option_name = pro.profile_option_name AND ptl.language = USERENV ( 'LANG' ) AND ptl.user_profile_option_name = 'Site Name'AND opt.profile_option_id = pro.profile_option_id

The Select statement must include a join from the table where the event transaction occurs (FND_USER) to an implicit input called :ROWID. Oracle Alert uses :ROWID to pinpoint the inserted or updated record in the table that caused the event. If this join is not included, Oracle Alert cannot locate the row where the event transaction occurred

Page 22: Creating Excel Reports using XML - · PDF fileWhat is an Alert? • Oracle Alert is a complete Exception Control and Reporting System. • Oracle Alert facilitates the flow of information

Creating Alert Actions

• After defining a Period or Event alert, you need to create actions for the alert to perform. On the same alert form, click on Actions button.

• On the Actions form, select a level for Action: Detail, Summary or No Exception

Page 23: Creating Excel Reports using XML - · PDF fileWhat is an Alert? • Oracle Alert is a complete Exception Control and Reporting System. • Oracle Alert facilitates the flow of information

• Detail Action - Performs once for each individual exception• Summary Action - Performs once for all exceptions found• No Exception - Performs when no exceptions are found• Choose Action Details button on Actions form. On the Action Details page, select the

type of action you want to create in the Action Type field

Page 24: Creating Excel Reports using XML - · PDF fileWhat is an Alert? • Oracle Alert is a complete Exception Control and Reporting System. • Oracle Alert facilitates the flow of information

Creating an Action Set

• Next, you need to include the Alert Actions created previously in an enabled Action Set for Oracle Alert toper form during an alert check. An Action Set can include an unlimited number of Actions and any combinations of Actions.

• Additionally, you can create as many Action Sets as you like for each alert. Oracle Alert executes the alert SQL Statement once for each Action Set You defined. During each action set check, Oracle Alert executes each Action Set Member in the sequence specified.

Page 25: Creating Excel Reports using XML - · PDF fileWhat is an Alert? • Oracle Alert is a complete Exception Control and Reporting System. • Oracle Alert facilitates the flow of information

This is an empty Alert form

• Click on Alert Details button on the main alert form.

• On the Outputs tab, you will see the outputs of the Select Statement, defined on the INTO clause.

• Make sure they are lined up in the same order as they appear on the Select Statement

Page 26: Creating Excel Reports using XML - · PDF fileWhat is an Alert? • Oracle Alert is a complete Exception Control and Reporting System. • Oracle Alert facilitates the flow of information

Installation

• Oracle ID - specify an Oracle ID if you want Oracle Alert to check your alert against the specific Oracle ID. ie APPS

• Operating Unit – If alert is defined for US, choose the business group Oracle Corporation. For Global Alerts, leave it blank.

• Enabled flag – to enable/disable the Installations

Page 27: Creating Excel Reports using XML - · PDF fileWhat is an Alert? • Oracle Alert is a complete Exception Control and Reporting System. • Oracle Alert facilitates the flow of information

Running an Alert

• To manually run a Periodic Alert, go to Request > Check

Page 28: Creating Excel Reports using XML - · PDF fileWhat is an Alert? • Oracle Alert is a complete Exception Control and Reporting System. • Oracle Alert facilitates the flow of information

Message Text

Employee Name : &EMPNAMEEmployee number : &EMPNOHire Date : &HIREDTOrganization : &ORGNAssignment Status : &ASSTATTermination Date : &TERMDTFD Filer : &FD_FILER

System Alert&INSTAN

Page 29: Creating Excel Reports using XML - · PDF fileWhat is an Alert? • Oracle Alert is a complete Exception Control and Reporting System. • Oracle Alert facilitates the flow of information

History of an Alert

Find ChecksFind Action Find Exception

Page 30: Creating Excel Reports using XML - · PDF fileWhat is an Alert? • Oracle Alert is a complete Exception Control and Reporting System. • Oracle Alert facilitates the flow of information

Distribution Listspredefine a set of message recipients for use on many actions.

Page 31: Creating Excel Reports using XML - · PDF fileWhat is an Alert? • Oracle Alert is a complete Exception Control and Reporting System. • Oracle Alert facilitates the flow of information

Financial Alerts City of Virginia Beach uses a number of different alerts. Below are examples of why alerts are used:• AP – When an invoice is keyed with a balance sheet instead of an expenditure account code • AP- When the goods received date entered on an invoice is greater than today’s date OR

when the invoice receive date is greater than today’s date• AP – When the pay group selected does not match vendor pay group (ACH, Check, Wire, etc…)

Supplier site specifies check, but invoice specifies ACH, for example.• AP – The pay group /pay method combination isn’t correct on invoice entry.• AP – Null liability account or null terms date• AP – Notification of quantity receipt or price holds• PO – The City Contract Agreement is about to expire (provides advance notice for planning

purposes.)• PO – Contract agreements reaching desired Release Amounts• PO- When a requisition is associated with an RFQ and then the requisition was cancelled, but

the RFQ was not – an alert is generated.• PO – When the wrong object code (purchase description) is selected for a requisition or PO

(i.e. from a salary, benefit, balance sheet or internal services account)• PO – When the unit price exceeds $5,000 – should be a capital asset and reflect a certain

account code for assets• Budget – To notify a department when particular accounts are over-expended (Account level

not appropriation level where budgetary controls exist)

Page 32: Creating Excel Reports using XML - · PDF fileWhat is an Alert? • Oracle Alert is a complete Exception Control and Reporting System. • Oracle Alert facilitates the flow of information

HR Alerts

• List of employees nearing the end of their probationary period

• List of missing details for new hire entry• List of open vacancy details• List of workers due from a suspended assignment• List of workers terminating in the next week• List of employees who don’t have a valid e-mail,

supervisor , other details in system• List of employees who are due for appraisals in 2

weeks, or overdue

Page 33: Creating Excel Reports using XML - · PDF fileWhat is an Alert? • Oracle Alert is a complete Exception Control and Reporting System. • Oracle Alert facilitates the flow of information

Financial Dual Year Alerts

Below are examples of DUAL YEAR alerts used:• AP – When an invoice is keyed with a goods received date in July/August, but a GL

date of the prior FY in June. OR when an invoice is keyed with a goods received date in June, but a GL date of the next FY.

• AP – The batch name contains 0630, but the invoices have distributions in next FY• PO – When a requisition or PO is keyed using the old GL with new year FY indicator

OR keyed using new GL date and old FY indicator.• PO – When a requisitions auto-created to order in the wrong year. Create date

and/or GL on Requisition doesn’t match GL on PO • Budget – The Summary Control Account has less than 2% of budgeted funds

remaining

Page 34: Creating Excel Reports using XML - · PDF fileWhat is an Alert? • Oracle Alert is a complete Exception Control and Reporting System. • Oracle Alert facilitates the flow of information

Alert SQL for AP Invoice with Invalid Account Code Segment

SELECT fnd.user_name,api.invoice_num,apb.batch_name,apd.distribution_line_number,glcc.segment1 || '-' ||glcc.segment2 || '-' || glcc.segment3 || '-' || glcc.segment4 || '-' || glcc.segment5 || '-' || glcc.segment6 || '-' || glcc.segment7 || '-' || glcc.segment8,ap_invoices_pkg.get_approval_status(api.invoice_id,

api.invoice_amount, api.payment_status_flag, api.invoice_type_lookup_code),

NVL2(fnd.email_address,fnd.email_address,'[email protected]')INTO&User_name, &Invoice_Number,&Invoice_Batch_Number,&Invoice_Distribution_Line ,&Invoice_Distribution_Account,&Invoice_Status,&KeyerFROM ap_batches_all apb,ap_invoices_all api,ap_invoice_distributions_all apd,gl_code_combinations glcc,fnd_user fnd

WHERE apb.batch_id = api.batch_idAND api.invoice_id = apd.invoice_idAND glcc.code_combination_id = apd. dist_code_combination_idAND api.created_by = fnd.user_idAND apd.org_id = 101AND (glcc.segment3 between '101001' and '122996'Or glcc.segment3 between '155007' and '601390'Or glcc.segment3 between '610000' and '610999'Or glcc.segment3 like '602%'Or glcc.segment3 like '604%')AND api.creation_date > sysdate -7;

Page 35: Creating Excel Reports using XML - · PDF fileWhat is an Alert? • Oracle Alert is a complete Exception Control and Reporting System. • Oracle Alert facilitates the flow of information

Summary Budget account has less than 2% remaining

• SELECT cc.concatenated_segments,• to_char(• SUM (decode(actual_flag, 'B', nvl(period_net_dr,0) -• nvl(period_net_cr,0),• 'E', nvl(period_net_dr*-1,0) -• nvl(period_net_cr*-1,0),• 'A', nvl(period_net_dr*-1,0) -• nvl(period_net_cr*-1,0))),• '$999,999,999.99')• INTO &ACCT,• &AMT• FROM gl_balances gl,• gl_code_combinations_kfv cc,• gl_summary_templates st• WHERE gl.code_combination_id = cc.code_combination_id• AND gl.template_id = st.template_id• AND nvl(gl.budget_version_id,0) != '1020'• AND st.template_name = 'CITY AU BY CLASS GROUP'• AND period_year = '2017'• AND segment3 = 'ECTYOE'• GROUP BY cc.concatenated_segments• HAVING SUM (decode(actual_flag,'B', nvl(period_net_dr,0) -• nvl(period_net_cr,0),• 'E', nvl(period_net_dr*-1,0) -• nvl(period_net_cr*-1,0),• 'A', nvl(period_net_dr*-1,0) -• nvl(period_net_cr*-1,0)))• < SUM (decode(actual_flag, 'B', (nvl(period_net_dr,0) -• nvl(period_net_cr,0)) * .02))

Page 36: Creating Excel Reports using XML - · PDF fileWhat is an Alert? • Oracle Alert is a complete Exception Control and Reporting System. • Oracle Alert facilitates the flow of information

Dual Year – July Requisition autocreated as an Old Year June PO

• select e.full_name buyer,• poh.segment1 po_num,• reqh.segment1 req_num,• pod.gl_encumbered_date po_date,• reqd.gl_encumbered_date req_date,• v.vendor_name,• u.email_address• into &buyer,• &po_num,• &req_num,• &po_gl_date,• &req_gl_date,• &vendor,• &email• from po_headers_all poh,• po_lines_all pol,• po_line_locations_all poc,• po_distributions_all pod,• po_requisition_headers_all reqh,• po_requisition_lines_all reql,• po_req_distributions_all reqd,• po_vendors v,• hr_employees e,• fnd_user u• where poh.po_header_id = pol.po_header_id• and pol.po_line_id = poc.po_line_id• and poc.line_location_id = pod.line_location_id• and pod.req_distribution_id = reqd.distribution_id• and reqd.requisition_line_id = reql.requisition_line_id• and reql.requisition_header_id = reqh.requisition_header_id• and poh.vendor_id = v.vendor_id• and poh.agent_id = e.employee_id• and pod.last_updated_by = u.user_id• and reqd.gl_encumbered_date >= '01-JUL-17'• and pod.gl_encumbered_date < '01-JUL-17'• and poh.authorization_status = 'APPROVED'• group by e.full_name, poh.segment1, reqh.segment1, pod.gl_encumbered_date, reqd.gl_encumbered_date, v.vendor_name, u.email_address

Page 37: Creating Excel Reports using XML - · PDF fileWhat is an Alert? • Oracle Alert is a complete Exception Control and Reporting System. • Oracle Alert facilitates the flow of information

Within Alerts To provide list of all alerts

SELECT APPLICATION_ID, ALERT_ID, ALERT_NAME, LAST_UPDATE_DATE, LAST_UPDATED_BY, CREATION_DATE, CREATED_BY, LAST_UPDATE_LOGIN, ALERT_CONDITION_TYPE, ENABLED_FLAG, START_DATE_ACTIVE, END_DATE_ACTIVE, TABLE_ID, TABLE_APPLICATION_ID, DESCRIPTION, FREQUENCY_TYPE, WEEKLY_CHECK_DAY, MONTHLY_CHECK_DAY_NUM, DAYS_BETWEEN_CHECKS, CHECK_BEGIN_DATE, DATE_LAST_CHECKED, INSERT_FLAG, UPDATE_FLAG, DELETE_FLAG, MAINTAIN_HISTORY_DAYS, CHECK_TIME, CHECK_START_TIME, CHECK_END_TIME, SECONDS_BETWEEN_CHECKS, CHECK_ONCE_DAILY_FLAG, ONE_TIME_ONLY_FLAG, TABLE_NAME, SQL_STATEMENT_TEXT, SECURITY_GROUP_IDFROM ALR_ALERTS

Page 39: Creating Excel Reports using XML - · PDF fileWhat is an Alert? • Oracle Alert is a complete Exception Control and Reporting System. • Oracle Alert facilitates the flow of information