Problem with truncate table in procedure ora -00054

hi do anybody know where is mistake ???
the procedure has problem with truncate table
ora - 00054: resource busy and acquire with NOWAIT specified
ora - 06512 at "POVAPSYS.HMAN_P_REFRESH", line 6
ora - 06512 at "POVAPSYS.POVAPSYS", line 6
ora - 06512 at line 1
this is my procedure....
AS
BEGIN
execute immediate 'TRUNCATE TABLE hman_t_max';
INSERT INTO hman_t_max SELECT * FROM hman_v_max;
COMMIT;
END;

2.MAKE SURE THAT OTHER THAN YOU ANYBODY IS TRYING TO
COMPILE AND RUN THE PROCEDUREShould he make sure that anybody is running the procedure?
3.MAKE SURE THAT ANY PARALLEL QUERY IS RUNNING IN THE
SERVER SIDE,THATS KEEPS THE RESOURCE BUSYShould he make sure any parallel query is running in the server side to keep the resource busy?
Gita,
I COULDN'T RESIST HAVING ONE SUGGESTION FOR YOU. Please look at the impact of your English in the reply before posting. Check if that sends reverse message!
Cheers
Sarma.

Similar Messages

  • Problems with partition tables

    Hi all,
    I've got some problems with partition tables. The script at the bottom run but when I wanna insert some values it returns me an error
    (ORA-06550: line 1, column 30: PL/SQL: ORA-06552: PL/SQL: Compilation unit analysis terminated
    ORA-06553: PLS-320: the declaration of the type of this expression is incomplete or malformed
    ORA-06550: line 1, column 7: PL/SQL: SQL Statement ignored)
    and I can't understand why!
    There's something incorrect in the script or not?
    Please help me
    Thanks in advance
    Steve
    CREATE TABLE TW_E_CUSTOMER_UNIFIED
    ID_CUSTOMER_UNIFIED VARCHAR2 (27) NOT NULL ,
    START_VALIDITY_DATE DATE NOT NULL ,
    END_VALIDITY_DATE DATE ,
    CUSTOMER_STATUS VARCHAR2 (255)
    PARTITION BY RANGE (START_VALIDITY_DATE)
    SUBPARTITION BY LIST (END_VALIDITY_DATE)
    PARTITION M200909 VALUES LESS THAN (TO_DATE('20091001','YYYYMMDD'))
    (SUBPARTITION M200909_N VALUES (NULL), SUBPARTITION M200909_NN VALUES (DEFAULT)),
    PARTITION M200910 VALUES LESS THAN (TO_DATE('20091101','YYYYMMDD'))
    (SUBPARTITION M200910_N VALUES (NULL), SUBPARTITION M200910_NN VALUES (DEFAULT)),
    PARTITION M200911 VALUES LESS THAN (TO_DATE('20091201','YYYYMMDD'))
    (SUBPARTITION M200911_N VALUES (NULL), SUBPARTITION M200911_NN VALUES (DEFAULT)),
    PARTITION M200912 VALUES LESS THAN (TO_DATE('20100101','YYYYMMDD'))
    (SUBPARTITION M200912_N VALUES (NULL), SUBPARTITION M200912_NN VALUES (DEFAULT)),
    PARTITION M201001 VALUES LESS THAN (TO_DATE('20100201','YYYYMMDD'))
    (SUBPARTITION M201001_N VALUES (NULL), SUBPARTITION M201001_NN VALUES (DEFAULT)),
    PARTITION M201002 VALUES LESS THAN (TO_DATE('20100301','YYYYMMDD'))
    (SUBPARTITION M201002_N VALUES (NULL), SUBPARTITION M201002_NN VALUES (DEFAULT)),
    PARTITION M210001 VALUES LESS THAN (MAXVALUE))
    (SUBPARTITION M210001_N VALUES (NULL), SUBPARTITION M210001_NN VALUES (DEFAULT))
    ;

    Hi Hoek,
    the DB version is 10.2 (italian version, then SET is correct).
    ...there's something strange: now I can INSERT rows but I can't update them!
    I'm using this command string:
    UPDATE TW_E_CUSTOMER_UNIFIED SET END_VALIDITY_DATE = TO_DATE('09-SET-09', 'DD-MON-RR') WHERE
    id_customer_unified = '123' and start_validity_date = TO_DATE('09-SET-09', 'DD-MON-RR');
    And this is the error:
    Error SQL: ORA-14402: updating partition key column would cause a partition change
    14402. 00000 - "updating partition key column would cause a partition change"
    *Cause:    An UPDATE statement attempted to change the value of a partition
    key column causing migration of the row to another partition
    *Action:   Do not attempt to update a partition key column or make sure that
    the new partition key is within the range containing the old
    partition key.
    I think that is impossible to use a PARTITION/SUBPARTITION like that: in fact the update of "END_VALIDITY_DATE" cause a partition change.
    Do u agree or it's possible an update on a field that implies a partition change?
    Regards Steve

  • Problems with a table in PDF`S footer

    Dear sirs,
    We are having problems when trying to run a PDF with Adobe LiveCycle Designer tool.
    We are working with a PDF which is composed of a header, the main body and a footer. We have created a table (table1) at the footer and
    another one at the main body (table2). This last table (table2) may overflow therefore it will genarate two pages for our PDF.
    On both pages appear the header and the footer correctly but in the last page it does not write the data from the table included in the footer (table1).
    We have no problems with the table included in the main body
    In the attachments, I send you the screenshots of both pages in which I have marked in red the part where we have error.
    May you help us to solve our problem?
    Thanks in advance your help.
    Edited by: emgaitan on Mar 16, 2010 2:18 PM

    Wardell,
    Check the data in RSA3 for the extractor that you use to bring data .
    You must be using the data source 0CO_OM_CCA_09. Check the data and reconcile and you will get it.
    Let me know if you need anything else.
    Thanks
    Ravi Thothadri
    [email protected]

  • I am getting problem with internal table & work area declaration.

    I am working with 'makt' table ..with the table makt i need to work with styles attributes ..so i declared like this
    TYPES : BEGIN OF ty_makt,
             matnr TYPE makt-matnr,
             spras TYPE makt-spras,
             maktx TYPE makt-maktx,
             maktg TYPE makt-maktg,
             celltab TYPE lvc_t_styl,
           END OF ty_makt.
    DATA : i_makt TYPE TABLE OF ty_makt.
    DATA : wa_makt TYPE ty_makt .
        But end of program i need to update dbtable "makt"...i am getting problem with internal table & work area declaration.
    i think makt table fields mapping and internal table/work area mapping is not correct. so please help me to get out from this.

    Hi Nagasankar,
    TYPES : BEGIN OF TY_MATNR,
                  MATNR TYPE MAKT-MATNR,
                  SPRAS TYPE MAKT-SPRAS,
                  MAKTX TYPE MAKT-MAKTX,
                  MAKTX TYPE MAKT-MAKTG,
                  CELLTAB TYPE LVC_T_STYL,  " Its Working perfectly fine..
                 END OF TY_MAKT.
    DATA: IT_MAKT TYPE STANDARD TABLE OF TY_MAKT,
              WA_MAKT TYPE TY_MAKT.
    Its working perfectly fine. if still you are facing any issue post your complete code.
    Thanks,
    Sandeep

  • Problem with a table control

    Hi gurus,
    I´ve a problem with a table control. It has 3 columns which one is a checkbox.
    I can fill all fields but in the moment I mark the checkbox this line must be unwritable. How can I do it?
    Thanks for all
    Dani

    Assign a function code to the checkbox column....
    so when u check / uncheck any entry, PAI + PBO will be triggered....
    In the PBO during the loop of table control, check the checkbox field value. if it is 'X', make the row readonly
    by looping at screen and setting screen-input = 0 for rest of the columns.
    like ...
    LOOP AT tc_itab
           WITH CONTROL tc_test
           CURSOR tc_test-current_line.
       module set_row_readonly. " loop at screen and set input = '0' if checkbox is checked...
    ENDLOOP.

  • Problem with maintain table views SM30 Transaction

    Hello All,
    i have a problem with the table maintenance view SM30, it doesn't permit me to modify the rows in the table.
    we have added a field into the table and when i tried to change the table view from menu: Utilities ==> table maintenance generator==> change the system propose me a message that the screen 0001 will be deleted and recreated...but the system has deleted the screen and doesn't recreate it...in somewehere on internet we find that we should use the transaction SE55 menu:
    Environment==> modification ==> Maintenance screen ==> button Layout which open the tool Screen Painter and from that we have created our screen with 4 fields of our table...our result that the screen is created and i can see it from the SM30 transaction but i can't insert rows in the table...when i try to go to maintain table: menu: Utilities ==> Table maintenance generator to try if i can modify something the system give me a message: "set the compare flag dialog ZIV_DP_PLCHAR_LA"
    the ZIV_DP_PLCHAR_LA is the name of my table...
    can you give me some advices please how should i do to fix this problem to insert rows in table throughout the transaction
    SM30 "maintain table views: initial screen"
    if i want to delete the screen from the SE55 transaction to recreate it newly what should i do to take care about some options
    to have a new screen?
    thanks for all
    Bilal

    Hi
    First delete the old table maintainence generator.
    Now Recreate the screen and your table is good to go..
    These error messages come when we add new fields and different version of the table maintainence generator in database.

  • Problem with Pivot Table with Graph: Line Bar Combo

    Hello people!
    I have a problem with pivot table and line bar combo (all in the same view (pivot table))
    I have some measures and one dimension in my report.
    --------------measure1---measure2---measure3
    Dim A.1
    Dim A.2
    Dim A.3
    If I choose my graph line bar combo automatically choose "line" measure 3 (last measure in "Show Controls"). How can I do if I want my measure1 for line and I don't want modify my pivot table?
    Thank you very much!

    Ok, I'll explain my problem again. In my pivot table I add graph vision and I want in the same view (Pivot table). My graph is "Line Bar Combo" and I don't know how but the last of my measures belongs to right AXIS, if I change order of my measures I can see in my graph the measure that I want in my right axis BUT also it changes the order of my pivot table.
    This is my problem. I think that I can do that with different views but I lose my selector view to view graphic and my pivot table at the same time.

  • Problem with the table control BDC in FV60 transaction

    Hi All,
    I got the problem with the table control in FV60 transaction.
    This is working for 900 line items.After 900 line items it is giving the problem like it is 1000th line item.You can post only 999 line items.
    I know we can post only 999 line items,but in my file only 920 line items.
    Please give me solution,if anybody come across this situation.
    Thanks & regards,
    rakesh.

    Hello Rakesh ,
    your file may have only 920 line items , but based on those line items, SAP may create few more  new lines ( based on the clearing recon accounts , inter company transaction ...etc )...
    regards
    Prabhu

  • Problem with HP-UX extended procedures that use C++ Standard library

    I am experiencing a problem with using the C++ standard library on HP-UX inside my extended procedures.
    Here is the definition for the library and procedures:
    -bash-3.2$ more nuhash2.sql
    CREATE OR REPLACE LIBRARY xp_nuencryption_l
    AS
    '/home/jchamber/datasecure/lib/libxp_nuencryption.sl';
    CREATE OR REPLACE PACKAGE xp_nuencryption
    AS
    PROCEDURE xp_nuhash2;
    END xp_nuencryption;
    CREATE OR REPLACE PACKAGE BODY xp_nuencryption
    IS
    PROCEDURE xp_nuhash2
    IS EXTERNAL
    LIBRARY xp_nuencryption_l
    NAME "xp_nuhash2"
    LANGUAGE C;
    END xp_nuencryption;
    Here is the PL/SQL test program:
    -bash-3.2$ more testnuhash2.sql
    SET SERVEROUTPUT ON SIZE 1000000
    DECLARE
    BEGIN
    xp_nuencryption.xp_nuhash2 ();
    END;
    Here is the implementation of the extended procudure - notice how we are using the C++ Standard library:
    -bash-3.2$ more xp_nuhash2.cpp
    #include <string.h>
    #include <iostream>
    #include <fstream>
    class MyException {
    public:
    MyException() {}
    int func(std::ofstream& fout )
    fout << "func: About to throw exception in func()" << std::endl;
    throw MyException();
    extern "C"
    void xp_nuhash2 ()
    std::ofstream fout("/home/jchamber/xp_nuhash2.txt");
    try {
    fout << "xp_nuhash2: About to call func()" << std::endl;
    func(fout);
    catch (MyException& ex) {
    fout << "xp_nuhash2: caught MyException" << std::endl;
    fout << std::flush;
    fout.close();
    Here is how we build the library on HP-UX:
    # compile
    aCC -g -AA DA2.0W DS2.0 +z -c xp_nuhash2.cpp -o xp_nuhash.o
    #link using aCC
    aCC -g -AA DA2.0W DS2.0 +z -b -o /home/jchamber/datasecure/lib/libxp_nuencryption.sl xp_nuhash.o \
    /usr/lib/pa20_64/libstd_v2.a \
    /usr/lib/pa20_64/libCsup_v2.a
    chatr +dbg enable /home/jchamber/datasecure/lib/libxp_nuencryption.sl
    Here is how we test:
    SQL> @nuhash2
    Library created.
    Package created.
    Package body created.
    SQL> @testnuhash2
    DECLARE
    ERROR at line 1:
    ORA-28576: lost RPC connection to external procedure agent
    ORA-06512: at "JCHAMBER.XP_NUENCRYPTION", line 0
    ORA-06512: at line 3
    Now, if i use classic C++ (aCC -AP) it works. The trouble is, we have a lot of code that uses the Standard C++ library and we don't have the time to port it back to classic C++.
    The problem seems to be with an incompatibility with the standard C++ library. What is the magic potion of linker and/or compiler switches that would enable my extended procedures to use the standard C++ library?
    Here is the environment we are using:
    Oracle 9i (64-bit)
    HP UX 11.11
    Regards

    I am experiencing a problem with using the C++ standard library on HP-UX inside my extended procedures.
    Here is the definition for the library and procedures:
    -bash-3.2$ more nuhash2.sql
    CREATE OR REPLACE LIBRARY xp_nuencryption_l
    AS
    '/home/jchamber/datasecure/lib/libxp_nuencryption.sl';
    CREATE OR REPLACE PACKAGE xp_nuencryption
    AS
    PROCEDURE xp_nuhash2;
    END xp_nuencryption;
    CREATE OR REPLACE PACKAGE BODY xp_nuencryption
    IS
    PROCEDURE xp_nuhash2
    IS EXTERNAL
    LIBRARY xp_nuencryption_l
    NAME "xp_nuhash2"
    LANGUAGE C;
    END xp_nuencryption;
    Here is the PL/SQL test program:
    -bash-3.2$ more testnuhash2.sql
    SET SERVEROUTPUT ON SIZE 1000000
    DECLARE
    BEGIN
    xp_nuencryption.xp_nuhash2 ();
    END;
    Here is the implementation of the extended procudure - notice how we are using the C++ Standard library:
    -bash-3.2$ more xp_nuhash2.cpp
    #include <string.h>
    #include <iostream>
    #include <fstream>
    class MyException {
    public:
    MyException() {}
    int func(std::ofstream& fout )
    fout << "func: About to throw exception in func()" << std::endl;
    throw MyException();
    extern "C"
    void xp_nuhash2 ()
    std::ofstream fout("/home/jchamber/xp_nuhash2.txt");
    try {
    fout << "xp_nuhash2: About to call func()" << std::endl;
    func(fout);
    catch (MyException& ex) {
    fout << "xp_nuhash2: caught MyException" << std::endl;
    fout << std::flush;
    fout.close();
    Here is how we build the library on HP-UX:
    # compile
    aCC -g -AA DA2.0W DS2.0 +z -c xp_nuhash2.cpp -o xp_nuhash.o
    #link using aCC
    aCC -g -AA DA2.0W DS2.0 +z -b -o /home/jchamber/datasecure/lib/libxp_nuencryption.sl xp_nuhash.o \
    /usr/lib/pa20_64/libstd_v2.a \
    /usr/lib/pa20_64/libCsup_v2.a
    chatr +dbg enable /home/jchamber/datasecure/lib/libxp_nuencryption.sl
    Here is how we test:
    SQL> @nuhash2
    Library created.
    Package created.
    Package body created.
    SQL> @testnuhash2
    DECLARE
    ERROR at line 1:
    ORA-28576: lost RPC connection to external procedure agent
    ORA-06512: at "JCHAMBER.XP_NUENCRYPTION", line 0
    ORA-06512: at line 3
    Now, if i use classic C++ (aCC -AP) it works. The trouble is, we have a lot of code that uses the Standard C++ library and we don't have the time to port it back to classic C++.
    The problem seems to be with an incompatibility with the standard C++ library. What is the magic potion of linker and/or compiler switches that would enable my extended procedures to use the standard C++ library?
    Here is the environment we are using:
    Oracle 9i (64-bit)
    HP UX 11.11
    Regards

  • Problem with temporary table refresh

    Hi,
    I running a process before validation on a page to populate a temporary table when I click a button.
    On the following page I've built a shuttle on the temporary table. Not the most elegant solution, but the shuttle LOV box wouldn't process the oracle text commands in the SQL.
    I'm not getting any error, but I have an unusual problem
    It takes two passes for the data to be replaced. i.e I enter 'ABCD' in the filter and it returns data with 'ABCD'
    If I return to the page and change the filter to 'EFGH' I still get 'ABCD'. I return to the page and click the button again and I get 'EFGH' results
    I've checked the data in the temporay table and that is updating in line with the problem.
    I've looked at the debug and that seems fine (i.e I can see the changed filter value), I've tried moving the truncate to a different process, that didn't help.
    I've run it in SQL developer and it seems to work fine.
    I've included the code below, but I can't see a problem with it.
    Can anybody help?
    begin
    EXECUTE IMMEDIATE('TRUNCATE TABLE temp_cat');
    commit;
    if length(:P26_ADD_FILTER) > 0 then
    insert into temp_cat (core_cat_id, core_cat_code, core_cat_desc)
    select core_cat_id,core_cat_code,core_cat_desc from core_cat where CONTAINS (core_cat_desc, '
    <query>
    <textquery lang="ENGLISH" grammar="CONTEXT">&P26_ADD_FILTER.
    <progression>
    <seq><rewrite>transform((TOKENS, "{", "}", " "))</rewrite></seq>
    <seq><rewrite>transform((TOKENS, "{", "}", " ; "))</rewrite></seq>
    <seq><rewrite>transform((TOKENS, "{", "}", "AND"))</rewrite></seq>
    <seq><rewrite>transform((TOKENS, "{", "}", "ACCUM"))</rewrite></seq>
    </progression>
    </textquery>
    <score datatype="INTEGER" algorithm="COUNT"/>
    </query>')>0 and core_cat_id not in (select pipe_project_cat.core_cat_id from pipe_project_cat where txtpamref = :p26_pamref);
    else
    insert into temp_cat (core_cat_id, core_cat_code, core_cat_desc)
    select core_cat_id,core_cat_code,core_cat_desc from core_cat where
    core_cat_id not in (select pipe_project_cat.core_cat_id from pipe_project_cat where txtpamref = :p26_pamref);
    end if;
    end;

    Hi,
    Apex does not work well with temporary tables as you cannot guarantee which session from the pool will be used to serve each page.
    In your case, it looks like the second page is using temporary data from the wrong session.
    Have you considered using Apex Collections instead?
    Luis

  • Problems with QCM tables in DB export

    Hi gurus, I have a problem with an export that I'm performing, the problem is that the R3SETUP is trying to export a QCM table "QCMT066" but this table doesn't exits in the database.
    (EXP) ERROR: DbSlExeRead: rc = 107, table "QCMT066"
            (SQL error 942)
    error message returned by DbSl:
    ORA-00942: table or view does not exist
    The R3 system is a 4.6C and runs over HP-UX 11 64 bits and Oracle 8.1.7
    I read and search SAP notes and inside the SAP forums, but I didn't find anything that could help me.
    The transaction SM13 says that --> **** No update records found ****     when I execute without client, user and date parameters.
    The transaction SE11 says that the table in fact doesn't exits in the database, and if I execute a select sentence (SELECT TABLE_NAME FROM DBA_TABLES WHERE TABLE_NAME LIKE 'QCM%') I can see that there is no table with this name.
    In transaction.
    The transaction SE14 > Extras> Invalid temp. table  show the text " ... List is empty "
    So please, Do you know what I could do to solve my problem?.
    Thanks and best regards
    Edited by: Juan Francisco Estrada Garcia on Sep 3, 2010 11:02 AM

    Thank you, that is just what I did.
    I found this [tread|r3load export error ORA-00942 for table QCMBTXBLOK; where the people talk about .TKS files, but the version that I'm trying to migrate is too old, and the R3LOAD doesn't use TKS files, so I edited every file(.EXT, .STR, .TOC)  that contains references to QCM* tables. I deleted every line related with this kind of tables, and finally everything work and the export ended successfully.
    Thanks

  • High system load possibly due to problems with WB_RT_NOTIFY_QUEUE_TAB table

    Hi! We are running OWB 10.2.0.5.0 and experiencing high CPU and I/O load serverside and slow response times in the GUI even when there is insignificant transaction throughput in the system. I read about a patch dokument-id är 578399.1 and a script, purge_notifications.sql , that fix a problem with the WB_RT_NOTIFY_QUEUE_TAB table. There exist patches for OWB 10.2.0.3 and 10.2.0.4. Is the patch relevant for our version of OWB? Or can we just run the purge_notifications.sql script ?

    Hi Marcos,
    I managed to add the index to the table, it didn't work because of running proces flows. But analyzing the table and its indexes is still not possible.
    It gives the following errors:
    ORA-20005: object statistics are locked (stattype = ALL)
    We are running:
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
    PL/SQL Release 10.2.0.3.0 - Production
    CORE     10.2.0.3.0     Production
    TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production
    OWB version is: client : 10.2.0.2.8 repos: 10.2.0.2.0
    We managed to unlock the statistics with: dbms_stats.unlock_table_stats('OWBRUN_P','WB_RT_NOTIFY_QUEUE_TAB', 'ALL');
    Analyzing the table now gives good results on the statistics.
    Further we notice on different environments huge differences in the amount of rows in the above mentioned table.
    We've got similar environments: a development environment with about 15k rows in the table wb_rt_notify_queue_tab
    A test environment with about 350k rows in the table wb_rt_notify_queue_tab
    and production environment with 1400k rows in the table wb_rt_notify_queue_tab
    . Where does this difference come from and what is the purpose of this table?

  • Problem with truncate

    Hello!
    i try to delete all the data of specific Partitions (oracle version 8). The problem i got, is that after truncate the data are gone, but the Storage-Space is still used.
    I even disabled all the constraints before truncate the partitions.
    this is a record of what i did:
    1.) alter table ODS.Berichtswerte disable constraint BRW_PK;
    alter ...... .....
    2.) alter table ODS.BERICHTSWERTE truncate partition BRW_P200109 DROP STORAGE;
    alter table ODS.BERICHTSWERTE truncate partition BRW_P200110 DROP STORAGE;
    alter ..... ....
    3.) alter table ODS.BERICHTSWERTE DEALLOCATE UNUSED;
    4.) alter table ODS.Berichtswerte enable constraint BRW_PK;
    5.) ALTER INDEX ODS.BRW_PK REBUILD;
    has anybody some ideas?
    thx in advance!!

    You find this seriously easier than
    create table tmp_berichtswerte as select * from berichtswerte where 1=0;
    alter table berichtswerte exchange partition brw_p200109 with table tmp_berichtswerte;
    drop table tmp_berichtswerte;If you have a lot of partitions, you could build a PL/SQL block and execute the statements for every partition
    (In this case you would better truncate table tmp_berichtswerte rather than dropping and recreating it for every single partition)
    Message was edited by:
    Jens Petersen

  • Problems with update stcok level procedure

    Hi there, I am new to Oracle and I am having problems with this procedure.
    I got two tables, orders and stock, and I want to update quantity on stock, when I receive the order. For some reason NULL keeps popping out. Somebody pls help me with this!
    Tables are
    create table orders
    (order_no number(4)constraint orders_nn_11 NOT NULL,
    item_no number(4) constraint orders_nn_3 NOT NULL,
    order_qta number constraint orders_nn_4 NOT NULL,
    order_date date constraint orders_nn_2 NOT NULL,
    received date);
    and
    create table stock
    item_no (4),
    qta number,
    constraint stock_pk foreign key(item_no) references products (item_no);
    the procedure is here, but as I said I'm new to this, so I really don't know.
    create or replace
    procedure received1 (aorder_no in number, aitem_no in number, areceived in date)
    is
    quantity number;
    quantity2 number;
    cursor a1 is select qta from stock where item_no = aitem_no;
    cursor a2 is select order_qta from orders where order_no = aorder_no and item_no = aitem_no;
    begin
    open a1;
    fetch a1 into quantity2;
    open a2;
    fetch a2 into quantity;
    update stock
    set qta= quantity2 + quantity
    where item_no = aitem_no;
    update orders
    set received = sysdate
    where order_no = aorder_no;
    close a1;
    close a2;
    end;
    Thanks in advance

    hi,
    Is there a possibility that
    fetch a1 into quantity2;
    --or
    fetch a2 into quantity;Will fetch Null if yes
    then do this
    update stock
    set qta= nvl(quantity2,0) + nvl(quantity,0)
    where item_no = aitem_no;
    ....Regards,
    Bhushan

  • Problem with ADF Table and doDML method.

    HI,
    I have a problem with ADF Trinidad Table. I have one search form and which i click on search button the result is coming it's working fine, And when i click on CreateInsert button to insert a new row it's adding after entering all the data into the table when i click on button on the page i am getting error like
    Messages for this page are listed below.
    Error     
    Missing mandatory attributes for a row with key oracle.jbo.Key[1 ] of type AppModule.CmSubscribersView1
    Error     
    Attribute Name in AppModule.CmSubscribersView1 is required
    Error     
    Attribute CreatedBy in AppModule.CmSubscribersView1 is required
    Error     
    Attribute CreationDate in AppModule.CmSubscribersView1 is required
    Here Created By and Creation Date are not available in the table i need to set these data from back end for that i have used doDML() method in the entity object and i written the logic but this method not even invoking as i couldn't able to see the logs in the server.
    protected void doDML(int operation, TransactionEvent e) {
    super.doDML(operation, e);
    System.out.println("^^^^^^^^^^^^^^^^66666Inside entity object^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ");
    // AppModuleImpl am=new AppModuleImpl();
    // Number userID= am.getUserId();
    //System.out.println("User id in the Entity Object Is: "+userID);
    oracle.jbo.domain.Date dt = new Date();
    if(operation ==DML_INSERT){
    EntityDefImpl cmSubscribers=CmSubscribersImpl.getDefinitionObject();
    CmSubscribersImpl newSubscribers=(CmSubscribersImpl)cmSubscribers.createInstance2(getDBTransaction(),null);
    Number n=new Number(1599);
    newSubscribers.setCreatedBy(n);
    newSubscribers.setCreationDate(dt);
    newSubscribers.setLastUpdateDate(dt);
    newSubscribers.setLastUpdatedBy(n);
    But still the same problem can any one help me inthis.
    Regards,
    Edited by: user5802014 on Aug 21, 2009 2:04 PM

    Hi,
    Modify your method to call super.doDML() after initialization of mandatory attributes as below:
    protected void doDML(int operation, TransactionEvent e) {
         oracle.jbo.domain.Date dt = new Date();
         if(operation ==DML_INSERT){
              //PRE-INSERT code begins     
           EntityDefImpl cmSubscribers=CmSubscribersImpl.getDefinitionObject();
           CmSubscribersImpl newSubscribers=(CmSubscribersImpl)cmSubscribers.createInstance2(getDBTransaction(),null);
           Number n=new Number(1599);
           newSubscribers.setCreatedBy(n);
           newSubscribers.setCreationDate(dt);
           newSubscribers.setLastUpdateDate(dt);
           newSubscribers.setLastUpdatedBy(n);
           //PRE-INSERT code ends
           super.doDML(operation, e);
           //POST-INSERT code if any
         }else
            super.doDML(operation, e);
    }Sireesha

Maybe you are looking for