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:
SOOD and SOC3 tables.TOA01, TOA02, and TOA03.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.
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 |
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
};
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 ).
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.
SOOD and TOA01 records linked to business objects.cmis:objectId in an index table.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)