‎2009 Mar 09 11:55 AM
Hi All,
Can any one provide me the information on data archiving?
How it is done?
How to data archive the program?
I have a program, I have to data archive it? How can I do that?
‎2009 Mar 09 12:01 PM
‎2009 Mar 09 12:02 PM
‎2009 Mar 09 12:06 PM
‎2009 Mar 09 12:09 PM
Hi Praveev,
Make use this table ARCH_OBJ.
Much Regards,
Amuktha.
‎2009 Mar 09 12:17 PM
Hi Praveen ,
Please chk foolowing link
[https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/70be5c63-b9ea-2b10-8dad-b071fcbe09e6]
Thanks
‎2009 Mar 09 12:56 PM
hi
data archiving means moving your data from database tables to archiving files ( some other storage location) to keep the size of database in control and at the same time have access to the old data.
because in SAP transaction data grow rapidly.
1) tables to be archived and the required configuration will be done at the time of implementation.
2) archiving is done with the help of ARCHIVING OBJECT. ( a reference name under which database tables are grouped).
3) to retrive data which was archived to report program, we will have to call 4 function modules in sequence. the sample code is shown below.
data declaration
data: handle like sy-tabix,
buffer type arc_buffer,
sbook_wa like sbook,
number_of_records_read type i.
open existing archive files
call function 'ARCHIVE_OPEN_FOR_READ'
exporting
object = 'BC_SBOOK01'
importing
archive_handle = handle
exceptions
others = 1.
if sy-subrc <> 0.
write: / 'No file can be accessed'(001).
stop.
endif.
clear number_of_records_read.
loop to get the next data object from the archive file(s)
do.
call function 'ARCHIVE_GET_NEXT_OBJECT'
exporting
archive_handle = handle
exceptions
end_of_file = 1
others = 2.
if sy-subrc <> 0.
exit.
endif.
get data records from the data container
do.
call function 'ARCHIVE_GET_NEXT_RECORD'
exporting
archive_handle = handle
importing
record = buffer-segment
record_structure = buffer-rname
exceptions
end_of_object = 1
others = 2.
if sy-subrc <> 0.
exit.
endif.
add 1 to number_of_records_read.
enddo.
enddo.
write: / 'Total number of records read: '(002), number_of_records_read.
skip.
write / 'Last record read: '(003).
skip.
case buffer-rname.
when 'SBOOK'.
sbook_wa = buffer-segment.
write: / 'CARRID :', sbook_wa-carrid,
/ 'BOOKID :', sbook_wa-bookid,
/ 'CONNID :', sbook_wa-connid,
/ 'FLDATE :', sbook_wa-fldate,
/ 'CUSTOMID :', sbook_wa-customid,
/ 'ORDER_DATE:', sbook_wa-order_date,
/ '...'.
when ...
If the archive object contained more than one table
(different buffer-rname), more cases would be needed.
endcase.
close the archive session
call function 'ARCHIVE_CLOSE_FILE'
exporting
archive_handle = handle.
feel free to revert back
regards
mano
‎2009 Mar 10 5:06 AM
Hi,
Could you please give more information on this.
I am not getting on this. Since we have some custom programs, ie., Z programs. We need to data archive on this.
How can we achive this.
‎2009 Apr 07 8:50 AM
Hi,
First analise your pre-processing/Write programs assigned to the Archive object and look for User exits available in the program and make use of them to include Z/Y table for archival if you don't get suitable user exit, you will have to modify the standard program copying it to Y/Zprogram and assign that back to Standard Archive object or you may copy the Archive object to a Y object. Sometimes copying archivve object to Y objects creates problem in Retrieval of archived documents by standard T.codes, please check this aspect as well.
Cheers
Ashok Prabhu
‎2009 Apr 07 2:29 PM