Top Banner
openSAP Introduction to Software Development on SAP HANA WEEK 1, UNIT 1 00:00:12 Welcome to the Introduction to Software Development on SAP HANA. This is the first course in the new openSAP online e-learning platform. 00:00:21 My name is Thomas Jung. I’m director, SAP HANA product management, and I specialize in SAP HANA development tools. I’ll be your instructor for this course. 00:00:32 The course will consist of six weeks, plus one week for our final exam. In each week there will be a number of videos similar to the one you’re watching now. 00:00:41 At the end of each video there will also be self-test to help you gauge your progress. At the end of each week we will have weekly assignments, these assignments are graded and you will earn points towards your record of achievement. 00:00:55 We also have an online forum. You can go there to collaborate with your fellow students as well as to ask questions. 00:01:03 Finally, you can expect that it will take a half day effort to complete each week in this course. Now moving on to week one, unit one, we'll begin with some basics about SAP HANA native applications. 00:01:19 So first of all, you might be wondering what is SAP HANA? Well, it's several things. Of course, SAP HANA is a platform. It's offered as both an appliance and it's offered as a cloud offering. 00:01:34 And inside this platform is our ability to use both SAP HANA as a database and SAP HANA as an application platform itself. And we're really going to talk about all of these aspects throughout this course. 00:01:50 So at its core, SAP HANA is first and foremost a database, like other databases on the market, but also with capabilities that other databases don’t have. 00:02:02 So first of, all SAP HANA is an in-memory database. That means that all the operations that happen, happen in memory. It’s not just about caching some of the data in memory or performing some of the operations in that cache, but truly everything - all the write operations, all the read operations - take place in memory. 00:02:22 And because we know that all operations are performed in memory, we can really optimize the software of the database engine, knowing that we’re always going to have that fast memory access. This document contains a transcript of an openSAP video lecture. It is provided without claim of reliability. If in doubt, refer to the original recording on https://open.sap.com/.
27

Week 1 unit 1to5 index sap

Jan 22, 2018

Download

Education

Satya Harish
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Week 1 unit 1to5 index sap

openSAPIntroduction to Software Development on SAPHANA

WEEK 1, UNIT 1

00:00:12 Welcome to the Introduction to Software Development on SAP HANA. This is the first coursein the new openSAP online e-learning platform.

00:00:21 My name is Thomas Jung. I’m director, SAP HANA product management, and I specialize inSAP HANA development tools. I’ll be your instructor for this course.

00:00:32 The course will consist of six weeks, plus one week for our final exam. In each week therewill be a number of videos similar to the one you’re watching now.

00:00:41 At the end of each video there will also be self-test to help you gauge your progress. At theend of each week we will have weekly assignments, these assignments are graded and youwill earn points towards your record of achievement.

00:00:55 We also have an online forum. You can go there to collaborate with your fellow students aswell as to ask questions.

00:01:03 Finally, you can expect that it will take a half day effort to complete each week in this course.Now moving on to week one, unit one, we'll begin with some basics about SAP HANA nativeapplications.

00:01:19 So first of all, you might be wondering what is SAP HANA? Well, it's several things. Ofcourse, SAP HANA is a platform. It's offered as both an appliance and it's offered as a cloudoffering.

00:01:34 And inside this platform is our ability to use both SAP HANA as a database and SAP HANAas an application platform itself. And we're really going to talk about all of these aspectsthroughout this course.

00:01:50 So at its core, SAP HANA is first and foremost a database, like other databases on themarket, but also with capabilities that other databases don’t have.

00:02:02 So first of, all SAP HANA is an in-memory database. That means that all the operations thathappen, happen in memory. It’s not just about caching some of the data in memory orperforming some of the operations in that cache, but truly everything - all the writeoperations, all the read operations - take place in memory.

00:02:22 And because we know that all operations are performed in memory, we can really optimizethe software of the database engine, knowing that we’re always going to have that fastmemory access.

This document contains a transcript of an openSAP video lecture. It is provided withoutclaim of reliability. If in doubt, refer to the original recording on https://open.sap.com/.

Page 2: Week 1 unit 1to5 index sap

Page 2 Copyright/Trademark

00:02:36 The other thing about HANA that is rather unique is that it’s built on top of a modernarchitecture. It’s designed for the way the CPUs are processing today, meaning that it’sdesigned for massively parallel processing.

00:02:54 It’s done in such a way that you, as an application developer, don’t have to program in aspecial format. You don’t have to understand fretting models and sync points. You’ll get thebenefits of massively parallel processing, spreading your queries across multiply CPUs, andeven multiple server instances. And it’s the database platform that does most of that work foryou.

00:03:18 And then finally, the final unique aspect is the fact that HANA can store data both in a rowformat and in a column format.

00:03:30 Now most databases store data in a row format as you can see on the left side of this slide.That means that all the data for a single record is stored together. But it does mean that asyou move from column to column, different data types are encountered. This also meansthat if you want to do a scan, for instance across all countries in a particular column in yourtable of data, you’re going to be skipping around looking for that data, and that often leads usto have to build secondary indexes in a traditional database.

00:04:07 However, in SAP HANA, we have the ability to also store data in a column store. And this ishow most tables are defined in SAP HANA.

00:04:16 And when you organize data in a column store, this means all the data for the same columnis stored together in memory. So as we see here in this diagram, all the country data istogether, all the product data is together, all the sales data is together.

00:04:33 This has several benefits. By putting all the same data types together, meaning country - allthe data for country has the same data type, the same length - this means that the data willcompress much better. And this is partly how we’re able to put the entire database inmemory, is that we get much better data compression than other databases.

00:04:54 The other benefit is that basically that every column is a secondary index, so there is noneed to build indexes or to materialize indexes and store the data multiple times in differentways. Because we are storing everything columnar, we basically have the effect of everycolumn being an index.

00:05:19 Now this all comes together to give us capabilities that we wouldn’t have in other databases.It means that we can run queries across huge amounts of data in real time because we canleverage both the speed in the fact that the data is stored in memory, the fact that we'redesigning for multiple CPUs and parallel processing within those CPUs, and that becausethe data is in memory, the CPU doesn’t have to wait for the data to be retrieved from disc. Ithas direct access to the data in memory.

00:05:53 And because we have this high-speed access, we can do things that we wouldn’t be able todo with a traditional database, such as apply analytical analysis directly on top of ourtransactional data, without having to copy the data, without having to materialize aggregatesand materialize views of the data. We can do those kinds of queries, aggregates, andcalculations in real time. And it basically means that with linear processing, by adding moreCPUs, we can make any operation run in real time.

Page 3: Week 1 unit 1to5 index sap

Page 3 Copyright/Trademark

00:06:34 And then we take these core capabilities of the database and we extend them by saying thatHANA is also an application platform.

00:06:44 So we introduce into HANA an application server, a programming language, and a dedicatedWeb server as well. So you can really build your complete application end to end, from theschema, to the database tables, to your data-intensive logic, to your service enablement,even up to your user interface. And that’s what we’re going to see all throughout this courseis how do you do each of these things, and then how do you put all these pieces together tohave a complete new application that’s written on top of HANA.

00:07:17 Now when we say SAP HANA native applications, we're really talking about thoseapplications that are built completely to run inside of HANA. And we're able to do that, unlikewith a traditional database, because we built in an application server into HANA itself. Thisapplication server is named SAP HANA Extended Application Services, or sometimes youwill see it abbreviated as XS, XS standing for Extended Application Services.

00:07:51 The XS name actually has a double meaning. XS also means extra small, meaning theapplication server layer is extra small -is a lightweight application server.

00:08:04 And we're able to have this lightweight application server because we’re going to push mostof our data-intensive processing down into the lowest layers of the database anyway toleverage the power, all those capabilities that I just spoke about, the massively parallelprocessing, the in-memory, and the columnar store.

00:08:25 And if we do that, if we push most of our calculation logic, most of our data-intensive logic,deep down inside the database, then we're left with not that much other processing thatneeds to take place because already out presentation logic is taking place on the clientdevice, and that left just a thin layer for control flow logic, service enablement, and maybe alittle bit of validation logic.

00:08:50 Therefore we decided rather than have to always put another application server on top ofHANA to fill that small layer, that small need of that control flow logic and other types of logicat that level, let’s take the application server and embed it inside of HANA.

00:09:07 Therefore within HANA, we have the ability to have http and https-based user interfaces. Sowe have a Web server built into HANA. Then we have this application server, that meansthat your complete application server can be deployed to SAP HANA with no need for anadditional application server.

00:09:30 And because we didn’t just take an off-the-shelf application server and install it on the samephysical hardware as HANA, we’ve really engineered an application server designed for thespecific needs of HANA.

00:09:46 And at a very low level, integrated it into HANA. It’s another process that runs at theoperating-system level. And this process that is the application server, this XS or ExtendedApplication Services, can have interprocess communication to the database process itself. Italso understands the HANA native data types, so data can flow back and forth between theapplication server and the database server in this scenario without having to be transformedinto different data types, and without necessarily having to move across the network.Therefore, with HANA Extended Application Services, we have an opportunity to build better-performing applications than we would with any other application server because of thiscloseness, and this deep integration with the database itself.

Page 4: Week 1 unit 1to5 index sap

Page 4 Copyright/Trademark

00:10:37 And really, this gives us the ability to create applications that run on top of HANA that rangeanything from very small lightweight Web applications - this is usually where people start,they want to create a custom analytic, they want to create a lightweight service, a REST-service that runs on top of some of their HANA data. But we're not limited to just that. Withthis HANA Extended Application Services we can really build all the way up to complex,high-speed, full transactional types of applications.

00:11:10 So just showing the breakdown of the layers of an application. We would traditionally think ofan application broken down into a couple of different parts. You would have your calculationor your data-intensive logic. You would have your control flow and your service enablementlogic, and then of course you have your presentation logic - the building of the user interfaceand the handling user interaction events.

00:11:35 Now within HANA, we want that calculation logic of course to be down in the database. Wewant all that data-intensive logic to be down in the database. And not just in the form of SQL.Throughout this course we're going to show you other we can rewrite some of our applicationlogic inside the database as well, and really leverage the power of HANA.

00:11:58 Now likewise, the presentation logic. We see a shift in the industry that client devices havebecome more powerful, whether that’s your laptop or your mobile phone or it’s your tabletdevice, these devices have become so powerful that we no longer have to do thepresentation logic on the server side. We can allow the client devices to do both the userinterface rendering and the handling of the user interaction events. And this will give a richeruser experience, because we’re not having to go back to the server every time the userinteracts with the user interface.

00:12:40 Now this is a trend that we’re seeing in the industry as a whole and that SAP is adoptingacross all of our platforms and technologies, but it comes at a very nice time because wehave engineered HANA from the beginning to take advantage of client-side presentationlogic. And we will also see this throughout the course as well, how we build these client-sideuser interfaces primarily using JavaScript and HTML.

00:13:05 And now, as we’ve said, this leaves a thin layer in the middle for your control flow validationand service enablement logic. This is the logic that we put in the HANA Extended ApplicationServices. But once again, that is just a subset or another very thin layer that runs inside theHANA appliance itself. It’s nothing additional that you have to install, configure, set up orback up. It’s such a tightly integrated part of HANA that we’ve really blurred the linesbetween what is a database and what is an application server, and they come together tomake one HANA platform.

00:13:46 Now there are two main types of applications that could leverage SAP HANA. We have thenative SAP HANA applications, using the architecture that we have described so far, andthat will be the focus of this online course.

00:14:02 And these applications will leverage a variety of technologies. Of course, we’ll have our data-intensive logic written in the database using SQL and SQLScript. We’ll talk more about thosetopics throughout this course. We’ll also use server-side JavaScript as the mainprogramming language for HANA Extended Application Services applications, and as wellwe have support for REST-based OData services with both JSON and Atom XML rendering.We also have built-in support for XMLA and MDX access.

Page 5: Week 1 unit 1to5 index sap

Page 5 Copyright/Trademark

00:14:37 These are the applications which we would consider native, because both the database orthe data-intensive logic and the application server logic are both executing inside of HANA.

00:14:50 The other option that we want to make you aware of is something that we call non-nativeSAP HANA applications. These are the applications that will still leverage the power ofHANA, which will still use the data-intensive logic, will still have SQL and SQLScript andother means of pushing business logic down into the database, but they will also use anotherapplication server in addition to the one that’s embedded inside of HANA. So they’ll useABAP, Java, .Net, and they’ll use one of the open standard interfaces like JDBC or ODBC toconnect to SAP HANA.

00:15:32 In these types of applications, the native SAP HANA applications, we combined everythinginto the HANA server itself. Therefore it's really well-suited to new applications that you'rebuilding from scratch or major additions to existing applications, because often you have toarchitect the application from the beginning to leverage this type of architecture.

00:16:02 But when you do design for native HANA applications that we see a real simplicity,particularly for the customers that are installing the applications. They don’t need to set upmultiple servers, they don't have to set up connections between the servers, multiple sets ofuser management. Everything can be installed directly inside of HANA.

00:16:24 We also see a simplicity at design time for you the developer, meaning you will work in onedevelopment tool. You’ll code both your data-intensive logic, your presentation logic, andyour imperative service enablement logic all in one tool. All the development artifacts storedtogether, one set of version management, one set of lifecycle management for all thedevelopment artifacts. That really simplifies the developer’s job.

00:16:54 It also lends to speed of development. If I can develop my database artifacts thenimmediately service-enable them from inside the same system and then test without havingto deploy, without having to connect two systems together, I can do more iterativedevelopment. I can be testing my application development as soon as I’m done coding withit.

00:17:20 And then finally, this means that we have one integrated technology stack, which alsoreduces the cost of ownership for our customers, meaning that they can have one appliance.It comes preconfigured from SAP and our hardware partners. It's ready to run and ready toinstall applications on top of - no additional configuration needed.

00:17:40 On the other hand, we have the scenario of non-native SAP HANA applications. These arethe ones that leverage an existing other application server, like the ABAB application server,Java, PHP, .Net. Now this approach is well-suited when you have an existing application thatyou either want to port to SAP HANA - change it from some other database platform to SAPHANA - or you want to extend it to also run on HANA.

00:18:13 So in these environments, you maybe want some level of database abstraction anddatabase independence, but yet you still want to leverage the power of HANA. And you’ll usethese open interfaces like JDBC and ODBC and the ABAP environment. We have heavilyoptimized the ABAP kernel and the ABAP language to also be able to connect to andconsume HANA content very effectively, very efficiently. But this also allows us to reusethird-party software such as in the .Net, in the Java environment, as well as fairly easily takeexisting applications and port them to run on top of HANA.

Page 6: Week 1 unit 1to5 index sap

Page 6 Copyright/Trademark

00:18:56 Now as I said, the non-native SAP HANA applications is not the focus of this course. Thiscourse will focus on the native HANA applications. But many of the concepts that we will talkabout, such as designing in the database, building tables and schemas, writing SQL, writingSQLScript, these are all things that are applicable to both native and non-native applicationdevelopment.

00:19:22 And then finally what you can look ahead to learning about throughout the rest of this courseis we're really going to go end to end. We're going to start with an empty HANA system andshow you how you can set up the development environment, how you do the basics of datamodeling and analytics. So we’ll start with a completely empty system, we’ll show you how tocreate your schemas, your tables, and then the views on top of those tables.

00:19:49 We’ll learn about SQLScript. That is SAP’s language for creating stored procedures andallowing you to put more and more of your logic deeply down inside the database.

00:20:03 We’ll also learn how we can both expose and consume SAP HANA data via HTTP, leveragethat built in Web server to serve out our user interface. We’ll also learn how to code serviceenablement and validation logic on the server side using JavaScript, and how to use the builtin OData service generation framework.

00:20:28 We’ll learn about SAP's UI library for building HTML5-based applications, something that wecall SAPUI5.

00:20:38 We’ll learn about the complete end-to-end lifecycle management and how you build artifacts,how you translate them, how you package them for delivery either through your own systemlandscape up from development to QA to production or if you’re a partner - how can youdeliver your applications to your customers.

00:21:58 And then finally we’ll look at SAP UI integration services. This is a special offering forbuilding a lightweight portal that runs on top of HANA, so it extends the user interfacebuilding capabilities by going beyond just coding with individual UI elements, but allowing usto assemble widgets together in an overall shell and more quickly build up a navigationframe.

00:21:28 So hopefully you see how we'll go from almost nothing in our database building up our data-intensive logic in our data model, our service enablement, and our user interface, and I hopethat you will join us for the rest of the units and weeks in this course.

Page 7: Week 1 unit 1to5 index sap

Page 7 Copyright/Trademark

WEEK 1, UNIT 2

00:00:13 This is week one, unit two: SAP HANA Application Development Tools. In this unit we’ll look indetail at the tools we have available for you, the developer, to build applications in SAP HANA.

00:00:28 The primary application development tool is the SAP HANA studio. The studio is based uponEclipse and it has very much the Eclipse look and feel. So I feel if you’re already familiar withEclipse development, you’re going to feel right at home inside the SAP HANA studio. And ifyou aren’t familiar with Eclipse development, it’s also not that difficult to learn.

00:00:51 Eclipse is known as a world-class IDE, integrated development environment, and we try toleverage as many of the powerful features that people love about Eclipse inside the SAPHANA studio.

00:01:04 So first of all, we have dedicated perspectives, and inside those perspectives, multiple views.These perspectives really represent the different personas or roles who might be working inthe SAP HANA studio. So for instance, we have a perspective called the Modeler, and that’sfor the information modelers. We have an Administrative perspective, we have the SAP HANADevelopment perspective, and we have a Debug perspective.

00:01:31 The one we’re really going to be focused on is the SAP HANA Development perspective. Andas you see in the screenshot, the SAP HANA Development perspective has three primarynavigation views in it. The first one is the Project Explorer. The Project Explorer is the standardEclipse project explorer. It allows us to see all the projects we have on our local file system. It’sthe main way we edit development artifacts.

00:01:59 The Project Explorer is, as I’ve said, the standard Eclipse project explorer. But what we’vedone is we’ve used the team provider plug-in approach, so the Project Explorer’s designed soyou can connect it to various source code repositories like a Git or a Perforce and checkcontent in and out. What we’ve done is that we’ve written a special plug-in for the teamprovider infrastructure to be able to talk to SAP HANA and treat it as a source code repository.

00:02:32 So everything you see in the Project Explorer view is all local content, all on your localmachine. Now the SAP HANA Repositories view, on the other hand, that is the view of all thecontent that exists on the server. So in this tab we’ll see all the HANA systems we’reconnected to, and inside the HANA system what we’ve done is we’ve built a repository, asource code repository.

00:02:57 It’s just a series of tables and the necessary logic to implement check-in and check-out,version management, and things like that but it’s already all there in all standard HANAsystems. This isn’t something extra you have to install or configure, it’s just there, it’s active,and we use it for all of our development.

00:03:19 And then finally we have the Navigator tab or, as you’ll see in a minute, it’s been re-namedSAP HANA Systems. So depending upon which version of HANA you’re running at the timeyou view this video, you might see Navigator or see SAP HANA Systems as the description.

00:03:36 The name change doesn’t really impact its functionality. It has the same functionalityregardless. The Navigator or SAP HANA Systems view is the only view that’s shared betweenboth the SAP HANA Development perspective and the Modeler perspective. And we’ll see thisin more detail, but basically it has three folders: one for Content, one for Catalog, and one forSecurity.

Page 8: Week 1 unit 1to5 index sap

Page 8 Copyright/Trademark

00:04:02 But all the editors inside the Navigator don’t follow the team provider approach, so there arelocal files for doing the editing. You need a constant connection to the SAP HANA system toperform the editing. Therefore we wanted to move away from that. The Navigator is a bit of alegacy approach to doing things, and we’re going to eventually move everything into theProject Explorer and team provider approach where you have local files for all of your editing.

00:04:33 Now the next concept we should discuss is workspaces. So Eclipse has something it calls aworkspace, and it’s basically just the folder on the file system where all the projects are stored.Eclipse only allows you to have one active workspace at a time.

00:04:50 In the SAP HANA repositories, we only wanted one workspace per repository that you mightbe working with. And it’s perfectly feasible that you might be connected to one or more HANArepository at a time, each repository representing a single system and the user ID that you useto connect to that system. Therefore we created this concept of multiple repositoryworkspaces. It’s just a separate folder structure on your file system for each HANA system thatyou’re connected to.

00:05:22 But this does mean when we create our projects, we can create them in the HANA repositoryworkspace as opposed to the standard Eclipse workspace, otherwise when we go to connectthe project to the repository, it’ll have to copy it on your local file system from the standardEclipse workspace to your more specific HANA repository workspace.

00:05:47 So inside this Project Explorer view, we have the standard Eclipse look and feel, we have ourprojects—this would be the listing of all our projects—and once again, this is the content that’son our local machine. This is also where we see all of our development objects, so this is theway we trigger the editors for most of the development objects that we will be working with, isby going through the Project Explorer.

00:06:19 So the general process would be that you come into the Project Explorer and you can create anew project. There are various projects that you can choose from. We have all the standardEclipse-based projects, they can all be used, and checked in, and stored in the HANA contentrepository. We also have some SAP-specific projects that we’ve added as part of SAP HANAstudio.

00:06:43 The one that we’ll be using primarily is the XS project. This is specially designed for holding theSAP HANA Extended Application Services development objects. But we could also use third-party tools here, which would include third-party project types and non-HANA-specific SAPproject types. For instance, when we start building our interface, we’ll use SAPUI5 and this hasits own Eclipse plug-in that can be installed inside of HANA studio and it has its own projecttypes as well.

00:07:19 So if we go further into the project creation, we’ll have the dialog where we’ll give our project aname, and you’ll notice this option to Use Default Location. If you leave this checked, theproject will be created inside the standard Eclipse workspace and if you do that, that’s okay, itjust means later when you share the project to the repository the project will have to be copiedfrom this Eclipse workspace into the HANA repository workspace.

00:07:50 I actually kind of prefer to uncheck this Use Default Location and instead create my projectdirectly into the HANA repository workspace. I’m actually going to show you both thoseprocesses throughout the weeks. When I create my first project I’ll uncheck it and manuallycreate it in the HANA repository workspace, then later when I create a UI5 project I’ll use theCopy method. So throughout the weeks if you watch all the videos you’ll see both processes.

Page 9: Week 1 unit 1to5 index sap

Page 9 Copyright/Trademark

00:08:22 Next, we need the concept of sharing the project. So when you’ve created the project you canedit it locally, you don’t need any connection to a HANA server. But as soon as you want tostore it in a HANA repository and activate it so it can be executable, we need to connect yourproject to the HANA system. And we do this with Team—>Share Project. And next you’ll get apopup that will ask you which system and user ID do you want to use for the connection for thesharing, and then you have to choose which package you want to put the content in.

00:08:57 The package is a core concept of the SAP HANA repository. It basically has a couple ofpurposes. First, it builds a folder structure, so it’s just a method of organizing our content intoseparate folders so it’s easier to find content. Second, it also helps control authorizations onwho can edit particular objects.

00:09:20 So all the authorizations in the content repository are done at the package level. You cannotset Edit authorizations or Activation authorizations at the individual development object level.And finally, the package forms the namespace concept. We’ll see this later when we startcreating some tables and other catalog artifacts. The package name will be appended on thefront of the development object name and that way we can have the same base object indifferent packages.

00:09:54 It also means that SAP can deliver a table with a certain name and it could just so happen thata customer or a partner could deliver the same table name and it would be okay because theywould be in their own packages that come under their own namespace. So SAP will onlydeliver content under the SAP package and then we would expect customers and partners tocreate their own root package, similar to the SAP package, and then create all their contentunderneath it.

00:10:25 So here once we have the project shared, you notice some additional metadata comes inbehind the project name that shows you which system you’re connected to and which useryou’re connected to. And then you can say Team—>Checkout and that will bring the contentfrom the server down to your local file system.

00:10:44 At this point then, we’re doing all our editing against files on our local machine. This process ofthe team provider, the team check in, check out, this is all very similar if you’re used to usingother source code repositories like Git or Perforce. In fact, because we’re using the teamprovider in the standard Project Explorer, the client-side tools are exactly the same as whatyou might use against a Git or Perforce.

00:11:13 So then we see the SAP HANA studio as a whole here, and this screenshot happens to be inthe Modeler perspective. I’ll go into the system in a second and show you the SAP HANADevelopment perspective. This gives you some idea of how you can also rearrange the varioustools on the screen. The perspectives will have a set configuration that’s been designed bySAP, but you can drag and drop any of these views and move them around and resize them.

00:11:42 We also see some of the dedicated editors here on the screen as well. Because we’re usingstandard Eclipse, we’re getting some really nice built-in tool support as well, like the ability tocompare versions of an object, so you can look at the various versions. I mentioned that youcan do your editing on your local files and check out the content and you don’t need to beconnected to the server in order to edit.

00:12:11 This means that two developers can check out the same objects and be working on them atthe same time. The check-out process does not lock the content in the content repository in

Page 10: Week 1 unit 1to5 index sap

Page 10 Copyright/Trademark

any way. We want multiple developers to be able to work on the same object at the same time.And even once you commit the content back to the server, the commit process stores yournew development artifact in a private workspace, so it creates a version specific to your userID. Therefore two developers could be coding the same object and they could even store theirversions on the server so no one overwrites each other and we have good versionmanagement of all the things that have gone on.

00:12:54 But once you go to activate your changes, then the system will tell you “Hey, somebody elsehas been editing this at the same time, they’ve checked in and activated a version as well”. Atthat point you have a choice. You can choose to overwrite the version that’s on the server withyour older version, although that’s probably really not recommended unless you’re positive thatthe version on the server contains good changes compared to your version.

00:13:25 You have the choice to stay with the version that’s on the server. So maybe you’re just out ofsync with the server and you’re accidently trying to check in an older version. Then you mightsay “No, the version on the server is fine. Let me just check that out and re-sync my localproject so it’s up to date”. The third option, which is the more likely, is the merge tool.

00:13:45 What this will do is it will open both your version and the other person’s version in a side-by-side editor and it will point out exactly where the differences are. You can go from onedifference to another and you can cherry-pick and copy parts from either version to create onenew merged version. Now all these tools, the merge, the comparison, the version historydisplay, these are all standard Eclipse tools that are supported by the SAP HANA contentrepository because of the plug-in implementation.

00:14:19 And then finally, we’ve talked a lot about the SAP HANA studio, and that’s the main tool thatyou’re going to use. It’s certainly the tool you’re going to interact with, the tool that you launch,but there’s actually another piece of software that has to be installed on your developmentmachine. You need to install the SAP HANA client.

00:14:39 The SAP HANA client generally is used because it has the JDBC and ODBC drivers in it, but itcontains a special piece of functionality for us as developers, as well. It contains a tool calledregi. That stands for Repository Git. Once again, we’ve really modeled this process of Git andPerforce and other standard source code repositories.

00:15:05 It’s actually this little tool, this little regi tool that’s part of HANA client, that does the check inand check out. The HANA studio itself doesn’t know how to do that. Therefore, one of the firstthings we do after installing HANA studio is that one time we have to go in and configure andtell the HANA studio where the HANA client is installed so it knows how to execute this regicommand utility behind the scenes.

00:15:30 So at this point I think it’s a good opportunity to go into the system and let’s show you a little bitof the things we’ve been talking about. So first of all, here is the SAP HANA studio and here isthe Modeling perspective, which might be the one that you’re familiar with if you’ve been usingHANA before.

00:15:51 Let’s do this one-time configuration. I’ll show you where this is and what we need to do toconfigure the regi location for the HANA client. You’ll go to Window —>Preferences and thenyou go to SAP HANA Development —> Repository Access. You’ll have to do a Browse andfind the file location where you installed the SAP HANA client.

00:16:15 And you should see this regi.exe file inside the HANA client. This is very important because

Page 11: Week 1 unit 1to5 index sap

Page 11 Copyright/Trademark

otherwise you won’t be able to create a HANA content repository connection or do a check inor check out on any projects.

00:16:29 The other thing I like to do when I come in here, there are some configuration settings for howthe system will work, how the process of check in, check out will work. I like to check this one,this Always Commit Changes Before Activation. Now what this will do (you’ll see this in aminute when I have a project) when I check in a project, it’s checked in inactive.

00:16:55 I can’t execute it yet. It’s just like storing a version on the server. I have to activate it before Ican execute it. Now that’s a two-step process. There’s different menu paths for doing that, butmany times I’m committing and I’m immediately activating. This is because I do real iterativedevelopment; I like to code, test and then code some more. So in that instance I turn this onand I only have to activate it and the system will do a commit for me.

00:17:24 Other developers like to commit very frequently but then only activate major milestones whenthey think that they have everything working right. In that instance, you might want to uncheckthis, and the default is that it’s unchecked. In my system I have it checked so that’s what it willlook like in my demos although most times I will go ahead and do the command and activateso you’ll see both steps.

00:17:51 Now, let’s switch over to the SAP HANA Development perspective and as we described thereare three views here in these three tabs. Let’s start with the SAP HANA systems view. Here wesee each of the systems we have configured and the user ID that we’re connected with. Insideeach system there are three primary folders, the first of which is Security. As developers, wedon’t spend much time in the Security tab.

00:18:20 It has the ability to create or change users and we have the ability to display or edit roles. Alittle bit later we’ll create some roles, we’ll certainly show you the process of how to createsome roles and we’ll grant those roles to our user ID. Those are really the only tasks that weas developers will tend to do in the Security tab.

00:18:41 Next we have the Catalog folder. The Catalog folder literally shows us our database catalog,so this first-level hierarchy shows us our schemas and then if we drill in here we can see thevarious tables and views and other database artifacts that exist inside the schema.

00:19:00 So from our listing of tables, we do have the ability to view the definition of a table and seewhat columns and data types that they have. We can do a little data preview as well, so there’ssome nice tools built in here to help us explore the content in the Catalog.

00:19:20 Last we have the Content folder. The Content folder show us the SAP HANA repository. Andwe see our packages displayed as a folder hierarchy where we can drill down into things. So inthis approach with the content repository you’ll notice that in some of these folders we’reseeing “contains hidden items”.

00:19:45 So the content repository from the SAP HANA Systems view does not show us everything. Itonly shows us the objects we can edit from this tool. And this is the older tool, remember. Thisis part of the original Modeler perspective. And therefore if I come here and I say New, we onlysee a handful of development items I can create here. I can create various views, analyticprivileges, and procedures, and decision tables.

00:20:11 Now these editors do not use the Project Explorer. They do not check out files to the local filesystem. They need a constant connection to the server. They do lock so that two developers

Page 12: Week 1 unit 1to5 index sap

Page 12 Copyright/Trademark

can’t work on the same object at the same time. But we wanted to get away from thisapproach. We wanted to use standard Eclipse editors and allow multiple developers to work onthe same object.

00:20:39 So we wanted to transition away from this. Therefore, all the new development types thatwe’ve introduced in HANA 1.0 SP5 are not available here. You see there’s no new table, nonew OData service, no user interface. These are things we can only create via the ProjectExplorer and we’ve even begun to migrate some of these objects. We’ve already migrated theprocedures from the SAP HANA Systems view into the Project Explorer approach.

00:21:08 And actually, in SP5, both are offered in parallel for backward compatibility, but we’ll talk moreabout that in the section for SQLScript and I show you both those editors and compare them.Eventually, all these artifacts will move into the Project Explorer approach and everything that’sin this HANA Systems view will be available either from the SAP HANA Repositories or theProject Explorer and the need for this third view will go away. We can’t migrate completely untilall the editors are rewritten for this new approach.

00:21:43 Next we have the SAP HANA Repositories tab. This shows us the view of the HANA contentrepository and much of the same information as we see here, we see the same folderstructure. But unlike when we went into the packages here and we see that these containhidden objects, the view from here shows us everything.

00:22:04 So we have no problem seeing all the content. And you’ll notice all the development artifactsare represented as files. And it’s the file’s extension that tells us which type of developmentartifact that we’re working with. So the file’s extension is absolutely critical to doingdevelopment and when we create a new development artifact, we say File —>New, we give ita file name, and we have to give it a file extension.

00:22:31 It’s the file extension which tells HANA studio which editor to open to be able to develop onthat object, but it also tells the server how to activate that object, what type of runtime artifactthat you want to create out of that design-time object. The other thing that you should note isthat it’s easy to misspell one of these file extensions.

00:22:50 And if you do misspell something, then the system’s not going to give you an error because weallow all arbitrary file names and file extensions to be stored in the SAP HANA repository.Otherwise, the SAP HANA content repository is also used as the storage location for the Webserver, so all the static Web content has to be stored in here as well and so we have to be ableto allow all file types to be served out by a Web server. Therefore, we can’t give you a syntaxerror if you misspell .hdbrole or some other file extension, so be aware of that.

00:23:28 Now I’m here in my HANA repository and I want to work with a project. I can see a standardEclipse project already exists on the server for this solution package because it has this.project file here.

00:23:44 If I want to bring that down to my local PC to be able to edit this project, I just use Checkoutand Import Projects. The first screen of this dialog will just confirm the location that it’s going tobe checked out to. So you see it’s taking it from the server and copying all the content of thisproject down to my local file system.

00:24:08 So, it’ll take just a second as it copies from my server to my local PC. Say Yes, I do want tooverwrite what’s there. I had already checked this out previously, that’s why there are somefiles already in that folder and I just confirm that I want to overwrite those.

Page 13: Week 1 unit 1to5 index sap

Page 13 Copyright/Trademark

00:24:24 And now I see that here’s the projects that it found in that package. Do I want to import them?Yes, I’ll import them. And you’ll see down here in the corner it’s saying Sharing Projects. And ifI go over to the Project Explorer it’s added this project to my Project Explorer and it’s shared itwith the HANA content repository. That’s what I see here in this information next to the projectname. It shows me the system that we’re shared with, the user name we’re connected with,and the package this content is stored in.

00:24:55 Now just to show you, here’s the content. If I pull up one of the development artifacts they openin the appropriate editor. Don’t get thrown off by the syntax of what we’re saying or whichdevelopment artifact that we’re looking at. We’ll talk about all the various development artifactsover the coming weeks, but for now I just want to show you what the editing workflow looks likea little bit here.

00:25:23 So I’ll make a little minor change, just put some spaces in here, I don’t want to break anythingthat I already have working. And I’ll save those changes. So those changes are only persistedon my local file system at this point. And the icon decorator changed here, that let us knowthat. It now has this black background with this white asterisk. That means, you’ve made achange, it's saved on the local file system, but the local file system version is now out of syncwith the version on the server.

00:25:54 At this point I want to commit it to the server so the server has the same version as my localfile system. So I’ll just say Team—>Commit and it's now copied it back up to the server. NowI've got a version on the server that I can continue editing or get another version. I don’t haveto worry about if my laptop crashes and I lost my data or my development artifact. It’s still thereon the server.

00:26:23 But it is not the executable version yet. It’s stored inactive in my private workspace on theserver and that’s what this little grey icon denotes, the fact that it is inactive. Before I canexecute the changes that I made to this development artifact I have to activate it as well. So I’lluse Team —> Activate and that will activate it on the server. So now the new version isexecutable and you notice that the icon decorator has changed once again. It is now this littlegold cylinder, that lets you know that it is successfully activated on the server.

00:27:00 At the activation point is also when I would get a syntax check for most development objects. Icould get a syntax error at that point then I would see a little red dot in the icon decorator to letme know that I have syntax errors as well.

00:27:14 I’ll just add another space here and I’ll save it again. Because I set that option that says AlwaysCommit Changes Before Activation, I could have done this as a one-step process as well. Icould have said Team —> Activate. And you notice that it’s doing the commit first and then it’sdoing the activation.

00:27:33 The other thing that I’ll point out is I’m always going to use the menu option here, Team —>Commit and Team —> Activate, because that’s what’s currently available. But in a very nearfuture revision of the HANA studio, we’ve also added icons on the taskbar to do the activation,and keyboard shortcuts.

00:27:56 So I can come here, add another space and I’ll hit Save, and then CTRL+F3. You should getthe idea that if I had a keyboard where I knew where the CTRL key was, I could do a keyboardshortcut and it would send it to the server as well. That was one of the most requested featuresthat we had from developers as they didn’t want to have to come here and use the Team menu

Page 14: Week 1 unit 1to5 index sap

Page 14 Copyright/Trademark

because that’s a couple of clicks and they wanted something either on the toolbar or as akeyboard shortcut. I actually find the keyboard shortcut to be nice now.

00:28:43 We can do these activities...I’ve been doing the Team –> Commit here at the file level, but wecan do it at the folder level as well. One thing I’ll point out is if you ever rename an object ordelete an object, you need to immediately go to the higher level package and do Team –>Commit and Team —> Activate

00:29:03 The deletions will only be processed on the server if you do a commit at the package level.This is also the most common problem that people run into, they’ll delete or rename an objectand then they’ll try and edit something else and they’ll get into a situation where they have asyntax error, where they can’t fix that syntax error because they also have the uncommitteddeletion or rename that’s pending as well.

00:29:24 So just follow the simple little guidelines of committing and activating at the higher packagelevel as soon as you do a delete or a rename and you won’t have those problems.

00:29:36 So with this we’ve had a brief introduction to SAP HANA studio. Hopefully you have a betteridea of how the navigation, how the development workflow process works, the check in, checkout, and the activation. And we’ll see a lot more of this throughout all the subsequent weeks aswe learn about each of the individual development artifacts we’ll be creating using these toolsand this approach. So you’ll absolutely get very familiar with the SAP HANA studio.

Page 15: Week 1 unit 1to5 index sap

Page 15 Copyright/Trademark

WEEK 1, UNIT 3

00:00:13 Hello. We now move on to week one, unit three: SAP HANA Software Downloads. In thissection, we will look at some of the resources that are available to you as developers onvarious SAP Web sites.

00:00:27 So first we have to know what all available resource sites there are.

00:00:35 We have the SAP Community Network. This is the main umbrella site that most people willgo to if they need any information about how to do something with SAP, they need help,they need downloadable content, message boards, all these sort of things are available atthe SAP Community Network.

00:00:55 Within the SAP Community Network, we have a subset of the community that's designed fordevelopers. Those of you watching this video would be the target audience for this spacewithin the SAP Community Network. And this is the SAP HANA Developer Center. This isgoing to have material that is of a more technical nature and centers on setting up systemsand doing development in systems, so APIs, source code documents, how-to guides. Thesesorts of things are all in the SAP Developer Center.

00:01:32 Inside SCN in the SAP Developer Center you'll also find links where you can downloadvarious pieces of free software. For instance, you can download the SAP HANA studio andthe SAP HANA client from the SAP HANA Developer Center. There's also free softwarelicenses that range from downloadable versions of some software, like the NetWeaverapplication servers or, in the case of HANA, there are links to where you can sign up foreither 30-day free trials or free versions of the software where you only have to pay for thehosting fees on the cloud providers.

00:02:11 All the SAP HANA tools are within the Developer Center, so you can always get to them bygoing to developers.sap.com/HANA. I'll also show you in a minute. I'll pull up all these Websites and I'll show you where you can find this information.

00:02:29 So first of all, we have SCN. SCN at a high level is the overall community network, and it'sreally a great portal that you can go to if you want to connect with other people doing similaractivities in the SAP world, you want to ask questions, you want to make contacts so youcan network, or maybe you're an expert and you want to share some of your expertise. It's agood community because there's so many people out there putting out good content. Sowhether you're just starting in the world, it's a great place for you to go and gatherinformation, but if you do have some experience I encourage you to go there and give backto the community.

00:03:09 And then as we said more specifically, inside of SCN there is a space designed fordevelopers. This is the SAP Developer Center. The overall Developer Center focuses onmany different types of developers. There's specific space for HANA. There's also specificspace for mobility and user interface development. So depending on what area of expertiseyou have, there's a focused area for you.

00:03:37 In addition to the basic content, there's also how-to guides and other learning materials.There's a link to the SAP HANA academy, which has series of e-learning videos, similar towhat you're watching here on the openSAP platform. There's also links to download the freesoftware or access the trial versions of the software.

00:04:02 So let's go over to the browser and have a look at what these sites have to offer.

Page 16: Week 1 unit 1to5 index sap

Page 16 Copyright/Trademark

00:04:07 If we start with scn.sap.com, this is the main community Web site. From here, there'sinformation about joining SCN. It's free, it doesn't cost anything, you just need an e-mailaddress to be able to register an account. There's various hot topics linked here, spotlightevents, and from the top we can branch into specific topics, specific industries, lines ofbusiness. But I think the area that most everyone watching this video would be interested inis going to the Developer Center.

00:04:43 Now the developer center, as I described, is really the focused area for people watching thisvideo, people who consider themselves application developers. And inside here we breakdown into several subareas, for instance, maybe you're interested in cloud development ormobile development. In our case, we're focusing on HANA. So we'd go into the SAP HANAsubspace.

00:05:07 Inside the SAP HANA subspace, one of the first things that you'll notice is this is the locationwhere you can sign up for the free 30-day trial, and then there's also the SAP HANAdeveloper edition. So these are hosted versions of HANA in the cloud that you can getaccess to.

00:05:24 You can also download the SAP HANA client and studio, so even if you aren't a current SAPcustomer and have access to our customer software download site, the client and the studioare available as developer editions so that you can do development against either the 30–day trial or the SAP HANA developer edition.

00:05:46 There's also lots of good links to take you directly into the SAP HANA official documentation.There's some blogs and various how-to guides, some of which are community-created soit's maybe just someone talking about something crazy that they figured out how to do withHANA. Other things are official guides released by SAP or by our consultants from the field.

00:06:09 And then we also have the SAP HANA academy. I mentioned this earlier. This is an e-learning site. You can come here and you can drill in and maybe find some very specifictopic that you're interested in within the HANA world, and find various e-learning resourceson that topic.

00:06:26 Now back in the Developer Center, one last thing I want to show you is that if you go into thecontent, you'll notice that here we have basically message boards where you can askquestions and see other people asking questions. Maybe you can answer them. But Ialways recommend to people that are new to an area, new to a topic area - maybe you'renew to SAP HANA - one of the best learning resources is to go watch the forums. Put awatch on them and just read the questions that other people are asking. You're going tolearn so much by seeing their questions and seeing the answers that are being posted totheir questions.

00:07:05 So I hope with the links that we've shown you here today with the SAP Community Networkand the Developer Center, you have some great starting learning resources that will supportyou on your journey as you move beyond what you've learned here in the openSAPcourses.

Page 17: Week 1 unit 1to5 index sap

Page 17 Copyright/Trademark

WEEK 1, UNIT 4

00:00:13 This is week one, unit four: Access to SAP HANA Systems in the Cloud. In this unit, we'll detailsome of the options that you have for running your own SAP HANA system, hosted on one ofthe various cloud providers.

00:00:26 Now there's a couple different options we'll go through, and they have varying cost impacts anddifficulty levels for managing the systems. It's important to note that all the options that we'll talkabout are free of charge from the SAP standpoint of licensing the software. So you can getaccess to SAP HANA Developer Edition for free from a software licensing standpoint. But youare still responsible for the hardware hosting cost of running the software in the cloud. SAP doesnot get any money for these costs nor, as part of openSAP, can we reimburse you for thehardware hosting cost. We're going to give you some tips and tricks of ways that you canpossibly reduce the cost of running the software in the cloud, but also other options that if youdon't want to get into all the details of running systems and low-level system administration thatyou can run a very simplified option with a flat rate as well.

00:01:24 So there are several options that we're going to discuss where basically you can deploy yourown SAP HANA system running in the cloud. You have full access to the database. It's yourinstance. You're not sharing it with anyone else. You can install your own software onto thatsystem, so you can install additional delivery units. You can create all the development objectsthat you want. You can load data into that system. You have full control. And basically, with thesystem, you can then practice all the various techniques that we're talking about in this course,and you're also welcome to continue to use the system after the end of this course to continueyour education and to develop on SAP HANA.

00:02:06 SAP has partnerships with several different cloud providers. So there's a choice of the differentinfrastructures that you can use for hosting an SAP HANA system. We're going to detail twoprimary options here today, and there are various other ones. I would recommend that you lookat the various options, take into consideration some of the tips that we're going to talk abouttoday, and then choose the right one for your budget and your level of expertise.

00:02:36 In general, we recommend the SAP Developer Edition Environment. This is the softwarelicensing approach where SAP gets no revenue from it whatsoever. The license is free ofcharge to you. You can develop on this, but you cannot run productive software on the SAPHANA Developer Edition. If you want to run productive software, then you have to look at SAPHANA One. There is a licensing charge for that.

00:03:09 We recommend, generally, the Amazon Web Services. And I'm going to go into it and show youhow you can choose and how you set this up. Now, we recommend the Amazon Web Servicesfrom the standpoint of you have control over the cost. So Amazon charges you per hour, andyou have a couple different options as to how much hardware you want to run the system on.Therefore, you have control over how much you spend, but you also have responsibility. Youhave to remember to stop the instance when you're not using the system, and then you stopincurring costs. If you forget to do that and you don't stop the instance, and you let it run all daylong, every day, this is not going to be the cheapest option. But if you do stop and start thesystem, and you only incur costs when you're actually using it, and you only use it a few hours aweek, then this can be a very low-cost option. But it does mean that you have to set up anAmazon account, and you have to deal with the Amazon terminology and the Amazon WebServices Console, which means that it's pretty low level. You have to learn things like Amazonmachine images, starting instances and spot instances, and there is a long list of possiblelaunch options. So it may be a little overwhelming. If it is, then we would recommend as analternative you look at the open cloud provider option.

Page 18: Week 1 unit 1to5 index sap

Page 18 Copyright/Trademark

00:04:42 This option is a flat fee, so no matter how much you use it during the month, or how little youuse it during the month, it's the same fee. When you start this up, you get a server, but you alsoget a client environment. So you get a Windows desktop, and it already has the HANA studioand the HANA client installed and configured to connect to your system. These are all thingsthat you have to do yourself if you're running the Amazon cloud image. So it's kind of a trade-offof, do I want control over the costs that I will incur, but greater effort to start everything up andconfigure everything? Or do I want a very simplified startup but then a flat rate? And that flat rateis still very reasonable, and if you are going to use the system heavily, many hours of the day,most days of the week, then the flat rate may be more economical. I would encourage you to goto the SAP HANA Developer Center. From there, we have links to what the various costs are. Ihave intentionally not stated the per-hour or the per-month cost, because just as soon as Iwould do that in this recording, it could change next month. So I encourage you to go to theWeb site and check what the current costs are for all the options before you make your decision.

00:06:01 So once again, all the options are listed at the SAP HANA Developer Center.

00:06:07 With that, let's go into the SAP HANA Developer Center.

00:06:14 Right here you see, first of all, there is a free 30-day trial. That is hosted on the open cloudprovider. You may want to choose that option, although this course runs for six weeks, so 30days would not be enough to get through the free trial, and also the free trial could disappear atany time. It is a limited offer, so it may not even be available by the time that you see this video.

00:06:44 Concentrate on the Developer Edition. As we said, the licensing is free, but you do have to payfor the hardware hosting. The hosting options—there are several different options. The AmazonWeb Services I'm going to go into some more detail in a moment, but the open cloud sharewould be the other one that we would recommend. This is a flat rate and, as I said, you start upthe cloud share and you get access to a server and a client environment. Everything is alreadyconfigured, so you can be up and running extremely fast with this option. But it is a flat rate.Right now, at the time of the recording of this video, it is $137 per month. That amount couldchange, so refer to the Web site for the latest pricing. But you know that's what you're going tobe charged per month, no matter how much or how little you use it. Very simple process to getstarted.

00:07:43 Let's look at the Amazon Web Services option. This one you pay per hour, and I'll even showyou some additional options where you can choose different size hardwares and get differentprices per hour, as well as some options to bid on unused capacity in the Amazon Web Servicescloud, and maybe even get a lower-priced option.

00:08:07 The process for signing up is very straightforward. I'm being logged on to the Web site. I have toput in a little bit of information. I'm not even going to fill in most of this information. You do haveto tell it which region you want to launch in. This is one nice thing that Amazon offers. They havedata centers around the world, and you can choose which of your data centers you want. Youwant to choose the one that's geographically as close to your location as possible to cut downon the network latency. Next, you have to put in your Amazon account ID. So I'm just going tolog into my Amazon account, get my account ID, and we'll put in the account ID. This is what willlink to my Amazon account and how SAP will give access from the images that they've alreadyprepared to my personal Amazon account. So let's accept the agreement (and of course,everyone reads all the terms and conditions).

00:09:33 At this point, it's making its request from the SAP software to the Amazon software so we're now

Page 19: Week 1 unit 1to5 index sap

Page 19 Copyright/Trademark

actually in Amazon's Web site. And what this is going to do is create a host stack for us, whichmeans it will create the server, it will create the network port configuration, and an elastic IPconfiguration. So it's going to set up several things for us. I'll just change my stack namebecause I've already done this once. I have it already running so we don't have to wait as longfor this to complete and I can show you what it looks like when it's finished.

00:10:10 At this point, you have to choose between three different system sizes. So we have them2.xlarge - that has 17 GB of memory. Then we have the 2.xlarge with 34, and the 4.xlarge with68.4. And you pay a different price depending on which size that you choose. You'd have torefer to Amazon's Web site for the pricing information. It does vary by region, which regionyou're launching, your system end, as well as which size server that you choose.

00:10:41 It defaults in with the xlarge, which current rates are a little under $1 an hour, is what it costsyou. I tend to choose the 2x size - gives a little bit more overhead, depending on how much datayou're going to load in the system, but you can make that choice. The 17.1 GB of memory is justenough to launch the HANA system. If you're going to load very much data in your HANAsystem, like you want to generate a lot of demo data, then you probably want to consider goingup to the 34.2 GB option.

00:11:18 You have to specify a key name. This is a key pair that you've set up in advance in AmazonWeb Services. This is how you'll be able to securely connect to your server. So it's a certificatethat you've already downloaded to your local PC. And the process for setting up this key nameis all documented in the SAP Developer Center.

00:11:49 You can add tags. I don't need to add any tags. I'll say Continue. It lets me review all theinformation of what is just about to launch. I say yes, this is good, let's go ahead and launch it.You say Continue and it has now started the process of creating a stack. And you can see theoutputs here. You can see which objects it will have created. It would refresh, it's going to goone at a time. It's going to create a server, and then a security group and an elastic IP. I haveone that's already been created here, so let's just switch over to it.

00:12:39 There we are. That was difficult to switch over to. There we are. You see that it has created aninstance and availability zone, a public DNS, and then a public IP address.

00:12:55 From this point, we don't really do anything else in the stack screen. We can switch over to theAmazon Console. From here, we can see all of our running instances.

00:13:10 You'll see that I have one that's been running for a little while, and this other one is just nowstarting to run. It's not fully up yet, but it's from the previous step. So you would wait until thisinitializing goes through this 2/2 checks passed. And you can see other various informationabout your system. You can do some monitoring, the number of reads, and CPU utilization.

00:13:36 The most important thing that you would need to know from this screen is that you want to stopyour instance any time that you're not using it. You incur the per-hour cost any time the systemis running, but you can stop it at any time. The stop does almost like a hibernate. You don't loseyour data. It does do a shutdown of the operation system, but then you can restart the system ata later time. It takes a couple of minutes and then it's back up and running. If you do aterminate, that's like deleting your instance. You would not want to do a terminate unless you'recompletely done working with the system and you want to start from scratch.

00:14:16 So it's very important to do the stop any time you're not using it, otherwise you'll incur costs.Most people, they'll get a very large bill at the end of the month and they'll go, “What happened?

Page 20: Week 1 unit 1to5 index sap

Page 20 Copyright/Trademark

Amazon Cloud Server says they're supposed to be cheap.” Well, they probably forgot to stoptheir system and it just continued running overnight, over weeks, who knows how long, and thenit incurred some additional costs.

00:14:38 You can set up alerts on your account, so just in your general Amazon account, the settings,you can say, “Send me an e-mail or an SMS when I reach certain value thresholds.” Irecommend that you do that, just in case you forget to stop an instance, so if it goes over $20 or$30 or something like that, you'll at least get an e-mail reminder.

00:15:01 Now the other thing that you can do once your system is running...and let's see if my otherone...there, it's up. So that gives you some idea, from the time that you kick off the process, howlong it takes the system to run.

00:15:14 At this point, you can also say Create Image. This will create a snapshot of the system. Onceyou have this image, you have something that you could, you could terminate the runninginstance and you could restart it from this image. Think of it as a backup of your system. Maybeif you were going to do something really potentially destructive or dangerous to your system,you might want to take an AMI, take a snapshot of the system, before you do that. The otheradvantage this gives you is once you've taken an AMI, you can come into the AMI screen andyou can say Launch Instance, and that would be the same as what we already have running.But you can also say Request Spot Instance. And in this case, what you have is a list of all thepossible servers that you can launch this on. I think you'd still want to stick to the options wediscussed before: the m2.xlarge, the 2.xlarge and the 4.xlarge. So let’s just choose the 2.xlarge.

00:16:14 What you'll see here is you have the ability to bid on unused computing resources. Right nowthe bid price is 18.9 cents USD, per hour. That's significantly cheaper than if I would just launchan instance and take the set price.

00:16:31 The only thing you have to deal with here is that at any time if all the capacity was needed,Amazon would shut down your spot request and could potentially take it away from you. And theother thing you do, is you have to bid and you have to set a price. So I might say, “I'm willing tohave this instance, as long as the price stays under $1.40 an hour,” because maybe that's theset rate. Or maybe I say, “As long as it stays under $0.90 an hour, I want to run this instance.”

00:17:04 Now, if you're willing to take the chance of being disrupted - although I've used this many timesand I've never had Amazon take away an instance from me - and as long as you're willing tohave a little fluctuation in your price, you could still save a lot of money compared to the outrightprice. I ran a server the other day, all day long, and it literally cost me just a little over $1because I was bidding on the unused capacity.

00:17:31 But as you've seen, this is a fairly complex process, having to choose instance types, having todeal with all this Amazon terminology, and work in the Amazon Console, but it comes at thebenefit of you having control over the pricing. The other cloud options, with their set pricing, youdon't have to deal with this kind of complexity. You simply fill out a form, say launch yourinstance, and then it will send you the information as to where to connect you, where to remotedesktop to run the client software - the HANA studio software. Here, we still would have to installthe HANA studio, we'd have to have a supported operating system of the client machine to dothat. One thing that I might point out: The other thing that you can do is Amazon does have afree tier. This micro-instance is very, very small, certainly not large enough to run a HANAserver, but it is large enough to run a Windows desktop and then to run the HANA studio andHANA client on it. So if you do not have a powerful enough laptop or desktop machine, or if youhave an unsupported operating system such as Mac OS, then you might consider using even

Page 21: Week 1 unit 1to5 index sap

Page 21 Copyright/Trademark

the free tier of Amazon to run your HANA studio and your HANA client. You can install those onan instance on this free tier.

00:18:48 So what we've done in this unit is we've shown you various options for being able to run yourown HANA system, and we hope that this supports you in being able to perform some of theexercises that we'll be going through throughout the weeks in this course.

Page 22: Week 1 unit 1to5 index sap

Page 22 Copyright/Trademark

WEEK 1, UNIT 5

00:00:13 Hello. In week one, unit five, we'll now look at how to build a complete example application.The idea here is that we won't take you through every detail of building an application, butinstead show you how easy it is to get a simple Hello World up and running on SAP HANA.We'll focus on the steps that involve getting connected to a server from it, SAP HANA studio,creating the initial project, the supporting files that you need in a basic project, and then how totest the application in the Web browser.

00:00:48 We're going to use some server-side JavaScript. We're going to create a basic REST-basedservice, and this REST service will then be executable in a Web browser. So a couple thingsthat we will need to do: I have a completely new, clean version of HANA studio, just as youwould have if you've never done any development. I'll show you how we'll connect to our SAPHANA system, then how we'll create our initial workspace and our first project, then thecreation of the core application files. There are two files, as you'll see, that every applicationneeds to have access control and to define it as an XS-based application.

00:01:31 Then we'll create our REST-based service using some server-side JavaScript code. Not awhole lot—I don't want to get into the details of the syntax of server-side JavaScript too heavilyyet; that's for a later week. But just enough to show you what kind of coding that we can do onthe server side. Then we'll run the HANA application and you'll see it retrieving data andresponding in the Web browser.

00:01:58 The first thing we have to do, is we have our empty SAP HANA studio, and we're going to haveto connect it to our HANA system. There are a couple of pieces of information that you're goingto need about your system, either from your system administrator, or when you signed up forthe cloud version you would have retrieved this information. You're going to need the hostname of the server itself. You're going to need the instance number, because multiple HANAsystems could be installed on one host, and the instance number is what makes each HANAsystem unique and defines which ports it communicates on.

00:02:37 We'll need a display name. That's just for documentation purposes—what we want to show upnext to our HANA system connection in our HANA studio. And then finally we'll need adatabase user and password.

00:02:51 So let's go to my HANA system. As I said, I have nothing set up; this is just as it would firstappear when I first launched the HANA studio after a fresh installation. And you'll notice I'm inthe Modeler view. I'll have to even come here and I'll have to add the SAP HANA Developmentperspective. And then it switches to that perspective. Initially, and as we've discussed in theprevious units, we have the three tabs. The Project Explorer, the HANA Repositories, and theSAP HANA Systems or, in older releases, the Navigator.

00:03:32 We're going to start here in the SAP HANA Systems tab. And I will create a new systemconnection by right-mouse clicking and choosing Add System. This will bring up a dialog thatwill ask me for my host name. I filled this in previously, so it remembers it for me. Then myinstance number and a description. I can set the locale and language that I'll be using. Andthen in the second screen, I set the user name and password.

00:04:20 I'll say Finish, and if I put everything in correctly I get the connection entry here. I have the littlegreen light next to the icon; that lets me know that I'm successfully connected and all theinformation that I put in was correct. Now I can see the catalog and the content that is availablein my system.

Page 23: Week 1 unit 1to5 index sap

Page 23 Copyright/Trademark

00:04:42 Next, we need to create our repository workspace. Remember, earlier we talked about howHANA is our source code repository, but we need a representation on our local PC for everyHANA system and user with which we'll connect that HANA system. That's where we cancheck out and store the local files. In this step, we'll create that workspace on our local PC andconnect it to our HANA system. Then we'll be able to browse the repository for that particularsystem.

00:05:16 So going back to the HANA studio, I'll switch to the SAP HANA Repositories tab, and I'll sayNew Repository Workspace. This dialog gives me a list of SAP HANA systems that I havealready created. I've only created the one, so that's a pretty easy choice. But at this point Icould also add additional systems as well.

00:05:43 I'll give it a workspace name. You'll notice that we have a workspace root. That's just a folderon my local file system. And then the workspace name becomes a subfolder underneath that.It really doesn't matter what you name your workspace name. This is a completely localconcept on your developer machine; it doesn't have to match the names that maybe anotherdeveloper working on the same system would have. This is completely for yourself on yourlocal machine.

00:06:19 Say Finish. It gets a connection to the HANA system, reads some metadata from the HANAsystem, and now I have all the folders created on my local file system. You can see in theProperties that that local folder has been created, but now I can also browse the contentfolders.

00:06:44 Now one thing I want to do, I want to come here and actually create a new package as well.While I'm in here, I will just organize out all of my content. I'm just going to create a littlepackage named 00 so I could run through this exercise multiple times and keep all the contentseparated if I wanted to.

00:07:08 I just added that package on the server, so I added a folder on the server. And if I refresh, nowthat folder is visible here in the repositories as well. Now before I go any further, I want tocheck out this folder structure. That will just create this workshop, session a, 00, on my localPC as well. So now I have the package structure represented as folders on my local PC. I'mready for the next step, which will be to create a project within those folders.

00:07:47 So we have a wizard for creating the projects: the standard Eclipse new project wizard. Andinside there we have standard Eclipse projects, we have other SAP-specific projects, and thenwe have some HANA-specific projects as well. For most projects in the HANA world, we'll usethe XS project type. This can be used both when you're using the XS application server andserver-side JavaScript, but as you'll see later, we'll use it even when we're just doing datamodeling or writing SQL script, as well. We'll give it a project name, and then we'll share thisproject back to the repository so we have this synchronization between the client side of ourdeveloper machine and the HANA server.

00:08:34 So to create the project, I'll switch to the Project tab. I will say New –> Project and all my SAPHANA-related projects are here under SAP HANA Development. I'll say XS Project. I can giveit a project name. And this is sort of key, because by default, Eclipse wants to create theproject in the standard Eclipse workspace. Remember, earlier I spoke about how Eclipse hasone workspace, but we want for our HANA system to have a separate workspace for each ofour possible HANA systems and users that we connect that system with. Therefore, we haveto override the default location and place this project into the workspace folder for ourparticular workspace, and then put it in the package location where we want the project to be

Page 24: Week 1 unit 1to5 index sap

Page 24 Copyright/Trademark

stored on the server. So I'm going to go ahead and tell Eclipe to create this project insideworkshop session a, 00.

00:09:52 So I'll go ahead and say Finish. I now have a project, and I want to connect it to the server, soI'll use Team –> Share Project. This brings up a dialog. At this point, the system really has allthe information it needs. Because of some files that are stored at the file system level, itautomatically knows that's anything stored under Workspaces –> OpenSAP is connected tothis particular system connection. Now, likewise, because I placed the content into workshopsession a, 00 folder, it knows that it's going to create the content into this repository package,workshop session a.

00:10:35 So I'll go ahead and say Finished, and now this project is connected to my server. Once I startcreating content inside this project, it will be able to be synced back to the server.

00:10:50 So next, we need two core application files before we can really start doing development insideany new project. One is an .xsapp file. Now, that's a file with no file name—just the extension.xsapp. By having no file name with an extension, that forces it—at the file system level, therecan only possibly be one file with that name. That's how we kind of control to make sure thatthese core application files—we only get one instance of them in a project.

00:11:26 The .xsapp file is completely empty, so it's simply a placeholder. It just denotes to the systemthat this package and all subpackages will be XS-based applications.

00:11:39 Then we need the .xsaccess file. This file is needed any time we want to expose content viathe Web server, and it will control all the access and authentication mechanisms. And, in thefuture, we'll expand this to basically control all kinds of things about your application. You'll beable to do URL rewriting, your course preflight checks, anything that would go into configuringa Web application would go into this .xsaccess file.

00:12:11 So let's create these two files. I'll just say New –> File, just using the standard Eclipse filecreation, and I'll do .xsapp. It's the file extension that tells the server what type of developmentartifact this is. As long as I name the file extension correctly, there's nothing more that I have todo with this .xsapp file.

00:12:40 I'll create a second file, and I'll name this one .xsaccess. In this case, I'm going to cut andpaste because no one wants to watch me type, but there's really only two things that we haveto put in this .xsaccess file. The first is “exposed”, and we say true. The “exposed” parameterallows us to basically turn on and off all the services and all the Web content that would be inthis package and its subpackages. So if you had something go wrong in production, and youwanted to quickly disable all of the artifacts in a package, you can just turn “exposed” to false,and it would turn everything off.

00:13:30 Then we have the “authentication” property. In here, we list the authentication mechanismsand the order in which we want them tested. So in HANA 1.0 SP 5, there are three types ofsupported authentication. There's logon tickets, that's the SAP single sign-on cookie. HANAcannot generate a single sign-on ticket; it can only accept single sign-on tickets. Therefore, thisform of authentication is only applicable when your application will run inside the SAPNetWeaver Portal or the SAP NetWeaver Business Client.

00:14:10 Then we have two other forms of authentication. Basic authentication—that's just browserbasic authentication challenge-and-response popup window. And the last is forms-basedauthentication. This is an HTML form to do logon. It's a bit more secure than basic

Page 25: Week 1 unit 1to5 index sap

Page 25 Copyright/Trademark

authentication, and it also allows us, over time, to add in more features, like password changeand “I forgot my password” and those sort of capabilities.

00:14:40 You can list more than one type of authentication. For instance, I've listed logon ticket, andthen basic. So the system will first look for a logon ticket and, only if it does not find one, will itgo on and use basic authentication.

00:14:55 The other thing to note here is that we do plan to add more authentication types in the future.For SP 6, we plan to add X.509 certificates and OAuth authentication. Beyond that, most likelySP 7, we plan to add SAML and Kerberos authentication.

00:15:20 Let me just go ahead and save both of these files.

00:15:29 Next, we need the service itself, so the logic that will run on the server side when a request ismade from the Web browser and will pass back results. This is where we're going to use someserver-side JavaScript. As I mentioned, I didn't want to go too deep into the logic that we'reusing here because we'll have whole week on server-side JavaScript where we'll study this indetail, but this does give you just a little bit of an idea of what we are able to do in server-sideJavaScript. We have APIs that give us direct access to the HTTP request and response object.We're able to read headers out of the request object and write directly into the response object.We can get a connection to the database and perform SQL statements. Later we'll see how wecan perform even more powerful database interactions via this database connection. Finally,we're concatenating some content together into an output string and then putting it into theresponse body so that it will be displayed in the Web browser.

00:16:31 Once again, I'll come here and I'll say New, and I'll say...actually, I could say New –> File, andI could just type it like I did the other file extensions, but there is a little wizard as well. So I cansay File –> New and I can say XS JavaScript Source File as well. And it will automatically puton the file extension for me. So I just want to make sure that I named this right,retrieveData.xsjs. Remember, it's the file extension, .xsjs, that will tell the server that this isserver-side JavaScript and execute it accordingly.

00:17:20 Once again, I'll cut and paste my code, because you don't want to watch me type. You'll noticewe have a dedicated server-side JavaScript editor, so we're getting syntax highlighting andsource code formatting. As I walked you through this in the slides, basically we're going to setthe response content type to be HTML, put a little content in the output, which will go in thebody of the Web page. We select start from dummy, which is really not going to do much ofanything. Dummy is a built-in table that sometimes you'll do a select against just to do a littletest, almost like a ping. Then as long as we got some data back, we'll put the response, thefirst field of the first record that we got back from our select start from dummy, we'll put into ouroutput, which should just be an X, if I did everything correctly.

00:18:16 I save all my content. You notice it has the black background with the white asterisk, Thatmeans it's been saved on my local machine, but is not yet synced with the server. I will sayTeam –> Commit. That will send the content back to the server. And then I will say Team –>Activate. That will activate the content on the server, and now it's executable. One importantnote here: I'm kind of taking the long, slow path of doing Team –> Commit, Team –> Activate.There's actually a parameter that you can set that the system will automatically do a Commitevery time that you do an Activate. So most developers will just say Activate, and they'll getboth operations in one step.

00:19:03 There's also, in later releases - the most recent revisions of SAP HANA studio - Activate has a

Page 26: Week 1 unit 1to5 index sap

Page 26 Copyright/Trademark

button on the toolbar, and it has a keyboard shortcut. So you don't always have to navigate tothe Team menu. But I will show that in all the videos, because that's the most backward-compatible way of doing things.

00:19:23 So now that my content is all activated, I can go to my Web browser. I want to first just go tomy Web browser and go to the same host name and port of my server. If you just go to thebase URL of a HANA server, you should get this little ping check window that just lets youknow that the XSEngine is running and is configured. So I know that my HANA system isreachable via HTTP.

00:20:01 Now I can put in my package hierarchy. This package structure - workshop.sessiona.00 -becomes the URL path for me to access my service.

00:20:16 Finally, I'll put in the name of my .xsjs file, and that is how I access the service itself.

00:20:29 Because I don't have an SAP logon ticket, it fell to the basic authentication within the .xsacessfile, so I have to put in my user name and password.

00:20:45 What you see here is the Hello World returned, and then this is my response from SQL and theX, which is the value that was returned from the SQL statement.

00:20:56 Now this was a very simple example, a Hello World with a little bit of SQL mixed in, buthopefully it's given you a good idea of how we're able to work with HANA studio to createsystem connections, to create repository workspaces, to create projects, and then to createdevelopment artifacts within those projects, and how easily we can test them from the Webbrowser.

Page 27: Week 1 unit 1to5 index sap

© 2013 SAP AG or an SAP affiliate company. All rights reserved.

No part of this publication may be reproduced or transmitted in any form

or for any purpose without the express permission of SAP AG. The

information contained herein may be changed without prior notice.

Some software products marketed by SAP AG and its distributors

contain proprietary software components of other software vendors.

National product specifications may vary.

These materials are provided by SAP AG and its affiliated companies

("SAP Group") for informational purposes only, without representation or

warranty of any kind, and SAP Group shall not be liable for errors or

omissions with respect to the materials. The only warranties for SAP

Group products and services are those that are set forth in the express

warranty statements accompanying such products and services, if any.

Nothing herein should be construed as constituting an additional

warranty.

SAP and other SAP products and services mentioned herein as well as

their respective logos are trademarks or registered trademarks of SAP

AG in Germany and other countries.

Please see http://www.sap.com/corporate-en/legal/copyright/index.epx

for additional trademark information and notices.

www.sap.com