Sie sind auf Seite 1von 10

Solutions

Support

Community

Training

Developer

Partner

Developer
Home

About

Products

Tutorials

SAPHANAXSClassic,DevelopyourrstSAP
HANAXSCApplication
Bylpareek

InthistutorialyouwillmakeyourveryrstSAPHANAXSCapplicationusingthe
SAPHANAWebbasedDevelopmentWorkbench.
Youwilllearn
1.HowtousetheSAPHANAWebbasedDevelopmentWorkbench.
2.Howtodevelopasimpleserversideapplication.
3.Howtopublishandrunanapplication.

Details
TimetoCompete
Beginnersmighttake1015minutestoexecutethistutorial.

Information
ThefullapplicationbuildinthistutorialcanbefoundinthisGitHubrepository.

UsingHANACloudPlatform
EachTrialHANAinstancecomeswiththeHANAWebbasedDevelopmentWorkbench.The
workbenchallowsyoutodeveloponHANAwithouttheneedtosetupalocaldevelopment
environment.
LogintotheHANACloudCockpitwithyourfreedevelopereditionaccount.
ChooseDatabases&Schemas.Youwillneedtocreateyournewinstance,todothissimple
giveitaname,enablewebaccessandofcoursegiveapassword.Thispasswordyouwill
needtorememberasitisthepasswordforyourSYSTEMuserandhowyouwillbeableto
accesstheserver.

Showcases

Onceyoubeginthecreationprocess,youwillberedirectedtoaneventstab.

Remembertheinstancerunsforalimitedtime,soifyouhavetocomebacklateryoumay
needtorestartit.

Justclickstarttorestartit.Alsonoteitsonlyvalidfor30days.
2morestepsbeforewehittheeditor
YoullneedtoclickontheAdminCockpitrsttotriggertheauthorizationsyouwillneed
goingforward.

Onceyourauthorizationshaveapplied,youshouldthenselecttheManageRolesand
Users.

Hereyoucancreateanewuser,thisisrecommendedsoyoudonotrisktheSYSTEMuser.

Nowsimplyapplynewrolestotheusertogivethisusertheappropriateauthorizationsto
begindeveloping.

WiththatcompletedwecannowlogintotheSAPHANAWebBasedDevelopment
Workbench

YouarenowintheEditorandcanimmediatelystartdevelopinginHANA.

UsingHANAonAmazonAWSorMicrosoftAzure
Ifyouchoosetheonpremise/standaloneserverapproachyouwillneedtoaccesstheweb
pageofyourHANAserverusingtheIPaddressofyourserver.Entertheaddress
http://XXX.XXX.XXX.XXXtotheaddressbarofyourbrowser.(ReplaceXXX.XXX.XXX.XXX
withtheIPaddressofyourserver.)Thisisundertheassumptionthatyouhaveainstanceof
theSAPHANADeveloperEdition
Onthewebpage,thereisalinkforWebBasedDevelopmentWorkbench.Clickthislinkto
starttheworkbench.
Fromthispointdierencesinthetutorialsarearoundtheinitialstartingpoint,intheSAP
HANADeveloperEditiontheuserCODEJAMMERhasapackagecalledCODEJAMMERwhichyou
wouldthenplacetheinitialpackageinthenextsectionunder.

CreatePackageforyourApplication
TherststeptostartdevelopingaSAPHANAapplicationwithSAPHANAWebbased
DevelopmentWorkbenchistocreateanewpackagefortheapplication.
Herewewillcreateapackagecalledcodejam,RightClickonthecontentfolderontheleft,
andenterthepackagedetails.

Nowyouhaveapackagethatiswaitingforyourcode,nowwewillRightClickonthe
codejampackageandchooseCreateApplication

Thisstepwillgenerate3les,the.xsapp,.xsaccessandanindex.html.

NowCreatetheApplication
Nowisthetimetoactuallycreatesomeapplicationcode.InSAPHANAXSCapplication
codeessentiallyisJavaScriptcodeprovidedin.xsjsles.Nowsuchalewillbecreated.
Openthecontextmenuofthecodejampackagebyrightclickingonthenameandchoose
CreateFile.Entermylibrary.xsjsaslenameandsavewithEnter:

ThenewemptyleisnowopenintheEditor:

Copyandpastethiscodetothejustcreatedmylibrary.xsjsle:

$.response.contentType="text/html";
$.response.setBody("MyPersonalLibrary");

SavetheleusingtheSavebuttonorbypressingctrl+s.Again,thesuccessfulsaveis
conrmedintheconsole.

Deploy,RunandTesttheApplication
Nowtheapplicationisreadytobetested.AsyouaredevelopingwiththeSAPHANAWeb
basedDevelopmentWorkbenchtheapplicationisalreadydeployedandactivatedtoyour
SAPHANATrialInstance.Soyoucanimmediatelycontinuetotestit:
Selectthemylibrary.xsjsletoenabletheRunonServerinthetoolbar.ThenclicktheRun
onServerbutton:
Theapplicationwillopeninyourbrowserandgreetyouwiththebeginningofyourpersonal
library:

Congratulations:YoujusthaveyourrstownnativeSAPHANAapplicationrunningonSAP
HANACloudPlatform!

Relatedinformation
SAPHANADevelopmentInformationocialdocumentation

ThistutorialispartoftheSAPHANAandSAPHANACloudPlatformtutorialsset.

Updated12/08/2016

ProvideFeedback

Contributors

akula86

ccmehil

agraebe

lpareek

QRCode

Beginner

Tags
SAPHANA,SAPHANACloudPlatform,
Beginner
Prerequisites
YouneedaHANAaccount.Pickoneofthe
following:
GetafreeaccountinHANACloudPlatform
SetupanaccountonAmazonAWSor
MicrosoftAzure

NextSteps

Share&Follow

Privacy TermsofUse LegalDisclosure Copyright Trademark Sitemap Newsletter TextView

CookiePreferences

Das könnte Ihnen auch gefallen