Application Development and Automation 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: 
Read only

Reading Archived Data Through SAP Query Report

Former Member
0 Likes
2,280

Dear SAP Gurus,

My client archived their SAP data in a particular year range and all the Z reports have to modified to read these archive data. Normal ABAP reports can be modified to read the archive data without no problem.

But there are two Z SAP query reports which should be modified the same way so it will be able to read archive data.

What is the best method for this? Does SAP Query tool provide facility to read archive data? or do I have to append the code?

Thank you in advance for your help

Regards,

Isuru Fernando

1 ACCEPTED SOLUTION
Read only

manthanraja
Active Participant
0 Likes
1,608

you can try and read the archived data using the following function modules

ARCHIVE_OPEN_FOR_READ

ARCHIVE_GET_NEXT_OBJECT

ARCHIVE_GET_NEXT_RECORD

ARCHIVE_CLOSE_FILE

You could include these in your zsap reports for getting the data or

you could design your reports like Mrityunjay did in his report in the Thread link

Regards

Manthan.

you can try and read the archived data using the following function modules

ARCHIVE_OPEN_FOR_READ

ARCHIVE_GET_NEXT_OBJECT

ARCHIVE_GET_NEXT_RECORD

ARCHIVE_CLOSE_FILE

You could include these in your zsap reports for getting the data or

you could design your reports like Mrityunjay did in his report in the Thread link

Regards

Manthan.

6 REPLIES 6
Read only

manthanraja
Active Participant
0 Likes
1,609

you can try and read the archived data using the following function modules

ARCHIVE_OPEN_FOR_READ

ARCHIVE_GET_NEXT_OBJECT

ARCHIVE_GET_NEXT_RECORD

ARCHIVE_CLOSE_FILE

You could include these in your zsap reports for getting the data or

you could design your reports like Mrityunjay did in his report in the Thread link

Regards

Manthan.

Read only

0 Likes
1,608

hi Manthan,

Yes I used these FMs and read the data without any problem for normal ABAP reports.

But SAP query report is the problem. Is it advisobale to modify the SAP query generated report source code? since it is a system generated report.

Regards,

Isuru

Read only

0 Likes
1,608

>

> hi Manthan,

>

> Yes I used these FMs and read the data without any problem for normal ABAP reports.

>

> But SAP query report is the problem. Is it advisobale to modify the SAP query generated report source code? since it is a system generated report.

>

> Regards,

> Isuru

No, do not adapt the SAP generated report source. The reason is: every time someone re-generates the query from tx. SQ01 your changes will be lost.

You could add the functionality Manathan gave you to add to the infoset of said query - but to be honest: in my opinion that is shooting nuclear rockets at flies. Also you run the risk that every change of the infoset (add a join/delete a join) requires adjustment of said coding you applied ... and where will you be then? Fancy repairing the same query over and over again? Try talk sense to your client - go for a Z-report here ...

Read only

0 Likes
1,608

hi Isuru , i agree with Mylene here and advise you to go for a Z report which I suggested in my reply above .. in the link ..

It will take some convincing by you .. but is ultimately in the good of your client ...

Regards

Manthan.

Read only

Former Member
0 Likes
1,608

Thank you all!

Read only

Former Member
0 Likes
1,608

Hi Isuru ,

I have a similar requirement in which the Z reports have to be modified to fetch data from archive.

Could you pls help me with a sample program you have done so that I can understand how you have used the FM's to fetch

data from archive.

Thanks in advance.

Best regards,

Abhilash