Problem with "/:trigger"

I got some troubles with AS1.0 (player 6) which I want to
convert to AS2.0 with flash player 8.0.
The errors i get is right here, who can help me convert it to
AS2.0?
**Error** Symbol=script, layer=script, frame=2:Line 2:
Unexpected '/' encountered
/:trigger = Number(/:trigger)+Number(/:trigger);
**Error** Symbol=script, layer=script, frame=2:Line 3:
Unexpected '/' encountered
if (Number(/:trigger)>100) {
**Error** Symbol=script, layer=script, frame=2:Line 4:
Unexpected '/' encountered
/:trigger = "100";
**Error** Symbol=script, layer=script, frame=2:Line 5:
Unexpected '}' encountered
} else if (Number(/:trigger)<Number(-100)) {
**Error** Symbol=script, layer=script, frame=2:Line 6:
Operator '/' must be followed by an operand
/:trigger = "-100";
**Error** Symbol=script, layer=script, frame=2:Line 7:
Unexpected '}' encountered
Attach Code

N.H.L.,
> The errors i get is right here, who can help me convert
it
> to AS2.0?
>
> **Error** Symbol=script, layer=script, frame=2:Line 2:
> Unexpected '/' encountered
> /:trigger = Number(/:trigger)+Number(/:trigger);
As the error shows, you're using a character that doesn't
make sense to
the compiler in this context. That character is a slash (/).
What you've
got here is a case of old school slash syntax, which is the
way objects and
movie clips were referenced in Flash 3 and 4. See details
here:
http://livedocs.macromedia.com/flash/8/main/00001691.html
David Stiller
Adobe Community Expert
Dev blog,
http://www.quip.net/blog/
"Luck is the residue of good design."

Similar Messages

  • Problem with trigger and entity in JHeadsart, JBO-25019

    Hi to all,
    I am using JDeveloper 10.1.2 and developing an application using ADF Business Components and JheadStart 10.1.2.27
    I have a problem with trigger and entity in JHeadsart
    I have 3 entity and 3 views
    DsitTelephoneView based on DsitTelephone entity based on DSIT_TELEPHONE database table.
    TelUoView based on TelUo entity based on TEL_UO database table.
    NewAnnuaireView based on NewAnnuaire entity based on NEW_ANNUAIRE database view.
    I am using JHS to create :
    A JHS table-form based on DsitTelephoneView
    A JHS table based on TelUoView
    A JHS table based on NewAnnuaireView
    LIB_POSTE is a :
    DSIT_TELEPHONE column
    TEL_UO column
    NEW_ANNUAIRE column
    NEW_ANNUAIRE database view is built from DSIT_TELEPHONE database table.
    Lib_poste is an updatable attribut in TelUo entity, DsitTelephone entity, NewAnnuaire entity.
    Lib_poste is upadated in JHS table based on TelUoView
    I added a trigger on my database shema « IAN » to upadate LIB_POSTE in DSIT_TELEPHONE database table :
    CREATE OR REPLACES TRIGGER “IAN”.TEL_UO_UPDATE_LIB_POSTE
    AFTER INSERT OR UPDATE OFF lib_poste ONE IAN.TEL_UO
    FOR EACH ROW
    BEGIN
    UPDATE DSIT_TELEPHONE T
    SET t.lib_poste = :new.lib_poste
    WHERE t.id_tel = :new.id_tel;
    END;
    When I change the lib_poste with the application :
    - the lib_poste in DSIT_TELEPHONE database table is correctly updated by trigger.
    - but in JHS table-form based on DsitTelephoneView the lib_poste is not updated. If I do a quicksearch it is updated.
    - in JHS table based on NewAnnuaireView the lib_poste is not updated. if I do a quicksearch, I have an error:
    oracle.jbo.RowAlreadyDeletedException: JBO-25019: The row of entity of the key oracle.jbo. Key [null 25588] is not found in NewAnnuaire.
    25588 is the primary key off row in NEW_ANNUAIRE whose lib_poste was updated by the trigger.
    It is as if it had lost the bond with the row in the entity.
    Could you help me please ?
    Regards
    Laurent

    The following example should help.
    SQL> create sequence workorders_seq
      2  start with 1
      3  increment by 1
      4  nocycle
      5  nocache;
    Sequence created.
    SQL> create table workorders(workorder_id number,
      2  description varchar2(30),
      3   created_date date default sysdate);
    Table created.
    SQL> CREATE OR REPLACE TRIGGER TIMESTAMP_CREATED
      2  BEFORE INSERT ON workorders
      3  FOR EACH ROW
      4  BEGIN
      5  SELECT workorders_seq.nextval
      6    INTO :new.workorder_id
      7    FROM dual;
      8  END;
      9  /
    Trigger created.
    SQL> ALTER SESSION SET NLS_DATE_FORMAT = 'DD-MON-YYYY HH24:MI:SS';
    Session altered.
    SQL> insert into workorders(description) values('test1');
    1 row created.
    SQL> insert into workorders(description) values('test2');
    1 row created.
    SQL> select * from workorders;
    WORKORDER_ID DESCRIPTION                    CREATED_DATE
               1 test1                          30-NOV-2004 15:30:34
               2 test2                          30-NOV-2004 15:30:42
    2 rows selected.

  • Problem with trigger and mutating table

    Hello,
    I have a problem with the following trigger. Everytime it starts I got an error message:
    ORA-04091: table ccq_test.QW_QUALIFIER is mutating, trigger/function may not see it
    ORA-06512: at "QW_AFTER_UPDATE_ALL", line 3
    ORA-06512: at "QW_AFTER_UPDATE_ALL", line 10
    ORA-04088: error during execution of trigger 'QW_AFTER_UPDATE_ALL'
    Here is the trigger:
    CREATE OR REPLACE TRIGGER qw_after_update_all
    AFTER UPDATE ON ccq_test.QW_QUALIFIER FOR EACH ROW
    DECLARE
         CURSOR c1 IS SELECT id AS mx FROM QW_QUALIFIER_LOG WHERE msgid = :NEW.msgid AND messagedate BETWEEN SYSDATE - (1 / (24 * 60 * 6)) AND SYSDATE AND transfer = 1;
         CURSOR c_qwprod IS SELECT value FROM ccq_test.QW_QUALIFIER WHERE msgid = :NEW.msgid AND name = 'product';
         CURSOR c_qwgesch IS SELECT value FROM ccq_test.QW_QUALIFIER WHERE msgid = :NEW.msgid AND name = 'geschaeftsfall';
         qw_rec c1%ROWTYPE;
         qw_prod c_qwprod%ROWTYPE;
         qw_gesch c_qwgesch%ROWTYPE;
    BEGIN
    OPEN c1;
    OPEN c_qwprod;
    OPEN c_qwgesch;
         FETCH c1 INTO qw_rec;
         FETCH c_qwprod INTO qw_prod;
         FETCH c_qwgesch INTO qw_gesch;
         IF c1%NOTFOUND THEN
              IF (:NEW.name = 'product') THEN
                   INSERT INTO QW_QUALIFIER_LOG VALUES (QW_QUALIFIER_LOG_SEQ.NEXTVAL, :NEW.msgid, :NEW.value, qw_gesch.value, SYSDATE, 1);
              ELSE
              INSERT INTO QW_QUALIFIER_LOG VALUES (QW_QUALIFIER_LOG_SEQ.NEXTVAL, :NEW.msgid, qw_prod.value, :NEW.value, SYSDATE, 1);
         END IF;
         ELSE
              IF (:NEW.name = 'product') THEN
                   UPDATE QW_QUALIFIER_LOG SET product=:NEW.value, messagedate=SYSDATE WHERE id = qw_rec.mx;
              ELSE
                   UPDATE QW_QUALIFIER_LOG SET geschaeftsfall=:NEW.value, messagedate=SYSDATE WHERE id = qw_rec.mx;
         END IF;
         END IF;
    CLOSE c1;     
    END;
    Can anyone help me?

    You are trying to lookup data from qw_qualifier you are currently modifying. You could see the data in a inconsistent way and Oracle is protecting you from it.
    You could read here about how to program around this problem.
    But: your table design seems questionable. You have two records for qw_qualifier and you are trying to log it into one qw_qualifier_log record. Maybe you could fix that, and the need for querying the same table as you are updating is removed.
    Regards,
    Rob.

  • Having problem with trigger.(help needed)

    HI all,
    i m totally new to the PL/SQL.... hope someone can help me with this.....
    i am now using trigger to block inserting into "attendance99" table when the record reach the maximum limit and insert the record to the "waiting_list" table.
    The problem i face is by using RAISE_APPLICATION_ERROR, it will block the insertion to the "waiting_list" table as well.....
    i had try to use only DBMS_OUTPUT.PUT_LINE instead but end up >>> inserting record into both table "attendance" and "waiting_list" tables.
    CREATE OR REPLACE TRIGGER trig_attendance
    Before insert on attendance99
    referencing new as new
    for each row
    DECLARE
    maxstud NUMBER(2);
    currstud NUMBER(2);
    Begin
    SELECT COUNT(*) INTO currstud FROM attendance99 WHERE offering_id=:New.offering_id;
    SELECT max_no_students INTO maxstud FROM offering WHERE offering_id=:New.offering_id;
    IF currstud >= maxstud
    THEN
    insert_waitinglist(:New.offering_id, :New.student_id, :New.evaluation, :New.amount_paid);
    RAISE_APPLICATION_ERROR (-20500, 'Sorry, this Offering ID has reach maximum students, you will be placed into waiting list!');
    END IF;
    END;
    CREATE OR REPLACE PROCEDURE insert_waitinglist
    (v_offeringid IN waiting_list.offering_id%TYPE,
    v_studentid IN waiting_list.student_id%TYPE,
    v_evaluation IN waiting_list.evaluation%TYPE,
    v_amountpaid IN waiting_list.amount_paid%TYPE)
    IS
    BEGIN
         INSERT INTO waiting_list (offering_id, student_id, evaluation, amount_paid)
    VALUES (v_offeringid, v_studentid, v_evaluation, v_amountpaid);
    END insert_waitinglist;
    -----------------------------------------------

    SQL> create table a (x number);
    Table created.
    SQL> create table b (x number);
    Table created.
    SQL> ed
    Wrote file afiedt.buf
      1  create or replace procedure insert_b(x in number) is
      2    pragma autonomous_transaction;
      3  begin
      4    insert into b values (x);
      5    commit;
      6* end;
    SQL> /
    Procedure created.
    SQL> ed
    Wrote file afiedt.buf
      1  create or replace trigger trig_a
      2  before insert on a
      3  for each row
      4  declare
      5    v_cnt NUMBER;
      6  begin
      7    select count(*) into v_cnt from a;
      8    if v_cnt >= 5 then
      9      insert_b(:new.x);
    10      raise_application_error(-20500, 'Limit exceeed.  Inserted to B instead');
    11    end if;
    12* end;
    13  /
    Trigger created.
    SQL> insert into a values (1);
    1 row created.
    SQL> insert into a values (2);
    1 row created.
    SQL> insert into a values (3);
    1 row created.
    SQL> insert into a values (4);
    1 row created.
    SQL> insert into a values (5);
    1 row created.
    SQL> insert into a values (6);
    insert into a values (6)
    ERROR at line 1:
    ORA-20500: Limit exceeed.  Inserted to B instead
    ORA-06512: at "SCOTT.TRIG_A", line 7
    ORA-04088: error during execution of trigger 'SCOTT.TRIG_A'
    SQL> select * from a;
             X
             1
             2
             3
             4
             5
    SQL> select * from b;
             X
             6
    SQL>

  • Help Importing objects from 1 user to another user and problem with trigger

    Hello community, i am having a little difficulty with the exporting objects from one user to another specifically the exporting of the trigger.
    Here is the situation, because of SOX purpose whenever a update is sent to the client the dba have to execute the script as himself (priviliged user) and is not allowed to log into the schema to make changes. Therefore we perpend the object definitions with &user_schema.. and they define user_schema in sqlplus and execute the update script.
    Here is a small example which requires two users (user1 and user2) with the following grants (connect, create table, create trigger, create view, create sequence). Please forgive the naming of the objects, just trying to be as simple as possible.
    I start out by logging in as system user via sqlplus and execute the following.
    ------------------Begin sqlplus----------------------
    define user_schema=user1;
    create table &user_schema..abc01 (
      col1 number,
      col2 varchar2(20),
      col3 number,
      constraint pk_abc01_col1 primary key (col1)
    create table &user_schema..xyz01 (
      col1 number,
      col2 varchar2(20),
      col3 number,
      constraint pk_xyz01_col1 primary key (col1)
    create or replace view &user_schema..view1 as
    select x.col1, x.col2, x.col3, a.col1 as acol1, a.col2 as acol2, a.col3 as acol3
    from xyz01 x
    inner join abc01 a on a.col1 = x.col1;
    create sequence &user_schema..seq_xyz01 start with 1 increment by 1;
    create or replace trigger &user_schema..trig01
    before insert on &user_schema..xyz01 for each row
    begin
      if (nvl(:new.col1, -1) = -1) then
        select seq_xyz01.nextval into :new.col1 from dual;
      end if;
    end;
    /--------------------End sqlplus----------------------
    I would then proceed to export using the exp utility via the command line
    exp system/systempassword file=user1.dmp owner=user1
    Then import user1 objects into user2
    imp system/systempassword file=user1.dmp fromuser=user1 touser=user2
    Now the problem:
    When i take a look at the sql for user2 trigger (trig01) i see the following (viewed via sqldeveloper)
    create or replace TRIGGER "USER2".trig01
    before insert on user1.xyz01 for each row
    begin
      if (nvl(:new.col1, -1) = -1) then
        select seq_xyz01.nextval into :new.col1 from dual;
      end if;
    end;its referring to user1.xyz01 table, however i want it to point to is user2.xyz01 table. Can someone please help me out or offer another solution to go about this because i need the ability to import the objects into a different user without the import failing and having to recompile the object.
    I've also tried executing this while connected as system user via sqlplus:
    define user_schema=user1
    create or replace trigger &user_schema..trig01
    before insert on xyz01 for each row
    begin
      if (nvl(:new.col1, -1) = -1) then
        select seq_xyz01.nextval into :new.col1 from dual;
      end if;
    end;
    /but that fails stating that table or view does not exist, please help
    however that fails because i
    Edited by: user3868150 on Nov 6, 2009 6:05 PM

    When performing an update in their system, the same script will be run with different values, thats not the problem.
    The client currently have just that one schema in their environment, however they want to have another instance of the application set up in their environment (same database) and have that go off on its own track separate from the original application.
    Now when we do an exp of the schema and the imp it into another user it get imported, however its incorrect. As stated before the trigger will be acting on the table in the original schema when it should be acting on the table in the newly imported schema.
    I suppose there is no other way around this when a trigger is created the way in which i outlined above. I guess after the data gets imported into a different user the trigger would have to be recompiled to point to the correct table.
    If you have an alternate solution to go about this i am open to suggestions. However like i mentioned in the original post because of SOX purpose the dba is not allowed to log in and execute update scripts as the schema user. The scripts should only be executed as that privileged user (dba).
    Also if i hard code the user when the trigger is created
    create or replace trigger user1.trig01
    before insert on user1.xyz01 for each row
    begin
    if (nvl(:new.col1, -1) = -1) then
    select seq_xyz01.nextval into :new.col1 from dual;
    end if;
    end;
    /it still doesn't get imported the way that i want it to be imported in user2
    create or replace TRIGGER "USER2".trig01
    before insert on user1.xyz01 for each row
    begin
      if (nvl(:new.col1, -1) = -1) then
        select seq_xyz01.nextval into :new.col1 from dual;
      end if;
    end;now when i do an insert to test
    insert into user1.xyz01 (col2, col3) values ('abc', 123); -- Works fine, no problems here
    insert into user2.xyz01 (col2, col3) values ('abc', 123);Results in an error ORA-01400: cannot insert NULL into ("USER2".XYZ01"."COL1") because the trigger doesn't exist on user2.xyz01 table.
    Just try and create the schema like how i outlined above in your environment to see what i'm talking about. It seems that the only way to get the trigger to be imported the way i want it to is to actually log in as that user and create the trigger.
    sqlplus user1/user1
    {code}
    create or replace trigger trig01
    before insert on xyz01 for each row
    begin
    if (nvl(:new.col1, -1) = -1) then
    select seq_xyz01.nextval into :new.col1 from dual;
    end if;
    end;
    {code}
    Edited by: user3868150 on Nov 6, 2009 6:10 PM

  • 2.1EA2 - Still problems with trigger text tab on table panel

    I'm currently running SQLDeveloper 2.1 EA2 and I'm experiencing problems to display text of tables triggers.
    In fact I have found that file displaying this text has an mistake : It's assumed that trigger owner is the same as table owner.
    In file oracle/dbtools/raptor/oviewer/base/xml/tables.xml of extension oracle.sqldeveloper.oviewer.jar version11.1.1.63.10.
    This file contains an section dedicated to triggers :
    select dt.trigger_NAME, dt.trigger_type, dt.triggering_Event, dt.status, :OBJECT_OWNER sdev_link_owner,
    dt.trigger_NAME sdev_link_name,'TRIGGER' sdev_link_type
    from DBA_triggers dt
    where dt.table_owner = :OBJECT_OWNER
    and dt.table_name = :OBJECT_NAME;
    And the source part :
    select text sql
    from dba_source
    where name=:TRIGGER_NAME
    and owner=:OBJECT_OWNER;
    I Think the glitches is the owner=:OBJECT_OWNER.
    I made some tests by replacing the table.xml in archive (I know it's hugly). My modifications are :
    1) add an trigger_owner column in firsts selects
    2) use :TRIGGER_OWNER instead of :OBJECT_OWNER
    This seems to solve problems.
    I don't know how to report this as a bug, bu I hope that someone of the devel team will push it forward to solve the problem on 2.1 final.

    It's there; it's just very small. Consider either giving it some rows or column int values or a preferred size, or putting it in a JScrollPane with a preferredSize set.
    another thought is to use a BorderLayout for the whole thing, and place the JScrollPane/JTextArea BorderLayout.CENTER, put the JTextField and JLabels in a JPanel using GridBag and placing this into the main BorderLayout.NORTH, and placing the buttons into their own panel which is added to the main BorderLayout.SOUTH.
    Edited by: Encephalopathic on Sep 24, 2008 9:51 AM

  • Problem with multi row delete

    Hi, I'm new in apex and I tried to build master detail report on some view. Everything is cool but "delete checked" doesn't work.
    "ORA-20001: Error in multi row delete operation: row= , ORA-06502: PL/SQL: numeric or value error: NULL index table key value,"
    the problem is that I don't know what is wrong :), I have a special trigger "instead of delete on MY_VIEW", but in this error problem is not explained.
    Anybody knows what can be wrong? It is probably a problem with trigger or multi row doesn't work with views? I couldn't find how MRD knows what kind of statement use to delete rows so I don't know if the statement that program used is correct. In debug it lokks that:
    0.32: ...Do not run process "ApplyMRU", process point=AFTER_SUBMIT, condition type=REQUEST_IN_CONDITION, when button pressed=
    0.32: ...Process "ApplyMRD": MULTI_ROW_DELETE (AFTER_SUBMIT) #OWNER#:MY_VIEW:ITEM1:ITEM2
    0.33: Show ERROR page...
    0.33: Performing rollback...
    thanks for any help
    //sorry for english mistakes
    edit: it doesn't matter if I use in trigger delete from ... where item1=:OLD.item1 ; or if I use item1=:P4_item1 (which actually saves correct values)
    Edited by: user5931224 on 2009-06-13 08:55

    I realised that this is not a problem with trigger, I changed trigger to "NULL;" and problem is the same. Maybe sb used master detail on view not only on tables and know what can be wrong in this situation?

  • I'm having an intermittent problem with my midi controllers triggering Mainstage 3. I'm using a PreSonus Firebox audio interface. It's been working fine for months, but now when I first turn on the computer in the morning , I'm not able to trigger Ma

    I’m having an intermittent problem with my midi controllers triggering Mainstage 3.
    I’m using a PreSonus Firebox audio interface.
    It’s been working fine for months, but now when I first turn on the computer in the morning , I’m not able to trigger MainStage from the keyboard.  I tried different midi controllers, different keyboards, different midi cords, and check midi preferences.  The audio interface is working fine and is recogonized, but the midi doesn’twork.  I re-started the computer several times and then finally it miraculously starts working again.
      I’ve been having to this every day now.  Any help or ideas is very much appreciated.

    I Had the same problem with a FireStudio. Try unplugging the FireWire plug and the power plug. Wait for a few seconds, then plug both back in. The light on my FireStudio was flashing blue/red which means "not connecting." I did what I just described, and everything works again. Hope it works for you.

  • Problem with combination of ClobDomain and DB Trigger

    Hi all,
    I am using JDeveloper 10.1.2.0.0 (Build 1811), Oracle RDBMS 10.1.0.4.0
    I have a DB Table which contains a CLOB column. This column is mapped in the EntityObject with the java type ClobDomain. Insert, update and delete actions are handled correctly by BC4J. The problem is that the database trigger on the table always gives me an empty CLOB object instead of the correct data.
    PL/SQL trigger
    CREATE OR REPLACE TRIGGER SYNC_CLOB
    AFTER INSERT OR UPDATE OR DELETE ON MYTABLE
    FOR EACH ROW
    BEGIN
    IF (DELETING OR
    :NEW.clobcolumn IS NULL OR
    DBMS_LOB.GETLENGTH(:NEW.clobcolumn) = 0) THEN
    -- Delete record from sync table
    ELSE
    -- Insert/Update record in sync table
    END IF;
    END;
    Scenario
    When I do an insert or update (in BC4J) that contains data for the clobcolumn, the clobcolumn is populated correctly, but the trigger always deletes the record in the sync table because the length of the CLOB is always zero. If I remove the condition DBMS_LOB.GETLENGTH(:NEW.clobcolumn) = 0 a empty CLOB is inserted/updated in the sync table.
    When I do an insert or update via SQL*Plus that contains data for the clobcolumn the trigger inserts/updates the correct CLOB value in the sync table.
    This leads me to the conclusion that there is a problem with the ClobDomain.
    Has this got something to do with the way the ClobDomain handles the dml operations (streaming to a LOB locator)?
    Can somebody help me?
    Thanks,
    Steven.

    Solved the problem by myself....

  • Problem with this trigger

    Hello, I am new to Oracle and I am having problems with this trigger:
    CREATE OR REPLACE TRIGGER myTrigger
    AFTER INSERT OR UPDATE OF aField ON myTable
    DECLARE
    myVariable NUMBER(2);
    BEGIN
    SELECT COUNT(keyColumn) INTO myVariable
    FROM myTable
    WHERE TO_CHAR(myTableDate,'mm') = (SELECT TO_CHAR(SYSDATE,'mm') FROM DUAL);
    IF myVariable > 4 THEN
    RAISE_APPLICATION_ERROR(20605, 'Here is an error.')
    END IF;
    END;
    Every time the trigger is executed, this error happens:
    ORA-06502: PL/SQL: numeric or value error: number precision too large
    ORA-06512: at line 10
    How do I resolve this problem?
    Thank you.

    Hi,
    user12120979 wrote:
    Hello, I am new to Oracle and I am having problems with this trigger:
    CREATE OR REPLACE TRIGGER myTrigger
    AFTER INSERT OR UPDATE OF aField ON myTable
    DECLARE
    myVariable NUMBER(2);
    BEGIN
    SELECT COUNT(keyColumn) INTO myVariable
    FROM myTable
    WHERE TO_CHAR(myTableDate,'mm') = (SELECT TO_CHAR(SYSDATE,'mm') FROM DUAL);
    IF myVariable > 4 THEN
    RAISE_APPLICATION_ERROR(20605, 'Here is an error.')
    END IF;
    END;
    Every time the trigger is executed, this error happens:
    ORA-06502: PL/SQL: numeric or value error: number precision too large
    ORA-06512: at line 10
    How do I resolve this problem?
    Thank you.Are you sure the code you posted is what's actually running?
    I would expect the missing semicolon after:
    RAISE_APPLICATION_ERROR(20605, 'Here is an error.')to keep this from even compiling.
    Error numbers are supposed to be negative. That will cause a run-time error when you try to raise the error.
    This isn't actually an error, but there's rarely a need to use dual in PL/SQL.
    WHERE TO_CHAR(myTableDate,'mm') = (SELECT TO_CHAR(SYSDATE,'mm') FROM DUAL);can also be done this way:
    WHERE TO_CHAR(myTableDate,'mm') = TO_CHAR(SYSDATE,'mm');Actually, the condition above would work even outside of PL/SQL.

  • Problem with a trigger

    I have a problem with a very simple trigger:
    CREATE OR REPLACE TRIGGER contratos_factuali
    AFTER UPDATE OF descrip,fautori,origpeso,origdls,
    montopeso,montodls,aant,aact,fifiobserva,pedsap
    ON ulises.contratos
    FOR EACH ROW
    BEGIN
    UPDATE contratos SET factuali=TO_DATE(SYSDATE,'DD/MM/YYYY HH24:MI')
    WHERE ncontra=:NEW.ncontra;
    COMMIT;
    END;This trigger update the column 'factuali' of this table everytime any other column of this table is updated. But returns me an error:
    SQL> update contratos set montodls=1 where ncontra='ODPS-086/00';
    update contratos set montodls=1 where ncontra='ODPS-086/00'
    ERROR at line 1:
    ORA-04091: table ULISES.CONTRATOS is mutating, trigger/function may not see it
    ORA-06512: at "ULISES.CONTRATOS_FACTUALI", line 2
    ORA-04088: error during execution of trigger 'ULISES.CONTRATOS_FACTUALI'What's happening?

    (1) You cannot use DML to update the table on which the trigger is based. Think about it: your trigger fires on UPDATE so each time fires, it updates the table and fires again. This is what is known as mutation.
    What you should do is create a trigger that executes BEFORE the update and simply do
    :NEW.factuali := SYSDATE;
    If ncontra is not a unique column and you genuinely want all rows of the same value to have the same factuali timestamp, well, it's very difficult, indeed I don't think it can be done. You could try submitting a DBMS_JOB to do the update, passing in the factuali value as a parameter; that DBMS_JOB would have to disable the trigger before doing the update (to prevent the recursion) and then re-enable it afterwards. Which seems like a lot of work: are you sure your design is correct?
    (2) You don't need the commit statement: the triggere exectutes within the commit phase of the original update.
    HTH, APC

  • Problem with changes and visualization in the forms

    I have a problem with forms, the problem is the next, I do a modification in the database with a update or with form and in other station no visualized the change. The other station need close the form and open for visualize the modification.
    Why I have this problem

    I am not sure what you mean. Are you saying that after one form changes and commits data, it is not visible on the other user's screen?
    If that is the problem, unfortunately, that is the way Forms works. A form must re-query the data to see changes on the database. If your form must close and re-open, then you should create a trigger in your form to re-query the same data.
    I hope this helps.

  • Problem with Roles and Triggers

    I'm having a strange problem with Roles and Triggers in Oracle. It's a little difficult to describe, so bear with me...
    I'm trying to create a trigger that inserts records into a table belonging to a different user/owner. Of course, the owner of this trigger needs rights to insert records into this other table. I find that if I add these rights directly to the owner of the trigger, everything works okay and the trigger compiles successfully.
    However, if I first create a Role and grant the "insert" rights to it, and then assign this role to the owner of the trigger, the trigger does not compile successfully.
    To illustrate this, here's an example script. I'm using Oracle 10g Release 2...
    -- Clean up...
    DROP TABLE TestUser.TrigTable;
    DROP TABLE TestUser2.TestTable;
    DROP ROLE TestRole;
    DROP TRIGGER TestUser.TestTrigger;
    DROP USER TestUser CASCADE;
    DROP USER TestUser2 CASCADE;
    -- Create Users...
    CREATE USER TestUser IDENTIFIED BY password DEFAULT TABLESPACE "USERS" TEMPORARY TABLESPACE "TEMP" QUOTA UNLIMITED ON "USERS";
    CREATE USER TestUser2 IDENTIFIED BY password DEFAULT TABLESPACE "USERS" TEMPORARY TABLESPACE "TEMP" QUOTA UNLIMITED ON "USERS";
    CREATE TABLE TestUser.TrigTable (TestColumn VARCHAR2(40));
    CREATE TABLE TestUser2.TestTable (TestColumn VARCHAR2(40));
    -- Grant Insert rights on TestTable to TestRole...
    CREATE ROLE TestRole NOT IDENTIFIED;
    GRANT INSERT ON TestUser2.TestTable TO TestRole;
    -- Add TestRole to TestUser. TestUser should now have rights to INSERT on TestTable
    GRANT TestRole TO TestUser;
    ALTER USER TestUser DEFAULT ROLE ALL;
    -- Now, create the trigger. This compiles unsuccessfully...
    CREATE TRIGGER TestUser.TestTrigger AFTER INSERT ON TestUser.TrigTable
    BEGIN
    INSERT INTO TestUser2.TestTable (TestColumn) VALUES ('Test');
    END;
    When I do a "SHOW ERRORS;" after this, I get:
    SQL> show errors;
    Errors for TRIGGER TESTUSER.TESTTRIGGER:
    LINE/COL ERROR
    2/3 PL/SQL: SQL Statement ignored
    2/25 PL/SQL: ORA-00942: table or view does not exist
    SQL>
    As I said above, if I just add the Insert rights directly to TestUser, the trigger compiles perfectly. Does anyone know why this is happening?
    Thanks!
    Adrian

    Hi Raghu,
    If the insert rights exist only on TestRole, and TestRole is assigned to TestUser, I can do the INSERT statement you suggest with no problems if I just execute it from SQLPlus (logged in as TestUser).
    The question is, why does the same INSERT fail when it's inside the trigger?

  • Problem with BTE and FI-parking- no data from memory ID to ABAP

    Hi Experts,
    I have a scenario in Business Workflow where I want to catch the data(BKPF & BSEG) after SAP transaction processing - event is to change parked FI-document with FBV2. I´m trying to use BTE to receive the data after processing transaction.
    All BTE steps seems to be activated - because I can debug my functions when processing FBV2 - but I cannot reach any data into my coding after processing.
    I have created my project in BF24:
    ZXXX Testing: WF-memory ID
    I have also linked few FI-events to my BTE interface funtion in BF34:
    00001130 ZXXX ZXXX_FIPP_CHANGE_BTE
    00002213 ZXXX ZXXX_FIPP_CHANGE_BTE
    00002217 ZXXX ZXXX_FIPP_CHANGE_BTE
    My BTE function ZXXX_FIPP_CHANGE_BTE is as following:
    DATA: memid(15) VALUE 'ZXXX_2217'.
    *Initialize
    CLEAR: t_vbkpf,
    t_vbsegs.
    FREE MEMORY ID 'ZXXX_2217'.
    *Backtracking of BTE
    EXPORT t_vbkpf
    t_vbsegs
    TO MEMORY ID memid.
    ENDFUNCTION.
    I have also created funtion to call FBV2:
    data: memid(15) value 'ZXXX_2217'.
    CALL TRANSACTION 'FBV2'.
    *Import memory of BTE
    IMPORT t_vbkpf
    t_vbsegs
    FROM MEMORY ID memid.
    *Free memory id
    FREE MEMORY ID memid.  
    When I set a breakpoint to both of the functions and I execute FBV2 I reach the breakpoints. Problem is that the data is not passed from memid 'ZXXX_2217' into function after FBV2(this syntax: IMPORT t_vbkpf t_vbsegs FROM MEMORY ID memid.)
    What could be missing. So both functions are called but NO DATA is passed from memory ID to my internal tables? This seems to be a problem with memory ID´s. Also in my BTE function ZXXX_FIPP_CHANGE_BTE I receive a sy-subrc value 4 when executing syntax "FREE MEMORY ID 'ZXXX_2217'. ".
    All hints appreciated,
    Jani

    Hi Ramki,
    I must be frustrating You with these stupid questions... You have already supported me hugely to get more famailiar with BTE. For example not to commit in BTE etc. Big thanks for that!
    In all cases when I have tested my project in BF24 has been always active; and yes I have changed the pre. posted document always to trigger the BTE.
    I still have a problem. I copied all customizing and coding into other system - with same dissapointing results. Let me describe this once more:
    <b>My entry in BF24:</b>
    <i>Product:                 ZBE
    Text:                       Jani testing
    RFC destination:
    Active:   </i>               X
    <b>My entry in BF34:</b>
    <i>Event:                   00002214
    Product:                    ZBE
    Ctr:
    Appl:
    Function module:            ZBE_BTE</i>
    <b>My BTE function:</b>
    <i>  DATA: memid(15) VALUE 'ZBE_BTE2214'.
      DATA: t_vbkpf LIKE fvbkpf OCCURS 0 WITH HEADER LINE.
      FREE MEMORY ID memid.
      EXPORT t_vbkpf TO MEMORY ID memid.</i>
    <b>And the function ZBE_BTE_EXECUTE where I call FBV2:</b>
    <i>  DATA: memid(15) VALUE 'ZBE_BTE2214'.
      DATA: t_vbkpf LIKE fvbkpf OCCURS 0 WITH HEADER LINE.
      CALL TRANSACTION 'FBV2'.
      IMPORT t_vbkpf FROM MEMORY ID memid.
      FREE MEMORY ID memid.</i>
    When I process my function ZBE_BTE_EXECUTE - and I have added a breakpoint into ZBE_BTE - for FBV2 call <b>it does not reach the breakpoint</b> in ZBE_BTE at all! This occurs when using event linkage 00002214! And I do execute a real change to parked document.
    But if I change the entry in BF34 to be linked for event 00002217 or 00002218 process reaches my breakpoint in BTE function ZBE_BTE! But in these cases also, it does not import the data after transaction call in function ZBE_BTE_EXECUTE. When I continue debugging the coding in BTE function ZBE_BTE further into SAP-coding, I can see that my internal table t_vbkpf is filled. But when I leave SAP-coding when FBV2 is completed and return to ZBE_BTE_EXECUTE - where t_vbkpf should be filled from memory id - t_vbkpf is empty!
    Again as a conclusion in this system:
    For BTE event 00002214 this locig does not work at all. For events 00002217 and 00002218 it does get activated, but does not bring any data from memory ID into my abap. Strangest this is that I use absolutely same kind of coding that You.
    Can You see if I have to fill those empty fields( Ctr. & Appl.) in my BF34 customizing? Or is some other customizing action missing?
    Br,
    Jani

  • Problem with set_item_instance_property and set_lov_property

    Hello guys,
    I am using oracle forms 6i and new to it. I am having a multi data block.
    I am facing a problem when I try to set the item instance property with respect to the list type.
    1) Basically, I am having a list item having three types MANUAL, INVOICE and BOE. All are independent of each other. I am facing the problem with the MANUAL type.
    I have written this code on When-Validate-Trigger of the list item as well as When-List-Changed. Also I am not setting the properties of any items initially(neither on When-New-Form-Instance nor on When-New-Block-Instance).
    if block.doc_type = 'MANUAL' then
    set_item_instance_property('BLOCK.VENDOR_NO', to_number(:system.cursor_record), REQUIRED,PROPERTY_TRUE);
    end if;
    But I am getting this warning/error frm 41383 - no such property for set_item_instance_property on both the triggers for the first time when I open the form and thereafter. During the same form session, if I click on the next line it shows a message Field cannot be empty and directs to the item where I compulsory need to insert a value. I also tried using to_number(:system.trigger_record) but getting the same issue. There are many more items I need to set the same property for.
    2)The invoice item on the block/form has a LOV. Another requirement is when I select 'MANUAL' , that LOV should not appear on selection of 'MANUAL' type and the user should be able to insert the value manually and validate manually. I did use set_lov_property, but did not get the correct usage. Please assist as soon as you can.
    Edited by: 1005292 on May 20, 2013 12:04 PM

    Just out of my interest I would like to know what you exactly meant by "The :SYSTEM.CURSOR_RECORD reflects where the navigation cursor is; which could be different from the record that is initiating the event." in your reply.If you look at the Forms Help for both objects, you will see that...
    SYSTEM.CURSOR_RECORD represents the number of the record where the cursor is located. This number represents the record's current physical order in the block's list of records. The value is always a character string.
    SYSTEM.TRIGGER_RECORD represents the number of the record that Form Builder is processing. This number represents the record's current physical order in the block's list of records. The value is always a character string. Through PL/SQL you can send (using the GO_ITEM, GO_BLOCK and GO_RECORD built-ins) the interenal Forms Cursor to a different item, block or record within the current block. If, you GO to a different block or record in the same body of code and you then evaluated the :SYSTEM.CURSOR_RECORD and compared it with the :SYSTEM.TRIGGER_RECORD you would find that they are generally different.
    2) In response to the second one, do you want to say that when it I select MANUAL I do not use the set_item_property OR use this property and attach an LOV which does not return anything OR use this property, give the name of the same of the same LOV,I am using and set PROPERTY_FALSE. First a litte back ground. When an Item has an LOV assigned to it, Oracle Forms automatically displays what it calls the "LOV List Lamp" in the status bar. With Forms 9i and higher, it displays and "List of Valu..." in the status bar when an item has an LOV assigned to it. Items can have an LOV assigned during design-time or during run-time. You cannot, however, unassign an LOV during Run-time becuase the SET_ITEM_PROPERTY built-in requires you to pass a valid LOV object name.
    Well, as I was writing this, it occured to me that you will not be able to set the LOV assigned to your multi-row item at run-time either because once you assign an LOV to an item in a multi-row block, all occurances of the Item will have the LOV assigned. This being the case, I would recommend using a button and give it the appearance of enabled or disabled by using the VISUAL_ATTRIBUTE property and add code to the button so that if the row status is MANUAL then nothing happens. Using this method, you would create two Visual Attribute (VA) objects; ENABLED and DISABLED. The ENABLED VA would make the button look like a normal button while the DISABLED VA would make the button look like it is disabled (grey out button text, etc).
    I would also like to know when to use set_lov_property and if you could explain in brief with an example.The only time I have used the SET_LOV_PROPERTY() built-in is when I needed to change the Record Group query assigned to the LOV. We have a form where depending on the "Action" selected, the LOV for a certain item needed to change. The values returned by the LOV were still assigned to the same block items, so rather than create multiple LOVs and set the Column Mapping for each LOV, I just create a Record Group object for each action and then used the SET_LOV_PROPERTY() built-in to change the LOV TITLE and GROUP_NAME. This way, I was able to reuse the LOV and it's existing column mappings while changing the record group that provided the data for the LOV.
    The problem lies when I am entering the fields after the invoice number. The fields before the invoice no including the field of invoice no hold the value entered but when I click/press a tab key to go on to the next field the values in the earlier fields(i.e fields before invoice no and invoice no field) disappear i.e. the values do not hold their place and again prompts me from start to enter the vendor no.Are you navigating to a new row/record? That could explain the disappearing data. If not, then I would look for a trigger on the item you're navigating too or for a Block level When-New-Item-Instance trigger that has code that sets the items to null. It sounds like something in the design is causing the field values to disappear (get set to NULL) so I would look at what happens in your form when a navigation event occurs.
    @Andreas - actually, REQUIRED is a valid property for the Set-Item-Instance-Property() built-in. ;)
    Hope this helps,
    Craig...

Maybe you are looking for