Posted on

SAPĀ® BAS(Business Application Studio) in a Nutshell

SAP BAS in a nutshell
SAP BAS in a nutshell
SAP® BAS in a nutshell

In this blog, we will Summarise our Development Experience with SAP® BAS(Business Application Studio). You can also watch the detailed course of Learn SAP® Business Application Studio(BAS) Development here with Hands-on Examples and In-Depth Topic Coverage.

 

1. What is SAP® BAS?

 

SAP® Business Application Studio also known as SAP® BAS, is a Service in SAP® Cloud for Integrated Development and Enhancement of Applications.

 

SAP® BAS Main

 

2. What SAP® BAS is made of?

SAP® BAS is a container that is Based out on Eclipse Theia which almost looks Like a VS Code Development Environment.

 

3. Is it Free to Use?

No, for productively using SAP® BAS you need to acquire SAP® Licence. 

SAP® BAS Store

 

4. How Many kinds of SAP® BAS is Present?

SAP® BAS has different Flavours that are tailored for different types of development. For developing SAPUI5 or Fiori® App with BAS you select SAP® Fiori type, for developing CAPM App you select SAP® CAPM® type and so on. Also, with time you might see more development Flavour added to it.

You can also enable different packages like SAP® Workflow Package, CDS Viewer, HANA® Development Packages Which will allow you to develop the respective type of Project and Operate on Different File Types.

In our course of Learn SAP® Business Application Studio(BAS) Development here, we have covered details with SAP® Fiori®, SAP® CAPM and SAP® Workflow Dev Space Kind. In SAP® Fiori® Dev Space we have covered the new Standards and Format of SAPUI5 App Development in Details with Approuter, xs-app.json, SAPUI5 Tooling, Regular Expression, Connection Settings, Run Configuration, MTA.YAML and more.

 

5. What is the Operating System on Which SAP® BAS Runs?

SAP® BAS is a Virtual Container that runs on Ubuntu Based OS Architecture. 

Developers will not have root access to the operating system but still, the additional packages and modules required for the project can be installed with the Terminal.

6. How good is Terminal experience in BAS?

SAP® BAS Terminal Provides an Integrated Experience of Development and Dev-Ops. You can switch back and forth between, editors, terminal, and explorer to get the development done fast. You can almost use all CLI(Command Line Interface) Command with SAP® BAS which you might be using with Linux Systems. But for commands which require any kind of Extra Permissions like root permissions will not be possible out of the box.

Terminal also allows you to do an operation in multiple ways. 

Example 1. If you want to push an App to SAP® Cloud Foundry you can either use Explorer, right-click on MTA File, and Right Click on the Build and Deploy or You can also use BAS Terminal directly to use the respective CLI Commands.

In our course of Learn SAP® Business Application Studio(BAS) Development here, we have covered details of the MTA File Structure, also how to customize it for the Deployment to SAP® Cloud Foundry and On-Premise ABAP® Systems in Details, so make sure to check it out.

 

Example 2. You can use Yeoman Generator from CLI and create a Blank Application or Also you can use File>New Project from Template option to create a new Project.

One of the big advantage with BAS Terminal is it will allow you to use your existing knowledge about CLI Commands and get you out of difficult situations, for example chaining Terminal commands of npm install && npm build && cf push will allow you to chain 3 multiple commands together and you can take a coffee or tea break( depending upon your preference 😀 ) in between and not have to wait in front of the screen. 

When you are developing a NodeJS Based Application you can quickly test a piece of Javascript code by just typing Node jsbasecode.js to see how it performs.

These are just the tip of the iceberg, over time with the usage of BAS you will want to use more Terminal, than the Menu Options Provided because most of the operations are fast with Terminals.

Additionally, you also get a Find Command Option which has a list of popular CLI commands and CLI Operations one can use, which makes it even more fun to use Terminal Based Commands

Also, our course of SAP® BAS here covers how you can chain multiple commands together, create a project, build the project, run it or deploy it using CLI.

 

7. What is new in SAP® BAS compare to SAP® Web IDE?

SAP® Full Stack Web IDE was removed from SAP® Cloud offering on 13th Nov 2020. SAP® Web IDE Personal Edition is still under downloads but it is not getting any more updates, the link can be reached from here https://tools.hana.ondemand.com/#sapui5

In our course of Learn SAP® Business Application Studio(BAS) Development here, we have shown how one can start from exiting the SAPUI5 project of SAP® Web IDE Personal Edition and Import it into SAP® BAS. Once you import the existing Project to SAP® BAS, we have also covered in a step-by-step manner how to change the structure to New Standard SAPUI5 App Structure, Customization of Approuter and YAML file.

Now, when we see the need to update from existing SAP® Web IDE to SAP® BAS, the main reason can be:

 

SAP® BAS Pros Compare to SAP® Web IDE 

[Note: Below are personal opinions with our limited experience with Free Trial]

  1. BAS have different flavors, so for example one who wants to only work with CAPM can select that kind of environment with BAS. This needs to be done at the beginning of the BAS setup.
  2. In BAS the Underlying Eclipse Theia is designed to provide developers VS Code like development, experience which is one of the most popular developments IDE used. So you can use your existing knowledge of VS Code and Switch to BAS interface easily.
  3. BAS provides powerful CLI Functionalities and even if you are new to Terminal you can still use the List Terminal Command Options and select from the List your Command Without remembering equivalent CLI Command.
  4. VS Code Plugins can be also used with BAS and VS Code have a lot of nice Plugins.
  5. Run Configurations are easy to create and edit as the run configuration or Launch files are a JSON file which one can edit. These launch.json files are also the same when it comes to VS code so prior knowledge of VS Code Development can be used here.
  6. Theme Setting and Visual Setting like Editor’s Fonts, Spaces, etc are easy to change.
  7. You can Add(or Bind) Services like Database, API’s to Test and Experiment Within the BAS environment.
  8. More options are provided to Create Project from Template and also you can use Yeoman Generator from CLI and even Customize the Yeoman Generator to Autofill Fixed Values. 
  9. With Independent Git Tab developers can easily Track Changes, Amend Changes, Stage, Push, Pull, etc with Menu Options and the same can be also done with CLI.
  10. Working With SAP® Cloud Foundry(SCF) seems to be more robust. For example: when you deploy your application to SCF and if it stops in between then you can resume or abort it after the failure. Also, the logs can be downloaded of the process and investigation can be done easily within the BAS.

And many new improvements, but these are the top 10.

 

SAP® BAS Cons Compare to SAP® Web IDE 

[Note: Below are personal opinions with our limited experience with Free Trial]

  1. When the BAS is kept inactive for a while it stops automatically and sometimes starting a stopped BAS takes a long time.
  2. When you are working with a slow network, the BAS goes offline and the screen freezes, a good feature is the bottom colored bar shows you that you are offline.
  3. With BAS a limited Amount of Space is provided to you, so when you are out of space, BAS will not allow you to create new folders, files, or installations. You can fix this by removing some files or folders. 

8. How Can someone Add Local Run Configuration and Debug code in BAS?

Run Configuration is used to select the configuration and commands to test your code locally. When you add a new Run Configuration in BAS, it automatically suggests to you what are the files and configuration which can be used. When you select a suggested Run Configuration from the selected list a launch.json file is created and when you already have launch.json file then a new entry in the launch.json file is added.

This launch.json file has all the information of what commands need to be run, additional parameters, and multiple other information. You can edit the launch.json manually as well to customize.

When you want to debug, a breakpoint within the code can be easily set by clicking before the line number of the code. When the control passes the code where you have a breakpoint it stops execution and you also can see all the active variables and call stack, which is similar to other Eclipse Debugging Perspective.

In our course of Learn SAP® Business Application Studio(BAS) Development here, we have not only covered how you can add Run Configuration but also how to change the entry of launch.json files for customizing run.

9. How is SAPUI5/Fiori® App Development Changed in BAS Compared to SAP® Web IDE?

Now with the new pattern, a SAPUI5 App is a NodeJS App where the main SAPUI5 App goes inside a webapp folder and when you are creating an App targeting Cloud Environment then this webapp folder is inside the HTML5Module folder.

When you work with NodeJS based SAPUI5 App, you can use the Terminal for installation of dependencies inside node_modules, adding packages, adding and testing scripts inside package.json, etc. Also, the Terminal can be used to run many small experiments in between development to test the Code. You can also use the Run Configuration to Test the code locally which also abstracts many internal complexities required to run a code(or project) to developers, so developers can skip those if they do not want to be bothered with it. It provides quick debugging and test of the Application possible, which in turn speeds up the development process.

Also, when you are new to NodeJS App development, the concepts of package.json, node_modules and dependencies are totally new concepts. So in our course of Learn SAP® Business Application Studio(BAS) Development here, we have covered the basics in details before using the concepts in SAPUI5 App.

10. How is Workflow App Development Changed in BAS Compared to SAP® Web IDE?

Most of the SAP® Cloud Platform(SCP) Workflow based development is the same as it was with SAP® Full Stack Web IDE. Developers will find new changes when they work with SAPUI5 App and SCP Workflow together. The new changes will be the use of the XSUAA Token passing process for Authentication and Authorization.
You can also see the details of those in our course of BAS here, in Section 5.

11. How is CAPM App Development Changed in BAS Compared to VS Code?

SAP® BAS provides many nice features out of the box for CAPM based development. The New Project from Templates creates all the files which are required for a CAPM App with empty values that the developer can provide according to the project.  

The CAPM NodeJS based application again because it is a Node App allows developers to use the powerful CLI experience within the development. The debugging can also be done easily and active variables can be investigated with different tabs provided in debugging panel.

BAS also provides a different tab to add Database Source which allows the developer to see the Database(Local or Remote) content and changes to it, which speeds up the development.

You can also see the details of CAPM App Creation, Running and Deploy in our course of BAS here, in Section 6.

 

12. How Difficult is it to Personalise Theme Setting in BAS?

SAP® BAS provides Dark Theme which many developers would appreciate. The change of Theme is immediate when you select the new Theme from Theme Setting, which allows you to select the theme based on your liking. 

Similarly, the BAS UI Settings can be changed and Personalized easily with immediate feedback.

 

13. Can we use VS Code Plugin With BAS?

Yes once you accept SAP® Policies for 3rd Party Plugins(Initial Asked in Plugin Tab), it allows you to install additional Plugins from VS Code Library. Installation and Uninstallation both are fast and can be managed from Plugin tabs.

 

14. Does BAS have an integrated Version Control System like Git?

Yes, BAS provides an independent tab to allow developers to keep track of code changes. You can connect with your respective Git Repository and use standard features like Stage, Ammed, Push, Pull, etc within the same Tab. 

One can also use CLI to run Git commands for carrying out the same operations and the respective changes in the Git tab are almost immediate. For example, if you have some changes in the Git tab and you went to Terminal and ran the git add <fileName> command then the respective changes also will appear in the stage section almost immediately in the Git tab.

You can also see the details of the use of Version Control System like GitHub in our course of BAS here, in Section 6.

Posted on

Create Workspace and Start Development

 

This blog is part of Learn SAP® Cloud Platform Workflow Professional Development Course here.

 In this Blog, we will create and Develop a Simple Workflow from Scratch

Part 1:  Start Workflow Development by setting up the Workspace and Plugin

 

  •  Step 1: In this case, we have created a separate Workspace in Full Stack Web IDE so that our other projects will be managed.

 

  • Step 2: As we can see in below image after the selection of Workspace Manager click on Create. We can provide any name for our new Workspace.

Note: Every time when we create new Workspace again we have to Enable all the Services for the new Workspace.

  • Step 3: Enter into the new Workspace which we created and Enable the Workflow.

 

Part 2: Creating project

Now click on the Development tab </>  in the new Workspace. After that click on file>>new>>project from a template.

  • Step 1: In the category, select Business Process Management and >>select Workflow, in that click on next(as shown in below image).

 

  • Step 2: Provide name of the Workflow project>>Provide name also, description is not mandatory.

 

 

Note: The empty project will be created, with folder structure.

 

Part 3: Creating events in a project

  • Step 1: Select start event>>select events>> select service task>>

 

 

  • Step 2: In Service Task there are some mandate fields which we need to provide.

 

 

  • Step 3: In Destination put the name of the Service which we have created in HANA® on Demand Cockpit. Select Method name to POST or GET, a path will be the suffix of the Northwind.






Destination : Northwind
Choose a service from: other
Path: /v3/northwind/northwind.svc/Products(3)?$format=json
Http Method : Get
Response Variable : ${context.product}

 

  • Step 4: Now we need to deploy the Workflow. To Deploy, just right click on the Workflow and select deploy on SAP® Cloud Platform Workflow.

 

  • Step 5: After successfully deployed to the portal we have to do activities, for that we need to start the portal. To do that we need to go to HANA® on Demand>>Services>>Portal>>go to service as shown in the image.

 

  • Step 6: It will open a new tab. In that site, we have to open Site Directory.

 

  • Step 7: In that portal either we can create a new site directory or we can use the default one. In this case, we are going to use the default one.

 

 

  • Step 8: As we can see there is a link in the default site directory, click on that and it will redirect us on another Portal again where we will see three most important feature for Workflow.
    One is My Inbox, and another two is Workflow Instance and Workflow Definition.
  • Step 9: There we have to select the user icon>>app finder>>All. In that portal select pin to home all three apps My Inbox, Workflow Definition, and Workflow Instance. So that they will appear on Home Page.

 

 

  • Step 10: After the selection, those 3 apps would be present on the Home Page.

 

 

  • Step 11: Click Workflow Definitions we will see our app in the list in the left panel. After that click on start new Instance.

 

  • Step 12: Click on new Instance a prefilled data will be there (if we noticed that on above, where we are putting hardcoded product id in the path so it will give for that particular id).


Path: /v3/northwind/Northwind.svc/Products(3)?$format=json

 

  • Step 13: After that, we have to check whether it’s showing an error or it’s successfully done.

 

 

 

  • Step 14: As we can see the above the data we get in Context.
  • Step 15: Now if we want the data should come Dynamically like if we pass Id of a product, we get the same data for that Id.
  • Step 16: For that, we need to do some change in the existed path.
    Here’s the code just paste it in the path.


/v3/northwind/northwind.svc/Products(${context.ProductId})?$format=json

Step 17: Now change the data in an Instance in the Workflow Definition. Now if we put the Id 11, we will get the data based on productId 11.

 





{
  "ProductId": 11 
}

This blog is part of Learn SAP® Cloud Platform Workflow Professional Development Course here.

Posted on

Enable Workflow in SCP

This blog is part of Learn SAP® Cloud Platform Workflow Professional Development Course here.

 

In this Blog, we will see how to Enable Workflow in SCP first create Technical Setup

Part 1: Enable Workflow in SCP first create Technical Setup

  •  Step 1: First go to SAP® Cloud Platform Cockpit and click on Neo Trial.

 

  •  Step 2: Then go to the Services. Search for Portal in the search box and click on Portal.

 

  • Step 3: And then Enable Portal.

 

  •  Step 4: Again go to the service section and search for Workflow, click on the Workflow section.
  •  Step 5: Now Enable Workflow after selection of Workflow section.

 

  •  Step 6: Now go to the service part in the same window in Workflow.

 

  • Step 7: We will see two different part in the left panel that is destination and roles. In that panel, We have to enter in roles. In that section, we will see multiple roles and we need to assign roles to our id.

 

  • Step 8: Now select the single role and click on assign as shown in fig after that it will ask the id, we have to provide our id in that. In the same way, we have to assign all roles to our account or PID.

 

 

Part 2: After Enabling Workflow in SCP now create a destination for external OData service in our hanatrial.ondemand  account.

  • Step 1: Go to the destination tab on the left side of the account homepage.

 

  •  Step 2: After the click on the destination, select new destination.

 

 

  • Step 3: We can use the below image as a reference to fill the destination. Name of the destination can be anything according to our project.

Name: Northwind Type: 
HTTP Description: NorthwindOData Service URL: 
https://services.odata.org Proxy Type: 
Internet Authentication: NoAuthentication
WebIDEEnabled: true 
WebIDESystem: Northwind_Data 
WebIDEUsage: odata_gen

 

 

  • Step 4: After completing the destination step, select Full Stack Web IDE in the Workflow as shown in below figure.

 

This blog is part of Learn SAP® Cloud Platform Workflow Professional Development Course here.