Unable to insert records in PRPS and PROJ tables.

I want   to insert entries in PROJ and PRPS  tables with new company code.
I am selecting entries  with existing company code and changing old co. code to new co. code in work area.
Then I am using insert PRPS from work area in the same way inserting in PROJ.
Please help, why insert statement  is not working with these tables..

I hope you are in a sandbox system.
The internal and primary key is PSPNR, and this key is associated with an internal range number. If you don't want to use program, you have to get yourself the next number for PROJ and each PRPS, then  you MUST  insure that related objects like OBJNR the CO object number is adjusted (PR or PD + internal number/) else you will incur severe problem with your database. You MUST insure that other unique indexes are respected PSPID, etc.
*The correct way is reached via BAPI or Batch Input/Call Transaction*
For BTC or call transaction just record via [SHDB|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=shdb&adv=false&sortby=cm_rnd_rankvalue] a single run with [CJ2D transaction|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=cj2d+transaction&adv=false&sortby=cm_rnd_rankvalue].
BAPI suitable are :
- [BAPI_PS_INITIALIZATION|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=bapi_ps_initialization&adv=false&sortby=cm_rnd_rankvalue] to start the job
- to read the model use BAPIs like [BAPI_PROJECTDEF_GETDETAIL|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=bapi_projectdef_getdetail&adv=false&sortby=cm_rnd_rankvalue]
- to create the new project use BAPIs like [BAPI_PROJECTDEF_CREATE|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=bapi_projectdef_create&adv=false&sortby=cm_rnd_rankvalue]
- [BAPI_PS_PRECOMMIT|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=bapi_ps_precommit&adv=false&sortby=cm_rnd_rankvalue] and then BAPI_TRANSACTION_COMMIT or ROLLBACK to end.
Regards

Similar Messages

  • Updating detail record and getting multiple 'UNABLE TO INSERT RECORD' msgs

    Help! We have 2 datablocks, master and detail block with relation defined. Master is defined with view based on database joins; detail is view based on table.
    When I update the record in detail block, error message 'UNABLE TO INSERT RECORD' appears four times, then I get transaction complete: 5 records applied and saved, where the one record successfully updates. Why are we getting four records with insert errors and one record update? We don't want to work directly on the table, but why can't we use the view? please help.

    The UNABLE TO INSERT record will be accompanied by more information if you press the Display Error key. Your form commit processing should stop when it gets an error like this, the fact that it doesn't implies that somewhere in your code you are not checking for FORM_SUCCESS before continuing doing something else.
    This sounds quite involved, we would need to have more information about what records are queried and what's being changed on them to cause the commit.

  • [SOLVED] FRM-40508:ORACLE error: unable to INSERT record

    Hi all,
    I have migrated this form from 4.5 to 10g (Version 10.1.2.0.2 ). This form inserts a record into the database table when all the fields in the form are filled and a button Save is presed.
    At the time when I press the Save button, I get this error. FRM-40508:ORACLE error: unable to INSERT record
    So I went on to see the "Display Error" from help and found to be the database error, inserting into a table.
    The error message is ORA-00932: inconsistent datatypes: expected DATE got NUMBER
    The form where I press Save button has 3 date fields and I checked the properties of them and they are Date only.
    I also generated to object list report and tried to find some answer, but no use.
    Please help me in debugging this form.
    Edited by: Charan on Aug 18, 2011 4:05 PM

    I think you need to get a description of the table and compare all the "database" columns in the form with the ones in the database table to see that the types match. Somewhere there's a mismatch. Also check the block(s) "query data source columns" and see if there's any
    columns in there that the type does not match the table. (check the sizes of things too while you're at it.)

  • Oracle forms error frm-40508: unable to insert record

    Hi Everyone,
    I have been having this problem for 2 weeks and I realize that I spent alot of time I couldn't get to fix the problem so I need your help.
    Here is my situation. First, I installed Oracle 10g in my laptop with Oracle forms10g and Oracle forms904i. I had oracle_home folder as the top level structure then I have inside oracle folder, Oracle10g in it own folder, Oracle9i release2 in it own folder. then I created the user account "student" using the system/manager account finally I granted privilleges as follow:
    GRANT ALL PRIVILLEGES
    TO student
    WITH ADMIN OPTION;
    this was working perfecty I didn't need to grant objects privilleges such as
    GRANT INSERT, UPDATE, DELETE
    ON customers
    TO student;
    Then I created a form Application prototype and it works well I could Insert, Update and Delete but now I am creating an e-commerce application prototype I created an new account using a system/manager account as I did previously and grant all privilleges. When I try to grant object privileges the message that I receive says ORA-01919 : role 'INSERT' doesn't exist
    When I run the application I am unable to insert the record through forms I get message frm-40508 Orcle error: unable to insert record.
    I deinstall the Oracle and clean my laptop and did a clean installation using only Oracle Server10g and Oracle Developer10g I am getting the same message frm-40508.
    Can someone please help me on this. the insert command that I am running is a simple one such as
    INSERT INTO customers
    VALUES( block_name.field_name, ....);
    COMMIT;

    frm 40735:When button pressed trigger raised unhanded exceptionplease help me to solve this>
    The FRM-40735 is a generic Unhandled Exception. Please post the full error message so we can better help you.
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • Unable to INSERT record

    Hi
    when trying to insert a record in a form builder application I getted the following
    error
    FRM-40508: ORACLE error: unable to INSERT record.
    Is the reason that I have not the authority to enter by by system account althought
    I have granted dba to scott and that successed ?
    To get a full overview of my problem please see my previous thread.
    thanks for adavance

    volberg wrote:
    in most cases you forget a required field.
    Press Shift+F1 to get the error message in detailsql statements in error
    INSERT INTO STUDENTS(STUD_ID,STUD_NAME) VALUES (:1,:2)
    error
    ORA-00001: unique constraint (ELHADI.SYS_C005462) violated
    Edited by: VANPERSIE on Aug 29, 2008 5:16 PM

  • Unable to INSERT record but inserting. Forms 4.5 error through Apps 10.7

    Hi All,
    I have written the following code on save button on form 4.5 which has been used from APPS. I created the master-detail relation also.
    It suppose to insert a row into header and then into lines.
    Its inserting the row into both the tables but getting the following error in betweeen.
    ===========
    FRM-40508: ORACLE error: unable to INSERT record.
    ORA-01400: cannot insert NULL into ("VFI"."VFI_PC_DEFINITION_LINES"."LINE_ID")
    ===========
    I am thinking problem is some where in some default triigers or on insert triggers
    but unable to trace it. CAN anybody through a light on this ?
    ================================================
    PROCEDURE VFI_INVPCS IS
    i          number;
    v_item_id     number;
    v_item_id1     number;
    v_temp      varchar2;
    v_user_id NUMBER := 1111; --fnd_global.user_id;
    Lv_ChkFlag VARCHAR2(1);
    Lv_UnChkFlag VARCHAR2(1);
    ln_header_seq NUMBER;
    ln_lines_seq NUMBER;
    BEGIN
    BEGIN
    SELECT inventory_item_id
    INTO v_item_id
    FROM inv.mtl_system_items
    WHERE organization_id = 103
    and segment1 = :VFI_PC_DEFINITION_HEADER.parent_inventory_item_id;
    SELECT VFI_PC_DEFINITION_HEADER_SEQ.nextval
    INTO ln_header_seq
    FROM DUAL;
    SELECT VFI_PC_DEFINITION_LINES_SEQ.nextval
    INTO ln_lines_seq
    FROM DUAL;
    INSERT INTO VFI_PC_DEFINITION_HEADER( HEADER_ID
    ,PARENT_INVENTORY_ITEM_ID
    ,START_DATE
    ,END_DATE
    ,CREATED_BY
    ,CREATION_DATE
    ,LAST_UPDATED_BY
    ,LAST_UPDATE_DATE)
    VALUES ( ln_header_seq
         ,v_item_id
         ,:VFI_PC_DEFINITION_HEADER.start_Date
         ,:VFI_PC_DEFINITION_HEADER.end_date
    ,v_user_id
         ,sysdate
         ,v_user_id
         ,SYSDATE
    COMMIT; -- header
    GO_BLOCK('VFI_PC_DEFINITION_LINES');
    LOOP
    SELECT inventory_item_id
    INTO v_item_id1
    FROM inv.mtl_system_items
    WHERE organization_id = 103
    AND segment1 = :VFI_PC_DEFINITION_LINES.child_inventory_item_id;
    First_record;
    IF :VFI_PC_DEFINITION_LINES.child_inventory_item_id is not null then
    IF :CFY_PTID_FLAG='Y' THEN
    Lv_ChkFlag:=:CFY_PTID_FLAG;
    INSERT INTO VFI_PC_DEFINITION_LINES( LINE_ID
    ,HEADER_ID
    ,PARENT_INVENTORY_ITEM_ID
    ,CHILD_INVENTORY_ITEM_ID
    ,CREATED_BY
    ,CREATION_DATE
    ,LAST_UPDATED_BY
    ,LAST_UPDATE_DATE
    ,CFY_PTID_FLAG)
    VALUES ( ln_lines_seq
    ,ln_header_seq
    ,v_item_id
    ,v_item_id1
    ,v_user_id
    ,SYSDATE
    ,v_user_id
    ,SYSDATE
    ,Lv_ChkFlag
    END IF;
    END if;
    NEXT_RECORD;
    EXIT WHEN :SYSTEM.LAST_RECORD='TRUE';      
    END LOOP;
    message('After Insert Child');
    message('After Insert Child');
    COMMIT;
    END;
    ================================================

    not sure on the block structure of your forms.
    one would question why you seem to be doing a lot of the default insert work on the press of a button (when-button-pressed).
    also if you have a master-detail relationship in the form - why you don't let forms handle the master-detail insert.
    seems like you have database database blocks but are almost coding as if they are non-base table blocks.

  • Unable to INSERT record : ERROR

    SR # : 3-2184192641
    RMS Version 13.1.3
    Form : dealmain.fmb
    Customer is reporting the following error
    "FRM:40508-Oracle error:Unable to INSERT record"
    On looking into detail error the following message is displayed
    "INSERT INTO deal_threshold( lower_limit,upper_limit,value,total_ind,target_level_ind,reason,deal_id,deal_detail,
    create_datetime,last_update_datetime,last_update_id) values(1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11)."
    Please advice.

    Are the values for the columns being supplied from the application? If so check the formats of the columns and corresponding values of the same. If they are matching then check whether a null being inserted for a not null column..
    Of course there could be many more reasons for this error.
    Give the complete details of the columns, their properties and the values being inserted into the table.
    Regards,
    Sandy.

  • Relation b/w PRPS and RPSCO tables

    Hi  PS Experts,
    What is the Relation b/w PRPS and RPSCO tables
    PRPS : WBS (Work Breakdown Structure) Element Master Data
    RPSCO : Project info database: Costs, revenues, finances
    Thanks in Advance,
    Regards,
    sudharsan.

    Hello Sasikanth Thank u for ur information,
      and i need some more information, am working on abap, now i got a requirement in PS,
    i want 2 calculate the values like Planned Revenue, Planned Cost, Actuall Rev, Actuall Cost, Actuall Billing, Revenue Taken, Cost Taken, BNS and SNB.
    based on i/p parameters:  Company Code, Fiscal year and month.
    pls let me know how to calculate the above values, its very urgent for me.
    Thanks in advance,
    sudharsan.

  • Runtime error when inserting rows in hrp1018 and hrt1018 tables

    Hi All,
    I have a requirement to insert row in hrp1018 and hrt1018 tables.These tables are interlinked.So, I have used FM 'RH_INSERT_INFTY'. The exact code which I have used is as follows.
    *****************************************code***************************************************************
    << Please post only the relevant portion of the code >>
    The runtime error which is coming is as follows:
    Error analysis
        An internal error in the database interface occurred during access to
        the data of table "HRT1018 ".
        The situation points to an internal error in the SAP software
        or to an incorrect status of the respective work process.
        For further analysis the SAP system log should be examined
        (transaction SM21).
        For a precise analysis of the error, you should supply
        documents with as many details as possible.
    Please let me know why this error is coming.I am not able to find out mistake in the FM and form used in the code.
    Thanks in advance,
    BBKrishna.
    Edited by: Rob Burbank on Jun 9, 2009 1:31 PM

    I am adding the code once again.Please let me know why the error is coming up.
    lv_mproj = 'BLDNG'.
      wa_p1018-mandt = sy-mandt.
      wa_p1018-otype = '9M'.
      wa_p1018-objid = '50009650'.
      wa_p1018-begda = '20090608'.
      wa_p1018-endda = '99991231'.
      wa_p1018-infty = '1018'.
      wa_p1018-plvar = '01'.
      wa_p1018-otype = '9M'.
      wa_p1018-istat = '1'.
      append wa_p1018 to it_p1018.
      repid = sy-repid.
    *Updating hrp1018 and hrt1018 tables
      CALL FUNCTION 'RH_INSERT_INFTY'
        EXPORTING
        FCODE                     = 'INSE'
        VTASK                     = 'D'
         AUTHY                    = ' '
          REPID                   =  repid
          FORM                    = 'FILL_TABS'
        TABLES
          INNNN                   = it_p1018
    EXCEPTIONS
       NO_AUTHORIZATION          = 1
       ERROR_DURING_INSERT       = 2
       REPID_FORM_INITIAL        = 3
       CORR_EXIT                 = 4
       BEGDA_GREATER_ENDDA       = 5
       OTHERS                    = 6
      IF SY-SUBRC <> 0.
        CALL FUNCTION 'BALW_BAPIRETURN_GET'
          EXPORTING
            TYPE                             = SY-MSGTY
            CL                               = sy-msgid
            NUMBER                           = SY-MSGNO
      PAR1                             = ' '
      PAR2                             = ' '
      PAR3                             = ' '
      PAR4                             = ' '
      LOG_NO                           = ' '
      LOG_MSG_NO                       = ' '
         IMPORTING
           BAPIRETURN                        = return_rec
    EXCEPTIONS
      ONLY_2_CHAR_FOR_MESSAGE_ID       = 1
      OTHERS                           = 2
        IF SY-SUBRC <> 0.
            lv_mproj = text-011
                      ELSE.
                      ii_return = return_rec.
                      CONCATENATE                  ii_return-type '-' ii_return-message
                      INTO lv_err_msg SEPARATED BY SPACE.
        ENDIF.
      ENDIF.
    *RHCD_TAB-PROZT
       FORM fill_tabs TABLES ins_tab
                   USING ins_set ins_index.
      DATA : BEGIN OF set.
              INCLUDE STRUCTURE wplog.
      DATA : END   OF set.
      DATA: BEGIN OF h_pt1018.             "to initialize INS_TAB
              INCLUDE STRUCTURE pt1018.
      DATA: END OF h_pt1018.
      REFRESH ins_tab.
      set = ins_set.
      CASE set-infty.
        WHEN '1018'.
          h_pt1018-posnr = lv_mproj.
          h_pt1018-prozt = '100.00'.
          IF NOT ( h_pt1018 IS INITIAL ).
            CLEAR ins_tab.
            ins_tab+36(8) = lv_mproj. "h_pt1018.
            ins_tab+134(5) = '100.00'.
            APPEND ins_tab.
          ENDIF.
      ENDCASE.
    ENDFORM.

  • Relationship between PRPS and FPLT table

    How to arrive to a billing plan in FPLT table with project ID or WBS ID in PRPS table.
    Thanks,
    Vaishnavi

    Hi
    I hope there is no common element in both tables..extract the mile stone data from FPLT and MLST tables and then WBS element data from PRPS and MLST tables (first two gives the mile stone and next two tables gives the WBS element to which mile stone is attached)..
    thanks

  • Link between Prps and Vbap table

    Hi all,
    How can i link PRPS and VBAP table .
    Please suggest.
    Thanks and regrads
    Neha Kapoor

    hi,
    neha try this.
    PRPS-PSPNR = VBAP-PS_PSP_PNR
    rgds
    anver

  • Unable to insert record in table

    Hi,
    I want to insert record in database table, but when I execute insert command(at When List changed trigger) as select from query and issue commit, the form trying to insert record from datablock which is obviously having empty items, how can I commit at database level not at form level.
    *******************Below the SQL Statement issued by Form******************
    INSERT INTO BILL_OF_MATERIALS_TABLE(PROJECTNO,GROUP_,ITEM,STATUS,QUANTITY,UNIT_PRICE,REASON_FOR_CHANGE,REMARKS,AWARD_COPY,LOCKED,VO_COPY) VALUES (:1,:2,:3,:4,:5,:6,:7,EMPTY_CLOB(),:9,:10,:11) RETURNING ROWID,PROJECTNO,GROUP_,ITEM,STATUS,QUANTITY,UNIT_PRICE,REASON_FOR_CHANGE,REMARKS,AWARD_COPY,LOCKED,VO_COPY INTO :12,:13,:14,:15,:16,:17,:18,:19,:20,:21,:22,:23
    ***************Error Raised by Form********
    ORA-01400: cannot insert NULL into ("CAPEX"."BILL_OF_MATERIALS_TABLE"."ITEM")

    Remember that when you write "commit;" within your forms code then Forms interprets it as a commit_form statement. That's why the form-level commit is launched as you mentionned.
    So if you want to make a database commit then I think that you should create a stored procedure which makes the insert , and you call this stored procedure within your forms code.
    Try it.

  • Primary key violation when inserting records with insert_identity and ident_current+x

    My problem is this: I have data in a couple of temporary tables including
    relations (one table referencing records from another table by using
    temporary keys).
    Next, I would like to insert the data from the temp tables to my productive tables which have the same structure but their own identity keys. Hence, I need to translate the 'temporary' keys to regular identity keys in my productive tables.
    This is even more difficult because the system is highly concurrent, i.e. multiple sessions may try to insert
    data that way simultaneously.
    So far we were running the following solution, using a combination of
    identity_insert and ident_current:
    create table doc(id int identity primary key, number varchar(100))
    create table pos (id int identity primary key, docid int references doc(id), qty int)
    create table #doc(idx int, number varchar(100))
    create table #pos (docidx int, qty int)
    insert #doc select 1, 'D1'
    insert #doc select 2, 'D2'
    insert #pos select 1, 10
    insert #pos select 1, 12
    insert #pos select 2, 32
    insert #pos select 2, 9
    declare @docids table(ID int)
    set identity_insert doc on
    insert doc (id,number)
    output inserted.ID into @docids
    select ident_current('doc')+idx,number from #doc
    set identity_insert doc off
    -- Since scope_identity() is not reliable, we get the inserted identity values this way:
    declare @docID int = (select min(ID) from @docids)
    insert pos (docid,qty) select @docID+docidx-1, qty from #pos
    Since the request to ident_current() is located directly in the insert statement, we always have an implicit transaction which should be thread safe to a certain extend.
    We never had a problem with this solution for years until recently when we were running in occasional primary key violations. After some reasearch it turned out, that there were concurrent sessions trying to insert records in this way.
    Does anybody have an explanation for the primary key violations or an alternative solution for the problem?
    Thank you
    David

    >> My problem is this: I have data in a couple of temporary tables including relations (one table referencing records [sic] from another table by using temporary keys [sic]). <<
    NO, your problem is that you have no idea how RDBMS and SQL work. 
    1. Rows are not anything like records; this is a basic concept.
    2. Temp tables are how old magnetic tape file mimic scratch tapes. SQL programmers use CTEs, views, derived tables, etc. 
    3. Keys are a subset of attributes of an entity, fundamental characteristics of them! A key cannot be temporary by definition. 
    >> Next, I would like to insert the data from the temp tables to my production tables which have the same structure but their own IDENTITY keys. Hence, I need to translate the 'temporary' keys to regular IDENTITY keys in my productive tables. <<
    NO, you just get worse. IDENTITY is a 1970's Sybase/UNIX dialect, based on the sequential file structure used on 16-bit mini computers back then. It counts the physical insertion attempts (not even successes!) and has nothing to with a logical data model. This
    is a mag tape drive model of 1960's EDP, and not RDBMS.
    >> This is even more difficult because the system is highly concurrent, i.e. multiple sessions may try to insert data that way simultaneously. <<
    Gee, that is how magnetic tapes work, with queues. This is one of many reasons competent SQL programers do not use IDENTITY. 
    >> So far we were running the following solution, using a combination of IDENTITY_INSERT and IDENT_CURRENT: <<
    This is a kludge, not a solution. 
    There is no such thing as a generic “id” in RDBMS; it has to be “<something in particular>_id” to be valid. You have no idea what the ISO-11179 rules are. Even worse, your generic “id” changes names from table to table! By magic, it starts as a “Doc”,
    then becomes a “Pos” in the next table! Does it wind up as a “doc-id”? Can it become a automobile? A squid? Lady Gaga? 
    This is the first principle of any data model; it is based on the Law of Identity; remember that from Freshman Logic 101? A data element has one and only one name in a model. 
    And finally, you do not know the correct syntax for INSERT INTO, so you use the 1970's Sybase/UNIX dialect! The ANSI/ISO Standard uses a table consrtuctor: 
    INSERT INTO Doc VALUES (1, 'D1'), (2, 'D2'); 
    >> We never had a problem with this solution for years until recently when we were running in occasional PRIMARY KEY violations. After some research it turned out, that there were concurrent sessions trying to insert records [sic] in this way. <<
    “No matter how far you have gone down the wrong road, turn around.” -- Turkish proverb. 
    You have been mimicking a mag tape file system and have not written correct SQL. It has caught up with you in a way you can see. Throw out this garbage and do it right. 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • Unable to Insert record In forms: error -ORA-01779 :cannot modify a column

    Hi,
    I have created one form with two block.
    Block-1 : Based on View
    Block-2 : Based on table
    There is is relationship between Block-1 and Block-2.
    Block-1 is populating from LOV.
    I just need to insert /update record Block-2 based on data from Block-1
    So Block-1 I have made read only at runtime (Inser/update all properties are false).
    Now when I insert record in Block-2 based on record from block-1, and getting below error.
    "ORA-01779: cannot modify a column which maps to a non key-preserved table"
    It is not allowing to insert record.
    Please help me.
    Subir

    The error states that there is some operation on a view, not an a table.
    Now when I insert record in Block-2 based on record from block-1What does that mean? How do you insert records in block 2?
    When exactly occurs the error?

  • [Solved] Unable to insert records, trigger is showing mutating error

    Friends,
    I created a procedure
    ===>>
    SQL> CREATE OR REPLACE PROCEDURE PO_RECEIVINGS_ASSETS_TR_P
    2 IS
    3 CURSOR CUR_LAST_DAY_RCV IS
    4 SELECT * FROM PO_RECEIVINGS_INSTANT_V WHERE TRANSACTION_ID = (SELECT MAX(TRANSACTION_ID) FROM PO_RECEIVINGS_INSTANT_V);
    5 BEGIN
    6 FOR REC_LAST_DAY_RCV IN CUR_LAST_DAY_RCV
    7 LOOP
    8 FOR i IN 1 .. REC_LAST_DAY_RCV.QUANTITY
    9 LOOP
    10 INSERT INTO ND_TEST VALUES(REC_LAST_DAY_RCV.TRANSACTION_ID, REC_LAST_DAY_RCV.CREATION_DATE, REC_LAST_DAY_RCV.QUANTITY,
    11 REC_LAST_DAY_RCV.PO_LINE_ID);
    12 END LOOP;
    13 END LOOP;
    14 END;
    15 /
    Procedure created.
    <<===
    then created a trigger to insert record in ND_TEST when a record is inserted in RCV_TRANSACTIONS_ND
    ===>>
    SQL> CREATE OR REPLACE TRIGGER PO_RECEIVINGS_INTO_ASSETS_TR
    2 AFTER INSERT ON RCV_TRANSACTIONS_ND
    3 FOR EACH ROW
    4 BEGIN
    5 IF :NEW.TRANSACTION_TYPE = 'ACCEPT' THEN
    6 PO_RECEIVINGS_ASSETS_TR_P;
    7 END IF;
    8 END;
    9 /
    Trigger created.
    <<===
    when I try to insert record in RCV_TRANSACTIONS_ND, I get below lines.
    ===>>
    SQL> INSERT INTO RCV_TRANSACTIONS_ND (TRANSACTION_ID,LAST_UPDATE_DATE,LAST_UPDATED_BY,CREATION_DATE,
    2 CREATED_BY,TRANSACTION_TYPE,TRANSACTION_DATE, QUANTITY, UNIT_OF_MEASURE, SHIPMENT_HEADER_ID,
    3 SHIPMENT_LINE_ID,USER_ENTERED_FLAG, PO_HEADER_ID, PO_LINE_ID)
    4 VALUES(1001001,SYSDATE,3572,SYSDATE,3572,'ACCEPT',SYSDATE,1,'Nos',199999,199099,'Y',133032,1679
    29);
    INSERT INTO RCV_TRANSACTIONS_ND (TRANSACTION_ID,LAST_UPDATE_DATE,LAST_UPDATED_BY,CREATION_DATE,
    ERROR at line 1:
    ORA-04091: table RCV_TRANSACTIONS_ND is mutating, trigger/function may not
    see it
    ORA-06512: at "PO_RECEIVINGS_ASSETS_TR_P", line 4
    ORA-06512: at "PO_RECEIVINGS_ASSETS_TR_P", line 6
    ORA-06512: at "PO_RECEIVINGS_INTO_ASSETS_TR", line 3
    ORA-04088: error during execution of trigger
    'PO_RECEIVINGS_INTO_ASSETS_TR'
    <<===
    Using Database 9i.

    Well, I tried to solve it and it worked.
    SQL> CREATE OR REPLACE PROCEDURE PO_RECEIVINGS_ASSETS_TR_P(VAL1 IN NUMBER, VAL2 IN DATE, VAL3 IN NUMBER, VAL4 IN NUMBER)
    2 IS
    3 BEGIN
    4 FOR i IN 1 .. VAL3
    5 LOOP
    6 INSERT INTO ND_TEST VALUES(VAL1, VAL2, VAL3, VAL4);
    7 END LOOP;
    8 END;
    9 /
    Procedure created.
    ===
    SQL> CREATE OR REPLACE TRIGGER PO_RECEIVINGS_INTO_ASSETS_TR
    2 AFTER INSERT ON RCV_TRANSACTIONS_ND
    3 FOR EACH ROW
    4 BEGIN
    5 IF :NEW.TRANSACTION_TYPE = 'ACCEPT' THEN
    6 PO_RECEIVINGS_ASSETS_TR_P(:NEW.TRANSACTION_ID, :NEW.CREATION_DATE, :NEW.QUANTITY, :NEW.PO_LINE_ID);
    7 END IF;
    8 END;
    9 /
    Trigger created.
    ===
    SQL> INSERT INTO RCV_TRANSACTIONS_ND (TRANSACTION_ID,LAST_UPDATE_DATE,LAST_UPDATED_BY,CREATION_DATE,
    2 CREATED_BY,TRANSACTION_TYPE,TRANSACTION_DATE, QUANTITY, UNIT_OF_MEASURE, SHIPMENT_HEADER_ID,
    3 SHIPMENT_LINE_ID,USER_ENTERED_FLAG, PO_HEADER_ID, PO_LINE_ID)
    4 VALUES(1001001,SYSDATE,3572,SYSDATE,3572,'ACCEPT',SYSDATE,1,'Nos',199999,199099,'Y',133032,1679
    29);
    1 row created.
    ===
    Thanks everyone

Maybe you are looking for

  • ITunes Match is no longer working on my iPhone

    I play music through my iPhone 5 using iTunes Match. Recently, it stopped working. Suddenly, most songs have a red plus sign next to them. I've no idea what this means and the songs won't play. My iTunes Match subscription was recently renewed, by th

  • "The server is unavailable this is offline copy of the server workbook" error while opening the sharepoint library file

    Hi Techys, can you give me the suugestions for below error in sharepoint 2010. Error: "The server is unavailable this is offline copy of the server workbook" error while opening the sharepoint library file. User having the contribute permission. as a

  • Index and partition not visible !!!

    Hello, I am creation a table with partition by range and primary key constraint like CREATE TABLE employees (employee_id NUMBER(4) NOT NULL, last_name VARCHAR2(10), department_id NUMBER(2), CONSTRAINT SUP_EMP_PK PRIMARY KEY (employee_id,department_id

  • Exporting threshold settings in SunMC

    1. Is there any way to export out the list of current thresholds for all monitored servers under SunMC via command-line? 2. Closely related, is there any way to have an audit trail if any changes are made to the threshold settings? Thanks.

  • Can't import some Quicktime files into FCP X 10.0.5

    I'm new to FCP X.  Trying to import Qiicktime files from hard drive and keep getting "no supported files" dialog box.  Or sometimes it imports audio only. Only once was I successfully able to import video files.  All of the files were originally crea