How to record the records deleted in a table

Hi Experts
I want to run a report as a batch which should deleted the records
which are sysdate - 60 and The report should log the number of records deleted
from each table at End Of Run.
Criteria for selecting records to be deleted are as follows:
1.     ZINT_DATA
u2022     ZINT_DATA.CREATED_ON <= (Today u2013 60 Days)
               and ZINT_DATA.STATUS = u2018OKu2019
So I want to create a table for log history recorded as
Delete Date         Log description
01.01.2008        1500 rows deleted
30.03.2008        2000 rows deleted.
30.04.2008        300  rows deleted.
Eg The table are ZINT_DATA.
The report starts like this
REPORT z_eslp_command.
DATA:
  fs_zint_data TYPE zint_data.
DATA:
  t_zint_data TYPE
          TABLE OF
                  ZINT_DATA.
START-OF-SELECTION.
SELECT *
   FROM ZINT_DATA
   INTO TABLE t_ZINT_DATA PACKAGE SIZE 10000.
ENDSELECT.
LOOP AT t_zint_data INTO fs_zint_data.
INSERT INTO ZINT_DATA_DEL
      VALUES fs_zint_data.
select count(*) from zint_data_del.
ENDLOOP.
IF sy-subrc EQ 0.
  WRITE:
    'DATA INSERTED FROM ZINT_DATA into ZINT_DATA_DEL'.
ENDIF.
But Instead of creating another table , I want only log to be recorded as described.
Thanks
Regards
Piroz

Hi Kiran
See the final modification of the report but I am getting an error as
Field " Corresponding_fields" is unknown, it is neithere in one of the specified tables nor defined by a
DATA statement, but I have already created an internal table itab1 , could you check and revert with the correction.
REPORT  ZSD1DELETION                .
TYPE-POOLS:SLIS.
*Used in ZSDI_INTERFACE1 Program.
TABLES:ZINT_DATA_DEL  . 
*DATA: BEGIN OF ITAB1 OCCURS 0.
*DATA: SL_NO TYPE SY-TABIX.
     INCLUDE STRUCTURE zint_data_del.
*DATA:END OF ITAB1.
DATA: BEGIN OF ITAB1 occurs 0 ,
      MANDT type zint_data_del-mandt,
      ZINT_ID type zint_data_del-zint_id,
      ZINT_TY type zint_data_del-zint_ty,
      CREATED_ON type zint_data_del-created_on,
      KEY_VAL type zint_data_del-key_val,
      SEQUENCE type zint_data_del-sequence,
      STATUS type zint_data_del-status,                 
      LENGTH type zint_data_del-length,           
      RAW_DATA type zint_data_del-raw_data,       
      end of itab1.
*DATA: i_data TYPE TABLE OF ITAB1, " internal table
*wa_data TYPE ITAB1. " work area
DATA:LINE1(10) TYPE C,
     LINE2(10) TYPE C,
     date1(10) type c,
     date2(10) type c,
     name1(60),
     string1(100),
     title1(65),
     title2(100) type c,
     FNAME TYPE STRING.
*Declarations for ALV
DATA:itfieldcat TYPE slis_t_fieldcat_alv WITH HEADER LINE.
DATA:itrepid TYPE sy-repid.
itrepid = sy-repid.
DATA:itevent TYPE slis_t_event.
DATA:itlistheader TYPE slis_t_listheader.
DATA:walistheader LIKE LINE OF itlistheader.
DATA:itlayout TYPE slis_layout_alv.
DATA:top TYPE slis_formname.
DATA:itsort TYPE slis_t_sortinfo_alv WITH HEADER LINE.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
*PARAMETERS:P_WERKS LIKE BSEG-WERKS.
SELECT-OPTIONS: S_DATE FOR ZINT_DATA_DEL-CREATED_ON OBLIGATORY.              
SELECTION-SCREEN END OF BLOCK B1.
*Validations w.r.t the Date
AT SELECTION-SCREEN ON S_DATE.
IF S_DATE IS INITIAL.
MESSAGE 'Enter the Date' type 'E'.
*Records from 2007 can't be deleted.
ELSEIF S_DATE-LOW+0(4) >= '2007' AND
       S_DATE-HIGH+0(4) >= '2007'.
MESSAGE 'Records from the Year 2007 cannot  be Deleted' type 'E'.
ENDIF.
CONCATENATE  s_DATE-low6(2) '.' s_DATE-low4(2) '.' s_DATE-low+0(4)
INTO date1.
CONCATENATE  s_DATE-high6(2) '.' s_DATE-high4(2) '.' s_DATE-high+0(4)
INTO date2.
PERFORM GETDATA.
*&      Form  DOWNLOAD
      text
-->  p1        text
<--  p2        text
form GETDATA.
SELECT * FROM ZINT_DATA_DEL
         INTO CORRESPONDING_FIELDS OF TABLE ITAB1
         WHERE CREATED_ON IN S_DATE.
IF ITAB1[] IS NOT INITIAL.
DESCRIBE TABLE ITAB1 LINES LINE1.
PERFORM DELETION.
PERFORM ALV.
ELSE.
MESSAGE 'No Data' type 'S'.
ENDIF.
endform.                    " GETDATA
*&      Form  DELETION
      text
-->  p1        text
<--  p2        text
form DELETION .
DELETE FROM ZINT_DATA_DEL WHERE CREATED_ON IN S_DATE.
endform.                    " DELETION
*&      Form  alv
      Fieldcatalog for ALV Report
FORM alv.
LOOP AT ITAB1.
ITAB1-SL_NO = SY-TABIX.
MODIFY ITAB1.
ENDLOOP.
  DEFINE m_fieldcat.
    itfieldcat-fieldname = &1.
    itfieldcat-col_pos = &2.
    itfieldcat-seltext_l = &3.
    itfieldcat-do_sum = &4.
    itfieldcat-outputlen = &5.
    itfieldcat-edit = &6.
    append itfieldcat to itfieldcat.
    clear itfieldcat.
  END-OF-DEFINITION.
  m_fieldcat 'MANDT'     '' 'Client' '' 03 ''.
  m_fieldcat 'ZINT_ID' ''   'Id' '' 10 ''.
  m_fieldcat 'ZINT_TY'   '' 'Type.'  '' 05 ''.
  m_fieldcat 'CREATED_ON' '' 'Date Created on' '' 25 ''.
  m_fieldcat 'KEY_VAL'       '' 'key value'  '' 04  ''.
  m_fieldcat 'SEQUENCE' '' 'sequence' '' 06 ''  .
  m_fieldcat 'STATUS'   '' 'status.' '' 10 ''.
  m_fieldcat 'LENGTH'    '' 'Length.' '' 18 ''.
  m_fieldcat 'RAW_DATA'    '' 'Raw Data' '' 15 '' .
  itlayout-zebra = 'X'.
  itlayout-colwidth_optimize = 'X'.
  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
        i_callback_program      = sy-repid
        is_layout               = itlayout
      i_callback_user_command =  ' '
        i_callback_top_of_page  = 'TOP'
        it_fieldcat             = itfieldcat[]
        i_save                  = 'A'
     is_variant              = ITVARIANT
        it_events               = itevent[]
     is_print                = ITPRINTPARAMS
        it_sort                 = itsort[]
      TABLES
        t_outtab                = itAB1
        EXCEPTIONS
        program_error           = 1
        OTHERS                  = 2.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.
ENDFORM.                    "alv
*&      Form  TOP
    Top of page for ALV Report
FORM top.
   CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
     EXPORTING
        i_list_type           = 0
     IMPORTING
        et_events             = itevent
EXCEPTIONS
  LIST_TYPE_WRONG       = 1
  OTHERS                = 2
  IF sy-subrc  0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
string1 = 'Records from'.
CONCATENATE string1 date1 'to' date2 INTO title1
SEPARATED BY space.
walistheader-typ = 'H'.
walistheader-info = title1.
APPEND walistheader TO itlistheader.
CONCATENATE 'Records Deleted' '-' LINE1 INTO title2.
walistheader-typ = 'H'.
walistheader-info = title2.
APPEND walistheader TO itlistheader.
  CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
      it_list_commentary      = itlistheader
    I_LOGO                   = ''.
    I_END_OF_LIST_GRID       =
   ENDIF.
  CLEAR itlistheader.
ENDIF.
ENDFORM.                    "TOP
Regrds
Piroz

Similar Messages

  • How to find the level of each child table in a relational model?

    Earthlings,
    I need your help and I know that, 'yes, we can change'. Change this thread to a answered question.
    So: How to find the level of each child table in a relational model?
    I have a relacional database (9.2), all right?!
         O /* This is a child who makes N references to each of the follow N parent tables (here: three), and so on. */
        /↑\ Fks
       O"O O" <-- level 2 for first table (circle)
      /↑\ Fks
    "o"o"o" <-- level 1 for middle table (circle)
       ↑ Fk
      "º"Tips:
    - each circle represents a table;
    - red tables no have foreign key
    - the table in first line of tree, for example, has level 3, but when 3 becomes N? How much is N? This's the question.
    I started thinking about the following:
    First I have to know how to take the children:
    select distinct child.table_name child
      from all_cons_columns father
      join all_cons_columns child
    using (owner, position)
      join (select child.owner,
                   child.constraint_name fk,
                   child.table_name child,
                   child.r_constraint_name pk,
                   father.table_name father
              from all_constraints father, all_constraints child
             where child.r_owner = father.owner
               and child.r_constraint_name = father.constraint_name
               and father.constraint_type in ('P', 'U')
               and child.constraint_type = 'R'
               and child.owner = 'OWNER') aux
    using (owner)
    where child.constraint_name = aux.fk
       and child.table_name = aux.child
       and father.constraint_name = aux.pk
       and father.table_name = aux.father;Thinking...
    Let's Share!
    My thanks in advance,
    Philips
    Edited by: BluShadow on 01-Apr-2011 15:08
    formatted the code and the hierarchy for readbility

    Justin,
    Understood.
    Nocycle not work in 9.2 and, even that would work, would not be appropriate.
    With your help, I decided a much simpler way (but there is still a small problem, <font color=red>IN RED</font>):
    -- 1
    declare
      type udt_roles is table of varchar2(30) index by pls_integer;
      cRoles udt_roles;
    begin
      execute immediate 'create user philips
        identified by philips';
      select granted_role bulk collect
        into cRoles
        from user_role_privs
       where username = user;
      for i in cRoles.first .. cRoles.count loop
        execute immediate 'grant ' || cRoles(i) || ' to philips';
      end loop;
    end;
    -- 2
    create table philips.root1(root1_id number,
                               constraint root1_id_pk primary key(root1_id)
                               enable);
    grant all on philips.root1 to philips;
    create or replace trigger philips.tgr_root1
       before delete or insert or update on philips.root1
       begin
         null;
       end;
    create table philips.root2(root2_id number,
                               constraint root2_id_pk primary key(root2_id)
                               enable);
    grant all on philips.root2 to philips;
    create or replace trigger philips.tgr_root2
       before delete or insert or update on philips.root2
       begin
         null;
       end;
    create table philips.node1(node1_id number,
                               root1_id number,
                               node2_id number,
                               node4_id number,
                               constraint node1_id_pk primary key(node1_id)
                               enable,
                               constraint n1_r1_id_fk foreign key(root1_id)
                               references philips.root1(root1_id) enable,
                               constraint n1_n2_id_fk foreign key(node2_id)
                               references philips.node2(node2_id) enable,
                               constraint n1_n4_id_fk foreign key(node4_id)
                               references philips.node4(node4_id) enable);
    grant all on philips.node1 to philips;
    create or replace trigger philips.tgr_node1
       before delete or insert or update on philips.node1
       begin
         null;
       end;
    create table philips.node2(node2_id number,
                               root1_id number,
                               node3_id number,
                               constraint node2_id_pk primary key(node2_id)
                               enable,
                               constraint n2_r1_id_fk foreign key(root1_id)
                               references philips.root1(root1_id) enable,
                               constraint n2_n3_id_fk foreign key(node3_id)
                               references philips.node3(node3_id) enable);
    grant all on philips.node2 to philips;
    create or replace trigger philips.tgr_node2
       before delete or insert or update on philips.node2
       begin
         null;
       end;                          
    create table philips.node3(node3_id number,
                               root2_id number,
                               constraint node3_id_pk primary key(node3_id)
                               enable,
                               constraint n3_r2_id_fk foreign key(root2_id)
                               references philips.root2(root2_id) enable);
    grant all on philips.node3 to philips;
    create or replace trigger philips.tgr_node3
       before delete or insert or update on philips.node3
       begin
         null;
       end;                          
    create table philips.node4(node4_id number,
                               node2_id number,
                               constraint node4_id_pk primary key(node4_id)
                               enable,
                               constraint n4_n2_id_fk foreign key(node2_id)
                               references philips.node2(node2_id) enable);
    grant all on philips.node4 to philips;
    create or replace trigger philips.tgr_node4
       before delete or insert or update on philips.node4
       begin
         null;
       end;                          
    -- out of the relational model
    create table philips.node5(node5_id number,
                               constraint node5_id_pk primary key(node5_id)
                               enable);
    grant all on philips.node5 to philips;
    create or replace trigger philips.tgr_node5
       before delete or insert or update on philips.node5
       begin
         null;
       end;
    -- 3
    create table philips.dictionary(table_name varchar2(30));
    insert into philips.dictionary values ('ROOT1');
    insert into philips.dictionary values ('ROOT2');
    insert into philips.dictionary values ('NODE1');
    insert into philips.dictionary values ('NODE2');
    insert into philips.dictionary values ('NODE3');
    insert into philips.dictionary values ('NODE4');
    insert into philips.dictionary values ('NODE5');
    --4
    create or replace package body philips.pck_restore_philips as
      procedure sp_select_tables is
        aExportTablesPhilips     utl_file.file_type := null; -- file to write DDL of tables   
        aExportReferencesPhilips utl_file.file_type := null; -- file to write DDL of references
        aExportIndexesPhilips    utl_file.file_type := null; -- file to write DDL of indexes
        aExportGrantsPhilips     utl_file.file_type := null; -- file to write DDL of grants
        aExportTriggersPhilips   utl_file.file_type := null; -- file to write DDL of triggers
        sDirectory               varchar2(100) := '/app/oracle/admin/tace/utlfile'; -- directory \\bmduhom01or02 
        cTables                  udt_tables; -- collection to store table names for the relational depth
      begin
        -- omits all referential constraints:
        dbms_metadata.set_transform_param(dbms_metadata.session_transform, 'REF_CONSTRAINTS', false);
        -- omits segment attributes (physical attributes, storage attributes, tablespace, logging):
        dbms_metadata.set_transform_param(dbms_metadata.session_transform, 'SEGMENT_ATTRIBUTES', false);
        -- append a SQL terminator (; or /) to each DDL statement:
        dbms_metadata.set_transform_param(dbms_metadata.session_transform, 'SQLTERMINATOR', true);
        -- create/open files for export DDL:
        aExportTablesPhilips := utl_file.fopen(sDirectory, 'DDLTablesPhilips.pdc', 'w', 32767);
        aExportReferencesPhilips := utl_file.fopen(sDirectory, 'DDLReferencesPhilips.pdc', 'w', 32767);
        aExportIndexesPhilips := utl_file.fopen(sDirectory, 'DDLIndexesPhilips.pdc', 'w', 32767);
        aExportGrantsPhilips := utl_file.fopen(sDirectory, 'DDLGrantsPhilips.pdc', 'w', 32767);
        aExportTriggersPhilips := utl_file.fopen(sDirectory, 'DDLTriggersPhilips.pdc', 'w', 32767);
        select d.table_name bulk collect
          into cTables -- collection with the names of tables in the schema philips
          from all_tables t, philips.dictionary d
         where owner = 'PHILIPS'
           and t.table_name = d.table_name;
        -- execution
        sp_seeks_ddl(aExportTablesPhilips,
                     aExportReferencesPhilips,
                     aExportIndexesPhilips,
                     aExportGrantsPhilips,
                     aExportTriggersPhilips,
                     cTables);
        -- closes all files
        utl_file.fclose_all;
      end sp_select_tables;
      procedure sp_seeks_ddl(aExportTablesPhilips     in utl_file.file_type,
                             aExportReferencesPhilips in utl_file.file_type,
                             aExportIndexesPhilips    in utl_file.file_type,
                             aExportGrantsPhilips     in utl_file.file_type,
                             aExportTriggersPhilips   in utl_file.file_type,
                             cTables                  in out nocopy udt_tables) is
        cDDL       clob := null; -- colletion to save DDL
        plIndex    pls_integer := null;
        sTableName varchar(30) := null;
      begin
        for i in cTables.first .. cTables.count loop
          plIndex    := i;
          sTableName := cTables(plIndex);
           * Retrieves the DDL and the dependent DDL into cDDL clob       *      
          * for the selected table in the collection, and writes to file.*
          begin
            cDDL := dbms_metadata.get_ddl('TABLE', sTableName, 'PHILIPS');
            sp_writes_ddl(aExportTablesPHILIPS, cDDL);
          exception
            when dbms_metadata.object_not_found then
              null;
          end;
          begin
            cDDL := dbms_metadata.get_dependent_ddl('REF_CONSTRAINT', sTableName, 'PHILIPS');
            sp_writes_ddl(aExportReferencesPhilips, cDDL);
          exception
            when dbms_metadata.object_not_found2 then
              null;
          end;
          begin
            cDDL := dbms_metadata.get_dependent_ddl('INDEX', sTableName, 'PHILIPS');
            sp_writes_ddl(aExportIndexesPhilips, cDDL);
          exception
            when dbms_metadata.object_not_found2 then
              null;
          end;
          begin
            cDDL := dbms_metadata.get_dependent_ddl('OBJECT_GRANT', sTableName, 'PHILIPS');
            sp_writes_ddl(aExportGrantsPhilips, cDDL);
          exception
            when dbms_metadata.object_not_found2 then
              null;
          end;
          begin
            cDDL := dbms_metadata.get_dependent_ddl('TRIGGER', sTableName, 'PHILIPS');
            sp_writes_ddl(aExportTriggersPhilips, cDDL);
          exception
            when dbms_metadata.object_not_found2 then
              null;
          end;
        end loop;
      end sp_seeks_ddl;
      procedure sp_writes_ddl(aExport in utl_file.file_type,
                              cDDL    in out nocopy clob) is
        pLengthDDL  pls_integer := length(cDDL);
        plQuotient  pls_integer := null;
        plRemainder pls_integer := null;
      begin
          * Register variables to control the amount of lines needed   *
         * for each DDL and the remaining characters to the last row. *
        select trunc(pLengthDDL / 32766), mod(pLengthDDL, 32766)
          into plQuotient, plRemainder
          from dual;
          * Join DDL in the export file.                            *
         * ps. 32766 characters + 1 character for each line break. *
        -- if the size of the DDL is greater than or equal to limit the line ...
        if plQuotient >= 1 then
          -- loops for substring (lines of 32766 characters + 1 break character):
          for i in 1 .. plQuotient loop
            utl_file.put_line(aExport, substr(cDDL, 1, 32766));
            -- removes the last line, of clob, recorded in the buffer:
            cDDL := substr(cDDL, 32767, length(cDDL) - 32766);
          end loop;
        end if;
          * If any remains or the number of characters is less than the threshold (quotient = 0), *
         * no need to substring.                                                                 *
        if plRemainder > 0 then
          utl_file.put_line(aExport, cDDL);
        end if;
        -- record DDL buffered in the export file:
        utl_file.fflush(aExport);
      end sp_writes_ddl;
    begin
      -- executes main procedure:
      sp_select_tables;
    end pck_restore_philips;<font color="red">The problem is that I still have ...
    When creating the primary key index is created and this is repeated in the file indexes.
    How to avoid?</font>

  • How To Replace the column data of one table to another table

    Currently I'm Using Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE 11.2.0.1.0 Production
    TNS for 32-bit Windows: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production.
    My Sample Data is,
    create table emp1(ename varchar2(20),deptno number);
    create table emp2(ename varchar2(20),deptno number);
    emp1 Table Data:
    ename deptno
    Surendra 120
    Chandra 180
    Ram 190
    Raj 170
    emp2Table Sample Data:
    ename deptno
    xx 121
    yy 181
    zz 191
    hh 171
    So, My requirement is ,
    How to repalce the ename data of emp1 table into ename of emp2 table .
    My Requred OutPut like:
    select * from emp2;
    ename deptno
    Surendra 121
    Chandra 181
    Ram 191
    Raj 171
    Note:-This is Only Sample data, Actually ,my table haiving more than 1mollions of records.So Performence wise the Query Or Procedure sholud be good.
    Please Help me on this !!
    Thanks in Adv!!

    this ?
    with t as
    select 'Surendra' ename,120 deptno from dual
    union all
    select 'Chandra' ename,180 deptno from dual
    union all
    select 'Ram' ename,190 deptno from dual
    union all
    select 'Raj' ename,170 deptno from dual
    ),t1 as
    select 'xx' ename,121 deptno from dual
    union all
    select 'yy' ename,181 deptno from dual
    union all
    select 'zz' ename,191 deptno from dual
    union all
    select 'hh' ename,171 deptno from dual
    ),t3 as
    select ename,deptno+1 deptno from t
    select t3.ename,t1.deptno from t1,t3 where t1.deptno=t3.deptno;
    ENAME     DEPTNO
    Surendra     121
    Chandra     181
    Ram     191
    Raj     171

  • How to change the images dynamically in a table.

    Hai,
                     How to change the images dynamically in a table based on the condition in webdynpro abap.
    Edited by: Ravi.Seela on Oct 13, 2011 2:17 PM

    This has been much discussed earlier. Do search posts.
    For your scenario i would do the following.
    inside your node which is binded to the table, i create a new node image with cardinality 1 ..1 and a attribute called path of type string.
    create a  supply function for the node image .
    Supply method now has a Element (Parent element ) and node.
    Based on your record in element, set the right image source to path attribute and bind the node.
    This will make sure that the framework calls the image supply function for every row in a table.

  • How to get the Reports of Change Tracking Table in MDM?

    Hi!
    Please tell me how to get the reports of Change Tracking Table in MDM which is a System table, directly from MDM without using any interface.
    Thanks in advance for the reply.
    With Best Regards
    Devendra Pandey

    Hi Devendra,
    MDM can track changes on tables and fields. <u>The level of change tracking, and which tables/fields to track, are configurable in the MDM Console</u>. MDM opens a new database on the same database engine as the MDM repository and writes all change records to this database.
    For information of various steps you can visit
    <a href="http://help.sap.com/saphelp_mdm550/helpdata/en/45/c7b20339ee570ae10000000a114a6b/content.htm">this URL</a>
    Regards,
    Krutarth

  • How to tracke the new entries in database table ?

    Hi,
    How to tracke the new entries in database table ? is there any FM or report is there to check it ?
    regards
    vishnu

    Hi Vishnu,
    u can write a report program for this and in that use the event  :
    AT NEW <field-name> ( use primary key)
    your statements
    ENDAT
    for eg.
    loop at itab ( herfe itab must be of type of table for which u want to track new entries)
    at new matnr
    write:/ new record
    endat
    endloop.
    schedule this report in background to run in every 5 or 10 mins as per your requirement and hence changes can be tracked.
    regards
    Vinod

  • How to check the data of an archived table.

    I have archived a table created by me. I have executed the write program for the archiving object in SARA. Now how can check the data of my archived table.

    Hello Vinod,
    One thing to check in the customizing settings is your "Place File in Storage System" option.  If you have selected the option to Store before deleting, the archive file will not be available for selection within the delete job until the store job has completed successfully.
    As for where your archive file will be stored - there are a number of things to check.  The archive write job will place the archive file in whatever filesystem you have set up within the /nFILE transaction.  There is a logical file path (for example ARCHIVE_GLOBAL_PATH)where you "assign" the physical path (for example UNIX: /sapmnt/<SYSID>/archivefiles).  The logical path is associated with a logical file name (for example ARCHIVE_DATA_FILE_WITH_ARCHIVE_LINK).  This is the file name that is used within the customizing settings of the archive object.
    Then, the file will be stored using the content repository you defined within the customizing settings as well.  Depending on what you are using to store your files (IXOS, IBM Commonstore, SAP Content Server, that is where the file will be stored. 
    Hope this helps.
    Regards,
    Karin Tillotson

  • How to recover the data from a  dropped table in production/archive mode

    How to recover the data/change on a table that was dropped by accident.
    The database is on archive mode.

    Oracle Version. ? If 10g.
    Try this Way
    SQL> create table taj as select * from all_objects where rownum <= 100;
    Table created.
    SQL> drop table taj ;
    Table dropped.
    SQL> show recyclebin
    ORIGINAL NAME    RECYCLEBIN NAME                OBJECT TYPE  DROP TIME
    TAJ              BIN$b3MmS7kYS9ClMvKm0bu8Vw==$0 TABLE        2006-09-10:16:02:58
    SQL> flashback table taj to before drop;
    Flashback complete.
    SQL> show recyclebin;
    SQL> desc taj;
    Name                                      Null?    Type
    OWNER                                              VARCHAR2(30)
    OBJECT_NAME                                        VARCHAR2(30)
    SUBOBJECT_NAME                                     VARCHAR2(30)
    OBJECT_ID                                          NUMBER
    DATA_OBJECT_ID                                     NUMBER
    OBJECT_TYPE                                        VARCHAR2(19)
    CREATED                                            DATE
    LAST_DDL_TIME                                      DATE
    TIMESTAMP                                          VARCHAR2(19)
    STATUS                                             VARCHAR2(7)
    TEMPORARY                                          VARCHAR2(1)
    GENERATED                                          VARCHAR2(1)
    SECONDARY                                          VARCHAR2(1)
    SQL>M.S.Taj

  • How to get the list of top 10 tables grown last week or last few days

    Hi All,
    Please let me know, how to get the list of top 10 tables grown last week or last few days
    Thanks

    Please let me know, how to get the list of top 10 tables grown last week or last few days1.Oracle Version and OS info please ... ALWAYS
    2.Do you have licensing options (Tuning and/or Diagnostics Pack) ?
    3.Have you ran AWR/Statspack in last week or last few days
    1.Because Oracle do not store auto tack the history of tables growth. See below link where one user has showed the possible way of manual track of table(s) growth :
    Re: oracle tables growth
    2.MOS Note for How To Get Table Growth History Information? [ID 1395195.1]
    3.If you are in 10g than EM of 10g has something called Segmnet Statistics which can show you the growth of your table.
    4.Other clue :
    SQL> select * from table (dbms_space.object_growth_trend('SCOTT','EMP','TABLE'));
    TIMEPOINT                                                                   SPACE_USAGE SPACE_ALLOC QUALITY
    17-SEP-12 11.06.20.228000 AM                                                       1593       65536 GOOD5.A good script by Mice Ault for historical growth of segments within AWR:
    http://www.dba-oracle.com/t_table_growth_reports.htm
    Regards
    Girish Sharma

  • How to store the zip file in oracle table?

    hi,
    How to store the zip file in oracle table ?
    is it possible to unzip and read the file ?
    Thanks
    Rangan S

    SQL> DESC BLOB_TABLE;
    Name Type Nullable Default Comments
    A INTEGER Y
    B BLOB Y
    SQL> INSERT INTO BLOB_TABLE VALUES(5,BLOB('MWDIR_TST','TEST.ZIP'));
    INSERT INTO BLOB_TABLE VALUES(5,BLOB('MWDIR_TST','TEST.ZIP'))
    ORA-00904: "BLOB": invalid identifier
    SQL> INSERT INTO BLOB_TABLE VALUES(5,('MWDIR_TST','TEST.ZIP'));
    INSERT INTO BLOB_TABLE VALUES(5,('MWDIR_TST','TEST.ZIP'))
    ORA-00907: missing right parenthesis
    SQL> INSERT INTO BLOB_TABLE VALUES(5,('\\MWDIR_TST\TEST.ZIP'));
    INSERT INTO BLOB_TABLE VALUES(5,('\\MWDIR_TST\TEST.ZIP'))
    ORA-01465: invalid hex number
    SQL> INSERT INTO BLOB_TABLE VALUES(5,('\\MWDIR_TST\TEST.ZIP'));

  • How to read the current selection in a table.

    Hello Experts,
    I've this issue with the web dynpro. I have a Adaptive Webservice Model in web dynpro. And I have three tables in the UI. When a row is selected in the first table, the second table is populated with the appropriate data (using a method in the web service.) the same applies to the third table, when the a row is selected in the second table, the third table has to be populated with the appropriate data. The methods in the web service are all working fine. However, in web dynpro, I am not able to figure out on how I read the selected row in a table. Any information on how to resolve this would be really really helpful.
    <
    wdContext.currentGetMailElement().setProfileID("-Should be read from the selected row in the table.");
    wdThis.wdGetMailControllerController().executeGetMail();
    >
    regards,
    Sam.

    Hi Samuel,
    I didnt clearly understood  your problem. When you are selecting a particular row in a table you are executing a web service named Get Mail. Are you passing any input parameter(any selected row data)  while executing a web service. And when you get the response node where you have a attribute in the node getmail. Am I right.
    If this is the case, then first check if the GetMail node is present or not by comparing it will null or checking its size. If the node is null then you will not get attribute as the element itself is null as nothing is retrieved in response. And if the node is not null then the element at 0th position is selected by default. you can retreieve the attribute by directly using the following code
    if(wdContext.nodeGetMail() !=null)
        String profileId= wdContext.currentGetMailElement().getProfileID();
    Check if this works for you.
    Regards,
    Ardhendu Sarkar

  • How to implement the shared lock in a  table view

    Hi,
    How to implement the shared lock in a  table view.for multiple users to edit on this same table.
    Thanks in advance
    Swathi

    Hi,
    Please refer this link to find solution to your querry.
    Hope it helps.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c322c690-0201-0010-fb86-811c52b0acc2.
    Regards,
    Rahul

  • How to check the Statistics generated for a table through DBMS_STATS.

    Hi,
    How to check the statistics generated for a Table through DBMS_STATS.GATHER_TABLE_STATS procedure ?
    Please let me know.
    Thanks !
    Regards,
    Rajasekhar

    Rajasekhar wrote:
    Hi,
    How to check the statistics generated for a Table through DBMS_STATS.GATHER_TABLE_STATS procedure ?
    Please let me know.
    Thanks !
    Regards,
    Rajasekharquery ALL_TABLES

  • How to find the structural difference between two tables

    Hi all,
    How to find the structural difference between two tables .
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
    PL/SQL Release 11.1.0.7.0 - Production
    CORE 11.1.0.7.0 Production
    TNS for 32-bit Windows: Version 11.1.0.7.0 - Production
    NLSRTL Version 11.1.0.7.0 - Production
    Thanks,
    P Prakash

    you could try something similar to this, for each table pair that you want to compare:
    SELECT 'TABLE_A has these columns that are not in TABLE_B', DIFF.*
      FROM (
            SELECT  COLUMN_NAME, DATA_TYPE, DATA_LENGTH
              FROM all_tab_columns
             WHERE table_name = 'TABLE_A'
             MINUS
            SELECT COLUMN_NAME, DATA_TYPE, DATA_LENGTH
              FROM all_tab_columns
             WHERE table_name = 'TABLE_B'
          ) DIFF
    UNION
    SELECT 'TABLE_B has these columns that are not in TABLE_A', DIFF.*
      FROM (
            SELECT COLUMN_NAME, DATA_TYPE, DATA_LENGTH
              FROM all_tab_columns
             WHERE table_name = 'TABLE_B'
             MINUS
            SELECT COLUMN_NAME, DATA_TYPE, DATA_LENGTH
              FROM all_tab_columns
             WHERE table_name = 'TABLE_A'
          ) DIFF;that's assuming, column_name, data_type and data_length are all you want to compare on.

  • How to compare the contents of two different tables

    hello. can somebody give me an idean on how to compare the contents of two different tables in mysql?
    example, i have a table named Main List and a table named New List.
    The contents of the New List should be compared to the contents of the
    Main List, to check if they are equal. I don't have any idea how to manipulate
    this data. Hoping for your help. Thanks.

    it is better to comapre it using java.. try get the resultset first and store that in collections then comapre the two collections

Maybe you are looking for