Overview:- SAP Build apps enables quick application development which will reduce our coding dependence and give result oriented comprehensive user experience.
Motivation:-
In this blog you will learn how to post data from SAP Build Apps web application to S/4 HANA System.
Business Scenario:- Design a SAP build app which will post data to SAP S/4 HANA Z Table using OADAT POST Call.
Create an ODATA with Create Entity Method and Create a Custom Z Table.
Now Create a new SAP Builds app
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2023/10/execute-odata-post-call-in-sap-build-apps-1-1024x362.jpg?resize=730%2C258&ssl=1)
Click on Build an Application
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2023/10/execute-odata-post-call-in-sap-build-apps-2.jpg?resize=541%2C700&ssl=1)
Click on Web & Mobile Application
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2023/10/execute-odata-post-call-in-sap-build-apps-3.jpg?resize=730%2C488&ssl=1)
Give the Project Name and Description
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2023/10/execute-odata-post-call-in-sap-build-apps-4.jpg?resize=730%2C652&ssl=1)
Build apps UI Canvas
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2023/10/execute-odata-post-call-in-sap-build-apps-5-1024x478.jpg?resize=730%2C341&ssl=1)
Now Its time to create a Destination in SAP BTP cockpit under Connectivity, give all the required details as given in below screen shot’s and add the additional properties. In the URL give your ODATA URI and click on Save button then do the connection test.
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2023/10/execute-odata-post-call-in-sap-build-apps-6-1024x481.jpg?resize=730%2C343&ssl=1)
Connection test
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2023/10/execute-odata-post-call-in-sap-build-apps-7.jpg?resize=652%2C262&ssl=1)
Go to SAP build app Auth tab and click on Enable Authentication
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2023/10/execute-odata-post-call-in-sap-build-apps-8-1024x480.jpg?resize=730%2C342&ssl=1)
Click on SAP BTP authentication
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2023/10/execute-odata-post-call-in-sap-build-apps-9-1024x480.jpg?resize=730%2C342&ssl=1)
Click on Save button
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2023/10/execute-odata-post-call-in-sap-build-apps-10-1024x483.jpg?resize=730%2C344&ssl=1)
Click on Data Tab and click on Add Integration button
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2023/10/execute-odata-post-call-in-sap-build-apps-11-1024x349.jpg?resize=730%2C249&ssl=1)
Click on BTP Destination
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2023/10/execute-odata-post-call-in-sap-build-apps-12-1024x343.jpg?resize=730%2C245&ssl=1)
Select your created destination which has been created in destination under Connectivity in BTP cockpit
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2023/10/execute-odata-post-call-in-sap-build-apps-13-1024x267.jpg?resize=730%2C190&ssl=1)
Click on Install Integration
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2023/10/execute-odata-post-call-in-sap-build-apps-14-1024x453.jpg?resize=730%2C323&ssl=1)
Click on Data Entity
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2023/10/execute-odata-post-call-in-sap-build-apps-15-1024x479.jpg?resize=730%2C341&ssl=1)
Enabled Data Entity and Save
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2023/10/execute-odata-post-call-in-sap-build-apps-16-1024x455.jpg?resize=730%2C324&ssl=1)
Open UI Canvas and Click on green arrow for switch to Variable mode
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2023/10/execute-odata-post-call-in-sap-build-apps-17-1024x225.jpg?resize=730%2C160&ssl=1)
In the variable mode here we can define App and Data variable
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2023/10/execute-odata-post-call-in-sap-build-apps-18-1024x482.jpg?resize=730%2C344&ssl=1)
Click on App variable as MATNR, MAKTX, I have only 2 fields in my ODATA & Custom Table.
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2023/10/execute-odata-post-call-in-sap-build-apps-19-1024x388.jpg?resize=730%2C277&ssl=1)
Click on Data variable + sign and select the Data entity
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2023/10/execute-odata-post-call-in-sap-build-apps-20-1024x377.jpg?resize=730%2C269&ssl=1)
Select the Data entity
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2023/10/execute-odata-post-call-in-sap-build-apps-21-1024x422.jpg?resize=730%2C301&ssl=1)
Added Data variable and click on Save
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2023/10/execute-odata-post-call-in-sap-build-apps-22-1024x376.jpg?resize=730%2C268&ssl=1)
Switch to view mode from variable mode
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2023/10/execute-odata-post-call-in-sap-build-apps-23-1024x184.jpg?resize=730%2C131&ssl=1)
In UI Canvas drag and drop the fields
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2023/10/execute-odata-post-call-in-sap-build-apps-24-1024x439.jpg?resize=730%2C313&ssl=1)
Give Screen fields name as per your requirement
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2023/10/execute-odata-post-call-in-sap-build-apps-25-1024x430.jpg?resize=730%2C307&ssl=1)
Assign screen fields with App variable, select the fields and click on value icon
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2023/10/execute-odata-post-call-in-sap-build-apps-26-1024x354.jpg?resize=730%2C252&ssl=1)
After clicked on Value below popup will open, Select the Data and Variable
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2023/10/execute-odata-post-call-in-sap-build-apps-27-1024x539.jpg?resize=730%2C384&ssl=1)
click on App variable
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2023/10/execute-odata-post-call-in-sap-build-apps-28-1024x559.jpg?resize=730%2C399&ssl=1)
Select the App variable and click on Save, Please do the same activity to assign app variable for MAKTX fields and save.
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2023/10/execute-odata-post-call-in-sap-build-apps-29-1024x576.jpg?resize=730%2C411&ssl=1)
MATKX assignment with App variable
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2023/10/execute-odata-post-call-in-sap-build-apps-30-1024x532.jpg?resize=730%2C379&ssl=1)
Select the button and click on Show Logic for BUTTON 1
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2023/10/execute-odata-post-call-in-sap-build-apps-31-1024x884.jpg?resize=730%2C630&ssl=1)
On the bottom of screen button logic will be open
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2023/10/execute-odata-post-call-in-sap-build-apps-32-1024x483.jpg?resize=730%2C344&ssl=1)
as per our requirement, We need to perform the create operation so here in logic window drag and drop create record tool to logic canvas as shown below
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2023/10/execute-odata-post-call-in-sap-build-apps-33-1024x609.jpg?resize=730%2C434&ssl=1)
After Dragged the Create record
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2023/10/execute-odata-post-call-in-sap-build-apps-34-1024x273.jpg?resize=730%2C195&ssl=1)
Now its time to mapping so here you need to map button even to create record just drag the cursor from component tap to Create record ad shown below in yellow color and click on save
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2023/10/execute-odata-post-call-in-sap-build-apps-35-1024x481.jpg?resize=730%2C343&ssl=1)
Assign App variables with Data entity
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2023/10/execute-odata-post-call-in-sap-build-apps-36-1024x486.jpg?resize=730%2C346&ssl=1)
Click on Formula
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2023/10/execute-odata-post-call-in-sap-build-apps-37-1024x543.jpg?resize=730%2C387&ssl=1)
Map the Entity fields with App variable and Save
code -{Matnr: appVars.MATNR, Maktx: appVars.MAKTX}
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2023/10/execute-odata-post-call-in-sap-build-apps-38-1024x460.jpg?resize=730%2C328&ssl=1)
Drag and drop the toast for user confirmation popup after data saved and right side you can give any custom message
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2023/10/execute-odata-post-call-in-sap-build-apps-39-1024x482.jpg?resize=730%2C344&ssl=1)
Now its time to run the App
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2023/10/execute-odata-post-call-in-sap-build-apps-40-1024x432.jpg?resize=730%2C308&ssl=1)
And then click on Preview on Web button select the App
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2023/10/execute-odata-post-call-in-sap-build-apps-41.jpg?resize=505%2C384&ssl=1)
Preview of App
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2023/10/execute-odata-post-call-in-sap-build-apps-42-1024x291.jpg?resize=730%2C207&ssl=1)
Before enter the data, Showing S/4 Custom table entry
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2023/10/execute-odata-post-call-in-sap-build-apps-43-1024x528.jpg?resize=730%2C376&ssl=1)
Now its time to fill data on the Build apps and click on Save button
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2023/10/execute-odata-post-call-in-sap-build-apps-44-1024x485.jpg?resize=730%2C346&ssl=1)
Now its time to check table in the S/4 system
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2023/10/execute-odata-post-call-in-sap-build-apps-45.jpg?resize=730%2C235&ssl=1)