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: 

ARCHIVE_READ_OBJECT accessing the contents - Exception 2 FILE_IO_ERROR

Former Member
0 Kudos

one of the custom program is using the FM : ARCHIVE_READ_OBJECT to access a archived document . while trying to access the archive file to obtain the contents using the FM , we get an error with exception : FILE_IO_ERROR saying Archive file ****: record at position **** is too long.

this was working fine a month back . Not sure what has happened suddenly.

Please guide how to go about investigating this as i am not quiet familiar with the archiving stuff.

thanks

Raghu V

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

If the archiving object is a standard one, then you should be able to also access the archived data through transaction SARI, archive explorer and then selecting the archiving object and archive infostructure (make sure that the archive infostructure is activated and filled with the relevant data for the archiving session).

You can also try to go to transaction SARA, specify the archiving object name and see if there is a standard Read program for the archiving object, see if you get the same error with the standard program.

Other thing that you can try is put a couple of break points in FM ARCHIVE_READ_OBJECT, debug it and see why you're getting the error. According to the FM, error "FILE_IO_ERROR" happens when an archive file cannot be read. You're saying that a month ago it was working so maybe you have some problem in the connection between SAP and the external server for archiving. Try to test the connection and see if it works (any certificates to be renewed and so on). In the worst case scenario the connection might be working but you're unable to read the archive file because it has been deleted for some reason.

Hope this helps you to solve your problem.

Cheers.

1 REPLY 1

Former Member
0 Kudos

Hi,

If the archiving object is a standard one, then you should be able to also access the archived data through transaction SARI, archive explorer and then selecting the archiving object and archive infostructure (make sure that the archive infostructure is activated and filled with the relevant data for the archiving session).

You can also try to go to transaction SARA, specify the archiving object name and see if there is a standard Read program for the archiving object, see if you get the same error with the standard program.

Other thing that you can try is put a couple of break points in FM ARCHIVE_READ_OBJECT, debug it and see why you're getting the error. According to the FM, error "FILE_IO_ERROR" happens when an archive file cannot be read. You're saying that a month ago it was working so maybe you have some problem in the connection between SAP and the external server for archiving. Try to test the connection and see if it works (any certificates to be renewed and so on). In the worst case scenario the connection might be working but you're unable to read the archive file because it has been deleted for some reason.

Hope this helps you to solve your problem.

Cheers.