2013 Oct 08 4:20 PM
hi there,
we have a project where we will do data archiving for many modules........FI/CO/SD/MM/HR, etc....
so we will archive the data in a external storage system (with SARA) for data older 3 years.
now to the problem: we have tons(!!) of Z-ABAPS. for example there is a coding like:
select * from bkpf where........................
HOW can i access also the archived data from bkpf WITHOUT changing the abap-code ? is there any way (e.g. in SAP-BASIS) where
i can get sure that selects on tables in z-abaps also select archived data. so in this example: the select statment also should fetch
rows from table BKPF older then 3 years.
i can't believe that the ONLY way is to change all the Z-stuff ?
br, Martin
2013 Oct 08 4:25 PM
Hi Martin,
when you build your archiving you could create "infoset" : tables with a part for the data. That means you could keep data into your system. So, if you have some Z programs that used data of table BKPF, look witch data. Maybe it's only a few quantities of values (5 or 6 fields). So you don't have to read the archive .. only this infoset
regards
Fred
(please don't ask me how to create these tables )
Edit : have a look of this doc : http://scn.sap.com/docs/DOC-46052
Message was edited by: Frédéric Girod
2013 Oct 08 4:45 PM
hey,
well, this is more a global question for modules FI,SD,MM,HR......
i can't tell you which fields from bkpf will be needed. what if there is a nother field needed later on ?
br, Martin
2013 Oct 08 4:56 PM
If you need additionnal info, later .. you're dead
You will have to reprocess all the archived data.
I remember there is some function used by SAP to retrieve achived data, but it's really long. (look FB03)
A point really important to know, you will never have an archive-file by period / organisationnal data ..
You will have several files with a big melting pot of data / period ... Just because it's not possible to archive 100% of the flow.
For example, in SD module, you could archive a flow only when it was completely processed, and you will discovered only 30% of your flows are correctly processed ... that's the reality of the archiving
So you will have to read several files, standard tables ... in all your Z programs
regards
Fred
2013 Oct 08 10:01 PM
Martin, unfortunately I don't have any better news for you, but just wanted to point out that the archived information most likely won't be available not just in the custom reports but also in the standard reports (e.g. FBL5N). So the business users really need to understand the consequences of archiving the documents. It's not really the question only about the Z... programs.
In SD there is Sales Info System where accumulated data may be retained for many years even if the source documents are gone, maybe there is something similar in FI?
I would not recommend reading the archives in the custom reports. It just doesn't seem reasonable to expect granular reporting on the archived documents.
2013 Oct 08 10:12 PM
You may want to read the docu: Developing Read Programs (SAP Library - Archive Development Kit)
2013 Oct 09 5:49 AM
You can use following function modules to get data
1. AS_API_READ
2. ARCHIVE_GET_TABLE (with your current table selection)
2013 Oct 09 6:33 AM
Hello Martin,
Check below FMs.
ARCHIVE_OPEN_FOR_READ
ARCHIVE_GET_NEXT_OBJECT
ARCHIVE_GET_NEXT_RECORD
ARCHIVE_CLOSE_FILE
Regards,
Sujeet