Alert on query

(Forms_Portal) How can I show a alert when query no returns values?

Can you please try the following for Form on Table:-
1>
In the Formatting and Validation section, select the Query button in the left frame.
If you have more than one query button, please put the code for both the button to get similar effect when you click
either query button.
In the right frame, go to the pl/sql button handler section and for the Query event, add the following code after the
statement doQuery;
declare
l_fs varchar2(200);
l_msg varchar2(100);
begin
l_fs := p_session.get_value_as_varchar2(
p_block_name => 'DEFAULT',
p_attribute_name => '_FORM_STATE');
if l_fs = 'QUERY_AND_INSERT' then
l_msg := 'Query fetched no data';
else
l_msg := null;
end if;
p_session.set_value(
p_block_name => 'DEFAULT',
p_attribute_name => '_STATUS',
p_value => l_msg);
end;
2>
Goto the Additional pl/sql section and put the following code in either
"...before displaying the page" or "...after displaying the page" area.
declare
l_msg varchar2(200);
begin
l_msg := p_session.get_value_as_varchar2(
p_block_name => 'DEFAULT',
p_attribute_name => '_STATUS');
if l_msg is not null and
l_msg = 'Query fetched no data'
then
htp.p('
<script>
alert("'||l_msg||'");
</script>
end if;
end;
3> Finish creating the form and run it.
Note:
In case of Master-Detail forms, please replace :
'DEAFULT' with 'MASTER_BLOCK' and
'QUERY_AND_INSERT' with 'QUERY_AND_SAVE'

Similar Messages

  • Alert message(Query) for a Production order?

    Hi Experts,
    I want to get an alert message for the production order doucument based on the due date of it. The user must get the alert a  one day before the duedate of the document. How to write the Query for it? Urgent ,waiting for earliest reply.
    Regards ,
    Magesh.

    Create a Formatted Seach with the following Query
    SELECT T0.DocNum AS 'Document Number', T0.CreateDate AS 'Creation Date', T0.DueDate AS 'Due Date'
    FROM  [dbo].[OWOR] T0  WHERE DATEDIFF(Day,GetDate(),T0.DueDate) = 1
    Then, Create an Alert from Adminis..> Alerts Management and Give a Name, Click Open Saved Query, Select the query you saved, Tick the Int. check box against the user who gets the Alert.  Check Active. Select Frequency.
    Good luck
    Suda

  • Alert with Query does not have orange navigation / drill down arrows

    Hi Experts!
    My Alert which uses a Query doesn't allow me to drill down into the document (Sales Order) .  The Query for this alert is:
    SELECT T0.[DocNum], T0.[CardName], T0.[DocDueDate] 'Due Date', T2.[TrnspName],  T0.[U_PostCode], T1.[SlpName] FROM ORDR T0  INNER JOIN OSLP T1 ON T0.SlpCode = T1.SlpCode INNER JOIN OSHP T2 ON T0.TrnspCode = T2.TrnspCode INNER JOIN RDR1 T3 ON T0.DocEntry = T3.DocEntry WHERE T0.[CANCELED] = 'n' and  T1.[SlpCode] IN ('3', '4', '5', '6', '7', '8', '9', '17', '21', '29', '39') and T0.Address2 NOT LIKE '%'T0.U_Postcode'%' and   T3.[LineStatus]  = 'o' and T2.[TrnspName] Like '%%del%%' GROUP BY T0.[DocNum], T0.[CardName], T0.[DocDueDate] , T2.[TrnspName],  T0.[U_PostCode], T1.[SlpName] for browse
    Please can you help me on this?
    Many thanks,
    Caroline

    Hi Caroline,
    Try not to "group by" a query for alert with drill down.
    Cheers

  • BPMon Alert Reporting - Query does not exist on server

    Hello,
    I am stepping through the BPMon Alert Reporting Analysis SP05+ guide. I am creating a report and have maintained the details with the template 0SM_BPM_WT0001N. When I try to access or preview the report I am faced with the following error:
    The requested query 0SM_BPM1/0SM_BPM_Q0005N does not exist on the current server
    Error when generating dataProvider
    Any ideas?
    Thanks

    Hi Christoper
    Another thought is, re-activate BPMon BW object.
    Go to T-CD SOLMAN_SETUP ->    Choose business process monitoring in left menu -> step 1.1
    configure automatically. And execute all steps.
    If you face some error due to BW job is nto running or something.
    Then recommend re-execute BW job in SOLMAN_SETUP.
    (Left menu ->Basic Configuration ->Step 5 configure automatically -> under the task you might see "Setup BW" so choose this and activate. Result of this, CCMS_BI_SETUP will run again. So chek whether there is active job in Sm37. After finish this job, try BPMon SOLMAN_SETUP that I mentioned above).
    Best Regards
    Keiji

  • Query Using Send a alert at once not continuously

    Hi,
    How to control the Alert using Query ?.
    if i add a Purchase order alert is sent to assigned
    user i write a query and set the query in
    alert mananagement window. remainder is set for
    one minute alert is working fine but is repeating
    every minutes i want alert to be send only once
    based on conditions.
    I created a UDF and update the values
    YES/NO. If the alert send once my
    UDF field value should be UPDATE to YES.
    when my udf value - Empty or NO then
    only alert is send
    pl send a Ex query it contains
    select statement and Update statement
    1.Alert sent for assigned user.
    2.UDF Value UPDATE - YES
    Both are in one query
    Regards
    Jambu

    Hi Jumbulingam,
    Here is the simply query SELECT T0.DocNum, T0.CardName, T0.BaseAmnt FROM OPOR T0, which will generate the list of purchase orders and sends an alert to the concerned user.
    How to manage Alerts:-
    For the first question - you to first wirte a query. for this log on to Query Generator select the table from which you want to generate a report or otherwise.
    Now go to Admn/Alert Management - in the window - change to add mode and give some name to your alert program and from "Open saved Query" select the query which you had write for this process. After this you can check box the users who should get this message/mail etc.,
    For the second question - while writing query, you can specify conditions that should be considered while generating query reports. This can again be fowarded to users thru alert management.
    Hope this clarifies your doubt.
    Thanks,
    Srikanth

  • No of Records in the Alert

    Hi All,
    Do we have a limitation on no. of records in Alert .As when i run the query alone it showing all the result but when i attache it with alert its not showing all the data
    Edited by: Ankur Gupta on Jul 10, 2009 9:22 AM

    Hi.
    In version 2005A, the limit was 99 records, so, the limit is still present.
    I suggest to create the alert as query in Query Manager, and fix the alert to display records like Top 10 or TOP 100.
    Regards.

  • Setting Filter on an Alert

    Hi,
    I am trying to create an alert programatically. When I set a CAML query as the filter condition, it always gives an error
    The error message says -
    The filter cannot be parsed. Check the filter syntax, and try again.
    If I try to add an alert programattically without any filter conditions, I'm able to do so.
    The strange part is that I have used the same CAML query to create a view programatically.
    I am not able understand as to how a CAML query works with a view but not with an alert.
    The CAML query is run on a list which has multiple choice columns.
    The query contains multiple OR conditions to check against the values for those choice columns.
    I have put in a query as -
    <Where><Or><Eq><FieldRef Name='ItemType'/><Value Type='Choice'><Health></Value></Eq></Where>
    Even this does not work....
    I wanted to ask few questions -
    Is there any specific rules we need to follow to set up the filters. What are the things that can go wrong when we set filters.
    If the value of a choice field has special characters like () " , ! and so on, the query does not work when we try to fetch list items. What can be done to overcome this....
    I have tried to enclose the values within the CDATA tag... It seems to work, but i am not very sure about it.
    Please let me know if there is any other solution.
    Thanks

    Same problem and similar observations with no resolution. I believe this is a bug and we are working with Microsoft support to dig deeper into the issue.
    To replicate (complete code provided below):
    - Create a document library
    - Create a choice column on the document library called "Category". This column has the values 1, 2, 3, 4. These choices are displayed as check boxes. 
    - Programmatically create an alert on the document library (code below)
    - Construct a CAML statement to assign to the alert object. This statement instructs the alert to send when a document is assigned a Category of 1 or 2. The CAML statement is below:
    <Query><Or><Eq><FieldRef Name="Category" /><Value Type="Choice">1</Value></Eq><Eq><FieldRef Name="Category" /><Value Type="Choice">2</Value></Eq></Or></Query>
    - Save the Alert
    SharePoint is unable to parse the CAML and throws the following error:
    System.Runtime.InteropServices.COMException (0x8102008F): The filter cannot be parsed. Check the filter syntax, and try again. at Microsoft.SharePoint.Library.SPRequestInternalClass.AddSubscription(String bstrUrl, String bstrListName, String bstrListID, Boolean bListItem, UInt32 ulItemId, String bstrItemDocUrl, Int32 lEventType, Int32 lNotifyFreq, DateTime notifyTime, Int32 lStatus, Boolean bSiteAdmin, String bstrAlertTitle, Int32 lAlertType, String strAlertTemplateName, String bstrFilter, String bstrProperties, Boolean bSendMail, Int32 lUserID) at Microsoft.SharePoint.Library.SPRequest.AddSubscription(String bstrUrl, String bstrListName, String bstrListID, Boolean bListItem, UInt32 ulItemId, String bstrItemDocUrl, Int32 lEventType, Int32 lNotifyFreq, DateTime notifyTime, Int32 lStatus, Boolean bSiteAdmin, String bstrAlertTitle, Int32 lAlertType, String strAlertTemplateName, String bstrFilter, String bstrProperties, Boolean bSendMail, Int32 lUserID)
    If I change the value type from "Choice" to "Text" SharePoint will accept the CAML and execution completes correctly, however the CAML is not honoured.For example, alerts are sent not only for documents assigned a Category 1 or 2 but also documents that only have category 3 or 4 assigned (???).
    Full code to replicate:
    WindowsImpersonationContext wic = WindowsIdentity.GetCurrent().Impersonate();
            try
                using (SPSite GMS = new SPSite("http://sharepointdev:31626"))
                    using (SPWeb GMSWeb = GMS.OpenWeb(SPContext.Current.Web.ID))
                        string doclibname = "StrippedDown";
                        SPList list = GMSWeb.Lists[doclibname];
                        SPAlert alert = GMSWeb.Alerts.Add();
                        alert.EventType = SPEventType.Modify;
                        alert.User = GMSWeb.CurrentUser;
                        alert.AlertType = SPAlertType.List;
                        alert.List = GMSWeb.Lists[doclibname];
                        alert.Title = doclibname + "_" + GMSWeb.CurrentUser.Name;
                        alert.AlertFrequency = SPAlertFrequency.Immediate;
                        alert.Filter = "<Query><Or><Eq><FieldRef Name=\"Category\" /><Value Type=\"Choice\">1</Value></Eq><Eq><FieldRef Name=\"Category\" /><Value Type=\"Choice\">2</Value></Eq></Or></Query>";
                        alert.Update();
                        alert = null;
                lblMsgs.Text = "Your subscription was successfully updated.";
            catch (Exception ex)
                lblMsgs.Text = "An error occured during creating your subscription. Please try again .The error text is <br><br>" + ex.InnerException.ToString();
            finally
                lblMsgs.Visible = true;
                wic.Undo();
                wic = null;

  • Resolve Alert subscription ID to name

    Hello everybody,
    I'm expierencing some trouble with alert notification. On a regular base I get an alert about the fact that alert notification takes too long. I copied this from the eventviewer:
    Log Name: Operations Manager
    Source: Health Service Modules
    Date: 6-10-2014 11:22:57
    Event ID: 11411
    Task Category: None
    Level: Warning
    Keywords: Classic
    User: N/A
    Computer: xxxx
    Description:
    Alert subscription data source module encountered alert subscriptions that were waiting for a long time to receive an acknowledgement.
    Alert subscription ruleid, Alert subscription query low watermark, Alert subscription query high watermark:
    5fcdbf15-4f5b-29db-ffdc-f2088a0f33b7,10/06/2014 09:07:09, 10/06/2014 09:10:09
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
    <System>
    <Provider Name="Health Service Modules" />
    <EventID Qualifiers="32768">11411</EventID>
    <Level>3</Level>
    <Task>0</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2014-10-06T09:22:57.000000000Z" />
    <EventRecordID>8281981</EventRecordID>
    <Channel>Operations Manager</Channel>
    <Computer>xxxx</Computer>
    <Security />
    </System>
    <EventData>
    <Data>5fcdbf15-4f5b-29db-ffdc-f2088a0f33b7,10/06/2014 09:07:09, 10/06/2014 09:10:09
    </Data>
    </EventData>
    </Event>
    If I'm understanding it correctly this ID "5fcdbf15-4f5b-29db-ffdc-f2088a0f33b7" is representing one of my subscriptions. So i tried to resolve it with Powershell, but this is what I get:
    PS C:\Users\Slinkos> Get-SCOMNotificationSubscription -id 5fcdbf15-4f5b-29db-ffdc-f2088a0f33b7 | ft DisplayName
    Get-SCOMNotificationSubscription : An object of class NotificationSubscription with ID 5fcdbf15-4f5b-29db-ffdc-f2088a0f
    33b7 was not found.
    At line:1 char:1
    + Get-SCOMNotificationSubscription -id 5fcdbf15-4f5b-29db-ffdc-f2088a0f33b7 | ft D ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: (Microsoft.Syste...scriptionCmdlet:GetSCNotificationSubscriptionCmdlet
       ) [Get-SCOMNotificationSubscription], ObjectNotFoundException
        + FullyQualifiedErrorId : ExecutionError,Microsoft.SystemCenter.OperationsManagerV10.Commands.GetSCNotificationSub
       scriptionCmdlet
    So what am I doing wrong? I don't know how else I should troubleshoot this.

    Slinkos,
    Thank you for providing the alert name. Helped me in digging few things.
    The event 11411 occurs when your MS / RMS is not able to send the alert notification via email.
    Reasons:
    Overloaded SQL server or Database space.
    There is a huge alet flow in your SCOM environment.
    Solutions:
    1.Check the performance of the SQL server where the Operationsmanager and OperationsmanagerDW is hosted
    Check the free space in both the DB's as well.
    2. There is huge alert flow in your SCOM.  There is some rule / rules or Monitor / monitors generating very very frequently for which this overload is happening.
    Did you recently configure any new set of rules / monitores ? 
    Use the reporting feature to pull the top 10 contributed alert list to validate
    Reporting --> Microsoft generic report library  --> Most common alerts report.
    Also is there any time frame of this alert coming, then check the ops manager console for other alerts as well.
    Post me the results.
    Also if the above issue resolves automatically as you said then Event id 11412 will be generated.
    So check When 11411 came and 11412 came so we can analyse the time difference when this hapens and auto recovers.
    Gautam.75801

  • Powershell workflow generating false e-mail alerts

    Hi,
    I have a powershell script that gathers all of the trusted domains in our environment and then sends each domain name to another script to time the amount of time it takes to receive a response to an unqualified (isolated) name query in AD.
    Script 1 code:
    #Load the Active Directory Module
    Import-module activedirectory
    #Search the local schema for all trusted domain objects
    $ADDomainTrust = Get-ADObject -Filter {ObjectClass -eq "trustedDomain"} -Properties * | Sort-Object cn
    #Define workflow to pass domain names to trustsearch script
    workflow Get-domains
      param( $trusteddomainlist)
      foreach -parallel ($trusteddomain in $trusteddomainlist)
        $trust = $trusteddomain.name
          InlineScript {C:\trustsearch.ps1 $using:trust}
    Get-domains -trusteddomainlist $ADDomainTrust
    As you can see, I'm using a "foreach -parallel" workflow to query each trusted domain simultaneously. This is done to alert us to a potential problem as quickly as possible, without having to wait for the entire script to finish.
    Here's the code for the second (isolated name query) script. It sends me an e-mail if the query takes over 60 seconds. 
    Script #2 code:
     $trust=$args[0]
    foreach($domain in $trust){
    $startDTM = (get-date)
    $objUser = New-Object System.Security.Principal.NTAccount("junk")
    $strSID = $objUser.Translate([System.Security.Principal.SecurityIdentifier])
    $strSID.Value
    $endDTM = (get-date)
    $totaltime = (($endDTM-$startDTM).TotalSeconds)
    $ftotaltime = "{0:N2}" -f $totaltime
    Function SendMail
    #SMTP server name
         $smtpServer = "<SMTP server IP address>"
         #Creating a Mail object
         $msg = new-object Net.Mail.MailMessage
         #Creating SMTP server object
         $smtp = new-object Net.Mail.SmtpClient($smtpServer)
         #Email structure
         $msg.From = "<sender e-mail address>"
         $msg.ReplyTo = "<reply e-mail address>"
         $msg.To.Add("<recipient e-mail address>"
         $msg.subject = "Isolated Name monitor warning"
         $msg.body = @"
         Isolated name queries are running slowly. A script measures how long the NAMCK domain controllers take to resolve an unqualified name query. It usually takes no more than 60 seconds to execute. It is currently taking $ftotaltime seconds.
    This may indicate a trust issue or a problem with a downstream trusted domain.
    #Sending email 
        $smtp.Send($msg)
    If ($ftotaltime -gt "60.00")
     SendMail
    Unfortunately, I'm getting a lot of false positives....e-mail alerts when query responses are taking only 7 or 8 seconds, not just over 60. It seems to happen most during the first 2 or 3 minutes the script runs. I think it has something to do with it running
    in parallel, because when I remove the "foreach -parallel" functionality, I don't get any false positives.
    Does anyone have suggestions on how to cut down or even eliminate the false positives without removing the "foreach -parallel" functionality?
    Thanks.

    I think the problem is here:
    If ($ftotaltime -gt "60.00")
    You're doing a string comparison, when you need to be doing a numeric comparison:
    If (60.00 -lt $ftotaltime)
    Here:
    $ftotaltime = "{0:N2}" -f $totaltime
    you're uisng the string format operator (-f) which is going to produce a string. String comparisons of numbers won't produce the expected results:
    PS C:\> "9.00" -gt "60.00"
    True
    Using the numeric double value 60.00 (instead of the string value "60.00"), and putting it on the LH side of the comparison will cause $ftotaltime to be coerced to a double, and you should get the expected results.
    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

  • Alert data collection process unable to write data to the Data Warehouse

    Alert data collection process unable to write data to the
    Data Warehouse. Failed to store data in the Data Warehouse. The operation will
    be retried.
    Exception 'InvalidOperationException': The given value of type
    String from the data source cannot be converted to type nvarchar of the
    specified target column.
    One or more workflows were affected by this.
    Workflow name:
    Microsoft.SystemCenter.DataWarehouse.CollectAlertData
    Instance name: Data
    Warehouse Synchronization Service
    Instance ID:
    {9A0B3744-A559-3080-EA82-D22638DAC93D}
    Management group: SCOMMG
    Can anybody Help?

    About 24 hours ago, one of my four management servers began generating this error every 10 minutes; we only upgraded to SCOM 2012 R2 a couple weeks ago, I have NOT installed UR1.  No new management packs or database changes have been made within the
    last week; KB945946 is not related to this.  An Event ID 11411 warning started occurring around the same time as this started and repeats every 10 minutes, too:
    Alert subscription data source module encountered alert subscriptions that were waiting for a long time to receive an acknowledgement.
     Alert subscription ruleid, Alert subscription query low watermark, Alert subscription query high watermark:
    5fcdbf15-4f5b-29db-ffdc-f2088a0f33b7,03/27/2014 00:01:39, 03/27/2014 20:30:00
    Performance on the Data Warehouse database server seems fine; CPU, memory and disk I/O are good.
    How can we identify where the problem is?

  • Alert Message Control

    Hi,
    How to control the Alert using Query ?.
    if i add a Purchase order alert is sent to assigned
    user i write a query and set the query in
    alert mananagement window. remainder is set for
    one minute alert is working fine but is repeating
    every minutes i want alert to be send only once
    based on conditions.
    I created a UDF and update the values
    YES/NO. If the alert send once my
    UDF field value should be UPDATE to YES.
    when my udf value - Empty or NO then
    only alert is send
    pl send a Ex query it contains
    select statement and Update statement
    1.Alert sent for assigned user.
    2.UDF Value UPDATE - YES
    Both are in one query
    Regards
    Jambu

    Jambu,
    Where have you created the UDF?
    What do you mean by " pl send a Ex query it contains - select statement and Update statement
    1.Alert sent for assigned user.
    2.UDF Value UPDATE - YES
    Both are in one query
    Suda

  • Want to delay alert..............

    Hi All,
    I want to delay my alert from executing for about 10sec.
    Is there any SQL function kind of thing which is avaliable for doing this.
    below is my SQL statement used in alert. I want this SQL statement to delay from executing...., it is after insert alert
    SELECT prh.segment1,
    pap.email_address,
    prh.org_id,
    prh.requisition_header_id,
    prh.type_lookup_code,
    pah.sequence_num
    INTO &SQL_REQ_NUMBER,
    &REQUESTOR_EMAIL,
    &SQL_ORG_ID,
    &REQ_HEADER_ID,
    &TYPE_LOOKUP_CODE,
    &SEQ_NUM
    FROM po_action_history pah,
    po_requisition_headers_all prh,
    per_all_people_f pap
    WHERE pah.object_type_code = 'REQUISITION'
    AND pah.object_id = prh.requisition_header_id
    AND prh.preparer_id = pap.person_id
    AND pah.employee_id = prh.preparer_id
    AND pah.employee_id = pap.person_id
    AND TRUNC(SYSDATE) BETWEEN TRUNC(pap.effective_start_date) AND TRUNC(pap.effective_end_date)
    AND pah.sequence_num = 3
    AND pah.action_code IS NULL
    AND pah.rowid = :ROWID
    Thanks in advance
    Jana
    Edited by: Jana on Jul 14, 2010 7:11 PM

    Hello Jana,
    I have a similar requirement. What I am doing is scheduling an on demand check in the future via a trigger. Warning: I am not sure this would be supported at all.
    You will also need a table to track which checks are being scheduled for which records. You alert sql query will have to join to that table because an on demand check cannot refer to :rowid - only event alerts can do that. You also need to know the alert_id and application_id of your alert.
    First, take a look at the trigger that was generated on po_action_history table when you created your event alert. It will be named something like ALR_PO....
    It is hard to read, so you might want to copy it out into a text file and format it.
    It will have in it statements like these:
    RETVAL:=FND_REQUEST.SET_MODE(DB_TRIGGER => TRUE);
    RETVAL:=FND_REQUEST.SET_OPTIONS(IMPLICIT => 'ERROR');
    REQID:=FND_REQUEST.SUBMIT_REQUEST('ALR','ALECTC','PO_ACTION_HISTORY',NULL,FALSE,USER,'PO_ACTION_HISTORY',rowidtochar(:new.rowid),'U',mailid,ORGID);
    if REQID=0 then raise_application_error(-20160, FND_MESSAGE.GET);end if
    What that does is submit the Check Event Alert conc req (ALECTC) immediately, and makes it invisible to the user who updated po_action_history (SET_MODE(DB_TRIGGER => TRUE). So what I did was to create my own trigger similar to this, but instead submit the conc program that is called when you check an on demand alert, which is ALECDC, and use the start_time parameter for FND_REQUEST.SUBMIT_REQUEST to schedule it in the future.
    Do NOT edit the generated trigger ALR_PO... to do this! You have to create your own trigger.
    You need a table to track the conc req ids. This has to have the fields that uniquely identify the record in po_action_history that was updated - looks like OBJECT_ID, OBJECT_TYPE_CODE,OBJECT_SUB_TYPE_CODE and SEQUENCE_NUM. I suppose you could use rowid, but I haven't tried that. The trigger has to insert in this table.
    Create the table, user apps must have full access to it:
    create table mytable(
    conc_req_id number not null,
    object_id number not null,
    ...whatever other fields are needed to uniquely identify the records
    Create the trigger:
    CREATE OR REPLACE TRIGGER APPS.MYTRIGGER after INSERT on PO_ACTION_HISTORY
    for each row
    WHEN (...put whatever when conditions you want...)
    declare
    REQID NUMBER;
    RETVAL boolean;
    cursor cm_date_format is
    select value date_format
    --into nls_date_fmt
    from nls_session_parameters
    where parameter = 'NLS_DATE_FORMAT';
    date_format_rec cm_date_format%rowtype;
    l_submit_date date;
    begin
    --get the NLS date format, usually DD-MON-RR
    open cm_date_format;
    fetch cm_date_format into date_format_rec;
    close cm_date_format;
    date_format_rec.date_format := nvl(date_format_rec.date_format,'DD-MON-RR');
    --Calculate the date and time in the future you want to run the check
    l_submit_date := sysdate + (10 / (60 * 60 * 24));
    --make sure the user cannot see the conc req
    RETVAL:=FND_REQUEST.SET_MODE(DB_TRIGGER => TRUE);
    RETVAL:=FND_REQUEST.SET_OPTIONS(IMPLICIT => 'ERROR');
    --submit the check
    REQID:=FND_REQUEST.SUBMIT_REQUEST(application => 'ALR',
    program => 'ALECDC',
    description => 'MY ALERT CHECK', --replace this with something more meaningful, like the alert name
    start_time => to_char(l_submit_date,date_format_rec.date_format||' HH24:MI:SS'),
    argument1 => put the application id of your alert here,
    argument2 => put the alert_id of your alert here,
    argument3 => 'A');
    if REQID=0 then
    raise_application_error(-20160, FND_MESSAGE.GET);
    end if;
    insert into mytable(
    conc_req_ID,
    object_ID,
    --all your other fields needed to identify the record being updated
    values(
    REQID,
    :new. object_ID,
    --all your other fields needed to identify the record being updated, from the :new values
    end;
    commit;
    Now create an on demand alert similar to your event alert, but in your sql you cannot refer to :rowid. However, when the alert runs, it runs inside of the conc req that you submitted in the trigger, meaning that FND_GLOBAL.CONC_REQUEST_ID will have the value of the conc req. So remove "AND pah.rowid = :ROWID" from your sql, add mytable to the from clause, and then join to mytable in your where clause:
    and mytable. Conc_Req_id = FND_GLOBAL.CONC_REQUEST_ID
    and mytable.object_id = pah.object_id
    and mytable.... = pah.... (join to all other fields in mytable that uniquely identify the record in po_action_history)
    Now set up your actions and action sets for this new on demand alert similar to what you did for the event alert. Then disable the event alert.

  • APP-ALR-04050 Alert was not able to submit concurrent program

    Hi Friends,
    Can someone please help me in solving the below issue?
    I'm using Event alert for submitting a concurrent program based on insertion/updations on po_requisition_headers_all table. This alert is not working when I am creating a Purchase Requisition manually in Requisitions screen, it is not invoking the concurrent program. Check event alert is failing with the error 'APP-ALR-04050 Alert was not able to submit concurrent program'.
    But when I am creating a PR using an interface then the alert is working fine and submitting program.
    oracle version is R12.
    Alert SQL query:
    Select prh.segment1,
              prh.org_id
    into &p_in_pr_num,
            &p_in_org_id
    from po_requisition_headers_all prh
    where prh.authorization_Status IN ('APPROVED','CANCELLED')
    and prh.attribute_category = 'Sales Driven'
    and prh.org_id = :ORG_ID
    and orh.rowid = :ROWID
    Kindy help me in resolving this issue. Thank you in advance.
    Thanks
    Sravana

    Hi Sravana,
    Are you running on 12.0 release? Please provide you environment details.
    Please see:
    Oracle Applications Technology Software Updates, Release 12.0.4 (Doc ID 466974.1)
    Search for: ALERT WITH CONCURRENT REQUEST ACTION ERRORS WITH APP-ALR-4050
    I suggest you raise an SR for the respective issue.
    Thanks &
    Best Regards,

  • Spotfire POC using ASO Essbase data source

    Looking for anyone with success using Spotfire on Essbase, specifically ASO storage type. We're performing a proof of concept, testing Spotfire 6.5.2 using Essbase 11.1.2.2 as a data source. We've been able to connect without any issues and visualize some data. We have several calculated measures in Essbase that are not being visualized in Spotfire. When we select these measures we receive the following alert: “The query is not supported in the external data source. External error: It is not possible to aggregate the measure 'ACC' in the current configuration. The aggregation would be based on an Essbase formula that is not guaranteed to be additive.”
    Does anyone have experience connecting spotfire to essbase, I would like to hear your feedback and lessons learned to help us jump start our effort.
    Thanks in advance for your feedback.

    Hi Sayak,
    Let me know if I got you right, that you have a Priority as an account member in Essbase with the members 0,1,2 which you are trying to report as 'LOW', 'MEDIUM' and 'HIGH' through OBIEE.
    Ok, If it is so, here are some pointers
    1. If I go by your example, I still cannot see PRIORITY as a measure, instead I would consider this as a Dimension (might well be an Attribute Dimension to be precise)
    2. For some reasons, if this is still a measure here are some steps what you could do (I could not test these though, but hope you can get it right when you run through them)
    Import your Essbase outline to OBIEE and your relational lookup table too in the physical layer..
    Convert the Essbase measure dimension to flat measures in physical layer. Yes, just because you got to have a lookup for this priority measure exclusively and I do not think we can do it, with the account still as a hierarchy in OBIEE.
    Once, you pull the Essbase cube into BMM, you could see the Fact table for the Essbase cube with this priority measure.
    Create the lookup logical table too in BMM, using this physical lookup table.
    Now for the Priority measure in Essbase's Cube Fact table, you could use the Lookup function as below
    LOOKUP
    SPARSE/DENSE
    #Logical Lookup table's description column here #,
    #Essbase's Priority Measure
    Just give it a try, I am sure you will find a way through. Hope this helps.
    Thank you,
    Dhar

  • Need to send email with content of total sales

    Hi experts,
    I have configure notification mailer and have received also test email. Usually I may receive oracle alerts in my email address.
    I need two solutions or need to build below mention point.
    1) need to send email total daily sale ?
    2) need to setup oracle alerts ?
    I am waiting your kind response or refer solid documents to fulfil my requirements
    Thanks

    You can configure an alert that fires every day at about 1:00 am.
    The alert can query oe_order_lines_all table for all orders lines that were created in booked status on the prior day.
    Then you can format the alert to include the total amount.
    You can group by sales person or by warehouse.
    If you want to group the sales by item numbers, the email may become long depending on the number of items you sell every day.
    See http://docs.oracle.com/cd/A60725_05/html/comnls/us/alr/summary.htm for a great example on how to send a summary alert.
    Hope this helps,
    Sandeep Gandhi

Maybe you are looking for

  • How do I connect multiple displays to a Lenovo 405

    how do I connect multiple displays to a Lenovo 405 running windows 7?  I tried a video card but the built in amd video port would not function with the video card plugged in. Moderator Note; subject edit, post moved to here

  • Help with emailing multiple photos in IPhoto using entourage

    I am trying to figure out how to email multiple pictures. When I highlight them and click on the icon for preparing them to email, they will appear in a blank email. I cannot drag them, however to another email out of entourage.

  • Captivate 6 Crashes opening PC files on Mac

    We work with both PC and Mac.  I upgraded to Cap 6.0 a couple of months ago, but found it quite flakey and stuck with 5.5 while we cleared our pipeline of work (needed reliability in the face of deadlines).  I've just returned to 6.0, and am still fi

  • Opportunity Closed/Won error

    In attempting to test a workflow, I must be able to change an opportunity to Sales Stage Closed/Won. Now, when I try to do this, I get the following error from internet explorer: The following fields are required for sales stage Closed/Won: ZText_4(S

  • Activating Info object characteristics?

    hello all Iam trying to activate my Infobject char,in two ways like r.click on my infobject and activate master data and trying to activate by attribute change run,since one record entrie in my master data has been changed? but its not activating and