Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Chetan_Bhatt
Explorer

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 )

 

Chetan_Bhatt_0-1712235368204.png

 

 

Connection is now established to that service.

Chetan_Bhatt_1-1712235368416.png

 

 

 

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

Chetan_Bhatt_2-1712235368206.png

 

 

 

Now click on Build an Application to create a Application

Chetan_Bhatt_3-1712235368548.png

 

 

Now Click on Web & Mobile Application

Chetan_Bhatt_4-1712235368519.png

 

 

 

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

Chetan_Bhatt_5-1712235368532.png

 

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

Chetan_Bhatt_6-1712235368498.png

 

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.

 

Chetan_Bhatt_7-1712235368450.png

 

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

Chetan_Bhatt_8-1712235368551.png

 

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

Chetan_Bhatt_9-1712235368437.png

 

 

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

Chetan_Bhatt_10-1712235368445.png

 

 

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

Chetan_Bhatt_11-1712235368504.png

 

 

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

Chetan_Bhatt_12-1712235368473.png

 

 

Now do a similar mapping for every field

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

Chetan_Bhatt_13-1712235368467.png

 

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

Chetan_Bhatt_14-1712235368546.jpeg

 

Chetan_Bhatt_15-1712235368475.png

 

Preview Your Developments: -

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

Chetan_Bhatt_16-1712235368543.png

 

 

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

Our Application Now looks like-

Chetan_Bhatt_17-1712235368488.png

 

When we click on the create button the second page appears

Chetan_Bhatt_18-1712235368552.png

 

 

Fill out details and now our customer is created.

Chetan_Bhatt_19-1712235368470.png

 

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

Chetan_Bhatt_20-1712235368518.png

 

 

Labels in this area