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: 

accesing archived data with z-abaps

Former Member
0 Kudos

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

7 REPLIES 7

FredericGirod
Active Contributor
0 Kudos

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

0 Kudos

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

0 Kudos

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

Jelena
Active Contributor
0 Kudos

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.

JL23
Active Contributor
0 Kudos

Former Member
0 Kudos

You can use following function modules to get data

1. AS_API_READ

2. ARCHIVE_GET_TABLE (with your current table selection)

sujeet2918
Active Contributor
0 Kudos

Hello Martin,

Check below FMs.

ARCHIVE_OPEN_FOR_READ

ARCHIVE_GET_NEXT_OBJECT

ARCHIVE_GET_NEXT_RECORD

ARCHIVE_CLOSE_FILE

Regards,

Sujeet