My initial plan was to se Boosters for Free Tier Use of SAP AI Core and SAP AI Launchpad
(Be aware- AI core and AI launchpad are not available in BTP free tier. Alas!)
Next Goal:
Build an end-to-end document AI demo that:
Architecture
[Streamlit UI] → [BTP Destination/Service Key] → [SAP Document AI API]
↓
[Response JSON → Results Display]
But hang on – If you are a first time user of SAP BTP, ( Most of SAP business analyst, Functional consultants, SAP managers in 2025 are right at this phase- they all have heard about BTP, knows what it is used for – but never used it hands-on ) there are too many pre requisite one after another. More interesting fact- not all of them are in a single place. You need to stitch bits and pieces to make it work.
I researched few articles over internet even asked Walkme- but didn't get necessary answers
Assumption - Most of the folks who would read this article have SAP S-user ID from past interaction with SAP marketplace portal.
Note – Reference: https://developers.sap.com/tutorials/hcp-create-trial-account.html
To start with- Access SAP BTP Cockpit and create Global + Sub account under free BTP trial.
Once the signup process is complete, you can access the cockpit via https://cockpit.hanatrial.ondemand.com/trial/
Choose region- Either of the below- it will take up to 3 minutes to create BTP accounts.
This page below will display the current state of the subaccount. You can manage your subscriptions and jump into the different runtime environments. It also shows you fundamental; information of the Cloud Foundry environment, such as the API endpoint and the available spaces – SAVE it as favourite (Top right corner star icon inside SAP BTP)
You may need to navigate between Global and sub account and different nodes often.
A SAP BTP subaccount is best described as a workspace for development and application deployment that provides strong isolation for security, user management, and data segregation, rather than a "client" in the traditional SAP multi-client sense.
We can have multiple sub account inside one global BTP account
Next step- Run Booster method to enable SAP document service
NOTE - We do not need to Manage Entitlements Using the BTP Cockpit.
Rather we shall use booster method under Global BTP account
Go to global BTP account page- click on left panel boosters as shown below
scroll down – under artificial intelligence category
This booster helps you set up SAP Document AI in the SAP BTP cockpit.
Step by step, this booster assigns entitlements, updates your subaccount, and creates a service instance and the associated service key for SAP Document AI.
Click start
Reminder- If you close SAP BTP browser by mistake – here is a quick link to open it again - https://cockpit.hanatrial.ondemand.com/trial/
Next go to BTP sub account – which is visible under Global account as below- left panel you can click on account explorer
Inside sub account ->expand services - look for instances and subscriptions on left panel- shown below
We can see 2 subscriptions below by default SAP Business application studio is enabled
Next click on service marketplace
Search with AI + Enter- select 1st tile shown below
Click on Create (as I pre-created so it is greyed out)
Fill up below popup
Tips: You should select the plan as shown below to use the SAP AI document service effectively as a plug and play from external ecosystem.
Setup your new instance as below- name as per your choice
Next – From left panel, again go to instances and subscriptions- this time 2nd tab called instances
Note – the difference in “Plan” in the setup, one is default another is blocks of 100.
Click on the credential “1key “ and 'Form'- we explain this in details. You may download it.
1/ Url -i.e. DOC_AI_URL used by external application.
2/ TOKEN_URL = This will be needed by external apps to authenticate with BTP service.
This url has term ‘authentication’- -Tips- do not use sburl
Tips- when using this Token for authentication, we need to add suffix befind above url as below after ondemand.com
/oauth/token"
3/ CLIENT_ID – That is self-explanatory- from the above screenshot, you must note down.
4/ CLIENT_SECRET - That is self-explanatory- from the above screenshot, you must note down.
Inside the key file there is another element called swagger
When we would make a call to SAP AI document services- our schema from external applications, then this swagger needs to be passed along with the document Url.
Full API endpoint (for extraction jobs)
combine "url" + "swagger"
Next- From left panel -click on Security- still within BTP sub account
Look into right panel – click on arrow – to navigate inside details
Click on the Role collections tab- It will show already assigned existing roles- do not get confused or search roles here. Click on assign role collections
In the below popup-search for ‘doc’ and assign all of them to your BTP user
Note- without those roles you will not be able to use SAP AI doc service schema configuration- neither the external call will work.
Tips- this is crucial step-otherwise SAP BTP service call will authenticate but not be able to use your own custom schema or SAP defined standard schemas and purpose of the plug & play will be defeated.
Interestingly this role collection step you may have to do multiple times as I observed even after assignment on 1st day- next day it vanished- had to re assign.
Next go back to Instances & subsc.from left panel
Click on application = SAP doc AI shown below
A new browser widow will open as below
Tips- Without suitable role collection this arrow marked button will not appear- This is used for schema creation.
Click on schema configuration Below list of schemas will be shown- SAP_ are all standard schema provided out of box-we can use it as is or create our own schema. When we click on create – below popup appears
As shown below I created my own schema namely invoice_ai_doc
I clicked on my schema name- copy of SAP_invoice_schema Next – I click on create version- I could now get ‘Edit’ button enabled for both header and item fields of the invoice schema- I can click on ADD button to add my bespoke fields as shown below.
Finally click on activate the schema
Now all necessary BTP setup is ready.
Next- outside SAP ecosystem – plug and play.
For simplicity, I shall use ‘Streamlit’ an open-source Python library that allows us to create interactive web applications using pure Python and a python project on PyCharm IDE
Note- Any web application/tech. stack React, Django, Flask, JavaScript Node.js backend, Angular, CSS etc. can leverage SAP BTP Document AI service with above setup.
I created following python project in PyCharm - where I loaded secret key of SAP BTP DOC AI service instance in a safe and secure way. I have used .env and .gitignore to protect unwanted github publishing of the key details as per best practice guidelines.
A simple object class is created for this demonstration
Having 4 methods as below
Next showtime! I run my streamlit app UI called app.py(see python project)
The frontend is displayed below
Feature-
1/ I can test service configuration with SAP BTP authentication token
2/ Available schema
3/ Browse & Upload invoice and click ‘Extract document information’ on streamlit app
a) I upload a train ticket invoice PDF
b) A sample invoice jpeg
c) A sample invoice pdf with different details.
Result –
2nd Invoice image
3rd Invoice also uploaded for analysis and extracted on my app as below
Next – check on SAP BTP portal, where we submitted those 3 invoices (2 pdf and 1 jpeg)
Below is the document service page, amazing!
I can also open any invoice – example below – It also shows ECR values right side!
Conclusion:
In a world where technology evolves faster than documentation can keep up, it’s easy for Functional Analysts to feel lost and overwhelmed. This guide bridges that gap, providing clear, step-by-step instructions to integrate SAP Document AI seamlessly with any non-SAP web application. By removing the guesswork and eliminating outdated instructions, it empowers analysts to explore, experiment, and innovate without frustration. The result? Less confusion, more confidence, and the ability to unlock the true potential of intelligent document processing in your organization.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.