cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the most recent entry from TOA01?

nikbereziuk
Explorer
0 Kudos

Dear Community,

Here's the situation: I need to determine the most recent entry (field "Document ID", ARC_DOC_ID) from table TOA01 (Archive link table) for a specific object if there are multiple documents linked to this object. So far I was using the Storage Date field for this purpose, but, as I expected, we've faced a situation with a few documents with the same Storage Date:

Question: how do I determine which of the two documents is the latest?

I've tried to fetch some additional data from the table TOAAT (by Document ID), but there are no entries with such IDs, not sure why...

I also tried usual sorting, but I'm not sure if it gives me a trustworthy outcome. The IDs seem to be hexadecimal, but they are CHAR40 in fact, so I'm not sure whether the comparison of character values works in this case.

I would be grateful for any suggestions 🙂

Regards,

Mykyta

Sandra_Rossi
Active Contributor

The time is not stored in SAP (cf 1513057 - File attributes (Creator name, File name, Created at) are not saved for Archivelink docume...), but if your repository is HTTP, try the function module SCMS_DOC_INFO which may return the creation/modification time stored on the HTTP server (may depend on which software you used; I never tested it though).

gabriel_pill-kahan
Active Participant

Have you tried using function module ARCHIVOBJECT_STATUS? It returns the archiving date and time.

View Entire Topic
Vladimir_Z
Explorer
0 Kudos

Gents, be advised you can find additional details (like Time, Decription, UserID, initial Source File Name ) related to specific ArchiveLink Document ID in table TOATT [Table to store the File attributes], but if its missing there check table TOALOG [Logging for Document Accesses]. This will work if you're using ArchiveLink document area for Content Repository.

Otherwise you might get details passing the 'Instance ID' (INSTID_B) value from table SRGBTBREL thru FM: SO_OBJECT_GET_CONTENT, and then derived 'Physical document' (PHIO_ID) passing to table SOFFPHIO.

Enjoy )

Vladimir Zinkevich

gabriel_pill-kahan
Active Participant

The table name is actually TOAAT.