Execute trigger

Gurus,
I have a problem .. I have three push buttons in my form ...
Now I want to write Execute trigger(when button pressed) in my when new block instance ...since I am having 3 push buttons .. and since I have to execute when button pressed for push_button45, how can I achieve this ??
Regards

If I understood you correctly, according to your post, you need to execute the WHEN-BUTTON-PRESSED trigger of your push_button45 from your WHEN-NEW-BLOCK-INSTANCE trigger.
If that's the case then you need to use go item to execute the trigger that relies under a specific item, if you want to execute push_button45's WHEN-BUTTON-PRESSED trigger you need to have the below code in your procedure.
GO_ITEM('push_button45");
EXECUTE_TRIGGER('WHEN-BUTTON-PRESSED');{code}
Tony                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Similar Messages

  • How can i execute trigger from procedure

    Hi
    How can i execute trigger when-button-pressed from procedure.
    I knew i have to get the button name and then execute the trigger When-button-pressed.
    but how can i do that.
    Thanks
    null

    how can i execute trigger
    such as When-Button-Pressed on item name "item1"
    and i have more than one trigger with this name on onther
    items
    i know Execute_Trigger('when-button-pressed');
    but any trigger
    for example :
    Execute_Trigger('Item1.when-button-pressed');
    or
    Execute_Trigger('Item2.when-button-pressed');
    or
    other syntax
    i dont know
    please help me
    my email : [email protected]
    Hani

  • Execute trigger on login.

    Hi,
    I need to execute a trigger on login and logout of apex application. Is it possible?
    thanks..

    Possible, but fraught with errors on logout.. How do you handle a crash in application? User closes browser WITHOUT logging out of your application? Also instead of trigger you could have a process in the login process that does what you need..
    Can you explain further what you need/hope to accomplish?
    Thank you,
    Tony Miller
    Dallas, TX

  • Error when executing trigger

    Hi,
    I have written the following trigger:
    create or replace trigger check_pilot_ff
    before insert or update on flight
    for each row
    declare
      ff_date_pilot DATE;
      ff_date_copilot DATE;
      deptdate DATE;
    begin
      select ff_test into ff_date_pilot from pilot where pilot.empno = :new.pilotid;
      select ff_test into ff_date_copilot from pilot where pilot.empno = :new.copilotid;
      deptdate := :new.departuredate;
      if((deptdate-ff_date_pilot)>365) then
         RAISE_APPLICATION_ERROR(-20002, 'The pilot is not fit');
      end if;
      if((deptdate-ff_date_copilot)>365) then
         RAISE_APPLICATION_ERROR(-20003, 'The copilot is not fit');
      end if;
    end;Whenever, I execute a insert statement I get the following error message. I know that the error 20002 is the one that I "throw" when something invalid is entered but what are the other errors?
    ERROR at line 1:
    ORA-20002: The pilot is not fit
    ORA-06512: at "DBCWK.CHECK_PILOT_FF", line 13
    ORA-04088: error during execution of trigger 'DBCWK.CHECK_PILOT_FF'
    How can I fix this problem?
    thanks for the help.

    user5205421 wrote:
    ... Whenever, I execute a insert statement I get the following error message. I know that the error 20002 is the one that I "throw" when something invalid is entered but what are the other errors?
    ERROR at line 1:
    ORA-20002: The pilot is not fit
    ORA-06512: at "DBCWK.CHECK_PILOT_FF", line 13
    ORA-04088: error during execution of trigger 'DBCWK.CHECK_PILOT_FF'
    How can I fix this problem?Hi,
    Fix what problem? Do you want ORA-02002 to appear by itself, without the other errors?
    Error messages are explained in the [Error Messages reference|http://download.oracle.com/docs/cd/B28359_01/server.111/b28278/toc.htm]. The manual often has suggestions for how to solve problems.
    If you still have have a question, say what you need that the manual doesn't provide.

  • Executing  trigger in multiuser enviroment

    i have a table rent
    desc rent
    rent_no
    rent_type
    and i wrote the following trigger
    create trigger test before insert on rent
    for each row
    begin
    select max(active) from status;
    end;
    my question is ,can two users execute the above trigger at the same time??

    The syntax remark - your trigger won't work, you should define the variable
    and use INTO clause:
    create trigger test before insert on rent
    for each row
    declare
    maxv number;
    begin
    select max(active) into maxv from status;
    end;
    The question is why you need such thing in the trigger ?
    This sort of statements can cause the problems in the multi-user environment
    as far as one transaction doesn't see changes of others before they are committed.
    See example below:
    SQL> create table t (id number);
    Table created.
    SQL> create table t1 (id number);
    Table created.
    SQL> create or replace trigger tr_ins
      2  before insert
      3  on t1
      4  for each row
      5  begin
      6   select max(id) into :new.id from t;
      7   update t set id = id + 1;
      8  end;
      9  /
    Trigger created.
    SQL> insert into t values(1);
    1 row created.
    SQL> commit;
    Commit complete.Now the first user inserts into t1:
    SQL> insert into t1 values(null);
    1 row created.The second user is doing the same and waiting for the first user transaction commitment. After commit it has:
    SQL> insert into t1 values(null);
    insert into t1 values(null)
    ERROR at line 1:
    ORA-00001: unique constraint (SCOTT.PK_01) violatedThe second used had not seen the changes made by the first one.
    Rgds..

  • Unable to execute trigger

    I have a trigger written such that data of 2 columns are inserted on table a once other data in other columnsare inserted on the same table, i.e, table a.
    The trigger was firing perfectly all these days. Now all of a sudden I get an error message saying "unique constraint violated".
    If I import the data from this table a and then export the data back to table a, the trigger works fine. But this is not possible, since data is being inserted continuously into this table.
    I need a solution other than import/export of data and the reason as to why the trigger is not firing correctly and why does it fire when I import/export the data.

    Hi,
    could u pls send me the script of ur trigger and ur table structure. would be better if u send it to [email protected] as i'm not a frequent user of this site.
    -Vignesh-

  • How do I use VISA to perform GET (Group Execute Trigger) to three DMMs?

    Hi,
    My systems have about 4 GPIB instruments connecting to my computer via Agilent GPIB-USB Interface card.  I have to use VISA to communicate with the interface and instrument.  I wish I can use NI488,.2 but it does not seem to work with Agilent card.  In NI488.2, I could easily send a command such as X? (to read value from Agilent 3458A) to 3 DMMS at once using sendlist module.  However, I do not know how to do similar parallel poll in VISA.  Can anyone help?  There are three FLUKE8505A on the system.  My goal is to read the three measured values triggered  simultaneously on these three FLUKE DMMs. 
    Sincerely yours,
    Rose

    Hi Rose,
    The How Do I See My Agilent 82357A GPIB-USB Interface in MAX/LabVIEW? knowledgebase article explains how to use an Agilent USB-GPIB with NI-VISA. Using the NI-VISA driver will require you install the Agilent I/O Libraries 14.0 and uninstall the Agilent VISA driver.  Once you get your Agilent GPIB-USB device recognized in MAX, you should be able to control the instruments using LabVIEW. 
    Regards,
    Andy L.
    Applications Engineer
    National Instruments

  • Use of "DBA_OBJECTS" in "AFTER CREATE" Trigger

    Hi,
    We would like to store some extra information about our objects we have in the database. To do so we tought of the idea of creating a 'documenting' table containing an object_id that references to the object_id from the view dba_views.
    Now we want to automatically create a new record in our documenting table when a new object is created, in the first stage this should only contain the object_id
    To accomplish this we are using an 'AFTER CREATE' trigger, but when this trigger fires and the code searches for the new object_id in dba_objects, it does not return any records and generates an error. Likely because when the trigger is executed, the view is not yet updated?
    create or replace
    TRIGGER TRG_TEST
    AFTER CREATE ON SCOTT.SCHEMA
    DECLARE
    tmp VARCHAR2(50);
    BEGIN
    dbms_output.put_line(ora_dict_obj_name);
    select object_id
    into tmp
    from dba_objects
    where object_name = ora_dict_obj_name;
    dbms_output.put_line(tmp);
    END;
    Error report:
    ORA-04088: Fout bij uitvoering van trigger 'SCOTT.TRG_TEST'.
    ORA-01403: Geen gegevens gevonden.
    ORA-06512: in regel 6
    04088. 00000 - "error during execution of trigger '%s.%s'"
    *Cause:    A runtime error occurred during execution of a trigger.
    *Action:   Check the triggers which were involved in the operation.
    It's in dutch, so I'll have a go at translating:
    Error report:
    ORA-04088: Exception while executing trigger 'SCOTT.TRG_TEST'.
    ORA-01403: No data found
    ORA-06512: in rule 6
    04088. 00000 - "error during execution of trigger '%s.%s'"
    *Cause:    A runtime error occurred during execution of a trigger.
    *Action:   Check the triggers which were involved in the operation.
    Does anyone have an idea of how I can accomplish what I'm trying to do here.. Or maybe something I'm doing wrong?
    Thanks in advance!
    Davy

    What is "ora_dict_obj_name" defined as?
    Another option might be to setup a DBMS_SCHEDULER job to run the following insert
    firstly though, create the following table ;
    create document_table as (select * from dba_objects where rownum < 1)and then setup a DBMS_SCHEDULER job to run the following:
    begin
      insert into document_table
      (select dbo.*
       from   dba_objects    dbo
             ,document_Table dtb
       where  dbo.Object_ID = dtb.Object_ID(+)
       and    dtb.Object_ID is null);
       commit;
       exception
        when others then
          rollback;
          -- log a message somewhere with the error, i.e. SQLERRM
    end;
    /Note, I specified all columns, but you'll probably specify explicitly which column you require, in which case the CREATE table would change as well.
    Then you won't have a need for any trigger, and can better manage when you want your documentation to be updated.
    Another option might be to use COMMENT, which can be used on tables, views, materialized views, but won't cover all objects
    to the extent you might want.
    SQL> desc emp2
    Name                                                                                                  
    EMPNO                                                                                                 
    JOB                                                                                                   
    START_DATE                                                                                            
    SAL                                                                                                   
    DEPT                                                                                                  
    END_DATE                                                                                              
    SQL> comment on column emp2.sal is 'Existing Salary of employee as paid at most recent month end';

  • Error -- No Such Trigger('when-button-pressed')

    Hi,
    I am getting the error ""No Such Trigger('when-button-pressed')"",
    when I am executing the code EXECUTE_TRIGGER( 'WHEN-BUTTON-PRESSED' );
    on some item(Key-Next-Item), although WHEN-BUTTON-PRESSED trigger exists.
    What could be the problem ?. It worked till yesterday, giving error from today, I havent
    changed any thing.
    Thanks in Advance
    Devender

    Steve's tip is the only good solution for this case.
    The problem in your case for example is:
    Let's say you have a block-trigger, which fires after your execute-trigger.
    Now a colleague of you, which don't know your code, create a WHEN-BUTTON-PRESSED on an item, then the new code is started and not the block-trigger-code.
    So, don't ever do this. Write your code in a package-function or -procedure and call it from the trigger. So you can re-user the functionality
    Gerd

  • How can I trigger an event from an ABAP Program

    Hi everyone,
    I have a requirement, where I have to create an ABAP program, that has to execute (trigger) an event which belongs to a Process Chain. when I run the program, the Process Chain has to run.
    So, how can I do it?
    Thanks for your help, Federico

    HI ,
    The program can call function module BP_EVENT_RAISE to raise the event. you can create vent in sm64 and sm62 .There you give the parameter of the event same as what you will define in the event of start variant of your process chian ..
    Regards,
    shikha

  • Regarding Procedure & Trigger (Plz Some one Help me... Its Urgent)

    HI,
    I think its a Big Message........ I dont know How many Will have patience in reading this...... Sorry for this Inconvience........
    Iam having 4 tables:
    3 Input table and 1 target table.
    LOgic: Want to Load in the Target table From the input table Based on Some Criteria
    Input Tables:
    Table 1:Tbl_A
    It has ID and Name
    TBL_A
    Ex: ID Name
    201 Anu
    202 Banu
    203 Chitra
    Table 2: Tbl_B
    It has Name and Id
    (The record of Column Name in this table should Contain the same Names of Tbl_A and id should be different from Table a)
    TBl_B:
    ID NAME
    501 Anu
    502 Banu
    503 Chitra
    Table 3: TBL_C
    (It is independent on both Tbl_A and Tbl_b)
    it has this Static records as Follows:
    TBL_C
    ID NAME
    1 A
    2 P
    Output Table:
    TBL_Target: ( It has 3 columns): ID,Source id, and Identifier
    ID SRC_ID IDENTIFIER
    LOgic:
    For Loading data into Target tbl :TBL_Target
    1. Procedure should have 'Name' of TBL_C as input parameter. So input will be
    'A' or 'P'
    *Based on the input Name from TBL_C  the corresponding ID should be taken   
    from TBL_C and inserted into the ID Column of TBL_Target
    EX: IF 'A' Then 1 Should be inserted . IF P means 2 should be inserted
    2. we have to select the IDs from TBL_A and TBL_B based on Their Names as Join condition and insert the ID of TBL_A into IDENTIFIER Column of TBL_Target
    and insert the ID of TBL_B into SRC_ID Column of TBL_Target
    (Note: Actually We have to get the ID'S of all the rows from TBL_A and TBL_B based on their join Condition and load into Target table)
    Out PUt: ( if the input of Procedure is 'A')
    TBL_Target
    ID SRC_ID IDENTIFIER
    1 501 201
    1 502 202
    1 503 203
    Out PUt: ( if the input of Procedure is 'P')
    TBL_Target
    ID SRC_ID IDENTIFIER
    2 501 201
    2 502 202
    2 503 203
    LOgic2:
    I want to Write a Trigger So that Whenever Iam Inserting New Records in TBL_A
    the Trigger should Call the Procedure We have Created
    Thanks......

    Hi,
    I created a Trigger based on After inserting.....
    I called the Procedure inside the Trigger.....
    Trigger is created. But While executing the trigger it Throws an error: Table is Mutating .Trigger or Function May not see it.
    This is the procedure Created:
    CREATE OR REPLACE PROCEDURE Proc_Load (Tblc_Name in Varchar2)
    AS
    -- VARIABLE AND CURSOR DECLARATION:
    V_name Varchar2(100);
    V_id_c number;
    V_id_a number;
    V_id_b number;
    CURSOR cur_name IS SELECT a.id,b.id
    FROM tbl_a a,tbl_b b WHERE TRIM(a.name)=TRIM(b.name);
    begin
    V_name:=Tblc_name;
    SELECT id INTO V_id_c FROM Tbl_c WHERE name=V_name;
    OPEN Cur_name;
    LOOP
    FETCH cur_name INTO V_id_a,V_id_b;
    INSERT INTO tbl_target VALUES (V_id_c,V_id_b,V_id_a);
    COMMIT;
    EXIT WHEN (cur_name %NOTFOUND);
    END LOOP;
    CLOSE Cur_name;
    END;
    Trigger Created:
    CREATE OR REPLACE TRIGGER Trig_name
    AFTER INSERT ON TBL_A
    FOR EACH ROW
    BEGIN
    Proc_Load ('A');
    END;
    If iam Executing trigger Error OCcurs Table is Mutating .Trigger or Function May not see it.
    How to solve it?

  • Call / trigger an ECC workflow step from PI ?

    Hi,
    For a flow "ext (file) -> PI -> ECC (workflow)", from PI, I need to run / execute / trigger () a workflow step in ECC, which already exist. I think that I can acheive this by creating an abap proxy in ECC in which I will call a Bapi or Method to run / execute / trigger () this workflow step. I don't know exactly how for the moment (in parallel I'm doing search about it), but that's not the matter.
    before to waste time by searching in this way, what's the best solution to call an ECC workflow step from PI ?
    Many thanks.
    Mickael
    (*) maybe I don't use the good terminology. Sorry.

    hi Shabarish,
    I'm confortable with web service, IDoc, RFC/bapi and abap proxy (and ...), but here, I prefer to use abap proxy (asynch + sxmb_moni in ecc) except if there is another better approach
    else as in PI we have ccBPM, so a workflow , as in ECC we have also workflow , does my approach (abap proxy & call method) is the good one ? or is there a better way between these two workflow tools: PI + ECC ? like a standard "workflow module" or a workflow "connexion" ? (I fear I know the answer but I would prefer to be sure),
    Note: I'm in PI 7.11 SP06 and ECC 6.0.
    Regards.
    Mickael

  • How to trigger an Action

    Hello,
    I need help to find out how to trigger an Action (Action Definition) from an ABAP program. The program should trigger the Action used to create a follow-up transaction from an existing Contract.
    Thanks in advance,
    Jonas

    Hi! Every one
    I am using codes mentioned in this tread but getting one exception at the time when SAP is trying to save the changes for the change process action data. I am able to run the change process action programmatically ( successfully ) and when i enter some data for the change process action and press the execute button, I am getting one exception. I have attached the exception in this text. Can any one please give any clue why this exception is coming and what else I need to do?
    Thanks
    Yogesh
    Runtime Errors         UNCAUGHT_EXCEPTION
    Except.                CX_OS_OBJECT_NOT_FOUND
    Date and Time          13.03.2007 16:14:30
    Short dump has not been completely stored (too big)
         Short text
              An exception occurred that was not caught.
         What happened?
              The exception 'CX_OS_OBJECT_NOT_FOUND' was raised, but it was not caught
               anywhere along
              the call hierarchy.
              Since exceptions represent error situations and this error was not
              adequately responded to, the running ABAP program
               'CL_METHODCALL_PPF=============CP' has to be
              terminated.
         Error analysis
              An exception occurred that is explained in detail below.
              The exception, which is assigned to class 'CX_OS_OBJECT_NOT_FOUND', was not
               caught in
              procedure "IF_MEDIUM_PPF~EXECUTE" "(METHOD)", nor was it propagated by a
               RAISING clause.
              Since the caller of the procedure could not have anticipated that the
              exception would occur, the current program is terminated.
              The reason for the exception is:
              Could not find the referenced object with the OID
              "00000000000000000000000000000000" (instance GUID) and
              "BECA3BF12720D411AB61009027C3C00A" (class GUID)
         Missing RAISING Clause in Interface
             Program     CL_METHODCALL_PPF=============CP
             Include     CL_METHODCALL_PPF=============CM009
             Row     1
             Module type     (METHOD)
             Module Name     IF_MEDIUM_PPF~EXECUTE
         Trigger Location of Exception
             Program     CL_METHODCALL_PPF=============CP
             Include     CL_METHODCALL_PPF=============CM001
             Row     32
             Module type     (METHOD)
             Module Name     IF_OS_STATE~HANDLE_EXCEPTION
         Source Code Extract
         Line     SourceCde
             2     ***BUILD 020501
             3          " importing I_EXCEPTION type ref to IF_OS_EXCEPTION_INFO optional
             4          " importing I_EX_OS type ref to CX_OS_OBJECT_NOT_FOUND optional
             5     ************************************************************************
             6     * Purpose        : Handles exceptions during attribute access.
             7     *
             8     * Version        : 2.0
             9     *
            10     * Precondition   : -
            11     *
            12     * Postcondition  : -
            13     *
            14     * OO Exceptions  : CX_OS_OBJECT_NOT_FOUND
            15     *
            16     * Implementation : If an exception is raised during attribut access,
            17     *                  this method is called and the exception is passed
            18     *                  as a paramater. The default is to raise the exception
            19     *                  again, so that the caller can handle the exception.
            20     *                  But it is also possible to handle the exception
            21     *                  here in the callee.
            22     *
            23     ************************************************************************
            24     * Changelog:
            25     * - 2000-03-07   : (BGR) Initial Version 2.0
            26     * - 2000-08-02   : (SB)  OO Exceptions
            27     ************************************************************************
            28     * Modify if you like
            29     ************************************************************************
            30     
            31       if i_ex_os is not initial.
         >>>>>         raise exception i_ex_os.
            33       endif.
            34     
            35     endmethod.

  • Trigger Tcode in ECC as soon as process chain starts in BW

    Hi Experts,
    I need some help on how to trigger a transaction code in ECC as soon as the process chain starts in BW.
    I need to give some selections in the ECC like company code, period and year to fetch the report in ECC . I use it for reconciliation of data between ECC and BW.
    Pointers if any would be really helpful.
    A step  by step guide, presentation,doc would be really appreciated.
    Thanks

    Thanks for the reply ravi but what i am looking for just opposite of whats explained in the link.
    I am looking for the info on how  to execute/trigger a transaction code in ECC as soon as the process chain starts in BW ie BW to ECC
    the doc explains how to trigger a process chain in bw from ECC.
    Thanks

  • Trigger -- if a procedure execution is successfuly

    hi,
    I have to execute a trigger if a procedure say P1 is completed successfully
    Please help me how to solve it
    Thanks in Advance
    Muniyandi

    hi,
    I have to execute a trigger if a procedure say P1 is
    completed successfullyTRIGGER is an indepenedent feature which execute itself for an event you cant execute TRIGGER at yours own disposal ,while procedure can be called or execute at yours own will.You can call procedure within trigger but cant execute trigger explicitly after any execution of code e.g sp,function etc.
    BTW why do you need to call a trigger after successful execution of procedure??
    Khurram

Maybe you are looking for

  • To add Custom field in MIRO

    Hi All, I am using ECC 6.0 version of SAP. I want to add a custom field inside the DISPLAY tab on the MIRO screen. Please give me any pointers for any USER EXIT or OSS note for MIRO screen so that we can add a custom field under the display tab on th

  • Java for installation

    Experts, I am installing SOLMAN for ABAP only. but I need Java for running the sapinst gui. I am not getting the exact download file, I tried with following link http://java.sun.com/j2se/1.4.2/SAPsite/download.html  But there was no option for Hp_UX.

  • Is it possible to prevent editing/deletion of photos?

    I know that iPhoto Buddy will allow you to "lock" an iPhoto library, protecting it from prying eyes, but I want to keep all photos viewable in a library, but not allow them to be deleted accidentally. After all the work that's gone into sorting and k

  • Pb iphone recovery mode

    hi my iphone 4 is always in recovery mode. itunes recognize it but when i tried to restore it  a have message 27. i install last version itunes so  it same pb . my iphone is in version 7.1.2 i tried to find soluton on net. thank for your help

  • BCP-Numeric Value out of Range

    I'm exporting out a number of tables via BCP for our Cognos group to report on.  Almost all tables can export and import successfully.  I'm using the following command to export out: SET OUTPUT=K:\BCP_FIN_Test SET ERRORLOG=K:\BCP_FIN_Test\BCP_Error_L