Organizations have moved beyond exploring Generative artificial intelligence (Gen AI) to actively using it for business value. If you work with SAP systems and are wondering where to start or looking for ideas on use cases, you are not alone. This blog explores common business use cases for SAP data and the different approaches available using AWS services for GenAI.
For Gen AI, organizations have options to leverage many technological approaches for their ERP data:
- AI embedded into the software (such as SAP Joule)
- Platform solutions such as SAP Gen AI Hub, which provides access to Amazon Bedrock models such as Anthropic Claude and Amazon Nova
- Pre-built solutions to analyze data, often with industry specific solutions for HR, Legal, etc.
- Building and customizing applications using Gen AI technology with their own business data
In this blog series, we focus on the third category of building your own solutions with following use cases, as it relates to using SAP data with AWS:
- Analyzing SAP Early Watch Analysis (EWA) reports using natural language
- Automating Invoice processing using intelligent document processing (IDP)
- Getting business insights from structured financial data using natural language
AWS Generative AI Services
In this blog, we use the following Generative AI services from AWS:
- Amazon Q Business: a fully managed, generative-AI powered assistant that you can configure to answer questions, provide summaries, generate content, and complete tasks based on your enterprise data.
- Amazon Bedrock: a fully managed service that makes high-performing foundation models (FMs) from leading AI companies and Amazon available for your use through a unified API. The Knowledge Bases feature of Bedrock enables you to give foundation models and agents contextual information from your company’s private data sources to deliver more relevant, accurate, and customized responses.
Analyzing SAP Early Watch Analysis (EWA) reports using natural language
EWA reports contain important details about the health of the SAP system and can be used to analyze trends over time. Since these documents have detailed information, it is common for a report to be several dozen pages; for example: the publicly available S/4HANA EWA sample from SAP has 213 pages. To analyze the report, incorporate recommendations, and capturing trends over time is a tedious task which can be automated using Amazon Q Business.
Figure 1 illustrates the architecture diagram of a potential solution, and this section shows the steps to build it.
- Upload your organization’s EWA reports (from all SAP systems) to Amazon S3 bucket
- Create Amazon Q Business application, Q Index, and add S3 as the data source
- Use web UI to analyze EWA reports
Figure 1: Architecture of the EWA Analyzer Application
- Upload your organization’s EWA reports (from all SAP systems) to Amazon S3 bucket
You can either create a new Amazon S3 bucket or use an existing empty bucket. Download all EWA reports and store those in Amazon S3 Bucket (make a note of the S3 bucket name. For example: sap-early-watch)
Note: If you wanted to test this solution with publicly available reports, you can use the publicly available sample reports.
- Create Amazon Q Business application, Q Index, and add S3 as the data source
Follow these steps to create an Amazon Q Business Application:
- Navigate to Amazon Q Business in AWS Console and click on Get Started button
- Click on Create Application and use the form to create the application as shown in Figure 2
- Use of AWS IAM Identity Center is recommended following AWS Best practices, but you can also use AWS IAM Identity Provider if you manage user identified outside of AWS
- Select a user to get started quickly, which you can edit later too (optional)
- After completing the form, click on the create button, which creates the web app in a few seconds
Figure 2: Creating application in Amazon Q Business
Follow these steps to Add Amazon Q Index:
- Navigate to the application you just created (ABC-EWA-Analyzer) and go to Data Sources as shown in Figure 3
Figure 3: Data Sources for Amazon Q Business
- Navigate to “Add an index” option and create a new index (as shown in Figure 4)
- Complete the form and add the index (it could take up to 20 mins to complete)
Figure 4: add index to application ABC-EWA-Analyzer
Follow these steps to add S3 as the data source:
- After creating the index, click on add data source (as shown in Figure 5) and select the S3 bucket where the EWA reports are stored (sap-early-watch in this case)
Figure 5: adding Amazon S3 as a data source for the application
- Choose the sync type and schedule you prefer
- Complete the data source form and click “add data source” button to complete the task
- Once the data source is added, you can use “sync now” to do the initial sync, which could take up to 20 mins depending on the number and length of the reports
- Use web UI to analyze EWA reports
After the sync is completed, use deployed URL (shown in the application) to access EWA Analyzer app. You can customize the web experience by including your own title, welcome and your company logo to be displayed in the app.
Figure 6 illustrates what the customized app may look like (ensure you have company knowledge selected in the toggle for knowledge sources)
Figure 6: Early Watch Analyzer app
Now you can use the app to do analysis (such as those mentioned below) which not only increases your productivity, but also helps you dig deeper into the investigation.
- Find the longest running database queries
- Check if your databases and operating systems have the latest updates
- Get specific advice for performance improvements as mentioned in the report
Figure 7 shows an example of interaction with the application to ask relevant questions about the EWA reports uploaded in the S3 bucket. Also note the transparency aspect of Amazon Q, which shows the sources being used to generate the answer.
Figure 7: EWA analysis using Amazon Q Business application
Tip: You can also use Amazon Q Business app to analyze SAP readiness check reports, sizing reports, etc.
This wraps up our EWA analysis use-case where we discussed how you can:
- Reduce manual review time of multi-page EWA reports
- Enable quick analysis of system health across multiple SAP systems
- Track trends and recommendations over time
Automating Invoice processing using intelligent document processing (IDP)
Traditional manual handling of paper-based and digital invoices is not only time-consuming but also prone to errors, leading to delayed payments, compliance risks, and inefficient use of valuable human resources. As businesses scale, the volume of invoices grows exponentially, making manual processing increasingly unsustainable. This is where you can leverage a generative AI solution to reduce some of the burden. You can also use SAP Build process automation solution in addition to AWS technologies.
Invoice processing and classification: If your organization works with either paper based or pdf/email invoices, you know the tradeoffs between efficiency and accuracy. Manual processing doesn’t scale either. This section showcases how to use Amazon Bedrock Data Automation feature for following use cases:
- Automate the paper/pdf-based invoice processing in SAP or third-party system
- Classify invoices into different groups for further analysis
Note: If you are posting the invoice directly in SAP, you can also use an alternative approach such as using SAP Build Process Automation (a Business Technology Platform service available on AWS) to automate the processing.
Bedrock Data Automation (BDA) simplifies data extraction out of unstructured documents (such as invoices) and media by leveraging Generative AI to automate the transformation of multi-modal data into structured formats. You can use BDA for invoice processing and classification as follows:
- Extract, normalize, and validate the data from invoices
- Customize BDA output and integrate with existing workflows for processing
- Use the normalized output for invoice classification (such as by business unit)
Figure 8 illustrates the architecture diagram of the solution, and this section shows the steps to build it.
- Upload your organization’s invoices to Amazon S3 bucket
- Create BDA project and add a blueprint
- Integrate results into existing workflow for processing
Figure 8: Architecture for Using BDA for invoice processing and classification
- Upload your organization’s invoices to Amazon S3 bucket
You can either create a new Amazon S3 bucket or use an existing empty bucket. Upload all invoices (pdf, scanned images, etc) to Amazon S3 bucket
- Create BDA project and add a blueprint
Follow these steps to create BDA project and blueprint:
- Navigate to Data Automation under Amazon Bedrock in AWS console and create a project as shown in Figure 9
Figure 9: Creating a new BDA project
- Once the project is created, use the test option to import data from the S3 bucket where the invoices reside as shown in Figure 10
Figure 10: Invoice processing test from AWS console
- Figure 11 shows an example of standard output from BDA, which can be downloaded in JSON format
Figure 11: Example of standard output of BDA
- Evaluate the standard output and if you need further control, use custom output (as shown in Figure 12) and create a blueprint using “blueprint prompt”; you can also select an AWS provided blueprint from the list.
Figure 12: BDA custom output and blueprint
- Integrate results into existing workflow for processing: After thorough testing, when you are certain that the blueprint extracts the data the way your organization uses, integrate the BDA project into your existing workflow for invoice processing into SAP such as an app created using SAP Business Technology Platform (BTP) services.
AWS SDK for SAP ABAP: In your workflow, you can use AWS SDK for SAP ABAP to seamlessly integrate between SAP ABAP and 200+ AWS services within RISE with SAP, GROW with SAP, and self-managed environments.
Tip: You can also use the output as a part of Retrieval Augmented Generation (RAG) workflow to query the extracted information using natural language.
This wraps up our invoice processing use case using IDP where we discussed how you can:
- Transform unstructured invoice data into structured formats
- Streamline processing of paper-based and digital invoices
- Reduce manual processing errors and improve efficiency
- Enable invoice classification for further analysis
Sample cost breakdown
The following table provides a sample cost breakdown for deploying this solution in your own AWS account with the default parameters in the US East 1 (N. Virginia) Region.
AWS service | Dimensions | Cost in USD |
Amazon Q Business Pro | Per user per month | $20 |
Enterprise Index | One Index Unit per month | $192.72 |
Amazon Bedrock Data Automation (BDA) | 1000 pages processed using blueprint | $40 |
Amazon S3 | 1 TB storage for EWA and invoices | $23.55 |
Tip: We recommend creating a Budget through AWS Cost Explorer to help manage costs. For full details, refer to the pricing webpage for each AWS service used in this blog.
Conclusion
In this blog, we discussed how you can increase personnel efficiency and reduce errors for SAP data using AWS Generative AI services. In Part 2 of the blog, we’ll discuss the use details of getting business insights from structured financial data using natural language.
Learn more about AWS Generative AI services and get started with your own use cases with Amazon Q
Join the SAP on AWS Discussion
In addition to your customer account team and AWS Support channels, AWS provides public Question & Answer forums on our re:Post Site. Our SAP on AWS Solution Architecture team regularly monitor the SAP on AWS topic for discussion and questions that could be answered to assist you. If your question is not support-related, consider joining the discussion over at re:Post and adding to the community knowledge base.