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 use SAP Business Application Studio, a full stack development tool for SAP

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)05/31 Report--

In this issue, the editor will bring you about how to use the SAP full-stack development tool SAP Business Application Studio. The article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article.

As SAP practitioners, we can clearly feel the trend of SAP technology evolution in recent years.

The evolution direction of SAP front-end development technology, from SAP GUI, to ABAP Webdynpro / WebClient UI that can run in browsers, and still has not stopped evolution of Fiori UX. From the beginning of its birth, Fiori only supports SAP UI5, and now it can support a variety of front-end frameworks such as Angular, React and Vue.

As for the SAP back-end development technology, since the advent of the SAP cloud platform, SAP developers have found that the technologies they have available have increased a lot in addition to ABAP: for example, Java and nodejs, which are very active in the open source community, can finally be applied to SAP background development. The SAP cloud platform itself has evolved from a single cloud architecture built by SAP itself to a Multiple Clou architecture that can support GCP, Azure, AWS and Aliyun as infrastructure layers.

In this article, we don't talk about specific technologies, but about development tools.

In the previous article on Jerry, SAP IDE, which I used in those years, introduced the SAP development tools I used. Now, there is a new member to the list.

On TechEd in 2019, SAP announced a new generation of full-stack development tool based on the original SAP WebIDE: SAP Business Application Studio.

What can SAP developers do with this new tool?

SAP Business Application Studio provides good support for different SAP solutions, S/4HANA extension development, and full-stack development based on SAP CAP model (Cloud Application Programming) (technology stack is Java and nodejs), as well as various types of Fiori application development.

What is the difference between SAP Business Application Studio and SAP WebIDE?

SAP officially calls Business Application Studio an evolutionary product of WebIDE. This tool absorbs the design concept of today's leading IDE and is specially optimized for full-stack application development on the SAP cloud platform. The powerful command-line tools provided by the tool make developers not bound by the GUI interface.

Finally, Business Application Studio is based on Eclipse Theia, an open source IDE, which makes it architecturally able to cope with any new requirements that emerge in the cloud development space.

Https://

For example, we can see many plug-ins in the plug-in list of Business Application Studio (hereinafter referred to as BAS), some are plug-ins contributed by the open source community, such as vscode-eslint, and some are self-developed by SAP, such as vscode-mta-tools, which allows developers to use the command line of BAS to develop and deploy SAP MTA applications without logging in to the SAP cloud platform console.

Before using BAS, let's look at a concept: Dev Space (development space).

A development space is a pre-configured environment that actually corresponds to virtual machines on the SAP cloud platform. When creating a development space, you can choose different types, each of which corresponds to a specific development scenario.

For each specific type of development space, the Studio extensions (SAP Predefined Extensions) necessary to complete this type of development task are activated in advance, and you can see a list of these extensions when you create the development space.

I chose the SAP Fiori type of space. After the creation is successful, click the hyperlink to enter:

If it is in WebIDE, after the development interface opens, we can use the Create from Template menu, through the wizard to complete the creation of the Fiori application.

In BAS, we can create the skeleton of the Fiori application through the command line in a different way.

Type yo on the command line, start SAP Fiori Project Generator, and select Fiori Project:

The next step is to select the running environment of the Fiori application. There are two choices: CloudFoundry and ABAP. We choose the former:

Then there is the maintenance of some general information.

After the command-line wizard is executed, the necessary resource files for the Fiori application are generated. If you have done nodejs development, you will find that this step is very similar to generating manifest.json files with npm init.

We want to specify which OData service the Fiori application should consume.

In the command toolbar above Studio, click consume and select Consume SAP Services:

There will be a lot of Destination lists, each of which I maintain in the Connectivity menu in the CloudFoundry environment, pointing to an ABAP system.

I chose GWSAMPLE_BASIC, an OData service exposed in the ES5 system.

After changing the binding of OData to the Fiori project, you receive a successful prompt:

The follow-up operation is not much different from our previous development in SAP WebIDE.

Open the XML view with Layout Editor, find the List control from the control library, and drag it to the view area:

Click the bind icon next to the Entity Set field of the List control, and bind it to a Data Collection from the OData model:

Let the List display the Business Partners data:

Similarly, bind the title field of List Item to the CompanyName field on the BusinessPartnerSet node, and Description to the BusinessPartnerID field.

The function of this Fiori application is very simple, showing the company name of Business Partners and ID.

Click Run Configuration to conduct local testing without deploying to the CloudFoundry environment of SAP cloud platform:

The Fiori application on the SAP cloud platform is actually a HTML5 module contained in the SAP MTA application. The mta.yaml of the MTA application defines the dependency of the Destination service and the Authorization & Trust Management service. Therefore, when running locally, we also need to provide these two service instances to the Fiori application.

For more information about what a SAP MTA application is, you can refer to Jerry's previous article: Trident app in the SAP cloud platform.

Create a new Authorization & Trust Management service instance in the CloudFoundry environment and name it app_uaa:

Go back to BAS, select the uaa local resource in the project, and you will see a small green plug icon on the right. After clicking, BAS will automatically take out the app_uaa instance you just created. Once selected, you can bind to the local uaa_JerryFioriDemo of the project.

Later, when we formally deploy the application to the SAP cloud platform CloudFoundry environment, we do not need to do this step, because the deployment tool will parse the mta.yaml and automatically create the dependent service instances defined in it.

After successful binding, you receive a prompt in BAS:

At the same time, a new green plug icon appears on the left, indicating the status of successful binding.

Similarly, after binding the Destination service dependency of the project to the service instance created by the CloudFoundry environment, click Run Module, and you can see the interface of the Fiori application:

The steps to formally deploy to CloudFoundry are also simple: execute the command line:

Mbt build-p=cf

The mbt tool packages the project into a .mtar file:

Deploy the .mtar file to CloudFoundry using the cf deploy command:

As you can see from the command line output, cf deploy automatically creates service instances declared in the require region of mta.yaml during deployment.

After the deployment is successful, these automatically created service instances can be seen in the Service Binding area:

Click on the AppRouter instance generated after deployment to get the access link to the Fiori application running on the CloudFoundry environment.

The whole process runs down, and the personal experience is as good as Google's Cloud Shell. For an introduction to Google's cloud development tool, please refer to Jerry's article: introduce a free cloud development tool: Cloud Shell.

The above is the editor for you to share the SAP full-stack development tool SAP Business Application Studio how to use, if you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.

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

Internet Technology

Wechat

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

12
Report