This service is no stranger to most SAP customers as it is the go to service when comes to generation of interactive forms or static PDF forms based on pre-configured templates, that may be used as attachments for transactions or documents on ECC or S/4HANA.
However, with the advancement in technology over the years, I cannot stop to wonder, why do customers prefer or still using this two-decade old service even though there are other innovative solutions in the market? I noticed another problem while researching on the service via the web, most of the blogs and SAP’s help documentation only focus on integration with ECC or S/4HANA using ABAP coding. This sounds like a good technology that can be used outside of SAP context and have led me to my next burning question, "Did anyone try to maximise this service beyond SAP context and with the use of python?" Sadly, there is limited information on this.
Recently, I had a chance to build and demonstrate a proof of concept with this service on BTP, based on an actual use case. Finally, I got all my answers. Hence, let’s dive into the details.
Use Case:
Customer is keen on exploring BTP services to create an application for their ground staff to generate unique labels for their finished goods. These are some of their business requirements:
Solution:
Create an application using SAP Build Apps, a low-code, no-code service for frontend development and a backend service using python, that integrates with database, object repository and SAP Form Service by Adobe. The backend service will be hosted on SAP Cloud Foundry Runtime.
Technical Architecture
For this blog, I will be focusing only on using SAP Form Service by Adobe and calling the service via python with the standard APIs.
How to start?
Prerequisite: To create form templates, you will need to download and install Adobe Lifecycle Designer. There are some SAP Notes and SAP’s help documentation available online that can guide you on how to get this software. Please refer to this link for more information.
Step 1: Create a form template using Adobe Lifecycle Designer
First realisation: Adobe lifecycle designer is a business user friendly software.
The drag and drop feature within Adobe Lifecycle Designer, enables user to create form template easily. It comes with a comprehensive object library containing the most commonly used objects (components) like button, check box, etc., for a form. It also allows user to embed a QR code in the template and specify the data beneath it. All the user needs to do is to drag their desired objects into the design panel and design the form template.
Step 2: Create a data schema in xsd format
These are the XML data that I wish to insert into the form template. Let’s convert the XML data into xml data schema in xsd format.
Step 3: Bind the data with the objects in the template and export the template
User has the option to bind with a sample XML data file to visualise the final form outcome before binding it with a xml schema. Once this is done, export the template in xdp format.
Step 4: Activate SAP Form Service by Adobe via BTP cockpit. Access the UI to upload template and data schema.
You can refer to this link to learn more about the service setup on BTP cockpit.
Once the service is set up and with the appropriate roles assigned, you may access the SAP Form Service Landing page.
Step 5: Upload Form Template and Data Schema under “Template Store”
First, create a Form on SAP Form Service by Adobe. You can proceed to upload the form template (xdp file) and data schema (xsd file) into the service.
Second realisation: Python can be used to create the necessary files for PDF rendering.
Step 6: Create a backend python service
a. Use the SAP Form Service by Adobe standard API to pull the template from ADS service.
b. Generate encoded xml data encoded Base64 file using Xml.etree.Element tree library.
c. Render PDF to generate label via API
When Render PDF API (labelled as ADS - Render Requests on SAP Business Accelerator Hub [link]) is called with the necessary payload information, the response will return a Base64 encoded file of the rendered PDF. You will need to decode it and save it to your desired destination, either on local machine or into an object repository.
Output
Conclusion
As you can see from above, SAP Form Service by Adobe can be further leverage by expanding the use cases outside of ERP context, with the use of a different coding language, python. I hope that this blog can serve as a good reference for the community to maximise the usage of this service.
Happy learning and exploring!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
58 | |
20 | |
11 | |
11 | |
7 | |
7 | |
6 | |
6 | |
6 | |
4 |