Wednesday 10 April 2024

How to develop Customer creation Application in SAP Build Apps with OData service

Objective: -


Implementing SAP OData URI to SAP Build and Creating Customers in SAP BUILD which can replicate to SAP System

Business Scenario: -


How to create Customers using SAP Build Apps and OData Service.

Prerequisites: -


-> You Have an SAP BTP account or trial account.

-> Inside the BTP account, go to Instances and Subscriptions and create an instance of SAP Build Apps

-> Now go to Security -> Users Tab and assign Role to the user for SAP BUILD Apps

Now, we have to create the SAP Backend connection to SAP BTP : -

Before mapping data from S4H or our SAP System to Build Apps, we need to create a Destination in the BTP and give the required details of the S4H system with ODATA Uri too which we will consume (BTP->Connectivity->Destination )

How to develop Customer creation Application in SAP Build Apps with OData service

Connection is now established to that service.

How to develop Customer creation Application in SAP Build Apps with OData service

Now go to SAP Build Apps and navigate to Create to create a project.

How to develop Customer creation Application in SAP Build Apps with OData service

Now click on Build an Application to create a Application

How to develop Customer creation Application in SAP Build Apps with OData service

Now Click on Web & Mobile Application

How to develop Customer creation Application in SAP Build Apps with OData service

Now Give the project name and Description and You are good to go.

Inside the app you are working on SAP Build App go to the Authentication section and implement authentication

How to develop Customer creation Application in SAP Build Apps with OData service

Now create an App Variable that holds all fields that are present in our OData service.

How to develop Customer creation Application in SAP Build Apps with OData service

Now create a page and install a template from the marketplace which is Basic List and implement your UI for Customer Creation and a home page where all customers are displayed.

Now go to the DATA Section then go to SAP Systems and connect to your s4h System and the service that you called from the destination from SAP BTP will be available to you now.

How to develop Customer creation Application in SAP Build Apps with OData service

Now Click on this list go to ‘list resource’ fill in all the fields and configure authentication from Properties

How to develop Customer creation Application in SAP Build Apps with OData service

Now Go to the Logic section of List and implement logic like this

How to develop Customer creation Application in SAP Build Apps with OData service

Now click on the Create button go to Show logic for Button then implement this logic

How to develop Customer creation Application in SAP Build Apps with OData service

Now create another page as shown below and build a form to create Customer Data using input fields.

How to develop Customer creation Application in SAP Build Apps with OData service

Now do data binding to all fields by clicking on it and then assigning value to it

How to develop Customer creation Application in SAP Build Apps with OData service

Now do a similar mapping for every field

Also, implement a condition to alert that an empty value is not allowed.

How to develop Customer creation Application in SAP Build Apps with OData service

Now on the submit button implement logic that submit the data and updates the data to that OData service and thus will be reflected in the database table too

How to develop Customer creation Application in SAP Build Apps with OData service

How to develop Customer creation Application in SAP Build Apps with OData service

Preview Your Developments: -

Now when everything is done go to the Launch section then Preview your app.

How to develop Customer creation Application in SAP Build Apps with OData service

By this, we can preview our application either on the web or can be previewed in Smartphones.

Our Application Now looks like-

How to develop Customer creation Application in SAP Build Apps with OData service

When we click on the create button the second page appears

How to develop Customer creation Application in SAP Build Apps with OData service

Fill out details and now our customer is created.

How to develop Customer creation Application in SAP Build Apps with OData service

So now your customer is created in your database table which you can check by going to se11->KNA1

And you can see your entry got updated in table KNA1

How to develop Customer creation Application in SAP Build Apps with OData service

No comments:

Post a Comment