This is a detailed step-by-step technical guide document to introduce a Developer Extensibility case followed by this
blog.
1. Case Background:
In this case, we create an custom Fiori application, which can create multiple purchase requisitions from an Excel file template. Furthermore, you can define the upload template based on your own requirement.
2. Backend Service Development:
2.1 Create Database Table
To save the data uploaded from the Excel file, we first create a database table:
Define a new table to save the data uploaded from Excel file
2.2 Create CDS Data Model
Create CDS view on top of the database table, as the first layer to interact with database, configure different functions for the required fields through Annotations.
Create new data definition
Then we create a projection view on top of the interface CDS View created from the previous step, as an independent functional layer, we can filter specific fields.
Projection View
2.3 Create Behavior Definition
Behavior Definition
And then create behavior implementation class. When user clicks on "Create Purchase Requisition" button, it will trigger event CREATE_PR, and create the purchase requisition through EML.
Implementation Class
2.4 Create Service Definition and Service Binding
Right click the Projection View, we create a new service definition. We can choose which entity will be exposed to the service. As we only have one entity, so we use the system generated code.
New Service Definition
Then create service binding by right clicking on the service definition:
New Service Binding
After publishing, we can preview the service:
3. Frontend App Development
Open SAP Business Application Studio service:
SAP Business Application Studio
Choose SAP Fiori Worklist Application:
SAP Fiori Worklist Application
Choose the service we created earlier:
And here is the file structure created for the App:
For Excel upload function, we follow the steps from the following blog:
Excel Upload using RAP: Part -1 | SAP Blogs
Excel file upload function
It's also worthwhile to mention that, we have a pre-delivered package on SAP Intelligent Robotic Process Automation Store, which also create purchase requisition from local Excel files.
However, the technical implementations are different for these two approaches, In our case, we use the Business Object Interface only released for Developer Extensibility; for iRPA, it use the public release API. We can't say one approach is better than the other, we will have to choose the suitable one based on circumstances we have.
Create Purchase Requisitions from Excel (48M)
More Information on SAP S/4HANA Cloud, Public Edition:
- SAP S/4HANA Cloud, public edition, release info here
- Latest SAP S/4HANA Cloud, public edition, release blog posts here and previous release highlights here
- Product videos on our SAP S/4HANA Cloud, public edition and SAP S/4HANA YouTube playlist
- SAP S/4HANA PSCC Digital Enablement Wheel here
- Early Release Webinar Series here
- Inside SAP S/4HANA Podcast here
- openSAP Microlearnings for SAP S/4HANA here
- Best practices for SAP S/4HANA Cloud, public edition, here
- SAP S/4HANA Cloud, public edition, Community: here
- Feature Scope Description here
- What’s New here
- Help Portal Product Page here
- SAP S/4HANA Cloud ABAP Environment Community here
Follow us via
@SAP and #S4HANA or follow
vincent.zhu