This is the second blog in the 2-part series on Basic Fiori Application development on SAP Cloud Platform, ABAP Environment. Here is the link to first blog:
In this blog, we will cover the part of service generation based on the data model created in first blog.
Service definition is used to define which data is exposed as a business service. It is a consumer-specific but protocol-agnostic perspective on a data model.
One CDS view can be part of multiple service definitions, which are being used for applications created for different types of consumers.
I created service definition, where I exposed both CDS views:
Service binding is used to bind a service definition to a client-server communication protocol such as OData. It defines how a service is offered to a consumer, whether through a UI service or as a Web API.
I created service binding for the service definition defined in earlier section:
You can notice that Binding type is ‘ODATA V2’. So, service generated from here can be used as a UI service, for example, as a Fiori elements application. It can also be seen that CDS entities and their relationships are shown on the right side.
If you want to see the OData service generated from this development, click on ‘Service URL’ on the right-side of the screen.
Beauty of Steampunk is that you can see the ‘UI Preview’ of your application without going to the Web IDE. If you put cursor on ‘SalesOrderDetails’ and click ‘Preview’, It will open a new browser window, provide your credentials and you will see your generated Fiori screen.
When I press ‘UI Preview’ for my development, I see the Fiori elements generated application, where I can navigate and perform any actions as well. Here is the application for this development:
Press ‘Go’ and you see Sales Order Header Details:
Navigate to any line item details:
To conclude, I hope above development steps and explanations gave you fair idea about development in Steampunk system.
I strongly recommend you go through below links and understand Restful Application Programming model and create more such scenarios on Steampunk. Don’t forget to share your learnings!!