Archiving customized tables

Hi,
I want to archive around 10 tables for the past 30 days.  i  have used the following code to archive for one table.
* Internal table to store the records that was retrieved
DATA :  BEGIN OF GET_TAB OCCURS 1000.
        INCLUDE STRUCTURE ZFIT0056.
DATA :  END OF GET_TAB.
MOVE SY-DATUM TO TEMP_DATE.
SUBTRACT 30 FROM TEMP_DATE.
IF WA_CNT <> 0.
  PERFORM MOVE_RECORDS.
ENDIF.
FORM MOVE_RECORDS.
  CLEAR GET_TAB.
  TEMP_DATE = TEMP_DATE  + 1.
  MOVE TEMP_DATE+0(4) TO DATE_YY.
  MOVE TEMP_DATE+4(2) TO DATE_MM.
  MOVE TEMP_DATE+6(2) TO DATE_DD.
  CONCATENATE 'DR' DATE_DD DATE_MM DATE_YY '.AAA' INTO FILENAME.
  SELECT * FROM ZFI00001 INTO GET_TAB WHERE FILENAME1 = FILENAME.
    IF SY-SUBRC  = 0.
      APPEND GET_TAB.
    ENDIF.
  ENDSELECT.
  PERFORM ADD_RECORDS.
ENDFORM.                 
FORM ADD_RECORDS.
  INSERT ZFI00006 FROM TABLE GET_TAB.
  IF SY-SUBRC = 0.
    PERFORM DELETE_RECORDS.
  ENDIF.
ENDFORM.                    "add_Records
FORM DELETE_RECORDS.
  DELETE FROM ZF000001WHERE FILENAME1 = FILENAME.
  IF SY-SUBRC = 0.
    WA_CNT = WA_CNT - 1.
  ENDIF.
ENDFORM.                    "delete_records
can anybody suggest me a simpler way to archive all the 10 tables in a single program.

Hi,
Hope this link will helpful to you Re: Archiving
http://www.pbs-software.com/medien/praesentationen/PBS_CUSTOM_EN.pdf
Regards,
Pravin

Similar Messages

  • How to archive custom tables???

    Hello gurus,
    I have been assigned to a archiving assignment..
    To archive standard tables SAP provided with standard archiving object.. but how to archive custom tables and how to creat customized archiving object..
    each reply will be rewarded...
    Regards
    RR

    Hi Ramana,
    Check the following links:
    Re: Archiving of Z Table
    Re: Archiving
    These contain the information you need to archive custom table.
    These may be helpful to you.
    Regards.
    Rajat

  • Create Object for archiving Custom Table

    Hi guru!!
    I have a problem, I must create a archiving object for custom table..
    I must create a report for READ, DELETE and ARCHIVING this type of table..
    colud you help me?
    thanks a lot guru!!!

    Hi,
    Steps..
    GO TO SE11
    Give the table name
    Press change..
    In the menu..UTILITIES -> TABLE MAINTENANCE GENERATOR.
    GIve the authorization group &NC&
    Choose the single step radio button..
    Give the screen number 1.
    Give the function group..Give the table name itself as the function group.
    Press create. button.
    Now the screen is generated..go to sm30 and maintain the table entries..
    Thanks,
    Naren

  • Archiving  custom table

    hi ,
    can anyone provide step by step info on archiving ztable
    thks,
    vj.

    Hi Vijay,
    Have a look at example programs,
    RSARCH_CREATE_TESTOBJECT  -  Example Program for Creating a Generated Archiving Object
    RSARCH_CHANGE_TESTOBJECT  - Example Program for Changing a Generated Archiving Object
    RSARCH_DELETE_TESTOBJECT  -  Example Program for Deleting a Generated Archiving Object
    Hope this helps
    Thanks
    Lakshman

  • Archiving / Purging Custom table

    Hello!
    I would like to ask if there is a program in Oracle EBS that I could used to set up to archive custom tables? If not, what would you recommend a best approach.

    9ff898ea-85f6-4303-af4e-b42cfcc64343 wrote:
    Hello!
    I would like to ask if there is a program in Oracle EBS that I could used to set up to archive custom tables? If not, what would you recommend a best approach.
    Oracle doesn't provide seeded concurrent programs to purge/archive custom tables since this varies from one customer to another and the business requirements are not the same -- You should create custom concurrent programs (or scripts) to purge/archive your custom tables.
    If you are looking for 3rd party archiving/purging solutions, please see:
    https://forums.oracle.com/message/4060032
    https://forums.oracle.com/message/9155043
    Thanks,
    Hussein

  • Archiving customerown  tables

    hi,
    does anyone how you normally archive customown tables?
    e.g.
    we have normal table bsec and we have created a bsec with some additional fields.
    now we ann archive them.. together? or creating an own archive object?
    Thanks a lot
    Stefan

    Hi Stefan,
    To archive custom tables, you should use Archive Development Kit (ADK). you can create own archive objects for custom tables and corresponding archiving programs.
    For modified standard with additional fields, maybe you need to modify the archive object and the archiving programs accordingly.
    pls see the link for info on ADK:
    http://help.sap.com/saphelp_nw04s/helpdata/en/2A/FA0391493111D182B70000E829FBFE/frameset.htm
    hope this helps,
    Naveen

  • RE: Include customized table into MM_EKKO archiving

    I had a customized table, ZEXP_PO that shares the same key as EKKO.
    I want to include this table during the archiving for MM_EKKO.
    Can any guru shares on how to configure it?
    Do I need to create a new customized program to archive as well as  delete?

    Hi,
    You can enhance the write program RM06EW47 using the BAdI ARC_MM_EKKO_WRITE. This BAdI is used to write the customer specific table entries to the archive. It is called within the write program for each  business object between the call function ARCHIVE_NEW_OBJECT and ARCHIVE_SAVE_OBJECT.
    Hope this helps.
    Cheers!
    Samanjay

  • Archiving Object - Entry missing in Customizing table for object Z*********

    Hello friends,
    We have created a archiving object in transaction AOBJ. However when i enter this object in SARA, we get this error message.
    "Entry missing in Customizing table for object Z******* "
    I have matched my object with few other archiving objects and things looks similar.
    Have you faced this kind of problem..
    thanks
    ashish

    Hi,
    I checked and i can see entry for ZSCS_TRAFO object in AOBJ.
    But when i enter ZSCS_TRAFO, i get this error :
    Entry missing in Customizing table for object ZSCS_TRAFO
    Message no. BA057
    Diagnosis
    A function cannot be executed due to a missing table entry.
    Procedure
    Please create an entry for the archive object ZSCS_TRAFO with the AOBJ transaction.
    However, a few other Z objects works well.
    thanks
    ashish

  • Archive Object  GLFUNCA, GLFUNCP and other Custom table ZGLFUNCA, etc

    Hi Expert,
        I am encountering one issue that is how to define the write and delete program. I have three standard tables which have standard archive object and meanwhile I have another three custom own table which have the relationship with these standard table. Now I'm wondering should I defiine the dependency of these two archive objects and check only when the first object is done, the second one can proceed.
       I'm really looking forward your advice, so far I plan to create one 'z' archive object which include three custom tables and put the standard archive object as dependency object. But how to proceed with the write and delete program?
    Please kindly give your advise and solutions. Thank you.

    Hi,
    you can ask your ABAP consultant to code in the table maintenance events. We need to call appropriate authorization objects in the events and allow/disallow the changes for a field/record based on the authorization.
    If you want more details on TMG events, just search in SCN. We have lot of information on this.
    Thanks,
    Vinod.

  • Data Archival for Custom Tables

    Hi Experts,
    We have a requirement of archiving the related custom tables while we archive the standard SAP tables data. We are going a head with creating the custom archiving objects to handle this. However, i would like to know about the feature of "Exit routine assignement in generation" in the standard Archiving objects (AOBJ).  Can this be used to handle custom tables data? If yes, can you please provide me an example how this can be acheived? If not, what is the purpose of this?
    Please help!!
    Thanks and Best Regards,
    Surya

    Hello Lavaughn,
    I can not speak for SAP, but from my personal experience TimeStamps are the state of the art to store time date info in db tables. Even with date/Time fields a conversion to the local timezone is necessary. Of course you can reuse your db definition on dynpros. But since UI and business logic will be divided anyway this is also not really a valid point.
    Best Regards
    Klaus

  • Custom Table for Verifying Duplicate Invoice against Legacy Invoice Data

    Hi All,
    We are trying to upload legacy invoice data in a custom table. Then we want to use SAP duplicate invoice check functionality to look for the potential duplicate invoice from this custom table as well apart from the standard SAP tables.
    If you know of some user exit or any function module which I can use to link this custom table with the standard SAP duplicate invoice check functionality then it would be of great help.
    Regards,
    Sanjay

    Hi Jurgan!
    Thanks for the reply,
    We are using ECC6,
    Support pack : SAPKH60013
    Settings for Duplicate Invoice Check In Vendor Master is correct
    Customization setting OMRDC transaction, tick mark for invoice reference no. only
    If all the cited characteristics match, the system displays a
    customizable message. M8462 (if logistics invoice documents are found) or M8108 (if accounting documents are found).
    I have ensured that message M8108 (if accounting documents are found) is maintained as an error message in OMRM.
    Still system is allowing duplicate invoices for the reference nos. 00082 and 00072.
    For other reference Nos. which are previously used for other documents, system issues error message successfully.
    I dont want to delete archived accounting doc. and if I maintaind BKPF entris of this archived doc manually it will create probelm in FI.
    is this happen due to life span of secondory index of archived accounting doc. is completed ?.
    Please Help
    Many Thanks
    Vikas

  • Giving Error When Selecting From a Custom Table

    There is a custom report 'Z*'  which archives data.
    In this report, while selecting data(needs to be archived) from a custom table 'Z*_T', giving runtime error in Production Server.
    The select statement is written below :
    *data izX like z_t occurs 1000 with header line._
    *select * from z*t into table i_zX.*_
    How can I change the select statement so that it will work properly?

    Sas..
    From your example code it appears you are trying to use a wild card for both your dbtable and the internal table.
    To do this, you will lilkely need to use a Field Symbol for the target internal table and your FROM will need to be a varible
    FROM (dbtabname)
    The ABAP Helps gives this example for the Select Table
    DATA  TABNAME(10).
    DATA: BEGIN OF WA,
            ID   LIKE SCUSTOM-ID,
            NAME LIKE SCUSTOM-NAME,
            REST(134),
          END OF WA.
    TABNAME = 'SCUSTOM'.
    SELECT * INTO WA FROM (TABNAME).
      WRITE: / WA-ID, WA-NAME.
    ENDSELECT.

  • Archiving of table

    I have been given a Change Request for Archiving a table (ZSOP_Cust). I am an FICO Consultant here. I know that arcgiving a table can effect other tables too? Can someone tell me how can i check how & which tables are effected?
    Also tell me other points i shd consider before archiving this table??
    Thanks in advance

    Standard Archiving of standard SAP tables will handle all of the connections.  It will not allow you to archive a record from a table if the ties to other tables are not closed as well.  For custom tables, there are no archiving functionality.   Your ZSOP_Cust table, seems to be a custom table and the ties to other standard objects are not documented in the system, hence you can blow away the entire table, and SAP will not care.
    Regards,
    Rich Heilman

  • Error while deleting a customer table

    When I try to delete a customer table which is saved as a local object I get an error stating that the table is still used in ABAP Dictionary. It seems that the customer table is still used in a customer program, but the program is already deleted! I deleted the program earlier and thus no longer exist in our system. I cannot find any trace of the program, but am unable to delete the customer table now. Any suggestions?

    Program name would have been of the table maintenance generator and you deleted it manually.
    It should have been deleted from TMG .
    Your problem will be resolved if you will create Table maintenance of the database table and then delete it again.

  • How to find out the user who has created  a new field in the custom table.

    How to find out the user details who has created  a new field in the custom table.
    Thanks,
    Joan

    Hi Jesudasan ,
    You can know the user details with version management.Please find the
    below procedure to know.
    Go to table->Utilities tab->version->Version management->Compare the previous one .
    Hope this solves the issue,Let me know if you have any issues.
    Thanks,
    Rajani

Maybe you are looking for

  • MacPro won't boot-up...I think it's hardware related

    Sorry, this is detailed, but I figured I had to explain everything I've done so far and the issues I've had. Thanks much! My MacPro won't boot up. Initially I thought it was a software problem, and went through this thread looking for help. After a w

  • Oracle ADF Security Login page

    hi. I am using oracle ADF 11.1.2.2.0 (oracle Jdevelopr 11g release 2) in my job environment. There are 3000 users working as client level in our company. They have separated user Id and roles. They can change their passwords. There are expiration per

  • Lightroom 3.2 previews of presets not showing in Develope module.

    Hey, any idea why LR 3.2 will not preview the effects of presets when scrolling over them in the Develop module?  This was a fast way to work creatively with previous versions of LR. This happens for all presets, including those shipped with LR.  Pre

  • How to group measurement data into different groups using TDMs

    Hi, frnds! I have designed a labview program for measuring the power current characteristics of a laser diode. I want to save the current and power arrays measured at different temperatures in different groups. I tried to implement this but I was not

  • Running osx 10.4.1 and cannot get new itunes installed.

    Is there a way because I have to work on a pc for my iphone to sink and that *****. I cannot afford an upgrade for my software and do not know if it is compatible with my system if i wanted to do so