User-defined alert based on Top Activity screen?

Does anyone know the query used to populate the Top Activity screen in Grid Control? I want to make a user-defined alert that will page me if the Top Activity is over a certain amount.

Hi Bishal,
Rather than using an alert, you could put validation code in the SBO_SP_TransactionNotification stored procedure to check for the same job number before the document is added. This is a permitted solution as SAP allow users to add their own sql code to this proc (provided it's not inserting or updating data in SBO system tables).
To set up this solution (on a test system):
1) Open SQL Studio Management
2) In the Object Explorer expand the company database, expand Programmability and Stored Procedures
3) Right-click the SBO_SP_TransactionNotification stored procedure and choose Modify. This will create an update script in the main window.
4) Look for the following section in the script:
--     ADD     YOUR     CODE     HERE
5) Underneath the above section, paste the following code:
if @OBJECT_TYPE = '17' and @TRANSACTION_TYPE in ('U', 'A')
     if exists(select DocEntry from ORDR where DocEntry <> cast(@LIST_OF_COLS_VAL_TAB_DEL as int)
                    and U_Jobnumber is not null and U_Jobnumber <> ''
                    and U_Jobnumber = (select U_Jobnumber from ORDR where DocEntry = cast(@LIST_OF_COLS_VAL_TAB_DEL as int)) )
          begin
               set @ERROR = '9999' -- Set your own error code here
               set @ERROR_MESSAGE = 'The Job Number entered has already been used on a previous sales order.'
          end
6) Click on Execute and you should get a message stating that the update was successful
7) Test adding a new sales order
The above script will raise an error when the user clicks on Add if a job number has been specified on the sales order and that number has already been used. It will not check if a job number has not been specified
Kind Regards,
Owen

Similar Messages

  • Add column to user defined type based on existing table

    Hello guys,
    I am trying to compile my function which returns a user defined type based on existing table. Throughout the initializing process though my query returns one additional column - SCORE(1). Here is my package:
    create or replace
    PACKAGE STAFF_AGENCY_PKG AS
    TYPE TYPE_SEEKER_TABLE IS TABLE OF TOSS.SEEKER%ROWTYPE;
    FUNCTION GET_SEEKERS(IN_KEYWORD IN VARCHAR2)
    RETURN TYPE_SEEKER_TABLE PIPELINED;
    END STAFF_AGENCY_PKG;
    create or replace
    PACKAGE BODY STAFF_AGENCY_PKG
    AS
    FUNCTION GET_SEEKERS(IN_KEYWORD IN VARCHAR2)
    RETURN TYPE_SEEKER_TABLE PIPELINED
    IS
    R_TBL TYPE_SEEKER_TABLE; -- to be returned
    BEGIN
    FOR R IN(
    SELECT Seeker.SEEKER_ID,
    Seeker.FIRSTNAME,
    Seeker.LASTNAME,
    Seeker.NATIONALITY,
    Seeker.ISELIGIBLE,
    Seeker.BIRTHDATE,
    Seeker.ISRECIEVEEMAILS,
    Seeker.HIGHESTDEGREE,
    Seeker.ETHNICITY,
    Seeker.GENDER,
    Seeker.ISDISABILITY,
    Seeker.DISABILITY,
    Seeker.CV,
    Seeker.PASSWORD,
    Seeker.PREFFERED_CITY,
    SEEKER.EMAIL,
    SEEKER.JOB_PREFERENCES_ID,
    SCORE(1)
    FROM SEEKER Seeker
    WHERE CONTAINS(CV, '<query>
    <textquery lang="ENGLISH" grammar="context">' ||
    GET_RELATED_CATEGORIES(IN_KEYWORD) ||
    '</textquery>
    <score datatype="INTEGER"/>
    </query>', 1) > 0
    LOOP
    PIPE ROW(R); --Error(38,10): PLS-00382: expression is of wrong type
    END LOOP;
    RETURN;
    END GET_SEEKERS;
    END STAFF_AGENCY_PKG;
    How do I need to amend my user type in order to suffice?
    Oracle Release 11.2.0.1.0
    Many thanks in advance!

    >
    How do I need to amend my user type in order to suffice?
    >
    You will need to create two new TYPEs. One that has all of the columns of the TOSS.SEEKER table and the new SCORE column and then a TYPE that is a table of the first type.
    See the Example 12-22 Using a Pipelined Table Function For a Transformation in the PL/SQl language reference
    http://docs.oracle.com/cd/B28359_01/appdev.111/b28370/tuning.htm#i53120
    Here is the first part
    -- Define the ref cursor types and function
    CREATE OR REPLACE PACKAGE refcur_pkg IS
      TYPE refcur_t IS REF CURSOR RETURN employees%ROWTYPE;
      TYPE outrec_typ IS RECORD (
        var_num    NUMBER(6),
        var_char1  VARCHAR2(30),
        var_char2  VARCHAR2(30));
      TYPE outrecset IS TABLE OF outrec_typ;
    FUNCTION f_trans(p refcur_t)
          RETURN outrecset PIPELINED;
    END refcur_pkg;
    CREATE OR REPLACE PACKAGE BODY refcur_pkg IS
      FUNCTION f_trans(p refcur_t)
       RETURN outrecset PIPELINED IS
        out_rec outrec_typ;
        in_rec  p%ROWTYPE;
      BEGINModify
      TYPE outrec_typ IS RECORD (
        var_num    NUMBER(6),
        var_char1  VARCHAR2(30),
        var_char2  VARCHAR2(30));
      TYPE outrecset IS TABLE OF outrec_typ;to include all of the columns you need. Unfortunately you will have to manually list all of the columns of the TOSS.SEEKER table. If you expect to need this same structure in other places you should create them as SQL types instead of PL/SQL types.
    This example should be enough to show you how to change your code to do something similar.

  • Use current user in the user Defined alerts

    Hi
    i created a UDQ with a filter on the Current user (where ???=$[USER]
    and it's working fine.
    but when i use it in the User Defined Alert, nothing happen. the UD Alert doesn't fire.
    is there any solution?
    10x

    H Gordan
    for example:
    select t0.docentry,t0.docnum,t0.cardcode,t0.cardname from ordr t0 where t0.docstatus='O' and t0.usersign=$[[USER]]
    if you save it as UDQ and run it, it will return all open sales orders for current user.
    try to link it to an alert, it won't show you any thing
    regards;
    Edited by: Dany Bittar on May 12, 2011 1:08 PM

  • User Defined CoA  Level 6 for Active Accounts

    I have not selected indian CoA. Through User defined i have created entire CoA. There, i have given Active Accounts as Level 6 instead of Level 5 . Will it create Problem.
    Rakesh N

    Hi,
    Absolutely no problem.  Levels are only for COA grouping.  IN B1 Upto 10 levels you can group your COAs.
    Regards,
    Venkatesan G.

  • User defined alert

    Hi Dear;
    i create a new alert.
    how can i set this alert to fire when i add a new document (as the predefined alert)
    regards;

    Hi Dany,
    Use the alert function to have the system automatically notify selected users in SAP Business One whenever certain system events occur. There are two types of Alerts, predefined alerts and user-defined. In addition, approval procedures also generate alerts if their conditions are met. Messages triggered by alerts can be sent internally, or externally by e-mail, SMS message, or fax.
    Alerts are optional and can be modified, deactivated or removed at any time.
    The following pre-defined Alerts are available for immediate use:
    Deviation from Credit Limit: Each business partner can have a predefined discount percentage. This Alert is triggered when a quotation or other type of document varies from this Credit Limit.
    Deviation from Commitment: Alerts when the Commitment limit, as defined by the sum of the credit limit and the cheques received but not cashed yet is breached.
    Deviation from % of Gross Profit: The conditions for the Profit Percentage in the document can be defined in the Conditions tab of the Alerts Management window. This Alert is triggered when a document has a gross profit less than this value.
    Deviation from Discount (in %): Each BUSINESS PARTNER can have a predefined discount percentage. This Alert is triggered when the discount for a certain document varies from this discount.
    Deviation from Budget: Alerts when a new Purchase Order is calculated and a divergence from the budget occurs.
    Minimum Stock Deviation: Detects when the inventory for an Item falls below the minimum level, which has been defined in the Item Master Record.
    For the above predefined alerts, the user can decide which documents to check and therefore limit or expand the scope of the alert.
    Alerts just notify the appropriate parties. They do not stop a document from being posted. The notified user can reply to the alert using the messaging function and this reply like the original alert can be sent internally, or externally via e-mail, SMS message, or fax
    To display the Alerts, if Saved History has been chosen in the Alerts Management window, choose Window Messages/Alerts Overview.
    Hope it helps.
    Samir Gandhi

  • Accessing user defined fields when multiple forms as open SBO 2005

    Hi
    I have a program which updates a user defined field on the sales order screen. This works fine but fails to work correctly when they have more than one sales order screen open.
    It updates the first sales order screen and not the active one.
    Is there any easy way of accessing the correct user defined form which is attached to the active screen please ?
    Code below -
                For lc = 0 To B1Connections.theAppl.Forms.Count - 1
                    If B1Connections.theAppl.Forms.Item(lc).TypeEx = "-139" Then
                        form2 = B1Connections.theAppl.Forms.GetFormByTypeAndCount("-139", 1)
                        form2.Items.Item("U_bpremarks").Specific.string = orecset.Fields.Item(0).Value
                    End If
                Next
    Many thanks
    Regards Andy

    Hi Paul,
    you got the point - as long as you have always the udf screens open the count is the same !
    no need to say sorry
    iam relaxed - i have a EURO 08 livestream open
    lg David

  • User Exit to add user-defined selection critieria onto VL10G

    Does anyone know how to add user-defined selection criteria onto <b>VL10G</b> - Sales and purchase order display screen? OSS note <b>524424</b> states the userexit to transfer user-defined selection criteria from the selection screen to the report but no information on how to add the selection criteria on the screen. Is that something can be done through configuration or user-exit?
    Any advice or sample is greatly appreciated.

    I was in a hurry, I forgot to add, the user role specific selection screen assignment to VL10G is done at "delivery scenario" level
    The delivery scenarios that are predefined in the system can be found under Logistics Execution -> Outbound Process -> Goods Issue for Outbound Delivery -> Outbound Delivery -> Create -> Collective Processing of Documents for Shipment.
    You can make the following settings in a delivery scenario:
    <b>Selection screen</b>
    You can use the selection screen parameters to define the appearance of the selection screen used to select the delivery list.
    There are three combinations of selection parameters available that each include a different number of tabs.
    A long selection screen with no tabs
    A selection screen with three tabs
    A selection screen with six tabs
    The selection criteria is the same on all three screens in the standard system, it is simply arranged differently.
    This parameter also triggers scheduling of the report for processing the delivery list, with the same three available tab options.
    Customer enhancements are also possible in the LV50R_PREFZ1 program, which should be triggered from a delivery scenario.
    <b>User role</b>
    In the standard system, a predefined user role is assigned to each delivery scenario. If necessary, you can copy these user roles into your own user roles, make changes as required, and then assign them to a delivery scenario of your choice.
    If the user role assignment for a delivery scenario is changed in Customizing, the new settings are valid for all users that carry out this delivery scenario.

  • USER DEFINED TABLES IN XL REPORTER

    Hello,
    I have a user defined field based on a user defined table with code and name. I call my user defined field in XL reporter. This field varied with the data that I report. I would like to know how I can add the name of the table in my XL report. We can call additionnal tables, but I don't know how I can write the instruction to do it with a variable field.
    Thanks
    Isabelle LAGUERRE
    Serena
    France

    Isabelle,
    Usere Defined Tables are not supported by the XL Report Writer.  There is not a method to import UTD's at this time.  User Defined Fields (UDF's) are supported.
    Eddy

  • User-Defined Fields Window

    Hi All,
    I have one issue with the User-Defined Fields window of the ACTIVITY form.
    I had added some user defined fields (UDF) to the Activities so that the User-Defined Fields are displaying in a separate window just near to the Activity window with Type (-651). All the UDFs are bound to the table, "OCLG".
    I want to initialize the values in the User defined fields controls with a text when the form is loading.
    I had tried to do this using
    oForm.Datasources.DBDatasources.Item("OCLG").SetValue("U_CUST",0,"MyValue");When I executed this statement, i am getting HResult error.
    Then I tried this by using UserDataSources.
    The same error repeats.
    But the code with .Specific.String = NewVal is working fine.
    Can you please explain the scenarios that we are able to do it using .Specifc.String. Is this a true method for doing this?
    if not
    please tell me How can we do this using Datasources (DBDatasources/ UserDataSources),?
    Please Help.
    Thank you in Advance
    Anoop

    Anoop,
    when you have created UDF in master item data, the textbox you can see on left side of form (separate form) is bounded already to this field. You cannot rebound it (its system form).
    When you want to change the value, you must use specific.string or specific.value for that textbox (as you wrote), but the calcualted value will be stored into master table (change of udf will set formmode to update mode). If you dont need to update formmode, set the formmode by code to normal mode.
    hope it helps
    Petr

  • Undo User Defined Value

    I create a user defined value in the production order screen for Product No. by mistake.  How do I reestablish the connection between Product No. and the List of Bill of Material?
    Regards,
    Fred

    Hi Fred,
    You just need to ShiftAtlF2 to bring up design page and change it to without User Defined Value.
    Thanks,
    Gordon

  • Can I change the location of my user-defined error file to the project directory?

    The LabVIEW help says that the user-defined (XML-based) error file has to be located in the labview\user.lib\errors directory.
    I would rather have the file in my Project Folders directory, as this is what is distributed. 
    Is there a way to make LabVIEW look elsewhere on startup.
    -James

    Hey, from the LabVIEW help, it looks like you don't need to worry about it.
    "If you use the Application Builder to create an installer, you can place a checkmark in the Install custom error code files? checkbox on the Advanced page of the Installer Properties dialog box to include LabVIEW error code files. The installer build includes all error code files from labview\project\errors and labview\user.lib\errors and installs them in the Shared\LabVIEW Run-Time\8.2\errors directory."
    If you select that checkbox, LabVIEW takes care of it for you.
    Hope this helps!
    Daniel Eaton
    National Instruments
    Systems Engineering
    Embedded and Industrial Control

  • Active screen corner + incorrect password results in hibernation, help!

    I've got the right top (active) screen corner set to sleep my display.
    And only recently noticed that, if after using that i try to move mouse or press any key it would ask me for password, which is OK, but the problem is that if after entering incorrect password 3 times (happens , it would hibernate my mac for some reason.
    I am not observing the same behavior if I just let the system unattended and screen saver kicks in, and then screen goes blank, or even if I lock the screen directly from keychain access.
    In both these scenarios my system is not being hibernated if I made a typo 3 times in my password, so it only happens while using active screen corner.
    Any idea how to get around this annoyance?

    Sorry,sorry,sorry,folks.
    Problem solved.I was just moving my cursor to the corner area of the screen.You have to go virtually off the screen corner to activate this.
    Time for a coffee.

  • Least count- user defined field

    Hi, we want to define a user defined field (lease count) in equipment screen (ie01) for gages calibration. Please advise is there any option to create least count field in ie01 screen which can allow us to fetch the least count field in the customized reports.

    Dear Yadav
    There are lot of fields available in the IE01 which can be considered to be used as Least count.  Rather defining a new field use any unused field
    Regards
    Gajesh

  • Alert based  on user defined query

    Hi
    I have defined user defined field U_Jobnumber.I need to stop /inform user if user is trying to enter the same u_Jonbnumber again .This is being done at sales order (header level)
    Can you please help me to provide solution
    (Points will be awarded based on solution or advice )
    Thank you
    Bishal

    Hi Bishal,
    Rather than using an alert, you could put validation code in the SBO_SP_TransactionNotification stored procedure to check for the same job number before the document is added. This is a permitted solution as SAP allow users to add their own sql code to this proc (provided it's not inserting or updating data in SBO system tables).
    To set up this solution (on a test system):
    1) Open SQL Studio Management
    2) In the Object Explorer expand the company database, expand Programmability and Stored Procedures
    3) Right-click the SBO_SP_TransactionNotification stored procedure and choose Modify. This will create an update script in the main window.
    4) Look for the following section in the script:
    --     ADD     YOUR     CODE     HERE
    5) Underneath the above section, paste the following code:
    if @OBJECT_TYPE = '17' and @TRANSACTION_TYPE in ('U', 'A')
         if exists(select DocEntry from ORDR where DocEntry &lt;&gt; cast(@LIST_OF_COLS_VAL_TAB_DEL as int)
                        and U_Jobnumber is not null and U_Jobnumber &lt;&gt; ''
                        and U_Jobnumber = (select U_Jobnumber from ORDR where DocEntry = cast(@LIST_OF_COLS_VAL_TAB_DEL as int)) )
              begin
                   set @ERROR = '9999' -- Set your own error code here
                   set @ERROR_MESSAGE = 'The Job Number entered has already been used on a previous sales order.'
              end
    6) Click on Execute and you should get a message stating that the update was successful
    7) Test adding a new sales order
    The above script will raise an error when the user clicks on Add if a job number has been specified on the sales order and that number has already been used. It will not check if a job number has not been specified
    Kind Regards,
    Owen

  • Can we Customize Edit User-Defined Table Screen in Fusion Application

    Hi All,
    We have a requirement to add a ADFDI functionality to the 'Edit USer-Defined Table' screen by adding a 'Mass Upload' Button.
    Normally for Some of the screens (Fusion Compensation) i am seeing 'Personalize -> Edit Current Page' Option on Menu items on top. But on 'Edit User-Defined Table' i am not seeing this option in 'Personalize' Menu.
    So the questions is is this screen Customizable in Fusion Application? If So What will be EAR file which we need to use for Customization.
    The screen where we need to add ADFDI Functionality is under 'oracle/apps/setup' path.
    Can anyone point me to the Exact EAR on this and also let me know if we can customize it or not
    Thanks
    Kaja

    Generally the code structure can be observed run-time [url https://blogs.oracle.com/fadevrel/entry/finding_code_artifacts_for_customization]using the composer, however in your case the content comes through a portlet in which case the method does not work as you cannot drill down to the specific region details in the composer. Based on a search through the code I think the regions you are interested are:
    <li>hcmPayroll/userTables/ui/public_html/oracle/apps/hcm/userTables/ui/page/UserTableSearch.jsff --> This is the details page with header "Manage User-Defined Tables"
    <li>hcmPayroll/userTables/ui/public_html/oracle/apps/hcm/userTables/ui/page/ManageUserStructure.jsff --> This is the details page with header "User-Defined Table: <TABLE_NAME>"
    These would presumably be in EarHcmPayroll. I'll see if I can find out how the portlet content can be observed from the RT application..
    Jani Rautiainen
    Fusion Applications Developer Relations
    https://blogs.oracle.com/fadevrel/

Maybe you are looking for

  • Open a .pdf!!!

    Hy, I've got a file: usa-grants-inc.pdf from a friend of mine and I really need to open it. I'm trying to do that with Acrobat Reader but I keep getting an error message. Is there any other way I can open my file? I really need that information. Can

  • Image not appearing in the Web Parameter Form

    Hello Folks, I have image in the Parameter form, which is not showing up in the Web Parameter Form. I had set up the "REPORTS_PATH" also and still not appearing. Any clue greatly appreciated.. Thanks, Senthil

  • Bluetooth Remote Control Quit Working

    I have a new 8350i and downloaded the new 5.0.0.807 (?) version software. For some reason, after doing this, the ability of my Plantronics Voyager 815 headset to perform remote controls (answer, hang up, volume, etc) has quit working. Has anyone else

  • Error wrt Ref Cursor.

    Hi all, I have a package, and I am using the ref Cursor in my procedure. Here it is ..... CREATE OR REPLACE PACKAGE BLABLA_PKG AS TYPE OUT_CURSOR IS REF CURSOR; PROCEDURE BLABLA_VIEW_PROCEDURE (BUS_ID IN VARCHAR2, XML_OUTPUT_CURSOR OUT OUT_CURSOR); E

  • Silverfast and PSE

    I have Silverfast 8 scanner program on my computer Now I have purchased Adobe Photoshop Elements 11. Should I just install this Photoshop Elements 11? Or should I first uninstall SilverFast 8, install Elements 11 and then re-install SilverFast 8 agai