Technical Articles
Configure the SAP BTP Cloud Foundry Environment Subaccount with SAP Forms Service by Adobe and Test with Postman
Purpose
This section shows how to configure the SAP BTP, Cloud Foundry environment subaccount, and the SAP Forms service by Adobe. This service API will be tested with with postman
Prerequisites
You have a subaccount on SAP BTP, Cloud Foundry environment and the subaccount has entitlement of service Forms service by Adobe .
Procedure
Note : Please use Microsoft Edge Browser to do the configuration .
1, Create instance for ADS subscription
Enter BTP sub-account and create instance for Form Service by Adobe
2,Enter BTP sub-account and create instance for Forms Service by Adobe API
Forms Service by Adobe API
The ads rest api document URL: URI + /swagger-ui.html
https://adsrestapi-formsprocessing.cfapps.eu10.hana.ondemand.com/swagger-ui.html
The form template store URL is : a.
https://apjcoe-x66183k9-ads.formsprocessing.cfapps.eu10.hana.ondemand.com/adsrestapi/ui.html
https://github.com/SAP-samples/s4hana-ext-cloud-label-printing/blob/main/PrintLabel.xdp
Now the xdp template has been created in ADS
6, Test BTP form service by abobe rest api to render adobe form
a, use adobe live designer to open the xdp file from the following linkage:
b, build printing content data for render rest api call
use notepad open the preview data
paste the body in the following website to encode it to BASE64
Base64 Encode and Decode – Online
c, build body for rest API call according to swagger ui in 2 :
d, test in postman
Method : Post
URL: From 3 URI + Swagger render api path
Authorization Type : OAuth 2.0
Authorization token url , client key client secret are from 3 instance key .
parameters :
templateSource: storageName
TraceLevel, 2
body is from c
response:
The End
Best regards!
Jacky Liu
Thanks for sharing. We no longer required to create a BTP Neo subaccount just for using Forms service by Adobe 🙂
Hi, Shanmugham,
This blog is base on BTP cloud foundry Forms service by Adobe .
Hi Jack,
Awesome blog, but i got stuck after RoleCollections adobeservice have been assigned to myself.
When attempting to access the Adobe Form Process i got a forbidden issue.
https://eu-au-hack2build-fhqf9s3k-ads.formsprocessing.cfapps.eu10.hana.ondemand.com/adsrestapi/ui.html
Hi,Ramon,
After assigning role , you'd better waite some time or clean browser's cache and login again . Then you can try again .
Best regards!
Jacky Liu
Hi Murali Shanmugham Hi Jacky Liu
Please could you help me with a customer question in relation to how the SAP Forms Service by Adobe is charged? (CPEA consumption model)
When using the Discovery Centre calculator, I can see this is charged in blocks of x forms per month but I would like to understand if this charge would apply for each sub-account that the service is activated under?
Regards, H
p.s. Ryan Gosnold
Replying to my own question ^^ as I got confirmation from the product manager who looks after this service:
<< An important point: The licensable entity is not forms, but ‘form requests’. It’s one ‘form request’ per 5 pages.
A customer purchases a global account and then activates Forms by Adobe for each subaccount. E.g. create and assign one subaccount for Prod, Test and Dev if they like.
However, this does not change anything with respect to the charge, because the charging for this forms service is based at the global account level. >>
Hope this helps.
Regards, H
Hi, Henry,
Thanks for the sharing this information ! I think this explanation from PM team explain the cost estimate in discover center in the following linkage .
ads cost estimate
Best Regards!
Jacky Liu
Hello Jacky,
Very nice blog but when I try to test it (Get new access token) with postman I run into an issue.
The following 2 popups are displayed and no access token is returned.
Am I using the wrong grant type because when I use "Authorization code" I'm also obliged to fill in field "Auth URL"
Any help is highly appreciated.
Tom.
Solved it myself.
Still, nice blog. 😉
Hello Tom,
I am having same issue that you faced. Could you please help me with your solution to resolve this.
Thank you.
Ashutosh
hello sir,
if u struggle to get access token add this line last " /oauth/token" in
"Access token URL"
Hi,
I'm having some trouble with the final part of this guide. I'm up to 6c and have the body of the request created in Notepad++ including the encoded xml. Beyond that I am not sure what to do next.
I have installed Postman (which I have not used before) and it is unclear how I test the API from Swagger UI in Postman? I seem to be able to import the API ref from API Business Accelerator Hub or directly from the URL and can then see a collection with all of the various methods for each API but I'm not sure if this is right - and I'm unsure how to get my API call page to look like your's in 6d.
Could you provide some further clarity to how you get from 6c to 6d?
Thank you
Hi, Moor ,
6c is just for use to understand who define the path , parameter , and body in postman . You can test in 6d directly .
The following is the url and body I used in postman. Replace the bold part.
Replace the hostanme from your adobe service service key . Replace the xdpTemplate and xmlData in body .
https://adsrestapi-formsprocessing.cfapps.eu10.hana.ondemand.com/v1/adsRender/pdf?templateSource=storageName
Thank you!
Hi Jacky,
I'm having some trouble with the API part of this guide.
Firstly Forms Service by Adobe is an instance instead of application so I can't get the url to open ADS
Have there been any changes recently for the service?
Secondly When I call the api by postman it response as below,
Best Regards,
Junpeng Lin
Hi, Junpeng,
In 5 a and 5 e , we need to create form and upload template in xdp file . In 6c we need to use them as body fields . The error means the form and template can not be found .
Jacky Liu
Hallo jacky Liu,Getting the same error as Junpeng.
I did subscribe only to the API service. Do I also have to subscribe to the "general" Form Service, so that a repository can be created? Or is it possible to create one without this?
Thanks!
Tobias
Hi,Tobias,
You need to create to create subscribtion and instance(API) both. You need to use the subscribtion to upload form templated .
Best regards!
Jacky Liu
Hi!
Thanks for the info. I'm getting status: 401Unauthorized, but I've followed all the steps. What can I be doing wrong?
Hi, Martins,
You need to get oauth token first as the following.
Best regards!
Jacky Liu
hello Jacky,
while performing get method the API is being called correctly and returns the data but while post method
https://adsrestapi-formsprocessing.cfapps.eu10.hana.ondemand.com/v1/adsRender/pdf?templateSource=storageName
the url i am using.. can you enlighten me on What can I be doing wrong?
Best regards!
Hi, Ahmed
I think you can check from the following 2 point .
1 ,The URL https://adsrestapi-formsprocessing.cfapps.eu10.hana.ondemand.com should come from your adobe service service key .
2, Check the request body .
Best regards!
Jacky Liu
Hello Jacky Liu,
thanks working fine now probably had issue with Grant Type or Client Authentication
Any idea on how to print these forms using specific parameter like Purchase order or Billing Document in Public Cloud ?
Best regards!
Farhan Ahmed
Hi, Ahmed,
If Public Cloud means s/4 hana cloud Es version, there is outbound management in S4HC, check this with consultant .
If Public Cloud does not mean s/4 hana cloud Es version, and you want to realize in BTP , please refer to the following blogs:
https://blogs.sap.com/2023/08/11/render-and-sign-pdf-document-in-a-ui5-application-with-btp-form-service-by-adobe/
https://blogs.sap.com/2022/12/25/test-btp-sap-print-service-with-postman/
https://blogs.sap.com/2023/09/03/build-digital-document-platform-backend-service-on-btp-with-btp-ads-sdm-print-service/
Best regards!
Jacky Liu
hello Jacky
Great Blog!! Followed all the steps and was able to call the API on Postman Successfully.. Additionally I want to Print these forms on Public Cloud Please will you Guide me on that
Best Regards,
Hi, Milind,
Thanks!
Would you please refer to the following blogs :
https://blogs.sap.com/2023/08/11/render-and-sign-pdf-document-in-a-ui5-application-with-btp-form-service-by-adobe/
https://blogs.sap.com/2022/12/25/test-btp-sap-print-service-with-postman/
https://blogs.sap.com/2023/09/03/build-digital-document-platform-backend-service-on-btp-with-btp-ads-sdm-print-service/
Best regards!
Jacky Liu
Hello Jacky,
Thanks for sharing this blog with the community. QQ is there any detailed SAP training course on SAP Learning hub which covers these topics in more detail ?
Regards,
Abdul Hakim
Hi, Hakim,
As I know , currently there is no SAP Training couse on SAP Learning hub . There is mission named
Thanks Jacky for the response and clarification.
Hello Jacky
Couple of questions.
1. If the backend system is SAP S/4 HANA and if it is connected to BTP adobe form service. Is it possible to view and make changes to the SAP Standard form template? If Yes is it done using the form template url step 5b in the blog?
2. Also is there any configuration guide available which System admin can follow and set up the connectivity between SAP S/4 and BTP form service
3. Whether developer need access to BTP cockpit to access the form template url step 5b or if the system admin just share this url with the developer would suffice developer need without logging into BTP cockpit?
Regards
Abdul Hakim
Hi, Abdul Hakim
You can refer to the following document . You can replace S/4HANA embedded ADS with BTP ADS .
https://help.sap.com/docs/forms-service-by-adobe/sap-forms-service-cf/configure-sap-forms-service-in-s-4hana-on-premise-systems?locale=en-US
Best Regards!
Jacky Liu
Hello,
What about if we want to deploy the app to the system?
I'm getting CORS errors when calling the api, but nothaving problems on postman.
How can i solve that?
Regards,
Inês
Hi, Ines,
You can use destination in BTP Cloud foundry to overcome the CORS error .
You can refer to the following blog .
https://blogs.sap.com/2022/11/23/render-and-view-pdf-in-sap-ui5-with-forms-service-by-adobe-in-btp/
Best regards!
Jacky Liu
Hi Jacky,
When performing step 4 - "assign role collections" step, i do not see adobeservice role collection listed. Is this something that has to be manually created?
I only see these.
Thank you
Julius
Hi, Julius,
It will take a some time for step 1 to be finished. Step 1's status should be subscribed . Then you could open browser in Incognito and login into BTP cockpit to do Step 4 .
Best regards!
Jacky Liu