Skip to content

Latest commit

 

History

History
277 lines (176 loc) · 5.55 KB

File metadata and controls

277 lines (176 loc) · 5.55 KB

Storage Manager Implementation

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_FILE stores 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_KEY

    Key of the archive file to be stored

    Importing: IV_DATA

    Content of the archive file (binary data)

    Importing: IV_LENGTH

    Length of the binary content

    Returning: RV_DOCUMENT_ID

    Document 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_BYTESTREAM retrieves 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_ID

    Document identifier

    Importing: IV_FROM_OFFSET

    Data object address

    Importing: IV_LENGTH

    Length of the binary content

    Exporting: EV_DATA

    Content of the archive file (binary data)

    Exporting:EV_ACT_LENGTH

    Length of the byte stream which is returned

  • The method IF_ARCH_STORAGE~RETRIEVE_FILE retrieves the entire binary content of an archive file.

    Parameter

    Description

    Importing: IV_DOCUMENT_ID

    Document identifier

    Returning:RV_DATA

    Content of the archive file (binary data) which will be returned by the storage manager

  • The method IF_ARCH_STORAGE_MANAGER~DELETE FILE deletes the archive file from the external storage system.

    Parameter

    Description

    Importing: IV_DOCUMENT_ID

    Document identifier

  • After the method IF_ARCH_STORAGE_MANAGERSTORE_FILE has been called by the ADK write API, the stored file is verified by the SAP system. If the verification fails, the method IF_ARCH_STORAGE_MANAGERFILE_VERIFICATION_FAIL is 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: IV_ARCHIVE_KEY

Key of the invalid archive file

Importing: IV_DOCUMENT_ID

Document identifier

Note:

If any errors appear during any of the operations of the storage manager, please use the exception class CX_ARCH_STORAGE_MANAGER.