AWS for SAP
Sustainable and durable SAP document and data archiving with Amazon S3
Introduction
SAP Content Server is a stand-alone system designed to store and archive large amounts of electronic documents in various formats and types along with SAP data. These documents can be stored in a database such as SAP MaxDB or in the underlying filesystem of the SAP Content Server. Common examples of electronic documents stored in the SAP Content Server include sales invoices, purchase orders, salary slips, and emails. SAP Content Server offers centralized document management, ensuring organized and easily accessible data. Its seamless integration with SAP ECC or SAP S/4HANA applications enhances business processes, allowing companies to meet legal and regulatory requirements. It provides robust data security through encryption and access controls.
Customers using SAP Content Server with MaxDB faces potential challenges and complexity such as an additional database instance to manage, lengthy database backups, increasing storage costs, and security concerns. In this blog, we will provide an alternative storage mechanism to MaxDB, and show you how you can use SAP Content Server with Amazon Simple Storage Service (S3) File Gateway. We will guide you through the step-by-step process of migrating your existing SAP Content Server running on MaxDB to Amazon S3 File Gateway.
Amazon S3 File Gateway is based on Amazon S3, offers 99.999999999% (11 nines) data durability and 99.99% availability of objects over a given year. It offers easy data management with features such as backup, replication, and recovery while ensuring data security through encryption and access controls. You can integrate with other AWS services to enhance workflows, data versioning and lifecycle management to achieve cost optimization. For example, customers may be required to store finance data in SAP for 7 years due to legal requirements. The global accessibility, high durability, and disaster recovery options of Amazon S3 make it an appealing solution for modernizing SAP Content Server storage.
Prerequisites
Before you begin, ensure you have the following:
- AWS Account: An AWS account to provision the Amazon S3 File Gateway services
- SAP System: SAP ERP (S/4HANA or ECC) (e.g. RISE with SAP or Bring Your Own License) or on-premises
- SAP Installation Media: Access to the SAP Content Server installation media
- Basic Knowledge: Familiarity with AWS services and basic SAP administration
Proposed Architecture
There are 3 architecture options which should cover most customer scenarios.
Figure 1 shows a customer running SAP RISE on AWS. The SAP Content Server is provisioned in the customer’s AWS account, and connected to the SAP RISE AWS account via AWS Transit Gateway (or virtual private cloud (VPC) Peering).
Figure 1 : Solution Architecture for RISE with SAP on AWS
Figure 2 shows a hybrid model with the SAP systems on-premises including SAP Content Server. The SAP Content Server is connected to Amazon S3 File Gateway, which seamlessly connects the on-premises SAP Content Server applications to store and access content repositories stored in Amazon S3.
A Virtual Machine containing the Amazon File Gateway service is provisioned on-premises, and acts as a local disk cache, improving the retrieval performance of objects stored in Amazon S3 .
Figure 2 : Solution Architecture for Hybrid model (on-premises & AWS)
For customers who run SAP natively on AWS (BYOL), SAP Content Server can be provisioned in the same AWS account as the SAP systems, as per Figure 3.
Figure 3 : Solution Architecture for running SAP on AWS (BYOL)
Configuration steps
Setting up the AWS Environment
Follow the steps below to setup SAP Content Server in AWS.
- Configure the Amazon S3 File Gateway
- Create a Amazon S3 File Gateway as per blog Connect Amazon S3 File Gateway using AWS PrivateLink for Amazon S3
- Once the Amazon S3 File Gateway is created, Mount it as a filesystem mount point “/content_server” as per the screenshot in Figure 4.
- Additionally for Hybrid model deployment as per Figure 2, Amazon S3 File Gateway uses its cache storage to provide low-latency access to recently accessed data. The cache storage acts as the on-premises durable store for data that is pending upload to Amazon S3. To determine the size of cache storage kindly refer AWS documentation : Managing local disks for your gateway
Figure 4 : File system- WorkDoc Link
- Configure Security Groups in the SAP Content Server Amazon EC2 instance
- Inbound Rules: As per best practice , allow only source SAP application servers to communicate with SAP Content Server via the TCP/IP ports mentioned in SAP’s help documentation : TCP/IP Ports of All SAP Products
Installing and configuring SAP Content Server
- Install the SAP Content Server as per SAP Note 2786364 (Access to SAP Support Portal is required)
- Create the content repository in your SAP ERP system via transaction OAC0
-
- Log in to your SAP system. Enter transaction code OAC0
- In the Content Repositories screen, click on the “New Entries” button.
- Define Repository Attributes:
-
-
- Repository: Enter a unique name for the content repository (e.g., Z_STORAGE_GATEWAY)
- Description: Provide a meaningful description for the repository. (e.g., Z_STORAGE_GATEWAY)
- Document Area: Choose the appropriate document area. Typically, ARCHIVE or GENERAL or DMS
- Storage Type: Select HTTP Content Server if you’re using an SAP Content Server
- Version No: Enter the version number of the content server (e.g., 0047)
-
-
- Specify Content Server Details:
-
-
- HTTP Server: Enter the URL of your SAP Content Server (e.g., http://<server_name>:1090/sapcs)
- HTTPS Server: If using HTTPS, kindly refer to Figure 6
-
Figure 5 : Sample for HTTP configuration
Figure 6 : Sample for HTTPS configuration
-
- Save the Configuration:
-
-
- Click on the Save button to save your entries.
- Confirm any prompts to save your configuration.
-
-
- Test the Connection:
-
-
- Once the repository is configured, test the connection.
- Select the content repository and click on the “Content Server Check” button.
- Ensure that the connection to the Content Server is successful
-
- Configure SAP ERP to point to the new Content Server repository via transaction CSADMIN
-
- Select the Content Repository “Z_STORAGE_GATEWAY” created in the previous step
Figure 7 : Selecting the Amazon S3 File Gateway content repository
-
- Update the repository settings :
Table 1 : SAP Content Server parameters
Figure 8 : Updating the repository settings to point to the Amazon S3 File Gateway
-
- Save your settings, and verify the SAP Content Server is running successfully, as per the GREEN traffic light
Figure 9 : Content Server with “running” state
Testing the content server – ME22N
Transaction ME22N in SAP is used to change purchase orders. It is an integral part of the Materials Management (MM) module, allowing users to modify existing purchase orders for procurement processes.
To be able to attach files on ME22N transaction, “Links for Content Repositories” configuration need to be maintained via transaction OAC3. In this example Object Type “BUS2012” and Document Type “PDF” entry should point to Content Repository ID “Z_STORAGE_GATEWAY”.
Let’s attach a PDF file to one of the purchase orders as shown as shown in figures 10 – 12 and see this file in Amazon S3 bucket.
In ME22N, edit the existing PO and click on create attachment and upload the PDF document as shown in Figures 10 & 11.
Figure 10 : Creating an attachment in transaction ME22N
Figure 11 : Attachment successfully created
The document uploaded into the SAP Content Server is now visible in the Amazon S3 bucket :
Figure 12 : Amazon S3 bucket with the SAP Content Server documents uploaded
Migration steps
To migrate SAP Content Server with MaxDB to a file system, follow these general steps:
Migration documents via custom Z programs (Z_DOC_COPY & Z_MIGRATE_ARCHIVELINK)
- The advantage of using the mentioned reports is that migration can be run periodically until the cutover.
- Z_DOC_COPY (SAP Note 2774469)
- This report can be used to copy the attachments from the source content server and copy the attachments to the target server with selected document type or the whole content one by one. Also, this report compares the list of attachments between source and target; therefore the report can be re-run/resumed anytime.
- Execute SE38 and run the report Z_DOC_COPY
- Give the below inputs and click on execute.
- Destination Repository:
- Source Repository:
- Document List:
Z_MIGRATE_ARCHIVELINK (SAP Note 1043676)
- This report can be used to copy the attachments from the source content server to target, which are link based. This report would change the link table entries and update the newly generated IDs in the target repository.
- Execute SE38 and run the report Z_MIGRATE_ARCHIVELINK
- Give the below inputs and click on Execute by checking the appropriate boxes.
- OLD_ARC: <old Content Server repository ID>
- NEW_ORC: <new Content Server repository ID>
Figure 14 : Z_MIGRATE_ARCHIVELINK
Verification and Testing
- Verify that all documents have been successfully migrated and are accessible.
- Perform thorough testing to ensure the new Content Server works as expected.
- Check document integrity and access permissions.
- (Content Server 7.53, SAP Note 2888195) Run reports RSCMSTH0, RSCMSTH1 and RSCMSTH2 to validate the content repository is consistent and healthy
Switch to the New Content Server:
- Update SAP configurations to point to the new file system-based Content Server via transaction code OAC3
- Monitor the system closely for any issues post-migration.
Post-Migration Cleanup:
- Clean up the old MaxDB setup if no longer needed.
- Ensure all backup and disaster recovery procedures are updated to include the new Content Server configuration.
Backup and Recovery
AWS Backup can be used to provide a proper backup and recovery strategy for the SAP Content Server components :
- Amazon EC2 instance with SAP Content Server installed
- Amazon S3 File Gateway appliance
- Amazon S3 bucket storing the Content Server data
Even though the SAP Content Server data is stored in the Amazon S3 bucket, it is still important to backup its contents to prevent potential application level corruption.
For further details, please refer to the best-practices in the SAP lens Well-Architected Framework documentation Establish a method for consistent recovery of business data and Establish a method for recovering configuration data.
Comparison between MaxDB and Amazon S3 File Gateway
Table 2 highlights the Total Cost of Ownership (TCO) comparison between MaxDB and Amazon S3 File Gateway.
Table 2 : Comparison between MaxDB vs. Amazon S3 File Gateway
**The cost comparison was made with 2 database sizes, 500GB (calculator link) and 5TB (calculator link) with the following assumptions :
- SAP Content Server installed in a SAP-certified Amazon EC2 instance (r7i.large with 2 CPU, 16GB RAM)
- Storage
- 100GB gp3 storage for operating system and SAP binaries
- MaxDB : 600GB and 5.5TB gp3 storage respectively
- MaxDB : Daily database backups with 30-day retention, stored in Amazon S3 Standard – Infrequent Access
- Amazon S3 File Gateway : 500GB and 5TB for the filesystem storage (equal to the MaxDB database size)
- Amazon S3 File Gateway : Continuous backups via AWS Backup with 30-day retention
- Workload in AWS Singapore region
In summary, using the Amazon S3 File Gateway as the content repository reduces the operational complexity and costs significantly, whilst providing increased reliability and security.
Conclusion
In this blog post, we covered setting up Amazon S3 File Gateway as a file system integrated to SAP Content Server. We have created a content repository within it, and configured an SAP system to access the content repository. Additionally, we offered a step-by-step guide for migrating content from MaxDB to Amazon S3 File Gateway.
Deploying an SAP Content Server on AWS with a file system setup supported by Amazon S3 File Gateway can provide a cost-effective, robust, scalable solution for document management in your SAP environment. By leveraging AWS services, you can ensure high availability, data durability, and efficient performance. Follow the steps outlined in this guide to set up your own SAP Content Server on AWS, tailored to your organization’s needs.
If you would like to implement high availability with SAP Content Server, please refer to our blog “SAP Content Server High Availability using Amazon EFS and SUSE”.
Read more on AWS for SAP blogs to get inspiration on how you can modernize your SAP landscape on AWS.
Credits
We would like to thank Ferry Mulyadi and Derek Ewell for their contributions to this blog.