In this post, We will go over a series of steps in creation of a Fiori application to perform CRUD operations using ABAP RESTful Application programming model(RAP) on S/4 HANA cloud platform and Business transaction platform(BTP).
There are 2 type of scenarios in RAP.
In this Blog, I am going to explain managed scenario.
Step 1: First, we need to create database table in S/4 HANA Cloud system to perform CRUD operations on this table.
Open Eclipse to create a database table.
Picture 1: Database table creation *Click to Enlarge.
Step 2: Create an Interface view on top of DB table.
Picture 2: Interface view.
Step 3: Create Consumption view on top of Interface view.
Picture 3: Consumption view.
Step 4: Create Metadata Extension file on top of Consumption view.
By using Metadata extension file, We can provide input selection and also arrange the order of fields in the Fiori application.
Right click on Core data services and select the Metadata Extension.
Picture 4: Metadata Extension file creation.
Once select the Metadata Extension, We should provide Name and Description.
Picture 5: Metadata extension file.
Step 5 : Create Behavior Definition on top of Interface view.
Right click on Interface view and select New behavior Definition.
Picture 6: Behavior Definition path.
In the Next popup, We should select Implementation type as Managed as shown in Picture 7.
Picture 7: Behavior Definition creation.
Picture 8: Behavior Definition.
Next We should implement the behavior definition as shown in Picture 9.
Picture 9: Behavior Definition Implementation path.
Click behavior implementation class as shown in Picture 10.
Picture 10: Behavior Definition implementation.
Once create behavior implementation, We should activate the behavior definition.
Step 6 : Create Projection on top of Consumption view.
Right click on Consumption view and select New Behavior Definition as shown in Picture 11.
Picture 11: Projection path.
Picture 12: Projection creation.
Picture 13: Projection.
Step 7 : Create Service Definition on top of Consumption view.
Right click on Consumption view and select New Service definition on the popup screen.
Picture 14: Service Definition Path.
Once select the New Service Definition, We should provide service definition name and description as shown in Picture 15.
Picture 15: Service Definition.
Picture 16: Service Definition code.
Step 8 : Create Service binding on top of Service Definition.
Right click on Service definition and select New Service binding on the popup.
Picture 17: Service Binding path.
Once you select the New Service binding, We should provide Name, Description and Binding type as shown in Picture 18.
Binding type as OData V2 - UI
Picture 18: Binding type selection.
Next we should activate and Publish the Service Binding as shown in Picture 19.
Picture 19: Service Binding activation.
Step 9: Right click on Entity Set and select Open Fiori Elements App preview as shown in Picture 20.
Picture 20: Fiori Application Preview.
Once select Open Fiori Elements App Preview, Fiori Application will open in a Browser as shown in Picture 21.
Click on create button on top of the screen as shown in below in Picture 22,
Enter the required details and click on create button as shown in Picture 23.
Once click on create button, Data will be saved successfully in Database table ZCOVID_COUNTRY.
We can delete the record also, Select the row and click on Delete button as shown in Picture 25.
Once click on delete button, the corresponding entry will be deleted from database table ZCOVID_COUNTRY.
If we need to update the data, Select the row and click on entry as shown in Picture 26.
Upon Click, it will navigate to another screen as shown in Picture 27.
Click on Edit button to update the record.
Update the required fields and click on Save button as shown in Picture 28.
Once click on Save button, Data will updated directly in the Database table ZCOVID_COUNTRY.
If we need to view the existing data in the database table, We can view it in the initial screen of the application.
Hope you find this post helpful.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
4 | |
4 | |
2 | |
2 | |
2 | |
2 | |
2 | |
1 | |
1 |