Error insert record in pa0027

I've been stuck with the problem for days, could anyone help. I try to use the function modules in my report to create the record in pa0027, but it won't work! here is the code:
REPORT  ZHRADDPA0027 NO STANDARD PAGE HEADING.
TABLES : PA0027, PA0024.
DATA: BEGIN OF IT0027 OCCURS 0,
      MANDT LIKE PA0027-MANDT,
      PERNR LIKE PA0027-PERNR,
      SUBTY LIKE PA0027-SUBTY,
      OBJPS LIKE PA0027-OBJPS,
      SPRPS LIKE PA0027-SPRPS,
      ENDDA LIKE PA0027-ENDDA,
      BEGDA LIKE PA0027-BEGDA,
      PSP25 LIKE PA0027-PSP25,
END OF IT0027.
DATA: RET LIKE BAPIRETURN1.
DATA: RET2 LIKE BAPIRETURN1.
DATA: RET3 LIKE BAPIRETURN1.
DATA: LOCKING_USER LIKE SY-UNAME.
DATA: MKEY LIKE BAPIPAKEY.
CLEAR IT0027.
SELECT * FROM PA0027 WHERE PERNR = '00000123' AND ENDDA = '99991231'.
  MOVE-CORRESPONDING PA0027 TO IT0027.
  APPEND IT0027.
ENDSELECT.
LOOP AT IT0027.
  IT0027-BEGDA = '19990101'.
  IT0027-ENDDA = '19991231'.
  MODIFY IT0027.
ENDLOOP.
CLEAR IT0027.
LOOP AT IT0027.
  CALL FUNCTION 'HR_EMPLOYEE_ENQUEUE'
    EXPORTING
      NUMBER       = IT0027-PERNR
    IMPORTING
      RETURN       = RET
      LOCKING_USER = LOCKING_USER.
  CALL FUNCTION 'HR_INFOTYPE_OPERATION'
    EXPORTING
      INFTY     = '0027'
      NUMBER    = IT0027-PERNR
      RECORD    = IT0027
      OPERATION = 'INS'
      NOCOMMIT  = 'X'
    IMPORTING
      RETURN    = RET2
      KEY       = MKEY.
  CALL FUNCTION 'HR_EMPLOYEE_DEQUEUE'
    EXPORTING
      NUMBER = IT0027-PERNR
    IMPORTING
      RETURN = RET3.
ENDLOOP.

here is the declaration and getting the data.
DATA: BEGIN OF IT0027 OCCURS 0,
MANDT LIKE PA0027-MANDT,
PERNR LIKE PA0027-PERNR,
SUBTY LIKE PA0027-SUBTY,
OBJPS LIKE PA0027-OBJPS,
SPRPS LIKE PA0027-SPRPS,
ENDDA LIKE PA0027-ENDDA,
BEGDA LIKE PA0027-BEGDA,
........................  ,<- All the field names
........................   <- the list is too long
PSP25 LIKE PA0027-PSP25,
END OF IT0027.
DATA: RET LIKE BAPIRETURN1.
DATA: RET2 LIKE BAPIRETURN1.
DATA: RET3 LIKE BAPIRETURN1.
DATA: LOCKING_USER LIKE SY-UNAME.
DATA: MKEY LIKE BAPIPAKEY.
CLEAR IT0027.                      
SELECT * FROM PA0027 WHERE PERNR = '00000123' AND ENDDA = '99991231'.
MOVE-CORRESPONDING PA0027 TO IT0027.
APPEND IT0027.                <- copy the record and change the date and then inserting it back!
ENDSELECT.
Any help or information will be great!

Similar Messages

  • Dump when Inserting records in Info type Tables through PA30

    Hi Experts,
    I am facing a issue in the transaction PA30 where in any changes made and saved leads to Runtime error (Inserting records in Infotype tables ).
    Error Line : insert (dbname) from  <prel_db>
    The Structure is the same but the data mismatch with the data types like
    Field NUMC(4) is filled with 00 instead of 0000
    Field DATE and TIME are Blank instead of 00000000 or 000000.
    Similarly facing the same issue in few other fields.
    The issue is same as the below thread and tried the solution given by Taher kanchwala by changing the data in the debugger and it worked.
    DBIF_RSQL_INVALID_REQUEST error while inserting records in infotype tables
    BUT i am not sure about the changes that needs to be done for fixing this issue permanently as it is mentioned to change at the configuration level.
    Any suggestions or solutions to this issue??
    Regards,
    AyyamPerumal

    Hi Nabheet,
    Thanks for your time. No enhancements are done.
    The issue is in the below statement where dbname is PA2001 and the field symbol <prel_db> has the structure of PA2001.
    insert (dbname) from  <prel_db>
    But the data is not matching with the data types like NUMC, DATE, TIME..
    Even the DOCSY and DOCNR which should been generated at this point is also not generated.
    On correcting this and giving dummy doc values, records are inserted.
    Attaching screen shots for your reference. Any solutions to this??
    Thanks and regards,
    Ayyamperumal

  • Runtime Error in Record INsertion to an Infotype

    Hi all,
    I have created an infotype PA9035.
    In that i want to insert records with value
    Data:  WA_PA9035 TYPE PA9035.
      WA_PA9035-PERNR  = P_PERNR.
      WA_PA9035-ZZKOKRS = V_KOKRS.
      WA_PA9035-ENDDA = '99991231'.
      WA_PA9035-BEGDA = SY-DATUM.
    I used the below funciton mod to insert data,
    CALL FUNCTION 'HR_INFOTYPE_OPERATION'
          EXPORTING
            INFTY                  = '9035'
            NUMBER                 = P_PERNR
          SUBTYPE                =
          OBJECTID               =
          LOCKINDICATOR          =
           VALIDITYEND            = '99991231'
           VALIDITYBEGIN          = SY-DATUM
          RECORDNUMBER           =
            RECORD                 = WA_PA9035
            OPERATION              = 'INS'.
          TCLAS                  = 'A'
          DIALOG_MODE            = '0'
          NOCOMMIT               =
          VIEW_IDENTIFIER        =
          SECONDARY_RECORD       =
        IMPORTING
          RETURN                 =
          KEY                    =
    I am getting RUNTIME ERROR in that..the error is....
    The source field is too short.
    In the running program "SAPLHRMM" a field should have been assigned to a field
    symbol, which is shorter than the type of the field symbol.
    This is not possible.
    It is a statement of the form ASSIGN f TO <fs> CASTING...
    or ASSIGN f TO <fs> with a field symbol that was created with the
    STRUCTURE addition.
    Please help me...
    Regards,
    Thendral.

    Hi all,
    I have created an infotype PA9035.
    In that i want to insert records with value
    Data:  WA_PA9035 TYPE PA9035.
      WA_PA9035-PERNR  = P_PERNR.
      WA_PA9035-ZZKOKRS = V_KOKRS.
      WA_PA9035-ENDDA = '99991231'.
      WA_PA9035-BEGDA = SY-DATUM.
    I used the below funciton mod to insert data,
    CALL FUNCTION 'HR_INFOTYPE_OPERATION'
          EXPORTING
            INFTY                  = '9035'
            NUMBER                 = P_PERNR
          SUBTYPE                =
          OBJECTID               =
          LOCKINDICATOR          =
           VALIDITYEND            = '99991231'
           VALIDITYBEGIN          = SY-DATUM
          RECORDNUMBER           =
            RECORD                 = WA_PA9035
            OPERATION              = 'INS'.
          TCLAS                  = 'A'
          DIALOG_MODE            = '0'
          NOCOMMIT               =
          VIEW_IDENTIFIER        =
          SECONDARY_RECORD       =
        IMPORTING
          RETURN                 =
          KEY                    =
    I am getting RUNTIME ERROR in that..the error is....
    The source field is too short.
    In the running program "SAPLHRMM" a field should have been assigned to a field
    symbol, which is shorter than the type of the field symbol.
    This is not possible.
    It is a statement of the form ASSIGN f TO <fs> CASTING...
    or ASSIGN f TO <fs> with a field symbol that was created with the
    STRUCTURE addition.
    Please help me...
    Regards,
    Thendral.

  • Error while inserting records in sqlLite database

    Hi all
    I am building a hybrid web app in SMP using phonegap and html.
    I am trying to insert records in sql database but i get an error with an undefined error code
    Please see below :
    function openDatabaseFoo() {
      db = window.openDatabase(clientDBName, clientDBVersion, clientDBDisplayName, clientDBMaxSize);
    function createDBTables() {
      db.transaction(function(tx) {
      // Create mine table
      var fooCreate = 'CREATE TABLE IF NOT EXISTS ' + fooTable+ ' (empNo, empName)';
      tx.executeSql(fooCreate , [],
      function (tx, resultSet) {
                //success
      var msg = 'Sucessfully created';
      alert(msg);
      logSuccessMessage(msg);
                function (err) {
                //error code
                var msg = "Error creating table = " + err.code;
                alert(msg);
                logErrorMessage(msg);
    the creation of tables is happening properly because i am getting a success message in the alerts.
    I am getting the error when i am trying to insert records in the above table
    function insertDataTable(){
    db.transaction(function(tx) {
    var insertSql = 'INSERT INTO ' + fooTable + ' (empNo, empName) VALUES ("1603","baker")';
    tx.executeSql(insertSql, [],
      function (tx, resultSet) {
                //success
      var msg = 'Sucessful insertingdata.';
      alert(msg);
      logSuccessMessage(msg);
                function (err) {
                //error code
                var msg = "Error inserting data sql = " + insertSql + " Error code = " + err.code;
                alert(msg);
                logErrorMessage(msg);
    can some one please help.Also guide me where can i check the sqlLite database logs to see more about the error.
    I would really appreciate the help.I have been onto this since past few days now
    Regards
    Shweta

    What is err.code, or the value of msg when the error occurs?
    Thanks,
    Andrew.

  • XSQL error when trying to insert record

    hi,
    I encounter a problem using INSERT statement in xsql:query action. If I try to use INSERT statement in my xsql page like this:
    <xsql:ze_action bean="TaskentryIn">
    <xsql:query>
    INSERT
    Grundtab( Datum,Startzeit,Endzeit)
    VALUES
    ('{@date}',{'@begin}','{@ende}')
    </xsql:query>
    </xsql:ze_action>
    I always get this xsql-error:
    Statement.executeQuery - No result sets were produced by 'INSERT...'
    So far so good, I think this shouldn't be an error rather a warning.
    But this is not my primary problem.
    Anyway the record is inserted in the DB. But since I call the above <xsql:query>, from within my own action handler, I call a sendRedirect() to my next page after the <xsql:query> tag was processed.
    After sendRedirect(), when I am on my next page, I check the DB for the inserted records, and it shows up that the insert was made two times, so I have two identically records in my DB.
    If I am not sendRedirect() to the next xsql page, then the insert is only made once. So I assume that there is a problem if an xsql-error occurs and afterwards a sendRedirect().
    I am using the same way to make my SELECT statements and I dont have any trouble with them. Only when I use INSERT.
    Any adive or help is appreciated.
    Peter

    <xsql:query> is only for queries.
    Use <xsql:dml> for a DML statement.

  • [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.)

  • Error inserting XML records 4000 bytes through Pro*C

    Hi,
    I am seeing the following error while trying to insert XML records > 4000 bytes (Records < 4000 bytes get inserted without any issues). Any help in resolving the issue would be highly appreciated.
    ORA return text: ORA-01461: can bind a LONG value only for insert into a LONG column.
    I am also able to insert records > 4000 bytes using the following query, But, I want to insert the records through a C application (using Pro*C) that is not running on the database server.
    INSERT INTO MY_XML_TABLE
    VALUES (XMLType(bfilename('XML_DIR', 'MY_FILE.XML'),
    nls_charset_id('AL32UTF8')));
    Oracle Version
    ===============
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    CORE 11.2.0.2.0 Production
    TNS for Solaris: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production
    Pro*C/C++ version:
    ====================
    Pro*C/C++ RELEASE 11.2.0.0.0 - PRODUCTION
    Schema registration:
    ====================
    begin
    DBMS_XMLSCHEMA.registerSchema (
    SCHEMAURL => 'MY_XML_SCHEMA.xsd',
    SCHEMADOC => bfilename ('ENG_REPORTS', 'MY_XML_SCHEMA.xsd'),
    GENTYPES => FALSE,
    OPTIONS => DBMS_XMLSCHEMA.REGISTER_BINARYXML,
    CSID =>nls_charset_id ('AL32UTF8'));
    end;
    Table creation
    ===============
    CREATE TABLE MY_XML_TABLE (
    MY_XML_RECORD XmlType )
    XMLTYPE MY_XML_RECORD STORE AS BINARY XML
    XMLSCHEMA "MY_XML_SCHEMA.xsd" ELEMENT "MYXMLTAG" ;
    Record Insertion (Pro*C generated code):
    =========================================
    /* EXEC SQL FOR :l_sizeof_array_togo
    insert INTO MY_XML_TABLE
    (MY_XML_RECORD )
    VALUES( XMLTYPE(:l_XML_ptr INDICATOR :l_XML_indicators )); */
    struct sqlexd sqlstm;
    sqlstm.sqlvsn = 12;
    sqlstm.arrsiz = 1;
    sqlstm.sqladtp = &sqladt;
    sqlstm.sqltdsp = &sqltds;
    sqlstm.stmt = "insert into MY_XML_TABLE (MY_XML_RECORD) values (XMLTYPE(:s1\
    :s2 ))";
    sqlstm.iters = (unsigned int )l_sizeof_array_togo;
    sqlstm.offset = (unsigned int )20;
    sqlstm.cud = sqlcud0;
    sqlstm.sqlest = (unsigned char *)&sqlca;
    sqlstm.sqlety = (unsigned short)4352;
    sqlstm.occurs = (unsigned int )0;
    sqlstm.sqhstv[0] = (unsigned char *)&l_XML_ptr->xml_record;
    sqlstm.sqhstl[0] = (unsigned long )8002;
    sqlstm.sqhsts[0] = ( int )sizeof(struct xml_rec_definition);
    sqlstm.sqindv[0] = ( short *)&l_XML_indicators->XML_record_ind;
    sqlstm.sqinds[0] = ( int )sizeof(struct XML_indicator);
    sqlstm.sqharm[0] = (unsigned long )0;
    sqlstm.sqadto[0] = (unsigned short )0;
    sqlstm.sqtdso[0] = (unsigned short )0;
    sqlstm.sqphsv = sqlstm.sqhstv;
    sqlstm.sqphsl = sqlstm.sqhstl;
    sqlstm.sqphss = sqlstm.sqhsts;
    sqlstm.sqpind = sqlstm.sqindv;
    sqlstm.sqpins = sqlstm.sqinds;
    sqlstm.sqparm = sqlstm.sqharm;
    sqlstm.sqparc = sqlstm.sqharc;
    sqlstm.sqpadto = sqlstm.sqadto;
    sqlstm.sqptdso = sqlstm.sqtdso;
    sqlcxt((void **)0, &sqlctx, &sqlstm, &sqlfpn);
    }

    After selecting data from xmltab table I just received first line of xmldata file. i.e
    <?xml version="1.0" encoding="WINDOWS-12 52"?> <BAROutboundXM L xmlns="http://BARO
    That must be a display issue.
    What client tool are you using, and what version?
    If SQL*Plus, you won't see the whole content unless you set some options :
    {code}
    SET LONG <value>
    SET LONGCHUNKSIZE <value>
    {code}
    Could you try the following?
    {code}
    SET LONG 10000
    SELECT t.object_value.getclobval() FROM xmltab t;
    -- to force pretty-printing :
    SELECT extract(t.object_value, '/*').getclobval() FROM xmltab t;
    {code}
    Edited by: odie_63 on 16 févr. 2011 08:58

  • ORA-03113 error occurs when trying to insert record using procedure

    I have a Database Block whose DML Data Target Type is Procedure. I have given the Insert Procedure Name, Insert Procedure Arguments and Insert Procedure ResultSet Columns. The procedure which is used to insert record into the table, resides in the database. The procedure for insert takes Table of records as argument. I am getting FRM-40735: INSERT-PROCEDURE trigger raised unhandled exception ORA-03113).
    This exception does not occur if the Procedure is place under Program Units. But, I want the procedure to be under Database Block. I am working on Oracle Forms 6i.
    Please help me out in resolving this.

    Hello,
    I think you should call the support for this kind of error.
    Francois

  • 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.

  • JavaScript Error when adding the Server Behaviors for insert Record in php_mysql

    Hi guys,
    I am using Adobe DreamWeaver CS4.
    Here is the Scenerio, i am doing  php mysql driven website.
    While adding the server behavior for insert record i got following error
    Plz help me..
    Thanks in Advance
    RafelNash

    Have you found a fix to this??

  • 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 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?

  • 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.

  • [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

  • DW CS3 Insert Record/Update Record: Record Form Wizard Error

    I have just bought Dreamweaver CS3 and I am running into some
    problems. I also have Dreamweaver MX 2004. When I use the Insert
    Record: Record Insertion Form Wizard on my Dreamweaver MX 2004 I
    have no problems using the Insert Record function. However, when I
    use the Dreaweaver CS3, I am running into errors. The error I am
    getting is the following..."Apache HTTP Server has encountered a
    problem and needs to close. We are sorry for the inconvenience."
    As well, when I use the update form wizard, when you place
    all your settings and place a redirection after updating to a page
    it does not do it, it stays on the same page and gives me the
    following error..."Warning: Cannot modify header information -
    headers already sent in C:\wamp\www\edit.php on line 50".
    This happens on all internet browsers when I want to insert a
    new record. It takes a long time to load the page and then it
    finally gives me an error which I stated above. I never had a
    problem before. I thought maybe I installed the application wrong,
    so I unistalled and reinstalled the DW CS3. I still get the same
    issue. I became so frustrated that I formatted my hard drive
    thinking make I have a adware or spyware, so to be cautious I
    formatted my computer and installed everything with a fresh install
    and still I get this error. Now my testing server that I use is
    called WAMP. I never had problems with it before using DW MX 2004
    or when I used the trial of DW 8. So now I am out of options. Is
    there a glitch in the new CS3 Web Premium that includes DW CS3
    upgrade software and if there is, is there a download. Can anyone
    help me, please.

    Please bare with me David. I know something is wrong because
    I have made two folders, one that is done in MX2004 and the other
    done in CS3. CS3 is generating errors. For example. In the insert
    page in MX2004 I do not need to make a recordset, however, for the
    CS3 insert page I noticed when I use the insert record form wizard
    it does not work unless I make a recordset where in MX2004 I did
    not need to do this. I've created a add.php and a edit.php of
    MX2004 and CS3. I will place it in the attach code so you can see
    side by side what it is generating. I can see that there are a few
    things that CS3 does change and some how it is making my internet
    browsers show an error saying......"Warning: Cannot modify header
    information - headers already sent in C:\wamp\www\edit.php on line
    50".
    What do I do?
    I noticed that in the following code difference in...
    MX2004 = <?php echo $row_rsTest['test']; ?>
    CS3 = <?php echo htmlentities($row_rsTest['test'],
    ENT_COMPAT, 'utf-8'); ?>
    There is a big difference.
    My database is the following...
    -- phpMyAdmin SQL Dump
    -- version 2.10.1
    http://www.phpmyadmin.net
    -- Host: localhost
    -- Generation Time: Jun 24, 2007 at 04:29 PM
    -- Server version: 5.0.41
    -- PHP Version: 5.2.3
    SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
    -- Database: `mysample`
    CREATE DATABASE `mysample` DEFAULT CHARACTER SET latin1
    COLLATE latin1_swedish_ci;
    USE `mysample`;
    -- Table structure for table `test`
    CREATE TABLE `test` (
    `testID` int(11) NOT NULL auto_increment,
    `test` longtext NOT NULL,
    PRIMARY KEY (`testID`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;
    -- Dumping data for table `test`
    INSERT INTO `test` (`testID`, `test`) VALUES
    (3, 'Sample Test');
    =======================================================================
    I use the program called
    WAMP.
    =======================================================================
    PHP PAGES

Maybe you are looking for

  • How to manage the "no data" loading in process chain

    Hi, I want to load some master data in delta mode with a process chain. The treatment works good except in one case. If I have no data selected during the extraction ( cause the system doesn't find any data matching with the delta field ), the proces

  • Korean Language Fonts?

    I recently composed a notice in Word2007, used Acrobat 9 to convert to PDF and posted the file on my webpage.  This is not the first time I have done this, but this time about 5 of my visitors have emailed me to complain that they get a notification

  • One short beep and one 1 beep on hp pavilion media center 8120n

    My tower is not booting up when I turn it on.  My son took the side off and was going to put more memory in it for me, but in the end he didn't.  He put the old memory back in and put the side casing back on.  Today, when I turn it on, it has 1 short

  • How to edit o/p fields in hierarchical list?

    how to make output fields as input enabled, displayed in the hierarchical list? i.e. to make them as editable?Is it possible in list display?

  • Hyperion Financial Reporting Query

    how does FR know which substitution variable to place under which dimension.becasue when i create curryear,currmnth etc variables it automatically gets listed under year dimension in FR.I have a new variable created called LoadTime,but iam unable to