cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Access archived data in database tables

0 Likes
627

Hi Experts,

I have a required to read all data in corresponding database tables of a Archived Object.

For example :

If 'Sales doc' is the archiving object I want to read that archived data in all database tables which comes when we do 'Database Table' search in tcode SARA.

Thanks and Regards,

Shivangi

Accepted Solutions (0)

Answers (1)

Answers (1)

TammyPowlas
SAP Mentor
SAP Mentor
0 Likes

Hi - I recommend searching - this thread contains an option: https://archive.sap.com/discussions/thread/163275

0 Likes

Thanks Tammy.

I tried implementing the suggested thread.

Is there a way I can get the data of one table in a go.Here in this case I will have to call the below method every time for multiple tables as 'ls_tab' is a structure of database type.

DO.

CALL FUNCTION 'ARCHIVE_GET_NEXT_RECORD'
EXPORTING
archive_handle = l_handle
IMPORTING
record = ls_tab
record_structure = l_arc_buff
EXCEPTIONS
end_of_object = 1
OTHERS = 2.

APPEND ls_tab TO lt_tab.

IF sy-subrc <> 0.
EXIT.
ENDIF.
ENDDO.