Trigger mutating and delete tables

hello
i have to update 2 tables one is mutating wich i already resolve, the other no and both get the values for a third table , after i update the 2 tables, i have to delete the values of the third one .
But if i use the instruccion FOLLOWS this dont do anyything and dont delete the values. I cant use the compound triggers because this version of oracle somehow dont work.
thsi is my code.
CREATE OR REPLACE PACKAGE PCK_UDA1
IS
type arreglo is table of rowid index by binary_integer;
v_u1acct arreglo;
v_reset arreglo;
END;
CREATE OR REPLACE TRIGGER RESET_UDA1_BU
BEFORE UPDATE ON UDA1
BEGIN
DBMS_OUTPUT.put_line('RESET_UDA1_BU');
PCK_UDA1.v_u1acct := PCK_UDA1.v_reset;
END;
here there are the condition to update the status
CREATE OR REPLACE TRIGGER UDA1_AU
AFTER UPDATE ON UDA1 FOR EACH ROW
BEGIN
DBMS_OUTPUT.put_line('UDA1_AU');
IF ((:NEW.U1STATUS = 'VEN' OR :NEW.U1STATUS = 'SAC') AND :OLD.U1STATUS = 'LIQ') THEN
PCK_UDA1.v_u1acct(PCK_UDA1.v_u1acct.count+1):= :NEW.u1acct;
END IF;
EXCEPTION
WHEN NO_DATA_FOUND THEN dbms_output.put_line('SIN DATOS');
WHEN OTHERS THEN dbms_output.put_line(SQLERRM);
END;
CREATE OR REPLACE TRIGGER UPDATE_UDA1_FIN2
AFTER UPDATE ON UDA1
BEGIN
DBMS_OUTPUT.put_line('UPDATE_UDA1_FIN2');
FOR i in 1 .. PCK_UDA1.v_u1acct.count loop
UPDATE UDa1 set u1calc5= (SELECT u1calc5 FROM GESTION.HIS_FINANCIERA2 where dmacct = PCK_UDA1.v_u1acct(i)),
WHERE u1acct = PCK_UDA1.v_u1acct(i);
END LOOP;
PCK_UDA1.v_u1acct.delete;
EXCEPTION
WHEN NO_DATA_FOUND THEN dbms_output.put_line('SIN DATOS');
WHEN OTHERS THEN dbms_output.put_line(SQLERRM);
END;
here i update the values of the other table.CREATE OR REPLACE TRIGGER UPDATE_DLQ_FIN2
AFTER UPDATE ON UDA1
FOLLOWS UPDATE_UDA1_FIN2
BEGIN
DBMS_OUTPUT.put_line('UPDATE_DLQ_FIN2');
FOR j in 1 .. PCK_UDA1.v_u1acct.count loop
UPDATE DELQMST SET DMAMTDLQ =(SELECT DMAMTDLQ FROM GESTION.HIS_FINANCIERA2 where dmacct = PCK_UDA1.v_u1acct(j)),
DMCURBAL =(SELECT DMCURBAL FROM GESTION.HIS_FINANCIERA2 where dmacct = PCK_UDA1.v_u1acct(j))
WHERE DMACCT = PCK_UDA1.v_u1acct(j);
END LOOP;
EXCEPTION
WHEN NO_DATA_FOUND THEN dbms_output.put_line('SIN DATOS');
WHEN OTHERS THEN dbms_output.put_line(SQLERRM);
END;
HEres is the one that i want to delete the table from i get the values.CREATE OR REPLACE TRIGGER PARENT_DELETE_FIN2
AFTER UPDATE ON UDA1
FOLLOWS UPDATE_DLQ_FIN2
BEGIN
     DBMS_OUTPUT.put_line('PARENT_DELETE_FIN2');
FOR k in 1 .. PCK_UDA1.v_u1acct.count loop
DELETE FROM GESTION.HIS_FINANCIERA2 where dmacct = PCK_UDA1.v_u1acct(k);
end loop;
     EXCEPTION
WHEN NO_DATA_FOUND THEN dbms_output.put_line('SIN DATOS');
WHEN OTHERS THEN dbms_output.put_line(SQLERRM);
END;
is there a wayr to tell oracle to update first the table the 2 table, and then delete the values of the third one.

since we don't have your tables or data, we can NOT run, test or improve posted code.
How do I ask a question on the forums?
SQL and PL/SQL FAQ
delete, remove, & eliminate all EXCEPTION code
For reason why check these links.
http://tkyte.blogspot.com/2007/03/dreaded-others-then-null-strikes-again.html
http://tkyte.blogspot.com/2008/01/why-do-people-do-this.html
http://tkyte.blogspot.com/2007/03/challenge.html

Similar Messages

  • Trigger & Mutating Tables (Parent-Child relationship, Referencing Constraint related)

    Dear Sir,
    Wish you a very Happy New Year !!!
    I am facing a problem related to Database Trigger.
    Sir, I have two tables Cust and Sick.
    Cust is having the following fields :
    SDF_CUST_BRCD NOT NULL NUMBER(5)
    CUST_CUSTID NOT NULL VARCHAR2(6)
    UCD_CUST_SEGMENTCODE NOT NULL VARCHAR2(7)
    CUST_FIRSTBORROWER NOT NULL VARCHAR2(30)
    UCD_CUST_CONSTORGCODE NOT NULL VARCHAR2(7)
    VLGC_CUST_VILLAGECODE VARCHAR2(4)
    CUST_PAN VARCHAR2(20)
    UCD_CUST_STAFFCODE VARCHAR2(7)
    CUST_RESIDENTSTATFLAG VARCHAR2(1)
    CUST_BKGSINCEDATE DATE
    UCD_CUST_SICKUNITCODE VARCHAR2(7)
    Cust's Primary Key is the combination of Brcd, CustId
    And Sick Table Structure is as under :
    PRDT_SICK_REPORTDATE NOT NULL DATE
    CUST_SICK_BRCD NOT NULL NUMBER(5)
    CUST_SICK_CUSTID NOT NULL VARCHAR2(6)
    UCD_SICK_REASONCODE NOT NULL VARCHAR2(7)
    SICK_SINCEDATE NOT NULL DATE
    SICK_LOSSMAKINGDATE DATE
    SICK_ACCMLOSSAMT NUMBER(16,2)
    UCD_SICK_VIABILITYCODE NOT NULL VARCHAR2(7)
    UCD_BIFR_STATUS_CODE VARCHAR2(7)
    SICK_BIFRDATE DATE
    SICK_REHABSANCDATE DATE
    CUST_SICK_SICKUNITCODE VARCHAR2(7)
    Sick's Primary Key is the combination of ReportDate, BrCD, Custid
    Sick's (Brcd and Custid) referencing to Cust (BrCd, CustId).
    I want to insert/update into the sick table corrponding to Cust
    Insertion/Updation.
    I have written a trigger on Cust which is working fine provided
    that foreign key constraint
    is diabled. As soon as constraint is enabled the trigger is
    giving error
    ORA-04091: table CIS.CUST is mutating, trigger/function may not
    see it
    Sir, It is also working fine if the record is already exist in
    Sick table.
    Is is not working in 2 cases :
    1. While entering a new record into the Cust with
    SICKUNIT_CODE='SW00001'
    2. If we are changing the SickUnit_Code in Cust and correponding
    record doesn't exist in Sick.
    Please write me the solution.
    Thanking you
    yours sincerely
    Rajesh Kumar Jain
    Trigger Text is
    create or replace trigger tr_cust_sick
    after insert or update on Cust for each row
    declare
    Fn_Return boolean;
    Tr_Exception Exception;
    begin
    Fn_Return := Fn_cust_sick
    (:new.UCD_CUST_SICKUNITCODE,:new.SDF_CUST_BRCD,:new.CUST_CUSTID,I
    NSERTING,UPDATING,DELETING);
    If Not Fn_Return then
    Raise Tr_Exception;
    End if;
    exception
    when Tr_Exception then
    Dbms_output.put_line('Tr_Exception ' ||Sqlerrm);
    When others then
    Dbms_output.put_line(Sqlerrm);
    end;
    Function Text is :
    $$$$$$$$$
    create or replace function fn_cust_sick
    (SickUnitCode_in In Cust.Ucd_Cust_SickunitCode%Type,Brcd_in In
    Sdf.Sdf_Brcd%Type,Custid_in In Cust.Cust_Custid%
    Type,Inserting_in In Boolean ,Updating_in In Boolean,Deleting_in
    In Boolean)
    return boolean is
    ddate date default '01-Jul-1955';
    repdate ppar.ppar_reportdate%type default '31-Mar-2001';
    viabcode sick.ucd_sick_viabilitycode%type default 'VI00000';
    ReasonCD sick.ucd_sick_reasoncode%type default 'SK00000';
    Ret_Flag Boolean := False;
    begin
    if Updating_in then
    begin
    update sick
    set CUST_SICK_SICKUNITCODE = SickUnitCode_in
    where prdt_sick_reportdate = repdate and
    cust_sick_brcd = Brcd_in and
    Cust_Sick_CustId = Custid_in;
         Ret_Flag := True;
    if sql%notfound then
    if To_Number(Substr(SickUnitCode_in,3)) > 0 then
    insert into sick
    (PRDT_SICK_REPORTDATE,
    CUST_SICK_BRCD,
    CUST_SICK_CUSTID,
    UCD_SICK_REASONCODE,
    SICK_SINCEDATE,
    UCD_SICK_VIABILITYCODE,
    CUST_SICK_SICKUNITCODE,
              SUBO_SICK_SICKBORRCODE)
    values
    (repdate,
    Brcd_in,
    Custid_in,
    reasoncd,
    ddate,
    viabcode,
    SickUnitCode_in,
              'SB00001');
    Ret_Flag := True;
         Return(Ret_Flag);
         end if;
    end if;
    exception
    when others then
    dbms_output.put_line('Exception Update '|| Sqlerrm);
    return(Ret_Flag);
    end;
    elsif Inserting_in then
    begin
    if To_Number(Substr(SickUnitCode_in,3)) > 0 then
    insert into sick
    (PRDT_SICK_REPORTDATE,
    CUST_SICK_BRCD,
    CUST_SICK_CUSTID,
    UCD_SICK_REASONCODE,
    SICK_SINCEDATE,
    UCD_SICK_VIABILITYCODE,
    CUST_SICK_SICKUNITCODE,
              SUBO_SICK_SICKBORRCODE)
    values
    (repdate,
    Brcd_in,
    Custid_in,
    reasoncd,
    ddate,
    viabcode,
    SickUnitCode_in,
              'SB00001');
    Ret_Flag := True;
    end if;
         Return(Ret_Flag);
    exception
    when others then
    dbms_output.put_line('Exception Insert '|| Sqlerrm);
    return(Ret_Flag);
    end;
    end if;
    return(Ret_Flag);
    exception
    when Others then
    dbms_output.put_line('Main Exception '|| Sqlerrm);
    return(Ret_Flag);
    end;
    $$$$$$$$$$$

    Hi,
    double click the Application Module to open the AM editor. Select the data Model category. On the right hand side you see what is selected for use in an application, on the left hand side is what you have available as View Object. To create T1-->T2-->T3, you
    - Select T1 and move it to the right
    - Select T2 under T1 on the left and move it to the right under T1
    - Select T3 under T2 on the left and move it under T2 in T1 on the right
    Frank

  • Insert, update and delete trigger over multiple Database Links

    Hello guys,
    first of all I'll explain my environment.
    I've got a Master DB and n Slave Databases. Insert, update and delete is only possible on the master DB (in my opinion this was the best way to avoid Data-inconsistencies due to locking problems) and should be passed to slave databases with a trigger. All Slave Databases are attached with DBLinks. And, additional to this things, I'd like to create a job that merges the Master DB into all Slave DB's every x minutes to restore consistency if any Error (eg Network crash) occurs.
    What I want to do now, is to iterate over all DB-Links in my trigger, and issue the insert/update/delete for all attached databases.
    This is possible with the command "execute immediate", but requires me to create textual strings with textually coded field values for the above mentioned commands.
    What I would like to know now, is, if there are any better ways to provide these functions. Important to me is, that all DB-Links are read dynamically from a table and that I don't have to do unnecessary string generations, and maybe affect the performance.
    I'm thankful for every Idea.
    Thank you in advance,
    best regards
    Christoph

    Well, I've been using mysql for a long time, yes, but I thought that this approach would be the best for my requirements.
    Materialized View's don't work for me, because I need real-time updates of the Slaves.
    So, sorry for asking that general, but what would be the best technology for the following problem:
    I've got n globally spread Systems. Each of it can update records in the Database. The easies way would be to provide one central DB, but that doesn't work for me, because when the WAN Connection fails, the System isn't available any longer. So I need to provide core information locally at every System (connected via LAN).
    Very important to me is, that Data remain consistent. That means, that it must not be that 2 systems update the same record on 2 different databases at the same time.
    I hope you understand what I'd need.
    Thank you very much for all your replies.
    best regards
    Christoph
    PS: I forgot to mention that the Databases won't be very large, just about 20k records, and about 10 queriees per second during peak times and there's just the need to sync 1 Table.
    Edited by: 907142 on 10.01.2012 23:14

  • Using Insert and Delete icons in table control wizard.

    Can anyone tell me how to perform a new row insertion or deletion in a table created using the table control wizard.
    I see there is a form fcode_insert_row and fcode_delete_row, but dont know how to call them and what parameters to pass and all.
    Since iam new to SAP-ABAP, some code samples will be a great help.
    Thanks to all in advance.

    Hi Lavanya ,
    You have to add the icons personally in the table control.. . Put fcode for addition button as INSE and delete as DELE ..coding will be already thr in the wizard no need to anything just add icons in the table control by selecting from f4 help on icons option of screen.
    Thanks,
    Vishnu .

  • Problem with creating and deleting row in table

    Hi
    I'm using JDev11.1.1.2.0. I have a table "A" with primary key X -> CHAR(1). I have created Entity and ViewObject (with the primary key X).
    I created an editable Table with CreateInsert and Delete actions.
    When I click Insert, a new record is added and I enter some data. Then I move selection to some other row, and return back to the new row. When I press Delete, It does not delete the new row, but the previous one selected.
    In the console, when I navigate back two the new added record: <FacesCtrlHierBinding$FacesModel><makeCurrent> ADFv: No row found for rowKey: [oracle.jbo.Key[null ]].
    I tried the same scenario with a different table, that has RowID as a primary key and it works correctly.
    Any Idea why this is happening ? I suppose it's connected somehow with the primary key.
    Thanks
    agruev
    Edited by: a.gruev on Nov 26, 2009 9:47 AM

    I changed my entity: unchecked the X column to be primary key added RowID as a primary key. Now it works.
    What's wrong with my CHAR(1) as a primary key ?
    I also tried to add a Refresh button:
      <af:commandButton text="Refresh" id="cb3"/>and in the table add a partialTarget to the button. Now when I add new row and press the Refresh button - then it works.
    So it seems that the problem is when I add new row and enter data, the table is not refreshed and the row is missing it's primary key.
    Any solutions?
    Edited by: a.gruev on Nov 26, 2009 4:18 PM

  • BAPI FOR Deleting a Schedule Line Item from EKES and EKET tables

    Dear All,
    I would like to for deleting one of the line item from EKES (Po Confirmation ) and the respective line item from the EKET(PO Schedule Line Item Table).
    Assume that am allowing the user to select the lineitem from zprogram screen and collecting the PO and Its LIne Item details in an internal table.
    Can i Use
    <b>BAPI_PO_Change</b> , if so , can anybody tell me the steps to follow to use this bapi for deleting the PO lineItems, since i m going to try BAPI for First time.
    pls help me out
    Message was edited by: Raja K.P

    Hi raja ,
    loop at iekko1.
        w_index = sy-tabix.
        item-po_item   = itemx-po_item   = iekko1-ebelp.
        item-quantity  = iekko1-mng01.
        itemx-quantity = iekko1-mng01.
        if iekko1-wamng = iekko1-wemng.
        itemx-no_more_gr = item-no_more_gr = 'X'.
        else.
        itemx-no_more_gr = item-no_more_gr = ''.
        endif.
        append item.
        append itemx.
          clear return[].
          call function 'BAPI_PO_CHANGE'
               exporting
                    purchaseorder = iekko1-ebeln
               tables
                    return        = return
                    poitem        = item
                    poitemx       = itemx.
          if return[] is initial.
          commit work and wait.
          call function 'DEQUEUE_ALL'.
    search for deletion fields which u have to mark 'X'.
    before calling  this BAPi u have to lock the PO by using ENQUEUE.
    <b>
    FU BAPI_PO_CHANGE
    Text
    Change purchase order
    Functionality
    Function module BAPI_PO_CHANGE enables you to change purchase orders. The Change method uses the technology behind the online transaction ME22N.
    Alternatively, the IDoc type PORDCH1 is available. The data from this IDoc populates the interface parameters of the function module BAPI_PO_CHANGE.
    Functionality in Detail
    Authorization
    When you create (activity 02) an Enjoy purchase order, the following authorization objects are checked:
    M_BEST_BSA (document type in PO)
    M_BEST_EKG (purchasing group in PO)
    M_BEST_EKO (purchasing organization in PO)
    M_BEST_WRK (plant in PO)
    Controlling adoption of field values via X bar
    For most tables, you can use your own parameters in the associated X bar (e.g. PoItemX) to determine whether fields are to be set initial, values inserted via the interface, or default values adopted from Customizing or master records, etc. (for example, it is not mandatory to adopt the material group from an underlying requisition - you can change it with the BAPI).
    Transfer
    Purchase order number
    The PurchaseOrder field uniquely identifies a purchase order. This field must be populated in order to carry out the Change method.
    Header data
    The header data of the Enjoy purchase order is transferred in table PoHeader.
    Item data
    The item data of the Enjoy purchase order is stored in the tables PoItem (general item data). Changes regarding quantity and delivery date are to be made in the table PoSchedule.
    Use the table PoAccount to change the account assignment information.
    Services and limits
    Changes to existing items cannot be carried out with the Change method. It is only possible to create new items.
    Conditions
    Conditions are transferred in the table PoCond; header conditions in the table PoCondHeader. A new price determination process can be initiated via the parameter CALCTYPE in the table PoItem.
    Vendor and delivery address
    The vendor address in the table PoAddrVendor and the delivery address in the table PoAddrDelivery can only be replaced by another address number that already exists in the system (table ADRC). Changes to address details can only be made using the method BAPI_ADDRESSORG_CHANGE.
    Partner roles
    You can change all partners except the partner role "vendor" via the table PoPartner.
    Export/import data
    Export/import data can be specified per item in the table PoExpImpItem. Foreign trade data can only be transferred as default data for new items. Changes to the export/import data of existing items are not possible.
    Texts
    Header and item texts can be transferred in the tables PoTextHeader and PoTextItem. Texts for services are imported in the table PoServicesText. Texts can only be replaced completely.
    Version Management
    You can make use of the Version Management facility via the table AllVersions.
    Return
    If the PO was changed successfully, the header and item tables are populated with the information from the PO.
    Return messages
    Messages are returned in the parameter Return. This also contains information as to whether interface data has been wrongly or probably wrongly (heuristical interface check) populated. If a PO has been successfully created, the PO number is also placed in the return table with the appropriate message.
    Restrictions
    With this function module, it is not possible to:
    Create subcontracting components (you can only use existing ones)
    Create configurations (you can only use existing ones)
    Change message records (table NAST) and additional message data (this data can only be determined via the message determination facility (Customizing))
    Attach documents to the purchase order
    Change foreign trade data
    Change service data
    Change or reexplode BOMs
    A firewall prevents the manipulation of data that is not changeable in Purchasing according to the business logic of the purchase order (e.g. PO number, vendor, etc.).
    PO items with an invoicing plan cannot be created or changed using the BAPIs
    In this connection, please refer to current information in Note 197958.
    To change addresses with numbers from Business Address Services (cantral address management), please use the function module BAPI_ADDRESSORG_CHANGE.
    To change variant configurations, please use the function module BAPI_UI_CHANGE. More information is available in the BAPI Explorer under the Logistics General node.
    In the case of changes that are to be made via the BAPI_PO_CHANGE, a firewall first checks whether the relevant fields are changeable. This approach follows that of the online transaction. Here it is not possible to change the vendor or the document type, for example.
    Example
    Example of changes made to a purchase order with:
    1. Change in header data
    2. Change in item
    3. Change in delivery schedule
    4. Change in account assignment
    5. Change in conditions
    6. Change in partners
    Parameter: PURCHASEORDER 4500049596
    Parameter: POHEADER
    PMNTTRMS = 0002
    PUR_GROUP = 002
    Parameter: POHEADERX
    PMNTTRMS = X
    PUR_GROUP = X
    Parameter: POITEM
    PO_ITEM = 00001
    CONF_CTRL = 0001
    Parameter: POITEMX
    PO_ITEM = 00001
    PO_ITEMX = X
    CONF_CTRL =  X
    Parameter: POSCHEDULE
    PO_ITEM = 00001
    SCHED_LINE = 0001
    QUANTITY = 10.000
    PO_ITEM = 00001
    SCHED_LINE = 0003
    DELETE_IND =  X
    Parameter: POSCHEDULEX
    PO_ITEM =  00001
    SCHED_LINE =  0001
    PO_ITEMX =  X
    SCHED_LINEX =  X
    QUANTITY =  X
    PO_ITEM =  00001
    SCHED_LINE =  0003
    PO_ITEMX =  X
    SCHED_LINEX =  X
    DELETE_IND = X
    Parameter: POACCOUNT
    PO_ITEM = 00001
    SERIAL_NO = 01
    GL_ACCOUNT = 0000400020
    Parameter: POACCOUNTX
    PO_ITEM = 00001
    SERIAL_NO = 01
    PO_ITEMX = X
    SERIAL_NOX = X
    GL_ACCOUNT = X
    Parameter: POCOND
    ITM_NUMBER = 000001
    COND_TYPE = RA02
    COND_VALUE = 2.110000000
    CURRENCY = %
    CHANGE_ID = U
    Parameter: POCONDX
    ITM_NUMBER = 000001
    COND_ST_NO = 001
    ITM_NUMBERX = X
    COND_ST_NOX = X
    COND_TYPE = X
    COND_VALUE = X
    CURRENCY = X
    CHANGE_ID = X
    Parameter: POPARTNER
    PARTNERDESC =  GS
    LANGU =  EN
    BUSPARTNO = 0000001000
    Help in the Case of Problems
    1. Note 197958 lists answers to frequently asked questions (FAQs). (Note 499626 contains answers to FAQs relating to External Services Management.)
    2. If you have detected an error in the function of a BAPI, kindly create a reproducible example in the test data directory in the Function Builder (transaction code SE37). Note 375886 tells you how to do this.
    3. If the problem persists, please create a Customer Problem Message for the componente MM-PUR-PO-BAPI, and document the reproducible example where necessary.
    Customer Enhancements
    The following user exits (function modules) are available for the BAPI BAPI_PO_CREATE1:
    EXIT_SAPL2012_001 (at start of BAPI)
    EXIT_SAPL2012_003 (at end of BAPI)
    The following user exits (function modules) are available for the BAPI BAPI BAPI_PO_CHANGE:
    EXIT_SAPL2012_002 (at start of BAPI)
    EXIT_SAPL2012_004 (at end of BAPI)
    These exits belong to the enhancement SAPL2012 (see also transaction codes SMOD and CMOD).
    There is also the option of populating customer-specific fields for header, item, or account assignment data via the parameter EXTENSIONIN.
    Further Information
    1. Note 197958 contains up-to-date information on the purchase order BAPIs.
    2. If you test the BAPIs BAPI_PO_CREATE1 or BAPI_PO_CHANGE in the Function Builder (transaction code SE37), no database updates will be carried out. If you need this function, please take a look at Note 420646.
    3. The BAPI BAPI_PO_GETDETAIL serves to read the details of a purchase order. The BAPI cannot read all details (e.g. conditions). However, you can use the BAPI BAPI_PO_CHANGE for this purpose if only the document number is populated and the initiator has change authorizations for purchase orders.
    4. Frequently used BAPIs for purchase orders are BAPI_PO_CREATE, BAPI_PO_CREATE1, BAPI_PO_CHANGE, BAPI_PO_GETDETAIL, BAPI_PO_GETITEMS, BAPI_PO_GETITEMSREL, and BAPI_PO_GETRELINFO.
    5. For more information on purchase orders, refer to the SAP library (under MM Purchasing -> Purchase Orders) or the Help for the Enjoy Purchase Order, or choose the path Tools -> ABAP Workbench -> Overview -> BAPI Explorer from the SAP menu.
    Parameters
    PURCHASEORDER
    POHEADER
    POHEADERX
    POADDRVENDOR
    TESTRUN
    MEMORY_UNCOMPLETE
    MEMORY_COMPLETE
    POEXPIMPHEADER
    POEXPIMPHEADERX
    VERSIONS
    NO_MESSAGING
    NO_MESSAGE_REQ
    NO_AUTHORITY
    NO_PRICE_FROM_PO
    EXPHEADER
    EXPPOEXPIMPHEADER
    RETURN
    POITEM
    POITEMX
    POADDRDELIVERY
    POSCHEDULE
    POSCHEDULEX
    POACCOUNT
    POACCOUNTPROFITSEGMENT
    POACCOUNTX
    POCONDHEADER
    POCONDHEADERX
    POCOND
    POCONDX
    POLIMITS
    POCONTRACTLIMITS
    POSERVICES
    POSRVACCESSVALUES
    POSERVICESTEXT
    EXTENSIONIN
    EXTENSIONOUT
    POEXPIMPITEM
    POEXPIMPITEMX
    POTEXTHEADER
    POTEXTITEM
    ALLVERSIONS
    POPARTNER
    Exceptions
    Function Group
    2012
    </b>
    regards
    prabhu
    Message was edited by: Prabhu Peram

  • Insert,update and delete data in a table using webdynpro for abap

    Dear All,
    I have a requirement to create a table allowing the user to add rows in it and update a row as well as delete a row from that table.To do this I guess I have to make use of ALV.But using ALV I am not able to enter data to a table where as I can make a column editable delete a row etc. please guide me to perform these operations(insert,update and delete) on table.
    Thanks,
    Reddy.

    Hi Sridhar,
    By using ALV you can do all insert delete etc things. if you want to edit i mean you can yenter data in ALV.
    Check this...
    http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3133474a-0801-0010-d692-81827814a5a1
    Editing alv in web dynpro
    editing rows in alv reports
    Re: editing rows and columns in alv reports in webdynpro abap
    Cheers,
    Kris.

  • Insert row and delete row in a table control

    Hi Experts,
    I am using a table control in module pool programming, How can I Insert row and delete row in a table control?
    Thanks in Advance....

    Santhosh,
    Iam using this code..
    FORM fcode_delete_row
                  USING    p_tc_name           TYPE dynfnam
                           p_table_name
                           p_mark_name   .
    -BEGIN OF LOCAL DATA----
      DATA l_table_name       LIKE feld-name.
    data: p_mark_name type c.
      FIELD-SYMBOLS <tc>         TYPE cxtab_control.
      FIELD-SYMBOLS <table>      TYPE STANDARD TABLE.
      FIELD-SYMBOLS <wa>.
      FIELD-SYMBOLS <mark_field>.
    -END OF LOCAL DATA----
      ASSIGN (p_tc_name) TO <tc>.
    get the table, which belongs to the tc                               *
      CONCATENATE p_table_name '[]' INTO l_table_name. "table body
      ASSIGN (l_table_name) TO <table>.                "not headerline
    delete marked lines                                                  *
      DESCRIBE TABLE <table> LINES <tc>-lines.
      LOOP AT <table> ASSIGNING <wa>.
      access to the component 'FLAG' of the table header                 *
        ASSIGN COMPONENT p_mark_name OF STRUCTURE <wa> TO <mark_field>.
    if <MARK_FIELD> = 'X'.
        PERFORM f_save_confirmation_9101.
        IF gv_answer EQ '1'.
          DELETE <table> INDEX syst-tabix.
          IF sy-subrc = 0.
            <tc>-lines = <tc>-lines - 1.
          ENDIF.
          ELSE.
          ENDIF.
        ENDIF.
      ENDLOOP.
    in this code   ASSIGN COMPONENT p_mark_name OF STRUCTURE <wa> TO <mark_field>.
    if <MARK_FIELD> = 'X'.
    this code is not working...

  • Alv data upload and delete in database table

    hi .
       i have done data save in date base but not update and delete..writen this code..
    form save_data.
      CALL METHOD cont_editalvgd->check_changed_data.
      IF lt_display EQ it_city.
        MESSAGE s002(00) WITH 'No data changed'.
      ELSE.
        CLEAR: gd_answer.
        CALL FUNCTION 'POPUP_TO_CONFIRM'
          EXPORTING
            text_question  = 'Save_data?'
          IMPORTING
            answer         = gd_answer
          EXCEPTIONS
            text_not_found = 1
            OTHERS         = 2.
           delete
        IF sy-subrc EQ 0.
         MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
        IF ( gd_answer = '1' ). " yes
            lt_display = it_city.
         else.
         MESSAGE s001(00) WITH 'Action cancelled by user' .
         endif.
         endif.
        DELETE ADJACENT DUPLICATES FROM it_city.
       update zmg_city1 from it_city.
        MODIFY zmg_city1 FROM TABLE it_city.
    *DELETE  zmg_city1  FROM it_city.
        clear it_city.
        COMMIT WORK.
       else.
         DELETE ADJACENT DUPLICATES FROM it_city.
      IF SY-SUBRC EQ 0.
         DELETE ADJACENT DUPLICATES FROM it_city.
         update zmg_city1 from it_city.
        COMMIT WORK.
      endif.
    *ent rows from it_city
       DELETE ADJACENT DUPLICATES FROM it_city.
       update zmg_city1 from it_city.
    endform.                    "save_data
    not working update and delete ...plz say

    hi .
       i have done data save in date base but not update and delete..writen this code..
    form save_data.
      CALL METHOD cont_editalvgd->check_changed_data.
      IF lt_display EQ it_city.
        MESSAGE s002(00) WITH 'No data changed'.
      ELSE.
        CLEAR: gd_answer.
        CALL FUNCTION 'POPUP_TO_CONFIRM'
          EXPORTING
            text_question  = 'Save_data?'
          IMPORTING
            answer         = gd_answer
          EXCEPTIONS
            text_not_found = 1
            OTHERS         = 2.
           delete
        IF sy-subrc EQ 0.
         MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
        IF ( gd_answer = '1' ). " yes
            lt_display = it_city.
         else.
         MESSAGE s001(00) WITH 'Action cancelled by user' .
         endif.
         endif.
        DELETE ADJACENT DUPLICATES FROM it_city.
       update zmg_city1 from it_city.
        MODIFY zmg_city1 FROM TABLE it_city.
    *DELETE  zmg_city1  FROM it_city.
        clear it_city.
        COMMIT WORK.
       else.
         DELETE ADJACENT DUPLICATES FROM it_city.
      IF SY-SUBRC EQ 0.
         DELETE ADJACENT DUPLICATES FROM it_city.
         update zmg_city1 from it_city.
        COMMIT WORK.
      endif.
    *ent rows from it_city
       DELETE ADJACENT DUPLICATES FROM it_city.
       update zmg_city1 from it_city.
    endform.                    "save_data
    not working update and delete ...plz say

  • Delete Fact and Dimension Tables

    Hai All,
              Small question! When deleting data from info cube, it asks whether to delete just Dimension table or both fact and Dimension tables.
    What is the difference between these two?
    Thank you.

    Hi Visu,
    The dimension table will contain the references to char value by way of SID and DIM ids, whereas the fact table will contain the number (of key figures). If you delete just the Fact table, the numbers go away, yet the DIM ids remain intact, so reload is faster. But if you are convinced that this data is not correct either, or you want a clean slate to strat reload again, then delete both Fact and Dim tables. Then when you reload, the DIM ids will be created again.
    Hope this helps...

  • How to perform insert, update and delete in a table component

    hi all,
    i am using a table component in my page. I want to retreive data from multiple tables as well as perform insertion, updation and deletion operation.The changes should be affected in the corresponding tables. can anyone provide a solution for my problem.
    Thanks in advance
    regards,
    prasant

    There is a great tutorial for insert, update and delete records in a table.
    http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/inserts_updates_deletes.html
    Hope it helps.
    Thanks,
    Moumita

  • How do you handle update and delete rules for fact tables?

    I have a fact table with a composite key of 5 columns. Two of the columns are FKs to the date dimension. I was setting the delete/update rules for the FK relationship in SSMS and it had a problem with me creating cascade action on the FKs that connected
    to the date dimension.
    What is the proper way to set up FK relationships in fact tables with SSMS when  you have composite keys as most fact tables do?

    Yeah I understand all that. What I'm trying to do is to protect my database from RI violations that occur by production support people blowing away stuff in a dimension table but forgetting to blow away related records in the fact table. I want those fact
    records deleted automatically so we don't have orphan records which was a real issue at a previous engagement. Production support is usually just people that know SQL and some relational modeling. It's not too likely they will understand the details of dimensional
    modeling enough such that they would know that they had to blow away the fact record first.
    My problem is I have a FK to a role playing dimension (the date dimension in this case). So basically I have to columns in the fact table that have a FK relationship to the PK of the date dimension. When I create both relationships SSMS and try to have both
    of them cascade delete SSMS has an issue with it.
    The error I get is:
    Unable to create relationship '[relationship name]'
    Introducing Foreign Key constraint '[constraint name]' on table '[table name]' may cause cycles or multiple cascade paths. Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other foreign key constraints.
    I can go ahead and put no action and the table will save fine. The question now becomes how does the cascade delete actually work. Can I just set one part of the key to cascade delete?
    Actually I just realized that this is an even bigger design issue. What DOES happen to a fact record when one of it's dimensions gets deleted and I've got full RI set up on the table?
    Or am I totally thinking about this wrong. Do you set up cascade deletes in a dimensional model? Is there a way to prevent deletes from the dimension table if there are related fact records?

  • Add and Delete a row in table

    Hi Expert,
    In SAP interactive form OFFLINE Scneario.
    I have a deep structure. In which i am using other structures like kna1, knb1, knvv.
    Now in KNVV is again a deep structure in which i have a table type.
    Now a draged and droped this table type to my layout  so i got a table.
    I Need to have two buttons ADD and Delete, To add and delete a row in table repectvily.
    I saw other threads also but get not do it.
    My table type attribute's name in KNVV structure is VLACT.
    I write following code on click action of ADD button
    data.#subform[0].Button1::click: - (FormCalc, client) -
    VLACT.row.instanceManager.addInstance(1);
    xfa.form.recalculate(1);
    but it shows error msg
    accessor "VLACT.row.instanceManager.addInstance(1);"
    is unknown.
    Also i am not able to see tabel itself wich i draged and droped. Only two buttons are there.
    Plz help
    Thanks ? Regards,
    Arvind

    Hi Otto,
    This is the code i am using to add new row.
    Also all the settings in form are correct like "Repeat row for each data item" etc.
    I want to have at most 7 rows.
    var nTableLength = Table1.nodes.length; 
      var nNumRow = 0;
        for (var nCount = 0; nCount < nTableLength; nCount ++)
          if ((Table1.nodes.item(nCount).className == "subform") & (Table1.nodes.item(nCount).name !== "HeaderRow"))
           { nNumRow = nNumRow + 1; }
               if (nNumRow == 7)
               { xfa.host.messageBox("The maximum allowable number of rows is 7. You cannot add any more rows.", "Warning", 3); }
           else {
                  Table1.Row1.instanceManager.addInstance(1);
                  xfa.form.recalculate(1);
                   xfa.host.messageBox("row added" );
    I get the msg form the statment        xfa.host.messageBox("row added" );
    But i can not see the newly added row
    Plz help
    Thansks & Regards,
    Arvind

  • Deleted Delta Queue and setup tables on R/3 side

    Hi Gurus,
                  We are in the process of BW upgrade to NW 2004s. There was some confusion and I deleted the delta Queues in RSA7 (delete button on top) and setup tables too.
    Now we have refilled the setup tables but nothing is appearing in RSA7 now.
    Do we need to reinstall datasources and then replicate in BW?
    Please help.
    Regards,
    Anil

    Hi,
    You'll need to initialize the datasources again for anything to show up in RSA7.
    Now are the R3 users also locked out on the R3 side ? Are any Master data being converted, created ?
    If that's the case and users are doing any transactions on the R3 side, you've basically lost the delta data from when you deleted the delta queues to the time you are going to run the inits. There's no way excpet a full update for you to recover all that data. So if R3 side processing is happening as usual, would suggest you start planning on getting the lost data back into BW post upgrade.
    Cheers,
    Kedar

  • Using Bulk operations for INSERT into destination table and delete from src

    Hi,
    Is there any way to expediate the process of data movement?
    I have a source set of tables (with its pk-fk relations) and a destination set of tables.
    Currently my code as of now, is pickin up the single record in cursor from the parentmost table, and then moving the data from other respecitve tables. But this is happening one by one... Is there any way I can make this take less time?
    If I use bulk insert and collections, i will not be able to use the DELETE in the same block for same source record.
    Thanks
    Regards
    Abhivyakti

    Abhivyakti
    I'm not 100% sure how your code flows from what you've stated, but generally you should try and avoid cursor FOR LOOPS and possibly BULK COLLECTING.
    I always follow the sequence in terms of design:
    1. Attempt to use bulk INSERTS, UPDATES and/or DELETES first and foremost. (include MERGE as well!)
    2. If one cannot possibly do the above then USE BULK COLLECTIONS using a combination of RETURNING INTO's and
    FORALL's.
    However, before you follow this method and if you relatively new to Oracle PL/SQL,
    share the reason you cannot follow the first method on this forum, and you're bound to find some
    help with sticking to method one!
    3. If method two is impossible, and there would have to be a seriously good reason for this, then follow the cursor FOR LOOP
    method.
    You can combine BULK COLLECTS with UPDATES and DELETES, but not with INSERTS
    bulk collect into after insert ?
    Another simple example of BULK COLLECTING
    Re: Reading multiple table type objects returned
    P;

Maybe you are looking for

  • How to plot this into a line graph?

    Hi, I just found out that my breakeven point in sales turnover is $132,837. But how would I plot that into Illustrator's line graph? breakeven1.jpg: It's breakeven point is $7,956. breakeven2.jpg: I'm probably doing it wrong. Do I really need to defi

  • Can't download new version of LP (even though I got the email)

    Got an email from apple saying my Pearl Jam Backspacer LP is available to download again for ATV compatibility. But when I go into iTunes and select Check for Available Downloads it says all purchases have been downloaded. Still can't access the LP o

  • Deleted adapter will still recieve messages from the hub

    Hi! Short - some background: We were to move our application from one database to another, and for backup-reasons, we chose to create a new adapter for the new database. I created an adapter which I made subscribe to a few events. I started the adapt

  • About the file size of Default.png

    Hallo forum members, Is there a 2 MB restriction on [email protected]  as there is on normal JPEG pictures? When I save the [email protected] for a widget the filesize goes up to more than 2 MB, as I save the png with 24 Bit. Using 8 bit depth to sav

  • Regarding addon  for 2007b pl0 Vs addon  for 2007b pl8

    hello sap experts is their any relation for Addon  and patch level why am i asking this question is i have addons for 2007b and pl0 but these addons are not working for  2007b and pl8 and if not pls do provide the addons for patch level 8 thanks in a