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.
2.3 Create 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.
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:
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.