Production Architectural Blueprint

SAP Clean Core Document Management & CMIS Architecture Guide

Storage Domain: Enterprise Content Management & CMIS 1.1 Service: SAP BTP Document Management Service (DMS) Clean Core Objective: Zero In-Memory Database Bloat

1. The Problem: In-Memory Database Bloat in SAP HANA

In legacy SAP ERP 6.0 systems, binary document attachments (PDF invoices, CAD drawings, scanned receipts, Microsoft Office files) were routinely stored directly in the primary database via:

In SAP S/4HANA, every gigabyte of relational data is kept in expensive DRAM main memory. Storing terabytes of static binary attachments inside SAP HANA drastically increases hardware TCO, elongates backup/restore windows, and directly breaches SAP Clean Core design principles.

2. The Clean Core Storage Pattern: OASIS CMIS 1.1

The Clean Core recommendation is simple: SAP S/4HANA stores only metadata (document title, MIME type, upload timestamp, and external GUID), while the binary stream is stored in an external, low-cost content repository governed by the open standard OASIS CMIS 1.1 (Content Management Interoperability Services).

Architectural Vector Legacy Storage (GOS / DB BLOB) Clean Core Storage (BTP DMS CMIS)
Storage Location SAP HANA In-Memory DRAM tables Hyperscaler Object Store (S3, Azure Blob, GCS)
Cost per Terabyte High ($1,000+ / TB / month) Commodity Cloud Storage ($20 / TB / month)
API Protocol Proprietary RFC / Function modules Standard OASIS CMIS 1.1 REST / Browser Binding
Upgrade Impact Bloats DB migration windows by 40-70% Zero impact on S/4HANA migration duration

3. RAP CDS View Entities with Large Object Streaming

In ABAP Cloud, CDS View Entities support streaming directly to Fiori Elements using the @Semantics.largeObject annotation. The actual file bytes are never loaded into ABAP application memory unless explicitly streamed:

define view entity ZR_InvoiceAttachment
  as select from zt_doc_meta
{
  key document_id           as DocumentID,
      invoice_number        as InvoiceNumber,
      
      @Semantics.largeObject: {
        mimeType: 'MimeType',
        fileName: 'FileName',
        contentDispositionPreference: #INLINE
      }
      attachment_content    as AttachmentContent,
      
      @Semantics.mimeType: true
      mime_type             as MimeType,
      file_name             as FileName,
      cmis_object_id        as CMISObjectID
};

4. Calling BTP DMS from ABAP Cloud via Released HTTP Client

ABAP Cloud uses cl_http_destination_provider and cl_web_http_client_manager to communicate with the SAP BTP Document Management Service over HTTPS:

" 1. Create Destination Instance
DATA(lo_dest) = cl_http_destination_provider=>create_by_destination(
  i_destination_name = 'BTP_DMS_INTEGRATION'
).

" 2. Initialize Released HTTP Client
DATA(lo_client) = cl_web_http_client_manager=>create_by_http_destination( lo_dest ).
DATA(lo_request) = lo_client->get_http_request( ).

" 3. Assemble CMIS 1.1 Multipart Body
DATA(lo_part) = lo_request->add_multipart( ).
lo_part->set_header_field( i_name = 'cmisaction' i_value = 'createDocument' ).
lo_part->set_header_field( i_name = 'propertyId[0]' i_value = 'cmis:name' ).
lo_part->set_header_field( i_name = 'propertyValue[0]' i_value = 'Invoice_1001.pdf' ).

" 4. Execute POST and Evaluate Response
DATA(lo_response) = lo_client->execute( i_method = if_web_http_client=>post ).

5. Security & Malware Defense

🛡️ Mandatory Antivirus Gate

Clean Core architectures must integrate the SAP Malware Scanning service into the attachment ingestion pipeline. Files exceeding quarantine thresholds or containing infected macro payloads are immediately rejected before storage in the CMIS repository.

6. Legacy GOS / ArchiveLink Migration Strategy

  1. Inventory: Run a custom extraction job reading SOOD and TOA01 records linked to business objects.
  2. Asynchronous Offloading: Dispatch a background batch worker that streams binary contents from GOS to BTP DMS, recording the resulting cmis:objectId in an index table.
  3. Cutover: Update custom Fiori / RAP applications to read exclusively from the new CMIS-backed CDS view entities.
  4. Decommissioning: Purge historical GOS database tables after verification, reclaiming terabytes of SAP HANA memory.

Architect Your Clean Core Document Strategy

Generate CMIS repository configurations, CDS Large Object entities, and ABAP Cloud stream clients with our interactive tool.

Launch DMS Architect Tool ⚡ Get Architecture Suite (80% Off)