The storage manager integrates the data archiving runtime with the actual storage of the archiving files.
The storage manager will be processed in the different steps of the data archiving process. Within the storage manager implementation, you have the full flexibility to choose which storage will be integrated. Possible options to integrate external storages already exist in ABAP Cloud:
As a precondition for data archiving, you need to create a class which implements the interface IF_ARCH_STORAGE_MANAGER. This interface provides the following methods:
-
The method
IF_ARCH_STORAGE_MANAGER~STORE_FILEstores the archived data to a physical storage location outside of the SAP system. It will be called by the ADK write API and has the following parameters:Parameter
Description
Importing:
IV_ARCHIVE_KEYKey of the archive file to be stored
Importing:
IV_DATAContent of the archive file (binary data)
Importing:
IV_LENGTHLength of the binary content
Returning:
RV_DOCUMENT_IDDocument identifier which can be used to access the archived data. The document ID needs to be returned by the storage manager and will be stored in a link table in the SAP system.
-
The method
IF_ARCH_STORAGE_MANAGER~GET_BYTESTREAMretrieves parts of the binary content of an archive file via range request. It will be called by an ADK API to read the archived data and has the following parameters:Parameter
Description
Importing:
IV_DOCUMENT_IDDocument identifier
Importing:
IV_FROM_OFFSETData object address
Importing:
IV_LENGTHLength of the binary content
Exporting:
EV_DATAContent of the archive file (binary data)
Exporting:
EV_ACT_LENGTHLength of the byte stream which is returned
-
The method
IF_ARCH_STORAGE~RETRIEVE_FILEretrieves the entire binary content of an archive file.Parameter
Description
Importing:
IV_DOCUMENT_IDDocument identifier
Returning:
RV_DATAContent of the archive file (binary data) which will be returned by the storage manager
-
The method
IF_ARCH_STORAGE_MANAGER~DELETE FILEdeletes the archive file from the external storage system.Parameter
Description
Importing:
IV_DOCUMENT_IDDocument identifier
-
After the method
IF_ARCH_STORAGE_MANAGERhas been called by the ADK write API, the stored file is verified by the SAP system. If the verification fails, the methodSTORE_FILEIF_ARCH_STORAGE_MANAGERFILE_VERIFICATION_FAILis called by the ADK write API to inform the storage manager that the archive file is considered invalid and will be deleted from the SAP system.
|
Parameter |
Description |
|---|---|
|
Importing: |
Key of the invalid archive file |
|
Importing: |
Document identifier |
If any errors appear during any of the operations of the storage manager, please use the exception class
CX_ARCH_STORAGE_MANAGER.