Delete the database records

Hi All
I  want to delete the records that are older than 40 days in my custom table ZTABLE.
How can I use table maintenence generator to achieve the same?
Will this be done by archiving the records..
Thanks..
Prabhas

hi..
But I do not have a date field in my table..so how can we compare here...
Cam this be done automatically by some settings in table..
thanks..

Similar Messages

  • How to delete a database record by using EJB entity beans

    Hi, All,
    Does anyone know how to use entity bean to delete a database record? I have all the EJB entity beans created, including access beans to each. I can successfully create records, find and update records, however, I haven't find a way to delete records yet.
    Your response is appreciated.
    Cathy

    Please see EJB Forums for continue discussion on this subject.
    Reference titile: "how to delete database record by using CMP entity beans "

  • DB Adapter polling : Not deleting the read records

    Hi,
    I have a simple BPEL process to poll a database table to delete records after reading them.I tried testing by inserting a single record into the table.BPEL is simply creating new instance (as it is not deleting the read records).
    I am using fusion middleware version 11.1.1.3.0.
    Also i am not able to view flow trace.I see a row under flow trace but there is no link to open audit trail or flow page.How to enable this.
    thanks,
    ashok

    Hi Naresh,
    Here is the contents of jca file:
    <adapter-config name="readDB" adapter="Database Adapter" wsdlLocation="readDB.wsdl" xmlns="http://platform.integration.oracle/blocks/adapter/fw/metadata">
    <connection-factory location="eis/DB/ArbonneProd" UIConnectionName="ArbonneProd" adapterRef=""/>
    <endpoint-activation portType="readDB_ptt" operation="receive">
    <activation-spec className="oracle.tip.adapter.db.DBActivationSpec">
    <property name="DescriptorName" value="readDB.CustomersToOracle"/>
    <property name="QueryName" value="readDBSelect"/>
    <property name="MappingsMetaDataURL" value="readDB-or-mappings.xml"/>
    <property name="PollingStrategy" value="DeletePollingStrategy"/>
    <property name="PollingInterval" value="10"/>
    <property name="MaxRaiseSize" value="1"/>
    <property name="MaxTransactionSize" value="10"/>
    <property name="NumberOfThreads" value="1"/>
    <property name="ReturnSingleResultSet" value="false"/>
    </activation-spec>
    </endpoint-activation>
    </adapter-config>
    Under trace i see below record:
    Instance Type Usage State
    ReadDB of service:<instanceid> JCA Adapter Service Completed

  • How to Delete the condition record in CRM

    HI,
    Can you please help me how to delete the condition record from condition table in CRM.
    Please explain the usage of FM CRMXIF_CONDITION_SEL_DELETE with examples.
    I have also read the documention of the function module. How to use this FM for custom defined condition table.
    (this is the code given in Documentation)
    DATA-OBJECT_REPRESENTATION         = 'E'
    DATA-SEL_OPT-CT_APPLICATION              = 'CRM'
    DATA-SEL_OPT-OBJECT_TASK                    = 'D'
    DATA-SEL_OPT-RANGE-FIELDNAME        = 'PRODUCT_ID'
    DATA-SEL_OPT-RANGE-R_SIGN                  = 'I'    (Including)
    DATA-SEL_OPT-RANGE-R_OPTION           = 'EQ'
    DATA-SEL_OPT-RANGE-R_VALUE_LOW  = 'PROD_1'
    Thanks
    Shankar

    Hi Shankar,
    I am using the same CRMXIF_CONDITION_SEL_DELETE function module to delete condition record present in CRM.
    But it is giving me below error in the return table of the FM after i run the program. Can you please correct me if I am doing any thing wrong?
    Error in  lt_return: SMW3     CND_MAST_SEL_DEL_EXT_VALIDATE     CND_M_SD
    code:
    ls_range-fieldname = 'PRODUCT_ID''.
    ls_range-R_SIGN = 'I'.
    ls_range-R_OPTION = 'EQ'.
    ls_range-R_VALUE_LOW = '123456'.
    APPEND ls_range TO lt_range.
    MOVE lt_range TO ls_entry-SEL_OPT-range.
    ls_data-SEL_OPT-object_task = 'D'.
    ls_data-SEL_OPT-ct_application = 'CRM'.
    ls_data-object_representation = 'E'.
    CALL FUNCTION 'CRMXIF_CONDITION_SEL_DELETE'
      EXPORTING
        DATA          = ls_date
    IMPORTING
       RETURN        = lt_return
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
      IMPORTING
        return = lt_ret.
    Edited by: Saravanaprasad Nadar on Jul 7, 2010 1:27 AM

  • How to delete the material records related to storage type

    Dear SAP guru's,
    I got a situation that if the material "XXXXXX" exists in two different storage type (let say 001 & 002 ) and the material needs to be removed out of one (Let say 002) to avoid the picking and putaway in future.
    Inorder to accomplish an above requirement we tried the below cases
    Case 1: By flagged the material "XXXXXX" under storage type 002 in MM06 transaction.But it didn't restrict the system on allocating and removing the stock from /to to the storage type 002.
    Case 2:After we flagged the material for deletion under storage type 002 ,we used to MM71 transaction to archive & delete the material record that assocaited with the storage type 002 completely.
    I am kind of queiries to know if there is any other method or procedure available to delete the storage type associated material records in SAP.
    Please guide me with the other options.Thanks.
    Regards,
    John.

    Hi John,
    Its very simple, remove the Storage type indicators from the material master - Warehouse View 1 at Stock placement & Stock removal section, with this it won't pickup or place the materials in the concerned storage type.
    If you have extended this materials to more than 1 storage type, you need to do the same for all the storage types.
    Reward if it is helpful.

  • How to delete the duplicated records, not just surpress the records?

    I am new to CR. Right now I am doing a project which needs CR get query from Oracle. I got the query from Oracle. There are records with duplicated fields. For example (the following only show part of fields):
    ID    body_code  
    1            10            
    2             10            
    3             15            
    4              15           
    5              15           
    6              16           
    I need to only select records (not surpress, because I will do some caluculate later) like following:
    ID         body_code        
    1             10         
    2              15
    3               16   
    I tried to creat selection fomula in fomula workshop, shown as follows:
    onlastrecord;
    <>next
    but CR said next can be evaluated. I think it must have something to do with the print-time. So what show I do to delete the duplicated records.Thank you very much.

    Ting,
    Try this:
    Insert a group on body_code.  Then create a running total called Distinct Count.  Field to summarize -> ID, Evaluate on change of group Group # 1 Body Code, and Never Reset.
    Then insert a chart in the report header:
    In the advanced layout, select body_code on change of and select Distinct Count running total in the Show values.
    I hope I understood what you're looking to accomplish.
    Z

  • How to delete the duplicate records in a table without promary key

    I have a table that contains around 1 million records and there is no promary key or auto number coulums. I need to delete the duplicate records from this table. what is the simple effective way to do this.

    Please see this link:
    Remove duplicate records ...
    sqldevelop.wordpress.com

  • How to delete the single record from the  ODS

    HI,
       I want to DELETE  the particular record from ODS.. how to delete that..
    plz give me the solution.. it's urgent..
    with regards
    @jay

    Hi Prakash,
        You can delete a particular record from ODS by specifying the key field name in Selective deletion button available in Contents tab in the manage screen of ODS. But it will only delete the record from the active data table and not from the Change log and new data table . You should be very carefull if you are doing in Production system as there is chance of deleting other records accidentally.
    Go to Selective deletion button - > Click on delete selection -> Enter the key field values of the record you want to delete-> Press save button to save as Variant -> Go back and click on selection button -> Chosse the background job type -> Click on start button.
    Regards,
    Prakash

  • Delete the parent records and child table records at a time

    hi all;
    I am facing the pbm like to delete the all records in child table and corresponding records in parent table at a time. so I want to delete the all the records in child table and corresponding parent records in parent table by using single SQL query. plz help me
    Thanks in advance

    You want to use one single SQL statement to delete the child records in a table and the corresponding master records in the master table??
    That's not quite possible with a single SQL, of course unless you are talking about Oracle Forms, where you have a relation and set the delete behavior to Cascading, like said in the above posts.
    Tony

  • Convert the Database records to a standard XML file format?

    Hai,
    i want to convert the Database records to a standard XML file
    format which includes the schema name, table name, field name
    and field value. i am using Oracle 8.1.7. Is there any option
    please help me
    Thanks in advance.

    You could put the files somewhere and I can export them as QuickTime. Or you could find anyone you know who has Director. Or do the 30 day trial download
    Another approach would be to play the DCR in a browser window, and do a screen recording. But that’s unlikely to give the perfect frame rate that you would get by exporting from Director.

  • DELETE THE MATCHED RECORDS IN DB2 TABLE

    DELETE THE MATCHED RECORDS IN DB2 TABLE
    sql server table sqlserver_emp(c1,c2,c3,4)
    records:1 2 3 4
    DB2 table db2_emp(c1 key,c2,c3,c4)
    records:1 2 5 6 7 8
    Both tables having same structure
    Matched records : 1 2
    1.Delete the matched records in db2 table : 1 2 (without using truncate option for DB2 in Anywhere)
    2.Finally Load all records in sql server(Because duplicate records in db2 already removed so no duplicates occured)
    3.NEED final OUTPUT AS:db2 table: 5 6 7 8 1 2 3 4
    Note:
    1.DB2 truncate doesn't used
    2.STARING AREA: ORACLE
    3.SQLSERVER AND DB2 CLOSED ENVIRONMENT DOESN'T USED AS STAGING AREA.
    HOW MANY INTERFACES AND PROCEDURES SHOULD BE CREATE? WHAT ARE THEY?
    HOW TO REACH MY REQUIREMNT?
    Answer provider is more appricatable.
    Thanks in advance.
    Edited by: krishna on Nov 9, 2011 8:40 PM

    1st option
    See in this scenario you can use two interface and one procedure step.
    1st interface-->poricedure-->2nd interface
    1st interface will bring data to oracle staging-->then procedure will delete matched record from target using keys--->3rd interface will simple insert the the data in oracle staging.
    2nd option
    Insted of deleting the target matched records, you just update target matched record with latest records in your staging oracle.You can use IKM Merge
    Thanks

  • DELETING THE MASTER RECORDS

    Hi gurus,
    i want to upload the new master records into my system regarding the MM. first thing i want to delete the old records in the system and freshly want to load into the system. please give me the soluion how to do it.
    it is a development server..
    thanks in advance..
    ravi

    i want to upload the new master records into my system regarding the MM. first thing i want to delete the old records in the system and freshly want to load into the system. please give me the soluion how to do it.
    >
    > it is a development server..
    When uploading the new master records, just assign the previous numbers used by the old master records and the new upload will overwrite those old records. In this case deleting/overwriting the old records.
    If you dont assign the new upload any numbers, it will append below the exisiting records, that way not deleting the old records.

  • Deleting the duplicate records

    Hi all,
    I have some duplicate records in the PSA . and i want to delete the duplicate records before the data is entered into the data target. Can anybody tell me how to achieve this.
    Actually i need to achieve this  by using the ABAP code.
    Thanx & Regards,
    RaviChandra
    Edited by: Ravichandra.bi on Mar 5, 2012 3:37 PM

    Hi Ravi,
    If its a full load to the PSA and because of it you are getting duplicate records and you want to eliminate them,
    you can do what  Anshul and Durgesh suggested.
    Write the code in the start routine of the transformation to your target
    SORT SOURCE_PACKAGE BY KEY1 KEY2 KEY3. "(The key will be the key of your target)
    DELETE ADJACENT DUPLICATES FROM SOURCE_PACKAGE
          COMPARING KEY1 KEY2 KEY3.
    Hope this helps
    Regards,
    Joe

  • Delete the parent record

    hi all,
    based on the thread i got the list of child tables.
    Re: to find the tables which is having link with particular table.
    no i have doubt in deletion process.
    My ultimate aim is to delete the bl_det records.
    let me explain with ex.
    i have table
    BL_DET --parent table with comp and ref as primary key
    which is having child rec.
    BL_CON --child of BL_DET(comp,ref) primary key comp,ref and serial
    BL_CON_PCK --is child of BL_CON(comp,ref,serial) primary key comp,ref,serial,pck_gp_srl,gp_srl.
    DELETE BL_CON_PCK
    WHERE BCK_COMP = :GLOBAL.comp
    AND BCK_REF = :parameter;
    DELETE FROM BL_CON
    WHERE BCR_COMP = :GLOBAL.comp
    AND BCR_REF = :paramter
    DELETE FROM BL_DET
    WHERE BL_COMP = :GLOBAL.comp
    AND BL_REF - :parameterwill delete the correct set of records.(my doubt area is delete statement written for the table BL_CON_PCK).
    Please tell me if i am wrong.
    Thanks..

    (my doubt area is delete statement written for the table BL_CON_PCK).Cannot understand your doubt. What is your doubt, are you getting any error while executing your code?
    To delete a record from parent table all child references must be deleted. So your delete statement appears right
    -- How delete should progress
    BL_CON_PCK >> BL_CON >> BL_DET
    {code}
    If you have created foreign constraint using ON DELETE CASCADE or ON DELETE SET NULL then you can straight away delete from parent table and all child references are deleted/set as null respectively. Read Oracle Documentation to see details
    Short demonstration
    {code:sql}
    SQL> CREATE TABLE A(a1 NUMBER PRIMARY KEY , a2 NUMBER);
    Table created
    SQL>  CREATE TABLE B(b1 NUMBER PRIMARY KEY , a1 NUMBER);
    Table created
    SQL>  CREATE TABLE C(c1 NUMBER, b1 NUMBER);
    Table created
    SQL>  ALTER TABLE B ADD CONSTRAINT FK_B FOREIGN KEY (a1) REFERENCES A ON DELETE CASCADE;
    Table altered
    SQL>  ALTER TABLE C ADD CONSTRAINT FK_C FOREIGN KEY (b1) REFERENCES B ON DELETE CASCADE;
    Table altered
    SQL>  INSERT INTO A VALUES (1,2);
    1 row inserted
    SQL>  INSERT INTO B VALUES (3,1);
    1 row inserted
    SQL>  INSERT INTO C VALUES (4,3);
    1 row inserted
    SQL>  SELECT * FROM A;
            A1         A2
             1          2
    SQL>  SELECT * FROM B;
            B1         A1
             3          1
    SQL>  SELECT * FROM C;
            C1         B1
             4          3
    SQL>  DELETE FROM A WHERE A1=1;
    1 row deleted
    SQL>  SELECT * FROM A;
            A1         A2
    SQL>  SELECT * FROM B;
            B1         A1
    SQL>  SELECT * FROM C;
            C1         B1
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to delete the matching records from two internal tables

    Hi ,
    I have two internal tables say A and B of the same type. If A has 10 records and B has 4 records , I want to delete the 4 records in B from A .
    loop at B into wa .
    delete A where key = wa - key .
    endloop.
    takes a long time if the table B is huge. how can I improve the performance.
    Thanks.
    Gayathri

    Hi Gayathri,
    You could try field-symbols. It reduces the data transfer from the internal table B to the work area.
    field-symbols <fs_itab_b> like line of B.
    loop at B assigning <fs_itab_b>.
      delete A where key = <fs_itab_b>?-key.
    endloop.
    Regards,
    <a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=zwcc%2fwm4ups%3d">anand Mandalika</a>.

Maybe you are looking for

  • How to keep Single Songs out of Album View?  iTunes11

    What is the proper way to label singles so that Album View does not contain an 'Unknown Album' for each artist with at least one song?  You would think leaving the 'album artist' and the 'album' field blank it would not put that song in album view, b

  • MacBook Pro late'08 Hinge rubbing

    Folks, I notice today soemthing really strange that on the right hand side of my laptop while the lid is open (near the power button side) in the insdie corner hinge i have something deep scratch line there and looks like when i close and open lid it

  • Upgrade from Forms AS10g (9.0.4) to (10.1.2.0.2)

    Hai, Can anybody please give me link for upgrading from Forms AS10g (9.0.4) to (10.1.2.0.2)

  • Error when installing apps: Cannot connect to iTunes store

    I have a 3G and i've been able to download and install apps through the app store via iPhone. Recently, the iTunes store on my computer gives the error "We could not complete your iTunes store request. An Unknown error occured (5002)" anytime i searc

  • Oracle BI Administration tool - Connection has failed

    Hi, can any one let me know how to connect database in oracle bi administration tool, am trying to connect it but it always give an error the connection has failed