SAP S/4HANA Cloud, public edition, ABAP Environment Case 5: Purchase Requisition Mass Upload
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:
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.
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.
Then create service binding by right clicking on the service definition:
After publishing, we can preview the service:
3. Frontend App Development
Open SAP Business Application Studio service:
Choose 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.
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