Hi Everyone,
Hope you have gone through my previous blog on Installing Visual Studio Code and Configuring SAP Extensions in Visual Studio Code
Now let us create our first app using SAP Fiori Tools in Visual Studio (VS) Code.
Once we open the Visual Studio (VS) Code, use Ctrl+Shift+P to launch command palette and search for Application Generator and choose that to create SAP Fiori App.
Now Yeoman Generators will launch as shown below and choose SAP Fiori Tools – Application Generator and click on Next.
Now we need to select template from the available Template Selection (List Report Object Page, Worklist, Analytical List Page, and Overview Page). We will choose List Report Object Page V2 and click on Next.
Now, we have to connect to backend system either by connecting to SAP System or using the OData service or through Metadata document. Here we will go with Connect to an OData Service and click on Next.
Here let us go with Northwind service https://services.odata.org/V2/Northwind/Northwind.svc/.
Provide Northwind service in Odata v2 Service URL, then available entities will be loading in Main Entity, I have choose Products and click on Next.
Now we need to project details like module name, title of your application, namespace for the application, description, and project path. When we choose Yes for Configure advanced options, it will enable UI5 version selection and theme selection of your choice. Click on Next to proceed further.
Now application will be created and opened as below.
Now open New Terminal using Ctrl+Shift+`. Enter the command npm install to install required dependencies.
Once the dependencies got install. Enter the command npm start.
App will open and run on http://localhost:8080/ which will be opened automatically in the default browser as below.
Click on Settings, it will pop up window with available filters as below. Choose “Select All” and click on “Ok”.
Click on Go.
Yeahhhh !!!!!!!!. Finally, we have created our first SAP Fiori Tools App in Visual Studio.
Hope you guys like this blog post.
Feel free to comment ?
Refer my blogs on VS Code
Develop SAP UI5 Apps using Visual Studio Code
Access SAP HANA records from VS (Visual Studio) Code
Regards,
Sai Nithesh Gajula
Hi Nithesh,
I have also started exploring visual studio for fiori apps. My app is not displaying data it is giving Nodata error. I know issue is the issue with odata service path to get the metadata. How to resolve the issue any idea.
Thanks,
Manoj
Hi Manoj,
Can you please share error log.
Regards,
Sai Nithesh Gajula
Hello Nithesh,
i have the same issue.
Because the app try to request the URL: http://localhost:8080/V2/Northwind/Northwind.svc/
I have put the url: https://services.odata.org/V2/Northwind/Northwind.svc/ in the input field.
How i can solve this??
regards
Bernard
Hi Bernard,
Make sure your yaml configuration are correct. you can also refer the attached screenshot.
Regards,
Sainithesh Gajula
How can I see the details page ???
Hi Alex,
By default, it detail navigation is enabled you should able to navigate by clicking in the item.
Regards,
Sai Nithesh Gajula
Hi Nitesh,
Will VS Code be the IDE to go and will it be supported long term? Since Eclipse tooling was only supported until version 2019-12.
Hi Jeremiah,
Hope it will be supported for long term, because SAP Business Application Studio and VS Code playing the same role as Online IDE and Offline IDE
Regards,
Sai Nithesh
Installed all the required extension for creating the application. Is there any particular reason for not being displayed SAP Fiori Tools – Application Generation card.
Hi poornima prasanna jonna,
Do you have Node.js installed on your system?
Please refer to link and the comments below.
I am also having same issue.
I ran this command again and now its working fine.
npm i -g @sap/generator-fiori-elements
Hi ,
I am getting blank screen on Select Generator page.Please let me know what is missing. All the needed extensions are installed.
Screenshot
sudo npm i -g @sap/generator-fiori-elements --@sap:registry=https://registry.npmjs.org
Thanks. I ran npm i -g @sap/generator-fiori-elements and now its working fine.
Excelent!
Hi Priyaranjan,
Hope you followed my previous blog to configure VS Code. Try executing below command and restart VS Code.
Windows
npm install -g @sap/generator-fiori-elements
MacOS
npm i @sap/generator-fiori-elements
Regards,
Sainithesh Gajula
Thanks Sai. Yeah , It worked
Hi SaiNithesh,
Thank you for this article!
Do you have any idea how to fix this error?
Hi Alvin Santiago ,
Please try by executing below command and try installing required npm tools
npm config set @sap:registry https://npm.sap.com
Regards,
Sainithesh
It's great to hear Alvin
SaiNithesh,, I already have created the Odata service in ABAP onprem. What are other things I need to setup so that I can use this Odata here in VSCode?
Hi Alvin ,
You can provide your ODATA Service in the Service and Entity section which will be accessable in your browser where you are using VS Code
Here is what I am getting so far..
An error occurred: Validation error happened: code: InvalidTag, message: Tag 't.length;i++)r(t[i]);return' is an invalid name.
Make sure you are providing the URL in the below format
Hi SaiNitesh.,
how to run the command? In terminal window i am getting the below error. help me to resolve.
Npm Install Error
Hi Vijay,
By seeing the error screenshot, as per my understanding NodeJS is not installed correctly. Can you please make sure node path is configured in the environmental variable.
Regards,
SaiNithesh Gajula
Hi Nithesh.,
Thanks for the suggestion. Actually node.js was not configured. It's working now.
Hi Nithesh,
Thank you for this article! It is very helpful!
But I have a existed SAPUI5 Application project in WebIDE and i want to run my project in local machine on visual studio code. Do you have any idea for that???
Regard,
Manh
Thanks for your compliment Manh.
You can refer my blog Develop SAP UI5 Apps using Visual Studio Code to use SAP UI5 Application in VS Code,
Regards,
SaiNithesh
Thank Nithesh,
Now, I can run my project in local machine. It seems that the system is operating well however I still got the error as shown in the below image. I am wondering if there is any hidden issue which cause this error. Do you have any idea about this error. Hope you can investigate more on the issue and give me some updates about it.
Regards,
Manh
Hi Manh,
By looking into the screenshot, below are my understandings.
Let me know if you still face any issues.
Regards,
SaiNithesh
Hi ,
I have installed generators , created app but getting below error at npm start.
Hi Abdul,
Please check navigation intent in the SAP Fiori app. For reference please check below screenshot of flpSandbox.html
Regards,
Sai Nithesh
Hi,
How can I connect my OData v4 service in VSCode?
Currently, it is asking me to provide v2 service URL.
Thanks.
Hi Nitesh,
while connect my OData it's asking user name and password.
Hi Natarajan,
If service need authentication, it will ask to enter credentials.
Regards,
SaiNithesh Gajula
Hi SaiNithesh Gajula
The SAP that we use to develope is internal (Not accessible from the network).
Now, we have a configuration created in the SAP Cloud Connector to be able to work with WebIDE.
How can we work from visual studio code with the configuration of SAP Cloud Connector?
Thanks,
Jose
Hi Jose,
Once you connect to the VPN, you should able to access it locally in Visual Studio Code.
Regards,
Sai Nithesh
Hi I am not getting option to add main entity
Hi Nilesh,
Seems like your system cant able to reach the service might be because of proxy. If you are connected to any proxy. Execute the below command in console and try to create the app.
npm config set proxy http://host:port
Regards,
Sai Nithesh Gajula
Hi Nithesh,
Great blog. But one question, how do we set sap-client for Fiori application for testing. Where we have 2 different client for testing and development. Where it should be defined?
Regards,
Irfan G.
Hello
Great blog, thank you very much.
I have followed the steps and my App is starting, but it starts not in the Fiori Launchpad. I think i am missing a configuration or something?
I have created an Freestyle SAPUI5 Application.
Any idea what i must configure, that it runs in the Fiori Launchpad environment?
Thanks
Hello,
I think this can help https://blogs.sap.com/2020/09/11/building-a-central-launchpad-using-sap-cloud-platform-launchpad-service-developing-html5-apps/.
Regards,
Hello
Is it to possible to connect to a SAP system configured in SCP/BTP ?
Regards,