Trigger call procedure - Commit not allow

Hi all,</p>
<p style="margin-top: 0; margin-bottom: 0">I need help.</p>
<p style="margin-top: 0; margin-bottom: 0"> </p>
<p style="margin-top: 0; margin-bottom: 0">I have One table name</font><font FACE="Courier" SIZE="2" COLOR="#0000ff">
<font FACE="Courier" SIZE="2" COLOR="#808000">EVENTS. </font></font>
<font FACE="Courier" SIZE="2">I have create two trigger on that table. </p>
<p style="margin-top: 0; margin-bottom: 0">Trigger 1 is to add a running number
to events table into "id" column.</p>
<p style="margin-top: 0; margin-bottom: 0">Trigger 2 is to pass that running
number in to other procedure after the new row in events complete fill in
database.</p>
<p style="margin-top: 0; margin-bottom: 0"> </p>
<p style="margin-top: 0; margin-bottom: 0">The error is : Commit not allow in
trigger.</p>
<p style="margin-top: 0; margin-bottom: 0">The commit is only on my procedure.
How i want to make it run? Help me.</p>
</font><font FACE="Courier" SIZE="2" COLOR="#0000ff">
<p style="margin-top: 0; margin-bottom: 0"> </p>
<p style="margin-top: 0; margin-bottom: 0"> </p>
<p style="margin-top: 0; margin-bottom: 0"> </p>
</font><font FACE="Courier" SIZE="2" color="#FF0000">
<p style="margin-top: 0; margin-bottom: 0"><b>TRIGGER 1</b></p>
</font><font FACE="Courier" SIZE="2" COLOR="#0000ff">
<p style="margin-top: 0; margin-bottom: 0">CREATE<font FACE="Courier" SIZE="2">
</font>OR<font FACE="Courier" SIZE="2"> </font>REPLACE<font FACE="Courier" SIZE="2">
</font>TRIGGER<font FACE="Courier" SIZE="2"> AUTONUM_EVENTS_ID1</p>
</font>
<p style="margin-top: 0; margin-bottom: 0">BEFORE<font FACE="Courier" SIZE="2">
</font>INSERT</p>
<p style="margin-top: 0; margin-bottom: 0">ON<font FACE="Courier" SIZE="2">
</font><font FACE="Courier" SIZE="2" COLOR="#808000">EVENTS</font></p>
<p style="margin-top: 0; margin-bottom: 0">REFERENCING<font FACE="Courier" SIZE="2">
</font>NEW<font FACE="Courier" SIZE="2"> </font>AS<font FACE="Courier" SIZE="2">
</font>NEW<font FACE="Courier" SIZE="2"> </font>OLD<font FACE="Courier" SIZE="2">
</font>AS<font FACE="Courier" SIZE="2"> </font>OLD</p>
<p style="margin-top: 0; margin-bottom: 0">FOR<font FACE="Courier" SIZE="2">
</font>EACH<font FACE="Courier" SIZE="2"> </font>ROW</p>
<p style="margin-top: 0; margin-bottom: 0">begin</p>
<p style="margin-top: 0; margin-bottom: 0">    select<font FACE="Courier" SIZE="2">
EVENTS_ID_SEQ</font>.nextval<font FACE="Courier" SIZE="2"> </font>into<font FACE="Courier" SIZE="2">
</font>:new.ID<font FACE="Courier" SIZE="2"> </font>from<font FACE="Courier" SIZE="2">
dual</font>;</p>
<p style="margin-top: 0; margin-bottom: 0">end;</p>
<p style="margin-top: 0; margin-bottom: 0">/</p>
<p style="margin-top: 0; margin-bottom: 0"> </p>
<p style="margin-top: 0; margin-bottom: 0">
<font FACE="Courier" SIZE="2" color="#FF0000"><b>TRIGGER 2</b></font></p>
<p style="margin-top: 0; margin-bottom: 0">CREATE</font><font FACE="Courier" SIZE="2">
</font><font FACE="Courier" SIZE="2" COLOR="#0000ff">OR</font><font FACE="Courier" SIZE="2">
</font><font FACE="Courier" SIZE="2" COLOR="#0000ff">REPLACE</font><font FACE="Courier" SIZE="2">
</font><font FACE="Courier" SIZE="2" COLOR="#0000ff">TRIGGER</font><font FACE="Courier" SIZE="2">
PROCESSINFO</p>
</font><font FACE="Courier" SIZE="2" COLOR="#0000ff">
<p style="margin-top: 0; margin-bottom: 0">AFTER</font><font FACE="Courier" SIZE="2">
</font><font FACE="Courier" SIZE="2" COLOR="#0000ff">INSERT</p>
<p style="margin-top: 0; margin-bottom: 0">ON</font><font FACE="Courier" SIZE="2">
</font><font FACE="Courier" SIZE="2" COLOR="#808000">EVENTS</font></p>
<font FACE="Courier" SIZE="2" COLOR="#0000ff">
<p style="margin-top: 0; margin-bottom: 0">REFERENCING</font><font FACE="Courier" SIZE="2">
</font><font FACE="Courier" SIZE="2" COLOR="#0000ff">NEW</font><font FACE="Courier" SIZE="2">
</font><font FACE="Courier" SIZE="2" COLOR="#0000ff">AS</font><font FACE="Courier" SIZE="2">
</font><font FACE="Courier" SIZE="2" COLOR="#0000ff">NEW</font><font FACE="Courier" SIZE="2">
</font><font FACE="Courier" SIZE="2" COLOR="#0000ff">OLD</font><font FACE="Courier" SIZE="2">
</font><font FACE="Courier" SIZE="2" COLOR="#0000ff">AS</font><font FACE="Courier" SIZE="2">
</font><font FACE="Courier" SIZE="2" COLOR="#0000ff">OLD</p>
<p style="margin-top: 0; margin-bottom: 0">FOR</font><font FACE="Courier" SIZE="2">
</font><font FACE="Courier" SIZE="2" COLOR="#0000ff">EACH</font><font FACE="Courier" SIZE="2">
</font><font FACE="Courier" SIZE="2" COLOR="#0000ff">ROW</p>
<p style="margin-top: 0; margin-bottom: 0">DECLARE</p>
</font><font FACE="Courier" SIZE="2" COLOR="#0000ff">
<p style="margin-top: 0; margin-bottom: 0">BEGIN</p>
</font><font FACE="Courier" SIZE="2">
<p style="margin-top: 0; margin-bottom: 0"></font>
<font FACE="Courier" SIZE="2" COLOR="#808000">    UpdateInfo</font><font FACE="Courier" SIZE="2" COLOR="#0000ff">(:new.ID);</p>
</font><font FACE="Courier" SIZE="2">
<p style="margin-top: 0; margin-bottom: 0"></font>
<font FACE="Courier" SIZE="2" COLOR="#0000ff">EXCEPTION</p>
</font><font FACE="Courier" SIZE="2">
<p style="margin-top: 0; margin-bottom: 0"></font>
<font FACE="Courier" SIZE="2" COLOR="#0000ff">WHEN</font><font FACE="Courier" SIZE="2">
</font><font FACE="Courier" SIZE="2" COLOR="#ff0000">OTHERS</font><font FACE="Courier" SIZE="2">
</font><font FACE="Courier" SIZE="2" COLOR="#0000ff">THEN</p>
</font><font FACE="Courier" SIZE="2">
<p style="margin-top: 0; margin-bottom: 0"></font>
<font FACE="Courier" SIZE="2" COLOR="#008000"><i>-- Consider logging the error
and then re-raise</p>
</i></font><font FACE="Courier" SIZE="2">
<p style="margin-top: 0; margin-bottom: 0"></font>
<font FACE="Courier" SIZE="2" COLOR="#0000ff">RAISE;</p>
<p style="margin-top: 0; margin-bottom: 0">END</font><font FACE="Courier" SIZE="2">
PROCESSINFO</font><font FACE="Courier" SIZE="2" COLOR="#0000ff">;</p>
<p style="margin-top: 0; margin-bottom: 0">/</p>
</font>

Because of the following :
Restrictions on Trigger Implementation The implementation of a trigger is subject to the following restrictions:
      The PL/SQL block of a trigger cannot contain transaction control SQL statements (COMMIT, ROLLBACK, SAVEPOINT, and SET CONSTRAINT) if the block is executed within the same transaction.If you really want to do a commit then search for autonomous transaction.
Hope that helps
Regards
Raj

Similar Messages

  • Statement "CALL SCREEN" is not allowed in this form.

    Hi,
    Could anyone identify the short dump.
    Statement "CALL SCREEN" is not allowed in this form.
    There is probably an error in the program
    "SAPLKKBL".
    This program is triggered in the update task. There, the
    following ABAP/4 statements are not allowed:
    -  CALL SCREEN
    -  CALL DIALOG
    -  CALL TRANSACTION
    -  SUBMIT
    Error in
    "POSTING_ILLEGAL_STATEMENT" " "
    "SAPLKKBL" or "LKKBLU01"
    "K_KKB_LIST_DISPLAY"
    Regards
    Manohar S

    Short text
    Statement "CALL SCREEN" is not allowed in this form.
    What happened?
    Error in the ABAP Application Program
    The current ABAP program "SAPLKKBL" had to be terminated because it has
    come across a statement that unfortunately cannot be executed.
    What can you do?
    Note down which actions and inputs caused the error.
    To process the problem further, contact you SAP system
    administrator.
    Using Transaction ST22 for ABAP Dump Analysis, you can look
    at and manage termination messages, and you can also
    keep them for a long time.
    Error analysis
    There is probably an error in the program
    "SAPLKKBL".
    This program is triggered in the update task. There, the
    following ABAP/4 statements are not allowed:
    -  CALL SCREEN
    -  CALL DIALOG
    -  CALL TRANSACTION
    |    -  SUBMIT       
    Information on where terminated
    Termination occurred in the ABAP program "SAPLKKBL" - in "K_KKB_LIST_DISPLAY".
    The main program was "RSM13000 ".
    In the source code you have the termination point in line 441
    of the (Include) program "LKKBLU01".
    |    The program "SAPLKKBL" was started in the update system.    
    This is the dump

  • Statement "CALL TRANSACTION" is not allowed in this form.

    Hi
    I have a form in which i want to call a transaction:
      CALL TRANSACTION 'VL32N'  USING bdc_tab
                                                       MODE    'E'
                                                       UPDATE  'S'
                                                       MESSAGES INTO mestab.
    I call this report from within a message and when reaching this statement it fails.
    Now i get this error in ST22:
    POSTING_ILLEGAL_STATEMENT
    Statement "CALL TRANSACTION" is not allowed in this form.
    and afterwards this error:
    DYNPRO_SEND_IN_BACKGROUND
    Screen output without connection to user.
    As i read,it is not allowed to call this kind of statement from within a form and we should use something like:
    RECEIVE RESULTS FROM FUNCTION but i do not know how because i have never before used such call statements.
    thanks

    Hi,
    The bdc table is filled correctly but the CALL TRANSACTION is not alllowed.I think it is because of the call from the Form ENTRY which is called when issuing an message from my transaction.I have read that it is not allowed to have any call transaction,submit or any other statements like these in a function call,and i think that my form ENTRY is seen as a sort of function module.
    Any other opinions?
    With my "call transaction" statement i wanted to open the VL32N Transaction and post a goods receipt.Is there any other way to do this?
    I get this message in the ST22 Transaction:
    This program is triggered in the update task. There, the   
    following ABAP/4 statements are not allowed:                                                                               
    -  CALL SCREEN                                             
    -  CALL DIALOG                                             
    -  CALL TRANSACTION                                        
    -  SUBMIT                                                  
    But i do not know what is ment by update task.All i use are some "export to memory"  statements and this is all.
    Any ideas?
    thanks.
    Edited by: seba seba on Jul 28, 2009 11:22 AM

  • Commit not allowed in Trigger  then how to store the values in table

    Hi,
    Database trigger not allowed to COMMIT in it (directly) or in procedure which is calling from the Trigger. it gives error.
    so my question is:-
    1)How Database internally store the INSERT AND UPDATE value in table which is written in procedure without COMMIT?
    2) Is it necessary to write COMMIT in procedure using PRAGAMA AUTONOMOUS TRANSACTION to store inserted or updated value in table?
    Thanks in advance.

    Hi,
    A trigger is designed to be a part of a transaction, not it's end.
    It is like following these steps (not really accurate, but should give an idea):
    1. programA issues INSERT statement on tableA
    2. 'control' goes over to the database
    3. constraint checks happen
    4. the associated triggers on tableA do their work (e.g. fetching a sequence value for a primary key)
    5. 'control' goes back to programA
    6. programA decides if a commit (no error occurred) or a rollback (error case) has to be issued.
    Did this help? Probably not, I'm not happy with what I wrote, but anyway... :)

  • Service Call - Removing activites not allowed

    Hi
    When i am updating the Service Call follwing error is showing.....
    Removing Activities is not allowed in Service Call.
    Any suggestion??
    Regards
    Mohit Gupta

    Hello,
    based on SAP standard, you cannot delete it but you can mark them as:
    1. Inactive – Activity no longer appears in reports and your calendar. The activity remains in the database and you can reactivate it.
    2. Closed – Activity remains in reports and your calendar, but cannot be reopened or modified.
    So, do one of the steps above before updating the service calls.
    Rgds,

  • Trigger calling procedure, then commit problems

    I am new to this so please forgive my stupidity!
    I have a trigger:
    CREATE OR REPLACE TRIGGER live_account_trigger
       AFTER INSERT
       ON sforce_live_test
       FOR EACH ROW
    BEGIN
       mapsapp.live_account_upsert;
    END live_account_trigger;
    /which calls a procedure:
    CREATE OR REPLACE PROCEDURE live_account_upsert
    AS
       l_page   LONG;
       l_url    VARCHAR2 (1000) := 'http://sfdc-db-d1/~msimonds/live_upsert.php';
    BEGIN
       --COMMIT;
       l_page := UTL_HTTP.request (l_url);
    END;
    /which invokes UTL_HTTP. What this process is supposed to do is set off a trigger to run the script in the procedure which simply inserts new records which are input into the table. Now if I do the following as a test:
    insert into sforce_live_test (customer_name, schedule_id) values ('Fox and the Hound', 8020);
    to kick off the trigger, the information is placed into the table and the script runs (it emails me to tell me it has processed) but the new data is not being sent to salesforce. It seems that it does not perform a COMMIT, becuase if I run the script via my web browser, it runs just fine after I run the script
    What can I do to place a COMMIT into the procedure, because I get an error if I place it on

    Okay that is a little beyond my knowledge at current time, i guess I need to do some research.
    Maybe I need to explain what I am trying to accomplish and you could tell me if the JOB is the best solution before I continue:
    We have an internal sales system which has all our major clients on it. New accounts are created and old accounts are updated from this internal system. Currently there is a view that is updated once every 24 hours from one Oracle DB to my instance of Oracle. I have a series of PHP account scripts that are set on CRON jobs that run once a week to send the new accounts and updated accounts to our instance of Salesforce.com over their API using SOAP
    I created a staging table and the trigger which kicks off once an insert (for now, testing) into the staging table and then the UTL_HTTP to kick off a new account PHP script to send that transaction straight into salesforce. Kind of a live update instead of running the weekly CRON jobs
    So I created this trigger (changed it since then to incorporate the procedure also):
    CREATE OR REPLACE TRIGGER MAPSDATA.live_account_trigger
       AFTER INSERT
       ON sforce_live_test
       FOR EACH ROW
    DECLARE
       l_page   LONG;
       l_url    VARCHAR2 (1000) := 'http://sfdc-db-d1/~msimonds/live_upsert.php';
    BEGIN
       l_page := UTL_HTTP.request (l_url);
    END live_account_trigger;
    /But if I do a test by simply doing something like this:
    insert into sforce_live_test (customer_name, schedule_id) values ('Fred Flinstone', 9060); to kick off the trigger (Mask/Test the creation of a new account), it does not pick up Fred Flinstone when the UTL_HTTP runs, it only updates the current records which are in the table prior to the test insert above.

  • Recursive call with commit not written to redo log

    In my DBA training I was led to the belief that a commit caused the log writer to write the redo log buffer to the redo log file, but I find this is not true if the commit is inside recursive code.
    I believe this is intentional as a way off reducing i/o but it does raise data integrity problems.
    Apparently if you have some PL/SQL (can be sql*plus code or procedure) with a loop containing a commit,
    the commit does not actually ensure that the transaction is written to the Redo log.
    Instead Oracle only ensures all is written to the redo log when control is returned to the application/sqlplus.
    You can see this by checking the redo writes in v$sysstat.
    It will be less than the number of expected commits.
    Thus the old rule of expecting all committed transation to be there after a database recovery is not necessarily true.
    Does anyone know how to force the commit to ensure redo is written
    -inside pl/sql or perhaps a setting in the the calling environment ?
    Thanks

    Thanks for your input
    The trouble is that I believe if you stopped in a debugger the log writer would catch up -
    Or if you killed your instance in the middle of this test you wouldn't be sure how many commits the db thought it did
    ie. the db would recover to the last known commit in the redo logs
    - maybe I should turn on tracing ?
    Since my question I have a found a site that seems to back up the results I am getting
    http://www.ixora.com.au/notes/redo_write_triggers.htm
    see the note under point 3
    Have a look at the stats below and you will see
    redo writes 19026
    user commits 100057
    How I actually tested was to run
    the utlbstat scipt
    then run some pl/sql that
    - mimiced a business transactions (4 select lookup validations, 2 inserts and 1 insert or update and a commit)
    - loop * 100000
    then ran utlestat.sql
    i.e. test script
    @C:\oracle\ora92\rdbms\admin\utlbstat.sql
    connect test/test
    @c:\mig\Load_test.sql
    @C:\oracle\ora92\rdbms\admin\utlestat.sql
    Statistic Total Per Transact Per Logon Per Second
    CPU used by this session 37433 .37 935.83 79.31
    CPU used when call started 37434 .37 935.85 79.31
    CR blocks created 62 0 1.55 .13
    DBWR checkpoint buffers wri 37992 .38 949.8 80.49
    DBWR checkpoints 6 0 .15 .01
    DBWR transaction table writ 470 0 11.75 1
    DBWR undo block writes 22627 .23 565.68 47.94
    SQL*Net roundtrips to/from 4875 .05 121.88 10.33
    background checkpoints comp 5 0 .13 .01
    background checkpoints star 6 0 .15 .01
    background timeouts 547 .01 13.68 1.16
    branch node splits 4 0 .1 .01
    buffer is not pinned count 4217 .04 105.43 8.93
    buffer is pinned count 649 .01 16.23 1.38
    bytes received via SQL*Net 1027466 10.27 25686.65 2176.83
    bytes sent via SQL*Net to c 5237709 52.35 130942.73 11096.84
    calls to get snapshot scn: 1514482 15.14 37862.05 3208.65
    calls to kcmgas 303700 3.04 7592.5 643.43
    calls to kcmgcs 215 0 5.38 .46
    change write time 4419 .04 110.48 9.36
    cleanout - number of ktugct 1875 .02 46.88 3.97
    cluster key scan block gets 101 0 2.53 .21
    cluster key scans 49 0 1.23 .1
    commit cleanout failures: b 27 0 .68 .06
    commit cleanouts 1305175 13.04 32629.38 2765.2
    commit cleanouts successful 1305148 13.04 32628.7 2765.14
    commit txn count during cle 3718 .04 92.95 7.88
    consistent changes 752 .01 18.8 1.59
    consistent gets 1514852 15.14 37871.3 3209.43
    consistent gets - examinati 1005941 10.05 25148.53 2131.23
    data blocks consistent read 752 .01 18.8 1.59
    db block changes 3465329 34.63 86633.23 7341.8
    db block gets 3589136 35.87 89728.4 7604.1
    deferred (CURRENT) block cl 1068723 10.68 26718.08 2264.24
    enqueue releases 805858 8.05 20146.45 1707.33
    enqueue requests 805852 8.05 20146.3 1707.31
    execute count 1004701 10.04 25117.53 2128.6
    free buffer requested 36371 .36 909.28 77.06
    hot buffers moved to head o 3801 .04 95.03 8.05
    immediate (CURRENT) block c 3894 .04 97.35 8.25
    index fast full scans (full 448 0 11.2 .95
    index fetch by key 201128 2.01 5028.2 426.12
    index scans kdiixs1 501268 5.01 12531.7 1062.01
    leaf node splits 1750 .02 43.75 3.71
    logons cumulative 2 0 .05 0
    messages received 19465 .19 486.63 41.24
    messages sent 19465 .19 486.63 41.24
    no work - consistent read g 3420 .03 85.5 7.25
    opened cursors cumulative 201103 2.01 5027.58 426.07
    opened cursors current -3 0 -.08 -.01
    parse count (hard) 4 0 .1 .01
    parse count (total) 201103 2.01 5027.58 426.07
    parse time cpu 2069 .02 51.73 4.38
    parse time elapsed 2260 .02 56.5 4.79
    physical reads 6600 .07 165 13.98
    physical reads direct 75 0 1.88 .16
    physical writes 38067 .38 951.68 80.65
    physical writes direct 75 0 1.88 .16
    physical writes non checkpo 34966 .35 874.15 74.08
    prefetched blocks 2 0 .05 0
    process last non-idle time 1029203858 10286.18 25730096.45 2180516.65
    recursive calls 3703781 37.02 92594.53 7846.99
    recursive cpu usage 35210 .35 880.25 74.6
    redo blocks written 1112273 11.12 27806.83 2356.51
    redo buffer allocation retr 21 0 .53 .04
    redo entries 1843462 18.42 46086.55 3905.64
    redo log space requests 17 0 .43 .04
    redo log space wait time 313 0 7.83 .66
    redo size 546896692 5465.85 13672417.3 1158679.43
    redo synch time 677 .01 16.93 1.43
    redo synch writes 63 0 1.58 .13
    redo wastage 4630680 46.28 115767 9810.76
    redo write time 64354 .64 1608.85 136.34
    redo writer latching time 42 0 1.05 .09
    redo writes 19026 .19 475.65 40.31
    rollback changes - undo rec 10 0 .25 .02
    rollbacks only - consistent 122 0 3.05 .26
    rows fetched via callback 1040 .01 26 2.2
    session connect time 1029203858 10286.18 25730096.45 2180516.65
    session logical reads 5103988 51.01 127599.7 10813.53
    session pga memory -263960 -2.64 -6599 -559.24
    session pga memory max -788248 -7.88 -19706.2 -1670.02
    session uga memory -107904 -1.08 -2697.6 -228.61
    session uga memory max 153920 1.54 3848 326.1
    shared hash latch upgrades 501328 5.01 12533.2 1062.14
    sorts (memory) 1467 .01 36.68 3.11
    sorts (rows) 38796 .39 969.9 82.19
    switch current to new buffe 347 0 8.68 .74
    table fetch by rowid 1738 .02 43.45 3.68
    table scan blocks gotten 424 0 10.6 .9
    table scan rows gotten 4164 .04 104.1 8.82
    table scans (short tables) 451 0 11.28 .96
    transaction rollbacks 5 0 .13 .01
    user calls 5912 .06 147.8 12.53
    user commits 100057 1 2501.43 211.99
    user rollbacks 56 0 1.4 .12
    workarea executions - optim 1676 .02 41.9 3.55
    write clones created in bac 5 0 .13 .01
    write clones created in for 745 .01 18.63 1.58
    99 rows selected.

  • N8 outgoing calls NOT ALLOWED

    Hello,
    I have a problem, not always but sometimes when I unlock keypad on my phone /Iam using a password lock/ and I try to make a call it says NOT ALLOWED. The incoming calls works without problem only the outgoing calls are NOT ALLOWED. After switching off and on its working. Any solutions about this? Thanks a lot-

    Hi cryoy,
    Are you able to send and receive SMS messages with no problem? If so, could you also put your SIM into another phone just to check that it is not your SIM/operator dropping out.
    Report back here.
    haZey
    If you find this post helpful, a click upon the white star at bottom would always be appreciated.
    If it also solves your problem, clicking ACCEPT AS SOLUTION below it will benefit other users!

  • Ora-02089-COMMIT is not allowed in a subordinate session - V'urgent pls

    All,
    BPEL version: 11.1.1
    I have to invoke a pl/sql procedure which inserts a data to a table. After insert, I used commit. When BPEL try to invoke this procedure, I got ora-02089-COMMIT is not allowed in a subordinate session+. I know without commit in pl/sql, BPEL does the commit. But for a requirement, I've to explicitly use COMMIT inside the procedure. How do I go about in this case?
    Please advise.
    Thanks,
    Sen

    IMHO.... I personally do not like using XA data sources most of the time. I can only think of a few scenarios in all my implementation where I had to undo all the 50 steps (in which case they should be a single call anyway). Mixing and matching "pragma autonomous transaction" calls with DBAdapter updates on a XA data source in a single process have gotten me into tremendous trouble and data corruption.
    Also if you really have a case where you dont want to commit, I believe you can use the idempotent flag on partnerlinks to avoid the commit. There also might be cases where the PL/SQL defined as "pragma.." might be used by other non-BPEL stuff and you are just opening DB connections even when you dont need to.

  • Calling procedure from RPD. Error ORA-14552 as it has a commit.

    Hi All,
    I have implemented the calling of procedure functionality from rpd.
    But our data base procedure that is called has commit in it which I guess is not allowed & so we are getting this error.
    We need to commit once we finish off the procedure. Please suggest how we can achieve this.
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 16001] ODBC error state: S1000 code: 14552 message: [Oracle][ODBC][Ora]ORA-14552: cannot perform a DDL, commit or rollback inside a query or DML ORA-06512: at "DWH.DWH_PA_TC_ACCRUAL_PKG", line 1565 ORA-14551: cannot perform a DML operation inside a query ORA-06512: at "DWH.TRAILING_COST_FUNCTION", line 8. [nQSError: 16011] ODBC error occurred while executing SQLExtendedFetch to retrieve the results of a SQL statement. (HY000)
    Thanks.
    pankaj

    This is we are using from RPD to call the function:
    SELECT trailing_cost_function('USD', 'JUN-08', ' POC', '', 'DJRC46', '') AS RET_VAL
    FROM dual
    Now this is the structure of the function which is in back end db:
    CREATE OR REPLACE Function
    Trailing_Cost_Function(a IN varchar2,b IN varchar2,c IN varchar2,d IN varchar2,e IN varchar2,
    f IN varchar2) return
    varchar2 IS
    ret_o varchar2(50);
    begin
    test123; -- calling the procedure
    ret_o:='0';
    return ret_o;
    end;
    And the procedure is:
    create or replace procedure test123 is
    begin
    insert into test_123 values ('asssd');
    end test123;
    Thanks,
    Pankaj

  • FRM-40737: illegal restricted procedure COMMIT in POST-TEXT-ITEM trigger

    Hi All,
    I tried to execute an insert statement in a POST-TEXT-ITEM trigger and use commit to save data in the db but this error appeared:
    FRM-40737: illegal restricted procedure COMMIT in POST-TEXT-ITEM trigger
    How to solve it? OR how to save every text item value entered in the database?

    I don't fully understand, why you need to insert records on post-text-item, but the possible solution is:
    Write a DB procedure which does insert and commits it.
    Call this procedure in post-text-item.
    Problems will occur if your procedure is modifying the table columns, which are used in form. Form will notice that values in DB have changed and you will have "Record has been changed by another user. Please requery to see changes" error. But if records, affected by DB procedures, are not used in form, the wverything will be OK.

  • FRM-40737:illegal restricted procedure COMMIT in WHEN-VALID_RECORD trigger

    Hello,
    I added the following code in Custom.pll, Event procedure. When Internet Expenses responsibility is added to a user on the User form in System Administrator repsonsibility, his default account will be populated from costing. I received error, "FRM-40737:illegal restricted procedure COMMIT in WHEN-VALID_RECORD trigger",
    when enter Internet Expenses in the Responsibility field and tab. Even though the account was populated right, the responsibility is not able to save to the form.
    /* When the employee id given Internet Expense responsibility, create appropriate expense account for the employee from costing */
    if(event_name='WHEN-VALIDATE-RECORD') then
    if(form_name ='FNDSCAUS' and block_name ='USER_RESP') then
    p_responsibility_id := to_number(name_in('USER_RESP.RESPONSIBILITY_ID'));
    --p_responsibility_name := name_in('USER_RESP.RESPONSIBILITY_NAME');
    p_user_id := to_number(name_in('USER_RESP.USER_ID'));
    if (p_responsibility_id = 22918) then
    select employee_id
    into p_person_id
    from fnd_user
    where user_id = p_user_id;
    apps.cov_oie_pkg.update_emp_exp_act(p_person_id);
    commit;
    end if;
    end if;
    end if;
    Any suggestion will be highly appreciated!
    Yan

    You are calling 'COMMIT' after your custom package. You cannot use COMMIT in when-validate triggers. Did you try taking out COMMIT and save the record?

  • ORA-02089: COMMIT is not allowed in a subordinate session

    Here is my configuration.
    jdbc driver:10.2.0.3.0
    EJB-CMP
    Am using oracle.jdbc.xa.client.OracleXADataSource as the driver in my websphere application server 6.0.0.1.
    when i am calling a stored procedure from my EJB and in the stored procedure if
    i perform any DDL operation like truncate a table,create a table or commit it throws the exception:-
    ORA-02089: COMMIT is not allowed in a subordinate session
    please help me in solving this issue asap.

    hi umesh ,
    i had seen this link before ,
    My oracle version is 10g.still its giving the same error.
    In the link yoy send they say the problem is in oracle 9i driver and it is solved in 10g .The driver version is 10.2.0.3 ,still i get the same error.
    do u have any idea?
    Regards,
    sreenath.

  • Database trigger - PL/SQL: ORA-00984: column not allowed here

    I am trying to create a trigger that will update an employee audit table when a row is changed. Using a sequence number to assign a unique identifier to each row as it is created. Need to capture the user ID, date of the change, and the action (update), plus the before image of the row.
    CREATE SEQUENCE emp_audit_seq START WITH 10;               
    Create table emp (
       empno       NUMBER(4)      Primary Key,
       ename       VARCHAR2(10),
       job            VARCHAR2(9),
       mgr           NUMBER(4),
       hiredate     DATE,
       sal             NUMBER(7,2),
       comm        NUMBER(7,2),
       deptno       NUMBER(2));
    CREATE TABLE emp_audit   (
         audit_uid          NUMBER(15)      Primary Key,
         change_date          DATE,
         change_user          VARCHAR2(30),
         action                  CHAR(1),
         empno                  NUMBER(4),
         ename                  VARCHAR2(10),          
         job               VARCHAR2(9),
         mgr               NUMBER(4),
         hiredate          DATE,
         sal               NUMBER(7,2),
         comm                  NUMBER(7,2),
         deptno                  NUMBER(2));
    CREATE OR REPLACE TRIGGER trig_emp_audit
      BEFORE UPDATE ON emp
      FOR EACH ROW
    BEGIN
      INSERT INTO emp_audit
        VALUES(emp_audit_seq.nextval, change_date, change_user, action, :old.empno, :old.ename, :old.job, :old.mgr, :old.hiredate, :old.sal, :old.comm, deptno);
    END;
    Warning: Trigger created with compilation errors.
    SQL> show errors
    Errors for TRIGGER TRIG_EMP_AUDIT:
    LINE/COL ERROR
    2/3      PL/SQL: SQL Statement ignored
    3/149    PL/SQL: ORA-00984: column not allowed hereCan anyone assist in helping me find what I am doing wrong with the trigger?
    Edited by: LostNoob on Aug 25, 2012 2:24 PM

    First, when you write an INSERT statement, it's always good to list the columns that you're inserting into. That makes the code easier to follow-- you don't have to separately pull up the table definition to know what order columns are inserted. And it makes the code more maintainable since the statement won't become invalid if you add a new column to the table in the future.
    Second, CHANGE_DATE, CHANGE_USER, and ACTION are not (presumably) functions and they are not local variables so it doesn't make sense to use them in an INSERT statement. You would need to write code or leverage existing functions to populate those columns. I'm guessing, for example, that you want to use SYSDATE to populate the CHANGE_DATE and USER to populate the CHANGE_USER column. My guess is that ACTION should always be a 'U' for UPDATE.
    Third, it appears that you left off the :old on the DEPTNO column.
    Putting it all together, you'd have something like
    CREATE OR REPLACE TRIGGER trig_emp_audit
      BEFORE UPDATE ON emp
      FOR EACH ROW
    BEGIN
      INSERT INTO emp_audit(
          audit_uid,
          change_date,
          change_user,
          action,
          enpno,
          ename,
          job,
          mgr,
          hiredate,
          sal,
          comm,
          deptno )
        VALUES(
          emp_audit_seq.nextval,
          sysdate,
          user,
          'U',
         :old.empno,
         :old.ename,
         :old.job,
         :old.mgr,
         :old.hiredate,
         :old.sal,
         :old.comm,
         :old.deptno);
    END;
    / Justin

  • "405 - Method Not Allowed" when calling my Web Service

    Hi Guys,
    In APEX.ORACLE.COM I am trying to call some PL/SQL via a Web Service with the following setup:
    URI Template: TestPOST
    Method          : POST
    Source Type : PL/SQL
    Requires Secure Access : No
    Source:
    begin
      delete from ora_log;
      insert into ora_log values (1, 2, 3, null, sysdate);
      commit;
    end;
    The call is:
    https://apex.oracle.com/pls/apex/orange/TestPOST
    But Firefox returns Error: 405 - Method Not Allowed
    Does anyone know how to resolve this?
    Access to my Workspace is:
    Workspace: ORANGE
    User     : guest
    Password : 01range
    My email : [email protected]
    Cheers
    Jeroen

    There a number of standard verbs defined in HTTP:
    GET- Retrieve a resource
    POST- Submit new resource
    PUT - update resource
    DELETE - delete resource
    When you enter a URL in a web browser it always uses the GET method, the method to retrieve the resource.
    In your example Firefox is attempting to a do a GET on https://apex.oracle.com/pls/apex/orange/TestPOST
    but you have not defined a GET handler for this resource, only a POST handler. ORDS then tells you that the GET method is not supported on the resource, which is the correct behaviour.
    If you want to test the POST method from within a browser then you need to use JavaScript and perform an XMLHttpRequest and configure it to use the 'POST' method, for an example see the ORDS Developer guide:
    REST Data Services Developers Guide

Maybe you are looking for

  • Form based security in WebLogic 7.0

    I'm sorry for the beginner level question, but I seem to be missing a critical step in getting Form based security to work. I have a Web application comprised of several JSPs. I want to attache simple FORM based security contrainsts to all pages in t

  • Converting .m4a into .mov with Quick Time?

    trying to convert a .m4a file I pulled from itunes library into a .mov for use in FC7. this was easy to do in Snow leopard w/same quicktime10 with "save as" the option is not there in Lion, only export which does not have a .mov option. what am I mis

  • Add Field to Transaction ME23n

    Hi Experts, In transaction Me23n  when we have Document overview ON.And Click on Hierarchy> Purchase order we get a Selection screen. I want to add a VBAK-SUBMI in the selection screen. And add a Search help to it. Do help me please Thanks and Regard

  • Load BW hierarchy from a DB Connect Source System

    Hi, I think I will be able to generate a suitable dataset - the same as for loading BW hierarchies from flatfile - in a database view connected via DB Connect in an external system. However, it looks like this is not supported. Am I right in thinking

  • I just purchased Photoshop Elements 13 and now find it doesn't open .eps files.

    What adobe product does open .eps files and can I "return" Elements 13?