归档数据的读写方法。。。

本文主要讲如何去归档数据和读取归档数据:


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.


Make a copy of the Read program and inside that you can build your own logic, once the program is ready map your new program to the Read program here, so that from the Transaction code SARA you can access just by clicking on the Read button.



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




  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值