2024 Apr 01 7:54 PM - edited 2024 Apr 01 8:29 PM
We will be following the RAP ( Restful Application Programming Model ) & SAP Fiori to create this application.
Let's Start 🙂
Step 1 : We will first Create a database table ( Everything Will Be Created In Eclipse )
Right Click on your package and click on New -> Search for Table and create.
change it as you wish.
Step 2 : Create a Data Definition ( CDS View )
Change it as you want but keep ExcelRowNumber same, as it will be used later.
Step 3 : Create A Consumption View For List View Report and Object Page Details.
Step 4 : Create Behaviour Definition for First View ZLA_EXCELCDS
Don't focus on the comments, i changed my code to make it simpler for you to understand and let you know about few keywords used in RAP. I will tell in future blogs how to use late numbering concept, validations and draft handling.
You can look these terms up in google.
( readonly ) - Keep only the fields which you do not want to change when the edit functionality is used.
Step 5: Create Behaviour Definition For Consumption View
All comments are used in draft handling. You can just delete the comments.
Step 6: Global and Local Classes are created to implement Business Logic specified in Behavior Definition.
Since we did not used any methods, we do not have to worry about this atm.
Step 7: Create Service Definition
All these can be created by right click on package and click on specific object, or you can simply search it.
Behaviour Definition And Consumption Views can be created by right clicking on the specific Data Definition also.
Step 8: Create Service Binding
* Create ODATA v2 UI
And publish the service definition. Preview It and check if you are getting the desired output.
********************************************************************************************************************
Now We Are Moving TO Business Application Studio ( BAS ) and you should have knowledge about Fiori Elements.
Step 9 : Create An New Project In BAS
Go to New -> Project From Template -> SAP Fiori Application -> List Report Page -> Connect to an ODATA Service -> then fill the rest of the fields.
Test the app by right click on the project and Preview Application.
Step 10 : Right Click On Project and Open Guided Development. Add a custom action to a page using extensions.
Now Fill All the fields the same as i am providing:
Function Name : openExcelUploadDialog
Now you would have a folder named ext in your webapp with a controller.
Step 11 : Right click on webapp and create a new folder named ext/fragment. This will create a new folder fragment named inside ext folder.
Now Create an file inside fragment -> ExcelUpload.fragment.xml
"CODE"
->Now Your Application Should Work ( Being Provided the Right Data in excel format )
->If there is no file created in ext folder as xlsx.js. Create it .
->I have six columns in my excel sheet named in var payload on Right Hand Side.
-> There will be an error in package.json ( "@sap/ux-specification": "UI5-1.108" )
Request clarification before answering.
Template functionality is not working...there may be some issue in Controller code
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ya Pranjali i know i skipped some steps of controller. I Directly gave you the controller code without explaining the steps involved. I Will Be posting this Blog again with Improved Understanding And More Pictures.
🙂 Stay Tuned...
This Was My Old Account. Now I Will Be Posting Solutions With This Account.
I Will Reupload This Solution With Better Details 🙂
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
120 | |
10 | |
8 | |
5 | |
4 | |
4 | |
4 | |
4 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.