Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Data archiving - FI documents retention period need to be based on clearing

0 Kudos

I was wondering if other companies have this dilemma and how they were able to resolve this.

Our retention period is based on the document clearing date and not the document creation date. The archiving program (SARA, FI_DOCUMNT) selects the data by fiscal year/period. The problem is how to group the data by clearing date. This is the first time we're archiving and therefore, have data that dates back to 1993. I suppose we can write a BADI to create the files based on the clearing date and then add the clearing year as part of the file name. This would require us to delete the files created by SAP from the Archivelink tables.

To illustrate our dilemma.

Document Posting date Clearing Archivable Actual arch date Contents of the file

1 1/1/1995 1/10/1995 1/10/2002 3/10/2009 doc 1, expired: 1/10/1995

2 1/1/1995 1/10/1996 1/10/2003 3/10/2009 doc 2, expired: 1/10/1996

3 1/1/1995 1/10/1997 1/10/2004 3/10/2009 doc 3, expired: 1/10/1997

As you can see, if I run it for 1995, the file will contain multiple clearing dates and the retention rule is clearing date plus 7 years.

Thank you,

Lourdes

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Retention period for FI Document will be calculated from the posting date to date of archive.

Fiscal year & Posting period will help in archiving the FI documents.

Hope this will help you.

-Thanks,

Ajay

12 REPLIES 12

Former Member
0 Kudos

Hi,

Retention period for FI Document will be calculated from the posting date to date of archive.

Fiscal year & Posting period will help in archiving the FI documents.

Hope this will help you.

-Thanks,

Ajay

0 Kudos

Hi Ajay,

Actually, it's based on clearing date and not on posting date. I've done some testing.

Thanks,

Lourdes

0 Kudos

Hi Ajay,

Is your company's retention rule based on when the document cleared or when the document posted? Are you using IXOS for storage? If so, how do you determine the expiration date to be used in labeling the platter.

I may have misunderstood your reply. I was thinking that you got the idea that SAP is using the posting date when it calculates the retention period. Perhaps, you were refering to your company's retention requirement.

thanks,

Lourdes

0 Kudos

Hi Lourdes,

Total Retention of financial document is based on the Fiscal year and posting period.

I am using IXOS. In IXOS when you create Archive, one can specify the retention years for the documents stored under this archive.

Total retention period = Online (SAP database) + Offline (Storage system)

Online residence time is 18 months. Since archiving frequency is yearly so maximum of 30 months FI document is kept in SAP database.

Offline Retention period in IXOS depends on the the countries requirement. For Example For US financial document we have taken 7 years. This retention is calculated based on the Date of Archive file arival in IXOS.

-Thanks,

Ajay

0 Kudos

Thanks, Ajay! That is what I proposed here, but, the FI manager indicated that we will end up keeping some documents longer than we should and if there's an audit and the auditors see that we have data available for the expired years that we specify in our retention policy, then our company will be obligated to provide the data produced for the expired year and can cause legal repercussions. Do you think it's feasible to write a BADI to sort the archived documents by clearing date, then, write them out on separate files?

0 Kudos

Hi Laurdes,

Sorting the archived documents from Clearing date: I don't feel to go with a BADI, where as you can create an new archive Infostructure with new field catalog by selecting the field AUGDT from the table BSEG. This will help in sorting the FI documents based on the clearing date from archive.

Sorting the FI documents from clearing date from database before archive: After sorting out by clearing date, it will be bit difficult to archive these FI document due of restricted selection criteria options and SAP standard write program will check residence time aganist Fiscal year and posting period date.

For your requirement you have to go with Custom writ program.

-Thanks,

Ajay

0 Kudos

Hi Ajay,

I didn't articulate that too well. I didn't mean I was going to actually use the SORT command. What I meant was the BADI will only write to a file based on one clearing year. For instance, if I run it for fiscal year 1995, I will only write to the file whatever documents cleared in 1995. Then, run the program again for fiscal year 1995 to 1996 and write whatever documents cleared in 1996 and so on. Thanks so much for your feedbacks. I'm amazed that we're the only one with this type of requirement. It would make my life easier if we just use the posting year.

Thanks,

Lourdes

0 Kudos

Hi Lourdes,

We cannot change the name of the archive file as it is defined in the Content repository specification.

Regards - Swarna.

0 Kudos

Hi Lourdes,

Apologize, I have taken your question wrongly. I think that your logic of archiving based on the clearing dates can help you. One point you should also consider with your plan is the secondary index tables entries. As this is also occupies large database size.

Your requirement is realy different from most of other clients. Thanks and Good Luck.

-Thanks,

Ajay

0 Kudos

thanks, Ajay! I think I've gathered enough info and will mark this question as answered.

former_member487858
Active Participant
0 Kudos

Hi Lourdes,

Correct me If I am wrong. You want to change the name of the archive file to be created and want to include the Clearing date as the part of your file.

1. If this is your requirement, that is not possible since we define the physical file name and logical file name for the archive object. This will create problems during the retrieval of archived data later.

2. Yes , You can include your own conditions for archival process using the BADIs

FI_DOCUMNT_CHECK,FI_ACCPAYB_CHECK,FI_RECEV_CHECK. some more BADIs are also available , find the suitable one and implement to include the required condition.

Regards - Swarna.

0 Kudos

Hi Swarna,

One option is to redesign the program. Someone suggested to create a BADI that will sort the output for every archiving Write execution and store them in separate files based on clearing year. Then, delete the entries in the Archivelink tables.

I got a response from SAP OSS yesterday stating this is not feasible.

I was wondering if there are other companies beside us who require the retention period to be based on when the document was cleared instead of when the document was created. Can you tell me what your company's retention rule is (how long to keep FI documents in an online or offline storage)?

Thanks,

Lourdes