2007 Aug 03 6:32 AM
I have a question on archiving.
How can our customized program can read or select archived records??
Is there is any sample how customized program to read back old achived data ?
Regards,
Rayblur
2007 Aug 03 6:50 AM
Rayblur... i have some PPT slides for archiving ...
if you want i can send you...give me you mail id...
Send it to [email protected].
Thanx,
Mandeep.
I have a question on archiving.
How can our customized program can read or select archived records??
Is there is any sample how customized program to read back old achived data ?
Regards,
Rayblur
2007 Aug 03 6:41 AM
2007 Aug 03 6:48 AM
Hi Rayblur,,,
I dnt have much idea about reading archived data ..but i hav a sample code..
it may help you....
[IMG]http://www.designoo.com/files/6678/incorrectInfo.jpg[/IMG]
My code:
for Read Archive
DATA: handle LIKE sy-tabix,
buffer TYPE arc_buffer,
wa_arc_bsak LIKE bsak,
number_of_records_read TYPE i.
data: LE_DATA(8192) TYPE C,
LE_STRUCTURE LIKE ARC_BUFFER-RNAME.
...
perform read_archive_bsak.
........
FORM read_archive_bsak.
open existing archive files for BSAK
CALL FUNCTION 'ARCHIVE_OPEN_FOR_READ'
EXPORTING
object = 'FI_DOCUMNT'
IMPORTING
archive_handle = handle
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
WRITE: / 'No file can be accessed'(001).
EXIT.
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 = LE_DATA
record_structure = LE_STRUCTURE
EXCEPTIONS
end_of_object = 1
OTHERS = 2.
IF sy-subrc <> 0.
EXIT.
ENDIF.
CASE buffer-rname.
WHEN 'BSAK'.
wa_arc_bsak = LE_DATA.
move-corresponding wa_arc_bsak to Tab_ARC_bsak.
APPEND Tab_ARC_bsak.
CLEAR: wa_arc_bsak, LE_DATA, Tab_ARC_bsak.
ENDCASE.
ADD 1 TO number_of_records_read.
ENDDO.
ENDDO.
close the archive session
CALL FUNCTION 'ARCHIVE_CLOSE_FILE'
EXPORTING
archive_handle = handle.
Move-corresponding tab_arc_bsak to tab_bsak.
append tab_bsak.
clear tab_bsak.
ENDFORM. " read_archive_bsak
Plz reward points if answer is helpful.......
Regards,
Mandeep.
2007 Aug 03 6:49 AM
Does anyone have sample program how can we retrieve archive data from archive table?
In our normal customized program, we use SELECT * tablename.
If we want to select from archive data ? what are the procedure, RFC or command that we used??
Pls advice
2007 Aug 03 6:50 AM
Rayblur... i have some PPT slides for archiving ...
if you want i can send you...give me you mail id...
Send it to [email protected].
Thanx,
Mandeep.
2007 Aug 03 7:01 AM
2007 Aug 03 7:18 AM
Hi there,
Is there anyone have any archiving document as well?
Rayblur
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |