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: 
sainithesh21
Active Participant
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
68 Comments
0 Kudos
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

 

 
sainithesh21
Active Participant
0 Kudos
Hi Manoj,

Can you please share error log.

 

Regards,

Sai Nithesh Gajula
alex_glorie
Discoverer
0 Kudos
How can I see the details page ???
jeremiah_duroya2
Discoverer
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.
0 Kudos

Hi Nitesh,

Installed all the required extension for creating the application. Is there any particular reason for not being displayed SAP Fiori Tools – Application Generation  card.

fikretsomay
Participant
0 Kudos

Hi poornima prasanna jonna,

Do you have Node.js installed on your system?

Please refer to link and the comments below.

priyaranjan_gupta
Participant
0 Kudos
Hi ,

I am getting blank screen on Select Generator page.Please let me know what is missing. All the needed extensions are installed.


Screenshot

priyaranjan_gupta
Participant
0 Kudos
I am also having same issue.
freddy_collao_b
Discoverer
0 Kudos
sudo npm i -g @sap/generator-fiori-elements --@sap:registry=https://registry.npmjs.org
priyaranjan_gupta
Participant
0 Kudos
I ran this command again and now its working fine.

npm i -g @sap/generator-fiori-elements
priyaranjan_gupta
Participant
0 Kudos
Thanks.  I ran npm i -g @sap/generator-fiori-elements and now its working fine.
freddy_collao_b
Discoverer
0 Kudos

Excelent!

sainithesh21
Active Participant
0 Kudos

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

sainithesh21
Active Participant
0 Kudos
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
priyaranjan_gupta
Participant
0 Kudos
Thanks Sai. Yeah , It worked
sainithesh21
Active Participant
0 Kudos
Hi Alex,

By default, it detail navigation is enabled you should able to navigate by clicking in the item.

 

Regards,

Sai Nithesh Gajula
vin_23
Explorer
0 Kudos
Hi sainithesh.gajula

Thank you for this article!

 

Do you have any idea how to fix this error?

sainithesh21
Active Participant
Hi vin_23 ,

Please try by executing below command and try installing required npm tools

npm config set @sap:registry https://npm.sap.com


 

Regards,

Sainithesh
vin_23
Explorer
0 Kudos
Hi sainithesh.gajula 


Finally, it was solved with this:
npm config set registry "https://registry.npmjs.com"

Thanks a lot.


Regards,
Alvin
sainithesh21
Active Participant
0 Kudos
It's great to hear Alvin
vin_23
Explorer
0 Kudos
sainithesh.gajula, 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?
sainithesh21
Active Participant
0 Kudos
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
vin_23
Explorer
0 Kudos
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.

sainithesh21
Active Participant
macrovijay
Explorer
0 Kudos
Hi SaiNitesh.,

how to run the command? In terminal window i am getting the below error. help me to resolve.


Npm Install Error

sainithesh21
Active Participant
0 Kudos
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
macrovijay
Explorer
0 Kudos
Hi Nithesh.,

Thanks for the suggestion. Actually node.js was not configured. It's working now.

 
0 Kudos
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
sainithesh21
Active Participant
0 Kudos

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

0 Kudos
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
sainithesh21
Active Participant
0 Kudos
Hi Manh,

By looking into the screenshot, below are my understandings.

  1. Failed to load resource Component-preload.js- This file will be created automatically in WebIDE, but locally we need to generate it. In general, it is optional. you can follow this blog to create component-preload.js

  2. For i18n related file issues, make sure file path is correct while loading.


Let me know if you still face any issues.

 

Regards,

SaiNithesh
abdul_qayyum0722
Explorer
0 Kudos
Hi ,

 

I have installed generators , created app but getting below error at npm start.

sainithesh21
Active Participant
0 Kudos
Hi Abdul,

Please check navigation intent in the SAP Fiori app. For reference please check below screenshot of flpSandbox.html


Regards,

Sai Nithesh
0 Kudos
Hi,

How can I connect my OData v4 service in VSCode?

Currently, it is asking me to provide v2 service URL.

Thanks.
0 Kudos
Hi Nitesh,

while connect my OData it's asking user name and password.

 
sainithesh21
Active Participant
0 Kudos
Hi Natarajan,

If service need authentication, it will ask to enter credentials.

 

Regards,

SaiNithesh Gajula
BernardF
Explorer
0 Kudos
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

 
sainithesh21
Active Participant
0 Kudos
Hi Bernard,

Make sure your yaml configuration are correct. you can also refer the attached screenshot.


 

Regards,

Sainithesh Gajula

 

 
jmbarajas
Explorer
0 Kudos
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
sainithesh21
Active Participant
0 Kudos
Hi Jose,

Once you connect to the VPN, you should able to access it locally in Visual Studio Code.

 

Regards,

Sai Nithesh
0 Kudos
Hi I am not getting option to add main entity

sainithesh21
Active Participant
0 Kudos
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
irfan_gokak
Contributor
0 Kudos
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.
0 Kudos

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

amel_saidani
Participant
amel_saidani
Participant
0 Kudos
Hello

Is it to possible to connect to a SAP system configured in SCP/BTP ?

Regards,
sachinvkulkarni
Explorer
0 Kudos
Hi Amel,

Please try if this works. In the template wizard, at the step 'Data Source and Service Selection' the following configuration might enable connection to SAP system over BTP.


Data source and Service Selection


Regards,
sachinvkulkarni
Explorer
0 Kudos
Hi Irfan,

Fiori application consumes the service end point i.e. OData service which is configured to talk to a specific client. Hence client configuration doesn't arise at VS configuration level when consuming an OData service.

Alternately if during the creation of the Fiori app via VS, if it is chosen to "Connect to an SAP system", then the configuration provides an option to specify the client if it is ABAP On Premise.  Connecting to an ABAP environment on SAP BTP would be driven by service key file.

I hope this information helps.

Regards
babicblax
Explorer
0 Kudos
Hi SaiNithesh Gajula

Thank you for your great blog! Do you know any VS extensions where I could add Fiori Elements Extensions to my Fiori Elements App? I use the List Report Template, but I need to expand it with a Dialog or Fragment in order to display an PDF Viewer. Currently it is impossible to find some info about this. There are only blogs, docs and tutorials for WebIDE.

 

Thank you and regards,

Blazenko
sainithesh21
Active Participant
0 Kudos

Hi Blazenko,


We should able to add extensions to Fiori Elements App using Fiori Open Guided Development which is part of Fiori tools extension. Attached screenshot for reference.

 



 

Regards,

Sai Nithesh Gajula

 
Labels in this area