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, 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 )
Connection is now established to that service.
Now go to SAP Build Apps and navigate to Create to create a project.
Now click on Build an Application to create a Application
Now Click on Web & Mobile Application
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
Now create an App Variable that holds all fields that are present in our 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.
Now Click on this list go to ‘list resource’ fill in all the fields and configure authentication from Properties
Now Go to the Logic section of List and implement logic like this
Now click on the Create button go to Show logic for Button then implement this logic
Now create another page as shown below and build a form to create Customer Data using input fields.
Now do data binding to all fields by clicking on it and then assigning value to it
Now do a similar mapping for every field
Also, implement a condition to alert that an empty value is not allowed.
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
Preview Your Developments: -
Now when everything is done go to the Launch section then Preview your app.
By this, we can preview our application either on the web or can be previewed in Smartphones.
Our Application Now looks like-
When we click on the create button the second page appears
Fill out details and now our customer is created.
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
No comments:
Post a Comment