Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to develop and deploy a Fiori application that supports addition, deletion, modification and query

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly explains "how to develop and deploy a Fiori application that supports addition, deletion and revision." Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let Xiaobian take you to learn "how to develop and deploy a Fiori application that supports addition, deletion and revision"!

Restful ABAP Programming Model Fiori Interface:

As you can see from the above figure, I selected the TravelProcessor node in a Service Binding model and selected the Open Fiori Elements App Preview option from the right-click menu, which automatically opened a Fiori Elements app working in preview mode (formerly known as Fiori Smart Template):

Now Fiori UI is open, but if you look closely at the above picture, the window title of the application is "Preview for Fiori Elements App", and the url of the application contains/sap/bc/adt/this ABAP Development Tool-related fragment-this kind of application working in preview mode obviously cannot be used for production purposes.

So this article continues with the remaining half of the development work-actually creating a Fiori app based on the Restful ABAP Programming model you already have and deploying it to SAP Cloud Platform. Fortunately, this part of the workload is also very small, no coding work, just need to complete a few configuration steps.

Jerry's previous article 30 minutes using Restful ABAP Programming model to develop a Fiori application that supports addition, deletion and revision has exposed the CDS view named I_Currency in SAP Cloud Platform ABAP programming environment through Service Definition, and then bound to the OData protocol through Service binding, so that the Fiori application we are about to create can read the data in the CDS view in the OData way through this Service binding.

Suppose my Restful ABAP Programming model and Fiori application to be developed are deployed on SAP Cloud Platform in two different Regions, such as RAP model on Europe(Frankfurt)Region (this is currently the only option for SAP Cloud Platform ABAP environment):

Fiori app is placed on Neo environment of Europe(Rot)(there are many Region choices supporting Neo):

Then this kind of cross-Region service invocation needs to create the old three kinds, namely Communication Scenario, Communication System and Communication Arrangement.

Detailed tutorials are available on SAP's website:

https://developers.sap.com/group.abap-env-first-app.html

Jerry only emphasized the main points here.

(1)In ABAP Development Tool, right-click to create Communication Scenario Z_JERRY_COMMU_SCE, and add the Service Binding model created in the previous article to the inbound service page of this Scenario:

(2)Right-click on ABAP Cloud project in ABAP Development Tool and find the url of Fiori interface of ABAP environment in SAP Cloud Platform in property page:

Communication Systems, Users and Arrangements are created here.

Communication User As the name implies, Fiori applications on SAP cloud platform Neo environment use this user to invoke OData services to consume RAP models in ABAP environment. ABAP consultants can compare it to user WF-BATCH in SAP GUI, except the former allows application developers to create and set their own passwords.

Create a Communication System, remove the https://from the url obtained in the ABAP Development Tool property page, and maintain the remaining values in the Host Name:

Assign the previously created Communication User to this Communication System:

Finally, create a Communication Arrangement:

Select the Communication Scenario created in the ABAP Development Tool in Step 1:

Assign this Arrangement the Communication System you just created:

If everything works, create a good Communication Arrangement as shown below. Copy down the Service Url, because the next step in creating Fiori apps requires this url. Observe this url, which contains the hostname of SAP cloud platform ABAP programming environment and the fragment beginning with/sap/opu/odata/sap/, which is the url exposed by Service Definition through OData protocol through Service Binding.

(3)Back to SAP Cloud Platform Neo environment, create a Destination pointing to ABAP environment. I named it to_ABAPCloud, pasted the url obtained in the previous Communication Arrangement, User selected Communication User created in the previous step, and added two additional attributes to this Destination:

WebIDEEnabled:true

WebIDEUsage:odata_gen, odata_abap

Only then will the Destination be recognized in a later webIDE, otherwise it will only be available in Java or nodejs applications.

All that remains is to create Fiori apps in the WebIDE via a wizard. Open WebIDE and choose New->Project from Template:

Here you need to select a template to create the Fiori app. We select List Application Report, which displays the contents of CDS view corresponding to bound Odata service in read-only mode.

In the Data Connection wizard step, select the Destination created earlier in the Neo environment:

Then maintain the url obtained after creating the Communication Arrangement in the Service Url, click the Test button, and parse out the OData model node corresponding to this url: Currency.

Click Finish to complete the automatic creation of Fiori apps. Now we have a real Fiori app in WebIDE. Deploy it from WebIDE to SAP Cloud Platform via the right-click menu:

Successful deployment:

We got the url of this Fiori app in SAP Cloud Platform console. We compared it with the url of Fiori app that worked in preview mode before. Is it very different?

Click url to visit, now this Fiori page window title no longer has the word Preview, can be used directly for production purposes.

At this point, I believe everyone has a deeper understanding of "how to develop and deploy a Fiori application that supports addition, deletion and revision." Let's do it in practice! Here is the website, more related content can enter the relevant channels for inquiry, pay attention to us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report