本文主要讲如何去归档数据和读取归档数据:
1、怎么样读取归档数据:
1)归档后的数据一般会有一个archindex,指明你的归档数据是在哪里,第一步就是要找到这个archindex,然后通过FM去读取到底是归档到那个表:
CALL FUNCTION 'AIND_NAMETAB_GET'
EXPORTING
i_archindex = p_archindex
IMPORTING
e_header = it_header
2)用如下操作去读取归档archivekey等数据:
p_tab = it_header-tabname.
CREATE DATA new_line TYPE TABLE OF (p_tab).
ASSIGN new_line->* TO <l_table>.
SELECT * INTO TABLE <l_table> FROM (p_tab)
move <l_table> into it_rv_likp_001(里面包括有archivekey,archiveofs等值,用于FM读取归档表的数据,不同的表有不一样的值)
3)然后再通过FM去读取其它归档数据的:(有些情况却不用FM去读取归档表的数据,直接到第二步就可以了,从<l_table>里面抓数即可)
CALL FUNCTION 'ASH_RV_LIKP_READ'
EXPORTING
i_archivekey = it_rv_likp_001-archivekey
i_offset = it_rv_likp_001-archiveofs
2、常用的读取归档数据的FM有:
3、通过SCN社区得到的回复,由于目前没有权限使用某些t-code,所以也没法亲自验证很多东西,只好先把东西贴上:
If you know the requirement for the new Read program, you can build those logic. But if you want that new program to work in same was as standard program then there is a configuration associated to that.
Steps:
1. Go to the transaction AOBJ.
2. Find the Archiving object for which you are trying to develop a new Read program
3. Double click on that entry, here you can see the standard programs mapped for Write, Delete, Read, Prepossessing and Post-processing, as shown in the below image.
4、如果想通过标准的t-code去读取归档数据:
Here are the steps to read the archived data:
1. Go to tcode SARA enter the archival object and hit enter
2. Click on the read button as shown in the below image
[if you are not able to see this button then some configurations needs to be done in the transaction code AOBJ. Please let me know if you want the steps to configure]
If you are able to see the read button then its good, continue to step 3.
3. Click on the Execute button
4. In the next screen specify the number of records to be displayed in a screen and click on Execute button
5. New pop up screen appears, that will have the list of Archive index for the selected Archive object, select the index for which you want to read the records and click on continue
6. Archived records will be read by the standard program and displayed as mentioned in the below image