Post on 27-Jul-2020
Generated by Jive on 2015-02-28+01001
SAP HANA Developer Center SAP HANAExtended Application Services
Posted by Thomas Jung Nov 29 2012
With SAP HANA SP5 on page we introduce an exciting new capability called SAP HANA Extended
Application Services (sometimes referred to unofficially as XS or XS Engine) The core concept of SAP HANA
Extended Application Services is to embed a full featured application server web server and development
environment within the SAP HANA appliance itself However this isnt just another piece of software installed
on the same hardware as SAP HANA instead SAP has decided to truly integrate this new application services
functionality directly into the deepest parts of the SAP HANA database itself giving it an opportunity for
performance and access to SAP HANA differentiating features that no other application server has
Before SAP HANA SP5 if you wanted to build a lightweight web page or REST Service whichconsumes SAP HANA data or logic you would need another application server in your systemlandscape For example you might use SAP NetWeaver ABAP or SAP NetWeaver Java to connectto your SAP HANA system via a network connection and use ADBC (ABAP Database Connectivity)or JDBC (Java Database Connectivity) to pass SQL Statements to SAP HANA Because ofSAP HANArsquos openness you might also use Dot Net or any number of other environments orlanguages which support ODBC (Open Database Connectivity) as well These scenarios are all stillperfectly valid In particular when you are extending an existing application with new SAP HANAfunctionality these approaches are very appealing because you easily and with little disruptionintegrate this SAP HANA functionality into your current architecture
However when you are building a new application from scratch which is SAP HANA specific it makes sense to
consider the option of the SAP HANA Extended Application Services With SAP HANA Extended Application
Services you can build and deploy your application completely self-contained within SAP HANA providing an
opportunity for a lower cost of development and ownership as well as performance advantages because of the
closeness of the application and control flow logic to the database
Applications designed specifically to leverage the power of SAP HANA often are built in sucha way to push as much of the logic down into the database as possible It makes sense toplace all of your data intensive logic into SQL SQLScript Procedures and SAP HANA Views asthese techniques will leverage SAP HANArsquos in-memory columnar table optimizations as wellas massively parallel processing For the end-user experience we are increasingly targetingHTML5 and mobile based applications where the complete UI logic is executed on the clientside Therefore we need an application server in the middle that is significantly smaller than thetraditional application server This application server only needs to provide some basic validationlogic and service enablement With the reduced scope of the application server it further lendscredit to the approach of a lightweight embedded approach like that of the SAP HANA ExtendedApplication Services
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+01002
Figure 1 - Architectural Paradigm Shift
SAP HANA Studio Becomes a Development WorkbenchIn order to support developers in creating applications and services directly within this new SAP HANA
Extended Application Services SAP has enhanced the SAP HANA Studio to include all the necessary tools
SAP HANA Studio was already based upon Eclipse therefore we were able to extend the Studio via an Eclipse
Team Provider plug-in which sees the SAP HANA Repository as a remote source code repository similar to Git
or Perforce This way all the development resources (everything from HANA Views SQLScript Procedures
Roles Server Side Logic HTML and JavaScript content etc) can have their entire lifecycle managed with
the SAP HANA Database These lifecycle management capabilities include versioning language translation
exportimport and software deliverytransport
The SAP HANA Studio is extended with a new perspective called SAP HANA Development As Figure 2
shows this new perspective combines existing tools (like the Navigator view from the Modeler perspective)
with standard Eclipse tools (such as the Project Explorer) and new tools specifically created for SAP HANA
Extended Application Services development (for example the Server Side JavaScript editor shown in the
figure or the SAP HANA Repository browser) Because SAP HANA Studio is based on Eclipse we can also
integrate other Eclipse based tools into it For example the SAP UI Development Toolkit for HTML5 (SAPUI5)
is also delivered standard in SAP HANA Extended Application Services HANA 10 SP5 comes pre-loaded
with the 18 version of the SAPUI5 runtime and the SAPUI5 development tools are integrated into SAP HANA
Studio and managed by the SAP HANA Repository like all other XS based artifacts Although the SAPUI5
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+01003
development tools are integrated into SAP HANA Studio they are not installed automatically For installation
instructions please see section 101 of the SAP HANA Developers Guide
Figure 2 - SAP HANA Development perspective of the SAP HANA Studio
These extensions to the SAP HANA Studio include developer productivity enhancing features such as project
wizards (Figure 3) resource wizards code completion and syntax highlighting for SAP HANA Extended
Application Services server side APIs integrated debuggers and so much more
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+01004
Figure 3- Project Wizards for XS Based Development
These features also include team management functionality All development work is done based upon
standard Eclipse projects The project files are then stored within the SAP HANA Repository along with all the
other resources From the SAP HANA Repository browser view team members can check out projects which
have already been created and import them directly into their local Eclipse workspace (Figure 4)
After projects have been imported into the local Eclipse workspace developers can work offline on them You
can also allow multiple developers to work on the same resources at the same time Upon commit back to the
SAP HANA Repository any conflicts will be detected and a merge tool will support the developer with the task
of integrating conflicts back into the Repository
The SAP HANA Repository also supports the concept of activeinactive workspace objects This way a
developer can safely commit their work back to the server and store it there without immediately overwriting
the current runtime version It isnt until the developer chooses to activate the Repository object that the new
runtime version is created
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+01005
Figure 4 - Repository Import Project Wizard
For a deeper look at the basic project creation and Repository object management within SAP HANA Studio
please view the following videos on the topic
OData ServicesThere are two main parts of the SAP HANA Extended Application Services programming model The first is
the ability to generate OData REST services from any existing SAP HANA Table or View The process is
quite simple and easy From within an SAP HANA Project create a file with the extension xsodata Within this
service definition document the developer needs only to supply the name of the source tableview an entity
name and if using an SAP HANA View the entity key fields
For example if you want to generate an OData service for an SAP HANA table named techedepmdb
businessPartner in the Schema TECHEDEPM this would be the XSODATA definition file you would create
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+01006
service namespace saphanademocontentepm TECHEDEPMtechedepmdbbusinessPartner as BUYER
Figure 5 - XSODATA Service Definition and Test
Upon activation of this XSODATA file we already have an executable service which is ready to test The
generated service supports standard OData parameters like $metadata for introspection (see Figure 6) $filter
$orderby etc It also supports body formats of ATOMXML and JSON (Figure 7 for an example) Because
OData is an open standard you can read more about the URL parameters and other features at http
wwwodataorg
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+01007
Figure 6 - OData $metadata support
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+01008
Figure 7 - Example OData Server JSON Output
The examples in the above figures demonstrate how easily these services can be tested from the web browser
but of course doesnt represent how end users would interact with the services Although you can use a variety
of 3rd party tools based upon JavaScript like Sencha Sencha Touch JQuery JQuery Mobile and PhoneGap
just to name a few SAP delivers the UI Development Toolkit for HTML5 (SAPUI5) standard in SAP HANA
Extended Application Services A particularly strong feature of SAPUI5 is the integration of OData service
consumption not just at a library level but also with special features within the UI elements for binding to OData
services
For example within SAPUI5 you can declare an OData model object and connect this model object to the URL
of the XSODATA service Next create a Table UI element and connect it to this model object Finally you call
bindRows of the Table UI element object and supply the OData entity name you want to use as the source of
the table
var oModel = new sapuimodelodataODataModel (servicesbuyerxsodata false) oTable = new sapuitableTable(testtableId tableID visibleRowCount 10) oTablesetModel(oModel) oTablebindRows(BUYER)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+01009
This creates an UI Element which has built-in events such as sort filter and paging which automatically call
the corresponding OData Service to fulfill the event No additional client side or server side programming is
necessary to handle such events
Figure 8 - OData Bound Table UI Element
For more details on OData service creation in SAP HANA Extended Application Services and utilizing these
services within SAPUI5 please view these videos
Server Side JavaScriptThe XSODATA services are great because they provide a large amount of functionality with minimal amounts
of development effort However there are a few limitations which come with such a framework approach For
example in SAP HANA SP5 the OData service framework is read only Support for Insert Update and Delete
operations is available with SAP HANA SP6
Luckily there is an option for creating free-form services where you can not only perform update operations but
also have full control over the body format and URL parameter definition SAP HANA Extended Application
Services also allows development on the server side using JavaScript (via project files with the extension
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010010
XSJS) Core APIs of SAP HANA Extended Application Services are therefore exposed as JavaScript
functions providing easy access to the HTTP Request and Response object as well database access to
execute SQL or call SQLScript Procedures
In this simple example we can take two numbers as URL Request Parameters and multiply them together and
then return the results as text in the Response Body This is an intentionally basic example so that you can
focus on the API usage
Figure 9 - Simple XSJS Service
However the power of XSJS services comes from the ability to access the database objects but also have full
control over the body output and to further manipulate the result set after selection In this example we use
XSJS to create a text-tab delimited output in order to support a download to Excel from a user interface
function downloadExcel() var body = var query = SELECT TOP 25000 PurchaseOrderId PartnerId to_nvarchar(CompanyName) LoginName_1 CreatedAt GrossAmount FROM _SYS_BICtechedepmdbPO_HEADER_EXTENDED order by PurchaseOrderId $tracedebug(query) var conn = $dbgetConnection() var pstmt = connprepareStatement(query) var rs = pstmtexecuteQuery() body = Purchase Order Id tPartner Id tCompany Name tEmployee Responsible tCreated At tGross Amount n while(rsnext()) body += rsgetString(1)+ t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetTimestamp(5)+t+rsgetDecimal(6)+n $responsesetBody(body) $responsecontentType = applicationvndms-excel charset=utf-16le $responseheadersset(Content-Dispositionattachment filename=Excelxls) $responseheadersset(access-control-allow-origin) $responsestatus = $nethttpOK
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010011
ClosingThis blog hopefully has served to give you a small introduction to many of the new concepts and possibilities
with SAP HANA SP5 and SAP HANA Extended Application Services
Over the coming weeks we will be posting additional blogs with more advanced examples and techniques as
well how to integrate SAP HANA Extended Application Services content into additional environments Likewise
there is a substantial Developerrsquos Guide which expands on many of the concepts introduced here
It is also important to note that while SAP HANA Extended Application Services ships asproductive software (meaning customers can go live in production with it) in SAP HANA SP5 it isa controlled release initially with a special ldquoProject Solutionrdquo program in place around this newfunctionality Please refer to Service Note 1779803 for additional details on the current statusof the Project Solution This Project Solution approach is designed to provide the highest levelsof support possible to initial customers and partners who choose to develop using SAP HANAExtended Application Services It also provides a channel for feedback to Product Managementand development so that we take suggestions and ideas and quickly integrate them into futurerevisions of SAP HANA and SAP HANA Extended Application Services103803 Views Tags sapmentor hana developer code database in_memory sap_mentor hana_devcentersap_hana sapui5 hana_studio xs hde xsjs xsodata
Glen OoiDec 23 2014 345 PM
Hi Thomas
In need of your expert advice
I have a situation where I am using BO Dashboards to create my Dashboard which is consuming the data from
HANA
I have a requirement to allow the user to comment in the dashboard and it will write back to the HANA DB and
also display the comments in the Dashboard
In order for the BO Dashboard to write back to HANA DB is via web services
Is there any way i can create a WSDL URL and consume the XSJS or ODATA services in HANA
Muhammad SadiqDec 10 2014 140 PM
I need your help in writing an API(XSJS service) which will take JSON format data and inserted into HANA
database
Tarasankar Banerjee in response to Thomas Jung on page 14Nov 5 2014 852 AM
Thanks Thomas Could you give an example of how to redirect
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010012
Im facing a strange issue while trying to import weather data from several cities together The issue appears to
be connected with the content of the response object
Following is the code of the Weatherxsjs file
try
var cmd = $requestparametersget(cmd)
var body
var response
var obj
var propertyName
if(cmd === import)
var dest = $nethttpreadDestination(rootworkTara02XSTest01XSHttpTest01 weather)
var client = new $nethttpClient()
var req = new $webWebRequest($nethttpGET group
id=12750041264527127733312732941275339ampunits=metric)
clientrequest(req dest)
response = clientgetResponse()
$responsecontentType = textplain
if(responsebody)
body = responsebodyasString()
obj = JSONparse(body)
body = cmd + n n + responsestatus + n n + responsecontentType
+ n n + responsebody + n n + objgetOwnPropertyNames()
$responsesetBody(body)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010013
$responsestatus = $nethttpOK
catch(e)
$responsecontentType = textplain
$responsesetBody(emessage)
$responsestatus = $nethttpINTERNAL_SERVER_ERROR
Following is the weatherxshttpdest
host = apiopenweathermaporg
port = 80
description = my weather checker
useSSL = false
pathPrefix = data25
authType = none
useProxy = true
proxyHost = ltproxy_detailsgt
proxyPort = ltproxy_port
timeout = 0
On accessing httplthostnamegt8000rootworkTara02XSTest01XSHttpTest01Weatherxsjs
ampcmd=import I am receiving the error message BodyasString unsupported charset specified in
Content-Type header (utf8)
If the body = responsebodyasString() statement is commented out I receive the error message
JSONparse unexpected character because the responsebodyasString() itself could not work correctly
However the URL httpapiopenweathermaporgdata25group
id=12750041264527127733312732941275339 returns data correctly
I am using the same URL in my code
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010014
Could you please advise regarding this issue Thanks for your help
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 14Nov 4 2014 319 PM
gtIs it possible to read files using XS For example some configuration file kept in the server
No there is no API to read from the file system of the underlying operating system You can read the HANA
configuration ini files however because they are exposed via SQL
gtIs it possible to call a html file from the xsjs file Something likerequestgetRequestDispatcher()forward() from
JAVA servlets
In the body of the response you send back to the client your could issue a redirect
Tarasankar Banerjee in response to Tarasankar Banerjee on page 15Nov 4 2014 1034 AM
Hi Thomas
Finally got my application running It is now fetching weather data from external sites
Have two more questions
1 Is it possible to read files using XS For example some configuration file kept in the server2 Is it possible to call a html file from the xsjs file Something like
requestgetRequestDispatcher()forward() from JAVA servlets
Thanks
Regards
Tarasankar
Robert WeberNov 3 2014 1136 AM
If someone is having difficulties with the alert log full on the xsengine
you can do the same trick as for the statisticserver in oder to reset the log area see details in OSS Notes
2019148 and 1950221
The commands are then
select VOLUME_ID from m_volumes where service_name = xsengine
ALTER SYSTEM ALTER CONFIGURATION (daemonini host lthostnamegt) UNSET
(xsengineinstances) WITH RECONFIGURE
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010015
ALTER SYSTEM ALTER CONFIGURATION (topologyini system) UNSET (hostlthostnamegt xsengine)
WITH RECONFIGURE
ALTER SYSTEM ALTER CONFIGURATION (topologyini system) UNSET (volumes ltvolume_idgt) WITH
RECONFIGURE
ALTER SYSTEM ALTER CONFIGURATION (daemonini host lthostnamegt) SET (xsengineinstances) =
1 WITH RECONFIGURE
Then restart the HANA instance and after that make a full backup (and schedule the regular backup in order to
prevent this situation again)
Hope this will help someone like me -)
Have a nice day
Regards
Robert
Tarasankar Banerjee in response to Tarasankar Banerjee on page 15Nov 3 2014 1031 AM
Update
I tried to access the XS Admin console from another user and faced only the No valid Crypto error However
could still update the proxy user details and the sample application successfully ran at last The relevant roles
were provided in Granted Roles not Application Privileges Probably that was the issue earlier
I would check again with new Http Destination and Server side Java Script
Thanks a lot Thomas for all your help
Regards
Tarasankar
Tarasankar Banerjee in response to Thomas Jung on page 18Nov 3 2014 929 AM
Hi Thomas
I also tried to use the sample code from section 841 Tutorial Use the XSJS Outbound API of the HANA
Developer Guide with minor modifications (for package structure proxy settings etc) This time the destination
was found The new project structure with the sample files yahooxshttpdest and sapStockxsjs is as below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010016
However it did not bring any data The content of the response object indicated that there was Proxy
authentication issue
When I tried to check the Destination in the XS Admin Console surprisingly none of the fields are populated
and everything (except the Trust Store drop down) is disabled All these fields are supposed to be populated
as indicated in the Modeling Guide
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010017
However the User already has the following privileges
The same scenario was present for the Http Destination I prepared earlier There are couple of internal errors
at the bottom On clicking them the following list is displayed
1 Internal Error dbError(ConnectionprepareStatement) 258 - insufficient privilege Not authorized at
ptimequerycheckerquery_checkcc24182 No valid SAP Crypto configuration
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010018
It appears from various blogs that the second error (No valid SAP Crypto configuration) is related to SSL
configuration in HANA I would contact the HANA Administrator to look into this issue Of course it would be
great if you could provide some insight
However I have no clue regarding the first error Request your help and cooperation in this regard
The initial issue of not finding the HttpDestination which I created still persists
Thanks for all your help
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 18Oct 31 2014 342 PM
First of all you would never use the workspace name It isnt ever part of anything It is only the package
structure that counts The first item in your list is the only one with the correct package Off hand it looks right to
me You are supposed to supply the full package path Have you configured this HTTP Destination in the XS
Admin tool yet
Tarasankar Banerjee in response to Thomas Jung on page 18Oct 31 2014 326 PM
Updated it Thanks
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 18Oct 31 2014 313 PM
Your comment got cut off We never really get to see what your problem is
Tarasankar Banerjee in response to Thomas Jung on page 21Oct 31 2014 256 PM
Thanks Thomas
I am facing as issue while trying to use an HTTP Destination I understand that the xshttpdest and xsjs file
need to in the same folder Following is the structure of my test project
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010019
As you can see the HTTP Destination and the XSJS files are in the same folder services The workspace
name is XS_Workspace and the package structure is as follows
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010020
Now I am trying to read this destination
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010021
When I am using full package structure destination_package =
rootworkTara02XSTest01XSHttpTest01services I am receiving the
error message httpreadDestination destination not found (package
rootworkTara02XSTest01XSHttpTest01services name XSHttpDest01)
On using the workspace name destination_package = XS_Workspaceservices I am receiving the
error message User is not authorized to use destination (package XS_Workspaceservices name
XSHttpDest01)
On using destination_package = rootworkTara02XSTest01services also I am receiving the error
message User is not authorized to use destination (package rootworkTara02XSTest01services
name XSHttpDest01) Strangely the services folder is not directly under XSTest01
Lastly I deliberately gave a wrong service name destination_package = XS_Workspaceservices and
destination_name = XSHttpDest02 But even then I received the error message User is not authorized to
use destination (package XS_Workspaceservices name XSHttpDest02) not that the destination is not
found
Could you please help me to resolve this issue
Thanks a lot for your helps
Regards
Tarasankar
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010022
Thomas Jung in response to Tarasankar Banerjee on page 22Oct 30 2014 152 PM
Since SPS06 its possible to use outbound HTTP destinations and to call out to external services using XSJS
Thomas Jung in response to Tarasankar Banerjee on page 22Oct 30 2014 150 PM
gtSo when the program runs in server would it automatically consider the OS user credentials
No It doesnt automatically use anything You have to specific the user and password that you want to use for
the proxy Although many proxy servers dont require a username and password
Tarasankar Banerjee in response to Thomas Jung on page 23Oct 30 2014 707 AM
Hi Thomas
Just watched the video you shared above Thanks a lot for it It is really informative and helpful
Regards
Tarasankar
Tarasankar Banerjee in response to Tarasankar Banerjee on page 22Oct 30 2014 346 AM
Got answer for the second point SAP HANA XS Administration Tool is the place to configure Proxy settings
Regards
Tarasankar
Tarasankar Banerjee in response to Tarasankar Banerjee on page 22Oct 29 2014 314 PM
Dear Thomas
another question is that does the proxy settings in the HttpDestination refer to the OS user of the HANA
server We specify useProxy as true and authType as basic in the HttpDestination but not maintain any
user credentials So when the program runs in server would it automatically consider the OS user credentials
Thanks
Regards
Tarasankar
Tarasankar Banerjee in response to Thomas Jung on page 23Oct 29 2014 132 PM
Thanks Thomas I am currently checking this option only
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010023
My current requirement is to fetch Weather Data and Social Media data from various OData services and store
them in HANA for further analysis What might be the best way for this I am currently checking the option of
creating an XS application which would connect to the external services fetch the data and save that in HANA
using DB Connection Is this the best way Or should we try to use JAVA or some other way
Your valuable suggestions are most welcome Thanks
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 23Oct 29 2014 1256 PM
gtHowever is it possible to consume XSODATA service from XSJS instead of using DB Connection
You can via an outbound HTTP destination although I certainly wouldnt recommend it It would be rather
complex and not well performing
gtAlso is it possible to consume data from external OData services for weather data social media data etc from
XSJS
Sure with the same Outbound HTTP Connectivity
httpswwwyoutubecomwatchv=fWirvj9l7eY
Maintaining HTTP Destinations - SAP HANA Developer Guide - SAP Library
Tarasankar BanerjeeOct 29 2014 1119 AM
Dear Thomas
Thanks for the great blog
I am able to connect to Database and execute queries from XSJS service However is it possible to consume
XSODATA service from XSJS instead of using DB Connection
Also is it possible to consume data from external OData services for weather data social media data etc from
XSJS
If possible it would be great if you could provide some code sample or guidelines
Thanks
Regards
Tarasankar
Thomas Jung in response to Weiping Lu on page 24Sep 25 2014 833 AM
Please refer to service note 1849775
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010024
httpservicesapcomsapsupportnotes1849775
I believe it will address your issue
Weiping LuSep 24 2014 519 PM
Hi Tom
Great post and videos I have a tough issue calling a HANA procedure from XS takes gt 5min but from HANA
studio lt 1 min Were using Amazon AWS rev 70 and 73 Any help will be greatly appreciated
Thanks
WPL
Thomas Jung in response to Su Srikanth on page 24Aug 11 2014 253 PM
You transport XSODATA services like you would any other repository content - via a Delivery Unit
Su SrikanthAug 11 2014 750 AM
Hi Thomas
Great blog
Ive a query here - we create the odata services(andor URLs created to view in the web browser) in
development environment now if we have to transport it to the quality andor production environment how
can we do this - is the same as importexport or is there any specific way to do please help with any useful
pointers
Many thanks as always
Su
Thomas Jung in response to ARSHAD SHAIKH on page 24May 15 2014 231 PM
Ive never written any blogs on calculation views I dont cover that topic That is why I suggested you ask your
question in the proper SCN forum
Although looking at your your above SQL Statement I dont see why you couldnt do this directly in XSODATA
off of the table STATUS without the need for the calculation view or the SQLScript Procedure
ARSHAD SHAIKH in response to Thomas Jung on page 25May 15 2014 1154 AM
Hello Thomas
I am new to hana Please suggest me the blogs of you related to calculation view that calling
procedures(procedures have out parameter)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010025
I am trying to fetch the result of procedure in calc view and want to create odata service for that calculation
view
procedure code goes like this
---------------------------------------
CREATE PROCEDURE TWEETS_TODAY(OUT OP BIGINT)
language SQLSCRIPT sql security invoker default schema SOCIAL360 reads sql data as
BEGIN
SELECT COUNT() INTO OP FROM SOCIAL360STATUS WHERE CREATED_AT = CURRENT_DATE
END
calc view code goes like this
----------------------------------------
Begin Procedure Script
BEGIN
DECLARE OP BIGINT
CALL SOCIAL360TWEETS_TODAY(OPvar_out)
END End Procedure Script
Thanks
-Arshad
Thomas Jung in response to ARSHAD SHAIKH on page 25May 15 2014 944 AM
Your question seems to have no relation to the content in this blog Please consider instead asking general
HANA questions in the appropriate SCN Forum
ARSHAD SHAIKHMay 15 2014 917 AM
Hi Thomas
I want to call procedures in calculation view (procedures have out parameter)
Please suggest me step by step procedure with example and supporting documents
Thanks
ARSHAD SHAIKH
Henrique Pinto in response to Blair Krotenko on page 26Apr 16 2014 711 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010026
Hmm not really sure of that I see it but that might be because Im an employee
But the NET development partner I was working with was not enrolled in any kind of beta testing program and
they were able to download it so I guess you should as well
Make sure to go in the Installation and Upgrades menu and not the Support Packages and Patches
Go to httpservicesapcomswdc -gt Installations and Upgrades -gt Browse our Download Catalog -gt SAP In-
Memory (SAP HANA) -gt SAP HANA ADONET 10
Best regards
Henrique
Blair Krotenko in response to Henrique Pinto on page 26Apr 16 2014 656 PM
Thanks for the info Henrique but I cant find it I dont know if it is an authorization issue or do we need to be a
ramp-up customer to dl and use a beta product
Thanks
Blair
Henrique Pinto in response to Thomas Jung on page 27Apr 16 2014 614 PM
The ADONET provider is available for download in the SAP Service Marketplace (in beta edition so far)
Thomas Jung in response to Kamal Jain on page 26Apr 16 2014 514 PM
For general OData structure and syntax I find that the Odataorg website is very helpful For example on this
topic
httpwwwodataorgdocumentationodata-version-2-0uri-conventions
The syntax of a $expand query option is a comma-separated list of Navigation Properties Additionally each
Navigation Property can be followed by a forward slash and another Navigation Property to enable identifying a
multi-level relationship
The page also has some sample URLs
Kamal JainApr 16 2014 536 AM
Dear Thomas
I agree that we need to pass all the associations in the expand I tried with some of options but was not
through
Now i just tried with below syntax and able to achive Thx
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010027
httpdewdftzld025pgdevsapcorp8000DTHCPXSZPMIS_PRO_ACTUALxsodata
ZPROHEADER(PR07_000002)$expand=ZACTUZEMPD
Regards
Kamal Jain
Thomas Jung in response to Blair Krotenko on page 27Apr 15 2014 623 PM
We do plan to release an ADONET provider specific to HANA in the near future This would probably be the
best option for consumption from NET Until then I would think that ODBC is probably the next best option It
gives you generally easy portability from already existing database code You could consume OData as well
although that is more generally consumed from the UI layer itself It guess it somewhat depends upon where
you are calling the service from in your NET application
Blair KrotenkoApr 15 2014 409 PM
Hi Thomas
We are looking at consuming HANA data in a NET application and from what I can see there are 2 options -
OData and ODBC It seems to me that OData might be the better option when consuming HANA data in an XS
application while ODBC might be the better option for NET What are your thoughts Is there a paper on this
subject I havent been able to find a comparison document for this Are there any security caveats to be aware
of for these options
Thanks
Blair
Thomas Jung in response to Kamal Jain on page 27Apr 15 2014 136 PM
You have to list both associations in the expand on the URL if you want both relationships to be processed
Kamal JainApr 15 2014 1249 PM
Hi Thomas
Thx for valuable and useful information
I have an query regarding XS Odata service creation for more than 2 tables and get all the data in one
command
There is req in which service needs to be created for 3 tables to get data from all these
First table has Project ID as key second table has composite
ProjectID and Employee Id as key and third table has Employee id as
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010028
key
So if I create navigation for first 2 tables based on project id and use expand comand than its working fine and I
can see data of both the tables
Further if I add navigation for third table also as below then below expand is displaying data for first two tables
only Pls share how to use expand command in this case if possible to get all tables data based on project id
How to use navigation ZEMPD here
httpdewdftzld025pgdevsapcorp8000DTHCPXSZPMIS_PRO_ACTUALxsodata
ZPROHEADER(PR07_000002)$expand=ZACTUamp
service namespace
DTHCPXS
DTHCPDTHCPDBHCP_PROJECT_HEADER
as ZPROHEADER
navigates (PROJECT as
ZACTU)
DTHCPDTHCPDBHCPT_ZPMIS_ACTUAL
as ZACTU
navigates (EMPLOYEE as
ZEMPD )
DTHCPDTHCPDBHCP_ZPMIS_RES_MASTER
as ZEMPD
association PROJECT principal
ZPROHEADER(PROJECTID)
multiplicity 1 dependent
ZACTU(PROJECTID) multiplicity
association EMPLOYEE principal
ZACTU(EMPLOYEEID)
multiplicity 1 dependent
ZEMPD(EMPLOYEEID) multiplicity
1
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010029
Pls suggest if there is anything to add or correct in XS odata service syntax above
Regards
Kamal Jain
Vikas Madaan in response to Thomas Jung on page 29Apr 14 2014 458 PM
Thanks Thomas
Under which component
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 29Apr 14 2014 450 PM
No this isnt a known issue Ive seen Nor can I recreate the problem in my system No you cant maintain the
authentication in XSHTTPDEST itself It intentionally must be set in XSADMIN tool I can really only suggest
that you open a support ticket
Vikas MadaanApr 14 2014 431 PM
Hi Thomas
I am trying to pull data from SAP system onto HANA Database using XSJOB files I am calling RFC enabled
function modules over HTTP request It helps me replicating the real time ECC data onto HANA as well with
back ground jobs
I am facing one problem in the XSHTTPDEST file I am able to create and activate the file using studio and this
file is even visible in the web based XS administration tool But in the web based tool when i provide user and
password for basic authotication then system just clears the user id and password when i try to save This the
reason our HTTP requests are getting failed and below is the response we are getting in the response body
lthtmlgtltheadgtlttitlegtLogon Error Messagelttitlegt
Is this known issue or we are missing something Is it possible to provide user and password in the
XSHTTPDEST file Is there any particular syntax
I checked and i have the required authorizations as well develper Guide
Please help
Regards
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010030
Vikas Madaan
Abdul HakimFeb 22 2014 359 AM
Hi Thomas - Any recommended book or resource to learn and master Server Side Javascript There were
many books available in the market but as a beginner need to know the right resource book to start with and
master this stuffAlso whether SAP plan to conduct any training to teach Server Side Javascript similar to other
standard training offerings
Thanks
Hakim
Samuel Tanor-GyeduFeb 20 2014 839 AM
Thanks Thomas
I will definitely have a look at SHINE
Thomas Jung in response to gentilini andre on page 30Feb 19 2014 422 PM
Difficult to say what is wrong I several things which are different than our sample that does this You are using
a POST for instance instead of a GET However if you are gettting a 200 then I assume the service call is
correct In client side tools (like Chrome Developer Tools) you should be able to see the response object from
the call
However what I would really recommend is that you study the SHINE content (SAP HANA Interactive
Education) There is already a sample application which does this in SHINE Also it has some special
JavaScript in the UI to handle the file attachment via AXAJ call Perhaps that is the part you are missing
You can read more about SHINE here It is also included already installed in the latest version of the HANA
Developer Center trial image (SP7 based)
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
gentilini andreFeb 19 2014 325 PM
Hi Thomas
well I followed your hints but it still donacutet work
I created a xsjs File like below
function downloadExcel()
try
var body =
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010031
alert(drin)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
alert(drusse)
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount
tTax Amount tNetto Amount tCurrency n
while(rsnext())
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
catch (e)
alert(db conn funktioniert nicht)
var a = $requestparametersget(cmd)
$responsesetBody(Invalid Command +a)
switch (a)
case doex
$responsesetBody(Invalid Command +a)
alert(filedownload)
thisdownloadExcel()
break
default
$responsestatus = $nethttpINTERNAL_SERVER_ERROR
$responsesetBody(Invalid Command +a)
The Controllerjs File
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010032
doFileDownload function (oEvent)
jQuerysaprequire(sapuicommonsMessageBox)
sapuicommonsMessageBoxshow(Export Starten sapuicommonsMessageBoxIconconfirm
Information)
sapuicommonsMessageBoxconfirm(Export starteninform Confirmation)
return false
function inform(rValue)
alert (drinnnnne)
var aurl = FileDownloadxsjscmd=doex
if(rValue) If User presses Ok
alert(aurl)
jQueryajax(
url aurl
method POST
dataType json
datacmddoex
success sapuicommonsMessageBoxalert(Export wird ausgefuumlhrtConfirmation)
errorfunction onErrorCall(jqXHR textStatus errorThrown)
alert(jqXHRstatus)
sapuicommonsMessageBoxshow(jqXHRstatus
ERROR
Error in calling Service )
return
complete sapuicommonsMessageBoxalert(Export Erfolgreich
abgeschlossenConfirmation)
)
return false
else If the user presses Cancel
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010033
sapuicommonsMessageBoxalert(Vorgang abgebrochenNotification)
)
at last but not least the view
sapuijsview(zag1_ui_cv_03Index
Specifies the Controller belonging to this View
In the case that it is not implemented or that null is returned this View does not have a Controller
memberOf zag1_ui_cv_03Index
getControllerName function()
return zag1_ui_cv_03Index
Is initially called once after the Controller has been instantiated It is the place where the UI is
constructed
Since the Controller is given to this method its event handlers can be attached right away
memberOf zag1_ui_cv_03Index
createContent function(oController)
create a lite button with an icon and a text
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010034
lite true
)placeAt(btn)
oButton3attachPress(oControllerdoFileDownload)
var oButton4 = new sapuicommonsButton(
text Refresh
icon imagesrefreshjpg
lite true
press function() var data = oTableval()
if(data == )
alert(no data found)
return
print(content)
print(DatArray)
if (data = )
alert(Funzt)
JSONToCSVConvertor(data CUSTOMER AMOUNT true)
)placeAt(btn)
jQuerysaprequire(sapuitableTable)
create table control with properties
var oTable = new sapuitableTable(
width 100
rowHeight 50
title Amount per Partner
selectionMode sapuitableSelectionModeNone
)
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Company Name
)
template new sapuicommonsTextView(
text CompanyName
)
sortProperty CompanyName
))
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010035
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Partner ID
)
template new sapuicommonsTextView(
text PartnerId
)
sortProperty PartnerId
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Postal Code
textAlign sapuicoreTextAlignEnd
)
template new sapuicommonsTextView(
text PostalCode
textAlign sapuicoreTextAlignEnd
)
sortProperty PostalCode
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text City
)
template new sapuicommonsTextView(
text City
)
sortProperty City
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Purchase ID
)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010036
template new sapuicommonsTextView(
text PurchaseOrderId
)
sortProperty Currency
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Lifecycle Status
)
template new sapuicommonsTextView(
text LifecycleStatus
)
sortProperty LifecycleStatus
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Gross Amount
)
template new sapuicommonsTextView(
text GrossAmount
)
sortProperty GrossAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Tax Amount
)
template new sapuicommonsTextView(
text TaxAmount
)
sortProperty TaxAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Amount Netto
)
template new sapuicommonsTextView(
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010037
text CM_NET_Amount_001
)
sortProperty CM_NET_Amount_001
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Currency
)
template new sapuicommonsTextView(
text Currency
)
sortProperty Currency
))
var oModel = new sapuimodelodataODataModel
(httpqperiorvmcldsr8000ZAG1_WS_001ZAG1_CV_001xsodata false)
oTablesetModel(oModel)
oTablebindRows(Amount)
return oTable
)
It wonacutet call the function or better said the action of the button works fine till to the point where it should call the
xsjsfile to generate the excel-file I wondered that in the ajax part the error- success- and complete-part will
be executed at the same time and not only one of this statements The message is 200 (The request has
succeeded The information returned with the response is dependent on the method used in the request)
Maybe you can see where my mistake is or whats going wrong
Iacuteve the developer edition on cloudshare (Hana Studio rev68 Server is on SPS05)
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010038
Andreacute
Thomas Jung in response to Samuel Tanor-Gyedu on page 38Feb 19 2014 523 AM
I dont think I can help you This appears to a question about how odata4j works not about XS I have no
experience with odata4j myself
Samuel Tanor-GyeduFeb 18 2014 913 AM
Hi Thomas
I have an odata service with this endpointhttpss5hanaxshanatrialondemandcomservicesUserxsodata
I am now trying to consume it from eclipse with the odata4j libraries
This is how I get the endpoint
public UserServiceOdata(String endpointUri)
thisendpointUri = endpointUri
ODataConsumerdumpresponseHeaders(true)
consumer = ODataConsumerscreate(endpointUri)
This is my method to add a user
public User addUser(User user)
consumercreateEntity(entitySet)properties(OPropertiesint32(propertyUserId
usergetId()))properties(OPropertiesstring(propertyUserName
usergetName()))properties(OPropertiesstring(propertyUserEmail usergetEmail()))execute()
return user
When I call addUser method I get an Error
Caused by javaxxmlstreamXMLStreamException ParseError at [rowcol][78253]
Message The reference to entity sourceUrl must end with the delimiter
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010039
When I use this endpoint httpss5hanaxshanatrialondemandcomservicesUsersvc everything works fine
With the httpss5hanaxshanatrialondemandcomservicesUserxsodata I get errors
Please I would be very grateful for assistance
Thanks in advance
Regards
Samuel
Thomas Jung in response to gentilini andre on page 39Feb 18 2014 431 AM
You have a fundamental misunderstanding here You are placing server side JavaScript code in your client
side UI5 application The function downloadExcel is something you need to execute on the server It needs to
be in an XSJS file and it is called from the client side via AJAX - as a REST service not as a local function
gentilini andreFeb 17 2014 451 PM
Hello Thomas
Thank you for this great How-To Guide
Iacutem pretty new in SAPUI5 and tried your export-sample in my little trial project but it doesnacutet work
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010040
My Button for this looks like
ltcodegt
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
lite true
press function() alert(oButton3getText())
downloadExcel()
ltcodegt
and the function for this action looks like
ltcodegt
function downloadExcel()
var body =
alert(drin)
print($query)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount tTax
Amount tNetto Amount tCurrency n
while(rsnext())
if(rsnext() == )
alert($responsesetBody( Failed to retrieve data ))
alert($responsestatus = $nethttpINTERNAL_SERVER_ERROR)
else
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010041
ltcodegt
Iacutem afraid and hope that you can help me
Kind regards
Andreacute
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1246 PM
gtIs there any restriction or development limitation in the XSJSLIB files
Thats a very general question Difficult to answer without any context
Vikas Madaan in response to Thomas Jung on page 41Feb 11 2014 1245 PM
Thanks Thomas
I think we are on same page
Once quick question that came to my mind Is there any restriction or development limitation in the XSJSLIB
files
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1230 PM
gtCould please help me in understanding in more advantagesdisadvantages for both techniques
Youve summarized it pretty well already
gtbecuase i dont want to use both the approaches
Even with the CRUD support and exits in XSODATA its still pretty hard to do 100 via XSODATA There are
still valid use cases for XSJS when you need custom body custom read processing job scheduling etc Its
good to try and use XSODATA whenever possible but I wouldnt automatically exclude the use of XSJS
Vikas MadaanFeb 11 2014 1008 AM
Hi Thomas
Thanks a lot for sharing useful information through various blogs
In my current project we are evaluating use of XSOData or XSJS applications I saw your videos like the one
mentioned below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010042
httpwwwsaphanacomdocsDOC-4376
Want i understood from various blog is this
From SP7 we can write exsits in the OData services and it is very easy to consume at the client side just like
any REST base service and from my understanding it is Scalable as well I would love to use XSOData always
becuase development effort is very less compare to XSJS and it is very easy to rampup the team on OData
related development objects
XSJS were as provide more control becuase of server side scripting becuase it allows development on the
server side using JavaScript Core APIs of SAP HANA Extended Application Services are therefore exposed
as JavaScript functions providing easy access to the HTTP Request and Response object as well database
access to execute SQL or call SQLScript Procedures It provide us control over the body format and and URL
parameter definition
Could please help me in understanding in more advantagesdisadvantages for both techniques
I am very keen to understand and also explain the same to team members becuase i dont want to use both the
approaches and even sometimes customer can also ask the same to us
Also If we are on SP6 then from my understanding XSJS provides us more capability in terms of complex
application Corrent me If i am wrong
Thanks
Regards
Vikas Madaan
Thomas Jung in response to Raghuveer Phull on page 42Feb 5 2014 312 PM
Yes there are videos on the CRUD features of XSODATA which were new in SP6
For more on CRUD support in SP6 see this video
oData CreateUpdateDelete Support in SAP HANA SPS6
For the extended support for XSJS exits in SP7 see this video
SAP HANA SPS 07 XSODATA Exits in XSJS
Raghuveer PhullFeb 5 2014 122 AM
Do you have an exampledocumentationvideo where you can write a service which will populate Hana DB
What I am asking for is a way for my external script to populate the DB tables i have created in Hana DB
Thomas Jung in response to reda miraoui on page 43Jan 29 2014 411 PM
The source code for the examples shown here are shipped as part of SHINE (SAP HANA Interactive
Education)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010043
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Vivek Singh Bhoj in response to reda miraoui on page 43Jan 29 2014 352 PM
Hi Reda
You can import Shine Content in HANA and then check all these source codes
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Regards
Vivek
reda miraoui in response to Thomas Jung on page Jan 29 2014 344 PM
Hey Thomas
Is it possible to download source code of your project from this HANA tutorial
Thanks
Reda
Thomas Jung in response to Abdul Hakim on page 43Nov 21 2013 1133 PM
Yes River can be used as an alternative and when activated it will generate Server Side JavaScript andor
SQLScript
Abdul Hakim in response to Thomas Jung on page 44Nov 21 2013 747 PM
Hi Thomas - Was going through blog regarding River (RDL)Just a question on this
When you say Programming language for HANA native development is Server side Javascript SQL SQL
ScriptOnce RDL is rolled out whether RDL can be used for native application development instead of Server
side Java script SQL SQL Script I am very much new to this stuff so appreciate if you can also help on
how to get started with Server Side Java script SQL SQL Script for HANA
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 30 2013 750 AM
Hi Thomas
Thanks for your response I am talking about more content on shine
thanks
Ashutosh
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010044
Baskar Gopalakrishnan in response to Thomas Jung on page 44Oct 30 2013 1249 AM
Hi Thomas
Im a SAP PI Middleware consultantSAP topic leader in XIPI heavily worked on Java related
Netweaver stack I have knowledge in ABAP but not worked heavily in abap I have enrolled your sap hana
native application development course I feel very interesting I did work heavily in java and javascript projects
using eclipse development tool Do you think if I invest my time in just native hana development and proceed
in HANA field is a good step I dont have BW experience either
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 819 PM
Thanks for the clarification Much appreciated
Thomas Jung in response to Abdul Hakim on page 44Oct 29 2013 120 PM
gtABAP Close to HANA means whether we can expect a similar 2 tier architecture similar to HANA XS in the
future or what does that mean
No it doesnt mean that ABAP will become a 2 tier architecture We will not move the ABAP VMKernel into
HANA itself It will remain a separate application server At least for the current plansforeseeable future What
he was referring to was bringing the programming models closer For instance the new 740 SP5 feature that
allows you to write SQLScript directly within an ABAP class method
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 650 AM
Thomas - Thanks for the clarificationMuch appreciatedI was listening to ABAP on HANA session by
Thorsten Schneider this year Teched and he was mentioning that SAP Plans to bring ABAP very close to
HANA in the coming future but not much details have been discussed in the sessionABAP Close to HANA
means whether we can expect a similar 2 tier architecture similar to HANA XS in the future or what does that
mean
Thanks
Hakim
Thomas Jung in response to Abdul Hakim on page 45Oct 28 2013 703 PM
gt whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the option is
recommended by SAP then kindly share the pros and cons of each of the item
Taken from the TechEd CD103 session slides
Guidance
bulluse ABAP for optimization of existing progams (in context of SAP Business Suite or BW)
bullconsider HANA Native Development for development of new applications which will solely run on SAP HANA
bullcombine ABAP and HANA Native Development to enrich existing applications (eg SAP HANA Live Fiori)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010045
ABAP
bullapplications follow 3-tier architecture
bullABAP is in general database agnostic but with release 74 optimized for SAP HANA
bullProgramming language ABAP ABAP OO with the option to use SAP HANA features
bullIDE eclipse-based ABAP Development Tools
HANA Native Development
bullapplications follow 2-tier architecture
bullHANA Native Development is SAP HANA specific and embedded in the database
bullProgramming language River server-side JavaScript SQLSQLScript
bullIDE eclipse-based SAP HANA Studio + web IDE
Thomas Jung in response to ashutosh dixit on page 45Oct 28 2013 701 PM
gtIs there any more demos for the SHINE
Im not exactly sure what you mean by that We are building additional content for SHINE that will be delivered
in SP7
Abdul HakimOct 28 2013 326 PM
Thomas - Let us say a customer is running SAP Netweaver 74 ABAP with HANA DB and they have HANA
extended service as wellIf the customer wants to do new developments then what is the recommendation
from SAP ie whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the
option is recommended by SAP then kindly share the pros and cons of each of the item (SAP Netweaver 74
ABAP Vs SAP HANA XS)
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 28 2013 221 PM
Hi Thomas
Thanks a lot for your its working now
Is there any more demos for the SHINE
Thanks
Ashutosh
Thomas Jung in response to ashutosh dixit on page 46Oct 25 2013 809 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010046
As this content is now standard in SP6 as part of SHINE (SAP HANA INteractive Education) there also some
setup instructions on helpsapcom
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Basic points to check - have you generated the synonyms in the data generator Ran the data generator to
create some data Have the role assigned Added client 001 to your user profile
ashutosh dixitOct 24 2013 130 PM
Hi Thomas
Amazing blog - once again Thomas thanks
I have been following you for many days attended your OPEN SAP course also
That was an amazing course for new learner like me
One of our client is looking forward for XS based search Application identical to what you have created in your
DEMO
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010047
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010048
But I am not able to fetch the data on blank HTML page is coming with no data
If there is any step by step document related to this please help in getting that
Any help will be highly appreciated
Thanks
Ashutosh
Naveen KumarSep 26 2013 1130 AM
Good Document
Heber FabianoAug 27 2013 323 PM
Great content as always Keep sharing with us
Thomas Jung in response to Orel Stringa on page 48Aug 27 2013 147 PM
This is currently not possible The CORS support is for all origins We dont yet have the feature to maintain a
whitelist of CORS origins
Orel Stringa in response to Thomas Jung on page Aug 27 2013 801 AM
Hi Thomas
nice to see that SAP has made it possible with SP6 to specify cross origin resource sharing (CORS) support
via the xsaccess file SP6 HANA development guide has example of how to specify CORS support
I have build an XS application and would like to serve SAPUI5 on a diffhost than XSHANA
How can I specify that I would like to allow cross origin access restricted to certain domain(s) only
Is there a special keyword syntax for specifying that
Thank yoi
Orel
Vijay UthayakumarAug 27 2013 131 AM
Highly informative amp digestible Fantastic work
Jerry WangAug 1 2013 955 AM
Hi Tomas
Thank you
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010049
Jerry
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 644 PM
JSLint checks are very strict and often produce syntax errors for items that just stylistic and wont actually
cause an error upon activation or runtime You can either ignore the JSLint errors or deactivate JSLint for this
project in these cases However it might also be an indication that the JavaScript code you are trying to import
isnt compatible with Strict mode
httpsdevelopermozillaorgen-USdocsWebJavaScriptReferenceFunctions_and_function_scope
Strict_mode
Milan Vrozina in response to Thomas Jung on page 49Jul 21 2013 624 PM
Thanks for clarification I thought there would be some kind of import
But anyway in case of this specific library I have some problems with JSLint validation when I do cut and paste
of the original code
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 343 PM
What kind of problem are you having using this library Strict mode JavaScript which doesnt try to access the
DOM Window or other client side specific objects should work in Server Side XSJS Generally if you have a
library you just cut and paste into your XSJS or an XSJSLIB file and then call the functions from your code
Milan VrozinaJul 21 2013 339 PM
Hello
first and foremost thank you for perfect openSAP classes related to HANA development and for this blog as
well
I have one question related to server-side javascript You mentioned in course that is possible to use 3rd party
libraries or reuse 3rd party code But I cant find a possible way how to import 3rd party javascript library -as
is- to server and use it For example I would like to use JSZip library to zip some file before sending it to client
from xsjs application Is that possible Thank you
Chandrashekhar MahajanJul 3 2013 734 PM
This is excellent blog Now HANA XS is very much clear to me
Mohan krishnaJul 1 2013 144 PM
WOW - great blog Thomas This will be very helpful in understanding SAP hana Good Job
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010050
Abdul Hakim in response to Thomas Jung on page 50Jun 27 2013 833 PM
Thanks for the clarification
Thomas Jung in response to Abdul Hakim on page 50Jun 27 2013 659 PM
HANA Extended Application Services uses SQLScript and JavaScript as its two primary programming
languages
gtwhether the current SAP Business suite based on ABAP will be completely migrated to HANA service
No The Business Suite already runs on HANA but still via the ABAP application server It will continue to
leverage HANA via a combination of enhancements to ABAP and utilizing some of the technologies described
in this blog
gtAlso whether ABAP can be used to built application in HANA extended services
No There is no ABAP language container in HANA Extended Application Services
Abdul HakimJun 27 2013 405 PM
Hi Thomas - What is the programming language used for HANA Extended application services
As HANA is more than a database ie application platform by itself and as you mentioned that more and more
applications will be built on HANA i have question as how the future SAP ERP system looks likewhether the
current SAP Business suite based on ABAP will be completely migrated to HANA service in the future or SAP
ABAP server will continue to evolve and receive focus investment from SAP Also whether ABAP can be used
to built application in HANA extended services Your thoughts
Thanks
Abdul Hakim
Thomas Jung in response to Ravindra Channe on page 50Jun 11 2013 830 PM
Yes it is still planned However we are still a couple of weeks away and Ive not seen the final installers to say
for certain its there
Ravindra ChanneJun 11 2013 815 PM
Hi Thomas
Thanks for a wonderful and very informative blog Is there any update on 32 bit REGI file
Is it expected along with SPS6
Regards
Ravi
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010051
Thomas Jung in response to Amanda Rzepka on page Jun 7 2013 942 PM
gtCan the XS Services be used in a BW on HANA Scenario
Yes XS is part of ALL HANA systems You should check and make sure you are licensed for direct access to
the underlying HANA instance however
Thomas Jung in response to Holger Schimanski on page Jun 7 2013 941 PM
gtIs there a similar library which could be used in XS Engine
The XSODATA development object is similar We also have higher level frameworks for XMLA and Search
Services (InA) You can expect more such high level frameworks to be added to the HANA Extended
Application Services in the future
Thomas Jung in response to Manav Mehra on page Jun 7 2013 939 PM
Have you used something like the Chrome developer tools to see see if you are getting any client side
javascript errors or to see if the request to your xsodata service is successful
Thomas Jung in response to Christian Hufnagl on page 52Jun 7 2013 938 PM
It will ship as non-automatic content in SPS6 (all systems will have it and it just needs to be imported) The
delivery units are also part of this weeks updates to the Cloudshare and AWS developer center images They
are also available for download as part of the content of the openSAP course
Thomas Jung in response to Matthew Pickell on page 51Jun 7 2013 937 PM
CORS support will come with SPS6 at the end of June
Thomas Jung in response to Jeroen Custers on page 51Jun 7 2013 936 PM
gtWill this bug be fixed in HANA ver 56
Personally Ive still experienced this bug in SPS6 internal builds Must be a tricky one to find Luckily the
workaround of closing and reopening isnt too difficult Just annoying This also probably makes the bug low
priority
Jeroen Custers in response to Vivek Singh Bhoj on page 52Jun 7 2013 411 PM
This issue also occurs on rev56
Matthew PickellJun 7 2013 258 PM
Thomas
Has CORS been included in a release yet
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010052
Vivek Singh Bhoj in response to Chandra Edem on page 52Jun 5 2013 601 AM
Hi Chandra
Date for Week1 Assignment has been extended till June 11
So you can give Week 1 Assignment now
Christian HufnaglJun 4 2013 543 PM
Hi Thomas
thank you for the interesting tutorial
Can you tell me whether it is possible to download the source code of the ldquoPutting it all togetherrdquovideo And if yes Where can I download itThanks
Christoph
Vivek Singh BhojJun 4 2013 1116 AM
Hi Thomas
Thanks for OpenSAP classes
Your Youtube Account also have very good exercises
IN OpenSAP Week 2 Unit 3 tutorial after assigning admin role to my user Id i am not able to see sequences
synonyms triggers under my schema or any other schema i am only able to see Column Views Procedures
Tables and Views
Though now i am able to insert data into my created table
Can you let me know how i will be able to see Sequences under my schema without removing the admin role
I am using HANA revision 52
Got to know from OpenSAP that
This is a known issue and the only way that Ive seen to fix it is to actually close the studio and open it again
then refresh the node
Cheers
Rich Heilman
SAP HANA Product Management
Will this bug be fixed in HANA ver 56
Chandra Edem in response to Thomas Jung on page 53Jun 4 2013 646 AM
Thomas
I registered for OpenSAP course Introduction to Software Development on SAP HANA on June 2 900PM
I didnt know that it is going to end WEEK1 assignment test on 632013 300PM Is there any way can take
that WEEK1 Assignment Test
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010053
Thanks
Chandra
Thomas Jung in response to Alexander Bauer on page Jun 3 2013 856 PM
SAPUI5 gets updated auutomatically when you apply HANA revisions There is no additional download or
update needed
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+01002
Figure 1 - Architectural Paradigm Shift
SAP HANA Studio Becomes a Development WorkbenchIn order to support developers in creating applications and services directly within this new SAP HANA
Extended Application Services SAP has enhanced the SAP HANA Studio to include all the necessary tools
SAP HANA Studio was already based upon Eclipse therefore we were able to extend the Studio via an Eclipse
Team Provider plug-in which sees the SAP HANA Repository as a remote source code repository similar to Git
or Perforce This way all the development resources (everything from HANA Views SQLScript Procedures
Roles Server Side Logic HTML and JavaScript content etc) can have their entire lifecycle managed with
the SAP HANA Database These lifecycle management capabilities include versioning language translation
exportimport and software deliverytransport
The SAP HANA Studio is extended with a new perspective called SAP HANA Development As Figure 2
shows this new perspective combines existing tools (like the Navigator view from the Modeler perspective)
with standard Eclipse tools (such as the Project Explorer) and new tools specifically created for SAP HANA
Extended Application Services development (for example the Server Side JavaScript editor shown in the
figure or the SAP HANA Repository browser) Because SAP HANA Studio is based on Eclipse we can also
integrate other Eclipse based tools into it For example the SAP UI Development Toolkit for HTML5 (SAPUI5)
is also delivered standard in SAP HANA Extended Application Services HANA 10 SP5 comes pre-loaded
with the 18 version of the SAPUI5 runtime and the SAPUI5 development tools are integrated into SAP HANA
Studio and managed by the SAP HANA Repository like all other XS based artifacts Although the SAPUI5
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+01003
development tools are integrated into SAP HANA Studio they are not installed automatically For installation
instructions please see section 101 of the SAP HANA Developers Guide
Figure 2 - SAP HANA Development perspective of the SAP HANA Studio
These extensions to the SAP HANA Studio include developer productivity enhancing features such as project
wizards (Figure 3) resource wizards code completion and syntax highlighting for SAP HANA Extended
Application Services server side APIs integrated debuggers and so much more
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+01004
Figure 3- Project Wizards for XS Based Development
These features also include team management functionality All development work is done based upon
standard Eclipse projects The project files are then stored within the SAP HANA Repository along with all the
other resources From the SAP HANA Repository browser view team members can check out projects which
have already been created and import them directly into their local Eclipse workspace (Figure 4)
After projects have been imported into the local Eclipse workspace developers can work offline on them You
can also allow multiple developers to work on the same resources at the same time Upon commit back to the
SAP HANA Repository any conflicts will be detected and a merge tool will support the developer with the task
of integrating conflicts back into the Repository
The SAP HANA Repository also supports the concept of activeinactive workspace objects This way a
developer can safely commit their work back to the server and store it there without immediately overwriting
the current runtime version It isnt until the developer chooses to activate the Repository object that the new
runtime version is created
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+01005
Figure 4 - Repository Import Project Wizard
For a deeper look at the basic project creation and Repository object management within SAP HANA Studio
please view the following videos on the topic
OData ServicesThere are two main parts of the SAP HANA Extended Application Services programming model The first is
the ability to generate OData REST services from any existing SAP HANA Table or View The process is
quite simple and easy From within an SAP HANA Project create a file with the extension xsodata Within this
service definition document the developer needs only to supply the name of the source tableview an entity
name and if using an SAP HANA View the entity key fields
For example if you want to generate an OData service for an SAP HANA table named techedepmdb
businessPartner in the Schema TECHEDEPM this would be the XSODATA definition file you would create
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+01006
service namespace saphanademocontentepm TECHEDEPMtechedepmdbbusinessPartner as BUYER
Figure 5 - XSODATA Service Definition and Test
Upon activation of this XSODATA file we already have an executable service which is ready to test The
generated service supports standard OData parameters like $metadata for introspection (see Figure 6) $filter
$orderby etc It also supports body formats of ATOMXML and JSON (Figure 7 for an example) Because
OData is an open standard you can read more about the URL parameters and other features at http
wwwodataorg
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+01007
Figure 6 - OData $metadata support
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+01008
Figure 7 - Example OData Server JSON Output
The examples in the above figures demonstrate how easily these services can be tested from the web browser
but of course doesnt represent how end users would interact with the services Although you can use a variety
of 3rd party tools based upon JavaScript like Sencha Sencha Touch JQuery JQuery Mobile and PhoneGap
just to name a few SAP delivers the UI Development Toolkit for HTML5 (SAPUI5) standard in SAP HANA
Extended Application Services A particularly strong feature of SAPUI5 is the integration of OData service
consumption not just at a library level but also with special features within the UI elements for binding to OData
services
For example within SAPUI5 you can declare an OData model object and connect this model object to the URL
of the XSODATA service Next create a Table UI element and connect it to this model object Finally you call
bindRows of the Table UI element object and supply the OData entity name you want to use as the source of
the table
var oModel = new sapuimodelodataODataModel (servicesbuyerxsodata false) oTable = new sapuitableTable(testtableId tableID visibleRowCount 10) oTablesetModel(oModel) oTablebindRows(BUYER)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+01009
This creates an UI Element which has built-in events such as sort filter and paging which automatically call
the corresponding OData Service to fulfill the event No additional client side or server side programming is
necessary to handle such events
Figure 8 - OData Bound Table UI Element
For more details on OData service creation in SAP HANA Extended Application Services and utilizing these
services within SAPUI5 please view these videos
Server Side JavaScriptThe XSODATA services are great because they provide a large amount of functionality with minimal amounts
of development effort However there are a few limitations which come with such a framework approach For
example in SAP HANA SP5 the OData service framework is read only Support for Insert Update and Delete
operations is available with SAP HANA SP6
Luckily there is an option for creating free-form services where you can not only perform update operations but
also have full control over the body format and URL parameter definition SAP HANA Extended Application
Services also allows development on the server side using JavaScript (via project files with the extension
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010010
XSJS) Core APIs of SAP HANA Extended Application Services are therefore exposed as JavaScript
functions providing easy access to the HTTP Request and Response object as well database access to
execute SQL or call SQLScript Procedures
In this simple example we can take two numbers as URL Request Parameters and multiply them together and
then return the results as text in the Response Body This is an intentionally basic example so that you can
focus on the API usage
Figure 9 - Simple XSJS Service
However the power of XSJS services comes from the ability to access the database objects but also have full
control over the body output and to further manipulate the result set after selection In this example we use
XSJS to create a text-tab delimited output in order to support a download to Excel from a user interface
function downloadExcel() var body = var query = SELECT TOP 25000 PurchaseOrderId PartnerId to_nvarchar(CompanyName) LoginName_1 CreatedAt GrossAmount FROM _SYS_BICtechedepmdbPO_HEADER_EXTENDED order by PurchaseOrderId $tracedebug(query) var conn = $dbgetConnection() var pstmt = connprepareStatement(query) var rs = pstmtexecuteQuery() body = Purchase Order Id tPartner Id tCompany Name tEmployee Responsible tCreated At tGross Amount n while(rsnext()) body += rsgetString(1)+ t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetTimestamp(5)+t+rsgetDecimal(6)+n $responsesetBody(body) $responsecontentType = applicationvndms-excel charset=utf-16le $responseheadersset(Content-Dispositionattachment filename=Excelxls) $responseheadersset(access-control-allow-origin) $responsestatus = $nethttpOK
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010011
ClosingThis blog hopefully has served to give you a small introduction to many of the new concepts and possibilities
with SAP HANA SP5 and SAP HANA Extended Application Services
Over the coming weeks we will be posting additional blogs with more advanced examples and techniques as
well how to integrate SAP HANA Extended Application Services content into additional environments Likewise
there is a substantial Developerrsquos Guide which expands on many of the concepts introduced here
It is also important to note that while SAP HANA Extended Application Services ships asproductive software (meaning customers can go live in production with it) in SAP HANA SP5 it isa controlled release initially with a special ldquoProject Solutionrdquo program in place around this newfunctionality Please refer to Service Note 1779803 for additional details on the current statusof the Project Solution This Project Solution approach is designed to provide the highest levelsof support possible to initial customers and partners who choose to develop using SAP HANAExtended Application Services It also provides a channel for feedback to Product Managementand development so that we take suggestions and ideas and quickly integrate them into futurerevisions of SAP HANA and SAP HANA Extended Application Services103803 Views Tags sapmentor hana developer code database in_memory sap_mentor hana_devcentersap_hana sapui5 hana_studio xs hde xsjs xsodata
Glen OoiDec 23 2014 345 PM
Hi Thomas
In need of your expert advice
I have a situation where I am using BO Dashboards to create my Dashboard which is consuming the data from
HANA
I have a requirement to allow the user to comment in the dashboard and it will write back to the HANA DB and
also display the comments in the Dashboard
In order for the BO Dashboard to write back to HANA DB is via web services
Is there any way i can create a WSDL URL and consume the XSJS or ODATA services in HANA
Muhammad SadiqDec 10 2014 140 PM
I need your help in writing an API(XSJS service) which will take JSON format data and inserted into HANA
database
Tarasankar Banerjee in response to Thomas Jung on page 14Nov 5 2014 852 AM
Thanks Thomas Could you give an example of how to redirect
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010012
Im facing a strange issue while trying to import weather data from several cities together The issue appears to
be connected with the content of the response object
Following is the code of the Weatherxsjs file
try
var cmd = $requestparametersget(cmd)
var body
var response
var obj
var propertyName
if(cmd === import)
var dest = $nethttpreadDestination(rootworkTara02XSTest01XSHttpTest01 weather)
var client = new $nethttpClient()
var req = new $webWebRequest($nethttpGET group
id=12750041264527127733312732941275339ampunits=metric)
clientrequest(req dest)
response = clientgetResponse()
$responsecontentType = textplain
if(responsebody)
body = responsebodyasString()
obj = JSONparse(body)
body = cmd + n n + responsestatus + n n + responsecontentType
+ n n + responsebody + n n + objgetOwnPropertyNames()
$responsesetBody(body)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010013
$responsestatus = $nethttpOK
catch(e)
$responsecontentType = textplain
$responsesetBody(emessage)
$responsestatus = $nethttpINTERNAL_SERVER_ERROR
Following is the weatherxshttpdest
host = apiopenweathermaporg
port = 80
description = my weather checker
useSSL = false
pathPrefix = data25
authType = none
useProxy = true
proxyHost = ltproxy_detailsgt
proxyPort = ltproxy_port
timeout = 0
On accessing httplthostnamegt8000rootworkTara02XSTest01XSHttpTest01Weatherxsjs
ampcmd=import I am receiving the error message BodyasString unsupported charset specified in
Content-Type header (utf8)
If the body = responsebodyasString() statement is commented out I receive the error message
JSONparse unexpected character because the responsebodyasString() itself could not work correctly
However the URL httpapiopenweathermaporgdata25group
id=12750041264527127733312732941275339 returns data correctly
I am using the same URL in my code
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010014
Could you please advise regarding this issue Thanks for your help
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 14Nov 4 2014 319 PM
gtIs it possible to read files using XS For example some configuration file kept in the server
No there is no API to read from the file system of the underlying operating system You can read the HANA
configuration ini files however because they are exposed via SQL
gtIs it possible to call a html file from the xsjs file Something likerequestgetRequestDispatcher()forward() from
JAVA servlets
In the body of the response you send back to the client your could issue a redirect
Tarasankar Banerjee in response to Tarasankar Banerjee on page 15Nov 4 2014 1034 AM
Hi Thomas
Finally got my application running It is now fetching weather data from external sites
Have two more questions
1 Is it possible to read files using XS For example some configuration file kept in the server2 Is it possible to call a html file from the xsjs file Something like
requestgetRequestDispatcher()forward() from JAVA servlets
Thanks
Regards
Tarasankar
Robert WeberNov 3 2014 1136 AM
If someone is having difficulties with the alert log full on the xsengine
you can do the same trick as for the statisticserver in oder to reset the log area see details in OSS Notes
2019148 and 1950221
The commands are then
select VOLUME_ID from m_volumes where service_name = xsengine
ALTER SYSTEM ALTER CONFIGURATION (daemonini host lthostnamegt) UNSET
(xsengineinstances) WITH RECONFIGURE
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010015
ALTER SYSTEM ALTER CONFIGURATION (topologyini system) UNSET (hostlthostnamegt xsengine)
WITH RECONFIGURE
ALTER SYSTEM ALTER CONFIGURATION (topologyini system) UNSET (volumes ltvolume_idgt) WITH
RECONFIGURE
ALTER SYSTEM ALTER CONFIGURATION (daemonini host lthostnamegt) SET (xsengineinstances) =
1 WITH RECONFIGURE
Then restart the HANA instance and after that make a full backup (and schedule the regular backup in order to
prevent this situation again)
Hope this will help someone like me -)
Have a nice day
Regards
Robert
Tarasankar Banerjee in response to Tarasankar Banerjee on page 15Nov 3 2014 1031 AM
Update
I tried to access the XS Admin console from another user and faced only the No valid Crypto error However
could still update the proxy user details and the sample application successfully ran at last The relevant roles
were provided in Granted Roles not Application Privileges Probably that was the issue earlier
I would check again with new Http Destination and Server side Java Script
Thanks a lot Thomas for all your help
Regards
Tarasankar
Tarasankar Banerjee in response to Thomas Jung on page 18Nov 3 2014 929 AM
Hi Thomas
I also tried to use the sample code from section 841 Tutorial Use the XSJS Outbound API of the HANA
Developer Guide with minor modifications (for package structure proxy settings etc) This time the destination
was found The new project structure with the sample files yahooxshttpdest and sapStockxsjs is as below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010016
However it did not bring any data The content of the response object indicated that there was Proxy
authentication issue
When I tried to check the Destination in the XS Admin Console surprisingly none of the fields are populated
and everything (except the Trust Store drop down) is disabled All these fields are supposed to be populated
as indicated in the Modeling Guide
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010017
However the User already has the following privileges
The same scenario was present for the Http Destination I prepared earlier There are couple of internal errors
at the bottom On clicking them the following list is displayed
1 Internal Error dbError(ConnectionprepareStatement) 258 - insufficient privilege Not authorized at
ptimequerycheckerquery_checkcc24182 No valid SAP Crypto configuration
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010018
It appears from various blogs that the second error (No valid SAP Crypto configuration) is related to SSL
configuration in HANA I would contact the HANA Administrator to look into this issue Of course it would be
great if you could provide some insight
However I have no clue regarding the first error Request your help and cooperation in this regard
The initial issue of not finding the HttpDestination which I created still persists
Thanks for all your help
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 18Oct 31 2014 342 PM
First of all you would never use the workspace name It isnt ever part of anything It is only the package
structure that counts The first item in your list is the only one with the correct package Off hand it looks right to
me You are supposed to supply the full package path Have you configured this HTTP Destination in the XS
Admin tool yet
Tarasankar Banerjee in response to Thomas Jung on page 18Oct 31 2014 326 PM
Updated it Thanks
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 18Oct 31 2014 313 PM
Your comment got cut off We never really get to see what your problem is
Tarasankar Banerjee in response to Thomas Jung on page 21Oct 31 2014 256 PM
Thanks Thomas
I am facing as issue while trying to use an HTTP Destination I understand that the xshttpdest and xsjs file
need to in the same folder Following is the structure of my test project
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010019
As you can see the HTTP Destination and the XSJS files are in the same folder services The workspace
name is XS_Workspace and the package structure is as follows
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010020
Now I am trying to read this destination
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010021
When I am using full package structure destination_package =
rootworkTara02XSTest01XSHttpTest01services I am receiving the
error message httpreadDestination destination not found (package
rootworkTara02XSTest01XSHttpTest01services name XSHttpDest01)
On using the workspace name destination_package = XS_Workspaceservices I am receiving the
error message User is not authorized to use destination (package XS_Workspaceservices name
XSHttpDest01)
On using destination_package = rootworkTara02XSTest01services also I am receiving the error
message User is not authorized to use destination (package rootworkTara02XSTest01services
name XSHttpDest01) Strangely the services folder is not directly under XSTest01
Lastly I deliberately gave a wrong service name destination_package = XS_Workspaceservices and
destination_name = XSHttpDest02 But even then I received the error message User is not authorized to
use destination (package XS_Workspaceservices name XSHttpDest02) not that the destination is not
found
Could you please help me to resolve this issue
Thanks a lot for your helps
Regards
Tarasankar
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010022
Thomas Jung in response to Tarasankar Banerjee on page 22Oct 30 2014 152 PM
Since SPS06 its possible to use outbound HTTP destinations and to call out to external services using XSJS
Thomas Jung in response to Tarasankar Banerjee on page 22Oct 30 2014 150 PM
gtSo when the program runs in server would it automatically consider the OS user credentials
No It doesnt automatically use anything You have to specific the user and password that you want to use for
the proxy Although many proxy servers dont require a username and password
Tarasankar Banerjee in response to Thomas Jung on page 23Oct 30 2014 707 AM
Hi Thomas
Just watched the video you shared above Thanks a lot for it It is really informative and helpful
Regards
Tarasankar
Tarasankar Banerjee in response to Tarasankar Banerjee on page 22Oct 30 2014 346 AM
Got answer for the second point SAP HANA XS Administration Tool is the place to configure Proxy settings
Regards
Tarasankar
Tarasankar Banerjee in response to Tarasankar Banerjee on page 22Oct 29 2014 314 PM
Dear Thomas
another question is that does the proxy settings in the HttpDestination refer to the OS user of the HANA
server We specify useProxy as true and authType as basic in the HttpDestination but not maintain any
user credentials So when the program runs in server would it automatically consider the OS user credentials
Thanks
Regards
Tarasankar
Tarasankar Banerjee in response to Thomas Jung on page 23Oct 29 2014 132 PM
Thanks Thomas I am currently checking this option only
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010023
My current requirement is to fetch Weather Data and Social Media data from various OData services and store
them in HANA for further analysis What might be the best way for this I am currently checking the option of
creating an XS application which would connect to the external services fetch the data and save that in HANA
using DB Connection Is this the best way Or should we try to use JAVA or some other way
Your valuable suggestions are most welcome Thanks
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 23Oct 29 2014 1256 PM
gtHowever is it possible to consume XSODATA service from XSJS instead of using DB Connection
You can via an outbound HTTP destination although I certainly wouldnt recommend it It would be rather
complex and not well performing
gtAlso is it possible to consume data from external OData services for weather data social media data etc from
XSJS
Sure with the same Outbound HTTP Connectivity
httpswwwyoutubecomwatchv=fWirvj9l7eY
Maintaining HTTP Destinations - SAP HANA Developer Guide - SAP Library
Tarasankar BanerjeeOct 29 2014 1119 AM
Dear Thomas
Thanks for the great blog
I am able to connect to Database and execute queries from XSJS service However is it possible to consume
XSODATA service from XSJS instead of using DB Connection
Also is it possible to consume data from external OData services for weather data social media data etc from
XSJS
If possible it would be great if you could provide some code sample or guidelines
Thanks
Regards
Tarasankar
Thomas Jung in response to Weiping Lu on page 24Sep 25 2014 833 AM
Please refer to service note 1849775
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010024
httpservicesapcomsapsupportnotes1849775
I believe it will address your issue
Weiping LuSep 24 2014 519 PM
Hi Tom
Great post and videos I have a tough issue calling a HANA procedure from XS takes gt 5min but from HANA
studio lt 1 min Were using Amazon AWS rev 70 and 73 Any help will be greatly appreciated
Thanks
WPL
Thomas Jung in response to Su Srikanth on page 24Aug 11 2014 253 PM
You transport XSODATA services like you would any other repository content - via a Delivery Unit
Su SrikanthAug 11 2014 750 AM
Hi Thomas
Great blog
Ive a query here - we create the odata services(andor URLs created to view in the web browser) in
development environment now if we have to transport it to the quality andor production environment how
can we do this - is the same as importexport or is there any specific way to do please help with any useful
pointers
Many thanks as always
Su
Thomas Jung in response to ARSHAD SHAIKH on page 24May 15 2014 231 PM
Ive never written any blogs on calculation views I dont cover that topic That is why I suggested you ask your
question in the proper SCN forum
Although looking at your your above SQL Statement I dont see why you couldnt do this directly in XSODATA
off of the table STATUS without the need for the calculation view or the SQLScript Procedure
ARSHAD SHAIKH in response to Thomas Jung on page 25May 15 2014 1154 AM
Hello Thomas
I am new to hana Please suggest me the blogs of you related to calculation view that calling
procedures(procedures have out parameter)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010025
I am trying to fetch the result of procedure in calc view and want to create odata service for that calculation
view
procedure code goes like this
---------------------------------------
CREATE PROCEDURE TWEETS_TODAY(OUT OP BIGINT)
language SQLSCRIPT sql security invoker default schema SOCIAL360 reads sql data as
BEGIN
SELECT COUNT() INTO OP FROM SOCIAL360STATUS WHERE CREATED_AT = CURRENT_DATE
END
calc view code goes like this
----------------------------------------
Begin Procedure Script
BEGIN
DECLARE OP BIGINT
CALL SOCIAL360TWEETS_TODAY(OPvar_out)
END End Procedure Script
Thanks
-Arshad
Thomas Jung in response to ARSHAD SHAIKH on page 25May 15 2014 944 AM
Your question seems to have no relation to the content in this blog Please consider instead asking general
HANA questions in the appropriate SCN Forum
ARSHAD SHAIKHMay 15 2014 917 AM
Hi Thomas
I want to call procedures in calculation view (procedures have out parameter)
Please suggest me step by step procedure with example and supporting documents
Thanks
ARSHAD SHAIKH
Henrique Pinto in response to Blair Krotenko on page 26Apr 16 2014 711 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010026
Hmm not really sure of that I see it but that might be because Im an employee
But the NET development partner I was working with was not enrolled in any kind of beta testing program and
they were able to download it so I guess you should as well
Make sure to go in the Installation and Upgrades menu and not the Support Packages and Patches
Go to httpservicesapcomswdc -gt Installations and Upgrades -gt Browse our Download Catalog -gt SAP In-
Memory (SAP HANA) -gt SAP HANA ADONET 10
Best regards
Henrique
Blair Krotenko in response to Henrique Pinto on page 26Apr 16 2014 656 PM
Thanks for the info Henrique but I cant find it I dont know if it is an authorization issue or do we need to be a
ramp-up customer to dl and use a beta product
Thanks
Blair
Henrique Pinto in response to Thomas Jung on page 27Apr 16 2014 614 PM
The ADONET provider is available for download in the SAP Service Marketplace (in beta edition so far)
Thomas Jung in response to Kamal Jain on page 26Apr 16 2014 514 PM
For general OData structure and syntax I find that the Odataorg website is very helpful For example on this
topic
httpwwwodataorgdocumentationodata-version-2-0uri-conventions
The syntax of a $expand query option is a comma-separated list of Navigation Properties Additionally each
Navigation Property can be followed by a forward slash and another Navigation Property to enable identifying a
multi-level relationship
The page also has some sample URLs
Kamal JainApr 16 2014 536 AM
Dear Thomas
I agree that we need to pass all the associations in the expand I tried with some of options but was not
through
Now i just tried with below syntax and able to achive Thx
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010027
httpdewdftzld025pgdevsapcorp8000DTHCPXSZPMIS_PRO_ACTUALxsodata
ZPROHEADER(PR07_000002)$expand=ZACTUZEMPD
Regards
Kamal Jain
Thomas Jung in response to Blair Krotenko on page 27Apr 15 2014 623 PM
We do plan to release an ADONET provider specific to HANA in the near future This would probably be the
best option for consumption from NET Until then I would think that ODBC is probably the next best option It
gives you generally easy portability from already existing database code You could consume OData as well
although that is more generally consumed from the UI layer itself It guess it somewhat depends upon where
you are calling the service from in your NET application
Blair KrotenkoApr 15 2014 409 PM
Hi Thomas
We are looking at consuming HANA data in a NET application and from what I can see there are 2 options -
OData and ODBC It seems to me that OData might be the better option when consuming HANA data in an XS
application while ODBC might be the better option for NET What are your thoughts Is there a paper on this
subject I havent been able to find a comparison document for this Are there any security caveats to be aware
of for these options
Thanks
Blair
Thomas Jung in response to Kamal Jain on page 27Apr 15 2014 136 PM
You have to list both associations in the expand on the URL if you want both relationships to be processed
Kamal JainApr 15 2014 1249 PM
Hi Thomas
Thx for valuable and useful information
I have an query regarding XS Odata service creation for more than 2 tables and get all the data in one
command
There is req in which service needs to be created for 3 tables to get data from all these
First table has Project ID as key second table has composite
ProjectID and Employee Id as key and third table has Employee id as
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010028
key
So if I create navigation for first 2 tables based on project id and use expand comand than its working fine and I
can see data of both the tables
Further if I add navigation for third table also as below then below expand is displaying data for first two tables
only Pls share how to use expand command in this case if possible to get all tables data based on project id
How to use navigation ZEMPD here
httpdewdftzld025pgdevsapcorp8000DTHCPXSZPMIS_PRO_ACTUALxsodata
ZPROHEADER(PR07_000002)$expand=ZACTUamp
service namespace
DTHCPXS
DTHCPDTHCPDBHCP_PROJECT_HEADER
as ZPROHEADER
navigates (PROJECT as
ZACTU)
DTHCPDTHCPDBHCPT_ZPMIS_ACTUAL
as ZACTU
navigates (EMPLOYEE as
ZEMPD )
DTHCPDTHCPDBHCP_ZPMIS_RES_MASTER
as ZEMPD
association PROJECT principal
ZPROHEADER(PROJECTID)
multiplicity 1 dependent
ZACTU(PROJECTID) multiplicity
association EMPLOYEE principal
ZACTU(EMPLOYEEID)
multiplicity 1 dependent
ZEMPD(EMPLOYEEID) multiplicity
1
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010029
Pls suggest if there is anything to add or correct in XS odata service syntax above
Regards
Kamal Jain
Vikas Madaan in response to Thomas Jung on page 29Apr 14 2014 458 PM
Thanks Thomas
Under which component
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 29Apr 14 2014 450 PM
No this isnt a known issue Ive seen Nor can I recreate the problem in my system No you cant maintain the
authentication in XSHTTPDEST itself It intentionally must be set in XSADMIN tool I can really only suggest
that you open a support ticket
Vikas MadaanApr 14 2014 431 PM
Hi Thomas
I am trying to pull data from SAP system onto HANA Database using XSJOB files I am calling RFC enabled
function modules over HTTP request It helps me replicating the real time ECC data onto HANA as well with
back ground jobs
I am facing one problem in the XSHTTPDEST file I am able to create and activate the file using studio and this
file is even visible in the web based XS administration tool But in the web based tool when i provide user and
password for basic authotication then system just clears the user id and password when i try to save This the
reason our HTTP requests are getting failed and below is the response we are getting in the response body
lthtmlgtltheadgtlttitlegtLogon Error Messagelttitlegt
Is this known issue or we are missing something Is it possible to provide user and password in the
XSHTTPDEST file Is there any particular syntax
I checked and i have the required authorizations as well develper Guide
Please help
Regards
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010030
Vikas Madaan
Abdul HakimFeb 22 2014 359 AM
Hi Thomas - Any recommended book or resource to learn and master Server Side Javascript There were
many books available in the market but as a beginner need to know the right resource book to start with and
master this stuffAlso whether SAP plan to conduct any training to teach Server Side Javascript similar to other
standard training offerings
Thanks
Hakim
Samuel Tanor-GyeduFeb 20 2014 839 AM
Thanks Thomas
I will definitely have a look at SHINE
Thomas Jung in response to gentilini andre on page 30Feb 19 2014 422 PM
Difficult to say what is wrong I several things which are different than our sample that does this You are using
a POST for instance instead of a GET However if you are gettting a 200 then I assume the service call is
correct In client side tools (like Chrome Developer Tools) you should be able to see the response object from
the call
However what I would really recommend is that you study the SHINE content (SAP HANA Interactive
Education) There is already a sample application which does this in SHINE Also it has some special
JavaScript in the UI to handle the file attachment via AXAJ call Perhaps that is the part you are missing
You can read more about SHINE here It is also included already installed in the latest version of the HANA
Developer Center trial image (SP7 based)
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
gentilini andreFeb 19 2014 325 PM
Hi Thomas
well I followed your hints but it still donacutet work
I created a xsjs File like below
function downloadExcel()
try
var body =
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010031
alert(drin)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
alert(drusse)
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount
tTax Amount tNetto Amount tCurrency n
while(rsnext())
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
catch (e)
alert(db conn funktioniert nicht)
var a = $requestparametersget(cmd)
$responsesetBody(Invalid Command +a)
switch (a)
case doex
$responsesetBody(Invalid Command +a)
alert(filedownload)
thisdownloadExcel()
break
default
$responsestatus = $nethttpINTERNAL_SERVER_ERROR
$responsesetBody(Invalid Command +a)
The Controllerjs File
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010032
doFileDownload function (oEvent)
jQuerysaprequire(sapuicommonsMessageBox)
sapuicommonsMessageBoxshow(Export Starten sapuicommonsMessageBoxIconconfirm
Information)
sapuicommonsMessageBoxconfirm(Export starteninform Confirmation)
return false
function inform(rValue)
alert (drinnnnne)
var aurl = FileDownloadxsjscmd=doex
if(rValue) If User presses Ok
alert(aurl)
jQueryajax(
url aurl
method POST
dataType json
datacmddoex
success sapuicommonsMessageBoxalert(Export wird ausgefuumlhrtConfirmation)
errorfunction onErrorCall(jqXHR textStatus errorThrown)
alert(jqXHRstatus)
sapuicommonsMessageBoxshow(jqXHRstatus
ERROR
Error in calling Service )
return
complete sapuicommonsMessageBoxalert(Export Erfolgreich
abgeschlossenConfirmation)
)
return false
else If the user presses Cancel
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010033
sapuicommonsMessageBoxalert(Vorgang abgebrochenNotification)
)
at last but not least the view
sapuijsview(zag1_ui_cv_03Index
Specifies the Controller belonging to this View
In the case that it is not implemented or that null is returned this View does not have a Controller
memberOf zag1_ui_cv_03Index
getControllerName function()
return zag1_ui_cv_03Index
Is initially called once after the Controller has been instantiated It is the place where the UI is
constructed
Since the Controller is given to this method its event handlers can be attached right away
memberOf zag1_ui_cv_03Index
createContent function(oController)
create a lite button with an icon and a text
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010034
lite true
)placeAt(btn)
oButton3attachPress(oControllerdoFileDownload)
var oButton4 = new sapuicommonsButton(
text Refresh
icon imagesrefreshjpg
lite true
press function() var data = oTableval()
if(data == )
alert(no data found)
return
print(content)
print(DatArray)
if (data = )
alert(Funzt)
JSONToCSVConvertor(data CUSTOMER AMOUNT true)
)placeAt(btn)
jQuerysaprequire(sapuitableTable)
create table control with properties
var oTable = new sapuitableTable(
width 100
rowHeight 50
title Amount per Partner
selectionMode sapuitableSelectionModeNone
)
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Company Name
)
template new sapuicommonsTextView(
text CompanyName
)
sortProperty CompanyName
))
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010035
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Partner ID
)
template new sapuicommonsTextView(
text PartnerId
)
sortProperty PartnerId
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Postal Code
textAlign sapuicoreTextAlignEnd
)
template new sapuicommonsTextView(
text PostalCode
textAlign sapuicoreTextAlignEnd
)
sortProperty PostalCode
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text City
)
template new sapuicommonsTextView(
text City
)
sortProperty City
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Purchase ID
)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010036
template new sapuicommonsTextView(
text PurchaseOrderId
)
sortProperty Currency
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Lifecycle Status
)
template new sapuicommonsTextView(
text LifecycleStatus
)
sortProperty LifecycleStatus
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Gross Amount
)
template new sapuicommonsTextView(
text GrossAmount
)
sortProperty GrossAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Tax Amount
)
template new sapuicommonsTextView(
text TaxAmount
)
sortProperty TaxAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Amount Netto
)
template new sapuicommonsTextView(
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010037
text CM_NET_Amount_001
)
sortProperty CM_NET_Amount_001
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Currency
)
template new sapuicommonsTextView(
text Currency
)
sortProperty Currency
))
var oModel = new sapuimodelodataODataModel
(httpqperiorvmcldsr8000ZAG1_WS_001ZAG1_CV_001xsodata false)
oTablesetModel(oModel)
oTablebindRows(Amount)
return oTable
)
It wonacutet call the function or better said the action of the button works fine till to the point where it should call the
xsjsfile to generate the excel-file I wondered that in the ajax part the error- success- and complete-part will
be executed at the same time and not only one of this statements The message is 200 (The request has
succeeded The information returned with the response is dependent on the method used in the request)
Maybe you can see where my mistake is or whats going wrong
Iacuteve the developer edition on cloudshare (Hana Studio rev68 Server is on SPS05)
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010038
Andreacute
Thomas Jung in response to Samuel Tanor-Gyedu on page 38Feb 19 2014 523 AM
I dont think I can help you This appears to a question about how odata4j works not about XS I have no
experience with odata4j myself
Samuel Tanor-GyeduFeb 18 2014 913 AM
Hi Thomas
I have an odata service with this endpointhttpss5hanaxshanatrialondemandcomservicesUserxsodata
I am now trying to consume it from eclipse with the odata4j libraries
This is how I get the endpoint
public UserServiceOdata(String endpointUri)
thisendpointUri = endpointUri
ODataConsumerdumpresponseHeaders(true)
consumer = ODataConsumerscreate(endpointUri)
This is my method to add a user
public User addUser(User user)
consumercreateEntity(entitySet)properties(OPropertiesint32(propertyUserId
usergetId()))properties(OPropertiesstring(propertyUserName
usergetName()))properties(OPropertiesstring(propertyUserEmail usergetEmail()))execute()
return user
When I call addUser method I get an Error
Caused by javaxxmlstreamXMLStreamException ParseError at [rowcol][78253]
Message The reference to entity sourceUrl must end with the delimiter
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010039
When I use this endpoint httpss5hanaxshanatrialondemandcomservicesUsersvc everything works fine
With the httpss5hanaxshanatrialondemandcomservicesUserxsodata I get errors
Please I would be very grateful for assistance
Thanks in advance
Regards
Samuel
Thomas Jung in response to gentilini andre on page 39Feb 18 2014 431 AM
You have a fundamental misunderstanding here You are placing server side JavaScript code in your client
side UI5 application The function downloadExcel is something you need to execute on the server It needs to
be in an XSJS file and it is called from the client side via AJAX - as a REST service not as a local function
gentilini andreFeb 17 2014 451 PM
Hello Thomas
Thank you for this great How-To Guide
Iacutem pretty new in SAPUI5 and tried your export-sample in my little trial project but it doesnacutet work
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010040
My Button for this looks like
ltcodegt
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
lite true
press function() alert(oButton3getText())
downloadExcel()
ltcodegt
and the function for this action looks like
ltcodegt
function downloadExcel()
var body =
alert(drin)
print($query)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount tTax
Amount tNetto Amount tCurrency n
while(rsnext())
if(rsnext() == )
alert($responsesetBody( Failed to retrieve data ))
alert($responsestatus = $nethttpINTERNAL_SERVER_ERROR)
else
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010041
ltcodegt
Iacutem afraid and hope that you can help me
Kind regards
Andreacute
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1246 PM
gtIs there any restriction or development limitation in the XSJSLIB files
Thats a very general question Difficult to answer without any context
Vikas Madaan in response to Thomas Jung on page 41Feb 11 2014 1245 PM
Thanks Thomas
I think we are on same page
Once quick question that came to my mind Is there any restriction or development limitation in the XSJSLIB
files
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1230 PM
gtCould please help me in understanding in more advantagesdisadvantages for both techniques
Youve summarized it pretty well already
gtbecuase i dont want to use both the approaches
Even with the CRUD support and exits in XSODATA its still pretty hard to do 100 via XSODATA There are
still valid use cases for XSJS when you need custom body custom read processing job scheduling etc Its
good to try and use XSODATA whenever possible but I wouldnt automatically exclude the use of XSJS
Vikas MadaanFeb 11 2014 1008 AM
Hi Thomas
Thanks a lot for sharing useful information through various blogs
In my current project we are evaluating use of XSOData or XSJS applications I saw your videos like the one
mentioned below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010042
httpwwwsaphanacomdocsDOC-4376
Want i understood from various blog is this
From SP7 we can write exsits in the OData services and it is very easy to consume at the client side just like
any REST base service and from my understanding it is Scalable as well I would love to use XSOData always
becuase development effort is very less compare to XSJS and it is very easy to rampup the team on OData
related development objects
XSJS were as provide more control becuase of server side scripting becuase it allows development on the
server side using JavaScript Core APIs of SAP HANA Extended Application Services are therefore exposed
as JavaScript functions providing easy access to the HTTP Request and Response object as well database
access to execute SQL or call SQLScript Procedures It provide us control over the body format and and URL
parameter definition
Could please help me in understanding in more advantagesdisadvantages for both techniques
I am very keen to understand and also explain the same to team members becuase i dont want to use both the
approaches and even sometimes customer can also ask the same to us
Also If we are on SP6 then from my understanding XSJS provides us more capability in terms of complex
application Corrent me If i am wrong
Thanks
Regards
Vikas Madaan
Thomas Jung in response to Raghuveer Phull on page 42Feb 5 2014 312 PM
Yes there are videos on the CRUD features of XSODATA which were new in SP6
For more on CRUD support in SP6 see this video
oData CreateUpdateDelete Support in SAP HANA SPS6
For the extended support for XSJS exits in SP7 see this video
SAP HANA SPS 07 XSODATA Exits in XSJS
Raghuveer PhullFeb 5 2014 122 AM
Do you have an exampledocumentationvideo where you can write a service which will populate Hana DB
What I am asking for is a way for my external script to populate the DB tables i have created in Hana DB
Thomas Jung in response to reda miraoui on page 43Jan 29 2014 411 PM
The source code for the examples shown here are shipped as part of SHINE (SAP HANA Interactive
Education)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010043
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Vivek Singh Bhoj in response to reda miraoui on page 43Jan 29 2014 352 PM
Hi Reda
You can import Shine Content in HANA and then check all these source codes
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Regards
Vivek
reda miraoui in response to Thomas Jung on page Jan 29 2014 344 PM
Hey Thomas
Is it possible to download source code of your project from this HANA tutorial
Thanks
Reda
Thomas Jung in response to Abdul Hakim on page 43Nov 21 2013 1133 PM
Yes River can be used as an alternative and when activated it will generate Server Side JavaScript andor
SQLScript
Abdul Hakim in response to Thomas Jung on page 44Nov 21 2013 747 PM
Hi Thomas - Was going through blog regarding River (RDL)Just a question on this
When you say Programming language for HANA native development is Server side Javascript SQL SQL
ScriptOnce RDL is rolled out whether RDL can be used for native application development instead of Server
side Java script SQL SQL Script I am very much new to this stuff so appreciate if you can also help on
how to get started with Server Side Java script SQL SQL Script for HANA
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 30 2013 750 AM
Hi Thomas
Thanks for your response I am talking about more content on shine
thanks
Ashutosh
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010044
Baskar Gopalakrishnan in response to Thomas Jung on page 44Oct 30 2013 1249 AM
Hi Thomas
Im a SAP PI Middleware consultantSAP topic leader in XIPI heavily worked on Java related
Netweaver stack I have knowledge in ABAP but not worked heavily in abap I have enrolled your sap hana
native application development course I feel very interesting I did work heavily in java and javascript projects
using eclipse development tool Do you think if I invest my time in just native hana development and proceed
in HANA field is a good step I dont have BW experience either
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 819 PM
Thanks for the clarification Much appreciated
Thomas Jung in response to Abdul Hakim on page 44Oct 29 2013 120 PM
gtABAP Close to HANA means whether we can expect a similar 2 tier architecture similar to HANA XS in the
future or what does that mean
No it doesnt mean that ABAP will become a 2 tier architecture We will not move the ABAP VMKernel into
HANA itself It will remain a separate application server At least for the current plansforeseeable future What
he was referring to was bringing the programming models closer For instance the new 740 SP5 feature that
allows you to write SQLScript directly within an ABAP class method
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 650 AM
Thomas - Thanks for the clarificationMuch appreciatedI was listening to ABAP on HANA session by
Thorsten Schneider this year Teched and he was mentioning that SAP Plans to bring ABAP very close to
HANA in the coming future but not much details have been discussed in the sessionABAP Close to HANA
means whether we can expect a similar 2 tier architecture similar to HANA XS in the future or what does that
mean
Thanks
Hakim
Thomas Jung in response to Abdul Hakim on page 45Oct 28 2013 703 PM
gt whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the option is
recommended by SAP then kindly share the pros and cons of each of the item
Taken from the TechEd CD103 session slides
Guidance
bulluse ABAP for optimization of existing progams (in context of SAP Business Suite or BW)
bullconsider HANA Native Development for development of new applications which will solely run on SAP HANA
bullcombine ABAP and HANA Native Development to enrich existing applications (eg SAP HANA Live Fiori)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010045
ABAP
bullapplications follow 3-tier architecture
bullABAP is in general database agnostic but with release 74 optimized for SAP HANA
bullProgramming language ABAP ABAP OO with the option to use SAP HANA features
bullIDE eclipse-based ABAP Development Tools
HANA Native Development
bullapplications follow 2-tier architecture
bullHANA Native Development is SAP HANA specific and embedded in the database
bullProgramming language River server-side JavaScript SQLSQLScript
bullIDE eclipse-based SAP HANA Studio + web IDE
Thomas Jung in response to ashutosh dixit on page 45Oct 28 2013 701 PM
gtIs there any more demos for the SHINE
Im not exactly sure what you mean by that We are building additional content for SHINE that will be delivered
in SP7
Abdul HakimOct 28 2013 326 PM
Thomas - Let us say a customer is running SAP Netweaver 74 ABAP with HANA DB and they have HANA
extended service as wellIf the customer wants to do new developments then what is the recommendation
from SAP ie whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the
option is recommended by SAP then kindly share the pros and cons of each of the item (SAP Netweaver 74
ABAP Vs SAP HANA XS)
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 28 2013 221 PM
Hi Thomas
Thanks a lot for your its working now
Is there any more demos for the SHINE
Thanks
Ashutosh
Thomas Jung in response to ashutosh dixit on page 46Oct 25 2013 809 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010046
As this content is now standard in SP6 as part of SHINE (SAP HANA INteractive Education) there also some
setup instructions on helpsapcom
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Basic points to check - have you generated the synonyms in the data generator Ran the data generator to
create some data Have the role assigned Added client 001 to your user profile
ashutosh dixitOct 24 2013 130 PM
Hi Thomas
Amazing blog - once again Thomas thanks
I have been following you for many days attended your OPEN SAP course also
That was an amazing course for new learner like me
One of our client is looking forward for XS based search Application identical to what you have created in your
DEMO
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010047
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010048
But I am not able to fetch the data on blank HTML page is coming with no data
If there is any step by step document related to this please help in getting that
Any help will be highly appreciated
Thanks
Ashutosh
Naveen KumarSep 26 2013 1130 AM
Good Document
Heber FabianoAug 27 2013 323 PM
Great content as always Keep sharing with us
Thomas Jung in response to Orel Stringa on page 48Aug 27 2013 147 PM
This is currently not possible The CORS support is for all origins We dont yet have the feature to maintain a
whitelist of CORS origins
Orel Stringa in response to Thomas Jung on page Aug 27 2013 801 AM
Hi Thomas
nice to see that SAP has made it possible with SP6 to specify cross origin resource sharing (CORS) support
via the xsaccess file SP6 HANA development guide has example of how to specify CORS support
I have build an XS application and would like to serve SAPUI5 on a diffhost than XSHANA
How can I specify that I would like to allow cross origin access restricted to certain domain(s) only
Is there a special keyword syntax for specifying that
Thank yoi
Orel
Vijay UthayakumarAug 27 2013 131 AM
Highly informative amp digestible Fantastic work
Jerry WangAug 1 2013 955 AM
Hi Tomas
Thank you
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010049
Jerry
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 644 PM
JSLint checks are very strict and often produce syntax errors for items that just stylistic and wont actually
cause an error upon activation or runtime You can either ignore the JSLint errors or deactivate JSLint for this
project in these cases However it might also be an indication that the JavaScript code you are trying to import
isnt compatible with Strict mode
httpsdevelopermozillaorgen-USdocsWebJavaScriptReferenceFunctions_and_function_scope
Strict_mode
Milan Vrozina in response to Thomas Jung on page 49Jul 21 2013 624 PM
Thanks for clarification I thought there would be some kind of import
But anyway in case of this specific library I have some problems with JSLint validation when I do cut and paste
of the original code
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 343 PM
What kind of problem are you having using this library Strict mode JavaScript which doesnt try to access the
DOM Window or other client side specific objects should work in Server Side XSJS Generally if you have a
library you just cut and paste into your XSJS or an XSJSLIB file and then call the functions from your code
Milan VrozinaJul 21 2013 339 PM
Hello
first and foremost thank you for perfect openSAP classes related to HANA development and for this blog as
well
I have one question related to server-side javascript You mentioned in course that is possible to use 3rd party
libraries or reuse 3rd party code But I cant find a possible way how to import 3rd party javascript library -as
is- to server and use it For example I would like to use JSZip library to zip some file before sending it to client
from xsjs application Is that possible Thank you
Chandrashekhar MahajanJul 3 2013 734 PM
This is excellent blog Now HANA XS is very much clear to me
Mohan krishnaJul 1 2013 144 PM
WOW - great blog Thomas This will be very helpful in understanding SAP hana Good Job
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010050
Abdul Hakim in response to Thomas Jung on page 50Jun 27 2013 833 PM
Thanks for the clarification
Thomas Jung in response to Abdul Hakim on page 50Jun 27 2013 659 PM
HANA Extended Application Services uses SQLScript and JavaScript as its two primary programming
languages
gtwhether the current SAP Business suite based on ABAP will be completely migrated to HANA service
No The Business Suite already runs on HANA but still via the ABAP application server It will continue to
leverage HANA via a combination of enhancements to ABAP and utilizing some of the technologies described
in this blog
gtAlso whether ABAP can be used to built application in HANA extended services
No There is no ABAP language container in HANA Extended Application Services
Abdul HakimJun 27 2013 405 PM
Hi Thomas - What is the programming language used for HANA Extended application services
As HANA is more than a database ie application platform by itself and as you mentioned that more and more
applications will be built on HANA i have question as how the future SAP ERP system looks likewhether the
current SAP Business suite based on ABAP will be completely migrated to HANA service in the future or SAP
ABAP server will continue to evolve and receive focus investment from SAP Also whether ABAP can be used
to built application in HANA extended services Your thoughts
Thanks
Abdul Hakim
Thomas Jung in response to Ravindra Channe on page 50Jun 11 2013 830 PM
Yes it is still planned However we are still a couple of weeks away and Ive not seen the final installers to say
for certain its there
Ravindra ChanneJun 11 2013 815 PM
Hi Thomas
Thanks for a wonderful and very informative blog Is there any update on 32 bit REGI file
Is it expected along with SPS6
Regards
Ravi
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010051
Thomas Jung in response to Amanda Rzepka on page Jun 7 2013 942 PM
gtCan the XS Services be used in a BW on HANA Scenario
Yes XS is part of ALL HANA systems You should check and make sure you are licensed for direct access to
the underlying HANA instance however
Thomas Jung in response to Holger Schimanski on page Jun 7 2013 941 PM
gtIs there a similar library which could be used in XS Engine
The XSODATA development object is similar We also have higher level frameworks for XMLA and Search
Services (InA) You can expect more such high level frameworks to be added to the HANA Extended
Application Services in the future
Thomas Jung in response to Manav Mehra on page Jun 7 2013 939 PM
Have you used something like the Chrome developer tools to see see if you are getting any client side
javascript errors or to see if the request to your xsodata service is successful
Thomas Jung in response to Christian Hufnagl on page 52Jun 7 2013 938 PM
It will ship as non-automatic content in SPS6 (all systems will have it and it just needs to be imported) The
delivery units are also part of this weeks updates to the Cloudshare and AWS developer center images They
are also available for download as part of the content of the openSAP course
Thomas Jung in response to Matthew Pickell on page 51Jun 7 2013 937 PM
CORS support will come with SPS6 at the end of June
Thomas Jung in response to Jeroen Custers on page 51Jun 7 2013 936 PM
gtWill this bug be fixed in HANA ver 56
Personally Ive still experienced this bug in SPS6 internal builds Must be a tricky one to find Luckily the
workaround of closing and reopening isnt too difficult Just annoying This also probably makes the bug low
priority
Jeroen Custers in response to Vivek Singh Bhoj on page 52Jun 7 2013 411 PM
This issue also occurs on rev56
Matthew PickellJun 7 2013 258 PM
Thomas
Has CORS been included in a release yet
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010052
Vivek Singh Bhoj in response to Chandra Edem on page 52Jun 5 2013 601 AM
Hi Chandra
Date for Week1 Assignment has been extended till June 11
So you can give Week 1 Assignment now
Christian HufnaglJun 4 2013 543 PM
Hi Thomas
thank you for the interesting tutorial
Can you tell me whether it is possible to download the source code of the ldquoPutting it all togetherrdquovideo And if yes Where can I download itThanks
Christoph
Vivek Singh BhojJun 4 2013 1116 AM
Hi Thomas
Thanks for OpenSAP classes
Your Youtube Account also have very good exercises
IN OpenSAP Week 2 Unit 3 tutorial after assigning admin role to my user Id i am not able to see sequences
synonyms triggers under my schema or any other schema i am only able to see Column Views Procedures
Tables and Views
Though now i am able to insert data into my created table
Can you let me know how i will be able to see Sequences under my schema without removing the admin role
I am using HANA revision 52
Got to know from OpenSAP that
This is a known issue and the only way that Ive seen to fix it is to actually close the studio and open it again
then refresh the node
Cheers
Rich Heilman
SAP HANA Product Management
Will this bug be fixed in HANA ver 56
Chandra Edem in response to Thomas Jung on page 53Jun 4 2013 646 AM
Thomas
I registered for OpenSAP course Introduction to Software Development on SAP HANA on June 2 900PM
I didnt know that it is going to end WEEK1 assignment test on 632013 300PM Is there any way can take
that WEEK1 Assignment Test
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010053
Thanks
Chandra
Thomas Jung in response to Alexander Bauer on page Jun 3 2013 856 PM
SAPUI5 gets updated auutomatically when you apply HANA revisions There is no additional download or
update needed
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+01003
development tools are integrated into SAP HANA Studio they are not installed automatically For installation
instructions please see section 101 of the SAP HANA Developers Guide
Figure 2 - SAP HANA Development perspective of the SAP HANA Studio
These extensions to the SAP HANA Studio include developer productivity enhancing features such as project
wizards (Figure 3) resource wizards code completion and syntax highlighting for SAP HANA Extended
Application Services server side APIs integrated debuggers and so much more
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+01004
Figure 3- Project Wizards for XS Based Development
These features also include team management functionality All development work is done based upon
standard Eclipse projects The project files are then stored within the SAP HANA Repository along with all the
other resources From the SAP HANA Repository browser view team members can check out projects which
have already been created and import them directly into their local Eclipse workspace (Figure 4)
After projects have been imported into the local Eclipse workspace developers can work offline on them You
can also allow multiple developers to work on the same resources at the same time Upon commit back to the
SAP HANA Repository any conflicts will be detected and a merge tool will support the developer with the task
of integrating conflicts back into the Repository
The SAP HANA Repository also supports the concept of activeinactive workspace objects This way a
developer can safely commit their work back to the server and store it there without immediately overwriting
the current runtime version It isnt until the developer chooses to activate the Repository object that the new
runtime version is created
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+01005
Figure 4 - Repository Import Project Wizard
For a deeper look at the basic project creation and Repository object management within SAP HANA Studio
please view the following videos on the topic
OData ServicesThere are two main parts of the SAP HANA Extended Application Services programming model The first is
the ability to generate OData REST services from any existing SAP HANA Table or View The process is
quite simple and easy From within an SAP HANA Project create a file with the extension xsodata Within this
service definition document the developer needs only to supply the name of the source tableview an entity
name and if using an SAP HANA View the entity key fields
For example if you want to generate an OData service for an SAP HANA table named techedepmdb
businessPartner in the Schema TECHEDEPM this would be the XSODATA definition file you would create
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+01006
service namespace saphanademocontentepm TECHEDEPMtechedepmdbbusinessPartner as BUYER
Figure 5 - XSODATA Service Definition and Test
Upon activation of this XSODATA file we already have an executable service which is ready to test The
generated service supports standard OData parameters like $metadata for introspection (see Figure 6) $filter
$orderby etc It also supports body formats of ATOMXML and JSON (Figure 7 for an example) Because
OData is an open standard you can read more about the URL parameters and other features at http
wwwodataorg
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+01007
Figure 6 - OData $metadata support
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+01008
Figure 7 - Example OData Server JSON Output
The examples in the above figures demonstrate how easily these services can be tested from the web browser
but of course doesnt represent how end users would interact with the services Although you can use a variety
of 3rd party tools based upon JavaScript like Sencha Sencha Touch JQuery JQuery Mobile and PhoneGap
just to name a few SAP delivers the UI Development Toolkit for HTML5 (SAPUI5) standard in SAP HANA
Extended Application Services A particularly strong feature of SAPUI5 is the integration of OData service
consumption not just at a library level but also with special features within the UI elements for binding to OData
services
For example within SAPUI5 you can declare an OData model object and connect this model object to the URL
of the XSODATA service Next create a Table UI element and connect it to this model object Finally you call
bindRows of the Table UI element object and supply the OData entity name you want to use as the source of
the table
var oModel = new sapuimodelodataODataModel (servicesbuyerxsodata false) oTable = new sapuitableTable(testtableId tableID visibleRowCount 10) oTablesetModel(oModel) oTablebindRows(BUYER)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+01009
This creates an UI Element which has built-in events such as sort filter and paging which automatically call
the corresponding OData Service to fulfill the event No additional client side or server side programming is
necessary to handle such events
Figure 8 - OData Bound Table UI Element
For more details on OData service creation in SAP HANA Extended Application Services and utilizing these
services within SAPUI5 please view these videos
Server Side JavaScriptThe XSODATA services are great because they provide a large amount of functionality with minimal amounts
of development effort However there are a few limitations which come with such a framework approach For
example in SAP HANA SP5 the OData service framework is read only Support for Insert Update and Delete
operations is available with SAP HANA SP6
Luckily there is an option for creating free-form services where you can not only perform update operations but
also have full control over the body format and URL parameter definition SAP HANA Extended Application
Services also allows development on the server side using JavaScript (via project files with the extension
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010010
XSJS) Core APIs of SAP HANA Extended Application Services are therefore exposed as JavaScript
functions providing easy access to the HTTP Request and Response object as well database access to
execute SQL or call SQLScript Procedures
In this simple example we can take two numbers as URL Request Parameters and multiply them together and
then return the results as text in the Response Body This is an intentionally basic example so that you can
focus on the API usage
Figure 9 - Simple XSJS Service
However the power of XSJS services comes from the ability to access the database objects but also have full
control over the body output and to further manipulate the result set after selection In this example we use
XSJS to create a text-tab delimited output in order to support a download to Excel from a user interface
function downloadExcel() var body = var query = SELECT TOP 25000 PurchaseOrderId PartnerId to_nvarchar(CompanyName) LoginName_1 CreatedAt GrossAmount FROM _SYS_BICtechedepmdbPO_HEADER_EXTENDED order by PurchaseOrderId $tracedebug(query) var conn = $dbgetConnection() var pstmt = connprepareStatement(query) var rs = pstmtexecuteQuery() body = Purchase Order Id tPartner Id tCompany Name tEmployee Responsible tCreated At tGross Amount n while(rsnext()) body += rsgetString(1)+ t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetTimestamp(5)+t+rsgetDecimal(6)+n $responsesetBody(body) $responsecontentType = applicationvndms-excel charset=utf-16le $responseheadersset(Content-Dispositionattachment filename=Excelxls) $responseheadersset(access-control-allow-origin) $responsestatus = $nethttpOK
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010011
ClosingThis blog hopefully has served to give you a small introduction to many of the new concepts and possibilities
with SAP HANA SP5 and SAP HANA Extended Application Services
Over the coming weeks we will be posting additional blogs with more advanced examples and techniques as
well how to integrate SAP HANA Extended Application Services content into additional environments Likewise
there is a substantial Developerrsquos Guide which expands on many of the concepts introduced here
It is also important to note that while SAP HANA Extended Application Services ships asproductive software (meaning customers can go live in production with it) in SAP HANA SP5 it isa controlled release initially with a special ldquoProject Solutionrdquo program in place around this newfunctionality Please refer to Service Note 1779803 for additional details on the current statusof the Project Solution This Project Solution approach is designed to provide the highest levelsof support possible to initial customers and partners who choose to develop using SAP HANAExtended Application Services It also provides a channel for feedback to Product Managementand development so that we take suggestions and ideas and quickly integrate them into futurerevisions of SAP HANA and SAP HANA Extended Application Services103803 Views Tags sapmentor hana developer code database in_memory sap_mentor hana_devcentersap_hana sapui5 hana_studio xs hde xsjs xsodata
Glen OoiDec 23 2014 345 PM
Hi Thomas
In need of your expert advice
I have a situation where I am using BO Dashboards to create my Dashboard which is consuming the data from
HANA
I have a requirement to allow the user to comment in the dashboard and it will write back to the HANA DB and
also display the comments in the Dashboard
In order for the BO Dashboard to write back to HANA DB is via web services
Is there any way i can create a WSDL URL and consume the XSJS or ODATA services in HANA
Muhammad SadiqDec 10 2014 140 PM
I need your help in writing an API(XSJS service) which will take JSON format data and inserted into HANA
database
Tarasankar Banerjee in response to Thomas Jung on page 14Nov 5 2014 852 AM
Thanks Thomas Could you give an example of how to redirect
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010012
Im facing a strange issue while trying to import weather data from several cities together The issue appears to
be connected with the content of the response object
Following is the code of the Weatherxsjs file
try
var cmd = $requestparametersget(cmd)
var body
var response
var obj
var propertyName
if(cmd === import)
var dest = $nethttpreadDestination(rootworkTara02XSTest01XSHttpTest01 weather)
var client = new $nethttpClient()
var req = new $webWebRequest($nethttpGET group
id=12750041264527127733312732941275339ampunits=metric)
clientrequest(req dest)
response = clientgetResponse()
$responsecontentType = textplain
if(responsebody)
body = responsebodyasString()
obj = JSONparse(body)
body = cmd + n n + responsestatus + n n + responsecontentType
+ n n + responsebody + n n + objgetOwnPropertyNames()
$responsesetBody(body)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010013
$responsestatus = $nethttpOK
catch(e)
$responsecontentType = textplain
$responsesetBody(emessage)
$responsestatus = $nethttpINTERNAL_SERVER_ERROR
Following is the weatherxshttpdest
host = apiopenweathermaporg
port = 80
description = my weather checker
useSSL = false
pathPrefix = data25
authType = none
useProxy = true
proxyHost = ltproxy_detailsgt
proxyPort = ltproxy_port
timeout = 0
On accessing httplthostnamegt8000rootworkTara02XSTest01XSHttpTest01Weatherxsjs
ampcmd=import I am receiving the error message BodyasString unsupported charset specified in
Content-Type header (utf8)
If the body = responsebodyasString() statement is commented out I receive the error message
JSONparse unexpected character because the responsebodyasString() itself could not work correctly
However the URL httpapiopenweathermaporgdata25group
id=12750041264527127733312732941275339 returns data correctly
I am using the same URL in my code
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010014
Could you please advise regarding this issue Thanks for your help
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 14Nov 4 2014 319 PM
gtIs it possible to read files using XS For example some configuration file kept in the server
No there is no API to read from the file system of the underlying operating system You can read the HANA
configuration ini files however because they are exposed via SQL
gtIs it possible to call a html file from the xsjs file Something likerequestgetRequestDispatcher()forward() from
JAVA servlets
In the body of the response you send back to the client your could issue a redirect
Tarasankar Banerjee in response to Tarasankar Banerjee on page 15Nov 4 2014 1034 AM
Hi Thomas
Finally got my application running It is now fetching weather data from external sites
Have two more questions
1 Is it possible to read files using XS For example some configuration file kept in the server2 Is it possible to call a html file from the xsjs file Something like
requestgetRequestDispatcher()forward() from JAVA servlets
Thanks
Regards
Tarasankar
Robert WeberNov 3 2014 1136 AM
If someone is having difficulties with the alert log full on the xsengine
you can do the same trick as for the statisticserver in oder to reset the log area see details in OSS Notes
2019148 and 1950221
The commands are then
select VOLUME_ID from m_volumes where service_name = xsengine
ALTER SYSTEM ALTER CONFIGURATION (daemonini host lthostnamegt) UNSET
(xsengineinstances) WITH RECONFIGURE
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010015
ALTER SYSTEM ALTER CONFIGURATION (topologyini system) UNSET (hostlthostnamegt xsengine)
WITH RECONFIGURE
ALTER SYSTEM ALTER CONFIGURATION (topologyini system) UNSET (volumes ltvolume_idgt) WITH
RECONFIGURE
ALTER SYSTEM ALTER CONFIGURATION (daemonini host lthostnamegt) SET (xsengineinstances) =
1 WITH RECONFIGURE
Then restart the HANA instance and after that make a full backup (and schedule the regular backup in order to
prevent this situation again)
Hope this will help someone like me -)
Have a nice day
Regards
Robert
Tarasankar Banerjee in response to Tarasankar Banerjee on page 15Nov 3 2014 1031 AM
Update
I tried to access the XS Admin console from another user and faced only the No valid Crypto error However
could still update the proxy user details and the sample application successfully ran at last The relevant roles
were provided in Granted Roles not Application Privileges Probably that was the issue earlier
I would check again with new Http Destination and Server side Java Script
Thanks a lot Thomas for all your help
Regards
Tarasankar
Tarasankar Banerjee in response to Thomas Jung on page 18Nov 3 2014 929 AM
Hi Thomas
I also tried to use the sample code from section 841 Tutorial Use the XSJS Outbound API of the HANA
Developer Guide with minor modifications (for package structure proxy settings etc) This time the destination
was found The new project structure with the sample files yahooxshttpdest and sapStockxsjs is as below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010016
However it did not bring any data The content of the response object indicated that there was Proxy
authentication issue
When I tried to check the Destination in the XS Admin Console surprisingly none of the fields are populated
and everything (except the Trust Store drop down) is disabled All these fields are supposed to be populated
as indicated in the Modeling Guide
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010017
However the User already has the following privileges
The same scenario was present for the Http Destination I prepared earlier There are couple of internal errors
at the bottom On clicking them the following list is displayed
1 Internal Error dbError(ConnectionprepareStatement) 258 - insufficient privilege Not authorized at
ptimequerycheckerquery_checkcc24182 No valid SAP Crypto configuration
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010018
It appears from various blogs that the second error (No valid SAP Crypto configuration) is related to SSL
configuration in HANA I would contact the HANA Administrator to look into this issue Of course it would be
great if you could provide some insight
However I have no clue regarding the first error Request your help and cooperation in this regard
The initial issue of not finding the HttpDestination which I created still persists
Thanks for all your help
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 18Oct 31 2014 342 PM
First of all you would never use the workspace name It isnt ever part of anything It is only the package
structure that counts The first item in your list is the only one with the correct package Off hand it looks right to
me You are supposed to supply the full package path Have you configured this HTTP Destination in the XS
Admin tool yet
Tarasankar Banerjee in response to Thomas Jung on page 18Oct 31 2014 326 PM
Updated it Thanks
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 18Oct 31 2014 313 PM
Your comment got cut off We never really get to see what your problem is
Tarasankar Banerjee in response to Thomas Jung on page 21Oct 31 2014 256 PM
Thanks Thomas
I am facing as issue while trying to use an HTTP Destination I understand that the xshttpdest and xsjs file
need to in the same folder Following is the structure of my test project
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010019
As you can see the HTTP Destination and the XSJS files are in the same folder services The workspace
name is XS_Workspace and the package structure is as follows
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010020
Now I am trying to read this destination
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010021
When I am using full package structure destination_package =
rootworkTara02XSTest01XSHttpTest01services I am receiving the
error message httpreadDestination destination not found (package
rootworkTara02XSTest01XSHttpTest01services name XSHttpDest01)
On using the workspace name destination_package = XS_Workspaceservices I am receiving the
error message User is not authorized to use destination (package XS_Workspaceservices name
XSHttpDest01)
On using destination_package = rootworkTara02XSTest01services also I am receiving the error
message User is not authorized to use destination (package rootworkTara02XSTest01services
name XSHttpDest01) Strangely the services folder is not directly under XSTest01
Lastly I deliberately gave a wrong service name destination_package = XS_Workspaceservices and
destination_name = XSHttpDest02 But even then I received the error message User is not authorized to
use destination (package XS_Workspaceservices name XSHttpDest02) not that the destination is not
found
Could you please help me to resolve this issue
Thanks a lot for your helps
Regards
Tarasankar
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010022
Thomas Jung in response to Tarasankar Banerjee on page 22Oct 30 2014 152 PM
Since SPS06 its possible to use outbound HTTP destinations and to call out to external services using XSJS
Thomas Jung in response to Tarasankar Banerjee on page 22Oct 30 2014 150 PM
gtSo when the program runs in server would it automatically consider the OS user credentials
No It doesnt automatically use anything You have to specific the user and password that you want to use for
the proxy Although many proxy servers dont require a username and password
Tarasankar Banerjee in response to Thomas Jung on page 23Oct 30 2014 707 AM
Hi Thomas
Just watched the video you shared above Thanks a lot for it It is really informative and helpful
Regards
Tarasankar
Tarasankar Banerjee in response to Tarasankar Banerjee on page 22Oct 30 2014 346 AM
Got answer for the second point SAP HANA XS Administration Tool is the place to configure Proxy settings
Regards
Tarasankar
Tarasankar Banerjee in response to Tarasankar Banerjee on page 22Oct 29 2014 314 PM
Dear Thomas
another question is that does the proxy settings in the HttpDestination refer to the OS user of the HANA
server We specify useProxy as true and authType as basic in the HttpDestination but not maintain any
user credentials So when the program runs in server would it automatically consider the OS user credentials
Thanks
Regards
Tarasankar
Tarasankar Banerjee in response to Thomas Jung on page 23Oct 29 2014 132 PM
Thanks Thomas I am currently checking this option only
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010023
My current requirement is to fetch Weather Data and Social Media data from various OData services and store
them in HANA for further analysis What might be the best way for this I am currently checking the option of
creating an XS application which would connect to the external services fetch the data and save that in HANA
using DB Connection Is this the best way Or should we try to use JAVA or some other way
Your valuable suggestions are most welcome Thanks
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 23Oct 29 2014 1256 PM
gtHowever is it possible to consume XSODATA service from XSJS instead of using DB Connection
You can via an outbound HTTP destination although I certainly wouldnt recommend it It would be rather
complex and not well performing
gtAlso is it possible to consume data from external OData services for weather data social media data etc from
XSJS
Sure with the same Outbound HTTP Connectivity
httpswwwyoutubecomwatchv=fWirvj9l7eY
Maintaining HTTP Destinations - SAP HANA Developer Guide - SAP Library
Tarasankar BanerjeeOct 29 2014 1119 AM
Dear Thomas
Thanks for the great blog
I am able to connect to Database and execute queries from XSJS service However is it possible to consume
XSODATA service from XSJS instead of using DB Connection
Also is it possible to consume data from external OData services for weather data social media data etc from
XSJS
If possible it would be great if you could provide some code sample or guidelines
Thanks
Regards
Tarasankar
Thomas Jung in response to Weiping Lu on page 24Sep 25 2014 833 AM
Please refer to service note 1849775
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010024
httpservicesapcomsapsupportnotes1849775
I believe it will address your issue
Weiping LuSep 24 2014 519 PM
Hi Tom
Great post and videos I have a tough issue calling a HANA procedure from XS takes gt 5min but from HANA
studio lt 1 min Were using Amazon AWS rev 70 and 73 Any help will be greatly appreciated
Thanks
WPL
Thomas Jung in response to Su Srikanth on page 24Aug 11 2014 253 PM
You transport XSODATA services like you would any other repository content - via a Delivery Unit
Su SrikanthAug 11 2014 750 AM
Hi Thomas
Great blog
Ive a query here - we create the odata services(andor URLs created to view in the web browser) in
development environment now if we have to transport it to the quality andor production environment how
can we do this - is the same as importexport or is there any specific way to do please help with any useful
pointers
Many thanks as always
Su
Thomas Jung in response to ARSHAD SHAIKH on page 24May 15 2014 231 PM
Ive never written any blogs on calculation views I dont cover that topic That is why I suggested you ask your
question in the proper SCN forum
Although looking at your your above SQL Statement I dont see why you couldnt do this directly in XSODATA
off of the table STATUS without the need for the calculation view or the SQLScript Procedure
ARSHAD SHAIKH in response to Thomas Jung on page 25May 15 2014 1154 AM
Hello Thomas
I am new to hana Please suggest me the blogs of you related to calculation view that calling
procedures(procedures have out parameter)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010025
I am trying to fetch the result of procedure in calc view and want to create odata service for that calculation
view
procedure code goes like this
---------------------------------------
CREATE PROCEDURE TWEETS_TODAY(OUT OP BIGINT)
language SQLSCRIPT sql security invoker default schema SOCIAL360 reads sql data as
BEGIN
SELECT COUNT() INTO OP FROM SOCIAL360STATUS WHERE CREATED_AT = CURRENT_DATE
END
calc view code goes like this
----------------------------------------
Begin Procedure Script
BEGIN
DECLARE OP BIGINT
CALL SOCIAL360TWEETS_TODAY(OPvar_out)
END End Procedure Script
Thanks
-Arshad
Thomas Jung in response to ARSHAD SHAIKH on page 25May 15 2014 944 AM
Your question seems to have no relation to the content in this blog Please consider instead asking general
HANA questions in the appropriate SCN Forum
ARSHAD SHAIKHMay 15 2014 917 AM
Hi Thomas
I want to call procedures in calculation view (procedures have out parameter)
Please suggest me step by step procedure with example and supporting documents
Thanks
ARSHAD SHAIKH
Henrique Pinto in response to Blair Krotenko on page 26Apr 16 2014 711 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010026
Hmm not really sure of that I see it but that might be because Im an employee
But the NET development partner I was working with was not enrolled in any kind of beta testing program and
they were able to download it so I guess you should as well
Make sure to go in the Installation and Upgrades menu and not the Support Packages and Patches
Go to httpservicesapcomswdc -gt Installations and Upgrades -gt Browse our Download Catalog -gt SAP In-
Memory (SAP HANA) -gt SAP HANA ADONET 10
Best regards
Henrique
Blair Krotenko in response to Henrique Pinto on page 26Apr 16 2014 656 PM
Thanks for the info Henrique but I cant find it I dont know if it is an authorization issue or do we need to be a
ramp-up customer to dl and use a beta product
Thanks
Blair
Henrique Pinto in response to Thomas Jung on page 27Apr 16 2014 614 PM
The ADONET provider is available for download in the SAP Service Marketplace (in beta edition so far)
Thomas Jung in response to Kamal Jain on page 26Apr 16 2014 514 PM
For general OData structure and syntax I find that the Odataorg website is very helpful For example on this
topic
httpwwwodataorgdocumentationodata-version-2-0uri-conventions
The syntax of a $expand query option is a comma-separated list of Navigation Properties Additionally each
Navigation Property can be followed by a forward slash and another Navigation Property to enable identifying a
multi-level relationship
The page also has some sample URLs
Kamal JainApr 16 2014 536 AM
Dear Thomas
I agree that we need to pass all the associations in the expand I tried with some of options but was not
through
Now i just tried with below syntax and able to achive Thx
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010027
httpdewdftzld025pgdevsapcorp8000DTHCPXSZPMIS_PRO_ACTUALxsodata
ZPROHEADER(PR07_000002)$expand=ZACTUZEMPD
Regards
Kamal Jain
Thomas Jung in response to Blair Krotenko on page 27Apr 15 2014 623 PM
We do plan to release an ADONET provider specific to HANA in the near future This would probably be the
best option for consumption from NET Until then I would think that ODBC is probably the next best option It
gives you generally easy portability from already existing database code You could consume OData as well
although that is more generally consumed from the UI layer itself It guess it somewhat depends upon where
you are calling the service from in your NET application
Blair KrotenkoApr 15 2014 409 PM
Hi Thomas
We are looking at consuming HANA data in a NET application and from what I can see there are 2 options -
OData and ODBC It seems to me that OData might be the better option when consuming HANA data in an XS
application while ODBC might be the better option for NET What are your thoughts Is there a paper on this
subject I havent been able to find a comparison document for this Are there any security caveats to be aware
of for these options
Thanks
Blair
Thomas Jung in response to Kamal Jain on page 27Apr 15 2014 136 PM
You have to list both associations in the expand on the URL if you want both relationships to be processed
Kamal JainApr 15 2014 1249 PM
Hi Thomas
Thx for valuable and useful information
I have an query regarding XS Odata service creation for more than 2 tables and get all the data in one
command
There is req in which service needs to be created for 3 tables to get data from all these
First table has Project ID as key second table has composite
ProjectID and Employee Id as key and third table has Employee id as
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010028
key
So if I create navigation for first 2 tables based on project id and use expand comand than its working fine and I
can see data of both the tables
Further if I add navigation for third table also as below then below expand is displaying data for first two tables
only Pls share how to use expand command in this case if possible to get all tables data based on project id
How to use navigation ZEMPD here
httpdewdftzld025pgdevsapcorp8000DTHCPXSZPMIS_PRO_ACTUALxsodata
ZPROHEADER(PR07_000002)$expand=ZACTUamp
service namespace
DTHCPXS
DTHCPDTHCPDBHCP_PROJECT_HEADER
as ZPROHEADER
navigates (PROJECT as
ZACTU)
DTHCPDTHCPDBHCPT_ZPMIS_ACTUAL
as ZACTU
navigates (EMPLOYEE as
ZEMPD )
DTHCPDTHCPDBHCP_ZPMIS_RES_MASTER
as ZEMPD
association PROJECT principal
ZPROHEADER(PROJECTID)
multiplicity 1 dependent
ZACTU(PROJECTID) multiplicity
association EMPLOYEE principal
ZACTU(EMPLOYEEID)
multiplicity 1 dependent
ZEMPD(EMPLOYEEID) multiplicity
1
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010029
Pls suggest if there is anything to add or correct in XS odata service syntax above
Regards
Kamal Jain
Vikas Madaan in response to Thomas Jung on page 29Apr 14 2014 458 PM
Thanks Thomas
Under which component
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 29Apr 14 2014 450 PM
No this isnt a known issue Ive seen Nor can I recreate the problem in my system No you cant maintain the
authentication in XSHTTPDEST itself It intentionally must be set in XSADMIN tool I can really only suggest
that you open a support ticket
Vikas MadaanApr 14 2014 431 PM
Hi Thomas
I am trying to pull data from SAP system onto HANA Database using XSJOB files I am calling RFC enabled
function modules over HTTP request It helps me replicating the real time ECC data onto HANA as well with
back ground jobs
I am facing one problem in the XSHTTPDEST file I am able to create and activate the file using studio and this
file is even visible in the web based XS administration tool But in the web based tool when i provide user and
password for basic authotication then system just clears the user id and password when i try to save This the
reason our HTTP requests are getting failed and below is the response we are getting in the response body
lthtmlgtltheadgtlttitlegtLogon Error Messagelttitlegt
Is this known issue or we are missing something Is it possible to provide user and password in the
XSHTTPDEST file Is there any particular syntax
I checked and i have the required authorizations as well develper Guide
Please help
Regards
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010030
Vikas Madaan
Abdul HakimFeb 22 2014 359 AM
Hi Thomas - Any recommended book or resource to learn and master Server Side Javascript There were
many books available in the market but as a beginner need to know the right resource book to start with and
master this stuffAlso whether SAP plan to conduct any training to teach Server Side Javascript similar to other
standard training offerings
Thanks
Hakim
Samuel Tanor-GyeduFeb 20 2014 839 AM
Thanks Thomas
I will definitely have a look at SHINE
Thomas Jung in response to gentilini andre on page 30Feb 19 2014 422 PM
Difficult to say what is wrong I several things which are different than our sample that does this You are using
a POST for instance instead of a GET However if you are gettting a 200 then I assume the service call is
correct In client side tools (like Chrome Developer Tools) you should be able to see the response object from
the call
However what I would really recommend is that you study the SHINE content (SAP HANA Interactive
Education) There is already a sample application which does this in SHINE Also it has some special
JavaScript in the UI to handle the file attachment via AXAJ call Perhaps that is the part you are missing
You can read more about SHINE here It is also included already installed in the latest version of the HANA
Developer Center trial image (SP7 based)
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
gentilini andreFeb 19 2014 325 PM
Hi Thomas
well I followed your hints but it still donacutet work
I created a xsjs File like below
function downloadExcel()
try
var body =
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010031
alert(drin)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
alert(drusse)
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount
tTax Amount tNetto Amount tCurrency n
while(rsnext())
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
catch (e)
alert(db conn funktioniert nicht)
var a = $requestparametersget(cmd)
$responsesetBody(Invalid Command +a)
switch (a)
case doex
$responsesetBody(Invalid Command +a)
alert(filedownload)
thisdownloadExcel()
break
default
$responsestatus = $nethttpINTERNAL_SERVER_ERROR
$responsesetBody(Invalid Command +a)
The Controllerjs File
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010032
doFileDownload function (oEvent)
jQuerysaprequire(sapuicommonsMessageBox)
sapuicommonsMessageBoxshow(Export Starten sapuicommonsMessageBoxIconconfirm
Information)
sapuicommonsMessageBoxconfirm(Export starteninform Confirmation)
return false
function inform(rValue)
alert (drinnnnne)
var aurl = FileDownloadxsjscmd=doex
if(rValue) If User presses Ok
alert(aurl)
jQueryajax(
url aurl
method POST
dataType json
datacmddoex
success sapuicommonsMessageBoxalert(Export wird ausgefuumlhrtConfirmation)
errorfunction onErrorCall(jqXHR textStatus errorThrown)
alert(jqXHRstatus)
sapuicommonsMessageBoxshow(jqXHRstatus
ERROR
Error in calling Service )
return
complete sapuicommonsMessageBoxalert(Export Erfolgreich
abgeschlossenConfirmation)
)
return false
else If the user presses Cancel
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010033
sapuicommonsMessageBoxalert(Vorgang abgebrochenNotification)
)
at last but not least the view
sapuijsview(zag1_ui_cv_03Index
Specifies the Controller belonging to this View
In the case that it is not implemented or that null is returned this View does not have a Controller
memberOf zag1_ui_cv_03Index
getControllerName function()
return zag1_ui_cv_03Index
Is initially called once after the Controller has been instantiated It is the place where the UI is
constructed
Since the Controller is given to this method its event handlers can be attached right away
memberOf zag1_ui_cv_03Index
createContent function(oController)
create a lite button with an icon and a text
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010034
lite true
)placeAt(btn)
oButton3attachPress(oControllerdoFileDownload)
var oButton4 = new sapuicommonsButton(
text Refresh
icon imagesrefreshjpg
lite true
press function() var data = oTableval()
if(data == )
alert(no data found)
return
print(content)
print(DatArray)
if (data = )
alert(Funzt)
JSONToCSVConvertor(data CUSTOMER AMOUNT true)
)placeAt(btn)
jQuerysaprequire(sapuitableTable)
create table control with properties
var oTable = new sapuitableTable(
width 100
rowHeight 50
title Amount per Partner
selectionMode sapuitableSelectionModeNone
)
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Company Name
)
template new sapuicommonsTextView(
text CompanyName
)
sortProperty CompanyName
))
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010035
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Partner ID
)
template new sapuicommonsTextView(
text PartnerId
)
sortProperty PartnerId
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Postal Code
textAlign sapuicoreTextAlignEnd
)
template new sapuicommonsTextView(
text PostalCode
textAlign sapuicoreTextAlignEnd
)
sortProperty PostalCode
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text City
)
template new sapuicommonsTextView(
text City
)
sortProperty City
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Purchase ID
)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010036
template new sapuicommonsTextView(
text PurchaseOrderId
)
sortProperty Currency
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Lifecycle Status
)
template new sapuicommonsTextView(
text LifecycleStatus
)
sortProperty LifecycleStatus
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Gross Amount
)
template new sapuicommonsTextView(
text GrossAmount
)
sortProperty GrossAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Tax Amount
)
template new sapuicommonsTextView(
text TaxAmount
)
sortProperty TaxAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Amount Netto
)
template new sapuicommonsTextView(
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010037
text CM_NET_Amount_001
)
sortProperty CM_NET_Amount_001
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Currency
)
template new sapuicommonsTextView(
text Currency
)
sortProperty Currency
))
var oModel = new sapuimodelodataODataModel
(httpqperiorvmcldsr8000ZAG1_WS_001ZAG1_CV_001xsodata false)
oTablesetModel(oModel)
oTablebindRows(Amount)
return oTable
)
It wonacutet call the function or better said the action of the button works fine till to the point where it should call the
xsjsfile to generate the excel-file I wondered that in the ajax part the error- success- and complete-part will
be executed at the same time and not only one of this statements The message is 200 (The request has
succeeded The information returned with the response is dependent on the method used in the request)
Maybe you can see where my mistake is or whats going wrong
Iacuteve the developer edition on cloudshare (Hana Studio rev68 Server is on SPS05)
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010038
Andreacute
Thomas Jung in response to Samuel Tanor-Gyedu on page 38Feb 19 2014 523 AM
I dont think I can help you This appears to a question about how odata4j works not about XS I have no
experience with odata4j myself
Samuel Tanor-GyeduFeb 18 2014 913 AM
Hi Thomas
I have an odata service with this endpointhttpss5hanaxshanatrialondemandcomservicesUserxsodata
I am now trying to consume it from eclipse with the odata4j libraries
This is how I get the endpoint
public UserServiceOdata(String endpointUri)
thisendpointUri = endpointUri
ODataConsumerdumpresponseHeaders(true)
consumer = ODataConsumerscreate(endpointUri)
This is my method to add a user
public User addUser(User user)
consumercreateEntity(entitySet)properties(OPropertiesint32(propertyUserId
usergetId()))properties(OPropertiesstring(propertyUserName
usergetName()))properties(OPropertiesstring(propertyUserEmail usergetEmail()))execute()
return user
When I call addUser method I get an Error
Caused by javaxxmlstreamXMLStreamException ParseError at [rowcol][78253]
Message The reference to entity sourceUrl must end with the delimiter
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010039
When I use this endpoint httpss5hanaxshanatrialondemandcomservicesUsersvc everything works fine
With the httpss5hanaxshanatrialondemandcomservicesUserxsodata I get errors
Please I would be very grateful for assistance
Thanks in advance
Regards
Samuel
Thomas Jung in response to gentilini andre on page 39Feb 18 2014 431 AM
You have a fundamental misunderstanding here You are placing server side JavaScript code in your client
side UI5 application The function downloadExcel is something you need to execute on the server It needs to
be in an XSJS file and it is called from the client side via AJAX - as a REST service not as a local function
gentilini andreFeb 17 2014 451 PM
Hello Thomas
Thank you for this great How-To Guide
Iacutem pretty new in SAPUI5 and tried your export-sample in my little trial project but it doesnacutet work
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010040
My Button for this looks like
ltcodegt
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
lite true
press function() alert(oButton3getText())
downloadExcel()
ltcodegt
and the function for this action looks like
ltcodegt
function downloadExcel()
var body =
alert(drin)
print($query)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount tTax
Amount tNetto Amount tCurrency n
while(rsnext())
if(rsnext() == )
alert($responsesetBody( Failed to retrieve data ))
alert($responsestatus = $nethttpINTERNAL_SERVER_ERROR)
else
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010041
ltcodegt
Iacutem afraid and hope that you can help me
Kind regards
Andreacute
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1246 PM
gtIs there any restriction or development limitation in the XSJSLIB files
Thats a very general question Difficult to answer without any context
Vikas Madaan in response to Thomas Jung on page 41Feb 11 2014 1245 PM
Thanks Thomas
I think we are on same page
Once quick question that came to my mind Is there any restriction or development limitation in the XSJSLIB
files
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1230 PM
gtCould please help me in understanding in more advantagesdisadvantages for both techniques
Youve summarized it pretty well already
gtbecuase i dont want to use both the approaches
Even with the CRUD support and exits in XSODATA its still pretty hard to do 100 via XSODATA There are
still valid use cases for XSJS when you need custom body custom read processing job scheduling etc Its
good to try and use XSODATA whenever possible but I wouldnt automatically exclude the use of XSJS
Vikas MadaanFeb 11 2014 1008 AM
Hi Thomas
Thanks a lot for sharing useful information through various blogs
In my current project we are evaluating use of XSOData or XSJS applications I saw your videos like the one
mentioned below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010042
httpwwwsaphanacomdocsDOC-4376
Want i understood from various blog is this
From SP7 we can write exsits in the OData services and it is very easy to consume at the client side just like
any REST base service and from my understanding it is Scalable as well I would love to use XSOData always
becuase development effort is very less compare to XSJS and it is very easy to rampup the team on OData
related development objects
XSJS were as provide more control becuase of server side scripting becuase it allows development on the
server side using JavaScript Core APIs of SAP HANA Extended Application Services are therefore exposed
as JavaScript functions providing easy access to the HTTP Request and Response object as well database
access to execute SQL or call SQLScript Procedures It provide us control over the body format and and URL
parameter definition
Could please help me in understanding in more advantagesdisadvantages for both techniques
I am very keen to understand and also explain the same to team members becuase i dont want to use both the
approaches and even sometimes customer can also ask the same to us
Also If we are on SP6 then from my understanding XSJS provides us more capability in terms of complex
application Corrent me If i am wrong
Thanks
Regards
Vikas Madaan
Thomas Jung in response to Raghuveer Phull on page 42Feb 5 2014 312 PM
Yes there are videos on the CRUD features of XSODATA which were new in SP6
For more on CRUD support in SP6 see this video
oData CreateUpdateDelete Support in SAP HANA SPS6
For the extended support for XSJS exits in SP7 see this video
SAP HANA SPS 07 XSODATA Exits in XSJS
Raghuveer PhullFeb 5 2014 122 AM
Do you have an exampledocumentationvideo where you can write a service which will populate Hana DB
What I am asking for is a way for my external script to populate the DB tables i have created in Hana DB
Thomas Jung in response to reda miraoui on page 43Jan 29 2014 411 PM
The source code for the examples shown here are shipped as part of SHINE (SAP HANA Interactive
Education)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010043
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Vivek Singh Bhoj in response to reda miraoui on page 43Jan 29 2014 352 PM
Hi Reda
You can import Shine Content in HANA and then check all these source codes
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Regards
Vivek
reda miraoui in response to Thomas Jung on page Jan 29 2014 344 PM
Hey Thomas
Is it possible to download source code of your project from this HANA tutorial
Thanks
Reda
Thomas Jung in response to Abdul Hakim on page 43Nov 21 2013 1133 PM
Yes River can be used as an alternative and when activated it will generate Server Side JavaScript andor
SQLScript
Abdul Hakim in response to Thomas Jung on page 44Nov 21 2013 747 PM
Hi Thomas - Was going through blog regarding River (RDL)Just a question on this
When you say Programming language for HANA native development is Server side Javascript SQL SQL
ScriptOnce RDL is rolled out whether RDL can be used for native application development instead of Server
side Java script SQL SQL Script I am very much new to this stuff so appreciate if you can also help on
how to get started with Server Side Java script SQL SQL Script for HANA
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 30 2013 750 AM
Hi Thomas
Thanks for your response I am talking about more content on shine
thanks
Ashutosh
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010044
Baskar Gopalakrishnan in response to Thomas Jung on page 44Oct 30 2013 1249 AM
Hi Thomas
Im a SAP PI Middleware consultantSAP topic leader in XIPI heavily worked on Java related
Netweaver stack I have knowledge in ABAP but not worked heavily in abap I have enrolled your sap hana
native application development course I feel very interesting I did work heavily in java and javascript projects
using eclipse development tool Do you think if I invest my time in just native hana development and proceed
in HANA field is a good step I dont have BW experience either
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 819 PM
Thanks for the clarification Much appreciated
Thomas Jung in response to Abdul Hakim on page 44Oct 29 2013 120 PM
gtABAP Close to HANA means whether we can expect a similar 2 tier architecture similar to HANA XS in the
future or what does that mean
No it doesnt mean that ABAP will become a 2 tier architecture We will not move the ABAP VMKernel into
HANA itself It will remain a separate application server At least for the current plansforeseeable future What
he was referring to was bringing the programming models closer For instance the new 740 SP5 feature that
allows you to write SQLScript directly within an ABAP class method
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 650 AM
Thomas - Thanks for the clarificationMuch appreciatedI was listening to ABAP on HANA session by
Thorsten Schneider this year Teched and he was mentioning that SAP Plans to bring ABAP very close to
HANA in the coming future but not much details have been discussed in the sessionABAP Close to HANA
means whether we can expect a similar 2 tier architecture similar to HANA XS in the future or what does that
mean
Thanks
Hakim
Thomas Jung in response to Abdul Hakim on page 45Oct 28 2013 703 PM
gt whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the option is
recommended by SAP then kindly share the pros and cons of each of the item
Taken from the TechEd CD103 session slides
Guidance
bulluse ABAP for optimization of existing progams (in context of SAP Business Suite or BW)
bullconsider HANA Native Development for development of new applications which will solely run on SAP HANA
bullcombine ABAP and HANA Native Development to enrich existing applications (eg SAP HANA Live Fiori)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010045
ABAP
bullapplications follow 3-tier architecture
bullABAP is in general database agnostic but with release 74 optimized for SAP HANA
bullProgramming language ABAP ABAP OO with the option to use SAP HANA features
bullIDE eclipse-based ABAP Development Tools
HANA Native Development
bullapplications follow 2-tier architecture
bullHANA Native Development is SAP HANA specific and embedded in the database
bullProgramming language River server-side JavaScript SQLSQLScript
bullIDE eclipse-based SAP HANA Studio + web IDE
Thomas Jung in response to ashutosh dixit on page 45Oct 28 2013 701 PM
gtIs there any more demos for the SHINE
Im not exactly sure what you mean by that We are building additional content for SHINE that will be delivered
in SP7
Abdul HakimOct 28 2013 326 PM
Thomas - Let us say a customer is running SAP Netweaver 74 ABAP with HANA DB and they have HANA
extended service as wellIf the customer wants to do new developments then what is the recommendation
from SAP ie whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the
option is recommended by SAP then kindly share the pros and cons of each of the item (SAP Netweaver 74
ABAP Vs SAP HANA XS)
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 28 2013 221 PM
Hi Thomas
Thanks a lot for your its working now
Is there any more demos for the SHINE
Thanks
Ashutosh
Thomas Jung in response to ashutosh dixit on page 46Oct 25 2013 809 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010046
As this content is now standard in SP6 as part of SHINE (SAP HANA INteractive Education) there also some
setup instructions on helpsapcom
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Basic points to check - have you generated the synonyms in the data generator Ran the data generator to
create some data Have the role assigned Added client 001 to your user profile
ashutosh dixitOct 24 2013 130 PM
Hi Thomas
Amazing blog - once again Thomas thanks
I have been following you for many days attended your OPEN SAP course also
That was an amazing course for new learner like me
One of our client is looking forward for XS based search Application identical to what you have created in your
DEMO
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010047
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010048
But I am not able to fetch the data on blank HTML page is coming with no data
If there is any step by step document related to this please help in getting that
Any help will be highly appreciated
Thanks
Ashutosh
Naveen KumarSep 26 2013 1130 AM
Good Document
Heber FabianoAug 27 2013 323 PM
Great content as always Keep sharing with us
Thomas Jung in response to Orel Stringa on page 48Aug 27 2013 147 PM
This is currently not possible The CORS support is for all origins We dont yet have the feature to maintain a
whitelist of CORS origins
Orel Stringa in response to Thomas Jung on page Aug 27 2013 801 AM
Hi Thomas
nice to see that SAP has made it possible with SP6 to specify cross origin resource sharing (CORS) support
via the xsaccess file SP6 HANA development guide has example of how to specify CORS support
I have build an XS application and would like to serve SAPUI5 on a diffhost than XSHANA
How can I specify that I would like to allow cross origin access restricted to certain domain(s) only
Is there a special keyword syntax for specifying that
Thank yoi
Orel
Vijay UthayakumarAug 27 2013 131 AM
Highly informative amp digestible Fantastic work
Jerry WangAug 1 2013 955 AM
Hi Tomas
Thank you
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010049
Jerry
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 644 PM
JSLint checks are very strict and often produce syntax errors for items that just stylistic and wont actually
cause an error upon activation or runtime You can either ignore the JSLint errors or deactivate JSLint for this
project in these cases However it might also be an indication that the JavaScript code you are trying to import
isnt compatible with Strict mode
httpsdevelopermozillaorgen-USdocsWebJavaScriptReferenceFunctions_and_function_scope
Strict_mode
Milan Vrozina in response to Thomas Jung on page 49Jul 21 2013 624 PM
Thanks for clarification I thought there would be some kind of import
But anyway in case of this specific library I have some problems with JSLint validation when I do cut and paste
of the original code
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 343 PM
What kind of problem are you having using this library Strict mode JavaScript which doesnt try to access the
DOM Window or other client side specific objects should work in Server Side XSJS Generally if you have a
library you just cut and paste into your XSJS or an XSJSLIB file and then call the functions from your code
Milan VrozinaJul 21 2013 339 PM
Hello
first and foremost thank you for perfect openSAP classes related to HANA development and for this blog as
well
I have one question related to server-side javascript You mentioned in course that is possible to use 3rd party
libraries or reuse 3rd party code But I cant find a possible way how to import 3rd party javascript library -as
is- to server and use it For example I would like to use JSZip library to zip some file before sending it to client
from xsjs application Is that possible Thank you
Chandrashekhar MahajanJul 3 2013 734 PM
This is excellent blog Now HANA XS is very much clear to me
Mohan krishnaJul 1 2013 144 PM
WOW - great blog Thomas This will be very helpful in understanding SAP hana Good Job
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010050
Abdul Hakim in response to Thomas Jung on page 50Jun 27 2013 833 PM
Thanks for the clarification
Thomas Jung in response to Abdul Hakim on page 50Jun 27 2013 659 PM
HANA Extended Application Services uses SQLScript and JavaScript as its two primary programming
languages
gtwhether the current SAP Business suite based on ABAP will be completely migrated to HANA service
No The Business Suite already runs on HANA but still via the ABAP application server It will continue to
leverage HANA via a combination of enhancements to ABAP and utilizing some of the technologies described
in this blog
gtAlso whether ABAP can be used to built application in HANA extended services
No There is no ABAP language container in HANA Extended Application Services
Abdul HakimJun 27 2013 405 PM
Hi Thomas - What is the programming language used for HANA Extended application services
As HANA is more than a database ie application platform by itself and as you mentioned that more and more
applications will be built on HANA i have question as how the future SAP ERP system looks likewhether the
current SAP Business suite based on ABAP will be completely migrated to HANA service in the future or SAP
ABAP server will continue to evolve and receive focus investment from SAP Also whether ABAP can be used
to built application in HANA extended services Your thoughts
Thanks
Abdul Hakim
Thomas Jung in response to Ravindra Channe on page 50Jun 11 2013 830 PM
Yes it is still planned However we are still a couple of weeks away and Ive not seen the final installers to say
for certain its there
Ravindra ChanneJun 11 2013 815 PM
Hi Thomas
Thanks for a wonderful and very informative blog Is there any update on 32 bit REGI file
Is it expected along with SPS6
Regards
Ravi
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010051
Thomas Jung in response to Amanda Rzepka on page Jun 7 2013 942 PM
gtCan the XS Services be used in a BW on HANA Scenario
Yes XS is part of ALL HANA systems You should check and make sure you are licensed for direct access to
the underlying HANA instance however
Thomas Jung in response to Holger Schimanski on page Jun 7 2013 941 PM
gtIs there a similar library which could be used in XS Engine
The XSODATA development object is similar We also have higher level frameworks for XMLA and Search
Services (InA) You can expect more such high level frameworks to be added to the HANA Extended
Application Services in the future
Thomas Jung in response to Manav Mehra on page Jun 7 2013 939 PM
Have you used something like the Chrome developer tools to see see if you are getting any client side
javascript errors or to see if the request to your xsodata service is successful
Thomas Jung in response to Christian Hufnagl on page 52Jun 7 2013 938 PM
It will ship as non-automatic content in SPS6 (all systems will have it and it just needs to be imported) The
delivery units are also part of this weeks updates to the Cloudshare and AWS developer center images They
are also available for download as part of the content of the openSAP course
Thomas Jung in response to Matthew Pickell on page 51Jun 7 2013 937 PM
CORS support will come with SPS6 at the end of June
Thomas Jung in response to Jeroen Custers on page 51Jun 7 2013 936 PM
gtWill this bug be fixed in HANA ver 56
Personally Ive still experienced this bug in SPS6 internal builds Must be a tricky one to find Luckily the
workaround of closing and reopening isnt too difficult Just annoying This also probably makes the bug low
priority
Jeroen Custers in response to Vivek Singh Bhoj on page 52Jun 7 2013 411 PM
This issue also occurs on rev56
Matthew PickellJun 7 2013 258 PM
Thomas
Has CORS been included in a release yet
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010052
Vivek Singh Bhoj in response to Chandra Edem on page 52Jun 5 2013 601 AM
Hi Chandra
Date for Week1 Assignment has been extended till June 11
So you can give Week 1 Assignment now
Christian HufnaglJun 4 2013 543 PM
Hi Thomas
thank you for the interesting tutorial
Can you tell me whether it is possible to download the source code of the ldquoPutting it all togetherrdquovideo And if yes Where can I download itThanks
Christoph
Vivek Singh BhojJun 4 2013 1116 AM
Hi Thomas
Thanks for OpenSAP classes
Your Youtube Account also have very good exercises
IN OpenSAP Week 2 Unit 3 tutorial after assigning admin role to my user Id i am not able to see sequences
synonyms triggers under my schema or any other schema i am only able to see Column Views Procedures
Tables and Views
Though now i am able to insert data into my created table
Can you let me know how i will be able to see Sequences under my schema without removing the admin role
I am using HANA revision 52
Got to know from OpenSAP that
This is a known issue and the only way that Ive seen to fix it is to actually close the studio and open it again
then refresh the node
Cheers
Rich Heilman
SAP HANA Product Management
Will this bug be fixed in HANA ver 56
Chandra Edem in response to Thomas Jung on page 53Jun 4 2013 646 AM
Thomas
I registered for OpenSAP course Introduction to Software Development on SAP HANA on June 2 900PM
I didnt know that it is going to end WEEK1 assignment test on 632013 300PM Is there any way can take
that WEEK1 Assignment Test
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010053
Thanks
Chandra
Thomas Jung in response to Alexander Bauer on page Jun 3 2013 856 PM
SAPUI5 gets updated auutomatically when you apply HANA revisions There is no additional download or
update needed
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+01004
Figure 3- Project Wizards for XS Based Development
These features also include team management functionality All development work is done based upon
standard Eclipse projects The project files are then stored within the SAP HANA Repository along with all the
other resources From the SAP HANA Repository browser view team members can check out projects which
have already been created and import them directly into their local Eclipse workspace (Figure 4)
After projects have been imported into the local Eclipse workspace developers can work offline on them You
can also allow multiple developers to work on the same resources at the same time Upon commit back to the
SAP HANA Repository any conflicts will be detected and a merge tool will support the developer with the task
of integrating conflicts back into the Repository
The SAP HANA Repository also supports the concept of activeinactive workspace objects This way a
developer can safely commit their work back to the server and store it there without immediately overwriting
the current runtime version It isnt until the developer chooses to activate the Repository object that the new
runtime version is created
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+01005
Figure 4 - Repository Import Project Wizard
For a deeper look at the basic project creation and Repository object management within SAP HANA Studio
please view the following videos on the topic
OData ServicesThere are two main parts of the SAP HANA Extended Application Services programming model The first is
the ability to generate OData REST services from any existing SAP HANA Table or View The process is
quite simple and easy From within an SAP HANA Project create a file with the extension xsodata Within this
service definition document the developer needs only to supply the name of the source tableview an entity
name and if using an SAP HANA View the entity key fields
For example if you want to generate an OData service for an SAP HANA table named techedepmdb
businessPartner in the Schema TECHEDEPM this would be the XSODATA definition file you would create
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+01006
service namespace saphanademocontentepm TECHEDEPMtechedepmdbbusinessPartner as BUYER
Figure 5 - XSODATA Service Definition and Test
Upon activation of this XSODATA file we already have an executable service which is ready to test The
generated service supports standard OData parameters like $metadata for introspection (see Figure 6) $filter
$orderby etc It also supports body formats of ATOMXML and JSON (Figure 7 for an example) Because
OData is an open standard you can read more about the URL parameters and other features at http
wwwodataorg
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+01007
Figure 6 - OData $metadata support
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+01008
Figure 7 - Example OData Server JSON Output
The examples in the above figures demonstrate how easily these services can be tested from the web browser
but of course doesnt represent how end users would interact with the services Although you can use a variety
of 3rd party tools based upon JavaScript like Sencha Sencha Touch JQuery JQuery Mobile and PhoneGap
just to name a few SAP delivers the UI Development Toolkit for HTML5 (SAPUI5) standard in SAP HANA
Extended Application Services A particularly strong feature of SAPUI5 is the integration of OData service
consumption not just at a library level but also with special features within the UI elements for binding to OData
services
For example within SAPUI5 you can declare an OData model object and connect this model object to the URL
of the XSODATA service Next create a Table UI element and connect it to this model object Finally you call
bindRows of the Table UI element object and supply the OData entity name you want to use as the source of
the table
var oModel = new sapuimodelodataODataModel (servicesbuyerxsodata false) oTable = new sapuitableTable(testtableId tableID visibleRowCount 10) oTablesetModel(oModel) oTablebindRows(BUYER)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+01009
This creates an UI Element which has built-in events such as sort filter and paging which automatically call
the corresponding OData Service to fulfill the event No additional client side or server side programming is
necessary to handle such events
Figure 8 - OData Bound Table UI Element
For more details on OData service creation in SAP HANA Extended Application Services and utilizing these
services within SAPUI5 please view these videos
Server Side JavaScriptThe XSODATA services are great because they provide a large amount of functionality with minimal amounts
of development effort However there are a few limitations which come with such a framework approach For
example in SAP HANA SP5 the OData service framework is read only Support for Insert Update and Delete
operations is available with SAP HANA SP6
Luckily there is an option for creating free-form services where you can not only perform update operations but
also have full control over the body format and URL parameter definition SAP HANA Extended Application
Services also allows development on the server side using JavaScript (via project files with the extension
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010010
XSJS) Core APIs of SAP HANA Extended Application Services are therefore exposed as JavaScript
functions providing easy access to the HTTP Request and Response object as well database access to
execute SQL or call SQLScript Procedures
In this simple example we can take two numbers as URL Request Parameters and multiply them together and
then return the results as text in the Response Body This is an intentionally basic example so that you can
focus on the API usage
Figure 9 - Simple XSJS Service
However the power of XSJS services comes from the ability to access the database objects but also have full
control over the body output and to further manipulate the result set after selection In this example we use
XSJS to create a text-tab delimited output in order to support a download to Excel from a user interface
function downloadExcel() var body = var query = SELECT TOP 25000 PurchaseOrderId PartnerId to_nvarchar(CompanyName) LoginName_1 CreatedAt GrossAmount FROM _SYS_BICtechedepmdbPO_HEADER_EXTENDED order by PurchaseOrderId $tracedebug(query) var conn = $dbgetConnection() var pstmt = connprepareStatement(query) var rs = pstmtexecuteQuery() body = Purchase Order Id tPartner Id tCompany Name tEmployee Responsible tCreated At tGross Amount n while(rsnext()) body += rsgetString(1)+ t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetTimestamp(5)+t+rsgetDecimal(6)+n $responsesetBody(body) $responsecontentType = applicationvndms-excel charset=utf-16le $responseheadersset(Content-Dispositionattachment filename=Excelxls) $responseheadersset(access-control-allow-origin) $responsestatus = $nethttpOK
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010011
ClosingThis blog hopefully has served to give you a small introduction to many of the new concepts and possibilities
with SAP HANA SP5 and SAP HANA Extended Application Services
Over the coming weeks we will be posting additional blogs with more advanced examples and techniques as
well how to integrate SAP HANA Extended Application Services content into additional environments Likewise
there is a substantial Developerrsquos Guide which expands on many of the concepts introduced here
It is also important to note that while SAP HANA Extended Application Services ships asproductive software (meaning customers can go live in production with it) in SAP HANA SP5 it isa controlled release initially with a special ldquoProject Solutionrdquo program in place around this newfunctionality Please refer to Service Note 1779803 for additional details on the current statusof the Project Solution This Project Solution approach is designed to provide the highest levelsof support possible to initial customers and partners who choose to develop using SAP HANAExtended Application Services It also provides a channel for feedback to Product Managementand development so that we take suggestions and ideas and quickly integrate them into futurerevisions of SAP HANA and SAP HANA Extended Application Services103803 Views Tags sapmentor hana developer code database in_memory sap_mentor hana_devcentersap_hana sapui5 hana_studio xs hde xsjs xsodata
Glen OoiDec 23 2014 345 PM
Hi Thomas
In need of your expert advice
I have a situation where I am using BO Dashboards to create my Dashboard which is consuming the data from
HANA
I have a requirement to allow the user to comment in the dashboard and it will write back to the HANA DB and
also display the comments in the Dashboard
In order for the BO Dashboard to write back to HANA DB is via web services
Is there any way i can create a WSDL URL and consume the XSJS or ODATA services in HANA
Muhammad SadiqDec 10 2014 140 PM
I need your help in writing an API(XSJS service) which will take JSON format data and inserted into HANA
database
Tarasankar Banerjee in response to Thomas Jung on page 14Nov 5 2014 852 AM
Thanks Thomas Could you give an example of how to redirect
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010012
Im facing a strange issue while trying to import weather data from several cities together The issue appears to
be connected with the content of the response object
Following is the code of the Weatherxsjs file
try
var cmd = $requestparametersget(cmd)
var body
var response
var obj
var propertyName
if(cmd === import)
var dest = $nethttpreadDestination(rootworkTara02XSTest01XSHttpTest01 weather)
var client = new $nethttpClient()
var req = new $webWebRequest($nethttpGET group
id=12750041264527127733312732941275339ampunits=metric)
clientrequest(req dest)
response = clientgetResponse()
$responsecontentType = textplain
if(responsebody)
body = responsebodyasString()
obj = JSONparse(body)
body = cmd + n n + responsestatus + n n + responsecontentType
+ n n + responsebody + n n + objgetOwnPropertyNames()
$responsesetBody(body)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010013
$responsestatus = $nethttpOK
catch(e)
$responsecontentType = textplain
$responsesetBody(emessage)
$responsestatus = $nethttpINTERNAL_SERVER_ERROR
Following is the weatherxshttpdest
host = apiopenweathermaporg
port = 80
description = my weather checker
useSSL = false
pathPrefix = data25
authType = none
useProxy = true
proxyHost = ltproxy_detailsgt
proxyPort = ltproxy_port
timeout = 0
On accessing httplthostnamegt8000rootworkTara02XSTest01XSHttpTest01Weatherxsjs
ampcmd=import I am receiving the error message BodyasString unsupported charset specified in
Content-Type header (utf8)
If the body = responsebodyasString() statement is commented out I receive the error message
JSONparse unexpected character because the responsebodyasString() itself could not work correctly
However the URL httpapiopenweathermaporgdata25group
id=12750041264527127733312732941275339 returns data correctly
I am using the same URL in my code
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010014
Could you please advise regarding this issue Thanks for your help
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 14Nov 4 2014 319 PM
gtIs it possible to read files using XS For example some configuration file kept in the server
No there is no API to read from the file system of the underlying operating system You can read the HANA
configuration ini files however because they are exposed via SQL
gtIs it possible to call a html file from the xsjs file Something likerequestgetRequestDispatcher()forward() from
JAVA servlets
In the body of the response you send back to the client your could issue a redirect
Tarasankar Banerjee in response to Tarasankar Banerjee on page 15Nov 4 2014 1034 AM
Hi Thomas
Finally got my application running It is now fetching weather data from external sites
Have two more questions
1 Is it possible to read files using XS For example some configuration file kept in the server2 Is it possible to call a html file from the xsjs file Something like
requestgetRequestDispatcher()forward() from JAVA servlets
Thanks
Regards
Tarasankar
Robert WeberNov 3 2014 1136 AM
If someone is having difficulties with the alert log full on the xsengine
you can do the same trick as for the statisticserver in oder to reset the log area see details in OSS Notes
2019148 and 1950221
The commands are then
select VOLUME_ID from m_volumes where service_name = xsengine
ALTER SYSTEM ALTER CONFIGURATION (daemonini host lthostnamegt) UNSET
(xsengineinstances) WITH RECONFIGURE
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010015
ALTER SYSTEM ALTER CONFIGURATION (topologyini system) UNSET (hostlthostnamegt xsengine)
WITH RECONFIGURE
ALTER SYSTEM ALTER CONFIGURATION (topologyini system) UNSET (volumes ltvolume_idgt) WITH
RECONFIGURE
ALTER SYSTEM ALTER CONFIGURATION (daemonini host lthostnamegt) SET (xsengineinstances) =
1 WITH RECONFIGURE
Then restart the HANA instance and after that make a full backup (and schedule the regular backup in order to
prevent this situation again)
Hope this will help someone like me -)
Have a nice day
Regards
Robert
Tarasankar Banerjee in response to Tarasankar Banerjee on page 15Nov 3 2014 1031 AM
Update
I tried to access the XS Admin console from another user and faced only the No valid Crypto error However
could still update the proxy user details and the sample application successfully ran at last The relevant roles
were provided in Granted Roles not Application Privileges Probably that was the issue earlier
I would check again with new Http Destination and Server side Java Script
Thanks a lot Thomas for all your help
Regards
Tarasankar
Tarasankar Banerjee in response to Thomas Jung on page 18Nov 3 2014 929 AM
Hi Thomas
I also tried to use the sample code from section 841 Tutorial Use the XSJS Outbound API of the HANA
Developer Guide with minor modifications (for package structure proxy settings etc) This time the destination
was found The new project structure with the sample files yahooxshttpdest and sapStockxsjs is as below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010016
However it did not bring any data The content of the response object indicated that there was Proxy
authentication issue
When I tried to check the Destination in the XS Admin Console surprisingly none of the fields are populated
and everything (except the Trust Store drop down) is disabled All these fields are supposed to be populated
as indicated in the Modeling Guide
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010017
However the User already has the following privileges
The same scenario was present for the Http Destination I prepared earlier There are couple of internal errors
at the bottom On clicking them the following list is displayed
1 Internal Error dbError(ConnectionprepareStatement) 258 - insufficient privilege Not authorized at
ptimequerycheckerquery_checkcc24182 No valid SAP Crypto configuration
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010018
It appears from various blogs that the second error (No valid SAP Crypto configuration) is related to SSL
configuration in HANA I would contact the HANA Administrator to look into this issue Of course it would be
great if you could provide some insight
However I have no clue regarding the first error Request your help and cooperation in this regard
The initial issue of not finding the HttpDestination which I created still persists
Thanks for all your help
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 18Oct 31 2014 342 PM
First of all you would never use the workspace name It isnt ever part of anything It is only the package
structure that counts The first item in your list is the only one with the correct package Off hand it looks right to
me You are supposed to supply the full package path Have you configured this HTTP Destination in the XS
Admin tool yet
Tarasankar Banerjee in response to Thomas Jung on page 18Oct 31 2014 326 PM
Updated it Thanks
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 18Oct 31 2014 313 PM
Your comment got cut off We never really get to see what your problem is
Tarasankar Banerjee in response to Thomas Jung on page 21Oct 31 2014 256 PM
Thanks Thomas
I am facing as issue while trying to use an HTTP Destination I understand that the xshttpdest and xsjs file
need to in the same folder Following is the structure of my test project
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010019
As you can see the HTTP Destination and the XSJS files are in the same folder services The workspace
name is XS_Workspace and the package structure is as follows
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010020
Now I am trying to read this destination
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010021
When I am using full package structure destination_package =
rootworkTara02XSTest01XSHttpTest01services I am receiving the
error message httpreadDestination destination not found (package
rootworkTara02XSTest01XSHttpTest01services name XSHttpDest01)
On using the workspace name destination_package = XS_Workspaceservices I am receiving the
error message User is not authorized to use destination (package XS_Workspaceservices name
XSHttpDest01)
On using destination_package = rootworkTara02XSTest01services also I am receiving the error
message User is not authorized to use destination (package rootworkTara02XSTest01services
name XSHttpDest01) Strangely the services folder is not directly under XSTest01
Lastly I deliberately gave a wrong service name destination_package = XS_Workspaceservices and
destination_name = XSHttpDest02 But even then I received the error message User is not authorized to
use destination (package XS_Workspaceservices name XSHttpDest02) not that the destination is not
found
Could you please help me to resolve this issue
Thanks a lot for your helps
Regards
Tarasankar
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010022
Thomas Jung in response to Tarasankar Banerjee on page 22Oct 30 2014 152 PM
Since SPS06 its possible to use outbound HTTP destinations and to call out to external services using XSJS
Thomas Jung in response to Tarasankar Banerjee on page 22Oct 30 2014 150 PM
gtSo when the program runs in server would it automatically consider the OS user credentials
No It doesnt automatically use anything You have to specific the user and password that you want to use for
the proxy Although many proxy servers dont require a username and password
Tarasankar Banerjee in response to Thomas Jung on page 23Oct 30 2014 707 AM
Hi Thomas
Just watched the video you shared above Thanks a lot for it It is really informative and helpful
Regards
Tarasankar
Tarasankar Banerjee in response to Tarasankar Banerjee on page 22Oct 30 2014 346 AM
Got answer for the second point SAP HANA XS Administration Tool is the place to configure Proxy settings
Regards
Tarasankar
Tarasankar Banerjee in response to Tarasankar Banerjee on page 22Oct 29 2014 314 PM
Dear Thomas
another question is that does the proxy settings in the HttpDestination refer to the OS user of the HANA
server We specify useProxy as true and authType as basic in the HttpDestination but not maintain any
user credentials So when the program runs in server would it automatically consider the OS user credentials
Thanks
Regards
Tarasankar
Tarasankar Banerjee in response to Thomas Jung on page 23Oct 29 2014 132 PM
Thanks Thomas I am currently checking this option only
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010023
My current requirement is to fetch Weather Data and Social Media data from various OData services and store
them in HANA for further analysis What might be the best way for this I am currently checking the option of
creating an XS application which would connect to the external services fetch the data and save that in HANA
using DB Connection Is this the best way Or should we try to use JAVA or some other way
Your valuable suggestions are most welcome Thanks
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 23Oct 29 2014 1256 PM
gtHowever is it possible to consume XSODATA service from XSJS instead of using DB Connection
You can via an outbound HTTP destination although I certainly wouldnt recommend it It would be rather
complex and not well performing
gtAlso is it possible to consume data from external OData services for weather data social media data etc from
XSJS
Sure with the same Outbound HTTP Connectivity
httpswwwyoutubecomwatchv=fWirvj9l7eY
Maintaining HTTP Destinations - SAP HANA Developer Guide - SAP Library
Tarasankar BanerjeeOct 29 2014 1119 AM
Dear Thomas
Thanks for the great blog
I am able to connect to Database and execute queries from XSJS service However is it possible to consume
XSODATA service from XSJS instead of using DB Connection
Also is it possible to consume data from external OData services for weather data social media data etc from
XSJS
If possible it would be great if you could provide some code sample or guidelines
Thanks
Regards
Tarasankar
Thomas Jung in response to Weiping Lu on page 24Sep 25 2014 833 AM
Please refer to service note 1849775
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010024
httpservicesapcomsapsupportnotes1849775
I believe it will address your issue
Weiping LuSep 24 2014 519 PM
Hi Tom
Great post and videos I have a tough issue calling a HANA procedure from XS takes gt 5min but from HANA
studio lt 1 min Were using Amazon AWS rev 70 and 73 Any help will be greatly appreciated
Thanks
WPL
Thomas Jung in response to Su Srikanth on page 24Aug 11 2014 253 PM
You transport XSODATA services like you would any other repository content - via a Delivery Unit
Su SrikanthAug 11 2014 750 AM
Hi Thomas
Great blog
Ive a query here - we create the odata services(andor URLs created to view in the web browser) in
development environment now if we have to transport it to the quality andor production environment how
can we do this - is the same as importexport or is there any specific way to do please help with any useful
pointers
Many thanks as always
Su
Thomas Jung in response to ARSHAD SHAIKH on page 24May 15 2014 231 PM
Ive never written any blogs on calculation views I dont cover that topic That is why I suggested you ask your
question in the proper SCN forum
Although looking at your your above SQL Statement I dont see why you couldnt do this directly in XSODATA
off of the table STATUS without the need for the calculation view or the SQLScript Procedure
ARSHAD SHAIKH in response to Thomas Jung on page 25May 15 2014 1154 AM
Hello Thomas
I am new to hana Please suggest me the blogs of you related to calculation view that calling
procedures(procedures have out parameter)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010025
I am trying to fetch the result of procedure in calc view and want to create odata service for that calculation
view
procedure code goes like this
---------------------------------------
CREATE PROCEDURE TWEETS_TODAY(OUT OP BIGINT)
language SQLSCRIPT sql security invoker default schema SOCIAL360 reads sql data as
BEGIN
SELECT COUNT() INTO OP FROM SOCIAL360STATUS WHERE CREATED_AT = CURRENT_DATE
END
calc view code goes like this
----------------------------------------
Begin Procedure Script
BEGIN
DECLARE OP BIGINT
CALL SOCIAL360TWEETS_TODAY(OPvar_out)
END End Procedure Script
Thanks
-Arshad
Thomas Jung in response to ARSHAD SHAIKH on page 25May 15 2014 944 AM
Your question seems to have no relation to the content in this blog Please consider instead asking general
HANA questions in the appropriate SCN Forum
ARSHAD SHAIKHMay 15 2014 917 AM
Hi Thomas
I want to call procedures in calculation view (procedures have out parameter)
Please suggest me step by step procedure with example and supporting documents
Thanks
ARSHAD SHAIKH
Henrique Pinto in response to Blair Krotenko on page 26Apr 16 2014 711 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010026
Hmm not really sure of that I see it but that might be because Im an employee
But the NET development partner I was working with was not enrolled in any kind of beta testing program and
they were able to download it so I guess you should as well
Make sure to go in the Installation and Upgrades menu and not the Support Packages and Patches
Go to httpservicesapcomswdc -gt Installations and Upgrades -gt Browse our Download Catalog -gt SAP In-
Memory (SAP HANA) -gt SAP HANA ADONET 10
Best regards
Henrique
Blair Krotenko in response to Henrique Pinto on page 26Apr 16 2014 656 PM
Thanks for the info Henrique but I cant find it I dont know if it is an authorization issue or do we need to be a
ramp-up customer to dl and use a beta product
Thanks
Blair
Henrique Pinto in response to Thomas Jung on page 27Apr 16 2014 614 PM
The ADONET provider is available for download in the SAP Service Marketplace (in beta edition so far)
Thomas Jung in response to Kamal Jain on page 26Apr 16 2014 514 PM
For general OData structure and syntax I find that the Odataorg website is very helpful For example on this
topic
httpwwwodataorgdocumentationodata-version-2-0uri-conventions
The syntax of a $expand query option is a comma-separated list of Navigation Properties Additionally each
Navigation Property can be followed by a forward slash and another Navigation Property to enable identifying a
multi-level relationship
The page also has some sample URLs
Kamal JainApr 16 2014 536 AM
Dear Thomas
I agree that we need to pass all the associations in the expand I tried with some of options but was not
through
Now i just tried with below syntax and able to achive Thx
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010027
httpdewdftzld025pgdevsapcorp8000DTHCPXSZPMIS_PRO_ACTUALxsodata
ZPROHEADER(PR07_000002)$expand=ZACTUZEMPD
Regards
Kamal Jain
Thomas Jung in response to Blair Krotenko on page 27Apr 15 2014 623 PM
We do plan to release an ADONET provider specific to HANA in the near future This would probably be the
best option for consumption from NET Until then I would think that ODBC is probably the next best option It
gives you generally easy portability from already existing database code You could consume OData as well
although that is more generally consumed from the UI layer itself It guess it somewhat depends upon where
you are calling the service from in your NET application
Blair KrotenkoApr 15 2014 409 PM
Hi Thomas
We are looking at consuming HANA data in a NET application and from what I can see there are 2 options -
OData and ODBC It seems to me that OData might be the better option when consuming HANA data in an XS
application while ODBC might be the better option for NET What are your thoughts Is there a paper on this
subject I havent been able to find a comparison document for this Are there any security caveats to be aware
of for these options
Thanks
Blair
Thomas Jung in response to Kamal Jain on page 27Apr 15 2014 136 PM
You have to list both associations in the expand on the URL if you want both relationships to be processed
Kamal JainApr 15 2014 1249 PM
Hi Thomas
Thx for valuable and useful information
I have an query regarding XS Odata service creation for more than 2 tables and get all the data in one
command
There is req in which service needs to be created for 3 tables to get data from all these
First table has Project ID as key second table has composite
ProjectID and Employee Id as key and third table has Employee id as
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010028
key
So if I create navigation for first 2 tables based on project id and use expand comand than its working fine and I
can see data of both the tables
Further if I add navigation for third table also as below then below expand is displaying data for first two tables
only Pls share how to use expand command in this case if possible to get all tables data based on project id
How to use navigation ZEMPD here
httpdewdftzld025pgdevsapcorp8000DTHCPXSZPMIS_PRO_ACTUALxsodata
ZPROHEADER(PR07_000002)$expand=ZACTUamp
service namespace
DTHCPXS
DTHCPDTHCPDBHCP_PROJECT_HEADER
as ZPROHEADER
navigates (PROJECT as
ZACTU)
DTHCPDTHCPDBHCPT_ZPMIS_ACTUAL
as ZACTU
navigates (EMPLOYEE as
ZEMPD )
DTHCPDTHCPDBHCP_ZPMIS_RES_MASTER
as ZEMPD
association PROJECT principal
ZPROHEADER(PROJECTID)
multiplicity 1 dependent
ZACTU(PROJECTID) multiplicity
association EMPLOYEE principal
ZACTU(EMPLOYEEID)
multiplicity 1 dependent
ZEMPD(EMPLOYEEID) multiplicity
1
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010029
Pls suggest if there is anything to add or correct in XS odata service syntax above
Regards
Kamal Jain
Vikas Madaan in response to Thomas Jung on page 29Apr 14 2014 458 PM
Thanks Thomas
Under which component
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 29Apr 14 2014 450 PM
No this isnt a known issue Ive seen Nor can I recreate the problem in my system No you cant maintain the
authentication in XSHTTPDEST itself It intentionally must be set in XSADMIN tool I can really only suggest
that you open a support ticket
Vikas MadaanApr 14 2014 431 PM
Hi Thomas
I am trying to pull data from SAP system onto HANA Database using XSJOB files I am calling RFC enabled
function modules over HTTP request It helps me replicating the real time ECC data onto HANA as well with
back ground jobs
I am facing one problem in the XSHTTPDEST file I am able to create and activate the file using studio and this
file is even visible in the web based XS administration tool But in the web based tool when i provide user and
password for basic authotication then system just clears the user id and password when i try to save This the
reason our HTTP requests are getting failed and below is the response we are getting in the response body
lthtmlgtltheadgtlttitlegtLogon Error Messagelttitlegt
Is this known issue or we are missing something Is it possible to provide user and password in the
XSHTTPDEST file Is there any particular syntax
I checked and i have the required authorizations as well develper Guide
Please help
Regards
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010030
Vikas Madaan
Abdul HakimFeb 22 2014 359 AM
Hi Thomas - Any recommended book or resource to learn and master Server Side Javascript There were
many books available in the market but as a beginner need to know the right resource book to start with and
master this stuffAlso whether SAP plan to conduct any training to teach Server Side Javascript similar to other
standard training offerings
Thanks
Hakim
Samuel Tanor-GyeduFeb 20 2014 839 AM
Thanks Thomas
I will definitely have a look at SHINE
Thomas Jung in response to gentilini andre on page 30Feb 19 2014 422 PM
Difficult to say what is wrong I several things which are different than our sample that does this You are using
a POST for instance instead of a GET However if you are gettting a 200 then I assume the service call is
correct In client side tools (like Chrome Developer Tools) you should be able to see the response object from
the call
However what I would really recommend is that you study the SHINE content (SAP HANA Interactive
Education) There is already a sample application which does this in SHINE Also it has some special
JavaScript in the UI to handle the file attachment via AXAJ call Perhaps that is the part you are missing
You can read more about SHINE here It is also included already installed in the latest version of the HANA
Developer Center trial image (SP7 based)
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
gentilini andreFeb 19 2014 325 PM
Hi Thomas
well I followed your hints but it still donacutet work
I created a xsjs File like below
function downloadExcel()
try
var body =
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010031
alert(drin)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
alert(drusse)
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount
tTax Amount tNetto Amount tCurrency n
while(rsnext())
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
catch (e)
alert(db conn funktioniert nicht)
var a = $requestparametersget(cmd)
$responsesetBody(Invalid Command +a)
switch (a)
case doex
$responsesetBody(Invalid Command +a)
alert(filedownload)
thisdownloadExcel()
break
default
$responsestatus = $nethttpINTERNAL_SERVER_ERROR
$responsesetBody(Invalid Command +a)
The Controllerjs File
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010032
doFileDownload function (oEvent)
jQuerysaprequire(sapuicommonsMessageBox)
sapuicommonsMessageBoxshow(Export Starten sapuicommonsMessageBoxIconconfirm
Information)
sapuicommonsMessageBoxconfirm(Export starteninform Confirmation)
return false
function inform(rValue)
alert (drinnnnne)
var aurl = FileDownloadxsjscmd=doex
if(rValue) If User presses Ok
alert(aurl)
jQueryajax(
url aurl
method POST
dataType json
datacmddoex
success sapuicommonsMessageBoxalert(Export wird ausgefuumlhrtConfirmation)
errorfunction onErrorCall(jqXHR textStatus errorThrown)
alert(jqXHRstatus)
sapuicommonsMessageBoxshow(jqXHRstatus
ERROR
Error in calling Service )
return
complete sapuicommonsMessageBoxalert(Export Erfolgreich
abgeschlossenConfirmation)
)
return false
else If the user presses Cancel
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010033
sapuicommonsMessageBoxalert(Vorgang abgebrochenNotification)
)
at last but not least the view
sapuijsview(zag1_ui_cv_03Index
Specifies the Controller belonging to this View
In the case that it is not implemented or that null is returned this View does not have a Controller
memberOf zag1_ui_cv_03Index
getControllerName function()
return zag1_ui_cv_03Index
Is initially called once after the Controller has been instantiated It is the place where the UI is
constructed
Since the Controller is given to this method its event handlers can be attached right away
memberOf zag1_ui_cv_03Index
createContent function(oController)
create a lite button with an icon and a text
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010034
lite true
)placeAt(btn)
oButton3attachPress(oControllerdoFileDownload)
var oButton4 = new sapuicommonsButton(
text Refresh
icon imagesrefreshjpg
lite true
press function() var data = oTableval()
if(data == )
alert(no data found)
return
print(content)
print(DatArray)
if (data = )
alert(Funzt)
JSONToCSVConvertor(data CUSTOMER AMOUNT true)
)placeAt(btn)
jQuerysaprequire(sapuitableTable)
create table control with properties
var oTable = new sapuitableTable(
width 100
rowHeight 50
title Amount per Partner
selectionMode sapuitableSelectionModeNone
)
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Company Name
)
template new sapuicommonsTextView(
text CompanyName
)
sortProperty CompanyName
))
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010035
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Partner ID
)
template new sapuicommonsTextView(
text PartnerId
)
sortProperty PartnerId
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Postal Code
textAlign sapuicoreTextAlignEnd
)
template new sapuicommonsTextView(
text PostalCode
textAlign sapuicoreTextAlignEnd
)
sortProperty PostalCode
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text City
)
template new sapuicommonsTextView(
text City
)
sortProperty City
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Purchase ID
)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010036
template new sapuicommonsTextView(
text PurchaseOrderId
)
sortProperty Currency
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Lifecycle Status
)
template new sapuicommonsTextView(
text LifecycleStatus
)
sortProperty LifecycleStatus
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Gross Amount
)
template new sapuicommonsTextView(
text GrossAmount
)
sortProperty GrossAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Tax Amount
)
template new sapuicommonsTextView(
text TaxAmount
)
sortProperty TaxAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Amount Netto
)
template new sapuicommonsTextView(
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010037
text CM_NET_Amount_001
)
sortProperty CM_NET_Amount_001
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Currency
)
template new sapuicommonsTextView(
text Currency
)
sortProperty Currency
))
var oModel = new sapuimodelodataODataModel
(httpqperiorvmcldsr8000ZAG1_WS_001ZAG1_CV_001xsodata false)
oTablesetModel(oModel)
oTablebindRows(Amount)
return oTable
)
It wonacutet call the function or better said the action of the button works fine till to the point where it should call the
xsjsfile to generate the excel-file I wondered that in the ajax part the error- success- and complete-part will
be executed at the same time and not only one of this statements The message is 200 (The request has
succeeded The information returned with the response is dependent on the method used in the request)
Maybe you can see where my mistake is or whats going wrong
Iacuteve the developer edition on cloudshare (Hana Studio rev68 Server is on SPS05)
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010038
Andreacute
Thomas Jung in response to Samuel Tanor-Gyedu on page 38Feb 19 2014 523 AM
I dont think I can help you This appears to a question about how odata4j works not about XS I have no
experience with odata4j myself
Samuel Tanor-GyeduFeb 18 2014 913 AM
Hi Thomas
I have an odata service with this endpointhttpss5hanaxshanatrialondemandcomservicesUserxsodata
I am now trying to consume it from eclipse with the odata4j libraries
This is how I get the endpoint
public UserServiceOdata(String endpointUri)
thisendpointUri = endpointUri
ODataConsumerdumpresponseHeaders(true)
consumer = ODataConsumerscreate(endpointUri)
This is my method to add a user
public User addUser(User user)
consumercreateEntity(entitySet)properties(OPropertiesint32(propertyUserId
usergetId()))properties(OPropertiesstring(propertyUserName
usergetName()))properties(OPropertiesstring(propertyUserEmail usergetEmail()))execute()
return user
When I call addUser method I get an Error
Caused by javaxxmlstreamXMLStreamException ParseError at [rowcol][78253]
Message The reference to entity sourceUrl must end with the delimiter
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010039
When I use this endpoint httpss5hanaxshanatrialondemandcomservicesUsersvc everything works fine
With the httpss5hanaxshanatrialondemandcomservicesUserxsodata I get errors
Please I would be very grateful for assistance
Thanks in advance
Regards
Samuel
Thomas Jung in response to gentilini andre on page 39Feb 18 2014 431 AM
You have a fundamental misunderstanding here You are placing server side JavaScript code in your client
side UI5 application The function downloadExcel is something you need to execute on the server It needs to
be in an XSJS file and it is called from the client side via AJAX - as a REST service not as a local function
gentilini andreFeb 17 2014 451 PM
Hello Thomas
Thank you for this great How-To Guide
Iacutem pretty new in SAPUI5 and tried your export-sample in my little trial project but it doesnacutet work
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010040
My Button for this looks like
ltcodegt
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
lite true
press function() alert(oButton3getText())
downloadExcel()
ltcodegt
and the function for this action looks like
ltcodegt
function downloadExcel()
var body =
alert(drin)
print($query)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount tTax
Amount tNetto Amount tCurrency n
while(rsnext())
if(rsnext() == )
alert($responsesetBody( Failed to retrieve data ))
alert($responsestatus = $nethttpINTERNAL_SERVER_ERROR)
else
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010041
ltcodegt
Iacutem afraid and hope that you can help me
Kind regards
Andreacute
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1246 PM
gtIs there any restriction or development limitation in the XSJSLIB files
Thats a very general question Difficult to answer without any context
Vikas Madaan in response to Thomas Jung on page 41Feb 11 2014 1245 PM
Thanks Thomas
I think we are on same page
Once quick question that came to my mind Is there any restriction or development limitation in the XSJSLIB
files
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1230 PM
gtCould please help me in understanding in more advantagesdisadvantages for both techniques
Youve summarized it pretty well already
gtbecuase i dont want to use both the approaches
Even with the CRUD support and exits in XSODATA its still pretty hard to do 100 via XSODATA There are
still valid use cases for XSJS when you need custom body custom read processing job scheduling etc Its
good to try and use XSODATA whenever possible but I wouldnt automatically exclude the use of XSJS
Vikas MadaanFeb 11 2014 1008 AM
Hi Thomas
Thanks a lot for sharing useful information through various blogs
In my current project we are evaluating use of XSOData or XSJS applications I saw your videos like the one
mentioned below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010042
httpwwwsaphanacomdocsDOC-4376
Want i understood from various blog is this
From SP7 we can write exsits in the OData services and it is very easy to consume at the client side just like
any REST base service and from my understanding it is Scalable as well I would love to use XSOData always
becuase development effort is very less compare to XSJS and it is very easy to rampup the team on OData
related development objects
XSJS were as provide more control becuase of server side scripting becuase it allows development on the
server side using JavaScript Core APIs of SAP HANA Extended Application Services are therefore exposed
as JavaScript functions providing easy access to the HTTP Request and Response object as well database
access to execute SQL or call SQLScript Procedures It provide us control over the body format and and URL
parameter definition
Could please help me in understanding in more advantagesdisadvantages for both techniques
I am very keen to understand and also explain the same to team members becuase i dont want to use both the
approaches and even sometimes customer can also ask the same to us
Also If we are on SP6 then from my understanding XSJS provides us more capability in terms of complex
application Corrent me If i am wrong
Thanks
Regards
Vikas Madaan
Thomas Jung in response to Raghuveer Phull on page 42Feb 5 2014 312 PM
Yes there are videos on the CRUD features of XSODATA which were new in SP6
For more on CRUD support in SP6 see this video
oData CreateUpdateDelete Support in SAP HANA SPS6
For the extended support for XSJS exits in SP7 see this video
SAP HANA SPS 07 XSODATA Exits in XSJS
Raghuveer PhullFeb 5 2014 122 AM
Do you have an exampledocumentationvideo where you can write a service which will populate Hana DB
What I am asking for is a way for my external script to populate the DB tables i have created in Hana DB
Thomas Jung in response to reda miraoui on page 43Jan 29 2014 411 PM
The source code for the examples shown here are shipped as part of SHINE (SAP HANA Interactive
Education)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010043
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Vivek Singh Bhoj in response to reda miraoui on page 43Jan 29 2014 352 PM
Hi Reda
You can import Shine Content in HANA and then check all these source codes
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Regards
Vivek
reda miraoui in response to Thomas Jung on page Jan 29 2014 344 PM
Hey Thomas
Is it possible to download source code of your project from this HANA tutorial
Thanks
Reda
Thomas Jung in response to Abdul Hakim on page 43Nov 21 2013 1133 PM
Yes River can be used as an alternative and when activated it will generate Server Side JavaScript andor
SQLScript
Abdul Hakim in response to Thomas Jung on page 44Nov 21 2013 747 PM
Hi Thomas - Was going through blog regarding River (RDL)Just a question on this
When you say Programming language for HANA native development is Server side Javascript SQL SQL
ScriptOnce RDL is rolled out whether RDL can be used for native application development instead of Server
side Java script SQL SQL Script I am very much new to this stuff so appreciate if you can also help on
how to get started with Server Side Java script SQL SQL Script for HANA
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 30 2013 750 AM
Hi Thomas
Thanks for your response I am talking about more content on shine
thanks
Ashutosh
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010044
Baskar Gopalakrishnan in response to Thomas Jung on page 44Oct 30 2013 1249 AM
Hi Thomas
Im a SAP PI Middleware consultantSAP topic leader in XIPI heavily worked on Java related
Netweaver stack I have knowledge in ABAP but not worked heavily in abap I have enrolled your sap hana
native application development course I feel very interesting I did work heavily in java and javascript projects
using eclipse development tool Do you think if I invest my time in just native hana development and proceed
in HANA field is a good step I dont have BW experience either
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 819 PM
Thanks for the clarification Much appreciated
Thomas Jung in response to Abdul Hakim on page 44Oct 29 2013 120 PM
gtABAP Close to HANA means whether we can expect a similar 2 tier architecture similar to HANA XS in the
future or what does that mean
No it doesnt mean that ABAP will become a 2 tier architecture We will not move the ABAP VMKernel into
HANA itself It will remain a separate application server At least for the current plansforeseeable future What
he was referring to was bringing the programming models closer For instance the new 740 SP5 feature that
allows you to write SQLScript directly within an ABAP class method
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 650 AM
Thomas - Thanks for the clarificationMuch appreciatedI was listening to ABAP on HANA session by
Thorsten Schneider this year Teched and he was mentioning that SAP Plans to bring ABAP very close to
HANA in the coming future but not much details have been discussed in the sessionABAP Close to HANA
means whether we can expect a similar 2 tier architecture similar to HANA XS in the future or what does that
mean
Thanks
Hakim
Thomas Jung in response to Abdul Hakim on page 45Oct 28 2013 703 PM
gt whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the option is
recommended by SAP then kindly share the pros and cons of each of the item
Taken from the TechEd CD103 session slides
Guidance
bulluse ABAP for optimization of existing progams (in context of SAP Business Suite or BW)
bullconsider HANA Native Development for development of new applications which will solely run on SAP HANA
bullcombine ABAP and HANA Native Development to enrich existing applications (eg SAP HANA Live Fiori)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010045
ABAP
bullapplications follow 3-tier architecture
bullABAP is in general database agnostic but with release 74 optimized for SAP HANA
bullProgramming language ABAP ABAP OO with the option to use SAP HANA features
bullIDE eclipse-based ABAP Development Tools
HANA Native Development
bullapplications follow 2-tier architecture
bullHANA Native Development is SAP HANA specific and embedded in the database
bullProgramming language River server-side JavaScript SQLSQLScript
bullIDE eclipse-based SAP HANA Studio + web IDE
Thomas Jung in response to ashutosh dixit on page 45Oct 28 2013 701 PM
gtIs there any more demos for the SHINE
Im not exactly sure what you mean by that We are building additional content for SHINE that will be delivered
in SP7
Abdul HakimOct 28 2013 326 PM
Thomas - Let us say a customer is running SAP Netweaver 74 ABAP with HANA DB and they have HANA
extended service as wellIf the customer wants to do new developments then what is the recommendation
from SAP ie whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the
option is recommended by SAP then kindly share the pros and cons of each of the item (SAP Netweaver 74
ABAP Vs SAP HANA XS)
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 28 2013 221 PM
Hi Thomas
Thanks a lot for your its working now
Is there any more demos for the SHINE
Thanks
Ashutosh
Thomas Jung in response to ashutosh dixit on page 46Oct 25 2013 809 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010046
As this content is now standard in SP6 as part of SHINE (SAP HANA INteractive Education) there also some
setup instructions on helpsapcom
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Basic points to check - have you generated the synonyms in the data generator Ran the data generator to
create some data Have the role assigned Added client 001 to your user profile
ashutosh dixitOct 24 2013 130 PM
Hi Thomas
Amazing blog - once again Thomas thanks
I have been following you for many days attended your OPEN SAP course also
That was an amazing course for new learner like me
One of our client is looking forward for XS based search Application identical to what you have created in your
DEMO
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010047
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010048
But I am not able to fetch the data on blank HTML page is coming with no data
If there is any step by step document related to this please help in getting that
Any help will be highly appreciated
Thanks
Ashutosh
Naveen KumarSep 26 2013 1130 AM
Good Document
Heber FabianoAug 27 2013 323 PM
Great content as always Keep sharing with us
Thomas Jung in response to Orel Stringa on page 48Aug 27 2013 147 PM
This is currently not possible The CORS support is for all origins We dont yet have the feature to maintain a
whitelist of CORS origins
Orel Stringa in response to Thomas Jung on page Aug 27 2013 801 AM
Hi Thomas
nice to see that SAP has made it possible with SP6 to specify cross origin resource sharing (CORS) support
via the xsaccess file SP6 HANA development guide has example of how to specify CORS support
I have build an XS application and would like to serve SAPUI5 on a diffhost than XSHANA
How can I specify that I would like to allow cross origin access restricted to certain domain(s) only
Is there a special keyword syntax for specifying that
Thank yoi
Orel
Vijay UthayakumarAug 27 2013 131 AM
Highly informative amp digestible Fantastic work
Jerry WangAug 1 2013 955 AM
Hi Tomas
Thank you
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010049
Jerry
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 644 PM
JSLint checks are very strict and often produce syntax errors for items that just stylistic and wont actually
cause an error upon activation or runtime You can either ignore the JSLint errors or deactivate JSLint for this
project in these cases However it might also be an indication that the JavaScript code you are trying to import
isnt compatible with Strict mode
httpsdevelopermozillaorgen-USdocsWebJavaScriptReferenceFunctions_and_function_scope
Strict_mode
Milan Vrozina in response to Thomas Jung on page 49Jul 21 2013 624 PM
Thanks for clarification I thought there would be some kind of import
But anyway in case of this specific library I have some problems with JSLint validation when I do cut and paste
of the original code
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 343 PM
What kind of problem are you having using this library Strict mode JavaScript which doesnt try to access the
DOM Window or other client side specific objects should work in Server Side XSJS Generally if you have a
library you just cut and paste into your XSJS or an XSJSLIB file and then call the functions from your code
Milan VrozinaJul 21 2013 339 PM
Hello
first and foremost thank you for perfect openSAP classes related to HANA development and for this blog as
well
I have one question related to server-side javascript You mentioned in course that is possible to use 3rd party
libraries or reuse 3rd party code But I cant find a possible way how to import 3rd party javascript library -as
is- to server and use it For example I would like to use JSZip library to zip some file before sending it to client
from xsjs application Is that possible Thank you
Chandrashekhar MahajanJul 3 2013 734 PM
This is excellent blog Now HANA XS is very much clear to me
Mohan krishnaJul 1 2013 144 PM
WOW - great blog Thomas This will be very helpful in understanding SAP hana Good Job
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010050
Abdul Hakim in response to Thomas Jung on page 50Jun 27 2013 833 PM
Thanks for the clarification
Thomas Jung in response to Abdul Hakim on page 50Jun 27 2013 659 PM
HANA Extended Application Services uses SQLScript and JavaScript as its two primary programming
languages
gtwhether the current SAP Business suite based on ABAP will be completely migrated to HANA service
No The Business Suite already runs on HANA but still via the ABAP application server It will continue to
leverage HANA via a combination of enhancements to ABAP and utilizing some of the technologies described
in this blog
gtAlso whether ABAP can be used to built application in HANA extended services
No There is no ABAP language container in HANA Extended Application Services
Abdul HakimJun 27 2013 405 PM
Hi Thomas - What is the programming language used for HANA Extended application services
As HANA is more than a database ie application platform by itself and as you mentioned that more and more
applications will be built on HANA i have question as how the future SAP ERP system looks likewhether the
current SAP Business suite based on ABAP will be completely migrated to HANA service in the future or SAP
ABAP server will continue to evolve and receive focus investment from SAP Also whether ABAP can be used
to built application in HANA extended services Your thoughts
Thanks
Abdul Hakim
Thomas Jung in response to Ravindra Channe on page 50Jun 11 2013 830 PM
Yes it is still planned However we are still a couple of weeks away and Ive not seen the final installers to say
for certain its there
Ravindra ChanneJun 11 2013 815 PM
Hi Thomas
Thanks for a wonderful and very informative blog Is there any update on 32 bit REGI file
Is it expected along with SPS6
Regards
Ravi
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010051
Thomas Jung in response to Amanda Rzepka on page Jun 7 2013 942 PM
gtCan the XS Services be used in a BW on HANA Scenario
Yes XS is part of ALL HANA systems You should check and make sure you are licensed for direct access to
the underlying HANA instance however
Thomas Jung in response to Holger Schimanski on page Jun 7 2013 941 PM
gtIs there a similar library which could be used in XS Engine
The XSODATA development object is similar We also have higher level frameworks for XMLA and Search
Services (InA) You can expect more such high level frameworks to be added to the HANA Extended
Application Services in the future
Thomas Jung in response to Manav Mehra on page Jun 7 2013 939 PM
Have you used something like the Chrome developer tools to see see if you are getting any client side
javascript errors or to see if the request to your xsodata service is successful
Thomas Jung in response to Christian Hufnagl on page 52Jun 7 2013 938 PM
It will ship as non-automatic content in SPS6 (all systems will have it and it just needs to be imported) The
delivery units are also part of this weeks updates to the Cloudshare and AWS developer center images They
are also available for download as part of the content of the openSAP course
Thomas Jung in response to Matthew Pickell on page 51Jun 7 2013 937 PM
CORS support will come with SPS6 at the end of June
Thomas Jung in response to Jeroen Custers on page 51Jun 7 2013 936 PM
gtWill this bug be fixed in HANA ver 56
Personally Ive still experienced this bug in SPS6 internal builds Must be a tricky one to find Luckily the
workaround of closing and reopening isnt too difficult Just annoying This also probably makes the bug low
priority
Jeroen Custers in response to Vivek Singh Bhoj on page 52Jun 7 2013 411 PM
This issue also occurs on rev56
Matthew PickellJun 7 2013 258 PM
Thomas
Has CORS been included in a release yet
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010052
Vivek Singh Bhoj in response to Chandra Edem on page 52Jun 5 2013 601 AM
Hi Chandra
Date for Week1 Assignment has been extended till June 11
So you can give Week 1 Assignment now
Christian HufnaglJun 4 2013 543 PM
Hi Thomas
thank you for the interesting tutorial
Can you tell me whether it is possible to download the source code of the ldquoPutting it all togetherrdquovideo And if yes Where can I download itThanks
Christoph
Vivek Singh BhojJun 4 2013 1116 AM
Hi Thomas
Thanks for OpenSAP classes
Your Youtube Account also have very good exercises
IN OpenSAP Week 2 Unit 3 tutorial after assigning admin role to my user Id i am not able to see sequences
synonyms triggers under my schema or any other schema i am only able to see Column Views Procedures
Tables and Views
Though now i am able to insert data into my created table
Can you let me know how i will be able to see Sequences under my schema without removing the admin role
I am using HANA revision 52
Got to know from OpenSAP that
This is a known issue and the only way that Ive seen to fix it is to actually close the studio and open it again
then refresh the node
Cheers
Rich Heilman
SAP HANA Product Management
Will this bug be fixed in HANA ver 56
Chandra Edem in response to Thomas Jung on page 53Jun 4 2013 646 AM
Thomas
I registered for OpenSAP course Introduction to Software Development on SAP HANA on June 2 900PM
I didnt know that it is going to end WEEK1 assignment test on 632013 300PM Is there any way can take
that WEEK1 Assignment Test
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010053
Thanks
Chandra
Thomas Jung in response to Alexander Bauer on page Jun 3 2013 856 PM
SAPUI5 gets updated auutomatically when you apply HANA revisions There is no additional download or
update needed
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+01005
Figure 4 - Repository Import Project Wizard
For a deeper look at the basic project creation and Repository object management within SAP HANA Studio
please view the following videos on the topic
OData ServicesThere are two main parts of the SAP HANA Extended Application Services programming model The first is
the ability to generate OData REST services from any existing SAP HANA Table or View The process is
quite simple and easy From within an SAP HANA Project create a file with the extension xsodata Within this
service definition document the developer needs only to supply the name of the source tableview an entity
name and if using an SAP HANA View the entity key fields
For example if you want to generate an OData service for an SAP HANA table named techedepmdb
businessPartner in the Schema TECHEDEPM this would be the XSODATA definition file you would create
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+01006
service namespace saphanademocontentepm TECHEDEPMtechedepmdbbusinessPartner as BUYER
Figure 5 - XSODATA Service Definition and Test
Upon activation of this XSODATA file we already have an executable service which is ready to test The
generated service supports standard OData parameters like $metadata for introspection (see Figure 6) $filter
$orderby etc It also supports body formats of ATOMXML and JSON (Figure 7 for an example) Because
OData is an open standard you can read more about the URL parameters and other features at http
wwwodataorg
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+01007
Figure 6 - OData $metadata support
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+01008
Figure 7 - Example OData Server JSON Output
The examples in the above figures demonstrate how easily these services can be tested from the web browser
but of course doesnt represent how end users would interact with the services Although you can use a variety
of 3rd party tools based upon JavaScript like Sencha Sencha Touch JQuery JQuery Mobile and PhoneGap
just to name a few SAP delivers the UI Development Toolkit for HTML5 (SAPUI5) standard in SAP HANA
Extended Application Services A particularly strong feature of SAPUI5 is the integration of OData service
consumption not just at a library level but also with special features within the UI elements for binding to OData
services
For example within SAPUI5 you can declare an OData model object and connect this model object to the URL
of the XSODATA service Next create a Table UI element and connect it to this model object Finally you call
bindRows of the Table UI element object and supply the OData entity name you want to use as the source of
the table
var oModel = new sapuimodelodataODataModel (servicesbuyerxsodata false) oTable = new sapuitableTable(testtableId tableID visibleRowCount 10) oTablesetModel(oModel) oTablebindRows(BUYER)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+01009
This creates an UI Element which has built-in events such as sort filter and paging which automatically call
the corresponding OData Service to fulfill the event No additional client side or server side programming is
necessary to handle such events
Figure 8 - OData Bound Table UI Element
For more details on OData service creation in SAP HANA Extended Application Services and utilizing these
services within SAPUI5 please view these videos
Server Side JavaScriptThe XSODATA services are great because they provide a large amount of functionality with minimal amounts
of development effort However there are a few limitations which come with such a framework approach For
example in SAP HANA SP5 the OData service framework is read only Support for Insert Update and Delete
operations is available with SAP HANA SP6
Luckily there is an option for creating free-form services where you can not only perform update operations but
also have full control over the body format and URL parameter definition SAP HANA Extended Application
Services also allows development on the server side using JavaScript (via project files with the extension
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010010
XSJS) Core APIs of SAP HANA Extended Application Services are therefore exposed as JavaScript
functions providing easy access to the HTTP Request and Response object as well database access to
execute SQL or call SQLScript Procedures
In this simple example we can take two numbers as URL Request Parameters and multiply them together and
then return the results as text in the Response Body This is an intentionally basic example so that you can
focus on the API usage
Figure 9 - Simple XSJS Service
However the power of XSJS services comes from the ability to access the database objects but also have full
control over the body output and to further manipulate the result set after selection In this example we use
XSJS to create a text-tab delimited output in order to support a download to Excel from a user interface
function downloadExcel() var body = var query = SELECT TOP 25000 PurchaseOrderId PartnerId to_nvarchar(CompanyName) LoginName_1 CreatedAt GrossAmount FROM _SYS_BICtechedepmdbPO_HEADER_EXTENDED order by PurchaseOrderId $tracedebug(query) var conn = $dbgetConnection() var pstmt = connprepareStatement(query) var rs = pstmtexecuteQuery() body = Purchase Order Id tPartner Id tCompany Name tEmployee Responsible tCreated At tGross Amount n while(rsnext()) body += rsgetString(1)+ t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetTimestamp(5)+t+rsgetDecimal(6)+n $responsesetBody(body) $responsecontentType = applicationvndms-excel charset=utf-16le $responseheadersset(Content-Dispositionattachment filename=Excelxls) $responseheadersset(access-control-allow-origin) $responsestatus = $nethttpOK
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010011
ClosingThis blog hopefully has served to give you a small introduction to many of the new concepts and possibilities
with SAP HANA SP5 and SAP HANA Extended Application Services
Over the coming weeks we will be posting additional blogs with more advanced examples and techniques as
well how to integrate SAP HANA Extended Application Services content into additional environments Likewise
there is a substantial Developerrsquos Guide which expands on many of the concepts introduced here
It is also important to note that while SAP HANA Extended Application Services ships asproductive software (meaning customers can go live in production with it) in SAP HANA SP5 it isa controlled release initially with a special ldquoProject Solutionrdquo program in place around this newfunctionality Please refer to Service Note 1779803 for additional details on the current statusof the Project Solution This Project Solution approach is designed to provide the highest levelsof support possible to initial customers and partners who choose to develop using SAP HANAExtended Application Services It also provides a channel for feedback to Product Managementand development so that we take suggestions and ideas and quickly integrate them into futurerevisions of SAP HANA and SAP HANA Extended Application Services103803 Views Tags sapmentor hana developer code database in_memory sap_mentor hana_devcentersap_hana sapui5 hana_studio xs hde xsjs xsodata
Glen OoiDec 23 2014 345 PM
Hi Thomas
In need of your expert advice
I have a situation where I am using BO Dashboards to create my Dashboard which is consuming the data from
HANA
I have a requirement to allow the user to comment in the dashboard and it will write back to the HANA DB and
also display the comments in the Dashboard
In order for the BO Dashboard to write back to HANA DB is via web services
Is there any way i can create a WSDL URL and consume the XSJS or ODATA services in HANA
Muhammad SadiqDec 10 2014 140 PM
I need your help in writing an API(XSJS service) which will take JSON format data and inserted into HANA
database
Tarasankar Banerjee in response to Thomas Jung on page 14Nov 5 2014 852 AM
Thanks Thomas Could you give an example of how to redirect
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010012
Im facing a strange issue while trying to import weather data from several cities together The issue appears to
be connected with the content of the response object
Following is the code of the Weatherxsjs file
try
var cmd = $requestparametersget(cmd)
var body
var response
var obj
var propertyName
if(cmd === import)
var dest = $nethttpreadDestination(rootworkTara02XSTest01XSHttpTest01 weather)
var client = new $nethttpClient()
var req = new $webWebRequest($nethttpGET group
id=12750041264527127733312732941275339ampunits=metric)
clientrequest(req dest)
response = clientgetResponse()
$responsecontentType = textplain
if(responsebody)
body = responsebodyasString()
obj = JSONparse(body)
body = cmd + n n + responsestatus + n n + responsecontentType
+ n n + responsebody + n n + objgetOwnPropertyNames()
$responsesetBody(body)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010013
$responsestatus = $nethttpOK
catch(e)
$responsecontentType = textplain
$responsesetBody(emessage)
$responsestatus = $nethttpINTERNAL_SERVER_ERROR
Following is the weatherxshttpdest
host = apiopenweathermaporg
port = 80
description = my weather checker
useSSL = false
pathPrefix = data25
authType = none
useProxy = true
proxyHost = ltproxy_detailsgt
proxyPort = ltproxy_port
timeout = 0
On accessing httplthostnamegt8000rootworkTara02XSTest01XSHttpTest01Weatherxsjs
ampcmd=import I am receiving the error message BodyasString unsupported charset specified in
Content-Type header (utf8)
If the body = responsebodyasString() statement is commented out I receive the error message
JSONparse unexpected character because the responsebodyasString() itself could not work correctly
However the URL httpapiopenweathermaporgdata25group
id=12750041264527127733312732941275339 returns data correctly
I am using the same URL in my code
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010014
Could you please advise regarding this issue Thanks for your help
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 14Nov 4 2014 319 PM
gtIs it possible to read files using XS For example some configuration file kept in the server
No there is no API to read from the file system of the underlying operating system You can read the HANA
configuration ini files however because they are exposed via SQL
gtIs it possible to call a html file from the xsjs file Something likerequestgetRequestDispatcher()forward() from
JAVA servlets
In the body of the response you send back to the client your could issue a redirect
Tarasankar Banerjee in response to Tarasankar Banerjee on page 15Nov 4 2014 1034 AM
Hi Thomas
Finally got my application running It is now fetching weather data from external sites
Have two more questions
1 Is it possible to read files using XS For example some configuration file kept in the server2 Is it possible to call a html file from the xsjs file Something like
requestgetRequestDispatcher()forward() from JAVA servlets
Thanks
Regards
Tarasankar
Robert WeberNov 3 2014 1136 AM
If someone is having difficulties with the alert log full on the xsengine
you can do the same trick as for the statisticserver in oder to reset the log area see details in OSS Notes
2019148 and 1950221
The commands are then
select VOLUME_ID from m_volumes where service_name = xsengine
ALTER SYSTEM ALTER CONFIGURATION (daemonini host lthostnamegt) UNSET
(xsengineinstances) WITH RECONFIGURE
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010015
ALTER SYSTEM ALTER CONFIGURATION (topologyini system) UNSET (hostlthostnamegt xsengine)
WITH RECONFIGURE
ALTER SYSTEM ALTER CONFIGURATION (topologyini system) UNSET (volumes ltvolume_idgt) WITH
RECONFIGURE
ALTER SYSTEM ALTER CONFIGURATION (daemonini host lthostnamegt) SET (xsengineinstances) =
1 WITH RECONFIGURE
Then restart the HANA instance and after that make a full backup (and schedule the regular backup in order to
prevent this situation again)
Hope this will help someone like me -)
Have a nice day
Regards
Robert
Tarasankar Banerjee in response to Tarasankar Banerjee on page 15Nov 3 2014 1031 AM
Update
I tried to access the XS Admin console from another user and faced only the No valid Crypto error However
could still update the proxy user details and the sample application successfully ran at last The relevant roles
were provided in Granted Roles not Application Privileges Probably that was the issue earlier
I would check again with new Http Destination and Server side Java Script
Thanks a lot Thomas for all your help
Regards
Tarasankar
Tarasankar Banerjee in response to Thomas Jung on page 18Nov 3 2014 929 AM
Hi Thomas
I also tried to use the sample code from section 841 Tutorial Use the XSJS Outbound API of the HANA
Developer Guide with minor modifications (for package structure proxy settings etc) This time the destination
was found The new project structure with the sample files yahooxshttpdest and sapStockxsjs is as below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010016
However it did not bring any data The content of the response object indicated that there was Proxy
authentication issue
When I tried to check the Destination in the XS Admin Console surprisingly none of the fields are populated
and everything (except the Trust Store drop down) is disabled All these fields are supposed to be populated
as indicated in the Modeling Guide
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010017
However the User already has the following privileges
The same scenario was present for the Http Destination I prepared earlier There are couple of internal errors
at the bottom On clicking them the following list is displayed
1 Internal Error dbError(ConnectionprepareStatement) 258 - insufficient privilege Not authorized at
ptimequerycheckerquery_checkcc24182 No valid SAP Crypto configuration
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010018
It appears from various blogs that the second error (No valid SAP Crypto configuration) is related to SSL
configuration in HANA I would contact the HANA Administrator to look into this issue Of course it would be
great if you could provide some insight
However I have no clue regarding the first error Request your help and cooperation in this regard
The initial issue of not finding the HttpDestination which I created still persists
Thanks for all your help
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 18Oct 31 2014 342 PM
First of all you would never use the workspace name It isnt ever part of anything It is only the package
structure that counts The first item in your list is the only one with the correct package Off hand it looks right to
me You are supposed to supply the full package path Have you configured this HTTP Destination in the XS
Admin tool yet
Tarasankar Banerjee in response to Thomas Jung on page 18Oct 31 2014 326 PM
Updated it Thanks
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 18Oct 31 2014 313 PM
Your comment got cut off We never really get to see what your problem is
Tarasankar Banerjee in response to Thomas Jung on page 21Oct 31 2014 256 PM
Thanks Thomas
I am facing as issue while trying to use an HTTP Destination I understand that the xshttpdest and xsjs file
need to in the same folder Following is the structure of my test project
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010019
As you can see the HTTP Destination and the XSJS files are in the same folder services The workspace
name is XS_Workspace and the package structure is as follows
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010020
Now I am trying to read this destination
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010021
When I am using full package structure destination_package =
rootworkTara02XSTest01XSHttpTest01services I am receiving the
error message httpreadDestination destination not found (package
rootworkTara02XSTest01XSHttpTest01services name XSHttpDest01)
On using the workspace name destination_package = XS_Workspaceservices I am receiving the
error message User is not authorized to use destination (package XS_Workspaceservices name
XSHttpDest01)
On using destination_package = rootworkTara02XSTest01services also I am receiving the error
message User is not authorized to use destination (package rootworkTara02XSTest01services
name XSHttpDest01) Strangely the services folder is not directly under XSTest01
Lastly I deliberately gave a wrong service name destination_package = XS_Workspaceservices and
destination_name = XSHttpDest02 But even then I received the error message User is not authorized to
use destination (package XS_Workspaceservices name XSHttpDest02) not that the destination is not
found
Could you please help me to resolve this issue
Thanks a lot for your helps
Regards
Tarasankar
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010022
Thomas Jung in response to Tarasankar Banerjee on page 22Oct 30 2014 152 PM
Since SPS06 its possible to use outbound HTTP destinations and to call out to external services using XSJS
Thomas Jung in response to Tarasankar Banerjee on page 22Oct 30 2014 150 PM
gtSo when the program runs in server would it automatically consider the OS user credentials
No It doesnt automatically use anything You have to specific the user and password that you want to use for
the proxy Although many proxy servers dont require a username and password
Tarasankar Banerjee in response to Thomas Jung on page 23Oct 30 2014 707 AM
Hi Thomas
Just watched the video you shared above Thanks a lot for it It is really informative and helpful
Regards
Tarasankar
Tarasankar Banerjee in response to Tarasankar Banerjee on page 22Oct 30 2014 346 AM
Got answer for the second point SAP HANA XS Administration Tool is the place to configure Proxy settings
Regards
Tarasankar
Tarasankar Banerjee in response to Tarasankar Banerjee on page 22Oct 29 2014 314 PM
Dear Thomas
another question is that does the proxy settings in the HttpDestination refer to the OS user of the HANA
server We specify useProxy as true and authType as basic in the HttpDestination but not maintain any
user credentials So when the program runs in server would it automatically consider the OS user credentials
Thanks
Regards
Tarasankar
Tarasankar Banerjee in response to Thomas Jung on page 23Oct 29 2014 132 PM
Thanks Thomas I am currently checking this option only
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010023
My current requirement is to fetch Weather Data and Social Media data from various OData services and store
them in HANA for further analysis What might be the best way for this I am currently checking the option of
creating an XS application which would connect to the external services fetch the data and save that in HANA
using DB Connection Is this the best way Or should we try to use JAVA or some other way
Your valuable suggestions are most welcome Thanks
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 23Oct 29 2014 1256 PM
gtHowever is it possible to consume XSODATA service from XSJS instead of using DB Connection
You can via an outbound HTTP destination although I certainly wouldnt recommend it It would be rather
complex and not well performing
gtAlso is it possible to consume data from external OData services for weather data social media data etc from
XSJS
Sure with the same Outbound HTTP Connectivity
httpswwwyoutubecomwatchv=fWirvj9l7eY
Maintaining HTTP Destinations - SAP HANA Developer Guide - SAP Library
Tarasankar BanerjeeOct 29 2014 1119 AM
Dear Thomas
Thanks for the great blog
I am able to connect to Database and execute queries from XSJS service However is it possible to consume
XSODATA service from XSJS instead of using DB Connection
Also is it possible to consume data from external OData services for weather data social media data etc from
XSJS
If possible it would be great if you could provide some code sample or guidelines
Thanks
Regards
Tarasankar
Thomas Jung in response to Weiping Lu on page 24Sep 25 2014 833 AM
Please refer to service note 1849775
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010024
httpservicesapcomsapsupportnotes1849775
I believe it will address your issue
Weiping LuSep 24 2014 519 PM
Hi Tom
Great post and videos I have a tough issue calling a HANA procedure from XS takes gt 5min but from HANA
studio lt 1 min Were using Amazon AWS rev 70 and 73 Any help will be greatly appreciated
Thanks
WPL
Thomas Jung in response to Su Srikanth on page 24Aug 11 2014 253 PM
You transport XSODATA services like you would any other repository content - via a Delivery Unit
Su SrikanthAug 11 2014 750 AM
Hi Thomas
Great blog
Ive a query here - we create the odata services(andor URLs created to view in the web browser) in
development environment now if we have to transport it to the quality andor production environment how
can we do this - is the same as importexport or is there any specific way to do please help with any useful
pointers
Many thanks as always
Su
Thomas Jung in response to ARSHAD SHAIKH on page 24May 15 2014 231 PM
Ive never written any blogs on calculation views I dont cover that topic That is why I suggested you ask your
question in the proper SCN forum
Although looking at your your above SQL Statement I dont see why you couldnt do this directly in XSODATA
off of the table STATUS without the need for the calculation view or the SQLScript Procedure
ARSHAD SHAIKH in response to Thomas Jung on page 25May 15 2014 1154 AM
Hello Thomas
I am new to hana Please suggest me the blogs of you related to calculation view that calling
procedures(procedures have out parameter)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010025
I am trying to fetch the result of procedure in calc view and want to create odata service for that calculation
view
procedure code goes like this
---------------------------------------
CREATE PROCEDURE TWEETS_TODAY(OUT OP BIGINT)
language SQLSCRIPT sql security invoker default schema SOCIAL360 reads sql data as
BEGIN
SELECT COUNT() INTO OP FROM SOCIAL360STATUS WHERE CREATED_AT = CURRENT_DATE
END
calc view code goes like this
----------------------------------------
Begin Procedure Script
BEGIN
DECLARE OP BIGINT
CALL SOCIAL360TWEETS_TODAY(OPvar_out)
END End Procedure Script
Thanks
-Arshad
Thomas Jung in response to ARSHAD SHAIKH on page 25May 15 2014 944 AM
Your question seems to have no relation to the content in this blog Please consider instead asking general
HANA questions in the appropriate SCN Forum
ARSHAD SHAIKHMay 15 2014 917 AM
Hi Thomas
I want to call procedures in calculation view (procedures have out parameter)
Please suggest me step by step procedure with example and supporting documents
Thanks
ARSHAD SHAIKH
Henrique Pinto in response to Blair Krotenko on page 26Apr 16 2014 711 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010026
Hmm not really sure of that I see it but that might be because Im an employee
But the NET development partner I was working with was not enrolled in any kind of beta testing program and
they were able to download it so I guess you should as well
Make sure to go in the Installation and Upgrades menu and not the Support Packages and Patches
Go to httpservicesapcomswdc -gt Installations and Upgrades -gt Browse our Download Catalog -gt SAP In-
Memory (SAP HANA) -gt SAP HANA ADONET 10
Best regards
Henrique
Blair Krotenko in response to Henrique Pinto on page 26Apr 16 2014 656 PM
Thanks for the info Henrique but I cant find it I dont know if it is an authorization issue or do we need to be a
ramp-up customer to dl and use a beta product
Thanks
Blair
Henrique Pinto in response to Thomas Jung on page 27Apr 16 2014 614 PM
The ADONET provider is available for download in the SAP Service Marketplace (in beta edition so far)
Thomas Jung in response to Kamal Jain on page 26Apr 16 2014 514 PM
For general OData structure and syntax I find that the Odataorg website is very helpful For example on this
topic
httpwwwodataorgdocumentationodata-version-2-0uri-conventions
The syntax of a $expand query option is a comma-separated list of Navigation Properties Additionally each
Navigation Property can be followed by a forward slash and another Navigation Property to enable identifying a
multi-level relationship
The page also has some sample URLs
Kamal JainApr 16 2014 536 AM
Dear Thomas
I agree that we need to pass all the associations in the expand I tried with some of options but was not
through
Now i just tried with below syntax and able to achive Thx
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010027
httpdewdftzld025pgdevsapcorp8000DTHCPXSZPMIS_PRO_ACTUALxsodata
ZPROHEADER(PR07_000002)$expand=ZACTUZEMPD
Regards
Kamal Jain
Thomas Jung in response to Blair Krotenko on page 27Apr 15 2014 623 PM
We do plan to release an ADONET provider specific to HANA in the near future This would probably be the
best option for consumption from NET Until then I would think that ODBC is probably the next best option It
gives you generally easy portability from already existing database code You could consume OData as well
although that is more generally consumed from the UI layer itself It guess it somewhat depends upon where
you are calling the service from in your NET application
Blair KrotenkoApr 15 2014 409 PM
Hi Thomas
We are looking at consuming HANA data in a NET application and from what I can see there are 2 options -
OData and ODBC It seems to me that OData might be the better option when consuming HANA data in an XS
application while ODBC might be the better option for NET What are your thoughts Is there a paper on this
subject I havent been able to find a comparison document for this Are there any security caveats to be aware
of for these options
Thanks
Blair
Thomas Jung in response to Kamal Jain on page 27Apr 15 2014 136 PM
You have to list both associations in the expand on the URL if you want both relationships to be processed
Kamal JainApr 15 2014 1249 PM
Hi Thomas
Thx for valuable and useful information
I have an query regarding XS Odata service creation for more than 2 tables and get all the data in one
command
There is req in which service needs to be created for 3 tables to get data from all these
First table has Project ID as key second table has composite
ProjectID and Employee Id as key and third table has Employee id as
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010028
key
So if I create navigation for first 2 tables based on project id and use expand comand than its working fine and I
can see data of both the tables
Further if I add navigation for third table also as below then below expand is displaying data for first two tables
only Pls share how to use expand command in this case if possible to get all tables data based on project id
How to use navigation ZEMPD here
httpdewdftzld025pgdevsapcorp8000DTHCPXSZPMIS_PRO_ACTUALxsodata
ZPROHEADER(PR07_000002)$expand=ZACTUamp
service namespace
DTHCPXS
DTHCPDTHCPDBHCP_PROJECT_HEADER
as ZPROHEADER
navigates (PROJECT as
ZACTU)
DTHCPDTHCPDBHCPT_ZPMIS_ACTUAL
as ZACTU
navigates (EMPLOYEE as
ZEMPD )
DTHCPDTHCPDBHCP_ZPMIS_RES_MASTER
as ZEMPD
association PROJECT principal
ZPROHEADER(PROJECTID)
multiplicity 1 dependent
ZACTU(PROJECTID) multiplicity
association EMPLOYEE principal
ZACTU(EMPLOYEEID)
multiplicity 1 dependent
ZEMPD(EMPLOYEEID) multiplicity
1
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010029
Pls suggest if there is anything to add or correct in XS odata service syntax above
Regards
Kamal Jain
Vikas Madaan in response to Thomas Jung on page 29Apr 14 2014 458 PM
Thanks Thomas
Under which component
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 29Apr 14 2014 450 PM
No this isnt a known issue Ive seen Nor can I recreate the problem in my system No you cant maintain the
authentication in XSHTTPDEST itself It intentionally must be set in XSADMIN tool I can really only suggest
that you open a support ticket
Vikas MadaanApr 14 2014 431 PM
Hi Thomas
I am trying to pull data from SAP system onto HANA Database using XSJOB files I am calling RFC enabled
function modules over HTTP request It helps me replicating the real time ECC data onto HANA as well with
back ground jobs
I am facing one problem in the XSHTTPDEST file I am able to create and activate the file using studio and this
file is even visible in the web based XS administration tool But in the web based tool when i provide user and
password for basic authotication then system just clears the user id and password when i try to save This the
reason our HTTP requests are getting failed and below is the response we are getting in the response body
lthtmlgtltheadgtlttitlegtLogon Error Messagelttitlegt
Is this known issue or we are missing something Is it possible to provide user and password in the
XSHTTPDEST file Is there any particular syntax
I checked and i have the required authorizations as well develper Guide
Please help
Regards
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010030
Vikas Madaan
Abdul HakimFeb 22 2014 359 AM
Hi Thomas - Any recommended book or resource to learn and master Server Side Javascript There were
many books available in the market but as a beginner need to know the right resource book to start with and
master this stuffAlso whether SAP plan to conduct any training to teach Server Side Javascript similar to other
standard training offerings
Thanks
Hakim
Samuel Tanor-GyeduFeb 20 2014 839 AM
Thanks Thomas
I will definitely have a look at SHINE
Thomas Jung in response to gentilini andre on page 30Feb 19 2014 422 PM
Difficult to say what is wrong I several things which are different than our sample that does this You are using
a POST for instance instead of a GET However if you are gettting a 200 then I assume the service call is
correct In client side tools (like Chrome Developer Tools) you should be able to see the response object from
the call
However what I would really recommend is that you study the SHINE content (SAP HANA Interactive
Education) There is already a sample application which does this in SHINE Also it has some special
JavaScript in the UI to handle the file attachment via AXAJ call Perhaps that is the part you are missing
You can read more about SHINE here It is also included already installed in the latest version of the HANA
Developer Center trial image (SP7 based)
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
gentilini andreFeb 19 2014 325 PM
Hi Thomas
well I followed your hints but it still donacutet work
I created a xsjs File like below
function downloadExcel()
try
var body =
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010031
alert(drin)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
alert(drusse)
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount
tTax Amount tNetto Amount tCurrency n
while(rsnext())
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
catch (e)
alert(db conn funktioniert nicht)
var a = $requestparametersget(cmd)
$responsesetBody(Invalid Command +a)
switch (a)
case doex
$responsesetBody(Invalid Command +a)
alert(filedownload)
thisdownloadExcel()
break
default
$responsestatus = $nethttpINTERNAL_SERVER_ERROR
$responsesetBody(Invalid Command +a)
The Controllerjs File
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010032
doFileDownload function (oEvent)
jQuerysaprequire(sapuicommonsMessageBox)
sapuicommonsMessageBoxshow(Export Starten sapuicommonsMessageBoxIconconfirm
Information)
sapuicommonsMessageBoxconfirm(Export starteninform Confirmation)
return false
function inform(rValue)
alert (drinnnnne)
var aurl = FileDownloadxsjscmd=doex
if(rValue) If User presses Ok
alert(aurl)
jQueryajax(
url aurl
method POST
dataType json
datacmddoex
success sapuicommonsMessageBoxalert(Export wird ausgefuumlhrtConfirmation)
errorfunction onErrorCall(jqXHR textStatus errorThrown)
alert(jqXHRstatus)
sapuicommonsMessageBoxshow(jqXHRstatus
ERROR
Error in calling Service )
return
complete sapuicommonsMessageBoxalert(Export Erfolgreich
abgeschlossenConfirmation)
)
return false
else If the user presses Cancel
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010033
sapuicommonsMessageBoxalert(Vorgang abgebrochenNotification)
)
at last but not least the view
sapuijsview(zag1_ui_cv_03Index
Specifies the Controller belonging to this View
In the case that it is not implemented or that null is returned this View does not have a Controller
memberOf zag1_ui_cv_03Index
getControllerName function()
return zag1_ui_cv_03Index
Is initially called once after the Controller has been instantiated It is the place where the UI is
constructed
Since the Controller is given to this method its event handlers can be attached right away
memberOf zag1_ui_cv_03Index
createContent function(oController)
create a lite button with an icon and a text
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010034
lite true
)placeAt(btn)
oButton3attachPress(oControllerdoFileDownload)
var oButton4 = new sapuicommonsButton(
text Refresh
icon imagesrefreshjpg
lite true
press function() var data = oTableval()
if(data == )
alert(no data found)
return
print(content)
print(DatArray)
if (data = )
alert(Funzt)
JSONToCSVConvertor(data CUSTOMER AMOUNT true)
)placeAt(btn)
jQuerysaprequire(sapuitableTable)
create table control with properties
var oTable = new sapuitableTable(
width 100
rowHeight 50
title Amount per Partner
selectionMode sapuitableSelectionModeNone
)
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Company Name
)
template new sapuicommonsTextView(
text CompanyName
)
sortProperty CompanyName
))
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010035
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Partner ID
)
template new sapuicommonsTextView(
text PartnerId
)
sortProperty PartnerId
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Postal Code
textAlign sapuicoreTextAlignEnd
)
template new sapuicommonsTextView(
text PostalCode
textAlign sapuicoreTextAlignEnd
)
sortProperty PostalCode
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text City
)
template new sapuicommonsTextView(
text City
)
sortProperty City
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Purchase ID
)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010036
template new sapuicommonsTextView(
text PurchaseOrderId
)
sortProperty Currency
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Lifecycle Status
)
template new sapuicommonsTextView(
text LifecycleStatus
)
sortProperty LifecycleStatus
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Gross Amount
)
template new sapuicommonsTextView(
text GrossAmount
)
sortProperty GrossAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Tax Amount
)
template new sapuicommonsTextView(
text TaxAmount
)
sortProperty TaxAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Amount Netto
)
template new sapuicommonsTextView(
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010037
text CM_NET_Amount_001
)
sortProperty CM_NET_Amount_001
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Currency
)
template new sapuicommonsTextView(
text Currency
)
sortProperty Currency
))
var oModel = new sapuimodelodataODataModel
(httpqperiorvmcldsr8000ZAG1_WS_001ZAG1_CV_001xsodata false)
oTablesetModel(oModel)
oTablebindRows(Amount)
return oTable
)
It wonacutet call the function or better said the action of the button works fine till to the point where it should call the
xsjsfile to generate the excel-file I wondered that in the ajax part the error- success- and complete-part will
be executed at the same time and not only one of this statements The message is 200 (The request has
succeeded The information returned with the response is dependent on the method used in the request)
Maybe you can see where my mistake is or whats going wrong
Iacuteve the developer edition on cloudshare (Hana Studio rev68 Server is on SPS05)
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010038
Andreacute
Thomas Jung in response to Samuel Tanor-Gyedu on page 38Feb 19 2014 523 AM
I dont think I can help you This appears to a question about how odata4j works not about XS I have no
experience with odata4j myself
Samuel Tanor-GyeduFeb 18 2014 913 AM
Hi Thomas
I have an odata service with this endpointhttpss5hanaxshanatrialondemandcomservicesUserxsodata
I am now trying to consume it from eclipse with the odata4j libraries
This is how I get the endpoint
public UserServiceOdata(String endpointUri)
thisendpointUri = endpointUri
ODataConsumerdumpresponseHeaders(true)
consumer = ODataConsumerscreate(endpointUri)
This is my method to add a user
public User addUser(User user)
consumercreateEntity(entitySet)properties(OPropertiesint32(propertyUserId
usergetId()))properties(OPropertiesstring(propertyUserName
usergetName()))properties(OPropertiesstring(propertyUserEmail usergetEmail()))execute()
return user
When I call addUser method I get an Error
Caused by javaxxmlstreamXMLStreamException ParseError at [rowcol][78253]
Message The reference to entity sourceUrl must end with the delimiter
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010039
When I use this endpoint httpss5hanaxshanatrialondemandcomservicesUsersvc everything works fine
With the httpss5hanaxshanatrialondemandcomservicesUserxsodata I get errors
Please I would be very grateful for assistance
Thanks in advance
Regards
Samuel
Thomas Jung in response to gentilini andre on page 39Feb 18 2014 431 AM
You have a fundamental misunderstanding here You are placing server side JavaScript code in your client
side UI5 application The function downloadExcel is something you need to execute on the server It needs to
be in an XSJS file and it is called from the client side via AJAX - as a REST service not as a local function
gentilini andreFeb 17 2014 451 PM
Hello Thomas
Thank you for this great How-To Guide
Iacutem pretty new in SAPUI5 and tried your export-sample in my little trial project but it doesnacutet work
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010040
My Button for this looks like
ltcodegt
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
lite true
press function() alert(oButton3getText())
downloadExcel()
ltcodegt
and the function for this action looks like
ltcodegt
function downloadExcel()
var body =
alert(drin)
print($query)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount tTax
Amount tNetto Amount tCurrency n
while(rsnext())
if(rsnext() == )
alert($responsesetBody( Failed to retrieve data ))
alert($responsestatus = $nethttpINTERNAL_SERVER_ERROR)
else
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010041
ltcodegt
Iacutem afraid and hope that you can help me
Kind regards
Andreacute
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1246 PM
gtIs there any restriction or development limitation in the XSJSLIB files
Thats a very general question Difficult to answer without any context
Vikas Madaan in response to Thomas Jung on page 41Feb 11 2014 1245 PM
Thanks Thomas
I think we are on same page
Once quick question that came to my mind Is there any restriction or development limitation in the XSJSLIB
files
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1230 PM
gtCould please help me in understanding in more advantagesdisadvantages for both techniques
Youve summarized it pretty well already
gtbecuase i dont want to use both the approaches
Even with the CRUD support and exits in XSODATA its still pretty hard to do 100 via XSODATA There are
still valid use cases for XSJS when you need custom body custom read processing job scheduling etc Its
good to try and use XSODATA whenever possible but I wouldnt automatically exclude the use of XSJS
Vikas MadaanFeb 11 2014 1008 AM
Hi Thomas
Thanks a lot for sharing useful information through various blogs
In my current project we are evaluating use of XSOData or XSJS applications I saw your videos like the one
mentioned below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010042
httpwwwsaphanacomdocsDOC-4376
Want i understood from various blog is this
From SP7 we can write exsits in the OData services and it is very easy to consume at the client side just like
any REST base service and from my understanding it is Scalable as well I would love to use XSOData always
becuase development effort is very less compare to XSJS and it is very easy to rampup the team on OData
related development objects
XSJS were as provide more control becuase of server side scripting becuase it allows development on the
server side using JavaScript Core APIs of SAP HANA Extended Application Services are therefore exposed
as JavaScript functions providing easy access to the HTTP Request and Response object as well database
access to execute SQL or call SQLScript Procedures It provide us control over the body format and and URL
parameter definition
Could please help me in understanding in more advantagesdisadvantages for both techniques
I am very keen to understand and also explain the same to team members becuase i dont want to use both the
approaches and even sometimes customer can also ask the same to us
Also If we are on SP6 then from my understanding XSJS provides us more capability in terms of complex
application Corrent me If i am wrong
Thanks
Regards
Vikas Madaan
Thomas Jung in response to Raghuveer Phull on page 42Feb 5 2014 312 PM
Yes there are videos on the CRUD features of XSODATA which were new in SP6
For more on CRUD support in SP6 see this video
oData CreateUpdateDelete Support in SAP HANA SPS6
For the extended support for XSJS exits in SP7 see this video
SAP HANA SPS 07 XSODATA Exits in XSJS
Raghuveer PhullFeb 5 2014 122 AM
Do you have an exampledocumentationvideo where you can write a service which will populate Hana DB
What I am asking for is a way for my external script to populate the DB tables i have created in Hana DB
Thomas Jung in response to reda miraoui on page 43Jan 29 2014 411 PM
The source code for the examples shown here are shipped as part of SHINE (SAP HANA Interactive
Education)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010043
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Vivek Singh Bhoj in response to reda miraoui on page 43Jan 29 2014 352 PM
Hi Reda
You can import Shine Content in HANA and then check all these source codes
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Regards
Vivek
reda miraoui in response to Thomas Jung on page Jan 29 2014 344 PM
Hey Thomas
Is it possible to download source code of your project from this HANA tutorial
Thanks
Reda
Thomas Jung in response to Abdul Hakim on page 43Nov 21 2013 1133 PM
Yes River can be used as an alternative and when activated it will generate Server Side JavaScript andor
SQLScript
Abdul Hakim in response to Thomas Jung on page 44Nov 21 2013 747 PM
Hi Thomas - Was going through blog regarding River (RDL)Just a question on this
When you say Programming language for HANA native development is Server side Javascript SQL SQL
ScriptOnce RDL is rolled out whether RDL can be used for native application development instead of Server
side Java script SQL SQL Script I am very much new to this stuff so appreciate if you can also help on
how to get started with Server Side Java script SQL SQL Script for HANA
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 30 2013 750 AM
Hi Thomas
Thanks for your response I am talking about more content on shine
thanks
Ashutosh
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010044
Baskar Gopalakrishnan in response to Thomas Jung on page 44Oct 30 2013 1249 AM
Hi Thomas
Im a SAP PI Middleware consultantSAP topic leader in XIPI heavily worked on Java related
Netweaver stack I have knowledge in ABAP but not worked heavily in abap I have enrolled your sap hana
native application development course I feel very interesting I did work heavily in java and javascript projects
using eclipse development tool Do you think if I invest my time in just native hana development and proceed
in HANA field is a good step I dont have BW experience either
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 819 PM
Thanks for the clarification Much appreciated
Thomas Jung in response to Abdul Hakim on page 44Oct 29 2013 120 PM
gtABAP Close to HANA means whether we can expect a similar 2 tier architecture similar to HANA XS in the
future or what does that mean
No it doesnt mean that ABAP will become a 2 tier architecture We will not move the ABAP VMKernel into
HANA itself It will remain a separate application server At least for the current plansforeseeable future What
he was referring to was bringing the programming models closer For instance the new 740 SP5 feature that
allows you to write SQLScript directly within an ABAP class method
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 650 AM
Thomas - Thanks for the clarificationMuch appreciatedI was listening to ABAP on HANA session by
Thorsten Schneider this year Teched and he was mentioning that SAP Plans to bring ABAP very close to
HANA in the coming future but not much details have been discussed in the sessionABAP Close to HANA
means whether we can expect a similar 2 tier architecture similar to HANA XS in the future or what does that
mean
Thanks
Hakim
Thomas Jung in response to Abdul Hakim on page 45Oct 28 2013 703 PM
gt whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the option is
recommended by SAP then kindly share the pros and cons of each of the item
Taken from the TechEd CD103 session slides
Guidance
bulluse ABAP for optimization of existing progams (in context of SAP Business Suite or BW)
bullconsider HANA Native Development for development of new applications which will solely run on SAP HANA
bullcombine ABAP and HANA Native Development to enrich existing applications (eg SAP HANA Live Fiori)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010045
ABAP
bullapplications follow 3-tier architecture
bullABAP is in general database agnostic but with release 74 optimized for SAP HANA
bullProgramming language ABAP ABAP OO with the option to use SAP HANA features
bullIDE eclipse-based ABAP Development Tools
HANA Native Development
bullapplications follow 2-tier architecture
bullHANA Native Development is SAP HANA specific and embedded in the database
bullProgramming language River server-side JavaScript SQLSQLScript
bullIDE eclipse-based SAP HANA Studio + web IDE
Thomas Jung in response to ashutosh dixit on page 45Oct 28 2013 701 PM
gtIs there any more demos for the SHINE
Im not exactly sure what you mean by that We are building additional content for SHINE that will be delivered
in SP7
Abdul HakimOct 28 2013 326 PM
Thomas - Let us say a customer is running SAP Netweaver 74 ABAP with HANA DB and they have HANA
extended service as wellIf the customer wants to do new developments then what is the recommendation
from SAP ie whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the
option is recommended by SAP then kindly share the pros and cons of each of the item (SAP Netweaver 74
ABAP Vs SAP HANA XS)
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 28 2013 221 PM
Hi Thomas
Thanks a lot for your its working now
Is there any more demos for the SHINE
Thanks
Ashutosh
Thomas Jung in response to ashutosh dixit on page 46Oct 25 2013 809 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010046
As this content is now standard in SP6 as part of SHINE (SAP HANA INteractive Education) there also some
setup instructions on helpsapcom
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Basic points to check - have you generated the synonyms in the data generator Ran the data generator to
create some data Have the role assigned Added client 001 to your user profile
ashutosh dixitOct 24 2013 130 PM
Hi Thomas
Amazing blog - once again Thomas thanks
I have been following you for many days attended your OPEN SAP course also
That was an amazing course for new learner like me
One of our client is looking forward for XS based search Application identical to what you have created in your
DEMO
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010047
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010048
But I am not able to fetch the data on blank HTML page is coming with no data
If there is any step by step document related to this please help in getting that
Any help will be highly appreciated
Thanks
Ashutosh
Naveen KumarSep 26 2013 1130 AM
Good Document
Heber FabianoAug 27 2013 323 PM
Great content as always Keep sharing with us
Thomas Jung in response to Orel Stringa on page 48Aug 27 2013 147 PM
This is currently not possible The CORS support is for all origins We dont yet have the feature to maintain a
whitelist of CORS origins
Orel Stringa in response to Thomas Jung on page Aug 27 2013 801 AM
Hi Thomas
nice to see that SAP has made it possible with SP6 to specify cross origin resource sharing (CORS) support
via the xsaccess file SP6 HANA development guide has example of how to specify CORS support
I have build an XS application and would like to serve SAPUI5 on a diffhost than XSHANA
How can I specify that I would like to allow cross origin access restricted to certain domain(s) only
Is there a special keyword syntax for specifying that
Thank yoi
Orel
Vijay UthayakumarAug 27 2013 131 AM
Highly informative amp digestible Fantastic work
Jerry WangAug 1 2013 955 AM
Hi Tomas
Thank you
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010049
Jerry
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 644 PM
JSLint checks are very strict and often produce syntax errors for items that just stylistic and wont actually
cause an error upon activation or runtime You can either ignore the JSLint errors or deactivate JSLint for this
project in these cases However it might also be an indication that the JavaScript code you are trying to import
isnt compatible with Strict mode
httpsdevelopermozillaorgen-USdocsWebJavaScriptReferenceFunctions_and_function_scope
Strict_mode
Milan Vrozina in response to Thomas Jung on page 49Jul 21 2013 624 PM
Thanks for clarification I thought there would be some kind of import
But anyway in case of this specific library I have some problems with JSLint validation when I do cut and paste
of the original code
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 343 PM
What kind of problem are you having using this library Strict mode JavaScript which doesnt try to access the
DOM Window or other client side specific objects should work in Server Side XSJS Generally if you have a
library you just cut and paste into your XSJS or an XSJSLIB file and then call the functions from your code
Milan VrozinaJul 21 2013 339 PM
Hello
first and foremost thank you for perfect openSAP classes related to HANA development and for this blog as
well
I have one question related to server-side javascript You mentioned in course that is possible to use 3rd party
libraries or reuse 3rd party code But I cant find a possible way how to import 3rd party javascript library -as
is- to server and use it For example I would like to use JSZip library to zip some file before sending it to client
from xsjs application Is that possible Thank you
Chandrashekhar MahajanJul 3 2013 734 PM
This is excellent blog Now HANA XS is very much clear to me
Mohan krishnaJul 1 2013 144 PM
WOW - great blog Thomas This will be very helpful in understanding SAP hana Good Job
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010050
Abdul Hakim in response to Thomas Jung on page 50Jun 27 2013 833 PM
Thanks for the clarification
Thomas Jung in response to Abdul Hakim on page 50Jun 27 2013 659 PM
HANA Extended Application Services uses SQLScript and JavaScript as its two primary programming
languages
gtwhether the current SAP Business suite based on ABAP will be completely migrated to HANA service
No The Business Suite already runs on HANA but still via the ABAP application server It will continue to
leverage HANA via a combination of enhancements to ABAP and utilizing some of the technologies described
in this blog
gtAlso whether ABAP can be used to built application in HANA extended services
No There is no ABAP language container in HANA Extended Application Services
Abdul HakimJun 27 2013 405 PM
Hi Thomas - What is the programming language used for HANA Extended application services
As HANA is more than a database ie application platform by itself and as you mentioned that more and more
applications will be built on HANA i have question as how the future SAP ERP system looks likewhether the
current SAP Business suite based on ABAP will be completely migrated to HANA service in the future or SAP
ABAP server will continue to evolve and receive focus investment from SAP Also whether ABAP can be used
to built application in HANA extended services Your thoughts
Thanks
Abdul Hakim
Thomas Jung in response to Ravindra Channe on page 50Jun 11 2013 830 PM
Yes it is still planned However we are still a couple of weeks away and Ive not seen the final installers to say
for certain its there
Ravindra ChanneJun 11 2013 815 PM
Hi Thomas
Thanks for a wonderful and very informative blog Is there any update on 32 bit REGI file
Is it expected along with SPS6
Regards
Ravi
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010051
Thomas Jung in response to Amanda Rzepka on page Jun 7 2013 942 PM
gtCan the XS Services be used in a BW on HANA Scenario
Yes XS is part of ALL HANA systems You should check and make sure you are licensed for direct access to
the underlying HANA instance however
Thomas Jung in response to Holger Schimanski on page Jun 7 2013 941 PM
gtIs there a similar library which could be used in XS Engine
The XSODATA development object is similar We also have higher level frameworks for XMLA and Search
Services (InA) You can expect more such high level frameworks to be added to the HANA Extended
Application Services in the future
Thomas Jung in response to Manav Mehra on page Jun 7 2013 939 PM
Have you used something like the Chrome developer tools to see see if you are getting any client side
javascript errors or to see if the request to your xsodata service is successful
Thomas Jung in response to Christian Hufnagl on page 52Jun 7 2013 938 PM
It will ship as non-automatic content in SPS6 (all systems will have it and it just needs to be imported) The
delivery units are also part of this weeks updates to the Cloudshare and AWS developer center images They
are also available for download as part of the content of the openSAP course
Thomas Jung in response to Matthew Pickell on page 51Jun 7 2013 937 PM
CORS support will come with SPS6 at the end of June
Thomas Jung in response to Jeroen Custers on page 51Jun 7 2013 936 PM
gtWill this bug be fixed in HANA ver 56
Personally Ive still experienced this bug in SPS6 internal builds Must be a tricky one to find Luckily the
workaround of closing and reopening isnt too difficult Just annoying This also probably makes the bug low
priority
Jeroen Custers in response to Vivek Singh Bhoj on page 52Jun 7 2013 411 PM
This issue also occurs on rev56
Matthew PickellJun 7 2013 258 PM
Thomas
Has CORS been included in a release yet
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010052
Vivek Singh Bhoj in response to Chandra Edem on page 52Jun 5 2013 601 AM
Hi Chandra
Date for Week1 Assignment has been extended till June 11
So you can give Week 1 Assignment now
Christian HufnaglJun 4 2013 543 PM
Hi Thomas
thank you for the interesting tutorial
Can you tell me whether it is possible to download the source code of the ldquoPutting it all togetherrdquovideo And if yes Where can I download itThanks
Christoph
Vivek Singh BhojJun 4 2013 1116 AM
Hi Thomas
Thanks for OpenSAP classes
Your Youtube Account also have very good exercises
IN OpenSAP Week 2 Unit 3 tutorial after assigning admin role to my user Id i am not able to see sequences
synonyms triggers under my schema or any other schema i am only able to see Column Views Procedures
Tables and Views
Though now i am able to insert data into my created table
Can you let me know how i will be able to see Sequences under my schema without removing the admin role
I am using HANA revision 52
Got to know from OpenSAP that
This is a known issue and the only way that Ive seen to fix it is to actually close the studio and open it again
then refresh the node
Cheers
Rich Heilman
SAP HANA Product Management
Will this bug be fixed in HANA ver 56
Chandra Edem in response to Thomas Jung on page 53Jun 4 2013 646 AM
Thomas
I registered for OpenSAP course Introduction to Software Development on SAP HANA on June 2 900PM
I didnt know that it is going to end WEEK1 assignment test on 632013 300PM Is there any way can take
that WEEK1 Assignment Test
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010053
Thanks
Chandra
Thomas Jung in response to Alexander Bauer on page Jun 3 2013 856 PM
SAPUI5 gets updated auutomatically when you apply HANA revisions There is no additional download or
update needed
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+01006
service namespace saphanademocontentepm TECHEDEPMtechedepmdbbusinessPartner as BUYER
Figure 5 - XSODATA Service Definition and Test
Upon activation of this XSODATA file we already have an executable service which is ready to test The
generated service supports standard OData parameters like $metadata for introspection (see Figure 6) $filter
$orderby etc It also supports body formats of ATOMXML and JSON (Figure 7 for an example) Because
OData is an open standard you can read more about the URL parameters and other features at http
wwwodataorg
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+01007
Figure 6 - OData $metadata support
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+01008
Figure 7 - Example OData Server JSON Output
The examples in the above figures demonstrate how easily these services can be tested from the web browser
but of course doesnt represent how end users would interact with the services Although you can use a variety
of 3rd party tools based upon JavaScript like Sencha Sencha Touch JQuery JQuery Mobile and PhoneGap
just to name a few SAP delivers the UI Development Toolkit for HTML5 (SAPUI5) standard in SAP HANA
Extended Application Services A particularly strong feature of SAPUI5 is the integration of OData service
consumption not just at a library level but also with special features within the UI elements for binding to OData
services
For example within SAPUI5 you can declare an OData model object and connect this model object to the URL
of the XSODATA service Next create a Table UI element and connect it to this model object Finally you call
bindRows of the Table UI element object and supply the OData entity name you want to use as the source of
the table
var oModel = new sapuimodelodataODataModel (servicesbuyerxsodata false) oTable = new sapuitableTable(testtableId tableID visibleRowCount 10) oTablesetModel(oModel) oTablebindRows(BUYER)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+01009
This creates an UI Element which has built-in events such as sort filter and paging which automatically call
the corresponding OData Service to fulfill the event No additional client side or server side programming is
necessary to handle such events
Figure 8 - OData Bound Table UI Element
For more details on OData service creation in SAP HANA Extended Application Services and utilizing these
services within SAPUI5 please view these videos
Server Side JavaScriptThe XSODATA services are great because they provide a large amount of functionality with minimal amounts
of development effort However there are a few limitations which come with such a framework approach For
example in SAP HANA SP5 the OData service framework is read only Support for Insert Update and Delete
operations is available with SAP HANA SP6
Luckily there is an option for creating free-form services where you can not only perform update operations but
also have full control over the body format and URL parameter definition SAP HANA Extended Application
Services also allows development on the server side using JavaScript (via project files with the extension
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010010
XSJS) Core APIs of SAP HANA Extended Application Services are therefore exposed as JavaScript
functions providing easy access to the HTTP Request and Response object as well database access to
execute SQL or call SQLScript Procedures
In this simple example we can take two numbers as URL Request Parameters and multiply them together and
then return the results as text in the Response Body This is an intentionally basic example so that you can
focus on the API usage
Figure 9 - Simple XSJS Service
However the power of XSJS services comes from the ability to access the database objects but also have full
control over the body output and to further manipulate the result set after selection In this example we use
XSJS to create a text-tab delimited output in order to support a download to Excel from a user interface
function downloadExcel() var body = var query = SELECT TOP 25000 PurchaseOrderId PartnerId to_nvarchar(CompanyName) LoginName_1 CreatedAt GrossAmount FROM _SYS_BICtechedepmdbPO_HEADER_EXTENDED order by PurchaseOrderId $tracedebug(query) var conn = $dbgetConnection() var pstmt = connprepareStatement(query) var rs = pstmtexecuteQuery() body = Purchase Order Id tPartner Id tCompany Name tEmployee Responsible tCreated At tGross Amount n while(rsnext()) body += rsgetString(1)+ t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetTimestamp(5)+t+rsgetDecimal(6)+n $responsesetBody(body) $responsecontentType = applicationvndms-excel charset=utf-16le $responseheadersset(Content-Dispositionattachment filename=Excelxls) $responseheadersset(access-control-allow-origin) $responsestatus = $nethttpOK
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010011
ClosingThis blog hopefully has served to give you a small introduction to many of the new concepts and possibilities
with SAP HANA SP5 and SAP HANA Extended Application Services
Over the coming weeks we will be posting additional blogs with more advanced examples and techniques as
well how to integrate SAP HANA Extended Application Services content into additional environments Likewise
there is a substantial Developerrsquos Guide which expands on many of the concepts introduced here
It is also important to note that while SAP HANA Extended Application Services ships asproductive software (meaning customers can go live in production with it) in SAP HANA SP5 it isa controlled release initially with a special ldquoProject Solutionrdquo program in place around this newfunctionality Please refer to Service Note 1779803 for additional details on the current statusof the Project Solution This Project Solution approach is designed to provide the highest levelsof support possible to initial customers and partners who choose to develop using SAP HANAExtended Application Services It also provides a channel for feedback to Product Managementand development so that we take suggestions and ideas and quickly integrate them into futurerevisions of SAP HANA and SAP HANA Extended Application Services103803 Views Tags sapmentor hana developer code database in_memory sap_mentor hana_devcentersap_hana sapui5 hana_studio xs hde xsjs xsodata
Glen OoiDec 23 2014 345 PM
Hi Thomas
In need of your expert advice
I have a situation where I am using BO Dashboards to create my Dashboard which is consuming the data from
HANA
I have a requirement to allow the user to comment in the dashboard and it will write back to the HANA DB and
also display the comments in the Dashboard
In order for the BO Dashboard to write back to HANA DB is via web services
Is there any way i can create a WSDL URL and consume the XSJS or ODATA services in HANA
Muhammad SadiqDec 10 2014 140 PM
I need your help in writing an API(XSJS service) which will take JSON format data and inserted into HANA
database
Tarasankar Banerjee in response to Thomas Jung on page 14Nov 5 2014 852 AM
Thanks Thomas Could you give an example of how to redirect
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010012
Im facing a strange issue while trying to import weather data from several cities together The issue appears to
be connected with the content of the response object
Following is the code of the Weatherxsjs file
try
var cmd = $requestparametersget(cmd)
var body
var response
var obj
var propertyName
if(cmd === import)
var dest = $nethttpreadDestination(rootworkTara02XSTest01XSHttpTest01 weather)
var client = new $nethttpClient()
var req = new $webWebRequest($nethttpGET group
id=12750041264527127733312732941275339ampunits=metric)
clientrequest(req dest)
response = clientgetResponse()
$responsecontentType = textplain
if(responsebody)
body = responsebodyasString()
obj = JSONparse(body)
body = cmd + n n + responsestatus + n n + responsecontentType
+ n n + responsebody + n n + objgetOwnPropertyNames()
$responsesetBody(body)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010013
$responsestatus = $nethttpOK
catch(e)
$responsecontentType = textplain
$responsesetBody(emessage)
$responsestatus = $nethttpINTERNAL_SERVER_ERROR
Following is the weatherxshttpdest
host = apiopenweathermaporg
port = 80
description = my weather checker
useSSL = false
pathPrefix = data25
authType = none
useProxy = true
proxyHost = ltproxy_detailsgt
proxyPort = ltproxy_port
timeout = 0
On accessing httplthostnamegt8000rootworkTara02XSTest01XSHttpTest01Weatherxsjs
ampcmd=import I am receiving the error message BodyasString unsupported charset specified in
Content-Type header (utf8)
If the body = responsebodyasString() statement is commented out I receive the error message
JSONparse unexpected character because the responsebodyasString() itself could not work correctly
However the URL httpapiopenweathermaporgdata25group
id=12750041264527127733312732941275339 returns data correctly
I am using the same URL in my code
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010014
Could you please advise regarding this issue Thanks for your help
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 14Nov 4 2014 319 PM
gtIs it possible to read files using XS For example some configuration file kept in the server
No there is no API to read from the file system of the underlying operating system You can read the HANA
configuration ini files however because they are exposed via SQL
gtIs it possible to call a html file from the xsjs file Something likerequestgetRequestDispatcher()forward() from
JAVA servlets
In the body of the response you send back to the client your could issue a redirect
Tarasankar Banerjee in response to Tarasankar Banerjee on page 15Nov 4 2014 1034 AM
Hi Thomas
Finally got my application running It is now fetching weather data from external sites
Have two more questions
1 Is it possible to read files using XS For example some configuration file kept in the server2 Is it possible to call a html file from the xsjs file Something like
requestgetRequestDispatcher()forward() from JAVA servlets
Thanks
Regards
Tarasankar
Robert WeberNov 3 2014 1136 AM
If someone is having difficulties with the alert log full on the xsengine
you can do the same trick as for the statisticserver in oder to reset the log area see details in OSS Notes
2019148 and 1950221
The commands are then
select VOLUME_ID from m_volumes where service_name = xsengine
ALTER SYSTEM ALTER CONFIGURATION (daemonini host lthostnamegt) UNSET
(xsengineinstances) WITH RECONFIGURE
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010015
ALTER SYSTEM ALTER CONFIGURATION (topologyini system) UNSET (hostlthostnamegt xsengine)
WITH RECONFIGURE
ALTER SYSTEM ALTER CONFIGURATION (topologyini system) UNSET (volumes ltvolume_idgt) WITH
RECONFIGURE
ALTER SYSTEM ALTER CONFIGURATION (daemonini host lthostnamegt) SET (xsengineinstances) =
1 WITH RECONFIGURE
Then restart the HANA instance and after that make a full backup (and schedule the regular backup in order to
prevent this situation again)
Hope this will help someone like me -)
Have a nice day
Regards
Robert
Tarasankar Banerjee in response to Tarasankar Banerjee on page 15Nov 3 2014 1031 AM
Update
I tried to access the XS Admin console from another user and faced only the No valid Crypto error However
could still update the proxy user details and the sample application successfully ran at last The relevant roles
were provided in Granted Roles not Application Privileges Probably that was the issue earlier
I would check again with new Http Destination and Server side Java Script
Thanks a lot Thomas for all your help
Regards
Tarasankar
Tarasankar Banerjee in response to Thomas Jung on page 18Nov 3 2014 929 AM
Hi Thomas
I also tried to use the sample code from section 841 Tutorial Use the XSJS Outbound API of the HANA
Developer Guide with minor modifications (for package structure proxy settings etc) This time the destination
was found The new project structure with the sample files yahooxshttpdest and sapStockxsjs is as below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010016
However it did not bring any data The content of the response object indicated that there was Proxy
authentication issue
When I tried to check the Destination in the XS Admin Console surprisingly none of the fields are populated
and everything (except the Trust Store drop down) is disabled All these fields are supposed to be populated
as indicated in the Modeling Guide
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010017
However the User already has the following privileges
The same scenario was present for the Http Destination I prepared earlier There are couple of internal errors
at the bottom On clicking them the following list is displayed
1 Internal Error dbError(ConnectionprepareStatement) 258 - insufficient privilege Not authorized at
ptimequerycheckerquery_checkcc24182 No valid SAP Crypto configuration
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010018
It appears from various blogs that the second error (No valid SAP Crypto configuration) is related to SSL
configuration in HANA I would contact the HANA Administrator to look into this issue Of course it would be
great if you could provide some insight
However I have no clue regarding the first error Request your help and cooperation in this regard
The initial issue of not finding the HttpDestination which I created still persists
Thanks for all your help
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 18Oct 31 2014 342 PM
First of all you would never use the workspace name It isnt ever part of anything It is only the package
structure that counts The first item in your list is the only one with the correct package Off hand it looks right to
me You are supposed to supply the full package path Have you configured this HTTP Destination in the XS
Admin tool yet
Tarasankar Banerjee in response to Thomas Jung on page 18Oct 31 2014 326 PM
Updated it Thanks
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 18Oct 31 2014 313 PM
Your comment got cut off We never really get to see what your problem is
Tarasankar Banerjee in response to Thomas Jung on page 21Oct 31 2014 256 PM
Thanks Thomas
I am facing as issue while trying to use an HTTP Destination I understand that the xshttpdest and xsjs file
need to in the same folder Following is the structure of my test project
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010019
As you can see the HTTP Destination and the XSJS files are in the same folder services The workspace
name is XS_Workspace and the package structure is as follows
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010020
Now I am trying to read this destination
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010021
When I am using full package structure destination_package =
rootworkTara02XSTest01XSHttpTest01services I am receiving the
error message httpreadDestination destination not found (package
rootworkTara02XSTest01XSHttpTest01services name XSHttpDest01)
On using the workspace name destination_package = XS_Workspaceservices I am receiving the
error message User is not authorized to use destination (package XS_Workspaceservices name
XSHttpDest01)
On using destination_package = rootworkTara02XSTest01services also I am receiving the error
message User is not authorized to use destination (package rootworkTara02XSTest01services
name XSHttpDest01) Strangely the services folder is not directly under XSTest01
Lastly I deliberately gave a wrong service name destination_package = XS_Workspaceservices and
destination_name = XSHttpDest02 But even then I received the error message User is not authorized to
use destination (package XS_Workspaceservices name XSHttpDest02) not that the destination is not
found
Could you please help me to resolve this issue
Thanks a lot for your helps
Regards
Tarasankar
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010022
Thomas Jung in response to Tarasankar Banerjee on page 22Oct 30 2014 152 PM
Since SPS06 its possible to use outbound HTTP destinations and to call out to external services using XSJS
Thomas Jung in response to Tarasankar Banerjee on page 22Oct 30 2014 150 PM
gtSo when the program runs in server would it automatically consider the OS user credentials
No It doesnt automatically use anything You have to specific the user and password that you want to use for
the proxy Although many proxy servers dont require a username and password
Tarasankar Banerjee in response to Thomas Jung on page 23Oct 30 2014 707 AM
Hi Thomas
Just watched the video you shared above Thanks a lot for it It is really informative and helpful
Regards
Tarasankar
Tarasankar Banerjee in response to Tarasankar Banerjee on page 22Oct 30 2014 346 AM
Got answer for the second point SAP HANA XS Administration Tool is the place to configure Proxy settings
Regards
Tarasankar
Tarasankar Banerjee in response to Tarasankar Banerjee on page 22Oct 29 2014 314 PM
Dear Thomas
another question is that does the proxy settings in the HttpDestination refer to the OS user of the HANA
server We specify useProxy as true and authType as basic in the HttpDestination but not maintain any
user credentials So when the program runs in server would it automatically consider the OS user credentials
Thanks
Regards
Tarasankar
Tarasankar Banerjee in response to Thomas Jung on page 23Oct 29 2014 132 PM
Thanks Thomas I am currently checking this option only
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010023
My current requirement is to fetch Weather Data and Social Media data from various OData services and store
them in HANA for further analysis What might be the best way for this I am currently checking the option of
creating an XS application which would connect to the external services fetch the data and save that in HANA
using DB Connection Is this the best way Or should we try to use JAVA or some other way
Your valuable suggestions are most welcome Thanks
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 23Oct 29 2014 1256 PM
gtHowever is it possible to consume XSODATA service from XSJS instead of using DB Connection
You can via an outbound HTTP destination although I certainly wouldnt recommend it It would be rather
complex and not well performing
gtAlso is it possible to consume data from external OData services for weather data social media data etc from
XSJS
Sure with the same Outbound HTTP Connectivity
httpswwwyoutubecomwatchv=fWirvj9l7eY
Maintaining HTTP Destinations - SAP HANA Developer Guide - SAP Library
Tarasankar BanerjeeOct 29 2014 1119 AM
Dear Thomas
Thanks for the great blog
I am able to connect to Database and execute queries from XSJS service However is it possible to consume
XSODATA service from XSJS instead of using DB Connection
Also is it possible to consume data from external OData services for weather data social media data etc from
XSJS
If possible it would be great if you could provide some code sample or guidelines
Thanks
Regards
Tarasankar
Thomas Jung in response to Weiping Lu on page 24Sep 25 2014 833 AM
Please refer to service note 1849775
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010024
httpservicesapcomsapsupportnotes1849775
I believe it will address your issue
Weiping LuSep 24 2014 519 PM
Hi Tom
Great post and videos I have a tough issue calling a HANA procedure from XS takes gt 5min but from HANA
studio lt 1 min Were using Amazon AWS rev 70 and 73 Any help will be greatly appreciated
Thanks
WPL
Thomas Jung in response to Su Srikanth on page 24Aug 11 2014 253 PM
You transport XSODATA services like you would any other repository content - via a Delivery Unit
Su SrikanthAug 11 2014 750 AM
Hi Thomas
Great blog
Ive a query here - we create the odata services(andor URLs created to view in the web browser) in
development environment now if we have to transport it to the quality andor production environment how
can we do this - is the same as importexport or is there any specific way to do please help with any useful
pointers
Many thanks as always
Su
Thomas Jung in response to ARSHAD SHAIKH on page 24May 15 2014 231 PM
Ive never written any blogs on calculation views I dont cover that topic That is why I suggested you ask your
question in the proper SCN forum
Although looking at your your above SQL Statement I dont see why you couldnt do this directly in XSODATA
off of the table STATUS without the need for the calculation view or the SQLScript Procedure
ARSHAD SHAIKH in response to Thomas Jung on page 25May 15 2014 1154 AM
Hello Thomas
I am new to hana Please suggest me the blogs of you related to calculation view that calling
procedures(procedures have out parameter)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010025
I am trying to fetch the result of procedure in calc view and want to create odata service for that calculation
view
procedure code goes like this
---------------------------------------
CREATE PROCEDURE TWEETS_TODAY(OUT OP BIGINT)
language SQLSCRIPT sql security invoker default schema SOCIAL360 reads sql data as
BEGIN
SELECT COUNT() INTO OP FROM SOCIAL360STATUS WHERE CREATED_AT = CURRENT_DATE
END
calc view code goes like this
----------------------------------------
Begin Procedure Script
BEGIN
DECLARE OP BIGINT
CALL SOCIAL360TWEETS_TODAY(OPvar_out)
END End Procedure Script
Thanks
-Arshad
Thomas Jung in response to ARSHAD SHAIKH on page 25May 15 2014 944 AM
Your question seems to have no relation to the content in this blog Please consider instead asking general
HANA questions in the appropriate SCN Forum
ARSHAD SHAIKHMay 15 2014 917 AM
Hi Thomas
I want to call procedures in calculation view (procedures have out parameter)
Please suggest me step by step procedure with example and supporting documents
Thanks
ARSHAD SHAIKH
Henrique Pinto in response to Blair Krotenko on page 26Apr 16 2014 711 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010026
Hmm not really sure of that I see it but that might be because Im an employee
But the NET development partner I was working with was not enrolled in any kind of beta testing program and
they were able to download it so I guess you should as well
Make sure to go in the Installation and Upgrades menu and not the Support Packages and Patches
Go to httpservicesapcomswdc -gt Installations and Upgrades -gt Browse our Download Catalog -gt SAP In-
Memory (SAP HANA) -gt SAP HANA ADONET 10
Best regards
Henrique
Blair Krotenko in response to Henrique Pinto on page 26Apr 16 2014 656 PM
Thanks for the info Henrique but I cant find it I dont know if it is an authorization issue or do we need to be a
ramp-up customer to dl and use a beta product
Thanks
Blair
Henrique Pinto in response to Thomas Jung on page 27Apr 16 2014 614 PM
The ADONET provider is available for download in the SAP Service Marketplace (in beta edition so far)
Thomas Jung in response to Kamal Jain on page 26Apr 16 2014 514 PM
For general OData structure and syntax I find that the Odataorg website is very helpful For example on this
topic
httpwwwodataorgdocumentationodata-version-2-0uri-conventions
The syntax of a $expand query option is a comma-separated list of Navigation Properties Additionally each
Navigation Property can be followed by a forward slash and another Navigation Property to enable identifying a
multi-level relationship
The page also has some sample URLs
Kamal JainApr 16 2014 536 AM
Dear Thomas
I agree that we need to pass all the associations in the expand I tried with some of options but was not
through
Now i just tried with below syntax and able to achive Thx
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010027
httpdewdftzld025pgdevsapcorp8000DTHCPXSZPMIS_PRO_ACTUALxsodata
ZPROHEADER(PR07_000002)$expand=ZACTUZEMPD
Regards
Kamal Jain
Thomas Jung in response to Blair Krotenko on page 27Apr 15 2014 623 PM
We do plan to release an ADONET provider specific to HANA in the near future This would probably be the
best option for consumption from NET Until then I would think that ODBC is probably the next best option It
gives you generally easy portability from already existing database code You could consume OData as well
although that is more generally consumed from the UI layer itself It guess it somewhat depends upon where
you are calling the service from in your NET application
Blair KrotenkoApr 15 2014 409 PM
Hi Thomas
We are looking at consuming HANA data in a NET application and from what I can see there are 2 options -
OData and ODBC It seems to me that OData might be the better option when consuming HANA data in an XS
application while ODBC might be the better option for NET What are your thoughts Is there a paper on this
subject I havent been able to find a comparison document for this Are there any security caveats to be aware
of for these options
Thanks
Blair
Thomas Jung in response to Kamal Jain on page 27Apr 15 2014 136 PM
You have to list both associations in the expand on the URL if you want both relationships to be processed
Kamal JainApr 15 2014 1249 PM
Hi Thomas
Thx for valuable and useful information
I have an query regarding XS Odata service creation for more than 2 tables and get all the data in one
command
There is req in which service needs to be created for 3 tables to get data from all these
First table has Project ID as key second table has composite
ProjectID and Employee Id as key and third table has Employee id as
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010028
key
So if I create navigation for first 2 tables based on project id and use expand comand than its working fine and I
can see data of both the tables
Further if I add navigation for third table also as below then below expand is displaying data for first two tables
only Pls share how to use expand command in this case if possible to get all tables data based on project id
How to use navigation ZEMPD here
httpdewdftzld025pgdevsapcorp8000DTHCPXSZPMIS_PRO_ACTUALxsodata
ZPROHEADER(PR07_000002)$expand=ZACTUamp
service namespace
DTHCPXS
DTHCPDTHCPDBHCP_PROJECT_HEADER
as ZPROHEADER
navigates (PROJECT as
ZACTU)
DTHCPDTHCPDBHCPT_ZPMIS_ACTUAL
as ZACTU
navigates (EMPLOYEE as
ZEMPD )
DTHCPDTHCPDBHCP_ZPMIS_RES_MASTER
as ZEMPD
association PROJECT principal
ZPROHEADER(PROJECTID)
multiplicity 1 dependent
ZACTU(PROJECTID) multiplicity
association EMPLOYEE principal
ZACTU(EMPLOYEEID)
multiplicity 1 dependent
ZEMPD(EMPLOYEEID) multiplicity
1
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010029
Pls suggest if there is anything to add or correct in XS odata service syntax above
Regards
Kamal Jain
Vikas Madaan in response to Thomas Jung on page 29Apr 14 2014 458 PM
Thanks Thomas
Under which component
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 29Apr 14 2014 450 PM
No this isnt a known issue Ive seen Nor can I recreate the problem in my system No you cant maintain the
authentication in XSHTTPDEST itself It intentionally must be set in XSADMIN tool I can really only suggest
that you open a support ticket
Vikas MadaanApr 14 2014 431 PM
Hi Thomas
I am trying to pull data from SAP system onto HANA Database using XSJOB files I am calling RFC enabled
function modules over HTTP request It helps me replicating the real time ECC data onto HANA as well with
back ground jobs
I am facing one problem in the XSHTTPDEST file I am able to create and activate the file using studio and this
file is even visible in the web based XS administration tool But in the web based tool when i provide user and
password for basic authotication then system just clears the user id and password when i try to save This the
reason our HTTP requests are getting failed and below is the response we are getting in the response body
lthtmlgtltheadgtlttitlegtLogon Error Messagelttitlegt
Is this known issue or we are missing something Is it possible to provide user and password in the
XSHTTPDEST file Is there any particular syntax
I checked and i have the required authorizations as well develper Guide
Please help
Regards
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010030
Vikas Madaan
Abdul HakimFeb 22 2014 359 AM
Hi Thomas - Any recommended book or resource to learn and master Server Side Javascript There were
many books available in the market but as a beginner need to know the right resource book to start with and
master this stuffAlso whether SAP plan to conduct any training to teach Server Side Javascript similar to other
standard training offerings
Thanks
Hakim
Samuel Tanor-GyeduFeb 20 2014 839 AM
Thanks Thomas
I will definitely have a look at SHINE
Thomas Jung in response to gentilini andre on page 30Feb 19 2014 422 PM
Difficult to say what is wrong I several things which are different than our sample that does this You are using
a POST for instance instead of a GET However if you are gettting a 200 then I assume the service call is
correct In client side tools (like Chrome Developer Tools) you should be able to see the response object from
the call
However what I would really recommend is that you study the SHINE content (SAP HANA Interactive
Education) There is already a sample application which does this in SHINE Also it has some special
JavaScript in the UI to handle the file attachment via AXAJ call Perhaps that is the part you are missing
You can read more about SHINE here It is also included already installed in the latest version of the HANA
Developer Center trial image (SP7 based)
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
gentilini andreFeb 19 2014 325 PM
Hi Thomas
well I followed your hints but it still donacutet work
I created a xsjs File like below
function downloadExcel()
try
var body =
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010031
alert(drin)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
alert(drusse)
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount
tTax Amount tNetto Amount tCurrency n
while(rsnext())
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
catch (e)
alert(db conn funktioniert nicht)
var a = $requestparametersget(cmd)
$responsesetBody(Invalid Command +a)
switch (a)
case doex
$responsesetBody(Invalid Command +a)
alert(filedownload)
thisdownloadExcel()
break
default
$responsestatus = $nethttpINTERNAL_SERVER_ERROR
$responsesetBody(Invalid Command +a)
The Controllerjs File
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010032
doFileDownload function (oEvent)
jQuerysaprequire(sapuicommonsMessageBox)
sapuicommonsMessageBoxshow(Export Starten sapuicommonsMessageBoxIconconfirm
Information)
sapuicommonsMessageBoxconfirm(Export starteninform Confirmation)
return false
function inform(rValue)
alert (drinnnnne)
var aurl = FileDownloadxsjscmd=doex
if(rValue) If User presses Ok
alert(aurl)
jQueryajax(
url aurl
method POST
dataType json
datacmddoex
success sapuicommonsMessageBoxalert(Export wird ausgefuumlhrtConfirmation)
errorfunction onErrorCall(jqXHR textStatus errorThrown)
alert(jqXHRstatus)
sapuicommonsMessageBoxshow(jqXHRstatus
ERROR
Error in calling Service )
return
complete sapuicommonsMessageBoxalert(Export Erfolgreich
abgeschlossenConfirmation)
)
return false
else If the user presses Cancel
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010033
sapuicommonsMessageBoxalert(Vorgang abgebrochenNotification)
)
at last but not least the view
sapuijsview(zag1_ui_cv_03Index
Specifies the Controller belonging to this View
In the case that it is not implemented or that null is returned this View does not have a Controller
memberOf zag1_ui_cv_03Index
getControllerName function()
return zag1_ui_cv_03Index
Is initially called once after the Controller has been instantiated It is the place where the UI is
constructed
Since the Controller is given to this method its event handlers can be attached right away
memberOf zag1_ui_cv_03Index
createContent function(oController)
create a lite button with an icon and a text
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010034
lite true
)placeAt(btn)
oButton3attachPress(oControllerdoFileDownload)
var oButton4 = new sapuicommonsButton(
text Refresh
icon imagesrefreshjpg
lite true
press function() var data = oTableval()
if(data == )
alert(no data found)
return
print(content)
print(DatArray)
if (data = )
alert(Funzt)
JSONToCSVConvertor(data CUSTOMER AMOUNT true)
)placeAt(btn)
jQuerysaprequire(sapuitableTable)
create table control with properties
var oTable = new sapuitableTable(
width 100
rowHeight 50
title Amount per Partner
selectionMode sapuitableSelectionModeNone
)
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Company Name
)
template new sapuicommonsTextView(
text CompanyName
)
sortProperty CompanyName
))
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010035
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Partner ID
)
template new sapuicommonsTextView(
text PartnerId
)
sortProperty PartnerId
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Postal Code
textAlign sapuicoreTextAlignEnd
)
template new sapuicommonsTextView(
text PostalCode
textAlign sapuicoreTextAlignEnd
)
sortProperty PostalCode
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text City
)
template new sapuicommonsTextView(
text City
)
sortProperty City
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Purchase ID
)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010036
template new sapuicommonsTextView(
text PurchaseOrderId
)
sortProperty Currency
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Lifecycle Status
)
template new sapuicommonsTextView(
text LifecycleStatus
)
sortProperty LifecycleStatus
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Gross Amount
)
template new sapuicommonsTextView(
text GrossAmount
)
sortProperty GrossAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Tax Amount
)
template new sapuicommonsTextView(
text TaxAmount
)
sortProperty TaxAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Amount Netto
)
template new sapuicommonsTextView(
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010037
text CM_NET_Amount_001
)
sortProperty CM_NET_Amount_001
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Currency
)
template new sapuicommonsTextView(
text Currency
)
sortProperty Currency
))
var oModel = new sapuimodelodataODataModel
(httpqperiorvmcldsr8000ZAG1_WS_001ZAG1_CV_001xsodata false)
oTablesetModel(oModel)
oTablebindRows(Amount)
return oTable
)
It wonacutet call the function or better said the action of the button works fine till to the point where it should call the
xsjsfile to generate the excel-file I wondered that in the ajax part the error- success- and complete-part will
be executed at the same time and not only one of this statements The message is 200 (The request has
succeeded The information returned with the response is dependent on the method used in the request)
Maybe you can see where my mistake is or whats going wrong
Iacuteve the developer edition on cloudshare (Hana Studio rev68 Server is on SPS05)
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010038
Andreacute
Thomas Jung in response to Samuel Tanor-Gyedu on page 38Feb 19 2014 523 AM
I dont think I can help you This appears to a question about how odata4j works not about XS I have no
experience with odata4j myself
Samuel Tanor-GyeduFeb 18 2014 913 AM
Hi Thomas
I have an odata service with this endpointhttpss5hanaxshanatrialondemandcomservicesUserxsodata
I am now trying to consume it from eclipse with the odata4j libraries
This is how I get the endpoint
public UserServiceOdata(String endpointUri)
thisendpointUri = endpointUri
ODataConsumerdumpresponseHeaders(true)
consumer = ODataConsumerscreate(endpointUri)
This is my method to add a user
public User addUser(User user)
consumercreateEntity(entitySet)properties(OPropertiesint32(propertyUserId
usergetId()))properties(OPropertiesstring(propertyUserName
usergetName()))properties(OPropertiesstring(propertyUserEmail usergetEmail()))execute()
return user
When I call addUser method I get an Error
Caused by javaxxmlstreamXMLStreamException ParseError at [rowcol][78253]
Message The reference to entity sourceUrl must end with the delimiter
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010039
When I use this endpoint httpss5hanaxshanatrialondemandcomservicesUsersvc everything works fine
With the httpss5hanaxshanatrialondemandcomservicesUserxsodata I get errors
Please I would be very grateful for assistance
Thanks in advance
Regards
Samuel
Thomas Jung in response to gentilini andre on page 39Feb 18 2014 431 AM
You have a fundamental misunderstanding here You are placing server side JavaScript code in your client
side UI5 application The function downloadExcel is something you need to execute on the server It needs to
be in an XSJS file and it is called from the client side via AJAX - as a REST service not as a local function
gentilini andreFeb 17 2014 451 PM
Hello Thomas
Thank you for this great How-To Guide
Iacutem pretty new in SAPUI5 and tried your export-sample in my little trial project but it doesnacutet work
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010040
My Button for this looks like
ltcodegt
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
lite true
press function() alert(oButton3getText())
downloadExcel()
ltcodegt
and the function for this action looks like
ltcodegt
function downloadExcel()
var body =
alert(drin)
print($query)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount tTax
Amount tNetto Amount tCurrency n
while(rsnext())
if(rsnext() == )
alert($responsesetBody( Failed to retrieve data ))
alert($responsestatus = $nethttpINTERNAL_SERVER_ERROR)
else
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010041
ltcodegt
Iacutem afraid and hope that you can help me
Kind regards
Andreacute
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1246 PM
gtIs there any restriction or development limitation in the XSJSLIB files
Thats a very general question Difficult to answer without any context
Vikas Madaan in response to Thomas Jung on page 41Feb 11 2014 1245 PM
Thanks Thomas
I think we are on same page
Once quick question that came to my mind Is there any restriction or development limitation in the XSJSLIB
files
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1230 PM
gtCould please help me in understanding in more advantagesdisadvantages for both techniques
Youve summarized it pretty well already
gtbecuase i dont want to use both the approaches
Even with the CRUD support and exits in XSODATA its still pretty hard to do 100 via XSODATA There are
still valid use cases for XSJS when you need custom body custom read processing job scheduling etc Its
good to try and use XSODATA whenever possible but I wouldnt automatically exclude the use of XSJS
Vikas MadaanFeb 11 2014 1008 AM
Hi Thomas
Thanks a lot for sharing useful information through various blogs
In my current project we are evaluating use of XSOData or XSJS applications I saw your videos like the one
mentioned below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010042
httpwwwsaphanacomdocsDOC-4376
Want i understood from various blog is this
From SP7 we can write exsits in the OData services and it is very easy to consume at the client side just like
any REST base service and from my understanding it is Scalable as well I would love to use XSOData always
becuase development effort is very less compare to XSJS and it is very easy to rampup the team on OData
related development objects
XSJS were as provide more control becuase of server side scripting becuase it allows development on the
server side using JavaScript Core APIs of SAP HANA Extended Application Services are therefore exposed
as JavaScript functions providing easy access to the HTTP Request and Response object as well database
access to execute SQL or call SQLScript Procedures It provide us control over the body format and and URL
parameter definition
Could please help me in understanding in more advantagesdisadvantages for both techniques
I am very keen to understand and also explain the same to team members becuase i dont want to use both the
approaches and even sometimes customer can also ask the same to us
Also If we are on SP6 then from my understanding XSJS provides us more capability in terms of complex
application Corrent me If i am wrong
Thanks
Regards
Vikas Madaan
Thomas Jung in response to Raghuveer Phull on page 42Feb 5 2014 312 PM
Yes there are videos on the CRUD features of XSODATA which were new in SP6
For more on CRUD support in SP6 see this video
oData CreateUpdateDelete Support in SAP HANA SPS6
For the extended support for XSJS exits in SP7 see this video
SAP HANA SPS 07 XSODATA Exits in XSJS
Raghuveer PhullFeb 5 2014 122 AM
Do you have an exampledocumentationvideo where you can write a service which will populate Hana DB
What I am asking for is a way for my external script to populate the DB tables i have created in Hana DB
Thomas Jung in response to reda miraoui on page 43Jan 29 2014 411 PM
The source code for the examples shown here are shipped as part of SHINE (SAP HANA Interactive
Education)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010043
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Vivek Singh Bhoj in response to reda miraoui on page 43Jan 29 2014 352 PM
Hi Reda
You can import Shine Content in HANA and then check all these source codes
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Regards
Vivek
reda miraoui in response to Thomas Jung on page Jan 29 2014 344 PM
Hey Thomas
Is it possible to download source code of your project from this HANA tutorial
Thanks
Reda
Thomas Jung in response to Abdul Hakim on page 43Nov 21 2013 1133 PM
Yes River can be used as an alternative and when activated it will generate Server Side JavaScript andor
SQLScript
Abdul Hakim in response to Thomas Jung on page 44Nov 21 2013 747 PM
Hi Thomas - Was going through blog regarding River (RDL)Just a question on this
When you say Programming language for HANA native development is Server side Javascript SQL SQL
ScriptOnce RDL is rolled out whether RDL can be used for native application development instead of Server
side Java script SQL SQL Script I am very much new to this stuff so appreciate if you can also help on
how to get started with Server Side Java script SQL SQL Script for HANA
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 30 2013 750 AM
Hi Thomas
Thanks for your response I am talking about more content on shine
thanks
Ashutosh
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010044
Baskar Gopalakrishnan in response to Thomas Jung on page 44Oct 30 2013 1249 AM
Hi Thomas
Im a SAP PI Middleware consultantSAP topic leader in XIPI heavily worked on Java related
Netweaver stack I have knowledge in ABAP but not worked heavily in abap I have enrolled your sap hana
native application development course I feel very interesting I did work heavily in java and javascript projects
using eclipse development tool Do you think if I invest my time in just native hana development and proceed
in HANA field is a good step I dont have BW experience either
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 819 PM
Thanks for the clarification Much appreciated
Thomas Jung in response to Abdul Hakim on page 44Oct 29 2013 120 PM
gtABAP Close to HANA means whether we can expect a similar 2 tier architecture similar to HANA XS in the
future or what does that mean
No it doesnt mean that ABAP will become a 2 tier architecture We will not move the ABAP VMKernel into
HANA itself It will remain a separate application server At least for the current plansforeseeable future What
he was referring to was bringing the programming models closer For instance the new 740 SP5 feature that
allows you to write SQLScript directly within an ABAP class method
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 650 AM
Thomas - Thanks for the clarificationMuch appreciatedI was listening to ABAP on HANA session by
Thorsten Schneider this year Teched and he was mentioning that SAP Plans to bring ABAP very close to
HANA in the coming future but not much details have been discussed in the sessionABAP Close to HANA
means whether we can expect a similar 2 tier architecture similar to HANA XS in the future or what does that
mean
Thanks
Hakim
Thomas Jung in response to Abdul Hakim on page 45Oct 28 2013 703 PM
gt whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the option is
recommended by SAP then kindly share the pros and cons of each of the item
Taken from the TechEd CD103 session slides
Guidance
bulluse ABAP for optimization of existing progams (in context of SAP Business Suite or BW)
bullconsider HANA Native Development for development of new applications which will solely run on SAP HANA
bullcombine ABAP and HANA Native Development to enrich existing applications (eg SAP HANA Live Fiori)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010045
ABAP
bullapplications follow 3-tier architecture
bullABAP is in general database agnostic but with release 74 optimized for SAP HANA
bullProgramming language ABAP ABAP OO with the option to use SAP HANA features
bullIDE eclipse-based ABAP Development Tools
HANA Native Development
bullapplications follow 2-tier architecture
bullHANA Native Development is SAP HANA specific and embedded in the database
bullProgramming language River server-side JavaScript SQLSQLScript
bullIDE eclipse-based SAP HANA Studio + web IDE
Thomas Jung in response to ashutosh dixit on page 45Oct 28 2013 701 PM
gtIs there any more demos for the SHINE
Im not exactly sure what you mean by that We are building additional content for SHINE that will be delivered
in SP7
Abdul HakimOct 28 2013 326 PM
Thomas - Let us say a customer is running SAP Netweaver 74 ABAP with HANA DB and they have HANA
extended service as wellIf the customer wants to do new developments then what is the recommendation
from SAP ie whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the
option is recommended by SAP then kindly share the pros and cons of each of the item (SAP Netweaver 74
ABAP Vs SAP HANA XS)
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 28 2013 221 PM
Hi Thomas
Thanks a lot for your its working now
Is there any more demos for the SHINE
Thanks
Ashutosh
Thomas Jung in response to ashutosh dixit on page 46Oct 25 2013 809 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010046
As this content is now standard in SP6 as part of SHINE (SAP HANA INteractive Education) there also some
setup instructions on helpsapcom
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Basic points to check - have you generated the synonyms in the data generator Ran the data generator to
create some data Have the role assigned Added client 001 to your user profile
ashutosh dixitOct 24 2013 130 PM
Hi Thomas
Amazing blog - once again Thomas thanks
I have been following you for many days attended your OPEN SAP course also
That was an amazing course for new learner like me
One of our client is looking forward for XS based search Application identical to what you have created in your
DEMO
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010047
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010048
But I am not able to fetch the data on blank HTML page is coming with no data
If there is any step by step document related to this please help in getting that
Any help will be highly appreciated
Thanks
Ashutosh
Naveen KumarSep 26 2013 1130 AM
Good Document
Heber FabianoAug 27 2013 323 PM
Great content as always Keep sharing with us
Thomas Jung in response to Orel Stringa on page 48Aug 27 2013 147 PM
This is currently not possible The CORS support is for all origins We dont yet have the feature to maintain a
whitelist of CORS origins
Orel Stringa in response to Thomas Jung on page Aug 27 2013 801 AM
Hi Thomas
nice to see that SAP has made it possible with SP6 to specify cross origin resource sharing (CORS) support
via the xsaccess file SP6 HANA development guide has example of how to specify CORS support
I have build an XS application and would like to serve SAPUI5 on a diffhost than XSHANA
How can I specify that I would like to allow cross origin access restricted to certain domain(s) only
Is there a special keyword syntax for specifying that
Thank yoi
Orel
Vijay UthayakumarAug 27 2013 131 AM
Highly informative amp digestible Fantastic work
Jerry WangAug 1 2013 955 AM
Hi Tomas
Thank you
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010049
Jerry
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 644 PM
JSLint checks are very strict and often produce syntax errors for items that just stylistic and wont actually
cause an error upon activation or runtime You can either ignore the JSLint errors or deactivate JSLint for this
project in these cases However it might also be an indication that the JavaScript code you are trying to import
isnt compatible with Strict mode
httpsdevelopermozillaorgen-USdocsWebJavaScriptReferenceFunctions_and_function_scope
Strict_mode
Milan Vrozina in response to Thomas Jung on page 49Jul 21 2013 624 PM
Thanks for clarification I thought there would be some kind of import
But anyway in case of this specific library I have some problems with JSLint validation when I do cut and paste
of the original code
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 343 PM
What kind of problem are you having using this library Strict mode JavaScript which doesnt try to access the
DOM Window or other client side specific objects should work in Server Side XSJS Generally if you have a
library you just cut and paste into your XSJS or an XSJSLIB file and then call the functions from your code
Milan VrozinaJul 21 2013 339 PM
Hello
first and foremost thank you for perfect openSAP classes related to HANA development and for this blog as
well
I have one question related to server-side javascript You mentioned in course that is possible to use 3rd party
libraries or reuse 3rd party code But I cant find a possible way how to import 3rd party javascript library -as
is- to server and use it For example I would like to use JSZip library to zip some file before sending it to client
from xsjs application Is that possible Thank you
Chandrashekhar MahajanJul 3 2013 734 PM
This is excellent blog Now HANA XS is very much clear to me
Mohan krishnaJul 1 2013 144 PM
WOW - great blog Thomas This will be very helpful in understanding SAP hana Good Job
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010050
Abdul Hakim in response to Thomas Jung on page 50Jun 27 2013 833 PM
Thanks for the clarification
Thomas Jung in response to Abdul Hakim on page 50Jun 27 2013 659 PM
HANA Extended Application Services uses SQLScript and JavaScript as its two primary programming
languages
gtwhether the current SAP Business suite based on ABAP will be completely migrated to HANA service
No The Business Suite already runs on HANA but still via the ABAP application server It will continue to
leverage HANA via a combination of enhancements to ABAP and utilizing some of the technologies described
in this blog
gtAlso whether ABAP can be used to built application in HANA extended services
No There is no ABAP language container in HANA Extended Application Services
Abdul HakimJun 27 2013 405 PM
Hi Thomas - What is the programming language used for HANA Extended application services
As HANA is more than a database ie application platform by itself and as you mentioned that more and more
applications will be built on HANA i have question as how the future SAP ERP system looks likewhether the
current SAP Business suite based on ABAP will be completely migrated to HANA service in the future or SAP
ABAP server will continue to evolve and receive focus investment from SAP Also whether ABAP can be used
to built application in HANA extended services Your thoughts
Thanks
Abdul Hakim
Thomas Jung in response to Ravindra Channe on page 50Jun 11 2013 830 PM
Yes it is still planned However we are still a couple of weeks away and Ive not seen the final installers to say
for certain its there
Ravindra ChanneJun 11 2013 815 PM
Hi Thomas
Thanks for a wonderful and very informative blog Is there any update on 32 bit REGI file
Is it expected along with SPS6
Regards
Ravi
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010051
Thomas Jung in response to Amanda Rzepka on page Jun 7 2013 942 PM
gtCan the XS Services be used in a BW on HANA Scenario
Yes XS is part of ALL HANA systems You should check and make sure you are licensed for direct access to
the underlying HANA instance however
Thomas Jung in response to Holger Schimanski on page Jun 7 2013 941 PM
gtIs there a similar library which could be used in XS Engine
The XSODATA development object is similar We also have higher level frameworks for XMLA and Search
Services (InA) You can expect more such high level frameworks to be added to the HANA Extended
Application Services in the future
Thomas Jung in response to Manav Mehra on page Jun 7 2013 939 PM
Have you used something like the Chrome developer tools to see see if you are getting any client side
javascript errors or to see if the request to your xsodata service is successful
Thomas Jung in response to Christian Hufnagl on page 52Jun 7 2013 938 PM
It will ship as non-automatic content in SPS6 (all systems will have it and it just needs to be imported) The
delivery units are also part of this weeks updates to the Cloudshare and AWS developer center images They
are also available for download as part of the content of the openSAP course
Thomas Jung in response to Matthew Pickell on page 51Jun 7 2013 937 PM
CORS support will come with SPS6 at the end of June
Thomas Jung in response to Jeroen Custers on page 51Jun 7 2013 936 PM
gtWill this bug be fixed in HANA ver 56
Personally Ive still experienced this bug in SPS6 internal builds Must be a tricky one to find Luckily the
workaround of closing and reopening isnt too difficult Just annoying This also probably makes the bug low
priority
Jeroen Custers in response to Vivek Singh Bhoj on page 52Jun 7 2013 411 PM
This issue also occurs on rev56
Matthew PickellJun 7 2013 258 PM
Thomas
Has CORS been included in a release yet
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010052
Vivek Singh Bhoj in response to Chandra Edem on page 52Jun 5 2013 601 AM
Hi Chandra
Date for Week1 Assignment has been extended till June 11
So you can give Week 1 Assignment now
Christian HufnaglJun 4 2013 543 PM
Hi Thomas
thank you for the interesting tutorial
Can you tell me whether it is possible to download the source code of the ldquoPutting it all togetherrdquovideo And if yes Where can I download itThanks
Christoph
Vivek Singh BhojJun 4 2013 1116 AM
Hi Thomas
Thanks for OpenSAP classes
Your Youtube Account also have very good exercises
IN OpenSAP Week 2 Unit 3 tutorial after assigning admin role to my user Id i am not able to see sequences
synonyms triggers under my schema or any other schema i am only able to see Column Views Procedures
Tables and Views
Though now i am able to insert data into my created table
Can you let me know how i will be able to see Sequences under my schema without removing the admin role
I am using HANA revision 52
Got to know from OpenSAP that
This is a known issue and the only way that Ive seen to fix it is to actually close the studio and open it again
then refresh the node
Cheers
Rich Heilman
SAP HANA Product Management
Will this bug be fixed in HANA ver 56
Chandra Edem in response to Thomas Jung on page 53Jun 4 2013 646 AM
Thomas
I registered for OpenSAP course Introduction to Software Development on SAP HANA on June 2 900PM
I didnt know that it is going to end WEEK1 assignment test on 632013 300PM Is there any way can take
that WEEK1 Assignment Test
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010053
Thanks
Chandra
Thomas Jung in response to Alexander Bauer on page Jun 3 2013 856 PM
SAPUI5 gets updated auutomatically when you apply HANA revisions There is no additional download or
update needed
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+01007
Figure 6 - OData $metadata support
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+01008
Figure 7 - Example OData Server JSON Output
The examples in the above figures demonstrate how easily these services can be tested from the web browser
but of course doesnt represent how end users would interact with the services Although you can use a variety
of 3rd party tools based upon JavaScript like Sencha Sencha Touch JQuery JQuery Mobile and PhoneGap
just to name a few SAP delivers the UI Development Toolkit for HTML5 (SAPUI5) standard in SAP HANA
Extended Application Services A particularly strong feature of SAPUI5 is the integration of OData service
consumption not just at a library level but also with special features within the UI elements for binding to OData
services
For example within SAPUI5 you can declare an OData model object and connect this model object to the URL
of the XSODATA service Next create a Table UI element and connect it to this model object Finally you call
bindRows of the Table UI element object and supply the OData entity name you want to use as the source of
the table
var oModel = new sapuimodelodataODataModel (servicesbuyerxsodata false) oTable = new sapuitableTable(testtableId tableID visibleRowCount 10) oTablesetModel(oModel) oTablebindRows(BUYER)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+01009
This creates an UI Element which has built-in events such as sort filter and paging which automatically call
the corresponding OData Service to fulfill the event No additional client side or server side programming is
necessary to handle such events
Figure 8 - OData Bound Table UI Element
For more details on OData service creation in SAP HANA Extended Application Services and utilizing these
services within SAPUI5 please view these videos
Server Side JavaScriptThe XSODATA services are great because they provide a large amount of functionality with minimal amounts
of development effort However there are a few limitations which come with such a framework approach For
example in SAP HANA SP5 the OData service framework is read only Support for Insert Update and Delete
operations is available with SAP HANA SP6
Luckily there is an option for creating free-form services where you can not only perform update operations but
also have full control over the body format and URL parameter definition SAP HANA Extended Application
Services also allows development on the server side using JavaScript (via project files with the extension
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010010
XSJS) Core APIs of SAP HANA Extended Application Services are therefore exposed as JavaScript
functions providing easy access to the HTTP Request and Response object as well database access to
execute SQL or call SQLScript Procedures
In this simple example we can take two numbers as URL Request Parameters and multiply them together and
then return the results as text in the Response Body This is an intentionally basic example so that you can
focus on the API usage
Figure 9 - Simple XSJS Service
However the power of XSJS services comes from the ability to access the database objects but also have full
control over the body output and to further manipulate the result set after selection In this example we use
XSJS to create a text-tab delimited output in order to support a download to Excel from a user interface
function downloadExcel() var body = var query = SELECT TOP 25000 PurchaseOrderId PartnerId to_nvarchar(CompanyName) LoginName_1 CreatedAt GrossAmount FROM _SYS_BICtechedepmdbPO_HEADER_EXTENDED order by PurchaseOrderId $tracedebug(query) var conn = $dbgetConnection() var pstmt = connprepareStatement(query) var rs = pstmtexecuteQuery() body = Purchase Order Id tPartner Id tCompany Name tEmployee Responsible tCreated At tGross Amount n while(rsnext()) body += rsgetString(1)+ t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetTimestamp(5)+t+rsgetDecimal(6)+n $responsesetBody(body) $responsecontentType = applicationvndms-excel charset=utf-16le $responseheadersset(Content-Dispositionattachment filename=Excelxls) $responseheadersset(access-control-allow-origin) $responsestatus = $nethttpOK
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010011
ClosingThis blog hopefully has served to give you a small introduction to many of the new concepts and possibilities
with SAP HANA SP5 and SAP HANA Extended Application Services
Over the coming weeks we will be posting additional blogs with more advanced examples and techniques as
well how to integrate SAP HANA Extended Application Services content into additional environments Likewise
there is a substantial Developerrsquos Guide which expands on many of the concepts introduced here
It is also important to note that while SAP HANA Extended Application Services ships asproductive software (meaning customers can go live in production with it) in SAP HANA SP5 it isa controlled release initially with a special ldquoProject Solutionrdquo program in place around this newfunctionality Please refer to Service Note 1779803 for additional details on the current statusof the Project Solution This Project Solution approach is designed to provide the highest levelsof support possible to initial customers and partners who choose to develop using SAP HANAExtended Application Services It also provides a channel for feedback to Product Managementand development so that we take suggestions and ideas and quickly integrate them into futurerevisions of SAP HANA and SAP HANA Extended Application Services103803 Views Tags sapmentor hana developer code database in_memory sap_mentor hana_devcentersap_hana sapui5 hana_studio xs hde xsjs xsodata
Glen OoiDec 23 2014 345 PM
Hi Thomas
In need of your expert advice
I have a situation where I am using BO Dashboards to create my Dashboard which is consuming the data from
HANA
I have a requirement to allow the user to comment in the dashboard and it will write back to the HANA DB and
also display the comments in the Dashboard
In order for the BO Dashboard to write back to HANA DB is via web services
Is there any way i can create a WSDL URL and consume the XSJS or ODATA services in HANA
Muhammad SadiqDec 10 2014 140 PM
I need your help in writing an API(XSJS service) which will take JSON format data and inserted into HANA
database
Tarasankar Banerjee in response to Thomas Jung on page 14Nov 5 2014 852 AM
Thanks Thomas Could you give an example of how to redirect
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010012
Im facing a strange issue while trying to import weather data from several cities together The issue appears to
be connected with the content of the response object
Following is the code of the Weatherxsjs file
try
var cmd = $requestparametersget(cmd)
var body
var response
var obj
var propertyName
if(cmd === import)
var dest = $nethttpreadDestination(rootworkTara02XSTest01XSHttpTest01 weather)
var client = new $nethttpClient()
var req = new $webWebRequest($nethttpGET group
id=12750041264527127733312732941275339ampunits=metric)
clientrequest(req dest)
response = clientgetResponse()
$responsecontentType = textplain
if(responsebody)
body = responsebodyasString()
obj = JSONparse(body)
body = cmd + n n + responsestatus + n n + responsecontentType
+ n n + responsebody + n n + objgetOwnPropertyNames()
$responsesetBody(body)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010013
$responsestatus = $nethttpOK
catch(e)
$responsecontentType = textplain
$responsesetBody(emessage)
$responsestatus = $nethttpINTERNAL_SERVER_ERROR
Following is the weatherxshttpdest
host = apiopenweathermaporg
port = 80
description = my weather checker
useSSL = false
pathPrefix = data25
authType = none
useProxy = true
proxyHost = ltproxy_detailsgt
proxyPort = ltproxy_port
timeout = 0
On accessing httplthostnamegt8000rootworkTara02XSTest01XSHttpTest01Weatherxsjs
ampcmd=import I am receiving the error message BodyasString unsupported charset specified in
Content-Type header (utf8)
If the body = responsebodyasString() statement is commented out I receive the error message
JSONparse unexpected character because the responsebodyasString() itself could not work correctly
However the URL httpapiopenweathermaporgdata25group
id=12750041264527127733312732941275339 returns data correctly
I am using the same URL in my code
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010014
Could you please advise regarding this issue Thanks for your help
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 14Nov 4 2014 319 PM
gtIs it possible to read files using XS For example some configuration file kept in the server
No there is no API to read from the file system of the underlying operating system You can read the HANA
configuration ini files however because they are exposed via SQL
gtIs it possible to call a html file from the xsjs file Something likerequestgetRequestDispatcher()forward() from
JAVA servlets
In the body of the response you send back to the client your could issue a redirect
Tarasankar Banerjee in response to Tarasankar Banerjee on page 15Nov 4 2014 1034 AM
Hi Thomas
Finally got my application running It is now fetching weather data from external sites
Have two more questions
1 Is it possible to read files using XS For example some configuration file kept in the server2 Is it possible to call a html file from the xsjs file Something like
requestgetRequestDispatcher()forward() from JAVA servlets
Thanks
Regards
Tarasankar
Robert WeberNov 3 2014 1136 AM
If someone is having difficulties with the alert log full on the xsengine
you can do the same trick as for the statisticserver in oder to reset the log area see details in OSS Notes
2019148 and 1950221
The commands are then
select VOLUME_ID from m_volumes where service_name = xsengine
ALTER SYSTEM ALTER CONFIGURATION (daemonini host lthostnamegt) UNSET
(xsengineinstances) WITH RECONFIGURE
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010015
ALTER SYSTEM ALTER CONFIGURATION (topologyini system) UNSET (hostlthostnamegt xsengine)
WITH RECONFIGURE
ALTER SYSTEM ALTER CONFIGURATION (topologyini system) UNSET (volumes ltvolume_idgt) WITH
RECONFIGURE
ALTER SYSTEM ALTER CONFIGURATION (daemonini host lthostnamegt) SET (xsengineinstances) =
1 WITH RECONFIGURE
Then restart the HANA instance and after that make a full backup (and schedule the regular backup in order to
prevent this situation again)
Hope this will help someone like me -)
Have a nice day
Regards
Robert
Tarasankar Banerjee in response to Tarasankar Banerjee on page 15Nov 3 2014 1031 AM
Update
I tried to access the XS Admin console from another user and faced only the No valid Crypto error However
could still update the proxy user details and the sample application successfully ran at last The relevant roles
were provided in Granted Roles not Application Privileges Probably that was the issue earlier
I would check again with new Http Destination and Server side Java Script
Thanks a lot Thomas for all your help
Regards
Tarasankar
Tarasankar Banerjee in response to Thomas Jung on page 18Nov 3 2014 929 AM
Hi Thomas
I also tried to use the sample code from section 841 Tutorial Use the XSJS Outbound API of the HANA
Developer Guide with minor modifications (for package structure proxy settings etc) This time the destination
was found The new project structure with the sample files yahooxshttpdest and sapStockxsjs is as below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010016
However it did not bring any data The content of the response object indicated that there was Proxy
authentication issue
When I tried to check the Destination in the XS Admin Console surprisingly none of the fields are populated
and everything (except the Trust Store drop down) is disabled All these fields are supposed to be populated
as indicated in the Modeling Guide
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010017
However the User already has the following privileges
The same scenario was present for the Http Destination I prepared earlier There are couple of internal errors
at the bottom On clicking them the following list is displayed
1 Internal Error dbError(ConnectionprepareStatement) 258 - insufficient privilege Not authorized at
ptimequerycheckerquery_checkcc24182 No valid SAP Crypto configuration
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010018
It appears from various blogs that the second error (No valid SAP Crypto configuration) is related to SSL
configuration in HANA I would contact the HANA Administrator to look into this issue Of course it would be
great if you could provide some insight
However I have no clue regarding the first error Request your help and cooperation in this regard
The initial issue of not finding the HttpDestination which I created still persists
Thanks for all your help
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 18Oct 31 2014 342 PM
First of all you would never use the workspace name It isnt ever part of anything It is only the package
structure that counts The first item in your list is the only one with the correct package Off hand it looks right to
me You are supposed to supply the full package path Have you configured this HTTP Destination in the XS
Admin tool yet
Tarasankar Banerjee in response to Thomas Jung on page 18Oct 31 2014 326 PM
Updated it Thanks
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 18Oct 31 2014 313 PM
Your comment got cut off We never really get to see what your problem is
Tarasankar Banerjee in response to Thomas Jung on page 21Oct 31 2014 256 PM
Thanks Thomas
I am facing as issue while trying to use an HTTP Destination I understand that the xshttpdest and xsjs file
need to in the same folder Following is the structure of my test project
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010019
As you can see the HTTP Destination and the XSJS files are in the same folder services The workspace
name is XS_Workspace and the package structure is as follows
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010020
Now I am trying to read this destination
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010021
When I am using full package structure destination_package =
rootworkTara02XSTest01XSHttpTest01services I am receiving the
error message httpreadDestination destination not found (package
rootworkTara02XSTest01XSHttpTest01services name XSHttpDest01)
On using the workspace name destination_package = XS_Workspaceservices I am receiving the
error message User is not authorized to use destination (package XS_Workspaceservices name
XSHttpDest01)
On using destination_package = rootworkTara02XSTest01services also I am receiving the error
message User is not authorized to use destination (package rootworkTara02XSTest01services
name XSHttpDest01) Strangely the services folder is not directly under XSTest01
Lastly I deliberately gave a wrong service name destination_package = XS_Workspaceservices and
destination_name = XSHttpDest02 But even then I received the error message User is not authorized to
use destination (package XS_Workspaceservices name XSHttpDest02) not that the destination is not
found
Could you please help me to resolve this issue
Thanks a lot for your helps
Regards
Tarasankar
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010022
Thomas Jung in response to Tarasankar Banerjee on page 22Oct 30 2014 152 PM
Since SPS06 its possible to use outbound HTTP destinations and to call out to external services using XSJS
Thomas Jung in response to Tarasankar Banerjee on page 22Oct 30 2014 150 PM
gtSo when the program runs in server would it automatically consider the OS user credentials
No It doesnt automatically use anything You have to specific the user and password that you want to use for
the proxy Although many proxy servers dont require a username and password
Tarasankar Banerjee in response to Thomas Jung on page 23Oct 30 2014 707 AM
Hi Thomas
Just watched the video you shared above Thanks a lot for it It is really informative and helpful
Regards
Tarasankar
Tarasankar Banerjee in response to Tarasankar Banerjee on page 22Oct 30 2014 346 AM
Got answer for the second point SAP HANA XS Administration Tool is the place to configure Proxy settings
Regards
Tarasankar
Tarasankar Banerjee in response to Tarasankar Banerjee on page 22Oct 29 2014 314 PM
Dear Thomas
another question is that does the proxy settings in the HttpDestination refer to the OS user of the HANA
server We specify useProxy as true and authType as basic in the HttpDestination but not maintain any
user credentials So when the program runs in server would it automatically consider the OS user credentials
Thanks
Regards
Tarasankar
Tarasankar Banerjee in response to Thomas Jung on page 23Oct 29 2014 132 PM
Thanks Thomas I am currently checking this option only
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010023
My current requirement is to fetch Weather Data and Social Media data from various OData services and store
them in HANA for further analysis What might be the best way for this I am currently checking the option of
creating an XS application which would connect to the external services fetch the data and save that in HANA
using DB Connection Is this the best way Or should we try to use JAVA or some other way
Your valuable suggestions are most welcome Thanks
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 23Oct 29 2014 1256 PM
gtHowever is it possible to consume XSODATA service from XSJS instead of using DB Connection
You can via an outbound HTTP destination although I certainly wouldnt recommend it It would be rather
complex and not well performing
gtAlso is it possible to consume data from external OData services for weather data social media data etc from
XSJS
Sure with the same Outbound HTTP Connectivity
httpswwwyoutubecomwatchv=fWirvj9l7eY
Maintaining HTTP Destinations - SAP HANA Developer Guide - SAP Library
Tarasankar BanerjeeOct 29 2014 1119 AM
Dear Thomas
Thanks for the great blog
I am able to connect to Database and execute queries from XSJS service However is it possible to consume
XSODATA service from XSJS instead of using DB Connection
Also is it possible to consume data from external OData services for weather data social media data etc from
XSJS
If possible it would be great if you could provide some code sample or guidelines
Thanks
Regards
Tarasankar
Thomas Jung in response to Weiping Lu on page 24Sep 25 2014 833 AM
Please refer to service note 1849775
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010024
httpservicesapcomsapsupportnotes1849775
I believe it will address your issue
Weiping LuSep 24 2014 519 PM
Hi Tom
Great post and videos I have a tough issue calling a HANA procedure from XS takes gt 5min but from HANA
studio lt 1 min Were using Amazon AWS rev 70 and 73 Any help will be greatly appreciated
Thanks
WPL
Thomas Jung in response to Su Srikanth on page 24Aug 11 2014 253 PM
You transport XSODATA services like you would any other repository content - via a Delivery Unit
Su SrikanthAug 11 2014 750 AM
Hi Thomas
Great blog
Ive a query here - we create the odata services(andor URLs created to view in the web browser) in
development environment now if we have to transport it to the quality andor production environment how
can we do this - is the same as importexport or is there any specific way to do please help with any useful
pointers
Many thanks as always
Su
Thomas Jung in response to ARSHAD SHAIKH on page 24May 15 2014 231 PM
Ive never written any blogs on calculation views I dont cover that topic That is why I suggested you ask your
question in the proper SCN forum
Although looking at your your above SQL Statement I dont see why you couldnt do this directly in XSODATA
off of the table STATUS without the need for the calculation view or the SQLScript Procedure
ARSHAD SHAIKH in response to Thomas Jung on page 25May 15 2014 1154 AM
Hello Thomas
I am new to hana Please suggest me the blogs of you related to calculation view that calling
procedures(procedures have out parameter)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010025
I am trying to fetch the result of procedure in calc view and want to create odata service for that calculation
view
procedure code goes like this
---------------------------------------
CREATE PROCEDURE TWEETS_TODAY(OUT OP BIGINT)
language SQLSCRIPT sql security invoker default schema SOCIAL360 reads sql data as
BEGIN
SELECT COUNT() INTO OP FROM SOCIAL360STATUS WHERE CREATED_AT = CURRENT_DATE
END
calc view code goes like this
----------------------------------------
Begin Procedure Script
BEGIN
DECLARE OP BIGINT
CALL SOCIAL360TWEETS_TODAY(OPvar_out)
END End Procedure Script
Thanks
-Arshad
Thomas Jung in response to ARSHAD SHAIKH on page 25May 15 2014 944 AM
Your question seems to have no relation to the content in this blog Please consider instead asking general
HANA questions in the appropriate SCN Forum
ARSHAD SHAIKHMay 15 2014 917 AM
Hi Thomas
I want to call procedures in calculation view (procedures have out parameter)
Please suggest me step by step procedure with example and supporting documents
Thanks
ARSHAD SHAIKH
Henrique Pinto in response to Blair Krotenko on page 26Apr 16 2014 711 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010026
Hmm not really sure of that I see it but that might be because Im an employee
But the NET development partner I was working with was not enrolled in any kind of beta testing program and
they were able to download it so I guess you should as well
Make sure to go in the Installation and Upgrades menu and not the Support Packages and Patches
Go to httpservicesapcomswdc -gt Installations and Upgrades -gt Browse our Download Catalog -gt SAP In-
Memory (SAP HANA) -gt SAP HANA ADONET 10
Best regards
Henrique
Blair Krotenko in response to Henrique Pinto on page 26Apr 16 2014 656 PM
Thanks for the info Henrique but I cant find it I dont know if it is an authorization issue or do we need to be a
ramp-up customer to dl and use a beta product
Thanks
Blair
Henrique Pinto in response to Thomas Jung on page 27Apr 16 2014 614 PM
The ADONET provider is available for download in the SAP Service Marketplace (in beta edition so far)
Thomas Jung in response to Kamal Jain on page 26Apr 16 2014 514 PM
For general OData structure and syntax I find that the Odataorg website is very helpful For example on this
topic
httpwwwodataorgdocumentationodata-version-2-0uri-conventions
The syntax of a $expand query option is a comma-separated list of Navigation Properties Additionally each
Navigation Property can be followed by a forward slash and another Navigation Property to enable identifying a
multi-level relationship
The page also has some sample URLs
Kamal JainApr 16 2014 536 AM
Dear Thomas
I agree that we need to pass all the associations in the expand I tried with some of options but was not
through
Now i just tried with below syntax and able to achive Thx
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010027
httpdewdftzld025pgdevsapcorp8000DTHCPXSZPMIS_PRO_ACTUALxsodata
ZPROHEADER(PR07_000002)$expand=ZACTUZEMPD
Regards
Kamal Jain
Thomas Jung in response to Blair Krotenko on page 27Apr 15 2014 623 PM
We do plan to release an ADONET provider specific to HANA in the near future This would probably be the
best option for consumption from NET Until then I would think that ODBC is probably the next best option It
gives you generally easy portability from already existing database code You could consume OData as well
although that is more generally consumed from the UI layer itself It guess it somewhat depends upon where
you are calling the service from in your NET application
Blair KrotenkoApr 15 2014 409 PM
Hi Thomas
We are looking at consuming HANA data in a NET application and from what I can see there are 2 options -
OData and ODBC It seems to me that OData might be the better option when consuming HANA data in an XS
application while ODBC might be the better option for NET What are your thoughts Is there a paper on this
subject I havent been able to find a comparison document for this Are there any security caveats to be aware
of for these options
Thanks
Blair
Thomas Jung in response to Kamal Jain on page 27Apr 15 2014 136 PM
You have to list both associations in the expand on the URL if you want both relationships to be processed
Kamal JainApr 15 2014 1249 PM
Hi Thomas
Thx for valuable and useful information
I have an query regarding XS Odata service creation for more than 2 tables and get all the data in one
command
There is req in which service needs to be created for 3 tables to get data from all these
First table has Project ID as key second table has composite
ProjectID and Employee Id as key and third table has Employee id as
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010028
key
So if I create navigation for first 2 tables based on project id and use expand comand than its working fine and I
can see data of both the tables
Further if I add navigation for third table also as below then below expand is displaying data for first two tables
only Pls share how to use expand command in this case if possible to get all tables data based on project id
How to use navigation ZEMPD here
httpdewdftzld025pgdevsapcorp8000DTHCPXSZPMIS_PRO_ACTUALxsodata
ZPROHEADER(PR07_000002)$expand=ZACTUamp
service namespace
DTHCPXS
DTHCPDTHCPDBHCP_PROJECT_HEADER
as ZPROHEADER
navigates (PROJECT as
ZACTU)
DTHCPDTHCPDBHCPT_ZPMIS_ACTUAL
as ZACTU
navigates (EMPLOYEE as
ZEMPD )
DTHCPDTHCPDBHCP_ZPMIS_RES_MASTER
as ZEMPD
association PROJECT principal
ZPROHEADER(PROJECTID)
multiplicity 1 dependent
ZACTU(PROJECTID) multiplicity
association EMPLOYEE principal
ZACTU(EMPLOYEEID)
multiplicity 1 dependent
ZEMPD(EMPLOYEEID) multiplicity
1
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010029
Pls suggest if there is anything to add or correct in XS odata service syntax above
Regards
Kamal Jain
Vikas Madaan in response to Thomas Jung on page 29Apr 14 2014 458 PM
Thanks Thomas
Under which component
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 29Apr 14 2014 450 PM
No this isnt a known issue Ive seen Nor can I recreate the problem in my system No you cant maintain the
authentication in XSHTTPDEST itself It intentionally must be set in XSADMIN tool I can really only suggest
that you open a support ticket
Vikas MadaanApr 14 2014 431 PM
Hi Thomas
I am trying to pull data from SAP system onto HANA Database using XSJOB files I am calling RFC enabled
function modules over HTTP request It helps me replicating the real time ECC data onto HANA as well with
back ground jobs
I am facing one problem in the XSHTTPDEST file I am able to create and activate the file using studio and this
file is even visible in the web based XS administration tool But in the web based tool when i provide user and
password for basic authotication then system just clears the user id and password when i try to save This the
reason our HTTP requests are getting failed and below is the response we are getting in the response body
lthtmlgtltheadgtlttitlegtLogon Error Messagelttitlegt
Is this known issue or we are missing something Is it possible to provide user and password in the
XSHTTPDEST file Is there any particular syntax
I checked and i have the required authorizations as well develper Guide
Please help
Regards
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010030
Vikas Madaan
Abdul HakimFeb 22 2014 359 AM
Hi Thomas - Any recommended book or resource to learn and master Server Side Javascript There were
many books available in the market but as a beginner need to know the right resource book to start with and
master this stuffAlso whether SAP plan to conduct any training to teach Server Side Javascript similar to other
standard training offerings
Thanks
Hakim
Samuel Tanor-GyeduFeb 20 2014 839 AM
Thanks Thomas
I will definitely have a look at SHINE
Thomas Jung in response to gentilini andre on page 30Feb 19 2014 422 PM
Difficult to say what is wrong I several things which are different than our sample that does this You are using
a POST for instance instead of a GET However if you are gettting a 200 then I assume the service call is
correct In client side tools (like Chrome Developer Tools) you should be able to see the response object from
the call
However what I would really recommend is that you study the SHINE content (SAP HANA Interactive
Education) There is already a sample application which does this in SHINE Also it has some special
JavaScript in the UI to handle the file attachment via AXAJ call Perhaps that is the part you are missing
You can read more about SHINE here It is also included already installed in the latest version of the HANA
Developer Center trial image (SP7 based)
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
gentilini andreFeb 19 2014 325 PM
Hi Thomas
well I followed your hints but it still donacutet work
I created a xsjs File like below
function downloadExcel()
try
var body =
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010031
alert(drin)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
alert(drusse)
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount
tTax Amount tNetto Amount tCurrency n
while(rsnext())
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
catch (e)
alert(db conn funktioniert nicht)
var a = $requestparametersget(cmd)
$responsesetBody(Invalid Command +a)
switch (a)
case doex
$responsesetBody(Invalid Command +a)
alert(filedownload)
thisdownloadExcel()
break
default
$responsestatus = $nethttpINTERNAL_SERVER_ERROR
$responsesetBody(Invalid Command +a)
The Controllerjs File
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010032
doFileDownload function (oEvent)
jQuerysaprequire(sapuicommonsMessageBox)
sapuicommonsMessageBoxshow(Export Starten sapuicommonsMessageBoxIconconfirm
Information)
sapuicommonsMessageBoxconfirm(Export starteninform Confirmation)
return false
function inform(rValue)
alert (drinnnnne)
var aurl = FileDownloadxsjscmd=doex
if(rValue) If User presses Ok
alert(aurl)
jQueryajax(
url aurl
method POST
dataType json
datacmddoex
success sapuicommonsMessageBoxalert(Export wird ausgefuumlhrtConfirmation)
errorfunction onErrorCall(jqXHR textStatus errorThrown)
alert(jqXHRstatus)
sapuicommonsMessageBoxshow(jqXHRstatus
ERROR
Error in calling Service )
return
complete sapuicommonsMessageBoxalert(Export Erfolgreich
abgeschlossenConfirmation)
)
return false
else If the user presses Cancel
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010033
sapuicommonsMessageBoxalert(Vorgang abgebrochenNotification)
)
at last but not least the view
sapuijsview(zag1_ui_cv_03Index
Specifies the Controller belonging to this View
In the case that it is not implemented or that null is returned this View does not have a Controller
memberOf zag1_ui_cv_03Index
getControllerName function()
return zag1_ui_cv_03Index
Is initially called once after the Controller has been instantiated It is the place where the UI is
constructed
Since the Controller is given to this method its event handlers can be attached right away
memberOf zag1_ui_cv_03Index
createContent function(oController)
create a lite button with an icon and a text
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010034
lite true
)placeAt(btn)
oButton3attachPress(oControllerdoFileDownload)
var oButton4 = new sapuicommonsButton(
text Refresh
icon imagesrefreshjpg
lite true
press function() var data = oTableval()
if(data == )
alert(no data found)
return
print(content)
print(DatArray)
if (data = )
alert(Funzt)
JSONToCSVConvertor(data CUSTOMER AMOUNT true)
)placeAt(btn)
jQuerysaprequire(sapuitableTable)
create table control with properties
var oTable = new sapuitableTable(
width 100
rowHeight 50
title Amount per Partner
selectionMode sapuitableSelectionModeNone
)
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Company Name
)
template new sapuicommonsTextView(
text CompanyName
)
sortProperty CompanyName
))
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010035
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Partner ID
)
template new sapuicommonsTextView(
text PartnerId
)
sortProperty PartnerId
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Postal Code
textAlign sapuicoreTextAlignEnd
)
template new sapuicommonsTextView(
text PostalCode
textAlign sapuicoreTextAlignEnd
)
sortProperty PostalCode
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text City
)
template new sapuicommonsTextView(
text City
)
sortProperty City
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Purchase ID
)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010036
template new sapuicommonsTextView(
text PurchaseOrderId
)
sortProperty Currency
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Lifecycle Status
)
template new sapuicommonsTextView(
text LifecycleStatus
)
sortProperty LifecycleStatus
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Gross Amount
)
template new sapuicommonsTextView(
text GrossAmount
)
sortProperty GrossAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Tax Amount
)
template new sapuicommonsTextView(
text TaxAmount
)
sortProperty TaxAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Amount Netto
)
template new sapuicommonsTextView(
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010037
text CM_NET_Amount_001
)
sortProperty CM_NET_Amount_001
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Currency
)
template new sapuicommonsTextView(
text Currency
)
sortProperty Currency
))
var oModel = new sapuimodelodataODataModel
(httpqperiorvmcldsr8000ZAG1_WS_001ZAG1_CV_001xsodata false)
oTablesetModel(oModel)
oTablebindRows(Amount)
return oTable
)
It wonacutet call the function or better said the action of the button works fine till to the point where it should call the
xsjsfile to generate the excel-file I wondered that in the ajax part the error- success- and complete-part will
be executed at the same time and not only one of this statements The message is 200 (The request has
succeeded The information returned with the response is dependent on the method used in the request)
Maybe you can see where my mistake is or whats going wrong
Iacuteve the developer edition on cloudshare (Hana Studio rev68 Server is on SPS05)
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010038
Andreacute
Thomas Jung in response to Samuel Tanor-Gyedu on page 38Feb 19 2014 523 AM
I dont think I can help you This appears to a question about how odata4j works not about XS I have no
experience with odata4j myself
Samuel Tanor-GyeduFeb 18 2014 913 AM
Hi Thomas
I have an odata service with this endpointhttpss5hanaxshanatrialondemandcomservicesUserxsodata
I am now trying to consume it from eclipse with the odata4j libraries
This is how I get the endpoint
public UserServiceOdata(String endpointUri)
thisendpointUri = endpointUri
ODataConsumerdumpresponseHeaders(true)
consumer = ODataConsumerscreate(endpointUri)
This is my method to add a user
public User addUser(User user)
consumercreateEntity(entitySet)properties(OPropertiesint32(propertyUserId
usergetId()))properties(OPropertiesstring(propertyUserName
usergetName()))properties(OPropertiesstring(propertyUserEmail usergetEmail()))execute()
return user
When I call addUser method I get an Error
Caused by javaxxmlstreamXMLStreamException ParseError at [rowcol][78253]
Message The reference to entity sourceUrl must end with the delimiter
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010039
When I use this endpoint httpss5hanaxshanatrialondemandcomservicesUsersvc everything works fine
With the httpss5hanaxshanatrialondemandcomservicesUserxsodata I get errors
Please I would be very grateful for assistance
Thanks in advance
Regards
Samuel
Thomas Jung in response to gentilini andre on page 39Feb 18 2014 431 AM
You have a fundamental misunderstanding here You are placing server side JavaScript code in your client
side UI5 application The function downloadExcel is something you need to execute on the server It needs to
be in an XSJS file and it is called from the client side via AJAX - as a REST service not as a local function
gentilini andreFeb 17 2014 451 PM
Hello Thomas
Thank you for this great How-To Guide
Iacutem pretty new in SAPUI5 and tried your export-sample in my little trial project but it doesnacutet work
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010040
My Button for this looks like
ltcodegt
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
lite true
press function() alert(oButton3getText())
downloadExcel()
ltcodegt
and the function for this action looks like
ltcodegt
function downloadExcel()
var body =
alert(drin)
print($query)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount tTax
Amount tNetto Amount tCurrency n
while(rsnext())
if(rsnext() == )
alert($responsesetBody( Failed to retrieve data ))
alert($responsestatus = $nethttpINTERNAL_SERVER_ERROR)
else
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010041
ltcodegt
Iacutem afraid and hope that you can help me
Kind regards
Andreacute
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1246 PM
gtIs there any restriction or development limitation in the XSJSLIB files
Thats a very general question Difficult to answer without any context
Vikas Madaan in response to Thomas Jung on page 41Feb 11 2014 1245 PM
Thanks Thomas
I think we are on same page
Once quick question that came to my mind Is there any restriction or development limitation in the XSJSLIB
files
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1230 PM
gtCould please help me in understanding in more advantagesdisadvantages for both techniques
Youve summarized it pretty well already
gtbecuase i dont want to use both the approaches
Even with the CRUD support and exits in XSODATA its still pretty hard to do 100 via XSODATA There are
still valid use cases for XSJS when you need custom body custom read processing job scheduling etc Its
good to try and use XSODATA whenever possible but I wouldnt automatically exclude the use of XSJS
Vikas MadaanFeb 11 2014 1008 AM
Hi Thomas
Thanks a lot for sharing useful information through various blogs
In my current project we are evaluating use of XSOData or XSJS applications I saw your videos like the one
mentioned below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010042
httpwwwsaphanacomdocsDOC-4376
Want i understood from various blog is this
From SP7 we can write exsits in the OData services and it is very easy to consume at the client side just like
any REST base service and from my understanding it is Scalable as well I would love to use XSOData always
becuase development effort is very less compare to XSJS and it is very easy to rampup the team on OData
related development objects
XSJS were as provide more control becuase of server side scripting becuase it allows development on the
server side using JavaScript Core APIs of SAP HANA Extended Application Services are therefore exposed
as JavaScript functions providing easy access to the HTTP Request and Response object as well database
access to execute SQL or call SQLScript Procedures It provide us control over the body format and and URL
parameter definition
Could please help me in understanding in more advantagesdisadvantages for both techniques
I am very keen to understand and also explain the same to team members becuase i dont want to use both the
approaches and even sometimes customer can also ask the same to us
Also If we are on SP6 then from my understanding XSJS provides us more capability in terms of complex
application Corrent me If i am wrong
Thanks
Regards
Vikas Madaan
Thomas Jung in response to Raghuveer Phull on page 42Feb 5 2014 312 PM
Yes there are videos on the CRUD features of XSODATA which were new in SP6
For more on CRUD support in SP6 see this video
oData CreateUpdateDelete Support in SAP HANA SPS6
For the extended support for XSJS exits in SP7 see this video
SAP HANA SPS 07 XSODATA Exits in XSJS
Raghuveer PhullFeb 5 2014 122 AM
Do you have an exampledocumentationvideo where you can write a service which will populate Hana DB
What I am asking for is a way for my external script to populate the DB tables i have created in Hana DB
Thomas Jung in response to reda miraoui on page 43Jan 29 2014 411 PM
The source code for the examples shown here are shipped as part of SHINE (SAP HANA Interactive
Education)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010043
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Vivek Singh Bhoj in response to reda miraoui on page 43Jan 29 2014 352 PM
Hi Reda
You can import Shine Content in HANA and then check all these source codes
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Regards
Vivek
reda miraoui in response to Thomas Jung on page Jan 29 2014 344 PM
Hey Thomas
Is it possible to download source code of your project from this HANA tutorial
Thanks
Reda
Thomas Jung in response to Abdul Hakim on page 43Nov 21 2013 1133 PM
Yes River can be used as an alternative and when activated it will generate Server Side JavaScript andor
SQLScript
Abdul Hakim in response to Thomas Jung on page 44Nov 21 2013 747 PM
Hi Thomas - Was going through blog regarding River (RDL)Just a question on this
When you say Programming language for HANA native development is Server side Javascript SQL SQL
ScriptOnce RDL is rolled out whether RDL can be used for native application development instead of Server
side Java script SQL SQL Script I am very much new to this stuff so appreciate if you can also help on
how to get started with Server Side Java script SQL SQL Script for HANA
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 30 2013 750 AM
Hi Thomas
Thanks for your response I am talking about more content on shine
thanks
Ashutosh
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010044
Baskar Gopalakrishnan in response to Thomas Jung on page 44Oct 30 2013 1249 AM
Hi Thomas
Im a SAP PI Middleware consultantSAP topic leader in XIPI heavily worked on Java related
Netweaver stack I have knowledge in ABAP but not worked heavily in abap I have enrolled your sap hana
native application development course I feel very interesting I did work heavily in java and javascript projects
using eclipse development tool Do you think if I invest my time in just native hana development and proceed
in HANA field is a good step I dont have BW experience either
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 819 PM
Thanks for the clarification Much appreciated
Thomas Jung in response to Abdul Hakim on page 44Oct 29 2013 120 PM
gtABAP Close to HANA means whether we can expect a similar 2 tier architecture similar to HANA XS in the
future or what does that mean
No it doesnt mean that ABAP will become a 2 tier architecture We will not move the ABAP VMKernel into
HANA itself It will remain a separate application server At least for the current plansforeseeable future What
he was referring to was bringing the programming models closer For instance the new 740 SP5 feature that
allows you to write SQLScript directly within an ABAP class method
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 650 AM
Thomas - Thanks for the clarificationMuch appreciatedI was listening to ABAP on HANA session by
Thorsten Schneider this year Teched and he was mentioning that SAP Plans to bring ABAP very close to
HANA in the coming future but not much details have been discussed in the sessionABAP Close to HANA
means whether we can expect a similar 2 tier architecture similar to HANA XS in the future or what does that
mean
Thanks
Hakim
Thomas Jung in response to Abdul Hakim on page 45Oct 28 2013 703 PM
gt whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the option is
recommended by SAP then kindly share the pros and cons of each of the item
Taken from the TechEd CD103 session slides
Guidance
bulluse ABAP for optimization of existing progams (in context of SAP Business Suite or BW)
bullconsider HANA Native Development for development of new applications which will solely run on SAP HANA
bullcombine ABAP and HANA Native Development to enrich existing applications (eg SAP HANA Live Fiori)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010045
ABAP
bullapplications follow 3-tier architecture
bullABAP is in general database agnostic but with release 74 optimized for SAP HANA
bullProgramming language ABAP ABAP OO with the option to use SAP HANA features
bullIDE eclipse-based ABAP Development Tools
HANA Native Development
bullapplications follow 2-tier architecture
bullHANA Native Development is SAP HANA specific and embedded in the database
bullProgramming language River server-side JavaScript SQLSQLScript
bullIDE eclipse-based SAP HANA Studio + web IDE
Thomas Jung in response to ashutosh dixit on page 45Oct 28 2013 701 PM
gtIs there any more demos for the SHINE
Im not exactly sure what you mean by that We are building additional content for SHINE that will be delivered
in SP7
Abdul HakimOct 28 2013 326 PM
Thomas - Let us say a customer is running SAP Netweaver 74 ABAP with HANA DB and they have HANA
extended service as wellIf the customer wants to do new developments then what is the recommendation
from SAP ie whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the
option is recommended by SAP then kindly share the pros and cons of each of the item (SAP Netweaver 74
ABAP Vs SAP HANA XS)
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 28 2013 221 PM
Hi Thomas
Thanks a lot for your its working now
Is there any more demos for the SHINE
Thanks
Ashutosh
Thomas Jung in response to ashutosh dixit on page 46Oct 25 2013 809 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010046
As this content is now standard in SP6 as part of SHINE (SAP HANA INteractive Education) there also some
setup instructions on helpsapcom
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Basic points to check - have you generated the synonyms in the data generator Ran the data generator to
create some data Have the role assigned Added client 001 to your user profile
ashutosh dixitOct 24 2013 130 PM
Hi Thomas
Amazing blog - once again Thomas thanks
I have been following you for many days attended your OPEN SAP course also
That was an amazing course for new learner like me
One of our client is looking forward for XS based search Application identical to what you have created in your
DEMO
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010047
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010048
But I am not able to fetch the data on blank HTML page is coming with no data
If there is any step by step document related to this please help in getting that
Any help will be highly appreciated
Thanks
Ashutosh
Naveen KumarSep 26 2013 1130 AM
Good Document
Heber FabianoAug 27 2013 323 PM
Great content as always Keep sharing with us
Thomas Jung in response to Orel Stringa on page 48Aug 27 2013 147 PM
This is currently not possible The CORS support is for all origins We dont yet have the feature to maintain a
whitelist of CORS origins
Orel Stringa in response to Thomas Jung on page Aug 27 2013 801 AM
Hi Thomas
nice to see that SAP has made it possible with SP6 to specify cross origin resource sharing (CORS) support
via the xsaccess file SP6 HANA development guide has example of how to specify CORS support
I have build an XS application and would like to serve SAPUI5 on a diffhost than XSHANA
How can I specify that I would like to allow cross origin access restricted to certain domain(s) only
Is there a special keyword syntax for specifying that
Thank yoi
Orel
Vijay UthayakumarAug 27 2013 131 AM
Highly informative amp digestible Fantastic work
Jerry WangAug 1 2013 955 AM
Hi Tomas
Thank you
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010049
Jerry
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 644 PM
JSLint checks are very strict and often produce syntax errors for items that just stylistic and wont actually
cause an error upon activation or runtime You can either ignore the JSLint errors or deactivate JSLint for this
project in these cases However it might also be an indication that the JavaScript code you are trying to import
isnt compatible with Strict mode
httpsdevelopermozillaorgen-USdocsWebJavaScriptReferenceFunctions_and_function_scope
Strict_mode
Milan Vrozina in response to Thomas Jung on page 49Jul 21 2013 624 PM
Thanks for clarification I thought there would be some kind of import
But anyway in case of this specific library I have some problems with JSLint validation when I do cut and paste
of the original code
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 343 PM
What kind of problem are you having using this library Strict mode JavaScript which doesnt try to access the
DOM Window or other client side specific objects should work in Server Side XSJS Generally if you have a
library you just cut and paste into your XSJS or an XSJSLIB file and then call the functions from your code
Milan VrozinaJul 21 2013 339 PM
Hello
first and foremost thank you for perfect openSAP classes related to HANA development and for this blog as
well
I have one question related to server-side javascript You mentioned in course that is possible to use 3rd party
libraries or reuse 3rd party code But I cant find a possible way how to import 3rd party javascript library -as
is- to server and use it For example I would like to use JSZip library to zip some file before sending it to client
from xsjs application Is that possible Thank you
Chandrashekhar MahajanJul 3 2013 734 PM
This is excellent blog Now HANA XS is very much clear to me
Mohan krishnaJul 1 2013 144 PM
WOW - great blog Thomas This will be very helpful in understanding SAP hana Good Job
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010050
Abdul Hakim in response to Thomas Jung on page 50Jun 27 2013 833 PM
Thanks for the clarification
Thomas Jung in response to Abdul Hakim on page 50Jun 27 2013 659 PM
HANA Extended Application Services uses SQLScript and JavaScript as its two primary programming
languages
gtwhether the current SAP Business suite based on ABAP will be completely migrated to HANA service
No The Business Suite already runs on HANA but still via the ABAP application server It will continue to
leverage HANA via a combination of enhancements to ABAP and utilizing some of the technologies described
in this blog
gtAlso whether ABAP can be used to built application in HANA extended services
No There is no ABAP language container in HANA Extended Application Services
Abdul HakimJun 27 2013 405 PM
Hi Thomas - What is the programming language used for HANA Extended application services
As HANA is more than a database ie application platform by itself and as you mentioned that more and more
applications will be built on HANA i have question as how the future SAP ERP system looks likewhether the
current SAP Business suite based on ABAP will be completely migrated to HANA service in the future or SAP
ABAP server will continue to evolve and receive focus investment from SAP Also whether ABAP can be used
to built application in HANA extended services Your thoughts
Thanks
Abdul Hakim
Thomas Jung in response to Ravindra Channe on page 50Jun 11 2013 830 PM
Yes it is still planned However we are still a couple of weeks away and Ive not seen the final installers to say
for certain its there
Ravindra ChanneJun 11 2013 815 PM
Hi Thomas
Thanks for a wonderful and very informative blog Is there any update on 32 bit REGI file
Is it expected along with SPS6
Regards
Ravi
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010051
Thomas Jung in response to Amanda Rzepka on page Jun 7 2013 942 PM
gtCan the XS Services be used in a BW on HANA Scenario
Yes XS is part of ALL HANA systems You should check and make sure you are licensed for direct access to
the underlying HANA instance however
Thomas Jung in response to Holger Schimanski on page Jun 7 2013 941 PM
gtIs there a similar library which could be used in XS Engine
The XSODATA development object is similar We also have higher level frameworks for XMLA and Search
Services (InA) You can expect more such high level frameworks to be added to the HANA Extended
Application Services in the future
Thomas Jung in response to Manav Mehra on page Jun 7 2013 939 PM
Have you used something like the Chrome developer tools to see see if you are getting any client side
javascript errors or to see if the request to your xsodata service is successful
Thomas Jung in response to Christian Hufnagl on page 52Jun 7 2013 938 PM
It will ship as non-automatic content in SPS6 (all systems will have it and it just needs to be imported) The
delivery units are also part of this weeks updates to the Cloudshare and AWS developer center images They
are also available for download as part of the content of the openSAP course
Thomas Jung in response to Matthew Pickell on page 51Jun 7 2013 937 PM
CORS support will come with SPS6 at the end of June
Thomas Jung in response to Jeroen Custers on page 51Jun 7 2013 936 PM
gtWill this bug be fixed in HANA ver 56
Personally Ive still experienced this bug in SPS6 internal builds Must be a tricky one to find Luckily the
workaround of closing and reopening isnt too difficult Just annoying This also probably makes the bug low
priority
Jeroen Custers in response to Vivek Singh Bhoj on page 52Jun 7 2013 411 PM
This issue also occurs on rev56
Matthew PickellJun 7 2013 258 PM
Thomas
Has CORS been included in a release yet
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010052
Vivek Singh Bhoj in response to Chandra Edem on page 52Jun 5 2013 601 AM
Hi Chandra
Date for Week1 Assignment has been extended till June 11
So you can give Week 1 Assignment now
Christian HufnaglJun 4 2013 543 PM
Hi Thomas
thank you for the interesting tutorial
Can you tell me whether it is possible to download the source code of the ldquoPutting it all togetherrdquovideo And if yes Where can I download itThanks
Christoph
Vivek Singh BhojJun 4 2013 1116 AM
Hi Thomas
Thanks for OpenSAP classes
Your Youtube Account also have very good exercises
IN OpenSAP Week 2 Unit 3 tutorial after assigning admin role to my user Id i am not able to see sequences
synonyms triggers under my schema or any other schema i am only able to see Column Views Procedures
Tables and Views
Though now i am able to insert data into my created table
Can you let me know how i will be able to see Sequences under my schema without removing the admin role
I am using HANA revision 52
Got to know from OpenSAP that
This is a known issue and the only way that Ive seen to fix it is to actually close the studio and open it again
then refresh the node
Cheers
Rich Heilman
SAP HANA Product Management
Will this bug be fixed in HANA ver 56
Chandra Edem in response to Thomas Jung on page 53Jun 4 2013 646 AM
Thomas
I registered for OpenSAP course Introduction to Software Development on SAP HANA on June 2 900PM
I didnt know that it is going to end WEEK1 assignment test on 632013 300PM Is there any way can take
that WEEK1 Assignment Test
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010053
Thanks
Chandra
Thomas Jung in response to Alexander Bauer on page Jun 3 2013 856 PM
SAPUI5 gets updated auutomatically when you apply HANA revisions There is no additional download or
update needed
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+01008
Figure 7 - Example OData Server JSON Output
The examples in the above figures demonstrate how easily these services can be tested from the web browser
but of course doesnt represent how end users would interact with the services Although you can use a variety
of 3rd party tools based upon JavaScript like Sencha Sencha Touch JQuery JQuery Mobile and PhoneGap
just to name a few SAP delivers the UI Development Toolkit for HTML5 (SAPUI5) standard in SAP HANA
Extended Application Services A particularly strong feature of SAPUI5 is the integration of OData service
consumption not just at a library level but also with special features within the UI elements for binding to OData
services
For example within SAPUI5 you can declare an OData model object and connect this model object to the URL
of the XSODATA service Next create a Table UI element and connect it to this model object Finally you call
bindRows of the Table UI element object and supply the OData entity name you want to use as the source of
the table
var oModel = new sapuimodelodataODataModel (servicesbuyerxsodata false) oTable = new sapuitableTable(testtableId tableID visibleRowCount 10) oTablesetModel(oModel) oTablebindRows(BUYER)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+01009
This creates an UI Element which has built-in events such as sort filter and paging which automatically call
the corresponding OData Service to fulfill the event No additional client side or server side programming is
necessary to handle such events
Figure 8 - OData Bound Table UI Element
For more details on OData service creation in SAP HANA Extended Application Services and utilizing these
services within SAPUI5 please view these videos
Server Side JavaScriptThe XSODATA services are great because they provide a large amount of functionality with minimal amounts
of development effort However there are a few limitations which come with such a framework approach For
example in SAP HANA SP5 the OData service framework is read only Support for Insert Update and Delete
operations is available with SAP HANA SP6
Luckily there is an option for creating free-form services where you can not only perform update operations but
also have full control over the body format and URL parameter definition SAP HANA Extended Application
Services also allows development on the server side using JavaScript (via project files with the extension
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010010
XSJS) Core APIs of SAP HANA Extended Application Services are therefore exposed as JavaScript
functions providing easy access to the HTTP Request and Response object as well database access to
execute SQL or call SQLScript Procedures
In this simple example we can take two numbers as URL Request Parameters and multiply them together and
then return the results as text in the Response Body This is an intentionally basic example so that you can
focus on the API usage
Figure 9 - Simple XSJS Service
However the power of XSJS services comes from the ability to access the database objects but also have full
control over the body output and to further manipulate the result set after selection In this example we use
XSJS to create a text-tab delimited output in order to support a download to Excel from a user interface
function downloadExcel() var body = var query = SELECT TOP 25000 PurchaseOrderId PartnerId to_nvarchar(CompanyName) LoginName_1 CreatedAt GrossAmount FROM _SYS_BICtechedepmdbPO_HEADER_EXTENDED order by PurchaseOrderId $tracedebug(query) var conn = $dbgetConnection() var pstmt = connprepareStatement(query) var rs = pstmtexecuteQuery() body = Purchase Order Id tPartner Id tCompany Name tEmployee Responsible tCreated At tGross Amount n while(rsnext()) body += rsgetString(1)+ t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetTimestamp(5)+t+rsgetDecimal(6)+n $responsesetBody(body) $responsecontentType = applicationvndms-excel charset=utf-16le $responseheadersset(Content-Dispositionattachment filename=Excelxls) $responseheadersset(access-control-allow-origin) $responsestatus = $nethttpOK
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010011
ClosingThis blog hopefully has served to give you a small introduction to many of the new concepts and possibilities
with SAP HANA SP5 and SAP HANA Extended Application Services
Over the coming weeks we will be posting additional blogs with more advanced examples and techniques as
well how to integrate SAP HANA Extended Application Services content into additional environments Likewise
there is a substantial Developerrsquos Guide which expands on many of the concepts introduced here
It is also important to note that while SAP HANA Extended Application Services ships asproductive software (meaning customers can go live in production with it) in SAP HANA SP5 it isa controlled release initially with a special ldquoProject Solutionrdquo program in place around this newfunctionality Please refer to Service Note 1779803 for additional details on the current statusof the Project Solution This Project Solution approach is designed to provide the highest levelsof support possible to initial customers and partners who choose to develop using SAP HANAExtended Application Services It also provides a channel for feedback to Product Managementand development so that we take suggestions and ideas and quickly integrate them into futurerevisions of SAP HANA and SAP HANA Extended Application Services103803 Views Tags sapmentor hana developer code database in_memory sap_mentor hana_devcentersap_hana sapui5 hana_studio xs hde xsjs xsodata
Glen OoiDec 23 2014 345 PM
Hi Thomas
In need of your expert advice
I have a situation where I am using BO Dashboards to create my Dashboard which is consuming the data from
HANA
I have a requirement to allow the user to comment in the dashboard and it will write back to the HANA DB and
also display the comments in the Dashboard
In order for the BO Dashboard to write back to HANA DB is via web services
Is there any way i can create a WSDL URL and consume the XSJS or ODATA services in HANA
Muhammad SadiqDec 10 2014 140 PM
I need your help in writing an API(XSJS service) which will take JSON format data and inserted into HANA
database
Tarasankar Banerjee in response to Thomas Jung on page 14Nov 5 2014 852 AM
Thanks Thomas Could you give an example of how to redirect
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010012
Im facing a strange issue while trying to import weather data from several cities together The issue appears to
be connected with the content of the response object
Following is the code of the Weatherxsjs file
try
var cmd = $requestparametersget(cmd)
var body
var response
var obj
var propertyName
if(cmd === import)
var dest = $nethttpreadDestination(rootworkTara02XSTest01XSHttpTest01 weather)
var client = new $nethttpClient()
var req = new $webWebRequest($nethttpGET group
id=12750041264527127733312732941275339ampunits=metric)
clientrequest(req dest)
response = clientgetResponse()
$responsecontentType = textplain
if(responsebody)
body = responsebodyasString()
obj = JSONparse(body)
body = cmd + n n + responsestatus + n n + responsecontentType
+ n n + responsebody + n n + objgetOwnPropertyNames()
$responsesetBody(body)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010013
$responsestatus = $nethttpOK
catch(e)
$responsecontentType = textplain
$responsesetBody(emessage)
$responsestatus = $nethttpINTERNAL_SERVER_ERROR
Following is the weatherxshttpdest
host = apiopenweathermaporg
port = 80
description = my weather checker
useSSL = false
pathPrefix = data25
authType = none
useProxy = true
proxyHost = ltproxy_detailsgt
proxyPort = ltproxy_port
timeout = 0
On accessing httplthostnamegt8000rootworkTara02XSTest01XSHttpTest01Weatherxsjs
ampcmd=import I am receiving the error message BodyasString unsupported charset specified in
Content-Type header (utf8)
If the body = responsebodyasString() statement is commented out I receive the error message
JSONparse unexpected character because the responsebodyasString() itself could not work correctly
However the URL httpapiopenweathermaporgdata25group
id=12750041264527127733312732941275339 returns data correctly
I am using the same URL in my code
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010014
Could you please advise regarding this issue Thanks for your help
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 14Nov 4 2014 319 PM
gtIs it possible to read files using XS For example some configuration file kept in the server
No there is no API to read from the file system of the underlying operating system You can read the HANA
configuration ini files however because they are exposed via SQL
gtIs it possible to call a html file from the xsjs file Something likerequestgetRequestDispatcher()forward() from
JAVA servlets
In the body of the response you send back to the client your could issue a redirect
Tarasankar Banerjee in response to Tarasankar Banerjee on page 15Nov 4 2014 1034 AM
Hi Thomas
Finally got my application running It is now fetching weather data from external sites
Have two more questions
1 Is it possible to read files using XS For example some configuration file kept in the server2 Is it possible to call a html file from the xsjs file Something like
requestgetRequestDispatcher()forward() from JAVA servlets
Thanks
Regards
Tarasankar
Robert WeberNov 3 2014 1136 AM
If someone is having difficulties with the alert log full on the xsengine
you can do the same trick as for the statisticserver in oder to reset the log area see details in OSS Notes
2019148 and 1950221
The commands are then
select VOLUME_ID from m_volumes where service_name = xsengine
ALTER SYSTEM ALTER CONFIGURATION (daemonini host lthostnamegt) UNSET
(xsengineinstances) WITH RECONFIGURE
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010015
ALTER SYSTEM ALTER CONFIGURATION (topologyini system) UNSET (hostlthostnamegt xsengine)
WITH RECONFIGURE
ALTER SYSTEM ALTER CONFIGURATION (topologyini system) UNSET (volumes ltvolume_idgt) WITH
RECONFIGURE
ALTER SYSTEM ALTER CONFIGURATION (daemonini host lthostnamegt) SET (xsengineinstances) =
1 WITH RECONFIGURE
Then restart the HANA instance and after that make a full backup (and schedule the regular backup in order to
prevent this situation again)
Hope this will help someone like me -)
Have a nice day
Regards
Robert
Tarasankar Banerjee in response to Tarasankar Banerjee on page 15Nov 3 2014 1031 AM
Update
I tried to access the XS Admin console from another user and faced only the No valid Crypto error However
could still update the proxy user details and the sample application successfully ran at last The relevant roles
were provided in Granted Roles not Application Privileges Probably that was the issue earlier
I would check again with new Http Destination and Server side Java Script
Thanks a lot Thomas for all your help
Regards
Tarasankar
Tarasankar Banerjee in response to Thomas Jung on page 18Nov 3 2014 929 AM
Hi Thomas
I also tried to use the sample code from section 841 Tutorial Use the XSJS Outbound API of the HANA
Developer Guide with minor modifications (for package structure proxy settings etc) This time the destination
was found The new project structure with the sample files yahooxshttpdest and sapStockxsjs is as below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010016
However it did not bring any data The content of the response object indicated that there was Proxy
authentication issue
When I tried to check the Destination in the XS Admin Console surprisingly none of the fields are populated
and everything (except the Trust Store drop down) is disabled All these fields are supposed to be populated
as indicated in the Modeling Guide
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010017
However the User already has the following privileges
The same scenario was present for the Http Destination I prepared earlier There are couple of internal errors
at the bottom On clicking them the following list is displayed
1 Internal Error dbError(ConnectionprepareStatement) 258 - insufficient privilege Not authorized at
ptimequerycheckerquery_checkcc24182 No valid SAP Crypto configuration
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010018
It appears from various blogs that the second error (No valid SAP Crypto configuration) is related to SSL
configuration in HANA I would contact the HANA Administrator to look into this issue Of course it would be
great if you could provide some insight
However I have no clue regarding the first error Request your help and cooperation in this regard
The initial issue of not finding the HttpDestination which I created still persists
Thanks for all your help
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 18Oct 31 2014 342 PM
First of all you would never use the workspace name It isnt ever part of anything It is only the package
structure that counts The first item in your list is the only one with the correct package Off hand it looks right to
me You are supposed to supply the full package path Have you configured this HTTP Destination in the XS
Admin tool yet
Tarasankar Banerjee in response to Thomas Jung on page 18Oct 31 2014 326 PM
Updated it Thanks
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 18Oct 31 2014 313 PM
Your comment got cut off We never really get to see what your problem is
Tarasankar Banerjee in response to Thomas Jung on page 21Oct 31 2014 256 PM
Thanks Thomas
I am facing as issue while trying to use an HTTP Destination I understand that the xshttpdest and xsjs file
need to in the same folder Following is the structure of my test project
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010019
As you can see the HTTP Destination and the XSJS files are in the same folder services The workspace
name is XS_Workspace and the package structure is as follows
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010020
Now I am trying to read this destination
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010021
When I am using full package structure destination_package =
rootworkTara02XSTest01XSHttpTest01services I am receiving the
error message httpreadDestination destination not found (package
rootworkTara02XSTest01XSHttpTest01services name XSHttpDest01)
On using the workspace name destination_package = XS_Workspaceservices I am receiving the
error message User is not authorized to use destination (package XS_Workspaceservices name
XSHttpDest01)
On using destination_package = rootworkTara02XSTest01services also I am receiving the error
message User is not authorized to use destination (package rootworkTara02XSTest01services
name XSHttpDest01) Strangely the services folder is not directly under XSTest01
Lastly I deliberately gave a wrong service name destination_package = XS_Workspaceservices and
destination_name = XSHttpDest02 But even then I received the error message User is not authorized to
use destination (package XS_Workspaceservices name XSHttpDest02) not that the destination is not
found
Could you please help me to resolve this issue
Thanks a lot for your helps
Regards
Tarasankar
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010022
Thomas Jung in response to Tarasankar Banerjee on page 22Oct 30 2014 152 PM
Since SPS06 its possible to use outbound HTTP destinations and to call out to external services using XSJS
Thomas Jung in response to Tarasankar Banerjee on page 22Oct 30 2014 150 PM
gtSo when the program runs in server would it automatically consider the OS user credentials
No It doesnt automatically use anything You have to specific the user and password that you want to use for
the proxy Although many proxy servers dont require a username and password
Tarasankar Banerjee in response to Thomas Jung on page 23Oct 30 2014 707 AM
Hi Thomas
Just watched the video you shared above Thanks a lot for it It is really informative and helpful
Regards
Tarasankar
Tarasankar Banerjee in response to Tarasankar Banerjee on page 22Oct 30 2014 346 AM
Got answer for the second point SAP HANA XS Administration Tool is the place to configure Proxy settings
Regards
Tarasankar
Tarasankar Banerjee in response to Tarasankar Banerjee on page 22Oct 29 2014 314 PM
Dear Thomas
another question is that does the proxy settings in the HttpDestination refer to the OS user of the HANA
server We specify useProxy as true and authType as basic in the HttpDestination but not maintain any
user credentials So when the program runs in server would it automatically consider the OS user credentials
Thanks
Regards
Tarasankar
Tarasankar Banerjee in response to Thomas Jung on page 23Oct 29 2014 132 PM
Thanks Thomas I am currently checking this option only
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010023
My current requirement is to fetch Weather Data and Social Media data from various OData services and store
them in HANA for further analysis What might be the best way for this I am currently checking the option of
creating an XS application which would connect to the external services fetch the data and save that in HANA
using DB Connection Is this the best way Or should we try to use JAVA or some other way
Your valuable suggestions are most welcome Thanks
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 23Oct 29 2014 1256 PM
gtHowever is it possible to consume XSODATA service from XSJS instead of using DB Connection
You can via an outbound HTTP destination although I certainly wouldnt recommend it It would be rather
complex and not well performing
gtAlso is it possible to consume data from external OData services for weather data social media data etc from
XSJS
Sure with the same Outbound HTTP Connectivity
httpswwwyoutubecomwatchv=fWirvj9l7eY
Maintaining HTTP Destinations - SAP HANA Developer Guide - SAP Library
Tarasankar BanerjeeOct 29 2014 1119 AM
Dear Thomas
Thanks for the great blog
I am able to connect to Database and execute queries from XSJS service However is it possible to consume
XSODATA service from XSJS instead of using DB Connection
Also is it possible to consume data from external OData services for weather data social media data etc from
XSJS
If possible it would be great if you could provide some code sample or guidelines
Thanks
Regards
Tarasankar
Thomas Jung in response to Weiping Lu on page 24Sep 25 2014 833 AM
Please refer to service note 1849775
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010024
httpservicesapcomsapsupportnotes1849775
I believe it will address your issue
Weiping LuSep 24 2014 519 PM
Hi Tom
Great post and videos I have a tough issue calling a HANA procedure from XS takes gt 5min but from HANA
studio lt 1 min Were using Amazon AWS rev 70 and 73 Any help will be greatly appreciated
Thanks
WPL
Thomas Jung in response to Su Srikanth on page 24Aug 11 2014 253 PM
You transport XSODATA services like you would any other repository content - via a Delivery Unit
Su SrikanthAug 11 2014 750 AM
Hi Thomas
Great blog
Ive a query here - we create the odata services(andor URLs created to view in the web browser) in
development environment now if we have to transport it to the quality andor production environment how
can we do this - is the same as importexport or is there any specific way to do please help with any useful
pointers
Many thanks as always
Su
Thomas Jung in response to ARSHAD SHAIKH on page 24May 15 2014 231 PM
Ive never written any blogs on calculation views I dont cover that topic That is why I suggested you ask your
question in the proper SCN forum
Although looking at your your above SQL Statement I dont see why you couldnt do this directly in XSODATA
off of the table STATUS without the need for the calculation view or the SQLScript Procedure
ARSHAD SHAIKH in response to Thomas Jung on page 25May 15 2014 1154 AM
Hello Thomas
I am new to hana Please suggest me the blogs of you related to calculation view that calling
procedures(procedures have out parameter)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010025
I am trying to fetch the result of procedure in calc view and want to create odata service for that calculation
view
procedure code goes like this
---------------------------------------
CREATE PROCEDURE TWEETS_TODAY(OUT OP BIGINT)
language SQLSCRIPT sql security invoker default schema SOCIAL360 reads sql data as
BEGIN
SELECT COUNT() INTO OP FROM SOCIAL360STATUS WHERE CREATED_AT = CURRENT_DATE
END
calc view code goes like this
----------------------------------------
Begin Procedure Script
BEGIN
DECLARE OP BIGINT
CALL SOCIAL360TWEETS_TODAY(OPvar_out)
END End Procedure Script
Thanks
-Arshad
Thomas Jung in response to ARSHAD SHAIKH on page 25May 15 2014 944 AM
Your question seems to have no relation to the content in this blog Please consider instead asking general
HANA questions in the appropriate SCN Forum
ARSHAD SHAIKHMay 15 2014 917 AM
Hi Thomas
I want to call procedures in calculation view (procedures have out parameter)
Please suggest me step by step procedure with example and supporting documents
Thanks
ARSHAD SHAIKH
Henrique Pinto in response to Blair Krotenko on page 26Apr 16 2014 711 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010026
Hmm not really sure of that I see it but that might be because Im an employee
But the NET development partner I was working with was not enrolled in any kind of beta testing program and
they were able to download it so I guess you should as well
Make sure to go in the Installation and Upgrades menu and not the Support Packages and Patches
Go to httpservicesapcomswdc -gt Installations and Upgrades -gt Browse our Download Catalog -gt SAP In-
Memory (SAP HANA) -gt SAP HANA ADONET 10
Best regards
Henrique
Blair Krotenko in response to Henrique Pinto on page 26Apr 16 2014 656 PM
Thanks for the info Henrique but I cant find it I dont know if it is an authorization issue or do we need to be a
ramp-up customer to dl and use a beta product
Thanks
Blair
Henrique Pinto in response to Thomas Jung on page 27Apr 16 2014 614 PM
The ADONET provider is available for download in the SAP Service Marketplace (in beta edition so far)
Thomas Jung in response to Kamal Jain on page 26Apr 16 2014 514 PM
For general OData structure and syntax I find that the Odataorg website is very helpful For example on this
topic
httpwwwodataorgdocumentationodata-version-2-0uri-conventions
The syntax of a $expand query option is a comma-separated list of Navigation Properties Additionally each
Navigation Property can be followed by a forward slash and another Navigation Property to enable identifying a
multi-level relationship
The page also has some sample URLs
Kamal JainApr 16 2014 536 AM
Dear Thomas
I agree that we need to pass all the associations in the expand I tried with some of options but was not
through
Now i just tried with below syntax and able to achive Thx
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010027
httpdewdftzld025pgdevsapcorp8000DTHCPXSZPMIS_PRO_ACTUALxsodata
ZPROHEADER(PR07_000002)$expand=ZACTUZEMPD
Regards
Kamal Jain
Thomas Jung in response to Blair Krotenko on page 27Apr 15 2014 623 PM
We do plan to release an ADONET provider specific to HANA in the near future This would probably be the
best option for consumption from NET Until then I would think that ODBC is probably the next best option It
gives you generally easy portability from already existing database code You could consume OData as well
although that is more generally consumed from the UI layer itself It guess it somewhat depends upon where
you are calling the service from in your NET application
Blair KrotenkoApr 15 2014 409 PM
Hi Thomas
We are looking at consuming HANA data in a NET application and from what I can see there are 2 options -
OData and ODBC It seems to me that OData might be the better option when consuming HANA data in an XS
application while ODBC might be the better option for NET What are your thoughts Is there a paper on this
subject I havent been able to find a comparison document for this Are there any security caveats to be aware
of for these options
Thanks
Blair
Thomas Jung in response to Kamal Jain on page 27Apr 15 2014 136 PM
You have to list both associations in the expand on the URL if you want both relationships to be processed
Kamal JainApr 15 2014 1249 PM
Hi Thomas
Thx for valuable and useful information
I have an query regarding XS Odata service creation for more than 2 tables and get all the data in one
command
There is req in which service needs to be created for 3 tables to get data from all these
First table has Project ID as key second table has composite
ProjectID and Employee Id as key and third table has Employee id as
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010028
key
So if I create navigation for first 2 tables based on project id and use expand comand than its working fine and I
can see data of both the tables
Further if I add navigation for third table also as below then below expand is displaying data for first two tables
only Pls share how to use expand command in this case if possible to get all tables data based on project id
How to use navigation ZEMPD here
httpdewdftzld025pgdevsapcorp8000DTHCPXSZPMIS_PRO_ACTUALxsodata
ZPROHEADER(PR07_000002)$expand=ZACTUamp
service namespace
DTHCPXS
DTHCPDTHCPDBHCP_PROJECT_HEADER
as ZPROHEADER
navigates (PROJECT as
ZACTU)
DTHCPDTHCPDBHCPT_ZPMIS_ACTUAL
as ZACTU
navigates (EMPLOYEE as
ZEMPD )
DTHCPDTHCPDBHCP_ZPMIS_RES_MASTER
as ZEMPD
association PROJECT principal
ZPROHEADER(PROJECTID)
multiplicity 1 dependent
ZACTU(PROJECTID) multiplicity
association EMPLOYEE principal
ZACTU(EMPLOYEEID)
multiplicity 1 dependent
ZEMPD(EMPLOYEEID) multiplicity
1
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010029
Pls suggest if there is anything to add or correct in XS odata service syntax above
Regards
Kamal Jain
Vikas Madaan in response to Thomas Jung on page 29Apr 14 2014 458 PM
Thanks Thomas
Under which component
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 29Apr 14 2014 450 PM
No this isnt a known issue Ive seen Nor can I recreate the problem in my system No you cant maintain the
authentication in XSHTTPDEST itself It intentionally must be set in XSADMIN tool I can really only suggest
that you open a support ticket
Vikas MadaanApr 14 2014 431 PM
Hi Thomas
I am trying to pull data from SAP system onto HANA Database using XSJOB files I am calling RFC enabled
function modules over HTTP request It helps me replicating the real time ECC data onto HANA as well with
back ground jobs
I am facing one problem in the XSHTTPDEST file I am able to create and activate the file using studio and this
file is even visible in the web based XS administration tool But in the web based tool when i provide user and
password for basic authotication then system just clears the user id and password when i try to save This the
reason our HTTP requests are getting failed and below is the response we are getting in the response body
lthtmlgtltheadgtlttitlegtLogon Error Messagelttitlegt
Is this known issue or we are missing something Is it possible to provide user and password in the
XSHTTPDEST file Is there any particular syntax
I checked and i have the required authorizations as well develper Guide
Please help
Regards
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010030
Vikas Madaan
Abdul HakimFeb 22 2014 359 AM
Hi Thomas - Any recommended book or resource to learn and master Server Side Javascript There were
many books available in the market but as a beginner need to know the right resource book to start with and
master this stuffAlso whether SAP plan to conduct any training to teach Server Side Javascript similar to other
standard training offerings
Thanks
Hakim
Samuel Tanor-GyeduFeb 20 2014 839 AM
Thanks Thomas
I will definitely have a look at SHINE
Thomas Jung in response to gentilini andre on page 30Feb 19 2014 422 PM
Difficult to say what is wrong I several things which are different than our sample that does this You are using
a POST for instance instead of a GET However if you are gettting a 200 then I assume the service call is
correct In client side tools (like Chrome Developer Tools) you should be able to see the response object from
the call
However what I would really recommend is that you study the SHINE content (SAP HANA Interactive
Education) There is already a sample application which does this in SHINE Also it has some special
JavaScript in the UI to handle the file attachment via AXAJ call Perhaps that is the part you are missing
You can read more about SHINE here It is also included already installed in the latest version of the HANA
Developer Center trial image (SP7 based)
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
gentilini andreFeb 19 2014 325 PM
Hi Thomas
well I followed your hints but it still donacutet work
I created a xsjs File like below
function downloadExcel()
try
var body =
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010031
alert(drin)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
alert(drusse)
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount
tTax Amount tNetto Amount tCurrency n
while(rsnext())
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
catch (e)
alert(db conn funktioniert nicht)
var a = $requestparametersget(cmd)
$responsesetBody(Invalid Command +a)
switch (a)
case doex
$responsesetBody(Invalid Command +a)
alert(filedownload)
thisdownloadExcel()
break
default
$responsestatus = $nethttpINTERNAL_SERVER_ERROR
$responsesetBody(Invalid Command +a)
The Controllerjs File
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010032
doFileDownload function (oEvent)
jQuerysaprequire(sapuicommonsMessageBox)
sapuicommonsMessageBoxshow(Export Starten sapuicommonsMessageBoxIconconfirm
Information)
sapuicommonsMessageBoxconfirm(Export starteninform Confirmation)
return false
function inform(rValue)
alert (drinnnnne)
var aurl = FileDownloadxsjscmd=doex
if(rValue) If User presses Ok
alert(aurl)
jQueryajax(
url aurl
method POST
dataType json
datacmddoex
success sapuicommonsMessageBoxalert(Export wird ausgefuumlhrtConfirmation)
errorfunction onErrorCall(jqXHR textStatus errorThrown)
alert(jqXHRstatus)
sapuicommonsMessageBoxshow(jqXHRstatus
ERROR
Error in calling Service )
return
complete sapuicommonsMessageBoxalert(Export Erfolgreich
abgeschlossenConfirmation)
)
return false
else If the user presses Cancel
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010033
sapuicommonsMessageBoxalert(Vorgang abgebrochenNotification)
)
at last but not least the view
sapuijsview(zag1_ui_cv_03Index
Specifies the Controller belonging to this View
In the case that it is not implemented or that null is returned this View does not have a Controller
memberOf zag1_ui_cv_03Index
getControllerName function()
return zag1_ui_cv_03Index
Is initially called once after the Controller has been instantiated It is the place where the UI is
constructed
Since the Controller is given to this method its event handlers can be attached right away
memberOf zag1_ui_cv_03Index
createContent function(oController)
create a lite button with an icon and a text
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010034
lite true
)placeAt(btn)
oButton3attachPress(oControllerdoFileDownload)
var oButton4 = new sapuicommonsButton(
text Refresh
icon imagesrefreshjpg
lite true
press function() var data = oTableval()
if(data == )
alert(no data found)
return
print(content)
print(DatArray)
if (data = )
alert(Funzt)
JSONToCSVConvertor(data CUSTOMER AMOUNT true)
)placeAt(btn)
jQuerysaprequire(sapuitableTable)
create table control with properties
var oTable = new sapuitableTable(
width 100
rowHeight 50
title Amount per Partner
selectionMode sapuitableSelectionModeNone
)
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Company Name
)
template new sapuicommonsTextView(
text CompanyName
)
sortProperty CompanyName
))
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010035
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Partner ID
)
template new sapuicommonsTextView(
text PartnerId
)
sortProperty PartnerId
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Postal Code
textAlign sapuicoreTextAlignEnd
)
template new sapuicommonsTextView(
text PostalCode
textAlign sapuicoreTextAlignEnd
)
sortProperty PostalCode
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text City
)
template new sapuicommonsTextView(
text City
)
sortProperty City
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Purchase ID
)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010036
template new sapuicommonsTextView(
text PurchaseOrderId
)
sortProperty Currency
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Lifecycle Status
)
template new sapuicommonsTextView(
text LifecycleStatus
)
sortProperty LifecycleStatus
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Gross Amount
)
template new sapuicommonsTextView(
text GrossAmount
)
sortProperty GrossAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Tax Amount
)
template new sapuicommonsTextView(
text TaxAmount
)
sortProperty TaxAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Amount Netto
)
template new sapuicommonsTextView(
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010037
text CM_NET_Amount_001
)
sortProperty CM_NET_Amount_001
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Currency
)
template new sapuicommonsTextView(
text Currency
)
sortProperty Currency
))
var oModel = new sapuimodelodataODataModel
(httpqperiorvmcldsr8000ZAG1_WS_001ZAG1_CV_001xsodata false)
oTablesetModel(oModel)
oTablebindRows(Amount)
return oTable
)
It wonacutet call the function or better said the action of the button works fine till to the point where it should call the
xsjsfile to generate the excel-file I wondered that in the ajax part the error- success- and complete-part will
be executed at the same time and not only one of this statements The message is 200 (The request has
succeeded The information returned with the response is dependent on the method used in the request)
Maybe you can see where my mistake is or whats going wrong
Iacuteve the developer edition on cloudshare (Hana Studio rev68 Server is on SPS05)
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010038
Andreacute
Thomas Jung in response to Samuel Tanor-Gyedu on page 38Feb 19 2014 523 AM
I dont think I can help you This appears to a question about how odata4j works not about XS I have no
experience with odata4j myself
Samuel Tanor-GyeduFeb 18 2014 913 AM
Hi Thomas
I have an odata service with this endpointhttpss5hanaxshanatrialondemandcomservicesUserxsodata
I am now trying to consume it from eclipse with the odata4j libraries
This is how I get the endpoint
public UserServiceOdata(String endpointUri)
thisendpointUri = endpointUri
ODataConsumerdumpresponseHeaders(true)
consumer = ODataConsumerscreate(endpointUri)
This is my method to add a user
public User addUser(User user)
consumercreateEntity(entitySet)properties(OPropertiesint32(propertyUserId
usergetId()))properties(OPropertiesstring(propertyUserName
usergetName()))properties(OPropertiesstring(propertyUserEmail usergetEmail()))execute()
return user
When I call addUser method I get an Error
Caused by javaxxmlstreamXMLStreamException ParseError at [rowcol][78253]
Message The reference to entity sourceUrl must end with the delimiter
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010039
When I use this endpoint httpss5hanaxshanatrialondemandcomservicesUsersvc everything works fine
With the httpss5hanaxshanatrialondemandcomservicesUserxsodata I get errors
Please I would be very grateful for assistance
Thanks in advance
Regards
Samuel
Thomas Jung in response to gentilini andre on page 39Feb 18 2014 431 AM
You have a fundamental misunderstanding here You are placing server side JavaScript code in your client
side UI5 application The function downloadExcel is something you need to execute on the server It needs to
be in an XSJS file and it is called from the client side via AJAX - as a REST service not as a local function
gentilini andreFeb 17 2014 451 PM
Hello Thomas
Thank you for this great How-To Guide
Iacutem pretty new in SAPUI5 and tried your export-sample in my little trial project but it doesnacutet work
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010040
My Button for this looks like
ltcodegt
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
lite true
press function() alert(oButton3getText())
downloadExcel()
ltcodegt
and the function for this action looks like
ltcodegt
function downloadExcel()
var body =
alert(drin)
print($query)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount tTax
Amount tNetto Amount tCurrency n
while(rsnext())
if(rsnext() == )
alert($responsesetBody( Failed to retrieve data ))
alert($responsestatus = $nethttpINTERNAL_SERVER_ERROR)
else
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010041
ltcodegt
Iacutem afraid and hope that you can help me
Kind regards
Andreacute
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1246 PM
gtIs there any restriction or development limitation in the XSJSLIB files
Thats a very general question Difficult to answer without any context
Vikas Madaan in response to Thomas Jung on page 41Feb 11 2014 1245 PM
Thanks Thomas
I think we are on same page
Once quick question that came to my mind Is there any restriction or development limitation in the XSJSLIB
files
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1230 PM
gtCould please help me in understanding in more advantagesdisadvantages for both techniques
Youve summarized it pretty well already
gtbecuase i dont want to use both the approaches
Even with the CRUD support and exits in XSODATA its still pretty hard to do 100 via XSODATA There are
still valid use cases for XSJS when you need custom body custom read processing job scheduling etc Its
good to try and use XSODATA whenever possible but I wouldnt automatically exclude the use of XSJS
Vikas MadaanFeb 11 2014 1008 AM
Hi Thomas
Thanks a lot for sharing useful information through various blogs
In my current project we are evaluating use of XSOData or XSJS applications I saw your videos like the one
mentioned below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010042
httpwwwsaphanacomdocsDOC-4376
Want i understood from various blog is this
From SP7 we can write exsits in the OData services and it is very easy to consume at the client side just like
any REST base service and from my understanding it is Scalable as well I would love to use XSOData always
becuase development effort is very less compare to XSJS and it is very easy to rampup the team on OData
related development objects
XSJS were as provide more control becuase of server side scripting becuase it allows development on the
server side using JavaScript Core APIs of SAP HANA Extended Application Services are therefore exposed
as JavaScript functions providing easy access to the HTTP Request and Response object as well database
access to execute SQL or call SQLScript Procedures It provide us control over the body format and and URL
parameter definition
Could please help me in understanding in more advantagesdisadvantages for both techniques
I am very keen to understand and also explain the same to team members becuase i dont want to use both the
approaches and even sometimes customer can also ask the same to us
Also If we are on SP6 then from my understanding XSJS provides us more capability in terms of complex
application Corrent me If i am wrong
Thanks
Regards
Vikas Madaan
Thomas Jung in response to Raghuveer Phull on page 42Feb 5 2014 312 PM
Yes there are videos on the CRUD features of XSODATA which were new in SP6
For more on CRUD support in SP6 see this video
oData CreateUpdateDelete Support in SAP HANA SPS6
For the extended support for XSJS exits in SP7 see this video
SAP HANA SPS 07 XSODATA Exits in XSJS
Raghuveer PhullFeb 5 2014 122 AM
Do you have an exampledocumentationvideo where you can write a service which will populate Hana DB
What I am asking for is a way for my external script to populate the DB tables i have created in Hana DB
Thomas Jung in response to reda miraoui on page 43Jan 29 2014 411 PM
The source code for the examples shown here are shipped as part of SHINE (SAP HANA Interactive
Education)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010043
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Vivek Singh Bhoj in response to reda miraoui on page 43Jan 29 2014 352 PM
Hi Reda
You can import Shine Content in HANA and then check all these source codes
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Regards
Vivek
reda miraoui in response to Thomas Jung on page Jan 29 2014 344 PM
Hey Thomas
Is it possible to download source code of your project from this HANA tutorial
Thanks
Reda
Thomas Jung in response to Abdul Hakim on page 43Nov 21 2013 1133 PM
Yes River can be used as an alternative and when activated it will generate Server Side JavaScript andor
SQLScript
Abdul Hakim in response to Thomas Jung on page 44Nov 21 2013 747 PM
Hi Thomas - Was going through blog regarding River (RDL)Just a question on this
When you say Programming language for HANA native development is Server side Javascript SQL SQL
ScriptOnce RDL is rolled out whether RDL can be used for native application development instead of Server
side Java script SQL SQL Script I am very much new to this stuff so appreciate if you can also help on
how to get started with Server Side Java script SQL SQL Script for HANA
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 30 2013 750 AM
Hi Thomas
Thanks for your response I am talking about more content on shine
thanks
Ashutosh
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010044
Baskar Gopalakrishnan in response to Thomas Jung on page 44Oct 30 2013 1249 AM
Hi Thomas
Im a SAP PI Middleware consultantSAP topic leader in XIPI heavily worked on Java related
Netweaver stack I have knowledge in ABAP but not worked heavily in abap I have enrolled your sap hana
native application development course I feel very interesting I did work heavily in java and javascript projects
using eclipse development tool Do you think if I invest my time in just native hana development and proceed
in HANA field is a good step I dont have BW experience either
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 819 PM
Thanks for the clarification Much appreciated
Thomas Jung in response to Abdul Hakim on page 44Oct 29 2013 120 PM
gtABAP Close to HANA means whether we can expect a similar 2 tier architecture similar to HANA XS in the
future or what does that mean
No it doesnt mean that ABAP will become a 2 tier architecture We will not move the ABAP VMKernel into
HANA itself It will remain a separate application server At least for the current plansforeseeable future What
he was referring to was bringing the programming models closer For instance the new 740 SP5 feature that
allows you to write SQLScript directly within an ABAP class method
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 650 AM
Thomas - Thanks for the clarificationMuch appreciatedI was listening to ABAP on HANA session by
Thorsten Schneider this year Teched and he was mentioning that SAP Plans to bring ABAP very close to
HANA in the coming future but not much details have been discussed in the sessionABAP Close to HANA
means whether we can expect a similar 2 tier architecture similar to HANA XS in the future or what does that
mean
Thanks
Hakim
Thomas Jung in response to Abdul Hakim on page 45Oct 28 2013 703 PM
gt whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the option is
recommended by SAP then kindly share the pros and cons of each of the item
Taken from the TechEd CD103 session slides
Guidance
bulluse ABAP for optimization of existing progams (in context of SAP Business Suite or BW)
bullconsider HANA Native Development for development of new applications which will solely run on SAP HANA
bullcombine ABAP and HANA Native Development to enrich existing applications (eg SAP HANA Live Fiori)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010045
ABAP
bullapplications follow 3-tier architecture
bullABAP is in general database agnostic but with release 74 optimized for SAP HANA
bullProgramming language ABAP ABAP OO with the option to use SAP HANA features
bullIDE eclipse-based ABAP Development Tools
HANA Native Development
bullapplications follow 2-tier architecture
bullHANA Native Development is SAP HANA specific and embedded in the database
bullProgramming language River server-side JavaScript SQLSQLScript
bullIDE eclipse-based SAP HANA Studio + web IDE
Thomas Jung in response to ashutosh dixit on page 45Oct 28 2013 701 PM
gtIs there any more demos for the SHINE
Im not exactly sure what you mean by that We are building additional content for SHINE that will be delivered
in SP7
Abdul HakimOct 28 2013 326 PM
Thomas - Let us say a customer is running SAP Netweaver 74 ABAP with HANA DB and they have HANA
extended service as wellIf the customer wants to do new developments then what is the recommendation
from SAP ie whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the
option is recommended by SAP then kindly share the pros and cons of each of the item (SAP Netweaver 74
ABAP Vs SAP HANA XS)
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 28 2013 221 PM
Hi Thomas
Thanks a lot for your its working now
Is there any more demos for the SHINE
Thanks
Ashutosh
Thomas Jung in response to ashutosh dixit on page 46Oct 25 2013 809 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010046
As this content is now standard in SP6 as part of SHINE (SAP HANA INteractive Education) there also some
setup instructions on helpsapcom
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Basic points to check - have you generated the synonyms in the data generator Ran the data generator to
create some data Have the role assigned Added client 001 to your user profile
ashutosh dixitOct 24 2013 130 PM
Hi Thomas
Amazing blog - once again Thomas thanks
I have been following you for many days attended your OPEN SAP course also
That was an amazing course for new learner like me
One of our client is looking forward for XS based search Application identical to what you have created in your
DEMO
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010047
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010048
But I am not able to fetch the data on blank HTML page is coming with no data
If there is any step by step document related to this please help in getting that
Any help will be highly appreciated
Thanks
Ashutosh
Naveen KumarSep 26 2013 1130 AM
Good Document
Heber FabianoAug 27 2013 323 PM
Great content as always Keep sharing with us
Thomas Jung in response to Orel Stringa on page 48Aug 27 2013 147 PM
This is currently not possible The CORS support is for all origins We dont yet have the feature to maintain a
whitelist of CORS origins
Orel Stringa in response to Thomas Jung on page Aug 27 2013 801 AM
Hi Thomas
nice to see that SAP has made it possible with SP6 to specify cross origin resource sharing (CORS) support
via the xsaccess file SP6 HANA development guide has example of how to specify CORS support
I have build an XS application and would like to serve SAPUI5 on a diffhost than XSHANA
How can I specify that I would like to allow cross origin access restricted to certain domain(s) only
Is there a special keyword syntax for specifying that
Thank yoi
Orel
Vijay UthayakumarAug 27 2013 131 AM
Highly informative amp digestible Fantastic work
Jerry WangAug 1 2013 955 AM
Hi Tomas
Thank you
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010049
Jerry
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 644 PM
JSLint checks are very strict and often produce syntax errors for items that just stylistic and wont actually
cause an error upon activation or runtime You can either ignore the JSLint errors or deactivate JSLint for this
project in these cases However it might also be an indication that the JavaScript code you are trying to import
isnt compatible with Strict mode
httpsdevelopermozillaorgen-USdocsWebJavaScriptReferenceFunctions_and_function_scope
Strict_mode
Milan Vrozina in response to Thomas Jung on page 49Jul 21 2013 624 PM
Thanks for clarification I thought there would be some kind of import
But anyway in case of this specific library I have some problems with JSLint validation when I do cut and paste
of the original code
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 343 PM
What kind of problem are you having using this library Strict mode JavaScript which doesnt try to access the
DOM Window or other client side specific objects should work in Server Side XSJS Generally if you have a
library you just cut and paste into your XSJS or an XSJSLIB file and then call the functions from your code
Milan VrozinaJul 21 2013 339 PM
Hello
first and foremost thank you for perfect openSAP classes related to HANA development and for this blog as
well
I have one question related to server-side javascript You mentioned in course that is possible to use 3rd party
libraries or reuse 3rd party code But I cant find a possible way how to import 3rd party javascript library -as
is- to server and use it For example I would like to use JSZip library to zip some file before sending it to client
from xsjs application Is that possible Thank you
Chandrashekhar MahajanJul 3 2013 734 PM
This is excellent blog Now HANA XS is very much clear to me
Mohan krishnaJul 1 2013 144 PM
WOW - great blog Thomas This will be very helpful in understanding SAP hana Good Job
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010050
Abdul Hakim in response to Thomas Jung on page 50Jun 27 2013 833 PM
Thanks for the clarification
Thomas Jung in response to Abdul Hakim on page 50Jun 27 2013 659 PM
HANA Extended Application Services uses SQLScript and JavaScript as its two primary programming
languages
gtwhether the current SAP Business suite based on ABAP will be completely migrated to HANA service
No The Business Suite already runs on HANA but still via the ABAP application server It will continue to
leverage HANA via a combination of enhancements to ABAP and utilizing some of the technologies described
in this blog
gtAlso whether ABAP can be used to built application in HANA extended services
No There is no ABAP language container in HANA Extended Application Services
Abdul HakimJun 27 2013 405 PM
Hi Thomas - What is the programming language used for HANA Extended application services
As HANA is more than a database ie application platform by itself and as you mentioned that more and more
applications will be built on HANA i have question as how the future SAP ERP system looks likewhether the
current SAP Business suite based on ABAP will be completely migrated to HANA service in the future or SAP
ABAP server will continue to evolve and receive focus investment from SAP Also whether ABAP can be used
to built application in HANA extended services Your thoughts
Thanks
Abdul Hakim
Thomas Jung in response to Ravindra Channe on page 50Jun 11 2013 830 PM
Yes it is still planned However we are still a couple of weeks away and Ive not seen the final installers to say
for certain its there
Ravindra ChanneJun 11 2013 815 PM
Hi Thomas
Thanks for a wonderful and very informative blog Is there any update on 32 bit REGI file
Is it expected along with SPS6
Regards
Ravi
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010051
Thomas Jung in response to Amanda Rzepka on page Jun 7 2013 942 PM
gtCan the XS Services be used in a BW on HANA Scenario
Yes XS is part of ALL HANA systems You should check and make sure you are licensed for direct access to
the underlying HANA instance however
Thomas Jung in response to Holger Schimanski on page Jun 7 2013 941 PM
gtIs there a similar library which could be used in XS Engine
The XSODATA development object is similar We also have higher level frameworks for XMLA and Search
Services (InA) You can expect more such high level frameworks to be added to the HANA Extended
Application Services in the future
Thomas Jung in response to Manav Mehra on page Jun 7 2013 939 PM
Have you used something like the Chrome developer tools to see see if you are getting any client side
javascript errors or to see if the request to your xsodata service is successful
Thomas Jung in response to Christian Hufnagl on page 52Jun 7 2013 938 PM
It will ship as non-automatic content in SPS6 (all systems will have it and it just needs to be imported) The
delivery units are also part of this weeks updates to the Cloudshare and AWS developer center images They
are also available for download as part of the content of the openSAP course
Thomas Jung in response to Matthew Pickell on page 51Jun 7 2013 937 PM
CORS support will come with SPS6 at the end of June
Thomas Jung in response to Jeroen Custers on page 51Jun 7 2013 936 PM
gtWill this bug be fixed in HANA ver 56
Personally Ive still experienced this bug in SPS6 internal builds Must be a tricky one to find Luckily the
workaround of closing and reopening isnt too difficult Just annoying This also probably makes the bug low
priority
Jeroen Custers in response to Vivek Singh Bhoj on page 52Jun 7 2013 411 PM
This issue also occurs on rev56
Matthew PickellJun 7 2013 258 PM
Thomas
Has CORS been included in a release yet
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010052
Vivek Singh Bhoj in response to Chandra Edem on page 52Jun 5 2013 601 AM
Hi Chandra
Date for Week1 Assignment has been extended till June 11
So you can give Week 1 Assignment now
Christian HufnaglJun 4 2013 543 PM
Hi Thomas
thank you for the interesting tutorial
Can you tell me whether it is possible to download the source code of the ldquoPutting it all togetherrdquovideo And if yes Where can I download itThanks
Christoph
Vivek Singh BhojJun 4 2013 1116 AM
Hi Thomas
Thanks for OpenSAP classes
Your Youtube Account also have very good exercises
IN OpenSAP Week 2 Unit 3 tutorial after assigning admin role to my user Id i am not able to see sequences
synonyms triggers under my schema or any other schema i am only able to see Column Views Procedures
Tables and Views
Though now i am able to insert data into my created table
Can you let me know how i will be able to see Sequences under my schema without removing the admin role
I am using HANA revision 52
Got to know from OpenSAP that
This is a known issue and the only way that Ive seen to fix it is to actually close the studio and open it again
then refresh the node
Cheers
Rich Heilman
SAP HANA Product Management
Will this bug be fixed in HANA ver 56
Chandra Edem in response to Thomas Jung on page 53Jun 4 2013 646 AM
Thomas
I registered for OpenSAP course Introduction to Software Development on SAP HANA on June 2 900PM
I didnt know that it is going to end WEEK1 assignment test on 632013 300PM Is there any way can take
that WEEK1 Assignment Test
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010053
Thanks
Chandra
Thomas Jung in response to Alexander Bauer on page Jun 3 2013 856 PM
SAPUI5 gets updated auutomatically when you apply HANA revisions There is no additional download or
update needed
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+01009
This creates an UI Element which has built-in events such as sort filter and paging which automatically call
the corresponding OData Service to fulfill the event No additional client side or server side programming is
necessary to handle such events
Figure 8 - OData Bound Table UI Element
For more details on OData service creation in SAP HANA Extended Application Services and utilizing these
services within SAPUI5 please view these videos
Server Side JavaScriptThe XSODATA services are great because they provide a large amount of functionality with minimal amounts
of development effort However there are a few limitations which come with such a framework approach For
example in SAP HANA SP5 the OData service framework is read only Support for Insert Update and Delete
operations is available with SAP HANA SP6
Luckily there is an option for creating free-form services where you can not only perform update operations but
also have full control over the body format and URL parameter definition SAP HANA Extended Application
Services also allows development on the server side using JavaScript (via project files with the extension
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010010
XSJS) Core APIs of SAP HANA Extended Application Services are therefore exposed as JavaScript
functions providing easy access to the HTTP Request and Response object as well database access to
execute SQL or call SQLScript Procedures
In this simple example we can take two numbers as URL Request Parameters and multiply them together and
then return the results as text in the Response Body This is an intentionally basic example so that you can
focus on the API usage
Figure 9 - Simple XSJS Service
However the power of XSJS services comes from the ability to access the database objects but also have full
control over the body output and to further manipulate the result set after selection In this example we use
XSJS to create a text-tab delimited output in order to support a download to Excel from a user interface
function downloadExcel() var body = var query = SELECT TOP 25000 PurchaseOrderId PartnerId to_nvarchar(CompanyName) LoginName_1 CreatedAt GrossAmount FROM _SYS_BICtechedepmdbPO_HEADER_EXTENDED order by PurchaseOrderId $tracedebug(query) var conn = $dbgetConnection() var pstmt = connprepareStatement(query) var rs = pstmtexecuteQuery() body = Purchase Order Id tPartner Id tCompany Name tEmployee Responsible tCreated At tGross Amount n while(rsnext()) body += rsgetString(1)+ t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetTimestamp(5)+t+rsgetDecimal(6)+n $responsesetBody(body) $responsecontentType = applicationvndms-excel charset=utf-16le $responseheadersset(Content-Dispositionattachment filename=Excelxls) $responseheadersset(access-control-allow-origin) $responsestatus = $nethttpOK
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010011
ClosingThis blog hopefully has served to give you a small introduction to many of the new concepts and possibilities
with SAP HANA SP5 and SAP HANA Extended Application Services
Over the coming weeks we will be posting additional blogs with more advanced examples and techniques as
well how to integrate SAP HANA Extended Application Services content into additional environments Likewise
there is a substantial Developerrsquos Guide which expands on many of the concepts introduced here
It is also important to note that while SAP HANA Extended Application Services ships asproductive software (meaning customers can go live in production with it) in SAP HANA SP5 it isa controlled release initially with a special ldquoProject Solutionrdquo program in place around this newfunctionality Please refer to Service Note 1779803 for additional details on the current statusof the Project Solution This Project Solution approach is designed to provide the highest levelsof support possible to initial customers and partners who choose to develop using SAP HANAExtended Application Services It also provides a channel for feedback to Product Managementand development so that we take suggestions and ideas and quickly integrate them into futurerevisions of SAP HANA and SAP HANA Extended Application Services103803 Views Tags sapmentor hana developer code database in_memory sap_mentor hana_devcentersap_hana sapui5 hana_studio xs hde xsjs xsodata
Glen OoiDec 23 2014 345 PM
Hi Thomas
In need of your expert advice
I have a situation where I am using BO Dashboards to create my Dashboard which is consuming the data from
HANA
I have a requirement to allow the user to comment in the dashboard and it will write back to the HANA DB and
also display the comments in the Dashboard
In order for the BO Dashboard to write back to HANA DB is via web services
Is there any way i can create a WSDL URL and consume the XSJS or ODATA services in HANA
Muhammad SadiqDec 10 2014 140 PM
I need your help in writing an API(XSJS service) which will take JSON format data and inserted into HANA
database
Tarasankar Banerjee in response to Thomas Jung on page 14Nov 5 2014 852 AM
Thanks Thomas Could you give an example of how to redirect
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010012
Im facing a strange issue while trying to import weather data from several cities together The issue appears to
be connected with the content of the response object
Following is the code of the Weatherxsjs file
try
var cmd = $requestparametersget(cmd)
var body
var response
var obj
var propertyName
if(cmd === import)
var dest = $nethttpreadDestination(rootworkTara02XSTest01XSHttpTest01 weather)
var client = new $nethttpClient()
var req = new $webWebRequest($nethttpGET group
id=12750041264527127733312732941275339ampunits=metric)
clientrequest(req dest)
response = clientgetResponse()
$responsecontentType = textplain
if(responsebody)
body = responsebodyasString()
obj = JSONparse(body)
body = cmd + n n + responsestatus + n n + responsecontentType
+ n n + responsebody + n n + objgetOwnPropertyNames()
$responsesetBody(body)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010013
$responsestatus = $nethttpOK
catch(e)
$responsecontentType = textplain
$responsesetBody(emessage)
$responsestatus = $nethttpINTERNAL_SERVER_ERROR
Following is the weatherxshttpdest
host = apiopenweathermaporg
port = 80
description = my weather checker
useSSL = false
pathPrefix = data25
authType = none
useProxy = true
proxyHost = ltproxy_detailsgt
proxyPort = ltproxy_port
timeout = 0
On accessing httplthostnamegt8000rootworkTara02XSTest01XSHttpTest01Weatherxsjs
ampcmd=import I am receiving the error message BodyasString unsupported charset specified in
Content-Type header (utf8)
If the body = responsebodyasString() statement is commented out I receive the error message
JSONparse unexpected character because the responsebodyasString() itself could not work correctly
However the URL httpapiopenweathermaporgdata25group
id=12750041264527127733312732941275339 returns data correctly
I am using the same URL in my code
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010014
Could you please advise regarding this issue Thanks for your help
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 14Nov 4 2014 319 PM
gtIs it possible to read files using XS For example some configuration file kept in the server
No there is no API to read from the file system of the underlying operating system You can read the HANA
configuration ini files however because they are exposed via SQL
gtIs it possible to call a html file from the xsjs file Something likerequestgetRequestDispatcher()forward() from
JAVA servlets
In the body of the response you send back to the client your could issue a redirect
Tarasankar Banerjee in response to Tarasankar Banerjee on page 15Nov 4 2014 1034 AM
Hi Thomas
Finally got my application running It is now fetching weather data from external sites
Have two more questions
1 Is it possible to read files using XS For example some configuration file kept in the server2 Is it possible to call a html file from the xsjs file Something like
requestgetRequestDispatcher()forward() from JAVA servlets
Thanks
Regards
Tarasankar
Robert WeberNov 3 2014 1136 AM
If someone is having difficulties with the alert log full on the xsengine
you can do the same trick as for the statisticserver in oder to reset the log area see details in OSS Notes
2019148 and 1950221
The commands are then
select VOLUME_ID from m_volumes where service_name = xsengine
ALTER SYSTEM ALTER CONFIGURATION (daemonini host lthostnamegt) UNSET
(xsengineinstances) WITH RECONFIGURE
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010015
ALTER SYSTEM ALTER CONFIGURATION (topologyini system) UNSET (hostlthostnamegt xsengine)
WITH RECONFIGURE
ALTER SYSTEM ALTER CONFIGURATION (topologyini system) UNSET (volumes ltvolume_idgt) WITH
RECONFIGURE
ALTER SYSTEM ALTER CONFIGURATION (daemonini host lthostnamegt) SET (xsengineinstances) =
1 WITH RECONFIGURE
Then restart the HANA instance and after that make a full backup (and schedule the regular backup in order to
prevent this situation again)
Hope this will help someone like me -)
Have a nice day
Regards
Robert
Tarasankar Banerjee in response to Tarasankar Banerjee on page 15Nov 3 2014 1031 AM
Update
I tried to access the XS Admin console from another user and faced only the No valid Crypto error However
could still update the proxy user details and the sample application successfully ran at last The relevant roles
were provided in Granted Roles not Application Privileges Probably that was the issue earlier
I would check again with new Http Destination and Server side Java Script
Thanks a lot Thomas for all your help
Regards
Tarasankar
Tarasankar Banerjee in response to Thomas Jung on page 18Nov 3 2014 929 AM
Hi Thomas
I also tried to use the sample code from section 841 Tutorial Use the XSJS Outbound API of the HANA
Developer Guide with minor modifications (for package structure proxy settings etc) This time the destination
was found The new project structure with the sample files yahooxshttpdest and sapStockxsjs is as below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010016
However it did not bring any data The content of the response object indicated that there was Proxy
authentication issue
When I tried to check the Destination in the XS Admin Console surprisingly none of the fields are populated
and everything (except the Trust Store drop down) is disabled All these fields are supposed to be populated
as indicated in the Modeling Guide
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010017
However the User already has the following privileges
The same scenario was present for the Http Destination I prepared earlier There are couple of internal errors
at the bottom On clicking them the following list is displayed
1 Internal Error dbError(ConnectionprepareStatement) 258 - insufficient privilege Not authorized at
ptimequerycheckerquery_checkcc24182 No valid SAP Crypto configuration
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010018
It appears from various blogs that the second error (No valid SAP Crypto configuration) is related to SSL
configuration in HANA I would contact the HANA Administrator to look into this issue Of course it would be
great if you could provide some insight
However I have no clue regarding the first error Request your help and cooperation in this regard
The initial issue of not finding the HttpDestination which I created still persists
Thanks for all your help
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 18Oct 31 2014 342 PM
First of all you would never use the workspace name It isnt ever part of anything It is only the package
structure that counts The first item in your list is the only one with the correct package Off hand it looks right to
me You are supposed to supply the full package path Have you configured this HTTP Destination in the XS
Admin tool yet
Tarasankar Banerjee in response to Thomas Jung on page 18Oct 31 2014 326 PM
Updated it Thanks
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 18Oct 31 2014 313 PM
Your comment got cut off We never really get to see what your problem is
Tarasankar Banerjee in response to Thomas Jung on page 21Oct 31 2014 256 PM
Thanks Thomas
I am facing as issue while trying to use an HTTP Destination I understand that the xshttpdest and xsjs file
need to in the same folder Following is the structure of my test project
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010019
As you can see the HTTP Destination and the XSJS files are in the same folder services The workspace
name is XS_Workspace and the package structure is as follows
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010020
Now I am trying to read this destination
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010021
When I am using full package structure destination_package =
rootworkTara02XSTest01XSHttpTest01services I am receiving the
error message httpreadDestination destination not found (package
rootworkTara02XSTest01XSHttpTest01services name XSHttpDest01)
On using the workspace name destination_package = XS_Workspaceservices I am receiving the
error message User is not authorized to use destination (package XS_Workspaceservices name
XSHttpDest01)
On using destination_package = rootworkTara02XSTest01services also I am receiving the error
message User is not authorized to use destination (package rootworkTara02XSTest01services
name XSHttpDest01) Strangely the services folder is not directly under XSTest01
Lastly I deliberately gave a wrong service name destination_package = XS_Workspaceservices and
destination_name = XSHttpDest02 But even then I received the error message User is not authorized to
use destination (package XS_Workspaceservices name XSHttpDest02) not that the destination is not
found
Could you please help me to resolve this issue
Thanks a lot for your helps
Regards
Tarasankar
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010022
Thomas Jung in response to Tarasankar Banerjee on page 22Oct 30 2014 152 PM
Since SPS06 its possible to use outbound HTTP destinations and to call out to external services using XSJS
Thomas Jung in response to Tarasankar Banerjee on page 22Oct 30 2014 150 PM
gtSo when the program runs in server would it automatically consider the OS user credentials
No It doesnt automatically use anything You have to specific the user and password that you want to use for
the proxy Although many proxy servers dont require a username and password
Tarasankar Banerjee in response to Thomas Jung on page 23Oct 30 2014 707 AM
Hi Thomas
Just watched the video you shared above Thanks a lot for it It is really informative and helpful
Regards
Tarasankar
Tarasankar Banerjee in response to Tarasankar Banerjee on page 22Oct 30 2014 346 AM
Got answer for the second point SAP HANA XS Administration Tool is the place to configure Proxy settings
Regards
Tarasankar
Tarasankar Banerjee in response to Tarasankar Banerjee on page 22Oct 29 2014 314 PM
Dear Thomas
another question is that does the proxy settings in the HttpDestination refer to the OS user of the HANA
server We specify useProxy as true and authType as basic in the HttpDestination but not maintain any
user credentials So when the program runs in server would it automatically consider the OS user credentials
Thanks
Regards
Tarasankar
Tarasankar Banerjee in response to Thomas Jung on page 23Oct 29 2014 132 PM
Thanks Thomas I am currently checking this option only
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010023
My current requirement is to fetch Weather Data and Social Media data from various OData services and store
them in HANA for further analysis What might be the best way for this I am currently checking the option of
creating an XS application which would connect to the external services fetch the data and save that in HANA
using DB Connection Is this the best way Or should we try to use JAVA or some other way
Your valuable suggestions are most welcome Thanks
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 23Oct 29 2014 1256 PM
gtHowever is it possible to consume XSODATA service from XSJS instead of using DB Connection
You can via an outbound HTTP destination although I certainly wouldnt recommend it It would be rather
complex and not well performing
gtAlso is it possible to consume data from external OData services for weather data social media data etc from
XSJS
Sure with the same Outbound HTTP Connectivity
httpswwwyoutubecomwatchv=fWirvj9l7eY
Maintaining HTTP Destinations - SAP HANA Developer Guide - SAP Library
Tarasankar BanerjeeOct 29 2014 1119 AM
Dear Thomas
Thanks for the great blog
I am able to connect to Database and execute queries from XSJS service However is it possible to consume
XSODATA service from XSJS instead of using DB Connection
Also is it possible to consume data from external OData services for weather data social media data etc from
XSJS
If possible it would be great if you could provide some code sample or guidelines
Thanks
Regards
Tarasankar
Thomas Jung in response to Weiping Lu on page 24Sep 25 2014 833 AM
Please refer to service note 1849775
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010024
httpservicesapcomsapsupportnotes1849775
I believe it will address your issue
Weiping LuSep 24 2014 519 PM
Hi Tom
Great post and videos I have a tough issue calling a HANA procedure from XS takes gt 5min but from HANA
studio lt 1 min Were using Amazon AWS rev 70 and 73 Any help will be greatly appreciated
Thanks
WPL
Thomas Jung in response to Su Srikanth on page 24Aug 11 2014 253 PM
You transport XSODATA services like you would any other repository content - via a Delivery Unit
Su SrikanthAug 11 2014 750 AM
Hi Thomas
Great blog
Ive a query here - we create the odata services(andor URLs created to view in the web browser) in
development environment now if we have to transport it to the quality andor production environment how
can we do this - is the same as importexport or is there any specific way to do please help with any useful
pointers
Many thanks as always
Su
Thomas Jung in response to ARSHAD SHAIKH on page 24May 15 2014 231 PM
Ive never written any blogs on calculation views I dont cover that topic That is why I suggested you ask your
question in the proper SCN forum
Although looking at your your above SQL Statement I dont see why you couldnt do this directly in XSODATA
off of the table STATUS without the need for the calculation view or the SQLScript Procedure
ARSHAD SHAIKH in response to Thomas Jung on page 25May 15 2014 1154 AM
Hello Thomas
I am new to hana Please suggest me the blogs of you related to calculation view that calling
procedures(procedures have out parameter)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010025
I am trying to fetch the result of procedure in calc view and want to create odata service for that calculation
view
procedure code goes like this
---------------------------------------
CREATE PROCEDURE TWEETS_TODAY(OUT OP BIGINT)
language SQLSCRIPT sql security invoker default schema SOCIAL360 reads sql data as
BEGIN
SELECT COUNT() INTO OP FROM SOCIAL360STATUS WHERE CREATED_AT = CURRENT_DATE
END
calc view code goes like this
----------------------------------------
Begin Procedure Script
BEGIN
DECLARE OP BIGINT
CALL SOCIAL360TWEETS_TODAY(OPvar_out)
END End Procedure Script
Thanks
-Arshad
Thomas Jung in response to ARSHAD SHAIKH on page 25May 15 2014 944 AM
Your question seems to have no relation to the content in this blog Please consider instead asking general
HANA questions in the appropriate SCN Forum
ARSHAD SHAIKHMay 15 2014 917 AM
Hi Thomas
I want to call procedures in calculation view (procedures have out parameter)
Please suggest me step by step procedure with example and supporting documents
Thanks
ARSHAD SHAIKH
Henrique Pinto in response to Blair Krotenko on page 26Apr 16 2014 711 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010026
Hmm not really sure of that I see it but that might be because Im an employee
But the NET development partner I was working with was not enrolled in any kind of beta testing program and
they were able to download it so I guess you should as well
Make sure to go in the Installation and Upgrades menu and not the Support Packages and Patches
Go to httpservicesapcomswdc -gt Installations and Upgrades -gt Browse our Download Catalog -gt SAP In-
Memory (SAP HANA) -gt SAP HANA ADONET 10
Best regards
Henrique
Blair Krotenko in response to Henrique Pinto on page 26Apr 16 2014 656 PM
Thanks for the info Henrique but I cant find it I dont know if it is an authorization issue or do we need to be a
ramp-up customer to dl and use a beta product
Thanks
Blair
Henrique Pinto in response to Thomas Jung on page 27Apr 16 2014 614 PM
The ADONET provider is available for download in the SAP Service Marketplace (in beta edition so far)
Thomas Jung in response to Kamal Jain on page 26Apr 16 2014 514 PM
For general OData structure and syntax I find that the Odataorg website is very helpful For example on this
topic
httpwwwodataorgdocumentationodata-version-2-0uri-conventions
The syntax of a $expand query option is a comma-separated list of Navigation Properties Additionally each
Navigation Property can be followed by a forward slash and another Navigation Property to enable identifying a
multi-level relationship
The page also has some sample URLs
Kamal JainApr 16 2014 536 AM
Dear Thomas
I agree that we need to pass all the associations in the expand I tried with some of options but was not
through
Now i just tried with below syntax and able to achive Thx
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010027
httpdewdftzld025pgdevsapcorp8000DTHCPXSZPMIS_PRO_ACTUALxsodata
ZPROHEADER(PR07_000002)$expand=ZACTUZEMPD
Regards
Kamal Jain
Thomas Jung in response to Blair Krotenko on page 27Apr 15 2014 623 PM
We do plan to release an ADONET provider specific to HANA in the near future This would probably be the
best option for consumption from NET Until then I would think that ODBC is probably the next best option It
gives you generally easy portability from already existing database code You could consume OData as well
although that is more generally consumed from the UI layer itself It guess it somewhat depends upon where
you are calling the service from in your NET application
Blair KrotenkoApr 15 2014 409 PM
Hi Thomas
We are looking at consuming HANA data in a NET application and from what I can see there are 2 options -
OData and ODBC It seems to me that OData might be the better option when consuming HANA data in an XS
application while ODBC might be the better option for NET What are your thoughts Is there a paper on this
subject I havent been able to find a comparison document for this Are there any security caveats to be aware
of for these options
Thanks
Blair
Thomas Jung in response to Kamal Jain on page 27Apr 15 2014 136 PM
You have to list both associations in the expand on the URL if you want both relationships to be processed
Kamal JainApr 15 2014 1249 PM
Hi Thomas
Thx for valuable and useful information
I have an query regarding XS Odata service creation for more than 2 tables and get all the data in one
command
There is req in which service needs to be created for 3 tables to get data from all these
First table has Project ID as key second table has composite
ProjectID and Employee Id as key and third table has Employee id as
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010028
key
So if I create navigation for first 2 tables based on project id and use expand comand than its working fine and I
can see data of both the tables
Further if I add navigation for third table also as below then below expand is displaying data for first two tables
only Pls share how to use expand command in this case if possible to get all tables data based on project id
How to use navigation ZEMPD here
httpdewdftzld025pgdevsapcorp8000DTHCPXSZPMIS_PRO_ACTUALxsodata
ZPROHEADER(PR07_000002)$expand=ZACTUamp
service namespace
DTHCPXS
DTHCPDTHCPDBHCP_PROJECT_HEADER
as ZPROHEADER
navigates (PROJECT as
ZACTU)
DTHCPDTHCPDBHCPT_ZPMIS_ACTUAL
as ZACTU
navigates (EMPLOYEE as
ZEMPD )
DTHCPDTHCPDBHCP_ZPMIS_RES_MASTER
as ZEMPD
association PROJECT principal
ZPROHEADER(PROJECTID)
multiplicity 1 dependent
ZACTU(PROJECTID) multiplicity
association EMPLOYEE principal
ZACTU(EMPLOYEEID)
multiplicity 1 dependent
ZEMPD(EMPLOYEEID) multiplicity
1
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010029
Pls suggest if there is anything to add or correct in XS odata service syntax above
Regards
Kamal Jain
Vikas Madaan in response to Thomas Jung on page 29Apr 14 2014 458 PM
Thanks Thomas
Under which component
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 29Apr 14 2014 450 PM
No this isnt a known issue Ive seen Nor can I recreate the problem in my system No you cant maintain the
authentication in XSHTTPDEST itself It intentionally must be set in XSADMIN tool I can really only suggest
that you open a support ticket
Vikas MadaanApr 14 2014 431 PM
Hi Thomas
I am trying to pull data from SAP system onto HANA Database using XSJOB files I am calling RFC enabled
function modules over HTTP request It helps me replicating the real time ECC data onto HANA as well with
back ground jobs
I am facing one problem in the XSHTTPDEST file I am able to create and activate the file using studio and this
file is even visible in the web based XS administration tool But in the web based tool when i provide user and
password for basic authotication then system just clears the user id and password when i try to save This the
reason our HTTP requests are getting failed and below is the response we are getting in the response body
lthtmlgtltheadgtlttitlegtLogon Error Messagelttitlegt
Is this known issue or we are missing something Is it possible to provide user and password in the
XSHTTPDEST file Is there any particular syntax
I checked and i have the required authorizations as well develper Guide
Please help
Regards
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010030
Vikas Madaan
Abdul HakimFeb 22 2014 359 AM
Hi Thomas - Any recommended book or resource to learn and master Server Side Javascript There were
many books available in the market but as a beginner need to know the right resource book to start with and
master this stuffAlso whether SAP plan to conduct any training to teach Server Side Javascript similar to other
standard training offerings
Thanks
Hakim
Samuel Tanor-GyeduFeb 20 2014 839 AM
Thanks Thomas
I will definitely have a look at SHINE
Thomas Jung in response to gentilini andre on page 30Feb 19 2014 422 PM
Difficult to say what is wrong I several things which are different than our sample that does this You are using
a POST for instance instead of a GET However if you are gettting a 200 then I assume the service call is
correct In client side tools (like Chrome Developer Tools) you should be able to see the response object from
the call
However what I would really recommend is that you study the SHINE content (SAP HANA Interactive
Education) There is already a sample application which does this in SHINE Also it has some special
JavaScript in the UI to handle the file attachment via AXAJ call Perhaps that is the part you are missing
You can read more about SHINE here It is also included already installed in the latest version of the HANA
Developer Center trial image (SP7 based)
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
gentilini andreFeb 19 2014 325 PM
Hi Thomas
well I followed your hints but it still donacutet work
I created a xsjs File like below
function downloadExcel()
try
var body =
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010031
alert(drin)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
alert(drusse)
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount
tTax Amount tNetto Amount tCurrency n
while(rsnext())
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
catch (e)
alert(db conn funktioniert nicht)
var a = $requestparametersget(cmd)
$responsesetBody(Invalid Command +a)
switch (a)
case doex
$responsesetBody(Invalid Command +a)
alert(filedownload)
thisdownloadExcel()
break
default
$responsestatus = $nethttpINTERNAL_SERVER_ERROR
$responsesetBody(Invalid Command +a)
The Controllerjs File
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010032
doFileDownload function (oEvent)
jQuerysaprequire(sapuicommonsMessageBox)
sapuicommonsMessageBoxshow(Export Starten sapuicommonsMessageBoxIconconfirm
Information)
sapuicommonsMessageBoxconfirm(Export starteninform Confirmation)
return false
function inform(rValue)
alert (drinnnnne)
var aurl = FileDownloadxsjscmd=doex
if(rValue) If User presses Ok
alert(aurl)
jQueryajax(
url aurl
method POST
dataType json
datacmddoex
success sapuicommonsMessageBoxalert(Export wird ausgefuumlhrtConfirmation)
errorfunction onErrorCall(jqXHR textStatus errorThrown)
alert(jqXHRstatus)
sapuicommonsMessageBoxshow(jqXHRstatus
ERROR
Error in calling Service )
return
complete sapuicommonsMessageBoxalert(Export Erfolgreich
abgeschlossenConfirmation)
)
return false
else If the user presses Cancel
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010033
sapuicommonsMessageBoxalert(Vorgang abgebrochenNotification)
)
at last but not least the view
sapuijsview(zag1_ui_cv_03Index
Specifies the Controller belonging to this View
In the case that it is not implemented or that null is returned this View does not have a Controller
memberOf zag1_ui_cv_03Index
getControllerName function()
return zag1_ui_cv_03Index
Is initially called once after the Controller has been instantiated It is the place where the UI is
constructed
Since the Controller is given to this method its event handlers can be attached right away
memberOf zag1_ui_cv_03Index
createContent function(oController)
create a lite button with an icon and a text
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010034
lite true
)placeAt(btn)
oButton3attachPress(oControllerdoFileDownload)
var oButton4 = new sapuicommonsButton(
text Refresh
icon imagesrefreshjpg
lite true
press function() var data = oTableval()
if(data == )
alert(no data found)
return
print(content)
print(DatArray)
if (data = )
alert(Funzt)
JSONToCSVConvertor(data CUSTOMER AMOUNT true)
)placeAt(btn)
jQuerysaprequire(sapuitableTable)
create table control with properties
var oTable = new sapuitableTable(
width 100
rowHeight 50
title Amount per Partner
selectionMode sapuitableSelectionModeNone
)
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Company Name
)
template new sapuicommonsTextView(
text CompanyName
)
sortProperty CompanyName
))
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010035
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Partner ID
)
template new sapuicommonsTextView(
text PartnerId
)
sortProperty PartnerId
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Postal Code
textAlign sapuicoreTextAlignEnd
)
template new sapuicommonsTextView(
text PostalCode
textAlign sapuicoreTextAlignEnd
)
sortProperty PostalCode
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text City
)
template new sapuicommonsTextView(
text City
)
sortProperty City
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Purchase ID
)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010036
template new sapuicommonsTextView(
text PurchaseOrderId
)
sortProperty Currency
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Lifecycle Status
)
template new sapuicommonsTextView(
text LifecycleStatus
)
sortProperty LifecycleStatus
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Gross Amount
)
template new sapuicommonsTextView(
text GrossAmount
)
sortProperty GrossAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Tax Amount
)
template new sapuicommonsTextView(
text TaxAmount
)
sortProperty TaxAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Amount Netto
)
template new sapuicommonsTextView(
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010037
text CM_NET_Amount_001
)
sortProperty CM_NET_Amount_001
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Currency
)
template new sapuicommonsTextView(
text Currency
)
sortProperty Currency
))
var oModel = new sapuimodelodataODataModel
(httpqperiorvmcldsr8000ZAG1_WS_001ZAG1_CV_001xsodata false)
oTablesetModel(oModel)
oTablebindRows(Amount)
return oTable
)
It wonacutet call the function or better said the action of the button works fine till to the point where it should call the
xsjsfile to generate the excel-file I wondered that in the ajax part the error- success- and complete-part will
be executed at the same time and not only one of this statements The message is 200 (The request has
succeeded The information returned with the response is dependent on the method used in the request)
Maybe you can see where my mistake is or whats going wrong
Iacuteve the developer edition on cloudshare (Hana Studio rev68 Server is on SPS05)
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010038
Andreacute
Thomas Jung in response to Samuel Tanor-Gyedu on page 38Feb 19 2014 523 AM
I dont think I can help you This appears to a question about how odata4j works not about XS I have no
experience with odata4j myself
Samuel Tanor-GyeduFeb 18 2014 913 AM
Hi Thomas
I have an odata service with this endpointhttpss5hanaxshanatrialondemandcomservicesUserxsodata
I am now trying to consume it from eclipse with the odata4j libraries
This is how I get the endpoint
public UserServiceOdata(String endpointUri)
thisendpointUri = endpointUri
ODataConsumerdumpresponseHeaders(true)
consumer = ODataConsumerscreate(endpointUri)
This is my method to add a user
public User addUser(User user)
consumercreateEntity(entitySet)properties(OPropertiesint32(propertyUserId
usergetId()))properties(OPropertiesstring(propertyUserName
usergetName()))properties(OPropertiesstring(propertyUserEmail usergetEmail()))execute()
return user
When I call addUser method I get an Error
Caused by javaxxmlstreamXMLStreamException ParseError at [rowcol][78253]
Message The reference to entity sourceUrl must end with the delimiter
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010039
When I use this endpoint httpss5hanaxshanatrialondemandcomservicesUsersvc everything works fine
With the httpss5hanaxshanatrialondemandcomservicesUserxsodata I get errors
Please I would be very grateful for assistance
Thanks in advance
Regards
Samuel
Thomas Jung in response to gentilini andre on page 39Feb 18 2014 431 AM
You have a fundamental misunderstanding here You are placing server side JavaScript code in your client
side UI5 application The function downloadExcel is something you need to execute on the server It needs to
be in an XSJS file and it is called from the client side via AJAX - as a REST service not as a local function
gentilini andreFeb 17 2014 451 PM
Hello Thomas
Thank you for this great How-To Guide
Iacutem pretty new in SAPUI5 and tried your export-sample in my little trial project but it doesnacutet work
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010040
My Button for this looks like
ltcodegt
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
lite true
press function() alert(oButton3getText())
downloadExcel()
ltcodegt
and the function for this action looks like
ltcodegt
function downloadExcel()
var body =
alert(drin)
print($query)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount tTax
Amount tNetto Amount tCurrency n
while(rsnext())
if(rsnext() == )
alert($responsesetBody( Failed to retrieve data ))
alert($responsestatus = $nethttpINTERNAL_SERVER_ERROR)
else
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010041
ltcodegt
Iacutem afraid and hope that you can help me
Kind regards
Andreacute
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1246 PM
gtIs there any restriction or development limitation in the XSJSLIB files
Thats a very general question Difficult to answer without any context
Vikas Madaan in response to Thomas Jung on page 41Feb 11 2014 1245 PM
Thanks Thomas
I think we are on same page
Once quick question that came to my mind Is there any restriction or development limitation in the XSJSLIB
files
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1230 PM
gtCould please help me in understanding in more advantagesdisadvantages for both techniques
Youve summarized it pretty well already
gtbecuase i dont want to use both the approaches
Even with the CRUD support and exits in XSODATA its still pretty hard to do 100 via XSODATA There are
still valid use cases for XSJS when you need custom body custom read processing job scheduling etc Its
good to try and use XSODATA whenever possible but I wouldnt automatically exclude the use of XSJS
Vikas MadaanFeb 11 2014 1008 AM
Hi Thomas
Thanks a lot for sharing useful information through various blogs
In my current project we are evaluating use of XSOData or XSJS applications I saw your videos like the one
mentioned below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010042
httpwwwsaphanacomdocsDOC-4376
Want i understood from various blog is this
From SP7 we can write exsits in the OData services and it is very easy to consume at the client side just like
any REST base service and from my understanding it is Scalable as well I would love to use XSOData always
becuase development effort is very less compare to XSJS and it is very easy to rampup the team on OData
related development objects
XSJS were as provide more control becuase of server side scripting becuase it allows development on the
server side using JavaScript Core APIs of SAP HANA Extended Application Services are therefore exposed
as JavaScript functions providing easy access to the HTTP Request and Response object as well database
access to execute SQL or call SQLScript Procedures It provide us control over the body format and and URL
parameter definition
Could please help me in understanding in more advantagesdisadvantages for both techniques
I am very keen to understand and also explain the same to team members becuase i dont want to use both the
approaches and even sometimes customer can also ask the same to us
Also If we are on SP6 then from my understanding XSJS provides us more capability in terms of complex
application Corrent me If i am wrong
Thanks
Regards
Vikas Madaan
Thomas Jung in response to Raghuveer Phull on page 42Feb 5 2014 312 PM
Yes there are videos on the CRUD features of XSODATA which were new in SP6
For more on CRUD support in SP6 see this video
oData CreateUpdateDelete Support in SAP HANA SPS6
For the extended support for XSJS exits in SP7 see this video
SAP HANA SPS 07 XSODATA Exits in XSJS
Raghuveer PhullFeb 5 2014 122 AM
Do you have an exampledocumentationvideo where you can write a service which will populate Hana DB
What I am asking for is a way for my external script to populate the DB tables i have created in Hana DB
Thomas Jung in response to reda miraoui on page 43Jan 29 2014 411 PM
The source code for the examples shown here are shipped as part of SHINE (SAP HANA Interactive
Education)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010043
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Vivek Singh Bhoj in response to reda miraoui on page 43Jan 29 2014 352 PM
Hi Reda
You can import Shine Content in HANA and then check all these source codes
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Regards
Vivek
reda miraoui in response to Thomas Jung on page Jan 29 2014 344 PM
Hey Thomas
Is it possible to download source code of your project from this HANA tutorial
Thanks
Reda
Thomas Jung in response to Abdul Hakim on page 43Nov 21 2013 1133 PM
Yes River can be used as an alternative and when activated it will generate Server Side JavaScript andor
SQLScript
Abdul Hakim in response to Thomas Jung on page 44Nov 21 2013 747 PM
Hi Thomas - Was going through blog regarding River (RDL)Just a question on this
When you say Programming language for HANA native development is Server side Javascript SQL SQL
ScriptOnce RDL is rolled out whether RDL can be used for native application development instead of Server
side Java script SQL SQL Script I am very much new to this stuff so appreciate if you can also help on
how to get started with Server Side Java script SQL SQL Script for HANA
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 30 2013 750 AM
Hi Thomas
Thanks for your response I am talking about more content on shine
thanks
Ashutosh
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010044
Baskar Gopalakrishnan in response to Thomas Jung on page 44Oct 30 2013 1249 AM
Hi Thomas
Im a SAP PI Middleware consultantSAP topic leader in XIPI heavily worked on Java related
Netweaver stack I have knowledge in ABAP but not worked heavily in abap I have enrolled your sap hana
native application development course I feel very interesting I did work heavily in java and javascript projects
using eclipse development tool Do you think if I invest my time in just native hana development and proceed
in HANA field is a good step I dont have BW experience either
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 819 PM
Thanks for the clarification Much appreciated
Thomas Jung in response to Abdul Hakim on page 44Oct 29 2013 120 PM
gtABAP Close to HANA means whether we can expect a similar 2 tier architecture similar to HANA XS in the
future or what does that mean
No it doesnt mean that ABAP will become a 2 tier architecture We will not move the ABAP VMKernel into
HANA itself It will remain a separate application server At least for the current plansforeseeable future What
he was referring to was bringing the programming models closer For instance the new 740 SP5 feature that
allows you to write SQLScript directly within an ABAP class method
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 650 AM
Thomas - Thanks for the clarificationMuch appreciatedI was listening to ABAP on HANA session by
Thorsten Schneider this year Teched and he was mentioning that SAP Plans to bring ABAP very close to
HANA in the coming future but not much details have been discussed in the sessionABAP Close to HANA
means whether we can expect a similar 2 tier architecture similar to HANA XS in the future or what does that
mean
Thanks
Hakim
Thomas Jung in response to Abdul Hakim on page 45Oct 28 2013 703 PM
gt whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the option is
recommended by SAP then kindly share the pros and cons of each of the item
Taken from the TechEd CD103 session slides
Guidance
bulluse ABAP for optimization of existing progams (in context of SAP Business Suite or BW)
bullconsider HANA Native Development for development of new applications which will solely run on SAP HANA
bullcombine ABAP and HANA Native Development to enrich existing applications (eg SAP HANA Live Fiori)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010045
ABAP
bullapplications follow 3-tier architecture
bullABAP is in general database agnostic but with release 74 optimized for SAP HANA
bullProgramming language ABAP ABAP OO with the option to use SAP HANA features
bullIDE eclipse-based ABAP Development Tools
HANA Native Development
bullapplications follow 2-tier architecture
bullHANA Native Development is SAP HANA specific and embedded in the database
bullProgramming language River server-side JavaScript SQLSQLScript
bullIDE eclipse-based SAP HANA Studio + web IDE
Thomas Jung in response to ashutosh dixit on page 45Oct 28 2013 701 PM
gtIs there any more demos for the SHINE
Im not exactly sure what you mean by that We are building additional content for SHINE that will be delivered
in SP7
Abdul HakimOct 28 2013 326 PM
Thomas - Let us say a customer is running SAP Netweaver 74 ABAP with HANA DB and they have HANA
extended service as wellIf the customer wants to do new developments then what is the recommendation
from SAP ie whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the
option is recommended by SAP then kindly share the pros and cons of each of the item (SAP Netweaver 74
ABAP Vs SAP HANA XS)
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 28 2013 221 PM
Hi Thomas
Thanks a lot for your its working now
Is there any more demos for the SHINE
Thanks
Ashutosh
Thomas Jung in response to ashutosh dixit on page 46Oct 25 2013 809 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010046
As this content is now standard in SP6 as part of SHINE (SAP HANA INteractive Education) there also some
setup instructions on helpsapcom
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Basic points to check - have you generated the synonyms in the data generator Ran the data generator to
create some data Have the role assigned Added client 001 to your user profile
ashutosh dixitOct 24 2013 130 PM
Hi Thomas
Amazing blog - once again Thomas thanks
I have been following you for many days attended your OPEN SAP course also
That was an amazing course for new learner like me
One of our client is looking forward for XS based search Application identical to what you have created in your
DEMO
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010047
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010048
But I am not able to fetch the data on blank HTML page is coming with no data
If there is any step by step document related to this please help in getting that
Any help will be highly appreciated
Thanks
Ashutosh
Naveen KumarSep 26 2013 1130 AM
Good Document
Heber FabianoAug 27 2013 323 PM
Great content as always Keep sharing with us
Thomas Jung in response to Orel Stringa on page 48Aug 27 2013 147 PM
This is currently not possible The CORS support is for all origins We dont yet have the feature to maintain a
whitelist of CORS origins
Orel Stringa in response to Thomas Jung on page Aug 27 2013 801 AM
Hi Thomas
nice to see that SAP has made it possible with SP6 to specify cross origin resource sharing (CORS) support
via the xsaccess file SP6 HANA development guide has example of how to specify CORS support
I have build an XS application and would like to serve SAPUI5 on a diffhost than XSHANA
How can I specify that I would like to allow cross origin access restricted to certain domain(s) only
Is there a special keyword syntax for specifying that
Thank yoi
Orel
Vijay UthayakumarAug 27 2013 131 AM
Highly informative amp digestible Fantastic work
Jerry WangAug 1 2013 955 AM
Hi Tomas
Thank you
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010049
Jerry
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 644 PM
JSLint checks are very strict and often produce syntax errors for items that just stylistic and wont actually
cause an error upon activation or runtime You can either ignore the JSLint errors or deactivate JSLint for this
project in these cases However it might also be an indication that the JavaScript code you are trying to import
isnt compatible with Strict mode
httpsdevelopermozillaorgen-USdocsWebJavaScriptReferenceFunctions_and_function_scope
Strict_mode
Milan Vrozina in response to Thomas Jung on page 49Jul 21 2013 624 PM
Thanks for clarification I thought there would be some kind of import
But anyway in case of this specific library I have some problems with JSLint validation when I do cut and paste
of the original code
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 343 PM
What kind of problem are you having using this library Strict mode JavaScript which doesnt try to access the
DOM Window or other client side specific objects should work in Server Side XSJS Generally if you have a
library you just cut and paste into your XSJS or an XSJSLIB file and then call the functions from your code
Milan VrozinaJul 21 2013 339 PM
Hello
first and foremost thank you for perfect openSAP classes related to HANA development and for this blog as
well
I have one question related to server-side javascript You mentioned in course that is possible to use 3rd party
libraries or reuse 3rd party code But I cant find a possible way how to import 3rd party javascript library -as
is- to server and use it For example I would like to use JSZip library to zip some file before sending it to client
from xsjs application Is that possible Thank you
Chandrashekhar MahajanJul 3 2013 734 PM
This is excellent blog Now HANA XS is very much clear to me
Mohan krishnaJul 1 2013 144 PM
WOW - great blog Thomas This will be very helpful in understanding SAP hana Good Job
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010050
Abdul Hakim in response to Thomas Jung on page 50Jun 27 2013 833 PM
Thanks for the clarification
Thomas Jung in response to Abdul Hakim on page 50Jun 27 2013 659 PM
HANA Extended Application Services uses SQLScript and JavaScript as its two primary programming
languages
gtwhether the current SAP Business suite based on ABAP will be completely migrated to HANA service
No The Business Suite already runs on HANA but still via the ABAP application server It will continue to
leverage HANA via a combination of enhancements to ABAP and utilizing some of the technologies described
in this blog
gtAlso whether ABAP can be used to built application in HANA extended services
No There is no ABAP language container in HANA Extended Application Services
Abdul HakimJun 27 2013 405 PM
Hi Thomas - What is the programming language used for HANA Extended application services
As HANA is more than a database ie application platform by itself and as you mentioned that more and more
applications will be built on HANA i have question as how the future SAP ERP system looks likewhether the
current SAP Business suite based on ABAP will be completely migrated to HANA service in the future or SAP
ABAP server will continue to evolve and receive focus investment from SAP Also whether ABAP can be used
to built application in HANA extended services Your thoughts
Thanks
Abdul Hakim
Thomas Jung in response to Ravindra Channe on page 50Jun 11 2013 830 PM
Yes it is still planned However we are still a couple of weeks away and Ive not seen the final installers to say
for certain its there
Ravindra ChanneJun 11 2013 815 PM
Hi Thomas
Thanks for a wonderful and very informative blog Is there any update on 32 bit REGI file
Is it expected along with SPS6
Regards
Ravi
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010051
Thomas Jung in response to Amanda Rzepka on page Jun 7 2013 942 PM
gtCan the XS Services be used in a BW on HANA Scenario
Yes XS is part of ALL HANA systems You should check and make sure you are licensed for direct access to
the underlying HANA instance however
Thomas Jung in response to Holger Schimanski on page Jun 7 2013 941 PM
gtIs there a similar library which could be used in XS Engine
The XSODATA development object is similar We also have higher level frameworks for XMLA and Search
Services (InA) You can expect more such high level frameworks to be added to the HANA Extended
Application Services in the future
Thomas Jung in response to Manav Mehra on page Jun 7 2013 939 PM
Have you used something like the Chrome developer tools to see see if you are getting any client side
javascript errors or to see if the request to your xsodata service is successful
Thomas Jung in response to Christian Hufnagl on page 52Jun 7 2013 938 PM
It will ship as non-automatic content in SPS6 (all systems will have it and it just needs to be imported) The
delivery units are also part of this weeks updates to the Cloudshare and AWS developer center images They
are also available for download as part of the content of the openSAP course
Thomas Jung in response to Matthew Pickell on page 51Jun 7 2013 937 PM
CORS support will come with SPS6 at the end of June
Thomas Jung in response to Jeroen Custers on page 51Jun 7 2013 936 PM
gtWill this bug be fixed in HANA ver 56
Personally Ive still experienced this bug in SPS6 internal builds Must be a tricky one to find Luckily the
workaround of closing and reopening isnt too difficult Just annoying This also probably makes the bug low
priority
Jeroen Custers in response to Vivek Singh Bhoj on page 52Jun 7 2013 411 PM
This issue also occurs on rev56
Matthew PickellJun 7 2013 258 PM
Thomas
Has CORS been included in a release yet
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010052
Vivek Singh Bhoj in response to Chandra Edem on page 52Jun 5 2013 601 AM
Hi Chandra
Date for Week1 Assignment has been extended till June 11
So you can give Week 1 Assignment now
Christian HufnaglJun 4 2013 543 PM
Hi Thomas
thank you for the interesting tutorial
Can you tell me whether it is possible to download the source code of the ldquoPutting it all togetherrdquovideo And if yes Where can I download itThanks
Christoph
Vivek Singh BhojJun 4 2013 1116 AM
Hi Thomas
Thanks for OpenSAP classes
Your Youtube Account also have very good exercises
IN OpenSAP Week 2 Unit 3 tutorial after assigning admin role to my user Id i am not able to see sequences
synonyms triggers under my schema or any other schema i am only able to see Column Views Procedures
Tables and Views
Though now i am able to insert data into my created table
Can you let me know how i will be able to see Sequences under my schema without removing the admin role
I am using HANA revision 52
Got to know from OpenSAP that
This is a known issue and the only way that Ive seen to fix it is to actually close the studio and open it again
then refresh the node
Cheers
Rich Heilman
SAP HANA Product Management
Will this bug be fixed in HANA ver 56
Chandra Edem in response to Thomas Jung on page 53Jun 4 2013 646 AM
Thomas
I registered for OpenSAP course Introduction to Software Development on SAP HANA on June 2 900PM
I didnt know that it is going to end WEEK1 assignment test on 632013 300PM Is there any way can take
that WEEK1 Assignment Test
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010053
Thanks
Chandra
Thomas Jung in response to Alexander Bauer on page Jun 3 2013 856 PM
SAPUI5 gets updated auutomatically when you apply HANA revisions There is no additional download or
update needed
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010010
XSJS) Core APIs of SAP HANA Extended Application Services are therefore exposed as JavaScript
functions providing easy access to the HTTP Request and Response object as well database access to
execute SQL or call SQLScript Procedures
In this simple example we can take two numbers as URL Request Parameters and multiply them together and
then return the results as text in the Response Body This is an intentionally basic example so that you can
focus on the API usage
Figure 9 - Simple XSJS Service
However the power of XSJS services comes from the ability to access the database objects but also have full
control over the body output and to further manipulate the result set after selection In this example we use
XSJS to create a text-tab delimited output in order to support a download to Excel from a user interface
function downloadExcel() var body = var query = SELECT TOP 25000 PurchaseOrderId PartnerId to_nvarchar(CompanyName) LoginName_1 CreatedAt GrossAmount FROM _SYS_BICtechedepmdbPO_HEADER_EXTENDED order by PurchaseOrderId $tracedebug(query) var conn = $dbgetConnection() var pstmt = connprepareStatement(query) var rs = pstmtexecuteQuery() body = Purchase Order Id tPartner Id tCompany Name tEmployee Responsible tCreated At tGross Amount n while(rsnext()) body += rsgetString(1)+ t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetTimestamp(5)+t+rsgetDecimal(6)+n $responsesetBody(body) $responsecontentType = applicationvndms-excel charset=utf-16le $responseheadersset(Content-Dispositionattachment filename=Excelxls) $responseheadersset(access-control-allow-origin) $responsestatus = $nethttpOK
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010011
ClosingThis blog hopefully has served to give you a small introduction to many of the new concepts and possibilities
with SAP HANA SP5 and SAP HANA Extended Application Services
Over the coming weeks we will be posting additional blogs with more advanced examples and techniques as
well how to integrate SAP HANA Extended Application Services content into additional environments Likewise
there is a substantial Developerrsquos Guide which expands on many of the concepts introduced here
It is also important to note that while SAP HANA Extended Application Services ships asproductive software (meaning customers can go live in production with it) in SAP HANA SP5 it isa controlled release initially with a special ldquoProject Solutionrdquo program in place around this newfunctionality Please refer to Service Note 1779803 for additional details on the current statusof the Project Solution This Project Solution approach is designed to provide the highest levelsof support possible to initial customers and partners who choose to develop using SAP HANAExtended Application Services It also provides a channel for feedback to Product Managementand development so that we take suggestions and ideas and quickly integrate them into futurerevisions of SAP HANA and SAP HANA Extended Application Services103803 Views Tags sapmentor hana developer code database in_memory sap_mentor hana_devcentersap_hana sapui5 hana_studio xs hde xsjs xsodata
Glen OoiDec 23 2014 345 PM
Hi Thomas
In need of your expert advice
I have a situation where I am using BO Dashboards to create my Dashboard which is consuming the data from
HANA
I have a requirement to allow the user to comment in the dashboard and it will write back to the HANA DB and
also display the comments in the Dashboard
In order for the BO Dashboard to write back to HANA DB is via web services
Is there any way i can create a WSDL URL and consume the XSJS or ODATA services in HANA
Muhammad SadiqDec 10 2014 140 PM
I need your help in writing an API(XSJS service) which will take JSON format data and inserted into HANA
database
Tarasankar Banerjee in response to Thomas Jung on page 14Nov 5 2014 852 AM
Thanks Thomas Could you give an example of how to redirect
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010012
Im facing a strange issue while trying to import weather data from several cities together The issue appears to
be connected with the content of the response object
Following is the code of the Weatherxsjs file
try
var cmd = $requestparametersget(cmd)
var body
var response
var obj
var propertyName
if(cmd === import)
var dest = $nethttpreadDestination(rootworkTara02XSTest01XSHttpTest01 weather)
var client = new $nethttpClient()
var req = new $webWebRequest($nethttpGET group
id=12750041264527127733312732941275339ampunits=metric)
clientrequest(req dest)
response = clientgetResponse()
$responsecontentType = textplain
if(responsebody)
body = responsebodyasString()
obj = JSONparse(body)
body = cmd + n n + responsestatus + n n + responsecontentType
+ n n + responsebody + n n + objgetOwnPropertyNames()
$responsesetBody(body)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010013
$responsestatus = $nethttpOK
catch(e)
$responsecontentType = textplain
$responsesetBody(emessage)
$responsestatus = $nethttpINTERNAL_SERVER_ERROR
Following is the weatherxshttpdest
host = apiopenweathermaporg
port = 80
description = my weather checker
useSSL = false
pathPrefix = data25
authType = none
useProxy = true
proxyHost = ltproxy_detailsgt
proxyPort = ltproxy_port
timeout = 0
On accessing httplthostnamegt8000rootworkTara02XSTest01XSHttpTest01Weatherxsjs
ampcmd=import I am receiving the error message BodyasString unsupported charset specified in
Content-Type header (utf8)
If the body = responsebodyasString() statement is commented out I receive the error message
JSONparse unexpected character because the responsebodyasString() itself could not work correctly
However the URL httpapiopenweathermaporgdata25group
id=12750041264527127733312732941275339 returns data correctly
I am using the same URL in my code
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010014
Could you please advise regarding this issue Thanks for your help
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 14Nov 4 2014 319 PM
gtIs it possible to read files using XS For example some configuration file kept in the server
No there is no API to read from the file system of the underlying operating system You can read the HANA
configuration ini files however because they are exposed via SQL
gtIs it possible to call a html file from the xsjs file Something likerequestgetRequestDispatcher()forward() from
JAVA servlets
In the body of the response you send back to the client your could issue a redirect
Tarasankar Banerjee in response to Tarasankar Banerjee on page 15Nov 4 2014 1034 AM
Hi Thomas
Finally got my application running It is now fetching weather data from external sites
Have two more questions
1 Is it possible to read files using XS For example some configuration file kept in the server2 Is it possible to call a html file from the xsjs file Something like
requestgetRequestDispatcher()forward() from JAVA servlets
Thanks
Regards
Tarasankar
Robert WeberNov 3 2014 1136 AM
If someone is having difficulties with the alert log full on the xsengine
you can do the same trick as for the statisticserver in oder to reset the log area see details in OSS Notes
2019148 and 1950221
The commands are then
select VOLUME_ID from m_volumes where service_name = xsengine
ALTER SYSTEM ALTER CONFIGURATION (daemonini host lthostnamegt) UNSET
(xsengineinstances) WITH RECONFIGURE
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010015
ALTER SYSTEM ALTER CONFIGURATION (topologyini system) UNSET (hostlthostnamegt xsengine)
WITH RECONFIGURE
ALTER SYSTEM ALTER CONFIGURATION (topologyini system) UNSET (volumes ltvolume_idgt) WITH
RECONFIGURE
ALTER SYSTEM ALTER CONFIGURATION (daemonini host lthostnamegt) SET (xsengineinstances) =
1 WITH RECONFIGURE
Then restart the HANA instance and after that make a full backup (and schedule the regular backup in order to
prevent this situation again)
Hope this will help someone like me -)
Have a nice day
Regards
Robert
Tarasankar Banerjee in response to Tarasankar Banerjee on page 15Nov 3 2014 1031 AM
Update
I tried to access the XS Admin console from another user and faced only the No valid Crypto error However
could still update the proxy user details and the sample application successfully ran at last The relevant roles
were provided in Granted Roles not Application Privileges Probably that was the issue earlier
I would check again with new Http Destination and Server side Java Script
Thanks a lot Thomas for all your help
Regards
Tarasankar
Tarasankar Banerjee in response to Thomas Jung on page 18Nov 3 2014 929 AM
Hi Thomas
I also tried to use the sample code from section 841 Tutorial Use the XSJS Outbound API of the HANA
Developer Guide with minor modifications (for package structure proxy settings etc) This time the destination
was found The new project structure with the sample files yahooxshttpdest and sapStockxsjs is as below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010016
However it did not bring any data The content of the response object indicated that there was Proxy
authentication issue
When I tried to check the Destination in the XS Admin Console surprisingly none of the fields are populated
and everything (except the Trust Store drop down) is disabled All these fields are supposed to be populated
as indicated in the Modeling Guide
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010017
However the User already has the following privileges
The same scenario was present for the Http Destination I prepared earlier There are couple of internal errors
at the bottom On clicking them the following list is displayed
1 Internal Error dbError(ConnectionprepareStatement) 258 - insufficient privilege Not authorized at
ptimequerycheckerquery_checkcc24182 No valid SAP Crypto configuration
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010018
It appears from various blogs that the second error (No valid SAP Crypto configuration) is related to SSL
configuration in HANA I would contact the HANA Administrator to look into this issue Of course it would be
great if you could provide some insight
However I have no clue regarding the first error Request your help and cooperation in this regard
The initial issue of not finding the HttpDestination which I created still persists
Thanks for all your help
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 18Oct 31 2014 342 PM
First of all you would never use the workspace name It isnt ever part of anything It is only the package
structure that counts The first item in your list is the only one with the correct package Off hand it looks right to
me You are supposed to supply the full package path Have you configured this HTTP Destination in the XS
Admin tool yet
Tarasankar Banerjee in response to Thomas Jung on page 18Oct 31 2014 326 PM
Updated it Thanks
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 18Oct 31 2014 313 PM
Your comment got cut off We never really get to see what your problem is
Tarasankar Banerjee in response to Thomas Jung on page 21Oct 31 2014 256 PM
Thanks Thomas
I am facing as issue while trying to use an HTTP Destination I understand that the xshttpdest and xsjs file
need to in the same folder Following is the structure of my test project
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010019
As you can see the HTTP Destination and the XSJS files are in the same folder services The workspace
name is XS_Workspace and the package structure is as follows
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010020
Now I am trying to read this destination
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010021
When I am using full package structure destination_package =
rootworkTara02XSTest01XSHttpTest01services I am receiving the
error message httpreadDestination destination not found (package
rootworkTara02XSTest01XSHttpTest01services name XSHttpDest01)
On using the workspace name destination_package = XS_Workspaceservices I am receiving the
error message User is not authorized to use destination (package XS_Workspaceservices name
XSHttpDest01)
On using destination_package = rootworkTara02XSTest01services also I am receiving the error
message User is not authorized to use destination (package rootworkTara02XSTest01services
name XSHttpDest01) Strangely the services folder is not directly under XSTest01
Lastly I deliberately gave a wrong service name destination_package = XS_Workspaceservices and
destination_name = XSHttpDest02 But even then I received the error message User is not authorized to
use destination (package XS_Workspaceservices name XSHttpDest02) not that the destination is not
found
Could you please help me to resolve this issue
Thanks a lot for your helps
Regards
Tarasankar
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010022
Thomas Jung in response to Tarasankar Banerjee on page 22Oct 30 2014 152 PM
Since SPS06 its possible to use outbound HTTP destinations and to call out to external services using XSJS
Thomas Jung in response to Tarasankar Banerjee on page 22Oct 30 2014 150 PM
gtSo when the program runs in server would it automatically consider the OS user credentials
No It doesnt automatically use anything You have to specific the user and password that you want to use for
the proxy Although many proxy servers dont require a username and password
Tarasankar Banerjee in response to Thomas Jung on page 23Oct 30 2014 707 AM
Hi Thomas
Just watched the video you shared above Thanks a lot for it It is really informative and helpful
Regards
Tarasankar
Tarasankar Banerjee in response to Tarasankar Banerjee on page 22Oct 30 2014 346 AM
Got answer for the second point SAP HANA XS Administration Tool is the place to configure Proxy settings
Regards
Tarasankar
Tarasankar Banerjee in response to Tarasankar Banerjee on page 22Oct 29 2014 314 PM
Dear Thomas
another question is that does the proxy settings in the HttpDestination refer to the OS user of the HANA
server We specify useProxy as true and authType as basic in the HttpDestination but not maintain any
user credentials So when the program runs in server would it automatically consider the OS user credentials
Thanks
Regards
Tarasankar
Tarasankar Banerjee in response to Thomas Jung on page 23Oct 29 2014 132 PM
Thanks Thomas I am currently checking this option only
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010023
My current requirement is to fetch Weather Data and Social Media data from various OData services and store
them in HANA for further analysis What might be the best way for this I am currently checking the option of
creating an XS application which would connect to the external services fetch the data and save that in HANA
using DB Connection Is this the best way Or should we try to use JAVA or some other way
Your valuable suggestions are most welcome Thanks
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 23Oct 29 2014 1256 PM
gtHowever is it possible to consume XSODATA service from XSJS instead of using DB Connection
You can via an outbound HTTP destination although I certainly wouldnt recommend it It would be rather
complex and not well performing
gtAlso is it possible to consume data from external OData services for weather data social media data etc from
XSJS
Sure with the same Outbound HTTP Connectivity
httpswwwyoutubecomwatchv=fWirvj9l7eY
Maintaining HTTP Destinations - SAP HANA Developer Guide - SAP Library
Tarasankar BanerjeeOct 29 2014 1119 AM
Dear Thomas
Thanks for the great blog
I am able to connect to Database and execute queries from XSJS service However is it possible to consume
XSODATA service from XSJS instead of using DB Connection
Also is it possible to consume data from external OData services for weather data social media data etc from
XSJS
If possible it would be great if you could provide some code sample or guidelines
Thanks
Regards
Tarasankar
Thomas Jung in response to Weiping Lu on page 24Sep 25 2014 833 AM
Please refer to service note 1849775
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010024
httpservicesapcomsapsupportnotes1849775
I believe it will address your issue
Weiping LuSep 24 2014 519 PM
Hi Tom
Great post and videos I have a tough issue calling a HANA procedure from XS takes gt 5min but from HANA
studio lt 1 min Were using Amazon AWS rev 70 and 73 Any help will be greatly appreciated
Thanks
WPL
Thomas Jung in response to Su Srikanth on page 24Aug 11 2014 253 PM
You transport XSODATA services like you would any other repository content - via a Delivery Unit
Su SrikanthAug 11 2014 750 AM
Hi Thomas
Great blog
Ive a query here - we create the odata services(andor URLs created to view in the web browser) in
development environment now if we have to transport it to the quality andor production environment how
can we do this - is the same as importexport or is there any specific way to do please help with any useful
pointers
Many thanks as always
Su
Thomas Jung in response to ARSHAD SHAIKH on page 24May 15 2014 231 PM
Ive never written any blogs on calculation views I dont cover that topic That is why I suggested you ask your
question in the proper SCN forum
Although looking at your your above SQL Statement I dont see why you couldnt do this directly in XSODATA
off of the table STATUS without the need for the calculation view or the SQLScript Procedure
ARSHAD SHAIKH in response to Thomas Jung on page 25May 15 2014 1154 AM
Hello Thomas
I am new to hana Please suggest me the blogs of you related to calculation view that calling
procedures(procedures have out parameter)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010025
I am trying to fetch the result of procedure in calc view and want to create odata service for that calculation
view
procedure code goes like this
---------------------------------------
CREATE PROCEDURE TWEETS_TODAY(OUT OP BIGINT)
language SQLSCRIPT sql security invoker default schema SOCIAL360 reads sql data as
BEGIN
SELECT COUNT() INTO OP FROM SOCIAL360STATUS WHERE CREATED_AT = CURRENT_DATE
END
calc view code goes like this
----------------------------------------
Begin Procedure Script
BEGIN
DECLARE OP BIGINT
CALL SOCIAL360TWEETS_TODAY(OPvar_out)
END End Procedure Script
Thanks
-Arshad
Thomas Jung in response to ARSHAD SHAIKH on page 25May 15 2014 944 AM
Your question seems to have no relation to the content in this blog Please consider instead asking general
HANA questions in the appropriate SCN Forum
ARSHAD SHAIKHMay 15 2014 917 AM
Hi Thomas
I want to call procedures in calculation view (procedures have out parameter)
Please suggest me step by step procedure with example and supporting documents
Thanks
ARSHAD SHAIKH
Henrique Pinto in response to Blair Krotenko on page 26Apr 16 2014 711 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010026
Hmm not really sure of that I see it but that might be because Im an employee
But the NET development partner I was working with was not enrolled in any kind of beta testing program and
they were able to download it so I guess you should as well
Make sure to go in the Installation and Upgrades menu and not the Support Packages and Patches
Go to httpservicesapcomswdc -gt Installations and Upgrades -gt Browse our Download Catalog -gt SAP In-
Memory (SAP HANA) -gt SAP HANA ADONET 10
Best regards
Henrique
Blair Krotenko in response to Henrique Pinto on page 26Apr 16 2014 656 PM
Thanks for the info Henrique but I cant find it I dont know if it is an authorization issue or do we need to be a
ramp-up customer to dl and use a beta product
Thanks
Blair
Henrique Pinto in response to Thomas Jung on page 27Apr 16 2014 614 PM
The ADONET provider is available for download in the SAP Service Marketplace (in beta edition so far)
Thomas Jung in response to Kamal Jain on page 26Apr 16 2014 514 PM
For general OData structure and syntax I find that the Odataorg website is very helpful For example on this
topic
httpwwwodataorgdocumentationodata-version-2-0uri-conventions
The syntax of a $expand query option is a comma-separated list of Navigation Properties Additionally each
Navigation Property can be followed by a forward slash and another Navigation Property to enable identifying a
multi-level relationship
The page also has some sample URLs
Kamal JainApr 16 2014 536 AM
Dear Thomas
I agree that we need to pass all the associations in the expand I tried with some of options but was not
through
Now i just tried with below syntax and able to achive Thx
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010027
httpdewdftzld025pgdevsapcorp8000DTHCPXSZPMIS_PRO_ACTUALxsodata
ZPROHEADER(PR07_000002)$expand=ZACTUZEMPD
Regards
Kamal Jain
Thomas Jung in response to Blair Krotenko on page 27Apr 15 2014 623 PM
We do plan to release an ADONET provider specific to HANA in the near future This would probably be the
best option for consumption from NET Until then I would think that ODBC is probably the next best option It
gives you generally easy portability from already existing database code You could consume OData as well
although that is more generally consumed from the UI layer itself It guess it somewhat depends upon where
you are calling the service from in your NET application
Blair KrotenkoApr 15 2014 409 PM
Hi Thomas
We are looking at consuming HANA data in a NET application and from what I can see there are 2 options -
OData and ODBC It seems to me that OData might be the better option when consuming HANA data in an XS
application while ODBC might be the better option for NET What are your thoughts Is there a paper on this
subject I havent been able to find a comparison document for this Are there any security caveats to be aware
of for these options
Thanks
Blair
Thomas Jung in response to Kamal Jain on page 27Apr 15 2014 136 PM
You have to list both associations in the expand on the URL if you want both relationships to be processed
Kamal JainApr 15 2014 1249 PM
Hi Thomas
Thx for valuable and useful information
I have an query regarding XS Odata service creation for more than 2 tables and get all the data in one
command
There is req in which service needs to be created for 3 tables to get data from all these
First table has Project ID as key second table has composite
ProjectID and Employee Id as key and third table has Employee id as
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010028
key
So if I create navigation for first 2 tables based on project id and use expand comand than its working fine and I
can see data of both the tables
Further if I add navigation for third table also as below then below expand is displaying data for first two tables
only Pls share how to use expand command in this case if possible to get all tables data based on project id
How to use navigation ZEMPD here
httpdewdftzld025pgdevsapcorp8000DTHCPXSZPMIS_PRO_ACTUALxsodata
ZPROHEADER(PR07_000002)$expand=ZACTUamp
service namespace
DTHCPXS
DTHCPDTHCPDBHCP_PROJECT_HEADER
as ZPROHEADER
navigates (PROJECT as
ZACTU)
DTHCPDTHCPDBHCPT_ZPMIS_ACTUAL
as ZACTU
navigates (EMPLOYEE as
ZEMPD )
DTHCPDTHCPDBHCP_ZPMIS_RES_MASTER
as ZEMPD
association PROJECT principal
ZPROHEADER(PROJECTID)
multiplicity 1 dependent
ZACTU(PROJECTID) multiplicity
association EMPLOYEE principal
ZACTU(EMPLOYEEID)
multiplicity 1 dependent
ZEMPD(EMPLOYEEID) multiplicity
1
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010029
Pls suggest if there is anything to add or correct in XS odata service syntax above
Regards
Kamal Jain
Vikas Madaan in response to Thomas Jung on page 29Apr 14 2014 458 PM
Thanks Thomas
Under which component
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 29Apr 14 2014 450 PM
No this isnt a known issue Ive seen Nor can I recreate the problem in my system No you cant maintain the
authentication in XSHTTPDEST itself It intentionally must be set in XSADMIN tool I can really only suggest
that you open a support ticket
Vikas MadaanApr 14 2014 431 PM
Hi Thomas
I am trying to pull data from SAP system onto HANA Database using XSJOB files I am calling RFC enabled
function modules over HTTP request It helps me replicating the real time ECC data onto HANA as well with
back ground jobs
I am facing one problem in the XSHTTPDEST file I am able to create and activate the file using studio and this
file is even visible in the web based XS administration tool But in the web based tool when i provide user and
password for basic authotication then system just clears the user id and password when i try to save This the
reason our HTTP requests are getting failed and below is the response we are getting in the response body
lthtmlgtltheadgtlttitlegtLogon Error Messagelttitlegt
Is this known issue or we are missing something Is it possible to provide user and password in the
XSHTTPDEST file Is there any particular syntax
I checked and i have the required authorizations as well develper Guide
Please help
Regards
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010030
Vikas Madaan
Abdul HakimFeb 22 2014 359 AM
Hi Thomas - Any recommended book or resource to learn and master Server Side Javascript There were
many books available in the market but as a beginner need to know the right resource book to start with and
master this stuffAlso whether SAP plan to conduct any training to teach Server Side Javascript similar to other
standard training offerings
Thanks
Hakim
Samuel Tanor-GyeduFeb 20 2014 839 AM
Thanks Thomas
I will definitely have a look at SHINE
Thomas Jung in response to gentilini andre on page 30Feb 19 2014 422 PM
Difficult to say what is wrong I several things which are different than our sample that does this You are using
a POST for instance instead of a GET However if you are gettting a 200 then I assume the service call is
correct In client side tools (like Chrome Developer Tools) you should be able to see the response object from
the call
However what I would really recommend is that you study the SHINE content (SAP HANA Interactive
Education) There is already a sample application which does this in SHINE Also it has some special
JavaScript in the UI to handle the file attachment via AXAJ call Perhaps that is the part you are missing
You can read more about SHINE here It is also included already installed in the latest version of the HANA
Developer Center trial image (SP7 based)
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
gentilini andreFeb 19 2014 325 PM
Hi Thomas
well I followed your hints but it still donacutet work
I created a xsjs File like below
function downloadExcel()
try
var body =
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010031
alert(drin)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
alert(drusse)
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount
tTax Amount tNetto Amount tCurrency n
while(rsnext())
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
catch (e)
alert(db conn funktioniert nicht)
var a = $requestparametersget(cmd)
$responsesetBody(Invalid Command +a)
switch (a)
case doex
$responsesetBody(Invalid Command +a)
alert(filedownload)
thisdownloadExcel()
break
default
$responsestatus = $nethttpINTERNAL_SERVER_ERROR
$responsesetBody(Invalid Command +a)
The Controllerjs File
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010032
doFileDownload function (oEvent)
jQuerysaprequire(sapuicommonsMessageBox)
sapuicommonsMessageBoxshow(Export Starten sapuicommonsMessageBoxIconconfirm
Information)
sapuicommonsMessageBoxconfirm(Export starteninform Confirmation)
return false
function inform(rValue)
alert (drinnnnne)
var aurl = FileDownloadxsjscmd=doex
if(rValue) If User presses Ok
alert(aurl)
jQueryajax(
url aurl
method POST
dataType json
datacmddoex
success sapuicommonsMessageBoxalert(Export wird ausgefuumlhrtConfirmation)
errorfunction onErrorCall(jqXHR textStatus errorThrown)
alert(jqXHRstatus)
sapuicommonsMessageBoxshow(jqXHRstatus
ERROR
Error in calling Service )
return
complete sapuicommonsMessageBoxalert(Export Erfolgreich
abgeschlossenConfirmation)
)
return false
else If the user presses Cancel
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010033
sapuicommonsMessageBoxalert(Vorgang abgebrochenNotification)
)
at last but not least the view
sapuijsview(zag1_ui_cv_03Index
Specifies the Controller belonging to this View
In the case that it is not implemented or that null is returned this View does not have a Controller
memberOf zag1_ui_cv_03Index
getControllerName function()
return zag1_ui_cv_03Index
Is initially called once after the Controller has been instantiated It is the place where the UI is
constructed
Since the Controller is given to this method its event handlers can be attached right away
memberOf zag1_ui_cv_03Index
createContent function(oController)
create a lite button with an icon and a text
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010034
lite true
)placeAt(btn)
oButton3attachPress(oControllerdoFileDownload)
var oButton4 = new sapuicommonsButton(
text Refresh
icon imagesrefreshjpg
lite true
press function() var data = oTableval()
if(data == )
alert(no data found)
return
print(content)
print(DatArray)
if (data = )
alert(Funzt)
JSONToCSVConvertor(data CUSTOMER AMOUNT true)
)placeAt(btn)
jQuerysaprequire(sapuitableTable)
create table control with properties
var oTable = new sapuitableTable(
width 100
rowHeight 50
title Amount per Partner
selectionMode sapuitableSelectionModeNone
)
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Company Name
)
template new sapuicommonsTextView(
text CompanyName
)
sortProperty CompanyName
))
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010035
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Partner ID
)
template new sapuicommonsTextView(
text PartnerId
)
sortProperty PartnerId
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Postal Code
textAlign sapuicoreTextAlignEnd
)
template new sapuicommonsTextView(
text PostalCode
textAlign sapuicoreTextAlignEnd
)
sortProperty PostalCode
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text City
)
template new sapuicommonsTextView(
text City
)
sortProperty City
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Purchase ID
)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010036
template new sapuicommonsTextView(
text PurchaseOrderId
)
sortProperty Currency
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Lifecycle Status
)
template new sapuicommonsTextView(
text LifecycleStatus
)
sortProperty LifecycleStatus
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Gross Amount
)
template new sapuicommonsTextView(
text GrossAmount
)
sortProperty GrossAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Tax Amount
)
template new sapuicommonsTextView(
text TaxAmount
)
sortProperty TaxAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Amount Netto
)
template new sapuicommonsTextView(
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010037
text CM_NET_Amount_001
)
sortProperty CM_NET_Amount_001
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Currency
)
template new sapuicommonsTextView(
text Currency
)
sortProperty Currency
))
var oModel = new sapuimodelodataODataModel
(httpqperiorvmcldsr8000ZAG1_WS_001ZAG1_CV_001xsodata false)
oTablesetModel(oModel)
oTablebindRows(Amount)
return oTable
)
It wonacutet call the function or better said the action of the button works fine till to the point where it should call the
xsjsfile to generate the excel-file I wondered that in the ajax part the error- success- and complete-part will
be executed at the same time and not only one of this statements The message is 200 (The request has
succeeded The information returned with the response is dependent on the method used in the request)
Maybe you can see where my mistake is or whats going wrong
Iacuteve the developer edition on cloudshare (Hana Studio rev68 Server is on SPS05)
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010038
Andreacute
Thomas Jung in response to Samuel Tanor-Gyedu on page 38Feb 19 2014 523 AM
I dont think I can help you This appears to a question about how odata4j works not about XS I have no
experience with odata4j myself
Samuel Tanor-GyeduFeb 18 2014 913 AM
Hi Thomas
I have an odata service with this endpointhttpss5hanaxshanatrialondemandcomservicesUserxsodata
I am now trying to consume it from eclipse with the odata4j libraries
This is how I get the endpoint
public UserServiceOdata(String endpointUri)
thisendpointUri = endpointUri
ODataConsumerdumpresponseHeaders(true)
consumer = ODataConsumerscreate(endpointUri)
This is my method to add a user
public User addUser(User user)
consumercreateEntity(entitySet)properties(OPropertiesint32(propertyUserId
usergetId()))properties(OPropertiesstring(propertyUserName
usergetName()))properties(OPropertiesstring(propertyUserEmail usergetEmail()))execute()
return user
When I call addUser method I get an Error
Caused by javaxxmlstreamXMLStreamException ParseError at [rowcol][78253]
Message The reference to entity sourceUrl must end with the delimiter
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010039
When I use this endpoint httpss5hanaxshanatrialondemandcomservicesUsersvc everything works fine
With the httpss5hanaxshanatrialondemandcomservicesUserxsodata I get errors
Please I would be very grateful for assistance
Thanks in advance
Regards
Samuel
Thomas Jung in response to gentilini andre on page 39Feb 18 2014 431 AM
You have a fundamental misunderstanding here You are placing server side JavaScript code in your client
side UI5 application The function downloadExcel is something you need to execute on the server It needs to
be in an XSJS file and it is called from the client side via AJAX - as a REST service not as a local function
gentilini andreFeb 17 2014 451 PM
Hello Thomas
Thank you for this great How-To Guide
Iacutem pretty new in SAPUI5 and tried your export-sample in my little trial project but it doesnacutet work
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010040
My Button for this looks like
ltcodegt
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
lite true
press function() alert(oButton3getText())
downloadExcel()
ltcodegt
and the function for this action looks like
ltcodegt
function downloadExcel()
var body =
alert(drin)
print($query)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount tTax
Amount tNetto Amount tCurrency n
while(rsnext())
if(rsnext() == )
alert($responsesetBody( Failed to retrieve data ))
alert($responsestatus = $nethttpINTERNAL_SERVER_ERROR)
else
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010041
ltcodegt
Iacutem afraid and hope that you can help me
Kind regards
Andreacute
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1246 PM
gtIs there any restriction or development limitation in the XSJSLIB files
Thats a very general question Difficult to answer without any context
Vikas Madaan in response to Thomas Jung on page 41Feb 11 2014 1245 PM
Thanks Thomas
I think we are on same page
Once quick question that came to my mind Is there any restriction or development limitation in the XSJSLIB
files
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1230 PM
gtCould please help me in understanding in more advantagesdisadvantages for both techniques
Youve summarized it pretty well already
gtbecuase i dont want to use both the approaches
Even with the CRUD support and exits in XSODATA its still pretty hard to do 100 via XSODATA There are
still valid use cases for XSJS when you need custom body custom read processing job scheduling etc Its
good to try and use XSODATA whenever possible but I wouldnt automatically exclude the use of XSJS
Vikas MadaanFeb 11 2014 1008 AM
Hi Thomas
Thanks a lot for sharing useful information through various blogs
In my current project we are evaluating use of XSOData or XSJS applications I saw your videos like the one
mentioned below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010042
httpwwwsaphanacomdocsDOC-4376
Want i understood from various blog is this
From SP7 we can write exsits in the OData services and it is very easy to consume at the client side just like
any REST base service and from my understanding it is Scalable as well I would love to use XSOData always
becuase development effort is very less compare to XSJS and it is very easy to rampup the team on OData
related development objects
XSJS were as provide more control becuase of server side scripting becuase it allows development on the
server side using JavaScript Core APIs of SAP HANA Extended Application Services are therefore exposed
as JavaScript functions providing easy access to the HTTP Request and Response object as well database
access to execute SQL or call SQLScript Procedures It provide us control over the body format and and URL
parameter definition
Could please help me in understanding in more advantagesdisadvantages for both techniques
I am very keen to understand and also explain the same to team members becuase i dont want to use both the
approaches and even sometimes customer can also ask the same to us
Also If we are on SP6 then from my understanding XSJS provides us more capability in terms of complex
application Corrent me If i am wrong
Thanks
Regards
Vikas Madaan
Thomas Jung in response to Raghuveer Phull on page 42Feb 5 2014 312 PM
Yes there are videos on the CRUD features of XSODATA which were new in SP6
For more on CRUD support in SP6 see this video
oData CreateUpdateDelete Support in SAP HANA SPS6
For the extended support for XSJS exits in SP7 see this video
SAP HANA SPS 07 XSODATA Exits in XSJS
Raghuveer PhullFeb 5 2014 122 AM
Do you have an exampledocumentationvideo where you can write a service which will populate Hana DB
What I am asking for is a way for my external script to populate the DB tables i have created in Hana DB
Thomas Jung in response to reda miraoui on page 43Jan 29 2014 411 PM
The source code for the examples shown here are shipped as part of SHINE (SAP HANA Interactive
Education)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010043
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Vivek Singh Bhoj in response to reda miraoui on page 43Jan 29 2014 352 PM
Hi Reda
You can import Shine Content in HANA and then check all these source codes
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Regards
Vivek
reda miraoui in response to Thomas Jung on page Jan 29 2014 344 PM
Hey Thomas
Is it possible to download source code of your project from this HANA tutorial
Thanks
Reda
Thomas Jung in response to Abdul Hakim on page 43Nov 21 2013 1133 PM
Yes River can be used as an alternative and when activated it will generate Server Side JavaScript andor
SQLScript
Abdul Hakim in response to Thomas Jung on page 44Nov 21 2013 747 PM
Hi Thomas - Was going through blog regarding River (RDL)Just a question on this
When you say Programming language for HANA native development is Server side Javascript SQL SQL
ScriptOnce RDL is rolled out whether RDL can be used for native application development instead of Server
side Java script SQL SQL Script I am very much new to this stuff so appreciate if you can also help on
how to get started with Server Side Java script SQL SQL Script for HANA
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 30 2013 750 AM
Hi Thomas
Thanks for your response I am talking about more content on shine
thanks
Ashutosh
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010044
Baskar Gopalakrishnan in response to Thomas Jung on page 44Oct 30 2013 1249 AM
Hi Thomas
Im a SAP PI Middleware consultantSAP topic leader in XIPI heavily worked on Java related
Netweaver stack I have knowledge in ABAP but not worked heavily in abap I have enrolled your sap hana
native application development course I feel very interesting I did work heavily in java and javascript projects
using eclipse development tool Do you think if I invest my time in just native hana development and proceed
in HANA field is a good step I dont have BW experience either
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 819 PM
Thanks for the clarification Much appreciated
Thomas Jung in response to Abdul Hakim on page 44Oct 29 2013 120 PM
gtABAP Close to HANA means whether we can expect a similar 2 tier architecture similar to HANA XS in the
future or what does that mean
No it doesnt mean that ABAP will become a 2 tier architecture We will not move the ABAP VMKernel into
HANA itself It will remain a separate application server At least for the current plansforeseeable future What
he was referring to was bringing the programming models closer For instance the new 740 SP5 feature that
allows you to write SQLScript directly within an ABAP class method
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 650 AM
Thomas - Thanks for the clarificationMuch appreciatedI was listening to ABAP on HANA session by
Thorsten Schneider this year Teched and he was mentioning that SAP Plans to bring ABAP very close to
HANA in the coming future but not much details have been discussed in the sessionABAP Close to HANA
means whether we can expect a similar 2 tier architecture similar to HANA XS in the future or what does that
mean
Thanks
Hakim
Thomas Jung in response to Abdul Hakim on page 45Oct 28 2013 703 PM
gt whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the option is
recommended by SAP then kindly share the pros and cons of each of the item
Taken from the TechEd CD103 session slides
Guidance
bulluse ABAP for optimization of existing progams (in context of SAP Business Suite or BW)
bullconsider HANA Native Development for development of new applications which will solely run on SAP HANA
bullcombine ABAP and HANA Native Development to enrich existing applications (eg SAP HANA Live Fiori)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010045
ABAP
bullapplications follow 3-tier architecture
bullABAP is in general database agnostic but with release 74 optimized for SAP HANA
bullProgramming language ABAP ABAP OO with the option to use SAP HANA features
bullIDE eclipse-based ABAP Development Tools
HANA Native Development
bullapplications follow 2-tier architecture
bullHANA Native Development is SAP HANA specific and embedded in the database
bullProgramming language River server-side JavaScript SQLSQLScript
bullIDE eclipse-based SAP HANA Studio + web IDE
Thomas Jung in response to ashutosh dixit on page 45Oct 28 2013 701 PM
gtIs there any more demos for the SHINE
Im not exactly sure what you mean by that We are building additional content for SHINE that will be delivered
in SP7
Abdul HakimOct 28 2013 326 PM
Thomas - Let us say a customer is running SAP Netweaver 74 ABAP with HANA DB and they have HANA
extended service as wellIf the customer wants to do new developments then what is the recommendation
from SAP ie whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the
option is recommended by SAP then kindly share the pros and cons of each of the item (SAP Netweaver 74
ABAP Vs SAP HANA XS)
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 28 2013 221 PM
Hi Thomas
Thanks a lot for your its working now
Is there any more demos for the SHINE
Thanks
Ashutosh
Thomas Jung in response to ashutosh dixit on page 46Oct 25 2013 809 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010046
As this content is now standard in SP6 as part of SHINE (SAP HANA INteractive Education) there also some
setup instructions on helpsapcom
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Basic points to check - have you generated the synonyms in the data generator Ran the data generator to
create some data Have the role assigned Added client 001 to your user profile
ashutosh dixitOct 24 2013 130 PM
Hi Thomas
Amazing blog - once again Thomas thanks
I have been following you for many days attended your OPEN SAP course also
That was an amazing course for new learner like me
One of our client is looking forward for XS based search Application identical to what you have created in your
DEMO
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010047
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010048
But I am not able to fetch the data on blank HTML page is coming with no data
If there is any step by step document related to this please help in getting that
Any help will be highly appreciated
Thanks
Ashutosh
Naveen KumarSep 26 2013 1130 AM
Good Document
Heber FabianoAug 27 2013 323 PM
Great content as always Keep sharing with us
Thomas Jung in response to Orel Stringa on page 48Aug 27 2013 147 PM
This is currently not possible The CORS support is for all origins We dont yet have the feature to maintain a
whitelist of CORS origins
Orel Stringa in response to Thomas Jung on page Aug 27 2013 801 AM
Hi Thomas
nice to see that SAP has made it possible with SP6 to specify cross origin resource sharing (CORS) support
via the xsaccess file SP6 HANA development guide has example of how to specify CORS support
I have build an XS application and would like to serve SAPUI5 on a diffhost than XSHANA
How can I specify that I would like to allow cross origin access restricted to certain domain(s) only
Is there a special keyword syntax for specifying that
Thank yoi
Orel
Vijay UthayakumarAug 27 2013 131 AM
Highly informative amp digestible Fantastic work
Jerry WangAug 1 2013 955 AM
Hi Tomas
Thank you
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010049
Jerry
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 644 PM
JSLint checks are very strict and often produce syntax errors for items that just stylistic and wont actually
cause an error upon activation or runtime You can either ignore the JSLint errors or deactivate JSLint for this
project in these cases However it might also be an indication that the JavaScript code you are trying to import
isnt compatible with Strict mode
httpsdevelopermozillaorgen-USdocsWebJavaScriptReferenceFunctions_and_function_scope
Strict_mode
Milan Vrozina in response to Thomas Jung on page 49Jul 21 2013 624 PM
Thanks for clarification I thought there would be some kind of import
But anyway in case of this specific library I have some problems with JSLint validation when I do cut and paste
of the original code
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 343 PM
What kind of problem are you having using this library Strict mode JavaScript which doesnt try to access the
DOM Window or other client side specific objects should work in Server Side XSJS Generally if you have a
library you just cut and paste into your XSJS or an XSJSLIB file and then call the functions from your code
Milan VrozinaJul 21 2013 339 PM
Hello
first and foremost thank you for perfect openSAP classes related to HANA development and for this blog as
well
I have one question related to server-side javascript You mentioned in course that is possible to use 3rd party
libraries or reuse 3rd party code But I cant find a possible way how to import 3rd party javascript library -as
is- to server and use it For example I would like to use JSZip library to zip some file before sending it to client
from xsjs application Is that possible Thank you
Chandrashekhar MahajanJul 3 2013 734 PM
This is excellent blog Now HANA XS is very much clear to me
Mohan krishnaJul 1 2013 144 PM
WOW - great blog Thomas This will be very helpful in understanding SAP hana Good Job
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010050
Abdul Hakim in response to Thomas Jung on page 50Jun 27 2013 833 PM
Thanks for the clarification
Thomas Jung in response to Abdul Hakim on page 50Jun 27 2013 659 PM
HANA Extended Application Services uses SQLScript and JavaScript as its two primary programming
languages
gtwhether the current SAP Business suite based on ABAP will be completely migrated to HANA service
No The Business Suite already runs on HANA but still via the ABAP application server It will continue to
leverage HANA via a combination of enhancements to ABAP and utilizing some of the technologies described
in this blog
gtAlso whether ABAP can be used to built application in HANA extended services
No There is no ABAP language container in HANA Extended Application Services
Abdul HakimJun 27 2013 405 PM
Hi Thomas - What is the programming language used for HANA Extended application services
As HANA is more than a database ie application platform by itself and as you mentioned that more and more
applications will be built on HANA i have question as how the future SAP ERP system looks likewhether the
current SAP Business suite based on ABAP will be completely migrated to HANA service in the future or SAP
ABAP server will continue to evolve and receive focus investment from SAP Also whether ABAP can be used
to built application in HANA extended services Your thoughts
Thanks
Abdul Hakim
Thomas Jung in response to Ravindra Channe on page 50Jun 11 2013 830 PM
Yes it is still planned However we are still a couple of weeks away and Ive not seen the final installers to say
for certain its there
Ravindra ChanneJun 11 2013 815 PM
Hi Thomas
Thanks for a wonderful and very informative blog Is there any update on 32 bit REGI file
Is it expected along with SPS6
Regards
Ravi
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010051
Thomas Jung in response to Amanda Rzepka on page Jun 7 2013 942 PM
gtCan the XS Services be used in a BW on HANA Scenario
Yes XS is part of ALL HANA systems You should check and make sure you are licensed for direct access to
the underlying HANA instance however
Thomas Jung in response to Holger Schimanski on page Jun 7 2013 941 PM
gtIs there a similar library which could be used in XS Engine
The XSODATA development object is similar We also have higher level frameworks for XMLA and Search
Services (InA) You can expect more such high level frameworks to be added to the HANA Extended
Application Services in the future
Thomas Jung in response to Manav Mehra on page Jun 7 2013 939 PM
Have you used something like the Chrome developer tools to see see if you are getting any client side
javascript errors or to see if the request to your xsodata service is successful
Thomas Jung in response to Christian Hufnagl on page 52Jun 7 2013 938 PM
It will ship as non-automatic content in SPS6 (all systems will have it and it just needs to be imported) The
delivery units are also part of this weeks updates to the Cloudshare and AWS developer center images They
are also available for download as part of the content of the openSAP course
Thomas Jung in response to Matthew Pickell on page 51Jun 7 2013 937 PM
CORS support will come with SPS6 at the end of June
Thomas Jung in response to Jeroen Custers on page 51Jun 7 2013 936 PM
gtWill this bug be fixed in HANA ver 56
Personally Ive still experienced this bug in SPS6 internal builds Must be a tricky one to find Luckily the
workaround of closing and reopening isnt too difficult Just annoying This also probably makes the bug low
priority
Jeroen Custers in response to Vivek Singh Bhoj on page 52Jun 7 2013 411 PM
This issue also occurs on rev56
Matthew PickellJun 7 2013 258 PM
Thomas
Has CORS been included in a release yet
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010052
Vivek Singh Bhoj in response to Chandra Edem on page 52Jun 5 2013 601 AM
Hi Chandra
Date for Week1 Assignment has been extended till June 11
So you can give Week 1 Assignment now
Christian HufnaglJun 4 2013 543 PM
Hi Thomas
thank you for the interesting tutorial
Can you tell me whether it is possible to download the source code of the ldquoPutting it all togetherrdquovideo And if yes Where can I download itThanks
Christoph
Vivek Singh BhojJun 4 2013 1116 AM
Hi Thomas
Thanks for OpenSAP classes
Your Youtube Account also have very good exercises
IN OpenSAP Week 2 Unit 3 tutorial after assigning admin role to my user Id i am not able to see sequences
synonyms triggers under my schema or any other schema i am only able to see Column Views Procedures
Tables and Views
Though now i am able to insert data into my created table
Can you let me know how i will be able to see Sequences under my schema without removing the admin role
I am using HANA revision 52
Got to know from OpenSAP that
This is a known issue and the only way that Ive seen to fix it is to actually close the studio and open it again
then refresh the node
Cheers
Rich Heilman
SAP HANA Product Management
Will this bug be fixed in HANA ver 56
Chandra Edem in response to Thomas Jung on page 53Jun 4 2013 646 AM
Thomas
I registered for OpenSAP course Introduction to Software Development on SAP HANA on June 2 900PM
I didnt know that it is going to end WEEK1 assignment test on 632013 300PM Is there any way can take
that WEEK1 Assignment Test
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010053
Thanks
Chandra
Thomas Jung in response to Alexander Bauer on page Jun 3 2013 856 PM
SAPUI5 gets updated auutomatically when you apply HANA revisions There is no additional download or
update needed
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010011
ClosingThis blog hopefully has served to give you a small introduction to many of the new concepts and possibilities
with SAP HANA SP5 and SAP HANA Extended Application Services
Over the coming weeks we will be posting additional blogs with more advanced examples and techniques as
well how to integrate SAP HANA Extended Application Services content into additional environments Likewise
there is a substantial Developerrsquos Guide which expands on many of the concepts introduced here
It is also important to note that while SAP HANA Extended Application Services ships asproductive software (meaning customers can go live in production with it) in SAP HANA SP5 it isa controlled release initially with a special ldquoProject Solutionrdquo program in place around this newfunctionality Please refer to Service Note 1779803 for additional details on the current statusof the Project Solution This Project Solution approach is designed to provide the highest levelsof support possible to initial customers and partners who choose to develop using SAP HANAExtended Application Services It also provides a channel for feedback to Product Managementand development so that we take suggestions and ideas and quickly integrate them into futurerevisions of SAP HANA and SAP HANA Extended Application Services103803 Views Tags sapmentor hana developer code database in_memory sap_mentor hana_devcentersap_hana sapui5 hana_studio xs hde xsjs xsodata
Glen OoiDec 23 2014 345 PM
Hi Thomas
In need of your expert advice
I have a situation where I am using BO Dashboards to create my Dashboard which is consuming the data from
HANA
I have a requirement to allow the user to comment in the dashboard and it will write back to the HANA DB and
also display the comments in the Dashboard
In order for the BO Dashboard to write back to HANA DB is via web services
Is there any way i can create a WSDL URL and consume the XSJS or ODATA services in HANA
Muhammad SadiqDec 10 2014 140 PM
I need your help in writing an API(XSJS service) which will take JSON format data and inserted into HANA
database
Tarasankar Banerjee in response to Thomas Jung on page 14Nov 5 2014 852 AM
Thanks Thomas Could you give an example of how to redirect
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010012
Im facing a strange issue while trying to import weather data from several cities together The issue appears to
be connected with the content of the response object
Following is the code of the Weatherxsjs file
try
var cmd = $requestparametersget(cmd)
var body
var response
var obj
var propertyName
if(cmd === import)
var dest = $nethttpreadDestination(rootworkTara02XSTest01XSHttpTest01 weather)
var client = new $nethttpClient()
var req = new $webWebRequest($nethttpGET group
id=12750041264527127733312732941275339ampunits=metric)
clientrequest(req dest)
response = clientgetResponse()
$responsecontentType = textplain
if(responsebody)
body = responsebodyasString()
obj = JSONparse(body)
body = cmd + n n + responsestatus + n n + responsecontentType
+ n n + responsebody + n n + objgetOwnPropertyNames()
$responsesetBody(body)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010013
$responsestatus = $nethttpOK
catch(e)
$responsecontentType = textplain
$responsesetBody(emessage)
$responsestatus = $nethttpINTERNAL_SERVER_ERROR
Following is the weatherxshttpdest
host = apiopenweathermaporg
port = 80
description = my weather checker
useSSL = false
pathPrefix = data25
authType = none
useProxy = true
proxyHost = ltproxy_detailsgt
proxyPort = ltproxy_port
timeout = 0
On accessing httplthostnamegt8000rootworkTara02XSTest01XSHttpTest01Weatherxsjs
ampcmd=import I am receiving the error message BodyasString unsupported charset specified in
Content-Type header (utf8)
If the body = responsebodyasString() statement is commented out I receive the error message
JSONparse unexpected character because the responsebodyasString() itself could not work correctly
However the URL httpapiopenweathermaporgdata25group
id=12750041264527127733312732941275339 returns data correctly
I am using the same URL in my code
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010014
Could you please advise regarding this issue Thanks for your help
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 14Nov 4 2014 319 PM
gtIs it possible to read files using XS For example some configuration file kept in the server
No there is no API to read from the file system of the underlying operating system You can read the HANA
configuration ini files however because they are exposed via SQL
gtIs it possible to call a html file from the xsjs file Something likerequestgetRequestDispatcher()forward() from
JAVA servlets
In the body of the response you send back to the client your could issue a redirect
Tarasankar Banerjee in response to Tarasankar Banerjee on page 15Nov 4 2014 1034 AM
Hi Thomas
Finally got my application running It is now fetching weather data from external sites
Have two more questions
1 Is it possible to read files using XS For example some configuration file kept in the server2 Is it possible to call a html file from the xsjs file Something like
requestgetRequestDispatcher()forward() from JAVA servlets
Thanks
Regards
Tarasankar
Robert WeberNov 3 2014 1136 AM
If someone is having difficulties with the alert log full on the xsengine
you can do the same trick as for the statisticserver in oder to reset the log area see details in OSS Notes
2019148 and 1950221
The commands are then
select VOLUME_ID from m_volumes where service_name = xsengine
ALTER SYSTEM ALTER CONFIGURATION (daemonini host lthostnamegt) UNSET
(xsengineinstances) WITH RECONFIGURE
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010015
ALTER SYSTEM ALTER CONFIGURATION (topologyini system) UNSET (hostlthostnamegt xsengine)
WITH RECONFIGURE
ALTER SYSTEM ALTER CONFIGURATION (topologyini system) UNSET (volumes ltvolume_idgt) WITH
RECONFIGURE
ALTER SYSTEM ALTER CONFIGURATION (daemonini host lthostnamegt) SET (xsengineinstances) =
1 WITH RECONFIGURE
Then restart the HANA instance and after that make a full backup (and schedule the regular backup in order to
prevent this situation again)
Hope this will help someone like me -)
Have a nice day
Regards
Robert
Tarasankar Banerjee in response to Tarasankar Banerjee on page 15Nov 3 2014 1031 AM
Update
I tried to access the XS Admin console from another user and faced only the No valid Crypto error However
could still update the proxy user details and the sample application successfully ran at last The relevant roles
were provided in Granted Roles not Application Privileges Probably that was the issue earlier
I would check again with new Http Destination and Server side Java Script
Thanks a lot Thomas for all your help
Regards
Tarasankar
Tarasankar Banerjee in response to Thomas Jung on page 18Nov 3 2014 929 AM
Hi Thomas
I also tried to use the sample code from section 841 Tutorial Use the XSJS Outbound API of the HANA
Developer Guide with minor modifications (for package structure proxy settings etc) This time the destination
was found The new project structure with the sample files yahooxshttpdest and sapStockxsjs is as below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010016
However it did not bring any data The content of the response object indicated that there was Proxy
authentication issue
When I tried to check the Destination in the XS Admin Console surprisingly none of the fields are populated
and everything (except the Trust Store drop down) is disabled All these fields are supposed to be populated
as indicated in the Modeling Guide
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010017
However the User already has the following privileges
The same scenario was present for the Http Destination I prepared earlier There are couple of internal errors
at the bottom On clicking them the following list is displayed
1 Internal Error dbError(ConnectionprepareStatement) 258 - insufficient privilege Not authorized at
ptimequerycheckerquery_checkcc24182 No valid SAP Crypto configuration
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010018
It appears from various blogs that the second error (No valid SAP Crypto configuration) is related to SSL
configuration in HANA I would contact the HANA Administrator to look into this issue Of course it would be
great if you could provide some insight
However I have no clue regarding the first error Request your help and cooperation in this regard
The initial issue of not finding the HttpDestination which I created still persists
Thanks for all your help
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 18Oct 31 2014 342 PM
First of all you would never use the workspace name It isnt ever part of anything It is only the package
structure that counts The first item in your list is the only one with the correct package Off hand it looks right to
me You are supposed to supply the full package path Have you configured this HTTP Destination in the XS
Admin tool yet
Tarasankar Banerjee in response to Thomas Jung on page 18Oct 31 2014 326 PM
Updated it Thanks
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 18Oct 31 2014 313 PM
Your comment got cut off We never really get to see what your problem is
Tarasankar Banerjee in response to Thomas Jung on page 21Oct 31 2014 256 PM
Thanks Thomas
I am facing as issue while trying to use an HTTP Destination I understand that the xshttpdest and xsjs file
need to in the same folder Following is the structure of my test project
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010019
As you can see the HTTP Destination and the XSJS files are in the same folder services The workspace
name is XS_Workspace and the package structure is as follows
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010020
Now I am trying to read this destination
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010021
When I am using full package structure destination_package =
rootworkTara02XSTest01XSHttpTest01services I am receiving the
error message httpreadDestination destination not found (package
rootworkTara02XSTest01XSHttpTest01services name XSHttpDest01)
On using the workspace name destination_package = XS_Workspaceservices I am receiving the
error message User is not authorized to use destination (package XS_Workspaceservices name
XSHttpDest01)
On using destination_package = rootworkTara02XSTest01services also I am receiving the error
message User is not authorized to use destination (package rootworkTara02XSTest01services
name XSHttpDest01) Strangely the services folder is not directly under XSTest01
Lastly I deliberately gave a wrong service name destination_package = XS_Workspaceservices and
destination_name = XSHttpDest02 But even then I received the error message User is not authorized to
use destination (package XS_Workspaceservices name XSHttpDest02) not that the destination is not
found
Could you please help me to resolve this issue
Thanks a lot for your helps
Regards
Tarasankar
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010022
Thomas Jung in response to Tarasankar Banerjee on page 22Oct 30 2014 152 PM
Since SPS06 its possible to use outbound HTTP destinations and to call out to external services using XSJS
Thomas Jung in response to Tarasankar Banerjee on page 22Oct 30 2014 150 PM
gtSo when the program runs in server would it automatically consider the OS user credentials
No It doesnt automatically use anything You have to specific the user and password that you want to use for
the proxy Although many proxy servers dont require a username and password
Tarasankar Banerjee in response to Thomas Jung on page 23Oct 30 2014 707 AM
Hi Thomas
Just watched the video you shared above Thanks a lot for it It is really informative and helpful
Regards
Tarasankar
Tarasankar Banerjee in response to Tarasankar Banerjee on page 22Oct 30 2014 346 AM
Got answer for the second point SAP HANA XS Administration Tool is the place to configure Proxy settings
Regards
Tarasankar
Tarasankar Banerjee in response to Tarasankar Banerjee on page 22Oct 29 2014 314 PM
Dear Thomas
another question is that does the proxy settings in the HttpDestination refer to the OS user of the HANA
server We specify useProxy as true and authType as basic in the HttpDestination but not maintain any
user credentials So when the program runs in server would it automatically consider the OS user credentials
Thanks
Regards
Tarasankar
Tarasankar Banerjee in response to Thomas Jung on page 23Oct 29 2014 132 PM
Thanks Thomas I am currently checking this option only
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010023
My current requirement is to fetch Weather Data and Social Media data from various OData services and store
them in HANA for further analysis What might be the best way for this I am currently checking the option of
creating an XS application which would connect to the external services fetch the data and save that in HANA
using DB Connection Is this the best way Or should we try to use JAVA or some other way
Your valuable suggestions are most welcome Thanks
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 23Oct 29 2014 1256 PM
gtHowever is it possible to consume XSODATA service from XSJS instead of using DB Connection
You can via an outbound HTTP destination although I certainly wouldnt recommend it It would be rather
complex and not well performing
gtAlso is it possible to consume data from external OData services for weather data social media data etc from
XSJS
Sure with the same Outbound HTTP Connectivity
httpswwwyoutubecomwatchv=fWirvj9l7eY
Maintaining HTTP Destinations - SAP HANA Developer Guide - SAP Library
Tarasankar BanerjeeOct 29 2014 1119 AM
Dear Thomas
Thanks for the great blog
I am able to connect to Database and execute queries from XSJS service However is it possible to consume
XSODATA service from XSJS instead of using DB Connection
Also is it possible to consume data from external OData services for weather data social media data etc from
XSJS
If possible it would be great if you could provide some code sample or guidelines
Thanks
Regards
Tarasankar
Thomas Jung in response to Weiping Lu on page 24Sep 25 2014 833 AM
Please refer to service note 1849775
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010024
httpservicesapcomsapsupportnotes1849775
I believe it will address your issue
Weiping LuSep 24 2014 519 PM
Hi Tom
Great post and videos I have a tough issue calling a HANA procedure from XS takes gt 5min but from HANA
studio lt 1 min Were using Amazon AWS rev 70 and 73 Any help will be greatly appreciated
Thanks
WPL
Thomas Jung in response to Su Srikanth on page 24Aug 11 2014 253 PM
You transport XSODATA services like you would any other repository content - via a Delivery Unit
Su SrikanthAug 11 2014 750 AM
Hi Thomas
Great blog
Ive a query here - we create the odata services(andor URLs created to view in the web browser) in
development environment now if we have to transport it to the quality andor production environment how
can we do this - is the same as importexport or is there any specific way to do please help with any useful
pointers
Many thanks as always
Su
Thomas Jung in response to ARSHAD SHAIKH on page 24May 15 2014 231 PM
Ive never written any blogs on calculation views I dont cover that topic That is why I suggested you ask your
question in the proper SCN forum
Although looking at your your above SQL Statement I dont see why you couldnt do this directly in XSODATA
off of the table STATUS without the need for the calculation view or the SQLScript Procedure
ARSHAD SHAIKH in response to Thomas Jung on page 25May 15 2014 1154 AM
Hello Thomas
I am new to hana Please suggest me the blogs of you related to calculation view that calling
procedures(procedures have out parameter)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010025
I am trying to fetch the result of procedure in calc view and want to create odata service for that calculation
view
procedure code goes like this
---------------------------------------
CREATE PROCEDURE TWEETS_TODAY(OUT OP BIGINT)
language SQLSCRIPT sql security invoker default schema SOCIAL360 reads sql data as
BEGIN
SELECT COUNT() INTO OP FROM SOCIAL360STATUS WHERE CREATED_AT = CURRENT_DATE
END
calc view code goes like this
----------------------------------------
Begin Procedure Script
BEGIN
DECLARE OP BIGINT
CALL SOCIAL360TWEETS_TODAY(OPvar_out)
END End Procedure Script
Thanks
-Arshad
Thomas Jung in response to ARSHAD SHAIKH on page 25May 15 2014 944 AM
Your question seems to have no relation to the content in this blog Please consider instead asking general
HANA questions in the appropriate SCN Forum
ARSHAD SHAIKHMay 15 2014 917 AM
Hi Thomas
I want to call procedures in calculation view (procedures have out parameter)
Please suggest me step by step procedure with example and supporting documents
Thanks
ARSHAD SHAIKH
Henrique Pinto in response to Blair Krotenko on page 26Apr 16 2014 711 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010026
Hmm not really sure of that I see it but that might be because Im an employee
But the NET development partner I was working with was not enrolled in any kind of beta testing program and
they were able to download it so I guess you should as well
Make sure to go in the Installation and Upgrades menu and not the Support Packages and Patches
Go to httpservicesapcomswdc -gt Installations and Upgrades -gt Browse our Download Catalog -gt SAP In-
Memory (SAP HANA) -gt SAP HANA ADONET 10
Best regards
Henrique
Blair Krotenko in response to Henrique Pinto on page 26Apr 16 2014 656 PM
Thanks for the info Henrique but I cant find it I dont know if it is an authorization issue or do we need to be a
ramp-up customer to dl and use a beta product
Thanks
Blair
Henrique Pinto in response to Thomas Jung on page 27Apr 16 2014 614 PM
The ADONET provider is available for download in the SAP Service Marketplace (in beta edition so far)
Thomas Jung in response to Kamal Jain on page 26Apr 16 2014 514 PM
For general OData structure and syntax I find that the Odataorg website is very helpful For example on this
topic
httpwwwodataorgdocumentationodata-version-2-0uri-conventions
The syntax of a $expand query option is a comma-separated list of Navigation Properties Additionally each
Navigation Property can be followed by a forward slash and another Navigation Property to enable identifying a
multi-level relationship
The page also has some sample URLs
Kamal JainApr 16 2014 536 AM
Dear Thomas
I agree that we need to pass all the associations in the expand I tried with some of options but was not
through
Now i just tried with below syntax and able to achive Thx
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010027
httpdewdftzld025pgdevsapcorp8000DTHCPXSZPMIS_PRO_ACTUALxsodata
ZPROHEADER(PR07_000002)$expand=ZACTUZEMPD
Regards
Kamal Jain
Thomas Jung in response to Blair Krotenko on page 27Apr 15 2014 623 PM
We do plan to release an ADONET provider specific to HANA in the near future This would probably be the
best option for consumption from NET Until then I would think that ODBC is probably the next best option It
gives you generally easy portability from already existing database code You could consume OData as well
although that is more generally consumed from the UI layer itself It guess it somewhat depends upon where
you are calling the service from in your NET application
Blair KrotenkoApr 15 2014 409 PM
Hi Thomas
We are looking at consuming HANA data in a NET application and from what I can see there are 2 options -
OData and ODBC It seems to me that OData might be the better option when consuming HANA data in an XS
application while ODBC might be the better option for NET What are your thoughts Is there a paper on this
subject I havent been able to find a comparison document for this Are there any security caveats to be aware
of for these options
Thanks
Blair
Thomas Jung in response to Kamal Jain on page 27Apr 15 2014 136 PM
You have to list both associations in the expand on the URL if you want both relationships to be processed
Kamal JainApr 15 2014 1249 PM
Hi Thomas
Thx for valuable and useful information
I have an query regarding XS Odata service creation for more than 2 tables and get all the data in one
command
There is req in which service needs to be created for 3 tables to get data from all these
First table has Project ID as key second table has composite
ProjectID and Employee Id as key and third table has Employee id as
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010028
key
So if I create navigation for first 2 tables based on project id and use expand comand than its working fine and I
can see data of both the tables
Further if I add navigation for third table also as below then below expand is displaying data for first two tables
only Pls share how to use expand command in this case if possible to get all tables data based on project id
How to use navigation ZEMPD here
httpdewdftzld025pgdevsapcorp8000DTHCPXSZPMIS_PRO_ACTUALxsodata
ZPROHEADER(PR07_000002)$expand=ZACTUamp
service namespace
DTHCPXS
DTHCPDTHCPDBHCP_PROJECT_HEADER
as ZPROHEADER
navigates (PROJECT as
ZACTU)
DTHCPDTHCPDBHCPT_ZPMIS_ACTUAL
as ZACTU
navigates (EMPLOYEE as
ZEMPD )
DTHCPDTHCPDBHCP_ZPMIS_RES_MASTER
as ZEMPD
association PROJECT principal
ZPROHEADER(PROJECTID)
multiplicity 1 dependent
ZACTU(PROJECTID) multiplicity
association EMPLOYEE principal
ZACTU(EMPLOYEEID)
multiplicity 1 dependent
ZEMPD(EMPLOYEEID) multiplicity
1
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010029
Pls suggest if there is anything to add or correct in XS odata service syntax above
Regards
Kamal Jain
Vikas Madaan in response to Thomas Jung on page 29Apr 14 2014 458 PM
Thanks Thomas
Under which component
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 29Apr 14 2014 450 PM
No this isnt a known issue Ive seen Nor can I recreate the problem in my system No you cant maintain the
authentication in XSHTTPDEST itself It intentionally must be set in XSADMIN tool I can really only suggest
that you open a support ticket
Vikas MadaanApr 14 2014 431 PM
Hi Thomas
I am trying to pull data from SAP system onto HANA Database using XSJOB files I am calling RFC enabled
function modules over HTTP request It helps me replicating the real time ECC data onto HANA as well with
back ground jobs
I am facing one problem in the XSHTTPDEST file I am able to create and activate the file using studio and this
file is even visible in the web based XS administration tool But in the web based tool when i provide user and
password for basic authotication then system just clears the user id and password when i try to save This the
reason our HTTP requests are getting failed and below is the response we are getting in the response body
lthtmlgtltheadgtlttitlegtLogon Error Messagelttitlegt
Is this known issue or we are missing something Is it possible to provide user and password in the
XSHTTPDEST file Is there any particular syntax
I checked and i have the required authorizations as well develper Guide
Please help
Regards
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010030
Vikas Madaan
Abdul HakimFeb 22 2014 359 AM
Hi Thomas - Any recommended book or resource to learn and master Server Side Javascript There were
many books available in the market but as a beginner need to know the right resource book to start with and
master this stuffAlso whether SAP plan to conduct any training to teach Server Side Javascript similar to other
standard training offerings
Thanks
Hakim
Samuel Tanor-GyeduFeb 20 2014 839 AM
Thanks Thomas
I will definitely have a look at SHINE
Thomas Jung in response to gentilini andre on page 30Feb 19 2014 422 PM
Difficult to say what is wrong I several things which are different than our sample that does this You are using
a POST for instance instead of a GET However if you are gettting a 200 then I assume the service call is
correct In client side tools (like Chrome Developer Tools) you should be able to see the response object from
the call
However what I would really recommend is that you study the SHINE content (SAP HANA Interactive
Education) There is already a sample application which does this in SHINE Also it has some special
JavaScript in the UI to handle the file attachment via AXAJ call Perhaps that is the part you are missing
You can read more about SHINE here It is also included already installed in the latest version of the HANA
Developer Center trial image (SP7 based)
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
gentilini andreFeb 19 2014 325 PM
Hi Thomas
well I followed your hints but it still donacutet work
I created a xsjs File like below
function downloadExcel()
try
var body =
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010031
alert(drin)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
alert(drusse)
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount
tTax Amount tNetto Amount tCurrency n
while(rsnext())
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
catch (e)
alert(db conn funktioniert nicht)
var a = $requestparametersget(cmd)
$responsesetBody(Invalid Command +a)
switch (a)
case doex
$responsesetBody(Invalid Command +a)
alert(filedownload)
thisdownloadExcel()
break
default
$responsestatus = $nethttpINTERNAL_SERVER_ERROR
$responsesetBody(Invalid Command +a)
The Controllerjs File
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010032
doFileDownload function (oEvent)
jQuerysaprequire(sapuicommonsMessageBox)
sapuicommonsMessageBoxshow(Export Starten sapuicommonsMessageBoxIconconfirm
Information)
sapuicommonsMessageBoxconfirm(Export starteninform Confirmation)
return false
function inform(rValue)
alert (drinnnnne)
var aurl = FileDownloadxsjscmd=doex
if(rValue) If User presses Ok
alert(aurl)
jQueryajax(
url aurl
method POST
dataType json
datacmddoex
success sapuicommonsMessageBoxalert(Export wird ausgefuumlhrtConfirmation)
errorfunction onErrorCall(jqXHR textStatus errorThrown)
alert(jqXHRstatus)
sapuicommonsMessageBoxshow(jqXHRstatus
ERROR
Error in calling Service )
return
complete sapuicommonsMessageBoxalert(Export Erfolgreich
abgeschlossenConfirmation)
)
return false
else If the user presses Cancel
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010033
sapuicommonsMessageBoxalert(Vorgang abgebrochenNotification)
)
at last but not least the view
sapuijsview(zag1_ui_cv_03Index
Specifies the Controller belonging to this View
In the case that it is not implemented or that null is returned this View does not have a Controller
memberOf zag1_ui_cv_03Index
getControllerName function()
return zag1_ui_cv_03Index
Is initially called once after the Controller has been instantiated It is the place where the UI is
constructed
Since the Controller is given to this method its event handlers can be attached right away
memberOf zag1_ui_cv_03Index
createContent function(oController)
create a lite button with an icon and a text
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010034
lite true
)placeAt(btn)
oButton3attachPress(oControllerdoFileDownload)
var oButton4 = new sapuicommonsButton(
text Refresh
icon imagesrefreshjpg
lite true
press function() var data = oTableval()
if(data == )
alert(no data found)
return
print(content)
print(DatArray)
if (data = )
alert(Funzt)
JSONToCSVConvertor(data CUSTOMER AMOUNT true)
)placeAt(btn)
jQuerysaprequire(sapuitableTable)
create table control with properties
var oTable = new sapuitableTable(
width 100
rowHeight 50
title Amount per Partner
selectionMode sapuitableSelectionModeNone
)
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Company Name
)
template new sapuicommonsTextView(
text CompanyName
)
sortProperty CompanyName
))
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010035
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Partner ID
)
template new sapuicommonsTextView(
text PartnerId
)
sortProperty PartnerId
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Postal Code
textAlign sapuicoreTextAlignEnd
)
template new sapuicommonsTextView(
text PostalCode
textAlign sapuicoreTextAlignEnd
)
sortProperty PostalCode
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text City
)
template new sapuicommonsTextView(
text City
)
sortProperty City
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Purchase ID
)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010036
template new sapuicommonsTextView(
text PurchaseOrderId
)
sortProperty Currency
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Lifecycle Status
)
template new sapuicommonsTextView(
text LifecycleStatus
)
sortProperty LifecycleStatus
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Gross Amount
)
template new sapuicommonsTextView(
text GrossAmount
)
sortProperty GrossAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Tax Amount
)
template new sapuicommonsTextView(
text TaxAmount
)
sortProperty TaxAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Amount Netto
)
template new sapuicommonsTextView(
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010037
text CM_NET_Amount_001
)
sortProperty CM_NET_Amount_001
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Currency
)
template new sapuicommonsTextView(
text Currency
)
sortProperty Currency
))
var oModel = new sapuimodelodataODataModel
(httpqperiorvmcldsr8000ZAG1_WS_001ZAG1_CV_001xsodata false)
oTablesetModel(oModel)
oTablebindRows(Amount)
return oTable
)
It wonacutet call the function or better said the action of the button works fine till to the point where it should call the
xsjsfile to generate the excel-file I wondered that in the ajax part the error- success- and complete-part will
be executed at the same time and not only one of this statements The message is 200 (The request has
succeeded The information returned with the response is dependent on the method used in the request)
Maybe you can see where my mistake is or whats going wrong
Iacuteve the developer edition on cloudshare (Hana Studio rev68 Server is on SPS05)
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010038
Andreacute
Thomas Jung in response to Samuel Tanor-Gyedu on page 38Feb 19 2014 523 AM
I dont think I can help you This appears to a question about how odata4j works not about XS I have no
experience with odata4j myself
Samuel Tanor-GyeduFeb 18 2014 913 AM
Hi Thomas
I have an odata service with this endpointhttpss5hanaxshanatrialondemandcomservicesUserxsodata
I am now trying to consume it from eclipse with the odata4j libraries
This is how I get the endpoint
public UserServiceOdata(String endpointUri)
thisendpointUri = endpointUri
ODataConsumerdumpresponseHeaders(true)
consumer = ODataConsumerscreate(endpointUri)
This is my method to add a user
public User addUser(User user)
consumercreateEntity(entitySet)properties(OPropertiesint32(propertyUserId
usergetId()))properties(OPropertiesstring(propertyUserName
usergetName()))properties(OPropertiesstring(propertyUserEmail usergetEmail()))execute()
return user
When I call addUser method I get an Error
Caused by javaxxmlstreamXMLStreamException ParseError at [rowcol][78253]
Message The reference to entity sourceUrl must end with the delimiter
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010039
When I use this endpoint httpss5hanaxshanatrialondemandcomservicesUsersvc everything works fine
With the httpss5hanaxshanatrialondemandcomservicesUserxsodata I get errors
Please I would be very grateful for assistance
Thanks in advance
Regards
Samuel
Thomas Jung in response to gentilini andre on page 39Feb 18 2014 431 AM
You have a fundamental misunderstanding here You are placing server side JavaScript code in your client
side UI5 application The function downloadExcel is something you need to execute on the server It needs to
be in an XSJS file and it is called from the client side via AJAX - as a REST service not as a local function
gentilini andreFeb 17 2014 451 PM
Hello Thomas
Thank you for this great How-To Guide
Iacutem pretty new in SAPUI5 and tried your export-sample in my little trial project but it doesnacutet work
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010040
My Button for this looks like
ltcodegt
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
lite true
press function() alert(oButton3getText())
downloadExcel()
ltcodegt
and the function for this action looks like
ltcodegt
function downloadExcel()
var body =
alert(drin)
print($query)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount tTax
Amount tNetto Amount tCurrency n
while(rsnext())
if(rsnext() == )
alert($responsesetBody( Failed to retrieve data ))
alert($responsestatus = $nethttpINTERNAL_SERVER_ERROR)
else
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010041
ltcodegt
Iacutem afraid and hope that you can help me
Kind regards
Andreacute
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1246 PM
gtIs there any restriction or development limitation in the XSJSLIB files
Thats a very general question Difficult to answer without any context
Vikas Madaan in response to Thomas Jung on page 41Feb 11 2014 1245 PM
Thanks Thomas
I think we are on same page
Once quick question that came to my mind Is there any restriction or development limitation in the XSJSLIB
files
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1230 PM
gtCould please help me in understanding in more advantagesdisadvantages for both techniques
Youve summarized it pretty well already
gtbecuase i dont want to use both the approaches
Even with the CRUD support and exits in XSODATA its still pretty hard to do 100 via XSODATA There are
still valid use cases for XSJS when you need custom body custom read processing job scheduling etc Its
good to try and use XSODATA whenever possible but I wouldnt automatically exclude the use of XSJS
Vikas MadaanFeb 11 2014 1008 AM
Hi Thomas
Thanks a lot for sharing useful information through various blogs
In my current project we are evaluating use of XSOData or XSJS applications I saw your videos like the one
mentioned below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010042
httpwwwsaphanacomdocsDOC-4376
Want i understood from various blog is this
From SP7 we can write exsits in the OData services and it is very easy to consume at the client side just like
any REST base service and from my understanding it is Scalable as well I would love to use XSOData always
becuase development effort is very less compare to XSJS and it is very easy to rampup the team on OData
related development objects
XSJS were as provide more control becuase of server side scripting becuase it allows development on the
server side using JavaScript Core APIs of SAP HANA Extended Application Services are therefore exposed
as JavaScript functions providing easy access to the HTTP Request and Response object as well database
access to execute SQL or call SQLScript Procedures It provide us control over the body format and and URL
parameter definition
Could please help me in understanding in more advantagesdisadvantages for both techniques
I am very keen to understand and also explain the same to team members becuase i dont want to use both the
approaches and even sometimes customer can also ask the same to us
Also If we are on SP6 then from my understanding XSJS provides us more capability in terms of complex
application Corrent me If i am wrong
Thanks
Regards
Vikas Madaan
Thomas Jung in response to Raghuveer Phull on page 42Feb 5 2014 312 PM
Yes there are videos on the CRUD features of XSODATA which were new in SP6
For more on CRUD support in SP6 see this video
oData CreateUpdateDelete Support in SAP HANA SPS6
For the extended support for XSJS exits in SP7 see this video
SAP HANA SPS 07 XSODATA Exits in XSJS
Raghuveer PhullFeb 5 2014 122 AM
Do you have an exampledocumentationvideo where you can write a service which will populate Hana DB
What I am asking for is a way for my external script to populate the DB tables i have created in Hana DB
Thomas Jung in response to reda miraoui on page 43Jan 29 2014 411 PM
The source code for the examples shown here are shipped as part of SHINE (SAP HANA Interactive
Education)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010043
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Vivek Singh Bhoj in response to reda miraoui on page 43Jan 29 2014 352 PM
Hi Reda
You can import Shine Content in HANA and then check all these source codes
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Regards
Vivek
reda miraoui in response to Thomas Jung on page Jan 29 2014 344 PM
Hey Thomas
Is it possible to download source code of your project from this HANA tutorial
Thanks
Reda
Thomas Jung in response to Abdul Hakim on page 43Nov 21 2013 1133 PM
Yes River can be used as an alternative and when activated it will generate Server Side JavaScript andor
SQLScript
Abdul Hakim in response to Thomas Jung on page 44Nov 21 2013 747 PM
Hi Thomas - Was going through blog regarding River (RDL)Just a question on this
When you say Programming language for HANA native development is Server side Javascript SQL SQL
ScriptOnce RDL is rolled out whether RDL can be used for native application development instead of Server
side Java script SQL SQL Script I am very much new to this stuff so appreciate if you can also help on
how to get started with Server Side Java script SQL SQL Script for HANA
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 30 2013 750 AM
Hi Thomas
Thanks for your response I am talking about more content on shine
thanks
Ashutosh
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010044
Baskar Gopalakrishnan in response to Thomas Jung on page 44Oct 30 2013 1249 AM
Hi Thomas
Im a SAP PI Middleware consultantSAP topic leader in XIPI heavily worked on Java related
Netweaver stack I have knowledge in ABAP but not worked heavily in abap I have enrolled your sap hana
native application development course I feel very interesting I did work heavily in java and javascript projects
using eclipse development tool Do you think if I invest my time in just native hana development and proceed
in HANA field is a good step I dont have BW experience either
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 819 PM
Thanks for the clarification Much appreciated
Thomas Jung in response to Abdul Hakim on page 44Oct 29 2013 120 PM
gtABAP Close to HANA means whether we can expect a similar 2 tier architecture similar to HANA XS in the
future or what does that mean
No it doesnt mean that ABAP will become a 2 tier architecture We will not move the ABAP VMKernel into
HANA itself It will remain a separate application server At least for the current plansforeseeable future What
he was referring to was bringing the programming models closer For instance the new 740 SP5 feature that
allows you to write SQLScript directly within an ABAP class method
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 650 AM
Thomas - Thanks for the clarificationMuch appreciatedI was listening to ABAP on HANA session by
Thorsten Schneider this year Teched and he was mentioning that SAP Plans to bring ABAP very close to
HANA in the coming future but not much details have been discussed in the sessionABAP Close to HANA
means whether we can expect a similar 2 tier architecture similar to HANA XS in the future or what does that
mean
Thanks
Hakim
Thomas Jung in response to Abdul Hakim on page 45Oct 28 2013 703 PM
gt whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the option is
recommended by SAP then kindly share the pros and cons of each of the item
Taken from the TechEd CD103 session slides
Guidance
bulluse ABAP for optimization of existing progams (in context of SAP Business Suite or BW)
bullconsider HANA Native Development for development of new applications which will solely run on SAP HANA
bullcombine ABAP and HANA Native Development to enrich existing applications (eg SAP HANA Live Fiori)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010045
ABAP
bullapplications follow 3-tier architecture
bullABAP is in general database agnostic but with release 74 optimized for SAP HANA
bullProgramming language ABAP ABAP OO with the option to use SAP HANA features
bullIDE eclipse-based ABAP Development Tools
HANA Native Development
bullapplications follow 2-tier architecture
bullHANA Native Development is SAP HANA specific and embedded in the database
bullProgramming language River server-side JavaScript SQLSQLScript
bullIDE eclipse-based SAP HANA Studio + web IDE
Thomas Jung in response to ashutosh dixit on page 45Oct 28 2013 701 PM
gtIs there any more demos for the SHINE
Im not exactly sure what you mean by that We are building additional content for SHINE that will be delivered
in SP7
Abdul HakimOct 28 2013 326 PM
Thomas - Let us say a customer is running SAP Netweaver 74 ABAP with HANA DB and they have HANA
extended service as wellIf the customer wants to do new developments then what is the recommendation
from SAP ie whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the
option is recommended by SAP then kindly share the pros and cons of each of the item (SAP Netweaver 74
ABAP Vs SAP HANA XS)
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 28 2013 221 PM
Hi Thomas
Thanks a lot for your its working now
Is there any more demos for the SHINE
Thanks
Ashutosh
Thomas Jung in response to ashutosh dixit on page 46Oct 25 2013 809 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010046
As this content is now standard in SP6 as part of SHINE (SAP HANA INteractive Education) there also some
setup instructions on helpsapcom
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Basic points to check - have you generated the synonyms in the data generator Ran the data generator to
create some data Have the role assigned Added client 001 to your user profile
ashutosh dixitOct 24 2013 130 PM
Hi Thomas
Amazing blog - once again Thomas thanks
I have been following you for many days attended your OPEN SAP course also
That was an amazing course for new learner like me
One of our client is looking forward for XS based search Application identical to what you have created in your
DEMO
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010047
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010048
But I am not able to fetch the data on blank HTML page is coming with no data
If there is any step by step document related to this please help in getting that
Any help will be highly appreciated
Thanks
Ashutosh
Naveen KumarSep 26 2013 1130 AM
Good Document
Heber FabianoAug 27 2013 323 PM
Great content as always Keep sharing with us
Thomas Jung in response to Orel Stringa on page 48Aug 27 2013 147 PM
This is currently not possible The CORS support is for all origins We dont yet have the feature to maintain a
whitelist of CORS origins
Orel Stringa in response to Thomas Jung on page Aug 27 2013 801 AM
Hi Thomas
nice to see that SAP has made it possible with SP6 to specify cross origin resource sharing (CORS) support
via the xsaccess file SP6 HANA development guide has example of how to specify CORS support
I have build an XS application and would like to serve SAPUI5 on a diffhost than XSHANA
How can I specify that I would like to allow cross origin access restricted to certain domain(s) only
Is there a special keyword syntax for specifying that
Thank yoi
Orel
Vijay UthayakumarAug 27 2013 131 AM
Highly informative amp digestible Fantastic work
Jerry WangAug 1 2013 955 AM
Hi Tomas
Thank you
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010049
Jerry
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 644 PM
JSLint checks are very strict and often produce syntax errors for items that just stylistic and wont actually
cause an error upon activation or runtime You can either ignore the JSLint errors or deactivate JSLint for this
project in these cases However it might also be an indication that the JavaScript code you are trying to import
isnt compatible with Strict mode
httpsdevelopermozillaorgen-USdocsWebJavaScriptReferenceFunctions_and_function_scope
Strict_mode
Milan Vrozina in response to Thomas Jung on page 49Jul 21 2013 624 PM
Thanks for clarification I thought there would be some kind of import
But anyway in case of this specific library I have some problems with JSLint validation when I do cut and paste
of the original code
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 343 PM
What kind of problem are you having using this library Strict mode JavaScript which doesnt try to access the
DOM Window or other client side specific objects should work in Server Side XSJS Generally if you have a
library you just cut and paste into your XSJS or an XSJSLIB file and then call the functions from your code
Milan VrozinaJul 21 2013 339 PM
Hello
first and foremost thank you for perfect openSAP classes related to HANA development and for this blog as
well
I have one question related to server-side javascript You mentioned in course that is possible to use 3rd party
libraries or reuse 3rd party code But I cant find a possible way how to import 3rd party javascript library -as
is- to server and use it For example I would like to use JSZip library to zip some file before sending it to client
from xsjs application Is that possible Thank you
Chandrashekhar MahajanJul 3 2013 734 PM
This is excellent blog Now HANA XS is very much clear to me
Mohan krishnaJul 1 2013 144 PM
WOW - great blog Thomas This will be very helpful in understanding SAP hana Good Job
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010050
Abdul Hakim in response to Thomas Jung on page 50Jun 27 2013 833 PM
Thanks for the clarification
Thomas Jung in response to Abdul Hakim on page 50Jun 27 2013 659 PM
HANA Extended Application Services uses SQLScript and JavaScript as its two primary programming
languages
gtwhether the current SAP Business suite based on ABAP will be completely migrated to HANA service
No The Business Suite already runs on HANA but still via the ABAP application server It will continue to
leverage HANA via a combination of enhancements to ABAP and utilizing some of the technologies described
in this blog
gtAlso whether ABAP can be used to built application in HANA extended services
No There is no ABAP language container in HANA Extended Application Services
Abdul HakimJun 27 2013 405 PM
Hi Thomas - What is the programming language used for HANA Extended application services
As HANA is more than a database ie application platform by itself and as you mentioned that more and more
applications will be built on HANA i have question as how the future SAP ERP system looks likewhether the
current SAP Business suite based on ABAP will be completely migrated to HANA service in the future or SAP
ABAP server will continue to evolve and receive focus investment from SAP Also whether ABAP can be used
to built application in HANA extended services Your thoughts
Thanks
Abdul Hakim
Thomas Jung in response to Ravindra Channe on page 50Jun 11 2013 830 PM
Yes it is still planned However we are still a couple of weeks away and Ive not seen the final installers to say
for certain its there
Ravindra ChanneJun 11 2013 815 PM
Hi Thomas
Thanks for a wonderful and very informative blog Is there any update on 32 bit REGI file
Is it expected along with SPS6
Regards
Ravi
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010051
Thomas Jung in response to Amanda Rzepka on page Jun 7 2013 942 PM
gtCan the XS Services be used in a BW on HANA Scenario
Yes XS is part of ALL HANA systems You should check and make sure you are licensed for direct access to
the underlying HANA instance however
Thomas Jung in response to Holger Schimanski on page Jun 7 2013 941 PM
gtIs there a similar library which could be used in XS Engine
The XSODATA development object is similar We also have higher level frameworks for XMLA and Search
Services (InA) You can expect more such high level frameworks to be added to the HANA Extended
Application Services in the future
Thomas Jung in response to Manav Mehra on page Jun 7 2013 939 PM
Have you used something like the Chrome developer tools to see see if you are getting any client side
javascript errors or to see if the request to your xsodata service is successful
Thomas Jung in response to Christian Hufnagl on page 52Jun 7 2013 938 PM
It will ship as non-automatic content in SPS6 (all systems will have it and it just needs to be imported) The
delivery units are also part of this weeks updates to the Cloudshare and AWS developer center images They
are also available for download as part of the content of the openSAP course
Thomas Jung in response to Matthew Pickell on page 51Jun 7 2013 937 PM
CORS support will come with SPS6 at the end of June
Thomas Jung in response to Jeroen Custers on page 51Jun 7 2013 936 PM
gtWill this bug be fixed in HANA ver 56
Personally Ive still experienced this bug in SPS6 internal builds Must be a tricky one to find Luckily the
workaround of closing and reopening isnt too difficult Just annoying This also probably makes the bug low
priority
Jeroen Custers in response to Vivek Singh Bhoj on page 52Jun 7 2013 411 PM
This issue also occurs on rev56
Matthew PickellJun 7 2013 258 PM
Thomas
Has CORS been included in a release yet
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010052
Vivek Singh Bhoj in response to Chandra Edem on page 52Jun 5 2013 601 AM
Hi Chandra
Date for Week1 Assignment has been extended till June 11
So you can give Week 1 Assignment now
Christian HufnaglJun 4 2013 543 PM
Hi Thomas
thank you for the interesting tutorial
Can you tell me whether it is possible to download the source code of the ldquoPutting it all togetherrdquovideo And if yes Where can I download itThanks
Christoph
Vivek Singh BhojJun 4 2013 1116 AM
Hi Thomas
Thanks for OpenSAP classes
Your Youtube Account also have very good exercises
IN OpenSAP Week 2 Unit 3 tutorial after assigning admin role to my user Id i am not able to see sequences
synonyms triggers under my schema or any other schema i am only able to see Column Views Procedures
Tables and Views
Though now i am able to insert data into my created table
Can you let me know how i will be able to see Sequences under my schema without removing the admin role
I am using HANA revision 52
Got to know from OpenSAP that
This is a known issue and the only way that Ive seen to fix it is to actually close the studio and open it again
then refresh the node
Cheers
Rich Heilman
SAP HANA Product Management
Will this bug be fixed in HANA ver 56
Chandra Edem in response to Thomas Jung on page 53Jun 4 2013 646 AM
Thomas
I registered for OpenSAP course Introduction to Software Development on SAP HANA on June 2 900PM
I didnt know that it is going to end WEEK1 assignment test on 632013 300PM Is there any way can take
that WEEK1 Assignment Test
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010053
Thanks
Chandra
Thomas Jung in response to Alexander Bauer on page Jun 3 2013 856 PM
SAPUI5 gets updated auutomatically when you apply HANA revisions There is no additional download or
update needed
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010012
Im facing a strange issue while trying to import weather data from several cities together The issue appears to
be connected with the content of the response object
Following is the code of the Weatherxsjs file
try
var cmd = $requestparametersget(cmd)
var body
var response
var obj
var propertyName
if(cmd === import)
var dest = $nethttpreadDestination(rootworkTara02XSTest01XSHttpTest01 weather)
var client = new $nethttpClient()
var req = new $webWebRequest($nethttpGET group
id=12750041264527127733312732941275339ampunits=metric)
clientrequest(req dest)
response = clientgetResponse()
$responsecontentType = textplain
if(responsebody)
body = responsebodyasString()
obj = JSONparse(body)
body = cmd + n n + responsestatus + n n + responsecontentType
+ n n + responsebody + n n + objgetOwnPropertyNames()
$responsesetBody(body)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010013
$responsestatus = $nethttpOK
catch(e)
$responsecontentType = textplain
$responsesetBody(emessage)
$responsestatus = $nethttpINTERNAL_SERVER_ERROR
Following is the weatherxshttpdest
host = apiopenweathermaporg
port = 80
description = my weather checker
useSSL = false
pathPrefix = data25
authType = none
useProxy = true
proxyHost = ltproxy_detailsgt
proxyPort = ltproxy_port
timeout = 0
On accessing httplthostnamegt8000rootworkTara02XSTest01XSHttpTest01Weatherxsjs
ampcmd=import I am receiving the error message BodyasString unsupported charset specified in
Content-Type header (utf8)
If the body = responsebodyasString() statement is commented out I receive the error message
JSONparse unexpected character because the responsebodyasString() itself could not work correctly
However the URL httpapiopenweathermaporgdata25group
id=12750041264527127733312732941275339 returns data correctly
I am using the same URL in my code
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010014
Could you please advise regarding this issue Thanks for your help
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 14Nov 4 2014 319 PM
gtIs it possible to read files using XS For example some configuration file kept in the server
No there is no API to read from the file system of the underlying operating system You can read the HANA
configuration ini files however because they are exposed via SQL
gtIs it possible to call a html file from the xsjs file Something likerequestgetRequestDispatcher()forward() from
JAVA servlets
In the body of the response you send back to the client your could issue a redirect
Tarasankar Banerjee in response to Tarasankar Banerjee on page 15Nov 4 2014 1034 AM
Hi Thomas
Finally got my application running It is now fetching weather data from external sites
Have two more questions
1 Is it possible to read files using XS For example some configuration file kept in the server2 Is it possible to call a html file from the xsjs file Something like
requestgetRequestDispatcher()forward() from JAVA servlets
Thanks
Regards
Tarasankar
Robert WeberNov 3 2014 1136 AM
If someone is having difficulties with the alert log full on the xsengine
you can do the same trick as for the statisticserver in oder to reset the log area see details in OSS Notes
2019148 and 1950221
The commands are then
select VOLUME_ID from m_volumes where service_name = xsengine
ALTER SYSTEM ALTER CONFIGURATION (daemonini host lthostnamegt) UNSET
(xsengineinstances) WITH RECONFIGURE
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010015
ALTER SYSTEM ALTER CONFIGURATION (topologyini system) UNSET (hostlthostnamegt xsengine)
WITH RECONFIGURE
ALTER SYSTEM ALTER CONFIGURATION (topologyini system) UNSET (volumes ltvolume_idgt) WITH
RECONFIGURE
ALTER SYSTEM ALTER CONFIGURATION (daemonini host lthostnamegt) SET (xsengineinstances) =
1 WITH RECONFIGURE
Then restart the HANA instance and after that make a full backup (and schedule the regular backup in order to
prevent this situation again)
Hope this will help someone like me -)
Have a nice day
Regards
Robert
Tarasankar Banerjee in response to Tarasankar Banerjee on page 15Nov 3 2014 1031 AM
Update
I tried to access the XS Admin console from another user and faced only the No valid Crypto error However
could still update the proxy user details and the sample application successfully ran at last The relevant roles
were provided in Granted Roles not Application Privileges Probably that was the issue earlier
I would check again with new Http Destination and Server side Java Script
Thanks a lot Thomas for all your help
Regards
Tarasankar
Tarasankar Banerjee in response to Thomas Jung on page 18Nov 3 2014 929 AM
Hi Thomas
I also tried to use the sample code from section 841 Tutorial Use the XSJS Outbound API of the HANA
Developer Guide with minor modifications (for package structure proxy settings etc) This time the destination
was found The new project structure with the sample files yahooxshttpdest and sapStockxsjs is as below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010016
However it did not bring any data The content of the response object indicated that there was Proxy
authentication issue
When I tried to check the Destination in the XS Admin Console surprisingly none of the fields are populated
and everything (except the Trust Store drop down) is disabled All these fields are supposed to be populated
as indicated in the Modeling Guide
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010017
However the User already has the following privileges
The same scenario was present for the Http Destination I prepared earlier There are couple of internal errors
at the bottom On clicking them the following list is displayed
1 Internal Error dbError(ConnectionprepareStatement) 258 - insufficient privilege Not authorized at
ptimequerycheckerquery_checkcc24182 No valid SAP Crypto configuration
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010018
It appears from various blogs that the second error (No valid SAP Crypto configuration) is related to SSL
configuration in HANA I would contact the HANA Administrator to look into this issue Of course it would be
great if you could provide some insight
However I have no clue regarding the first error Request your help and cooperation in this regard
The initial issue of not finding the HttpDestination which I created still persists
Thanks for all your help
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 18Oct 31 2014 342 PM
First of all you would never use the workspace name It isnt ever part of anything It is only the package
structure that counts The first item in your list is the only one with the correct package Off hand it looks right to
me You are supposed to supply the full package path Have you configured this HTTP Destination in the XS
Admin tool yet
Tarasankar Banerjee in response to Thomas Jung on page 18Oct 31 2014 326 PM
Updated it Thanks
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 18Oct 31 2014 313 PM
Your comment got cut off We never really get to see what your problem is
Tarasankar Banerjee in response to Thomas Jung on page 21Oct 31 2014 256 PM
Thanks Thomas
I am facing as issue while trying to use an HTTP Destination I understand that the xshttpdest and xsjs file
need to in the same folder Following is the structure of my test project
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010019
As you can see the HTTP Destination and the XSJS files are in the same folder services The workspace
name is XS_Workspace and the package structure is as follows
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010020
Now I am trying to read this destination
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010021
When I am using full package structure destination_package =
rootworkTara02XSTest01XSHttpTest01services I am receiving the
error message httpreadDestination destination not found (package
rootworkTara02XSTest01XSHttpTest01services name XSHttpDest01)
On using the workspace name destination_package = XS_Workspaceservices I am receiving the
error message User is not authorized to use destination (package XS_Workspaceservices name
XSHttpDest01)
On using destination_package = rootworkTara02XSTest01services also I am receiving the error
message User is not authorized to use destination (package rootworkTara02XSTest01services
name XSHttpDest01) Strangely the services folder is not directly under XSTest01
Lastly I deliberately gave a wrong service name destination_package = XS_Workspaceservices and
destination_name = XSHttpDest02 But even then I received the error message User is not authorized to
use destination (package XS_Workspaceservices name XSHttpDest02) not that the destination is not
found
Could you please help me to resolve this issue
Thanks a lot for your helps
Regards
Tarasankar
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010022
Thomas Jung in response to Tarasankar Banerjee on page 22Oct 30 2014 152 PM
Since SPS06 its possible to use outbound HTTP destinations and to call out to external services using XSJS
Thomas Jung in response to Tarasankar Banerjee on page 22Oct 30 2014 150 PM
gtSo when the program runs in server would it automatically consider the OS user credentials
No It doesnt automatically use anything You have to specific the user and password that you want to use for
the proxy Although many proxy servers dont require a username and password
Tarasankar Banerjee in response to Thomas Jung on page 23Oct 30 2014 707 AM
Hi Thomas
Just watched the video you shared above Thanks a lot for it It is really informative and helpful
Regards
Tarasankar
Tarasankar Banerjee in response to Tarasankar Banerjee on page 22Oct 30 2014 346 AM
Got answer for the second point SAP HANA XS Administration Tool is the place to configure Proxy settings
Regards
Tarasankar
Tarasankar Banerjee in response to Tarasankar Banerjee on page 22Oct 29 2014 314 PM
Dear Thomas
another question is that does the proxy settings in the HttpDestination refer to the OS user of the HANA
server We specify useProxy as true and authType as basic in the HttpDestination but not maintain any
user credentials So when the program runs in server would it automatically consider the OS user credentials
Thanks
Regards
Tarasankar
Tarasankar Banerjee in response to Thomas Jung on page 23Oct 29 2014 132 PM
Thanks Thomas I am currently checking this option only
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010023
My current requirement is to fetch Weather Data and Social Media data from various OData services and store
them in HANA for further analysis What might be the best way for this I am currently checking the option of
creating an XS application which would connect to the external services fetch the data and save that in HANA
using DB Connection Is this the best way Or should we try to use JAVA or some other way
Your valuable suggestions are most welcome Thanks
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 23Oct 29 2014 1256 PM
gtHowever is it possible to consume XSODATA service from XSJS instead of using DB Connection
You can via an outbound HTTP destination although I certainly wouldnt recommend it It would be rather
complex and not well performing
gtAlso is it possible to consume data from external OData services for weather data social media data etc from
XSJS
Sure with the same Outbound HTTP Connectivity
httpswwwyoutubecomwatchv=fWirvj9l7eY
Maintaining HTTP Destinations - SAP HANA Developer Guide - SAP Library
Tarasankar BanerjeeOct 29 2014 1119 AM
Dear Thomas
Thanks for the great blog
I am able to connect to Database and execute queries from XSJS service However is it possible to consume
XSODATA service from XSJS instead of using DB Connection
Also is it possible to consume data from external OData services for weather data social media data etc from
XSJS
If possible it would be great if you could provide some code sample or guidelines
Thanks
Regards
Tarasankar
Thomas Jung in response to Weiping Lu on page 24Sep 25 2014 833 AM
Please refer to service note 1849775
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010024
httpservicesapcomsapsupportnotes1849775
I believe it will address your issue
Weiping LuSep 24 2014 519 PM
Hi Tom
Great post and videos I have a tough issue calling a HANA procedure from XS takes gt 5min but from HANA
studio lt 1 min Were using Amazon AWS rev 70 and 73 Any help will be greatly appreciated
Thanks
WPL
Thomas Jung in response to Su Srikanth on page 24Aug 11 2014 253 PM
You transport XSODATA services like you would any other repository content - via a Delivery Unit
Su SrikanthAug 11 2014 750 AM
Hi Thomas
Great blog
Ive a query here - we create the odata services(andor URLs created to view in the web browser) in
development environment now if we have to transport it to the quality andor production environment how
can we do this - is the same as importexport or is there any specific way to do please help with any useful
pointers
Many thanks as always
Su
Thomas Jung in response to ARSHAD SHAIKH on page 24May 15 2014 231 PM
Ive never written any blogs on calculation views I dont cover that topic That is why I suggested you ask your
question in the proper SCN forum
Although looking at your your above SQL Statement I dont see why you couldnt do this directly in XSODATA
off of the table STATUS without the need for the calculation view or the SQLScript Procedure
ARSHAD SHAIKH in response to Thomas Jung on page 25May 15 2014 1154 AM
Hello Thomas
I am new to hana Please suggest me the blogs of you related to calculation view that calling
procedures(procedures have out parameter)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010025
I am trying to fetch the result of procedure in calc view and want to create odata service for that calculation
view
procedure code goes like this
---------------------------------------
CREATE PROCEDURE TWEETS_TODAY(OUT OP BIGINT)
language SQLSCRIPT sql security invoker default schema SOCIAL360 reads sql data as
BEGIN
SELECT COUNT() INTO OP FROM SOCIAL360STATUS WHERE CREATED_AT = CURRENT_DATE
END
calc view code goes like this
----------------------------------------
Begin Procedure Script
BEGIN
DECLARE OP BIGINT
CALL SOCIAL360TWEETS_TODAY(OPvar_out)
END End Procedure Script
Thanks
-Arshad
Thomas Jung in response to ARSHAD SHAIKH on page 25May 15 2014 944 AM
Your question seems to have no relation to the content in this blog Please consider instead asking general
HANA questions in the appropriate SCN Forum
ARSHAD SHAIKHMay 15 2014 917 AM
Hi Thomas
I want to call procedures in calculation view (procedures have out parameter)
Please suggest me step by step procedure with example and supporting documents
Thanks
ARSHAD SHAIKH
Henrique Pinto in response to Blair Krotenko on page 26Apr 16 2014 711 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010026
Hmm not really sure of that I see it but that might be because Im an employee
But the NET development partner I was working with was not enrolled in any kind of beta testing program and
they were able to download it so I guess you should as well
Make sure to go in the Installation and Upgrades menu and not the Support Packages and Patches
Go to httpservicesapcomswdc -gt Installations and Upgrades -gt Browse our Download Catalog -gt SAP In-
Memory (SAP HANA) -gt SAP HANA ADONET 10
Best regards
Henrique
Blair Krotenko in response to Henrique Pinto on page 26Apr 16 2014 656 PM
Thanks for the info Henrique but I cant find it I dont know if it is an authorization issue or do we need to be a
ramp-up customer to dl and use a beta product
Thanks
Blair
Henrique Pinto in response to Thomas Jung on page 27Apr 16 2014 614 PM
The ADONET provider is available for download in the SAP Service Marketplace (in beta edition so far)
Thomas Jung in response to Kamal Jain on page 26Apr 16 2014 514 PM
For general OData structure and syntax I find that the Odataorg website is very helpful For example on this
topic
httpwwwodataorgdocumentationodata-version-2-0uri-conventions
The syntax of a $expand query option is a comma-separated list of Navigation Properties Additionally each
Navigation Property can be followed by a forward slash and another Navigation Property to enable identifying a
multi-level relationship
The page also has some sample URLs
Kamal JainApr 16 2014 536 AM
Dear Thomas
I agree that we need to pass all the associations in the expand I tried with some of options but was not
through
Now i just tried with below syntax and able to achive Thx
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010027
httpdewdftzld025pgdevsapcorp8000DTHCPXSZPMIS_PRO_ACTUALxsodata
ZPROHEADER(PR07_000002)$expand=ZACTUZEMPD
Regards
Kamal Jain
Thomas Jung in response to Blair Krotenko on page 27Apr 15 2014 623 PM
We do plan to release an ADONET provider specific to HANA in the near future This would probably be the
best option for consumption from NET Until then I would think that ODBC is probably the next best option It
gives you generally easy portability from already existing database code You could consume OData as well
although that is more generally consumed from the UI layer itself It guess it somewhat depends upon where
you are calling the service from in your NET application
Blair KrotenkoApr 15 2014 409 PM
Hi Thomas
We are looking at consuming HANA data in a NET application and from what I can see there are 2 options -
OData and ODBC It seems to me that OData might be the better option when consuming HANA data in an XS
application while ODBC might be the better option for NET What are your thoughts Is there a paper on this
subject I havent been able to find a comparison document for this Are there any security caveats to be aware
of for these options
Thanks
Blair
Thomas Jung in response to Kamal Jain on page 27Apr 15 2014 136 PM
You have to list both associations in the expand on the URL if you want both relationships to be processed
Kamal JainApr 15 2014 1249 PM
Hi Thomas
Thx for valuable and useful information
I have an query regarding XS Odata service creation for more than 2 tables and get all the data in one
command
There is req in which service needs to be created for 3 tables to get data from all these
First table has Project ID as key second table has composite
ProjectID and Employee Id as key and third table has Employee id as
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010028
key
So if I create navigation for first 2 tables based on project id and use expand comand than its working fine and I
can see data of both the tables
Further if I add navigation for third table also as below then below expand is displaying data for first two tables
only Pls share how to use expand command in this case if possible to get all tables data based on project id
How to use navigation ZEMPD here
httpdewdftzld025pgdevsapcorp8000DTHCPXSZPMIS_PRO_ACTUALxsodata
ZPROHEADER(PR07_000002)$expand=ZACTUamp
service namespace
DTHCPXS
DTHCPDTHCPDBHCP_PROJECT_HEADER
as ZPROHEADER
navigates (PROJECT as
ZACTU)
DTHCPDTHCPDBHCPT_ZPMIS_ACTUAL
as ZACTU
navigates (EMPLOYEE as
ZEMPD )
DTHCPDTHCPDBHCP_ZPMIS_RES_MASTER
as ZEMPD
association PROJECT principal
ZPROHEADER(PROJECTID)
multiplicity 1 dependent
ZACTU(PROJECTID) multiplicity
association EMPLOYEE principal
ZACTU(EMPLOYEEID)
multiplicity 1 dependent
ZEMPD(EMPLOYEEID) multiplicity
1
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010029
Pls suggest if there is anything to add or correct in XS odata service syntax above
Regards
Kamal Jain
Vikas Madaan in response to Thomas Jung on page 29Apr 14 2014 458 PM
Thanks Thomas
Under which component
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 29Apr 14 2014 450 PM
No this isnt a known issue Ive seen Nor can I recreate the problem in my system No you cant maintain the
authentication in XSHTTPDEST itself It intentionally must be set in XSADMIN tool I can really only suggest
that you open a support ticket
Vikas MadaanApr 14 2014 431 PM
Hi Thomas
I am trying to pull data from SAP system onto HANA Database using XSJOB files I am calling RFC enabled
function modules over HTTP request It helps me replicating the real time ECC data onto HANA as well with
back ground jobs
I am facing one problem in the XSHTTPDEST file I am able to create and activate the file using studio and this
file is even visible in the web based XS administration tool But in the web based tool when i provide user and
password for basic authotication then system just clears the user id and password when i try to save This the
reason our HTTP requests are getting failed and below is the response we are getting in the response body
lthtmlgtltheadgtlttitlegtLogon Error Messagelttitlegt
Is this known issue or we are missing something Is it possible to provide user and password in the
XSHTTPDEST file Is there any particular syntax
I checked and i have the required authorizations as well develper Guide
Please help
Regards
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010030
Vikas Madaan
Abdul HakimFeb 22 2014 359 AM
Hi Thomas - Any recommended book or resource to learn and master Server Side Javascript There were
many books available in the market but as a beginner need to know the right resource book to start with and
master this stuffAlso whether SAP plan to conduct any training to teach Server Side Javascript similar to other
standard training offerings
Thanks
Hakim
Samuel Tanor-GyeduFeb 20 2014 839 AM
Thanks Thomas
I will definitely have a look at SHINE
Thomas Jung in response to gentilini andre on page 30Feb 19 2014 422 PM
Difficult to say what is wrong I several things which are different than our sample that does this You are using
a POST for instance instead of a GET However if you are gettting a 200 then I assume the service call is
correct In client side tools (like Chrome Developer Tools) you should be able to see the response object from
the call
However what I would really recommend is that you study the SHINE content (SAP HANA Interactive
Education) There is already a sample application which does this in SHINE Also it has some special
JavaScript in the UI to handle the file attachment via AXAJ call Perhaps that is the part you are missing
You can read more about SHINE here It is also included already installed in the latest version of the HANA
Developer Center trial image (SP7 based)
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
gentilini andreFeb 19 2014 325 PM
Hi Thomas
well I followed your hints but it still donacutet work
I created a xsjs File like below
function downloadExcel()
try
var body =
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010031
alert(drin)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
alert(drusse)
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount
tTax Amount tNetto Amount tCurrency n
while(rsnext())
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
catch (e)
alert(db conn funktioniert nicht)
var a = $requestparametersget(cmd)
$responsesetBody(Invalid Command +a)
switch (a)
case doex
$responsesetBody(Invalid Command +a)
alert(filedownload)
thisdownloadExcel()
break
default
$responsestatus = $nethttpINTERNAL_SERVER_ERROR
$responsesetBody(Invalid Command +a)
The Controllerjs File
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010032
doFileDownload function (oEvent)
jQuerysaprequire(sapuicommonsMessageBox)
sapuicommonsMessageBoxshow(Export Starten sapuicommonsMessageBoxIconconfirm
Information)
sapuicommonsMessageBoxconfirm(Export starteninform Confirmation)
return false
function inform(rValue)
alert (drinnnnne)
var aurl = FileDownloadxsjscmd=doex
if(rValue) If User presses Ok
alert(aurl)
jQueryajax(
url aurl
method POST
dataType json
datacmddoex
success sapuicommonsMessageBoxalert(Export wird ausgefuumlhrtConfirmation)
errorfunction onErrorCall(jqXHR textStatus errorThrown)
alert(jqXHRstatus)
sapuicommonsMessageBoxshow(jqXHRstatus
ERROR
Error in calling Service )
return
complete sapuicommonsMessageBoxalert(Export Erfolgreich
abgeschlossenConfirmation)
)
return false
else If the user presses Cancel
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010033
sapuicommonsMessageBoxalert(Vorgang abgebrochenNotification)
)
at last but not least the view
sapuijsview(zag1_ui_cv_03Index
Specifies the Controller belonging to this View
In the case that it is not implemented or that null is returned this View does not have a Controller
memberOf zag1_ui_cv_03Index
getControllerName function()
return zag1_ui_cv_03Index
Is initially called once after the Controller has been instantiated It is the place where the UI is
constructed
Since the Controller is given to this method its event handlers can be attached right away
memberOf zag1_ui_cv_03Index
createContent function(oController)
create a lite button with an icon and a text
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010034
lite true
)placeAt(btn)
oButton3attachPress(oControllerdoFileDownload)
var oButton4 = new sapuicommonsButton(
text Refresh
icon imagesrefreshjpg
lite true
press function() var data = oTableval()
if(data == )
alert(no data found)
return
print(content)
print(DatArray)
if (data = )
alert(Funzt)
JSONToCSVConvertor(data CUSTOMER AMOUNT true)
)placeAt(btn)
jQuerysaprequire(sapuitableTable)
create table control with properties
var oTable = new sapuitableTable(
width 100
rowHeight 50
title Amount per Partner
selectionMode sapuitableSelectionModeNone
)
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Company Name
)
template new sapuicommonsTextView(
text CompanyName
)
sortProperty CompanyName
))
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010035
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Partner ID
)
template new sapuicommonsTextView(
text PartnerId
)
sortProperty PartnerId
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Postal Code
textAlign sapuicoreTextAlignEnd
)
template new sapuicommonsTextView(
text PostalCode
textAlign sapuicoreTextAlignEnd
)
sortProperty PostalCode
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text City
)
template new sapuicommonsTextView(
text City
)
sortProperty City
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Purchase ID
)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010036
template new sapuicommonsTextView(
text PurchaseOrderId
)
sortProperty Currency
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Lifecycle Status
)
template new sapuicommonsTextView(
text LifecycleStatus
)
sortProperty LifecycleStatus
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Gross Amount
)
template new sapuicommonsTextView(
text GrossAmount
)
sortProperty GrossAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Tax Amount
)
template new sapuicommonsTextView(
text TaxAmount
)
sortProperty TaxAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Amount Netto
)
template new sapuicommonsTextView(
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010037
text CM_NET_Amount_001
)
sortProperty CM_NET_Amount_001
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Currency
)
template new sapuicommonsTextView(
text Currency
)
sortProperty Currency
))
var oModel = new sapuimodelodataODataModel
(httpqperiorvmcldsr8000ZAG1_WS_001ZAG1_CV_001xsodata false)
oTablesetModel(oModel)
oTablebindRows(Amount)
return oTable
)
It wonacutet call the function or better said the action of the button works fine till to the point where it should call the
xsjsfile to generate the excel-file I wondered that in the ajax part the error- success- and complete-part will
be executed at the same time and not only one of this statements The message is 200 (The request has
succeeded The information returned with the response is dependent on the method used in the request)
Maybe you can see where my mistake is or whats going wrong
Iacuteve the developer edition on cloudshare (Hana Studio rev68 Server is on SPS05)
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010038
Andreacute
Thomas Jung in response to Samuel Tanor-Gyedu on page 38Feb 19 2014 523 AM
I dont think I can help you This appears to a question about how odata4j works not about XS I have no
experience with odata4j myself
Samuel Tanor-GyeduFeb 18 2014 913 AM
Hi Thomas
I have an odata service with this endpointhttpss5hanaxshanatrialondemandcomservicesUserxsodata
I am now trying to consume it from eclipse with the odata4j libraries
This is how I get the endpoint
public UserServiceOdata(String endpointUri)
thisendpointUri = endpointUri
ODataConsumerdumpresponseHeaders(true)
consumer = ODataConsumerscreate(endpointUri)
This is my method to add a user
public User addUser(User user)
consumercreateEntity(entitySet)properties(OPropertiesint32(propertyUserId
usergetId()))properties(OPropertiesstring(propertyUserName
usergetName()))properties(OPropertiesstring(propertyUserEmail usergetEmail()))execute()
return user
When I call addUser method I get an Error
Caused by javaxxmlstreamXMLStreamException ParseError at [rowcol][78253]
Message The reference to entity sourceUrl must end with the delimiter
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010039
When I use this endpoint httpss5hanaxshanatrialondemandcomservicesUsersvc everything works fine
With the httpss5hanaxshanatrialondemandcomservicesUserxsodata I get errors
Please I would be very grateful for assistance
Thanks in advance
Regards
Samuel
Thomas Jung in response to gentilini andre on page 39Feb 18 2014 431 AM
You have a fundamental misunderstanding here You are placing server side JavaScript code in your client
side UI5 application The function downloadExcel is something you need to execute on the server It needs to
be in an XSJS file and it is called from the client side via AJAX - as a REST service not as a local function
gentilini andreFeb 17 2014 451 PM
Hello Thomas
Thank you for this great How-To Guide
Iacutem pretty new in SAPUI5 and tried your export-sample in my little trial project but it doesnacutet work
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010040
My Button for this looks like
ltcodegt
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
lite true
press function() alert(oButton3getText())
downloadExcel()
ltcodegt
and the function for this action looks like
ltcodegt
function downloadExcel()
var body =
alert(drin)
print($query)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount tTax
Amount tNetto Amount tCurrency n
while(rsnext())
if(rsnext() == )
alert($responsesetBody( Failed to retrieve data ))
alert($responsestatus = $nethttpINTERNAL_SERVER_ERROR)
else
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010041
ltcodegt
Iacutem afraid and hope that you can help me
Kind regards
Andreacute
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1246 PM
gtIs there any restriction or development limitation in the XSJSLIB files
Thats a very general question Difficult to answer without any context
Vikas Madaan in response to Thomas Jung on page 41Feb 11 2014 1245 PM
Thanks Thomas
I think we are on same page
Once quick question that came to my mind Is there any restriction or development limitation in the XSJSLIB
files
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1230 PM
gtCould please help me in understanding in more advantagesdisadvantages for both techniques
Youve summarized it pretty well already
gtbecuase i dont want to use both the approaches
Even with the CRUD support and exits in XSODATA its still pretty hard to do 100 via XSODATA There are
still valid use cases for XSJS when you need custom body custom read processing job scheduling etc Its
good to try and use XSODATA whenever possible but I wouldnt automatically exclude the use of XSJS
Vikas MadaanFeb 11 2014 1008 AM
Hi Thomas
Thanks a lot for sharing useful information through various blogs
In my current project we are evaluating use of XSOData or XSJS applications I saw your videos like the one
mentioned below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010042
httpwwwsaphanacomdocsDOC-4376
Want i understood from various blog is this
From SP7 we can write exsits in the OData services and it is very easy to consume at the client side just like
any REST base service and from my understanding it is Scalable as well I would love to use XSOData always
becuase development effort is very less compare to XSJS and it is very easy to rampup the team on OData
related development objects
XSJS were as provide more control becuase of server side scripting becuase it allows development on the
server side using JavaScript Core APIs of SAP HANA Extended Application Services are therefore exposed
as JavaScript functions providing easy access to the HTTP Request and Response object as well database
access to execute SQL or call SQLScript Procedures It provide us control over the body format and and URL
parameter definition
Could please help me in understanding in more advantagesdisadvantages for both techniques
I am very keen to understand and also explain the same to team members becuase i dont want to use both the
approaches and even sometimes customer can also ask the same to us
Also If we are on SP6 then from my understanding XSJS provides us more capability in terms of complex
application Corrent me If i am wrong
Thanks
Regards
Vikas Madaan
Thomas Jung in response to Raghuveer Phull on page 42Feb 5 2014 312 PM
Yes there are videos on the CRUD features of XSODATA which were new in SP6
For more on CRUD support in SP6 see this video
oData CreateUpdateDelete Support in SAP HANA SPS6
For the extended support for XSJS exits in SP7 see this video
SAP HANA SPS 07 XSODATA Exits in XSJS
Raghuveer PhullFeb 5 2014 122 AM
Do you have an exampledocumentationvideo where you can write a service which will populate Hana DB
What I am asking for is a way for my external script to populate the DB tables i have created in Hana DB
Thomas Jung in response to reda miraoui on page 43Jan 29 2014 411 PM
The source code for the examples shown here are shipped as part of SHINE (SAP HANA Interactive
Education)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010043
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Vivek Singh Bhoj in response to reda miraoui on page 43Jan 29 2014 352 PM
Hi Reda
You can import Shine Content in HANA and then check all these source codes
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Regards
Vivek
reda miraoui in response to Thomas Jung on page Jan 29 2014 344 PM
Hey Thomas
Is it possible to download source code of your project from this HANA tutorial
Thanks
Reda
Thomas Jung in response to Abdul Hakim on page 43Nov 21 2013 1133 PM
Yes River can be used as an alternative and when activated it will generate Server Side JavaScript andor
SQLScript
Abdul Hakim in response to Thomas Jung on page 44Nov 21 2013 747 PM
Hi Thomas - Was going through blog regarding River (RDL)Just a question on this
When you say Programming language for HANA native development is Server side Javascript SQL SQL
ScriptOnce RDL is rolled out whether RDL can be used for native application development instead of Server
side Java script SQL SQL Script I am very much new to this stuff so appreciate if you can also help on
how to get started with Server Side Java script SQL SQL Script for HANA
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 30 2013 750 AM
Hi Thomas
Thanks for your response I am talking about more content on shine
thanks
Ashutosh
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010044
Baskar Gopalakrishnan in response to Thomas Jung on page 44Oct 30 2013 1249 AM
Hi Thomas
Im a SAP PI Middleware consultantSAP topic leader in XIPI heavily worked on Java related
Netweaver stack I have knowledge in ABAP but not worked heavily in abap I have enrolled your sap hana
native application development course I feel very interesting I did work heavily in java and javascript projects
using eclipse development tool Do you think if I invest my time in just native hana development and proceed
in HANA field is a good step I dont have BW experience either
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 819 PM
Thanks for the clarification Much appreciated
Thomas Jung in response to Abdul Hakim on page 44Oct 29 2013 120 PM
gtABAP Close to HANA means whether we can expect a similar 2 tier architecture similar to HANA XS in the
future or what does that mean
No it doesnt mean that ABAP will become a 2 tier architecture We will not move the ABAP VMKernel into
HANA itself It will remain a separate application server At least for the current plansforeseeable future What
he was referring to was bringing the programming models closer For instance the new 740 SP5 feature that
allows you to write SQLScript directly within an ABAP class method
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 650 AM
Thomas - Thanks for the clarificationMuch appreciatedI was listening to ABAP on HANA session by
Thorsten Schneider this year Teched and he was mentioning that SAP Plans to bring ABAP very close to
HANA in the coming future but not much details have been discussed in the sessionABAP Close to HANA
means whether we can expect a similar 2 tier architecture similar to HANA XS in the future or what does that
mean
Thanks
Hakim
Thomas Jung in response to Abdul Hakim on page 45Oct 28 2013 703 PM
gt whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the option is
recommended by SAP then kindly share the pros and cons of each of the item
Taken from the TechEd CD103 session slides
Guidance
bulluse ABAP for optimization of existing progams (in context of SAP Business Suite or BW)
bullconsider HANA Native Development for development of new applications which will solely run on SAP HANA
bullcombine ABAP and HANA Native Development to enrich existing applications (eg SAP HANA Live Fiori)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010045
ABAP
bullapplications follow 3-tier architecture
bullABAP is in general database agnostic but with release 74 optimized for SAP HANA
bullProgramming language ABAP ABAP OO with the option to use SAP HANA features
bullIDE eclipse-based ABAP Development Tools
HANA Native Development
bullapplications follow 2-tier architecture
bullHANA Native Development is SAP HANA specific and embedded in the database
bullProgramming language River server-side JavaScript SQLSQLScript
bullIDE eclipse-based SAP HANA Studio + web IDE
Thomas Jung in response to ashutosh dixit on page 45Oct 28 2013 701 PM
gtIs there any more demos for the SHINE
Im not exactly sure what you mean by that We are building additional content for SHINE that will be delivered
in SP7
Abdul HakimOct 28 2013 326 PM
Thomas - Let us say a customer is running SAP Netweaver 74 ABAP with HANA DB and they have HANA
extended service as wellIf the customer wants to do new developments then what is the recommendation
from SAP ie whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the
option is recommended by SAP then kindly share the pros and cons of each of the item (SAP Netweaver 74
ABAP Vs SAP HANA XS)
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 28 2013 221 PM
Hi Thomas
Thanks a lot for your its working now
Is there any more demos for the SHINE
Thanks
Ashutosh
Thomas Jung in response to ashutosh dixit on page 46Oct 25 2013 809 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010046
As this content is now standard in SP6 as part of SHINE (SAP HANA INteractive Education) there also some
setup instructions on helpsapcom
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Basic points to check - have you generated the synonyms in the data generator Ran the data generator to
create some data Have the role assigned Added client 001 to your user profile
ashutosh dixitOct 24 2013 130 PM
Hi Thomas
Amazing blog - once again Thomas thanks
I have been following you for many days attended your OPEN SAP course also
That was an amazing course for new learner like me
One of our client is looking forward for XS based search Application identical to what you have created in your
DEMO
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010047
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010048
But I am not able to fetch the data on blank HTML page is coming with no data
If there is any step by step document related to this please help in getting that
Any help will be highly appreciated
Thanks
Ashutosh
Naveen KumarSep 26 2013 1130 AM
Good Document
Heber FabianoAug 27 2013 323 PM
Great content as always Keep sharing with us
Thomas Jung in response to Orel Stringa on page 48Aug 27 2013 147 PM
This is currently not possible The CORS support is for all origins We dont yet have the feature to maintain a
whitelist of CORS origins
Orel Stringa in response to Thomas Jung on page Aug 27 2013 801 AM
Hi Thomas
nice to see that SAP has made it possible with SP6 to specify cross origin resource sharing (CORS) support
via the xsaccess file SP6 HANA development guide has example of how to specify CORS support
I have build an XS application and would like to serve SAPUI5 on a diffhost than XSHANA
How can I specify that I would like to allow cross origin access restricted to certain domain(s) only
Is there a special keyword syntax for specifying that
Thank yoi
Orel
Vijay UthayakumarAug 27 2013 131 AM
Highly informative amp digestible Fantastic work
Jerry WangAug 1 2013 955 AM
Hi Tomas
Thank you
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010049
Jerry
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 644 PM
JSLint checks are very strict and often produce syntax errors for items that just stylistic and wont actually
cause an error upon activation or runtime You can either ignore the JSLint errors or deactivate JSLint for this
project in these cases However it might also be an indication that the JavaScript code you are trying to import
isnt compatible with Strict mode
httpsdevelopermozillaorgen-USdocsWebJavaScriptReferenceFunctions_and_function_scope
Strict_mode
Milan Vrozina in response to Thomas Jung on page 49Jul 21 2013 624 PM
Thanks for clarification I thought there would be some kind of import
But anyway in case of this specific library I have some problems with JSLint validation when I do cut and paste
of the original code
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 343 PM
What kind of problem are you having using this library Strict mode JavaScript which doesnt try to access the
DOM Window or other client side specific objects should work in Server Side XSJS Generally if you have a
library you just cut and paste into your XSJS or an XSJSLIB file and then call the functions from your code
Milan VrozinaJul 21 2013 339 PM
Hello
first and foremost thank you for perfect openSAP classes related to HANA development and for this blog as
well
I have one question related to server-side javascript You mentioned in course that is possible to use 3rd party
libraries or reuse 3rd party code But I cant find a possible way how to import 3rd party javascript library -as
is- to server and use it For example I would like to use JSZip library to zip some file before sending it to client
from xsjs application Is that possible Thank you
Chandrashekhar MahajanJul 3 2013 734 PM
This is excellent blog Now HANA XS is very much clear to me
Mohan krishnaJul 1 2013 144 PM
WOW - great blog Thomas This will be very helpful in understanding SAP hana Good Job
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010050
Abdul Hakim in response to Thomas Jung on page 50Jun 27 2013 833 PM
Thanks for the clarification
Thomas Jung in response to Abdul Hakim on page 50Jun 27 2013 659 PM
HANA Extended Application Services uses SQLScript and JavaScript as its two primary programming
languages
gtwhether the current SAP Business suite based on ABAP will be completely migrated to HANA service
No The Business Suite already runs on HANA but still via the ABAP application server It will continue to
leverage HANA via a combination of enhancements to ABAP and utilizing some of the technologies described
in this blog
gtAlso whether ABAP can be used to built application in HANA extended services
No There is no ABAP language container in HANA Extended Application Services
Abdul HakimJun 27 2013 405 PM
Hi Thomas - What is the programming language used for HANA Extended application services
As HANA is more than a database ie application platform by itself and as you mentioned that more and more
applications will be built on HANA i have question as how the future SAP ERP system looks likewhether the
current SAP Business suite based on ABAP will be completely migrated to HANA service in the future or SAP
ABAP server will continue to evolve and receive focus investment from SAP Also whether ABAP can be used
to built application in HANA extended services Your thoughts
Thanks
Abdul Hakim
Thomas Jung in response to Ravindra Channe on page 50Jun 11 2013 830 PM
Yes it is still planned However we are still a couple of weeks away and Ive not seen the final installers to say
for certain its there
Ravindra ChanneJun 11 2013 815 PM
Hi Thomas
Thanks for a wonderful and very informative blog Is there any update on 32 bit REGI file
Is it expected along with SPS6
Regards
Ravi
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010051
Thomas Jung in response to Amanda Rzepka on page Jun 7 2013 942 PM
gtCan the XS Services be used in a BW on HANA Scenario
Yes XS is part of ALL HANA systems You should check and make sure you are licensed for direct access to
the underlying HANA instance however
Thomas Jung in response to Holger Schimanski on page Jun 7 2013 941 PM
gtIs there a similar library which could be used in XS Engine
The XSODATA development object is similar We also have higher level frameworks for XMLA and Search
Services (InA) You can expect more such high level frameworks to be added to the HANA Extended
Application Services in the future
Thomas Jung in response to Manav Mehra on page Jun 7 2013 939 PM
Have you used something like the Chrome developer tools to see see if you are getting any client side
javascript errors or to see if the request to your xsodata service is successful
Thomas Jung in response to Christian Hufnagl on page 52Jun 7 2013 938 PM
It will ship as non-automatic content in SPS6 (all systems will have it and it just needs to be imported) The
delivery units are also part of this weeks updates to the Cloudshare and AWS developer center images They
are also available for download as part of the content of the openSAP course
Thomas Jung in response to Matthew Pickell on page 51Jun 7 2013 937 PM
CORS support will come with SPS6 at the end of June
Thomas Jung in response to Jeroen Custers on page 51Jun 7 2013 936 PM
gtWill this bug be fixed in HANA ver 56
Personally Ive still experienced this bug in SPS6 internal builds Must be a tricky one to find Luckily the
workaround of closing and reopening isnt too difficult Just annoying This also probably makes the bug low
priority
Jeroen Custers in response to Vivek Singh Bhoj on page 52Jun 7 2013 411 PM
This issue also occurs on rev56
Matthew PickellJun 7 2013 258 PM
Thomas
Has CORS been included in a release yet
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010052
Vivek Singh Bhoj in response to Chandra Edem on page 52Jun 5 2013 601 AM
Hi Chandra
Date for Week1 Assignment has been extended till June 11
So you can give Week 1 Assignment now
Christian HufnaglJun 4 2013 543 PM
Hi Thomas
thank you for the interesting tutorial
Can you tell me whether it is possible to download the source code of the ldquoPutting it all togetherrdquovideo And if yes Where can I download itThanks
Christoph
Vivek Singh BhojJun 4 2013 1116 AM
Hi Thomas
Thanks for OpenSAP classes
Your Youtube Account also have very good exercises
IN OpenSAP Week 2 Unit 3 tutorial after assigning admin role to my user Id i am not able to see sequences
synonyms triggers under my schema or any other schema i am only able to see Column Views Procedures
Tables and Views
Though now i am able to insert data into my created table
Can you let me know how i will be able to see Sequences under my schema without removing the admin role
I am using HANA revision 52
Got to know from OpenSAP that
This is a known issue and the only way that Ive seen to fix it is to actually close the studio and open it again
then refresh the node
Cheers
Rich Heilman
SAP HANA Product Management
Will this bug be fixed in HANA ver 56
Chandra Edem in response to Thomas Jung on page 53Jun 4 2013 646 AM
Thomas
I registered for OpenSAP course Introduction to Software Development on SAP HANA on June 2 900PM
I didnt know that it is going to end WEEK1 assignment test on 632013 300PM Is there any way can take
that WEEK1 Assignment Test
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010053
Thanks
Chandra
Thomas Jung in response to Alexander Bauer on page Jun 3 2013 856 PM
SAPUI5 gets updated auutomatically when you apply HANA revisions There is no additional download or
update needed
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010013
$responsestatus = $nethttpOK
catch(e)
$responsecontentType = textplain
$responsesetBody(emessage)
$responsestatus = $nethttpINTERNAL_SERVER_ERROR
Following is the weatherxshttpdest
host = apiopenweathermaporg
port = 80
description = my weather checker
useSSL = false
pathPrefix = data25
authType = none
useProxy = true
proxyHost = ltproxy_detailsgt
proxyPort = ltproxy_port
timeout = 0
On accessing httplthostnamegt8000rootworkTara02XSTest01XSHttpTest01Weatherxsjs
ampcmd=import I am receiving the error message BodyasString unsupported charset specified in
Content-Type header (utf8)
If the body = responsebodyasString() statement is commented out I receive the error message
JSONparse unexpected character because the responsebodyasString() itself could not work correctly
However the URL httpapiopenweathermaporgdata25group
id=12750041264527127733312732941275339 returns data correctly
I am using the same URL in my code
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010014
Could you please advise regarding this issue Thanks for your help
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 14Nov 4 2014 319 PM
gtIs it possible to read files using XS For example some configuration file kept in the server
No there is no API to read from the file system of the underlying operating system You can read the HANA
configuration ini files however because they are exposed via SQL
gtIs it possible to call a html file from the xsjs file Something likerequestgetRequestDispatcher()forward() from
JAVA servlets
In the body of the response you send back to the client your could issue a redirect
Tarasankar Banerjee in response to Tarasankar Banerjee on page 15Nov 4 2014 1034 AM
Hi Thomas
Finally got my application running It is now fetching weather data from external sites
Have two more questions
1 Is it possible to read files using XS For example some configuration file kept in the server2 Is it possible to call a html file from the xsjs file Something like
requestgetRequestDispatcher()forward() from JAVA servlets
Thanks
Regards
Tarasankar
Robert WeberNov 3 2014 1136 AM
If someone is having difficulties with the alert log full on the xsengine
you can do the same trick as for the statisticserver in oder to reset the log area see details in OSS Notes
2019148 and 1950221
The commands are then
select VOLUME_ID from m_volumes where service_name = xsengine
ALTER SYSTEM ALTER CONFIGURATION (daemonini host lthostnamegt) UNSET
(xsengineinstances) WITH RECONFIGURE
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010015
ALTER SYSTEM ALTER CONFIGURATION (topologyini system) UNSET (hostlthostnamegt xsengine)
WITH RECONFIGURE
ALTER SYSTEM ALTER CONFIGURATION (topologyini system) UNSET (volumes ltvolume_idgt) WITH
RECONFIGURE
ALTER SYSTEM ALTER CONFIGURATION (daemonini host lthostnamegt) SET (xsengineinstances) =
1 WITH RECONFIGURE
Then restart the HANA instance and after that make a full backup (and schedule the regular backup in order to
prevent this situation again)
Hope this will help someone like me -)
Have a nice day
Regards
Robert
Tarasankar Banerjee in response to Tarasankar Banerjee on page 15Nov 3 2014 1031 AM
Update
I tried to access the XS Admin console from another user and faced only the No valid Crypto error However
could still update the proxy user details and the sample application successfully ran at last The relevant roles
were provided in Granted Roles not Application Privileges Probably that was the issue earlier
I would check again with new Http Destination and Server side Java Script
Thanks a lot Thomas for all your help
Regards
Tarasankar
Tarasankar Banerjee in response to Thomas Jung on page 18Nov 3 2014 929 AM
Hi Thomas
I also tried to use the sample code from section 841 Tutorial Use the XSJS Outbound API of the HANA
Developer Guide with minor modifications (for package structure proxy settings etc) This time the destination
was found The new project structure with the sample files yahooxshttpdest and sapStockxsjs is as below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010016
However it did not bring any data The content of the response object indicated that there was Proxy
authentication issue
When I tried to check the Destination in the XS Admin Console surprisingly none of the fields are populated
and everything (except the Trust Store drop down) is disabled All these fields are supposed to be populated
as indicated in the Modeling Guide
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010017
However the User already has the following privileges
The same scenario was present for the Http Destination I prepared earlier There are couple of internal errors
at the bottom On clicking them the following list is displayed
1 Internal Error dbError(ConnectionprepareStatement) 258 - insufficient privilege Not authorized at
ptimequerycheckerquery_checkcc24182 No valid SAP Crypto configuration
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010018
It appears from various blogs that the second error (No valid SAP Crypto configuration) is related to SSL
configuration in HANA I would contact the HANA Administrator to look into this issue Of course it would be
great if you could provide some insight
However I have no clue regarding the first error Request your help and cooperation in this regard
The initial issue of not finding the HttpDestination which I created still persists
Thanks for all your help
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 18Oct 31 2014 342 PM
First of all you would never use the workspace name It isnt ever part of anything It is only the package
structure that counts The first item in your list is the only one with the correct package Off hand it looks right to
me You are supposed to supply the full package path Have you configured this HTTP Destination in the XS
Admin tool yet
Tarasankar Banerjee in response to Thomas Jung on page 18Oct 31 2014 326 PM
Updated it Thanks
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 18Oct 31 2014 313 PM
Your comment got cut off We never really get to see what your problem is
Tarasankar Banerjee in response to Thomas Jung on page 21Oct 31 2014 256 PM
Thanks Thomas
I am facing as issue while trying to use an HTTP Destination I understand that the xshttpdest and xsjs file
need to in the same folder Following is the structure of my test project
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010019
As you can see the HTTP Destination and the XSJS files are in the same folder services The workspace
name is XS_Workspace and the package structure is as follows
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010020
Now I am trying to read this destination
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010021
When I am using full package structure destination_package =
rootworkTara02XSTest01XSHttpTest01services I am receiving the
error message httpreadDestination destination not found (package
rootworkTara02XSTest01XSHttpTest01services name XSHttpDest01)
On using the workspace name destination_package = XS_Workspaceservices I am receiving the
error message User is not authorized to use destination (package XS_Workspaceservices name
XSHttpDest01)
On using destination_package = rootworkTara02XSTest01services also I am receiving the error
message User is not authorized to use destination (package rootworkTara02XSTest01services
name XSHttpDest01) Strangely the services folder is not directly under XSTest01
Lastly I deliberately gave a wrong service name destination_package = XS_Workspaceservices and
destination_name = XSHttpDest02 But even then I received the error message User is not authorized to
use destination (package XS_Workspaceservices name XSHttpDest02) not that the destination is not
found
Could you please help me to resolve this issue
Thanks a lot for your helps
Regards
Tarasankar
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010022
Thomas Jung in response to Tarasankar Banerjee on page 22Oct 30 2014 152 PM
Since SPS06 its possible to use outbound HTTP destinations and to call out to external services using XSJS
Thomas Jung in response to Tarasankar Banerjee on page 22Oct 30 2014 150 PM
gtSo when the program runs in server would it automatically consider the OS user credentials
No It doesnt automatically use anything You have to specific the user and password that you want to use for
the proxy Although many proxy servers dont require a username and password
Tarasankar Banerjee in response to Thomas Jung on page 23Oct 30 2014 707 AM
Hi Thomas
Just watched the video you shared above Thanks a lot for it It is really informative and helpful
Regards
Tarasankar
Tarasankar Banerjee in response to Tarasankar Banerjee on page 22Oct 30 2014 346 AM
Got answer for the second point SAP HANA XS Administration Tool is the place to configure Proxy settings
Regards
Tarasankar
Tarasankar Banerjee in response to Tarasankar Banerjee on page 22Oct 29 2014 314 PM
Dear Thomas
another question is that does the proxy settings in the HttpDestination refer to the OS user of the HANA
server We specify useProxy as true and authType as basic in the HttpDestination but not maintain any
user credentials So when the program runs in server would it automatically consider the OS user credentials
Thanks
Regards
Tarasankar
Tarasankar Banerjee in response to Thomas Jung on page 23Oct 29 2014 132 PM
Thanks Thomas I am currently checking this option only
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010023
My current requirement is to fetch Weather Data and Social Media data from various OData services and store
them in HANA for further analysis What might be the best way for this I am currently checking the option of
creating an XS application which would connect to the external services fetch the data and save that in HANA
using DB Connection Is this the best way Or should we try to use JAVA or some other way
Your valuable suggestions are most welcome Thanks
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 23Oct 29 2014 1256 PM
gtHowever is it possible to consume XSODATA service from XSJS instead of using DB Connection
You can via an outbound HTTP destination although I certainly wouldnt recommend it It would be rather
complex and not well performing
gtAlso is it possible to consume data from external OData services for weather data social media data etc from
XSJS
Sure with the same Outbound HTTP Connectivity
httpswwwyoutubecomwatchv=fWirvj9l7eY
Maintaining HTTP Destinations - SAP HANA Developer Guide - SAP Library
Tarasankar BanerjeeOct 29 2014 1119 AM
Dear Thomas
Thanks for the great blog
I am able to connect to Database and execute queries from XSJS service However is it possible to consume
XSODATA service from XSJS instead of using DB Connection
Also is it possible to consume data from external OData services for weather data social media data etc from
XSJS
If possible it would be great if you could provide some code sample or guidelines
Thanks
Regards
Tarasankar
Thomas Jung in response to Weiping Lu on page 24Sep 25 2014 833 AM
Please refer to service note 1849775
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010024
httpservicesapcomsapsupportnotes1849775
I believe it will address your issue
Weiping LuSep 24 2014 519 PM
Hi Tom
Great post and videos I have a tough issue calling a HANA procedure from XS takes gt 5min but from HANA
studio lt 1 min Were using Amazon AWS rev 70 and 73 Any help will be greatly appreciated
Thanks
WPL
Thomas Jung in response to Su Srikanth on page 24Aug 11 2014 253 PM
You transport XSODATA services like you would any other repository content - via a Delivery Unit
Su SrikanthAug 11 2014 750 AM
Hi Thomas
Great blog
Ive a query here - we create the odata services(andor URLs created to view in the web browser) in
development environment now if we have to transport it to the quality andor production environment how
can we do this - is the same as importexport or is there any specific way to do please help with any useful
pointers
Many thanks as always
Su
Thomas Jung in response to ARSHAD SHAIKH on page 24May 15 2014 231 PM
Ive never written any blogs on calculation views I dont cover that topic That is why I suggested you ask your
question in the proper SCN forum
Although looking at your your above SQL Statement I dont see why you couldnt do this directly in XSODATA
off of the table STATUS without the need for the calculation view or the SQLScript Procedure
ARSHAD SHAIKH in response to Thomas Jung on page 25May 15 2014 1154 AM
Hello Thomas
I am new to hana Please suggest me the blogs of you related to calculation view that calling
procedures(procedures have out parameter)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010025
I am trying to fetch the result of procedure in calc view and want to create odata service for that calculation
view
procedure code goes like this
---------------------------------------
CREATE PROCEDURE TWEETS_TODAY(OUT OP BIGINT)
language SQLSCRIPT sql security invoker default schema SOCIAL360 reads sql data as
BEGIN
SELECT COUNT() INTO OP FROM SOCIAL360STATUS WHERE CREATED_AT = CURRENT_DATE
END
calc view code goes like this
----------------------------------------
Begin Procedure Script
BEGIN
DECLARE OP BIGINT
CALL SOCIAL360TWEETS_TODAY(OPvar_out)
END End Procedure Script
Thanks
-Arshad
Thomas Jung in response to ARSHAD SHAIKH on page 25May 15 2014 944 AM
Your question seems to have no relation to the content in this blog Please consider instead asking general
HANA questions in the appropriate SCN Forum
ARSHAD SHAIKHMay 15 2014 917 AM
Hi Thomas
I want to call procedures in calculation view (procedures have out parameter)
Please suggest me step by step procedure with example and supporting documents
Thanks
ARSHAD SHAIKH
Henrique Pinto in response to Blair Krotenko on page 26Apr 16 2014 711 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010026
Hmm not really sure of that I see it but that might be because Im an employee
But the NET development partner I was working with was not enrolled in any kind of beta testing program and
they were able to download it so I guess you should as well
Make sure to go in the Installation and Upgrades menu and not the Support Packages and Patches
Go to httpservicesapcomswdc -gt Installations and Upgrades -gt Browse our Download Catalog -gt SAP In-
Memory (SAP HANA) -gt SAP HANA ADONET 10
Best regards
Henrique
Blair Krotenko in response to Henrique Pinto on page 26Apr 16 2014 656 PM
Thanks for the info Henrique but I cant find it I dont know if it is an authorization issue or do we need to be a
ramp-up customer to dl and use a beta product
Thanks
Blair
Henrique Pinto in response to Thomas Jung on page 27Apr 16 2014 614 PM
The ADONET provider is available for download in the SAP Service Marketplace (in beta edition so far)
Thomas Jung in response to Kamal Jain on page 26Apr 16 2014 514 PM
For general OData structure and syntax I find that the Odataorg website is very helpful For example on this
topic
httpwwwodataorgdocumentationodata-version-2-0uri-conventions
The syntax of a $expand query option is a comma-separated list of Navigation Properties Additionally each
Navigation Property can be followed by a forward slash and another Navigation Property to enable identifying a
multi-level relationship
The page also has some sample URLs
Kamal JainApr 16 2014 536 AM
Dear Thomas
I agree that we need to pass all the associations in the expand I tried with some of options but was not
through
Now i just tried with below syntax and able to achive Thx
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010027
httpdewdftzld025pgdevsapcorp8000DTHCPXSZPMIS_PRO_ACTUALxsodata
ZPROHEADER(PR07_000002)$expand=ZACTUZEMPD
Regards
Kamal Jain
Thomas Jung in response to Blair Krotenko on page 27Apr 15 2014 623 PM
We do plan to release an ADONET provider specific to HANA in the near future This would probably be the
best option for consumption from NET Until then I would think that ODBC is probably the next best option It
gives you generally easy portability from already existing database code You could consume OData as well
although that is more generally consumed from the UI layer itself It guess it somewhat depends upon where
you are calling the service from in your NET application
Blair KrotenkoApr 15 2014 409 PM
Hi Thomas
We are looking at consuming HANA data in a NET application and from what I can see there are 2 options -
OData and ODBC It seems to me that OData might be the better option when consuming HANA data in an XS
application while ODBC might be the better option for NET What are your thoughts Is there a paper on this
subject I havent been able to find a comparison document for this Are there any security caveats to be aware
of for these options
Thanks
Blair
Thomas Jung in response to Kamal Jain on page 27Apr 15 2014 136 PM
You have to list both associations in the expand on the URL if you want both relationships to be processed
Kamal JainApr 15 2014 1249 PM
Hi Thomas
Thx for valuable and useful information
I have an query regarding XS Odata service creation for more than 2 tables and get all the data in one
command
There is req in which service needs to be created for 3 tables to get data from all these
First table has Project ID as key second table has composite
ProjectID and Employee Id as key and third table has Employee id as
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010028
key
So if I create navigation for first 2 tables based on project id and use expand comand than its working fine and I
can see data of both the tables
Further if I add navigation for third table also as below then below expand is displaying data for first two tables
only Pls share how to use expand command in this case if possible to get all tables data based on project id
How to use navigation ZEMPD here
httpdewdftzld025pgdevsapcorp8000DTHCPXSZPMIS_PRO_ACTUALxsodata
ZPROHEADER(PR07_000002)$expand=ZACTUamp
service namespace
DTHCPXS
DTHCPDTHCPDBHCP_PROJECT_HEADER
as ZPROHEADER
navigates (PROJECT as
ZACTU)
DTHCPDTHCPDBHCPT_ZPMIS_ACTUAL
as ZACTU
navigates (EMPLOYEE as
ZEMPD )
DTHCPDTHCPDBHCP_ZPMIS_RES_MASTER
as ZEMPD
association PROJECT principal
ZPROHEADER(PROJECTID)
multiplicity 1 dependent
ZACTU(PROJECTID) multiplicity
association EMPLOYEE principal
ZACTU(EMPLOYEEID)
multiplicity 1 dependent
ZEMPD(EMPLOYEEID) multiplicity
1
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010029
Pls suggest if there is anything to add or correct in XS odata service syntax above
Regards
Kamal Jain
Vikas Madaan in response to Thomas Jung on page 29Apr 14 2014 458 PM
Thanks Thomas
Under which component
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 29Apr 14 2014 450 PM
No this isnt a known issue Ive seen Nor can I recreate the problem in my system No you cant maintain the
authentication in XSHTTPDEST itself It intentionally must be set in XSADMIN tool I can really only suggest
that you open a support ticket
Vikas MadaanApr 14 2014 431 PM
Hi Thomas
I am trying to pull data from SAP system onto HANA Database using XSJOB files I am calling RFC enabled
function modules over HTTP request It helps me replicating the real time ECC data onto HANA as well with
back ground jobs
I am facing one problem in the XSHTTPDEST file I am able to create and activate the file using studio and this
file is even visible in the web based XS administration tool But in the web based tool when i provide user and
password for basic authotication then system just clears the user id and password when i try to save This the
reason our HTTP requests are getting failed and below is the response we are getting in the response body
lthtmlgtltheadgtlttitlegtLogon Error Messagelttitlegt
Is this known issue or we are missing something Is it possible to provide user and password in the
XSHTTPDEST file Is there any particular syntax
I checked and i have the required authorizations as well develper Guide
Please help
Regards
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010030
Vikas Madaan
Abdul HakimFeb 22 2014 359 AM
Hi Thomas - Any recommended book or resource to learn and master Server Side Javascript There were
many books available in the market but as a beginner need to know the right resource book to start with and
master this stuffAlso whether SAP plan to conduct any training to teach Server Side Javascript similar to other
standard training offerings
Thanks
Hakim
Samuel Tanor-GyeduFeb 20 2014 839 AM
Thanks Thomas
I will definitely have a look at SHINE
Thomas Jung in response to gentilini andre on page 30Feb 19 2014 422 PM
Difficult to say what is wrong I several things which are different than our sample that does this You are using
a POST for instance instead of a GET However if you are gettting a 200 then I assume the service call is
correct In client side tools (like Chrome Developer Tools) you should be able to see the response object from
the call
However what I would really recommend is that you study the SHINE content (SAP HANA Interactive
Education) There is already a sample application which does this in SHINE Also it has some special
JavaScript in the UI to handle the file attachment via AXAJ call Perhaps that is the part you are missing
You can read more about SHINE here It is also included already installed in the latest version of the HANA
Developer Center trial image (SP7 based)
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
gentilini andreFeb 19 2014 325 PM
Hi Thomas
well I followed your hints but it still donacutet work
I created a xsjs File like below
function downloadExcel()
try
var body =
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010031
alert(drin)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
alert(drusse)
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount
tTax Amount tNetto Amount tCurrency n
while(rsnext())
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
catch (e)
alert(db conn funktioniert nicht)
var a = $requestparametersget(cmd)
$responsesetBody(Invalid Command +a)
switch (a)
case doex
$responsesetBody(Invalid Command +a)
alert(filedownload)
thisdownloadExcel()
break
default
$responsestatus = $nethttpINTERNAL_SERVER_ERROR
$responsesetBody(Invalid Command +a)
The Controllerjs File
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010032
doFileDownload function (oEvent)
jQuerysaprequire(sapuicommonsMessageBox)
sapuicommonsMessageBoxshow(Export Starten sapuicommonsMessageBoxIconconfirm
Information)
sapuicommonsMessageBoxconfirm(Export starteninform Confirmation)
return false
function inform(rValue)
alert (drinnnnne)
var aurl = FileDownloadxsjscmd=doex
if(rValue) If User presses Ok
alert(aurl)
jQueryajax(
url aurl
method POST
dataType json
datacmddoex
success sapuicommonsMessageBoxalert(Export wird ausgefuumlhrtConfirmation)
errorfunction onErrorCall(jqXHR textStatus errorThrown)
alert(jqXHRstatus)
sapuicommonsMessageBoxshow(jqXHRstatus
ERROR
Error in calling Service )
return
complete sapuicommonsMessageBoxalert(Export Erfolgreich
abgeschlossenConfirmation)
)
return false
else If the user presses Cancel
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010033
sapuicommonsMessageBoxalert(Vorgang abgebrochenNotification)
)
at last but not least the view
sapuijsview(zag1_ui_cv_03Index
Specifies the Controller belonging to this View
In the case that it is not implemented or that null is returned this View does not have a Controller
memberOf zag1_ui_cv_03Index
getControllerName function()
return zag1_ui_cv_03Index
Is initially called once after the Controller has been instantiated It is the place where the UI is
constructed
Since the Controller is given to this method its event handlers can be attached right away
memberOf zag1_ui_cv_03Index
createContent function(oController)
create a lite button with an icon and a text
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010034
lite true
)placeAt(btn)
oButton3attachPress(oControllerdoFileDownload)
var oButton4 = new sapuicommonsButton(
text Refresh
icon imagesrefreshjpg
lite true
press function() var data = oTableval()
if(data == )
alert(no data found)
return
print(content)
print(DatArray)
if (data = )
alert(Funzt)
JSONToCSVConvertor(data CUSTOMER AMOUNT true)
)placeAt(btn)
jQuerysaprequire(sapuitableTable)
create table control with properties
var oTable = new sapuitableTable(
width 100
rowHeight 50
title Amount per Partner
selectionMode sapuitableSelectionModeNone
)
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Company Name
)
template new sapuicommonsTextView(
text CompanyName
)
sortProperty CompanyName
))
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010035
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Partner ID
)
template new sapuicommonsTextView(
text PartnerId
)
sortProperty PartnerId
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Postal Code
textAlign sapuicoreTextAlignEnd
)
template new sapuicommonsTextView(
text PostalCode
textAlign sapuicoreTextAlignEnd
)
sortProperty PostalCode
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text City
)
template new sapuicommonsTextView(
text City
)
sortProperty City
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Purchase ID
)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010036
template new sapuicommonsTextView(
text PurchaseOrderId
)
sortProperty Currency
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Lifecycle Status
)
template new sapuicommonsTextView(
text LifecycleStatus
)
sortProperty LifecycleStatus
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Gross Amount
)
template new sapuicommonsTextView(
text GrossAmount
)
sortProperty GrossAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Tax Amount
)
template new sapuicommonsTextView(
text TaxAmount
)
sortProperty TaxAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Amount Netto
)
template new sapuicommonsTextView(
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010037
text CM_NET_Amount_001
)
sortProperty CM_NET_Amount_001
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Currency
)
template new sapuicommonsTextView(
text Currency
)
sortProperty Currency
))
var oModel = new sapuimodelodataODataModel
(httpqperiorvmcldsr8000ZAG1_WS_001ZAG1_CV_001xsodata false)
oTablesetModel(oModel)
oTablebindRows(Amount)
return oTable
)
It wonacutet call the function or better said the action of the button works fine till to the point where it should call the
xsjsfile to generate the excel-file I wondered that in the ajax part the error- success- and complete-part will
be executed at the same time and not only one of this statements The message is 200 (The request has
succeeded The information returned with the response is dependent on the method used in the request)
Maybe you can see where my mistake is or whats going wrong
Iacuteve the developer edition on cloudshare (Hana Studio rev68 Server is on SPS05)
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010038
Andreacute
Thomas Jung in response to Samuel Tanor-Gyedu on page 38Feb 19 2014 523 AM
I dont think I can help you This appears to a question about how odata4j works not about XS I have no
experience with odata4j myself
Samuel Tanor-GyeduFeb 18 2014 913 AM
Hi Thomas
I have an odata service with this endpointhttpss5hanaxshanatrialondemandcomservicesUserxsodata
I am now trying to consume it from eclipse with the odata4j libraries
This is how I get the endpoint
public UserServiceOdata(String endpointUri)
thisendpointUri = endpointUri
ODataConsumerdumpresponseHeaders(true)
consumer = ODataConsumerscreate(endpointUri)
This is my method to add a user
public User addUser(User user)
consumercreateEntity(entitySet)properties(OPropertiesint32(propertyUserId
usergetId()))properties(OPropertiesstring(propertyUserName
usergetName()))properties(OPropertiesstring(propertyUserEmail usergetEmail()))execute()
return user
When I call addUser method I get an Error
Caused by javaxxmlstreamXMLStreamException ParseError at [rowcol][78253]
Message The reference to entity sourceUrl must end with the delimiter
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010039
When I use this endpoint httpss5hanaxshanatrialondemandcomservicesUsersvc everything works fine
With the httpss5hanaxshanatrialondemandcomservicesUserxsodata I get errors
Please I would be very grateful for assistance
Thanks in advance
Regards
Samuel
Thomas Jung in response to gentilini andre on page 39Feb 18 2014 431 AM
You have a fundamental misunderstanding here You are placing server side JavaScript code in your client
side UI5 application The function downloadExcel is something you need to execute on the server It needs to
be in an XSJS file and it is called from the client side via AJAX - as a REST service not as a local function
gentilini andreFeb 17 2014 451 PM
Hello Thomas
Thank you for this great How-To Guide
Iacutem pretty new in SAPUI5 and tried your export-sample in my little trial project but it doesnacutet work
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010040
My Button for this looks like
ltcodegt
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
lite true
press function() alert(oButton3getText())
downloadExcel()
ltcodegt
and the function for this action looks like
ltcodegt
function downloadExcel()
var body =
alert(drin)
print($query)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount tTax
Amount tNetto Amount tCurrency n
while(rsnext())
if(rsnext() == )
alert($responsesetBody( Failed to retrieve data ))
alert($responsestatus = $nethttpINTERNAL_SERVER_ERROR)
else
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010041
ltcodegt
Iacutem afraid and hope that you can help me
Kind regards
Andreacute
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1246 PM
gtIs there any restriction or development limitation in the XSJSLIB files
Thats a very general question Difficult to answer without any context
Vikas Madaan in response to Thomas Jung on page 41Feb 11 2014 1245 PM
Thanks Thomas
I think we are on same page
Once quick question that came to my mind Is there any restriction or development limitation in the XSJSLIB
files
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1230 PM
gtCould please help me in understanding in more advantagesdisadvantages for both techniques
Youve summarized it pretty well already
gtbecuase i dont want to use both the approaches
Even with the CRUD support and exits in XSODATA its still pretty hard to do 100 via XSODATA There are
still valid use cases for XSJS when you need custom body custom read processing job scheduling etc Its
good to try and use XSODATA whenever possible but I wouldnt automatically exclude the use of XSJS
Vikas MadaanFeb 11 2014 1008 AM
Hi Thomas
Thanks a lot for sharing useful information through various blogs
In my current project we are evaluating use of XSOData or XSJS applications I saw your videos like the one
mentioned below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010042
httpwwwsaphanacomdocsDOC-4376
Want i understood from various blog is this
From SP7 we can write exsits in the OData services and it is very easy to consume at the client side just like
any REST base service and from my understanding it is Scalable as well I would love to use XSOData always
becuase development effort is very less compare to XSJS and it is very easy to rampup the team on OData
related development objects
XSJS were as provide more control becuase of server side scripting becuase it allows development on the
server side using JavaScript Core APIs of SAP HANA Extended Application Services are therefore exposed
as JavaScript functions providing easy access to the HTTP Request and Response object as well database
access to execute SQL or call SQLScript Procedures It provide us control over the body format and and URL
parameter definition
Could please help me in understanding in more advantagesdisadvantages for both techniques
I am very keen to understand and also explain the same to team members becuase i dont want to use both the
approaches and even sometimes customer can also ask the same to us
Also If we are on SP6 then from my understanding XSJS provides us more capability in terms of complex
application Corrent me If i am wrong
Thanks
Regards
Vikas Madaan
Thomas Jung in response to Raghuveer Phull on page 42Feb 5 2014 312 PM
Yes there are videos on the CRUD features of XSODATA which were new in SP6
For more on CRUD support in SP6 see this video
oData CreateUpdateDelete Support in SAP HANA SPS6
For the extended support for XSJS exits in SP7 see this video
SAP HANA SPS 07 XSODATA Exits in XSJS
Raghuveer PhullFeb 5 2014 122 AM
Do you have an exampledocumentationvideo where you can write a service which will populate Hana DB
What I am asking for is a way for my external script to populate the DB tables i have created in Hana DB
Thomas Jung in response to reda miraoui on page 43Jan 29 2014 411 PM
The source code for the examples shown here are shipped as part of SHINE (SAP HANA Interactive
Education)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010043
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Vivek Singh Bhoj in response to reda miraoui on page 43Jan 29 2014 352 PM
Hi Reda
You can import Shine Content in HANA and then check all these source codes
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Regards
Vivek
reda miraoui in response to Thomas Jung on page Jan 29 2014 344 PM
Hey Thomas
Is it possible to download source code of your project from this HANA tutorial
Thanks
Reda
Thomas Jung in response to Abdul Hakim on page 43Nov 21 2013 1133 PM
Yes River can be used as an alternative and when activated it will generate Server Side JavaScript andor
SQLScript
Abdul Hakim in response to Thomas Jung on page 44Nov 21 2013 747 PM
Hi Thomas - Was going through blog regarding River (RDL)Just a question on this
When you say Programming language for HANA native development is Server side Javascript SQL SQL
ScriptOnce RDL is rolled out whether RDL can be used for native application development instead of Server
side Java script SQL SQL Script I am very much new to this stuff so appreciate if you can also help on
how to get started with Server Side Java script SQL SQL Script for HANA
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 30 2013 750 AM
Hi Thomas
Thanks for your response I am talking about more content on shine
thanks
Ashutosh
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010044
Baskar Gopalakrishnan in response to Thomas Jung on page 44Oct 30 2013 1249 AM
Hi Thomas
Im a SAP PI Middleware consultantSAP topic leader in XIPI heavily worked on Java related
Netweaver stack I have knowledge in ABAP but not worked heavily in abap I have enrolled your sap hana
native application development course I feel very interesting I did work heavily in java and javascript projects
using eclipse development tool Do you think if I invest my time in just native hana development and proceed
in HANA field is a good step I dont have BW experience either
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 819 PM
Thanks for the clarification Much appreciated
Thomas Jung in response to Abdul Hakim on page 44Oct 29 2013 120 PM
gtABAP Close to HANA means whether we can expect a similar 2 tier architecture similar to HANA XS in the
future or what does that mean
No it doesnt mean that ABAP will become a 2 tier architecture We will not move the ABAP VMKernel into
HANA itself It will remain a separate application server At least for the current plansforeseeable future What
he was referring to was bringing the programming models closer For instance the new 740 SP5 feature that
allows you to write SQLScript directly within an ABAP class method
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 650 AM
Thomas - Thanks for the clarificationMuch appreciatedI was listening to ABAP on HANA session by
Thorsten Schneider this year Teched and he was mentioning that SAP Plans to bring ABAP very close to
HANA in the coming future but not much details have been discussed in the sessionABAP Close to HANA
means whether we can expect a similar 2 tier architecture similar to HANA XS in the future or what does that
mean
Thanks
Hakim
Thomas Jung in response to Abdul Hakim on page 45Oct 28 2013 703 PM
gt whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the option is
recommended by SAP then kindly share the pros and cons of each of the item
Taken from the TechEd CD103 session slides
Guidance
bulluse ABAP for optimization of existing progams (in context of SAP Business Suite or BW)
bullconsider HANA Native Development for development of new applications which will solely run on SAP HANA
bullcombine ABAP and HANA Native Development to enrich existing applications (eg SAP HANA Live Fiori)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010045
ABAP
bullapplications follow 3-tier architecture
bullABAP is in general database agnostic but with release 74 optimized for SAP HANA
bullProgramming language ABAP ABAP OO with the option to use SAP HANA features
bullIDE eclipse-based ABAP Development Tools
HANA Native Development
bullapplications follow 2-tier architecture
bullHANA Native Development is SAP HANA specific and embedded in the database
bullProgramming language River server-side JavaScript SQLSQLScript
bullIDE eclipse-based SAP HANA Studio + web IDE
Thomas Jung in response to ashutosh dixit on page 45Oct 28 2013 701 PM
gtIs there any more demos for the SHINE
Im not exactly sure what you mean by that We are building additional content for SHINE that will be delivered
in SP7
Abdul HakimOct 28 2013 326 PM
Thomas - Let us say a customer is running SAP Netweaver 74 ABAP with HANA DB and they have HANA
extended service as wellIf the customer wants to do new developments then what is the recommendation
from SAP ie whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the
option is recommended by SAP then kindly share the pros and cons of each of the item (SAP Netweaver 74
ABAP Vs SAP HANA XS)
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 28 2013 221 PM
Hi Thomas
Thanks a lot for your its working now
Is there any more demos for the SHINE
Thanks
Ashutosh
Thomas Jung in response to ashutosh dixit on page 46Oct 25 2013 809 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010046
As this content is now standard in SP6 as part of SHINE (SAP HANA INteractive Education) there also some
setup instructions on helpsapcom
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Basic points to check - have you generated the synonyms in the data generator Ran the data generator to
create some data Have the role assigned Added client 001 to your user profile
ashutosh dixitOct 24 2013 130 PM
Hi Thomas
Amazing blog - once again Thomas thanks
I have been following you for many days attended your OPEN SAP course also
That was an amazing course for new learner like me
One of our client is looking forward for XS based search Application identical to what you have created in your
DEMO
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010047
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010048
But I am not able to fetch the data on blank HTML page is coming with no data
If there is any step by step document related to this please help in getting that
Any help will be highly appreciated
Thanks
Ashutosh
Naveen KumarSep 26 2013 1130 AM
Good Document
Heber FabianoAug 27 2013 323 PM
Great content as always Keep sharing with us
Thomas Jung in response to Orel Stringa on page 48Aug 27 2013 147 PM
This is currently not possible The CORS support is for all origins We dont yet have the feature to maintain a
whitelist of CORS origins
Orel Stringa in response to Thomas Jung on page Aug 27 2013 801 AM
Hi Thomas
nice to see that SAP has made it possible with SP6 to specify cross origin resource sharing (CORS) support
via the xsaccess file SP6 HANA development guide has example of how to specify CORS support
I have build an XS application and would like to serve SAPUI5 on a diffhost than XSHANA
How can I specify that I would like to allow cross origin access restricted to certain domain(s) only
Is there a special keyword syntax for specifying that
Thank yoi
Orel
Vijay UthayakumarAug 27 2013 131 AM
Highly informative amp digestible Fantastic work
Jerry WangAug 1 2013 955 AM
Hi Tomas
Thank you
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010049
Jerry
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 644 PM
JSLint checks are very strict and often produce syntax errors for items that just stylistic and wont actually
cause an error upon activation or runtime You can either ignore the JSLint errors or deactivate JSLint for this
project in these cases However it might also be an indication that the JavaScript code you are trying to import
isnt compatible with Strict mode
httpsdevelopermozillaorgen-USdocsWebJavaScriptReferenceFunctions_and_function_scope
Strict_mode
Milan Vrozina in response to Thomas Jung on page 49Jul 21 2013 624 PM
Thanks for clarification I thought there would be some kind of import
But anyway in case of this specific library I have some problems with JSLint validation when I do cut and paste
of the original code
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 343 PM
What kind of problem are you having using this library Strict mode JavaScript which doesnt try to access the
DOM Window or other client side specific objects should work in Server Side XSJS Generally if you have a
library you just cut and paste into your XSJS or an XSJSLIB file and then call the functions from your code
Milan VrozinaJul 21 2013 339 PM
Hello
first and foremost thank you for perfect openSAP classes related to HANA development and for this blog as
well
I have one question related to server-side javascript You mentioned in course that is possible to use 3rd party
libraries or reuse 3rd party code But I cant find a possible way how to import 3rd party javascript library -as
is- to server and use it For example I would like to use JSZip library to zip some file before sending it to client
from xsjs application Is that possible Thank you
Chandrashekhar MahajanJul 3 2013 734 PM
This is excellent blog Now HANA XS is very much clear to me
Mohan krishnaJul 1 2013 144 PM
WOW - great blog Thomas This will be very helpful in understanding SAP hana Good Job
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010050
Abdul Hakim in response to Thomas Jung on page 50Jun 27 2013 833 PM
Thanks for the clarification
Thomas Jung in response to Abdul Hakim on page 50Jun 27 2013 659 PM
HANA Extended Application Services uses SQLScript and JavaScript as its two primary programming
languages
gtwhether the current SAP Business suite based on ABAP will be completely migrated to HANA service
No The Business Suite already runs on HANA but still via the ABAP application server It will continue to
leverage HANA via a combination of enhancements to ABAP and utilizing some of the technologies described
in this blog
gtAlso whether ABAP can be used to built application in HANA extended services
No There is no ABAP language container in HANA Extended Application Services
Abdul HakimJun 27 2013 405 PM
Hi Thomas - What is the programming language used for HANA Extended application services
As HANA is more than a database ie application platform by itself and as you mentioned that more and more
applications will be built on HANA i have question as how the future SAP ERP system looks likewhether the
current SAP Business suite based on ABAP will be completely migrated to HANA service in the future or SAP
ABAP server will continue to evolve and receive focus investment from SAP Also whether ABAP can be used
to built application in HANA extended services Your thoughts
Thanks
Abdul Hakim
Thomas Jung in response to Ravindra Channe on page 50Jun 11 2013 830 PM
Yes it is still planned However we are still a couple of weeks away and Ive not seen the final installers to say
for certain its there
Ravindra ChanneJun 11 2013 815 PM
Hi Thomas
Thanks for a wonderful and very informative blog Is there any update on 32 bit REGI file
Is it expected along with SPS6
Regards
Ravi
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010051
Thomas Jung in response to Amanda Rzepka on page Jun 7 2013 942 PM
gtCan the XS Services be used in a BW on HANA Scenario
Yes XS is part of ALL HANA systems You should check and make sure you are licensed for direct access to
the underlying HANA instance however
Thomas Jung in response to Holger Schimanski on page Jun 7 2013 941 PM
gtIs there a similar library which could be used in XS Engine
The XSODATA development object is similar We also have higher level frameworks for XMLA and Search
Services (InA) You can expect more such high level frameworks to be added to the HANA Extended
Application Services in the future
Thomas Jung in response to Manav Mehra on page Jun 7 2013 939 PM
Have you used something like the Chrome developer tools to see see if you are getting any client side
javascript errors or to see if the request to your xsodata service is successful
Thomas Jung in response to Christian Hufnagl on page 52Jun 7 2013 938 PM
It will ship as non-automatic content in SPS6 (all systems will have it and it just needs to be imported) The
delivery units are also part of this weeks updates to the Cloudshare and AWS developer center images They
are also available for download as part of the content of the openSAP course
Thomas Jung in response to Matthew Pickell on page 51Jun 7 2013 937 PM
CORS support will come with SPS6 at the end of June
Thomas Jung in response to Jeroen Custers on page 51Jun 7 2013 936 PM
gtWill this bug be fixed in HANA ver 56
Personally Ive still experienced this bug in SPS6 internal builds Must be a tricky one to find Luckily the
workaround of closing and reopening isnt too difficult Just annoying This also probably makes the bug low
priority
Jeroen Custers in response to Vivek Singh Bhoj on page 52Jun 7 2013 411 PM
This issue also occurs on rev56
Matthew PickellJun 7 2013 258 PM
Thomas
Has CORS been included in a release yet
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010052
Vivek Singh Bhoj in response to Chandra Edem on page 52Jun 5 2013 601 AM
Hi Chandra
Date for Week1 Assignment has been extended till June 11
So you can give Week 1 Assignment now
Christian HufnaglJun 4 2013 543 PM
Hi Thomas
thank you for the interesting tutorial
Can you tell me whether it is possible to download the source code of the ldquoPutting it all togetherrdquovideo And if yes Where can I download itThanks
Christoph
Vivek Singh BhojJun 4 2013 1116 AM
Hi Thomas
Thanks for OpenSAP classes
Your Youtube Account also have very good exercises
IN OpenSAP Week 2 Unit 3 tutorial after assigning admin role to my user Id i am not able to see sequences
synonyms triggers under my schema or any other schema i am only able to see Column Views Procedures
Tables and Views
Though now i am able to insert data into my created table
Can you let me know how i will be able to see Sequences under my schema without removing the admin role
I am using HANA revision 52
Got to know from OpenSAP that
This is a known issue and the only way that Ive seen to fix it is to actually close the studio and open it again
then refresh the node
Cheers
Rich Heilman
SAP HANA Product Management
Will this bug be fixed in HANA ver 56
Chandra Edem in response to Thomas Jung on page 53Jun 4 2013 646 AM
Thomas
I registered for OpenSAP course Introduction to Software Development on SAP HANA on June 2 900PM
I didnt know that it is going to end WEEK1 assignment test on 632013 300PM Is there any way can take
that WEEK1 Assignment Test
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010053
Thanks
Chandra
Thomas Jung in response to Alexander Bauer on page Jun 3 2013 856 PM
SAPUI5 gets updated auutomatically when you apply HANA revisions There is no additional download or
update needed
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010014
Could you please advise regarding this issue Thanks for your help
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 14Nov 4 2014 319 PM
gtIs it possible to read files using XS For example some configuration file kept in the server
No there is no API to read from the file system of the underlying operating system You can read the HANA
configuration ini files however because they are exposed via SQL
gtIs it possible to call a html file from the xsjs file Something likerequestgetRequestDispatcher()forward() from
JAVA servlets
In the body of the response you send back to the client your could issue a redirect
Tarasankar Banerjee in response to Tarasankar Banerjee on page 15Nov 4 2014 1034 AM
Hi Thomas
Finally got my application running It is now fetching weather data from external sites
Have two more questions
1 Is it possible to read files using XS For example some configuration file kept in the server2 Is it possible to call a html file from the xsjs file Something like
requestgetRequestDispatcher()forward() from JAVA servlets
Thanks
Regards
Tarasankar
Robert WeberNov 3 2014 1136 AM
If someone is having difficulties with the alert log full on the xsengine
you can do the same trick as for the statisticserver in oder to reset the log area see details in OSS Notes
2019148 and 1950221
The commands are then
select VOLUME_ID from m_volumes where service_name = xsengine
ALTER SYSTEM ALTER CONFIGURATION (daemonini host lthostnamegt) UNSET
(xsengineinstances) WITH RECONFIGURE
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010015
ALTER SYSTEM ALTER CONFIGURATION (topologyini system) UNSET (hostlthostnamegt xsengine)
WITH RECONFIGURE
ALTER SYSTEM ALTER CONFIGURATION (topologyini system) UNSET (volumes ltvolume_idgt) WITH
RECONFIGURE
ALTER SYSTEM ALTER CONFIGURATION (daemonini host lthostnamegt) SET (xsengineinstances) =
1 WITH RECONFIGURE
Then restart the HANA instance and after that make a full backup (and schedule the regular backup in order to
prevent this situation again)
Hope this will help someone like me -)
Have a nice day
Regards
Robert
Tarasankar Banerjee in response to Tarasankar Banerjee on page 15Nov 3 2014 1031 AM
Update
I tried to access the XS Admin console from another user and faced only the No valid Crypto error However
could still update the proxy user details and the sample application successfully ran at last The relevant roles
were provided in Granted Roles not Application Privileges Probably that was the issue earlier
I would check again with new Http Destination and Server side Java Script
Thanks a lot Thomas for all your help
Regards
Tarasankar
Tarasankar Banerjee in response to Thomas Jung on page 18Nov 3 2014 929 AM
Hi Thomas
I also tried to use the sample code from section 841 Tutorial Use the XSJS Outbound API of the HANA
Developer Guide with minor modifications (for package structure proxy settings etc) This time the destination
was found The new project structure with the sample files yahooxshttpdest and sapStockxsjs is as below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010016
However it did not bring any data The content of the response object indicated that there was Proxy
authentication issue
When I tried to check the Destination in the XS Admin Console surprisingly none of the fields are populated
and everything (except the Trust Store drop down) is disabled All these fields are supposed to be populated
as indicated in the Modeling Guide
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010017
However the User already has the following privileges
The same scenario was present for the Http Destination I prepared earlier There are couple of internal errors
at the bottom On clicking them the following list is displayed
1 Internal Error dbError(ConnectionprepareStatement) 258 - insufficient privilege Not authorized at
ptimequerycheckerquery_checkcc24182 No valid SAP Crypto configuration
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010018
It appears from various blogs that the second error (No valid SAP Crypto configuration) is related to SSL
configuration in HANA I would contact the HANA Administrator to look into this issue Of course it would be
great if you could provide some insight
However I have no clue regarding the first error Request your help and cooperation in this regard
The initial issue of not finding the HttpDestination which I created still persists
Thanks for all your help
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 18Oct 31 2014 342 PM
First of all you would never use the workspace name It isnt ever part of anything It is only the package
structure that counts The first item in your list is the only one with the correct package Off hand it looks right to
me You are supposed to supply the full package path Have you configured this HTTP Destination in the XS
Admin tool yet
Tarasankar Banerjee in response to Thomas Jung on page 18Oct 31 2014 326 PM
Updated it Thanks
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 18Oct 31 2014 313 PM
Your comment got cut off We never really get to see what your problem is
Tarasankar Banerjee in response to Thomas Jung on page 21Oct 31 2014 256 PM
Thanks Thomas
I am facing as issue while trying to use an HTTP Destination I understand that the xshttpdest and xsjs file
need to in the same folder Following is the structure of my test project
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010019
As you can see the HTTP Destination and the XSJS files are in the same folder services The workspace
name is XS_Workspace and the package structure is as follows
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010020
Now I am trying to read this destination
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010021
When I am using full package structure destination_package =
rootworkTara02XSTest01XSHttpTest01services I am receiving the
error message httpreadDestination destination not found (package
rootworkTara02XSTest01XSHttpTest01services name XSHttpDest01)
On using the workspace name destination_package = XS_Workspaceservices I am receiving the
error message User is not authorized to use destination (package XS_Workspaceservices name
XSHttpDest01)
On using destination_package = rootworkTara02XSTest01services also I am receiving the error
message User is not authorized to use destination (package rootworkTara02XSTest01services
name XSHttpDest01) Strangely the services folder is not directly under XSTest01
Lastly I deliberately gave a wrong service name destination_package = XS_Workspaceservices and
destination_name = XSHttpDest02 But even then I received the error message User is not authorized to
use destination (package XS_Workspaceservices name XSHttpDest02) not that the destination is not
found
Could you please help me to resolve this issue
Thanks a lot for your helps
Regards
Tarasankar
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010022
Thomas Jung in response to Tarasankar Banerjee on page 22Oct 30 2014 152 PM
Since SPS06 its possible to use outbound HTTP destinations and to call out to external services using XSJS
Thomas Jung in response to Tarasankar Banerjee on page 22Oct 30 2014 150 PM
gtSo when the program runs in server would it automatically consider the OS user credentials
No It doesnt automatically use anything You have to specific the user and password that you want to use for
the proxy Although many proxy servers dont require a username and password
Tarasankar Banerjee in response to Thomas Jung on page 23Oct 30 2014 707 AM
Hi Thomas
Just watched the video you shared above Thanks a lot for it It is really informative and helpful
Regards
Tarasankar
Tarasankar Banerjee in response to Tarasankar Banerjee on page 22Oct 30 2014 346 AM
Got answer for the second point SAP HANA XS Administration Tool is the place to configure Proxy settings
Regards
Tarasankar
Tarasankar Banerjee in response to Tarasankar Banerjee on page 22Oct 29 2014 314 PM
Dear Thomas
another question is that does the proxy settings in the HttpDestination refer to the OS user of the HANA
server We specify useProxy as true and authType as basic in the HttpDestination but not maintain any
user credentials So when the program runs in server would it automatically consider the OS user credentials
Thanks
Regards
Tarasankar
Tarasankar Banerjee in response to Thomas Jung on page 23Oct 29 2014 132 PM
Thanks Thomas I am currently checking this option only
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010023
My current requirement is to fetch Weather Data and Social Media data from various OData services and store
them in HANA for further analysis What might be the best way for this I am currently checking the option of
creating an XS application which would connect to the external services fetch the data and save that in HANA
using DB Connection Is this the best way Or should we try to use JAVA or some other way
Your valuable suggestions are most welcome Thanks
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 23Oct 29 2014 1256 PM
gtHowever is it possible to consume XSODATA service from XSJS instead of using DB Connection
You can via an outbound HTTP destination although I certainly wouldnt recommend it It would be rather
complex and not well performing
gtAlso is it possible to consume data from external OData services for weather data social media data etc from
XSJS
Sure with the same Outbound HTTP Connectivity
httpswwwyoutubecomwatchv=fWirvj9l7eY
Maintaining HTTP Destinations - SAP HANA Developer Guide - SAP Library
Tarasankar BanerjeeOct 29 2014 1119 AM
Dear Thomas
Thanks for the great blog
I am able to connect to Database and execute queries from XSJS service However is it possible to consume
XSODATA service from XSJS instead of using DB Connection
Also is it possible to consume data from external OData services for weather data social media data etc from
XSJS
If possible it would be great if you could provide some code sample or guidelines
Thanks
Regards
Tarasankar
Thomas Jung in response to Weiping Lu on page 24Sep 25 2014 833 AM
Please refer to service note 1849775
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010024
httpservicesapcomsapsupportnotes1849775
I believe it will address your issue
Weiping LuSep 24 2014 519 PM
Hi Tom
Great post and videos I have a tough issue calling a HANA procedure from XS takes gt 5min but from HANA
studio lt 1 min Were using Amazon AWS rev 70 and 73 Any help will be greatly appreciated
Thanks
WPL
Thomas Jung in response to Su Srikanth on page 24Aug 11 2014 253 PM
You transport XSODATA services like you would any other repository content - via a Delivery Unit
Su SrikanthAug 11 2014 750 AM
Hi Thomas
Great blog
Ive a query here - we create the odata services(andor URLs created to view in the web browser) in
development environment now if we have to transport it to the quality andor production environment how
can we do this - is the same as importexport or is there any specific way to do please help with any useful
pointers
Many thanks as always
Su
Thomas Jung in response to ARSHAD SHAIKH on page 24May 15 2014 231 PM
Ive never written any blogs on calculation views I dont cover that topic That is why I suggested you ask your
question in the proper SCN forum
Although looking at your your above SQL Statement I dont see why you couldnt do this directly in XSODATA
off of the table STATUS without the need for the calculation view or the SQLScript Procedure
ARSHAD SHAIKH in response to Thomas Jung on page 25May 15 2014 1154 AM
Hello Thomas
I am new to hana Please suggest me the blogs of you related to calculation view that calling
procedures(procedures have out parameter)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010025
I am trying to fetch the result of procedure in calc view and want to create odata service for that calculation
view
procedure code goes like this
---------------------------------------
CREATE PROCEDURE TWEETS_TODAY(OUT OP BIGINT)
language SQLSCRIPT sql security invoker default schema SOCIAL360 reads sql data as
BEGIN
SELECT COUNT() INTO OP FROM SOCIAL360STATUS WHERE CREATED_AT = CURRENT_DATE
END
calc view code goes like this
----------------------------------------
Begin Procedure Script
BEGIN
DECLARE OP BIGINT
CALL SOCIAL360TWEETS_TODAY(OPvar_out)
END End Procedure Script
Thanks
-Arshad
Thomas Jung in response to ARSHAD SHAIKH on page 25May 15 2014 944 AM
Your question seems to have no relation to the content in this blog Please consider instead asking general
HANA questions in the appropriate SCN Forum
ARSHAD SHAIKHMay 15 2014 917 AM
Hi Thomas
I want to call procedures in calculation view (procedures have out parameter)
Please suggest me step by step procedure with example and supporting documents
Thanks
ARSHAD SHAIKH
Henrique Pinto in response to Blair Krotenko on page 26Apr 16 2014 711 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010026
Hmm not really sure of that I see it but that might be because Im an employee
But the NET development partner I was working with was not enrolled in any kind of beta testing program and
they were able to download it so I guess you should as well
Make sure to go in the Installation and Upgrades menu and not the Support Packages and Patches
Go to httpservicesapcomswdc -gt Installations and Upgrades -gt Browse our Download Catalog -gt SAP In-
Memory (SAP HANA) -gt SAP HANA ADONET 10
Best regards
Henrique
Blair Krotenko in response to Henrique Pinto on page 26Apr 16 2014 656 PM
Thanks for the info Henrique but I cant find it I dont know if it is an authorization issue or do we need to be a
ramp-up customer to dl and use a beta product
Thanks
Blair
Henrique Pinto in response to Thomas Jung on page 27Apr 16 2014 614 PM
The ADONET provider is available for download in the SAP Service Marketplace (in beta edition so far)
Thomas Jung in response to Kamal Jain on page 26Apr 16 2014 514 PM
For general OData structure and syntax I find that the Odataorg website is very helpful For example on this
topic
httpwwwodataorgdocumentationodata-version-2-0uri-conventions
The syntax of a $expand query option is a comma-separated list of Navigation Properties Additionally each
Navigation Property can be followed by a forward slash and another Navigation Property to enable identifying a
multi-level relationship
The page also has some sample URLs
Kamal JainApr 16 2014 536 AM
Dear Thomas
I agree that we need to pass all the associations in the expand I tried with some of options but was not
through
Now i just tried with below syntax and able to achive Thx
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010027
httpdewdftzld025pgdevsapcorp8000DTHCPXSZPMIS_PRO_ACTUALxsodata
ZPROHEADER(PR07_000002)$expand=ZACTUZEMPD
Regards
Kamal Jain
Thomas Jung in response to Blair Krotenko on page 27Apr 15 2014 623 PM
We do plan to release an ADONET provider specific to HANA in the near future This would probably be the
best option for consumption from NET Until then I would think that ODBC is probably the next best option It
gives you generally easy portability from already existing database code You could consume OData as well
although that is more generally consumed from the UI layer itself It guess it somewhat depends upon where
you are calling the service from in your NET application
Blair KrotenkoApr 15 2014 409 PM
Hi Thomas
We are looking at consuming HANA data in a NET application and from what I can see there are 2 options -
OData and ODBC It seems to me that OData might be the better option when consuming HANA data in an XS
application while ODBC might be the better option for NET What are your thoughts Is there a paper on this
subject I havent been able to find a comparison document for this Are there any security caveats to be aware
of for these options
Thanks
Blair
Thomas Jung in response to Kamal Jain on page 27Apr 15 2014 136 PM
You have to list both associations in the expand on the URL if you want both relationships to be processed
Kamal JainApr 15 2014 1249 PM
Hi Thomas
Thx for valuable and useful information
I have an query regarding XS Odata service creation for more than 2 tables and get all the data in one
command
There is req in which service needs to be created for 3 tables to get data from all these
First table has Project ID as key second table has composite
ProjectID and Employee Id as key and third table has Employee id as
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010028
key
So if I create navigation for first 2 tables based on project id and use expand comand than its working fine and I
can see data of both the tables
Further if I add navigation for third table also as below then below expand is displaying data for first two tables
only Pls share how to use expand command in this case if possible to get all tables data based on project id
How to use navigation ZEMPD here
httpdewdftzld025pgdevsapcorp8000DTHCPXSZPMIS_PRO_ACTUALxsodata
ZPROHEADER(PR07_000002)$expand=ZACTUamp
service namespace
DTHCPXS
DTHCPDTHCPDBHCP_PROJECT_HEADER
as ZPROHEADER
navigates (PROJECT as
ZACTU)
DTHCPDTHCPDBHCPT_ZPMIS_ACTUAL
as ZACTU
navigates (EMPLOYEE as
ZEMPD )
DTHCPDTHCPDBHCP_ZPMIS_RES_MASTER
as ZEMPD
association PROJECT principal
ZPROHEADER(PROJECTID)
multiplicity 1 dependent
ZACTU(PROJECTID) multiplicity
association EMPLOYEE principal
ZACTU(EMPLOYEEID)
multiplicity 1 dependent
ZEMPD(EMPLOYEEID) multiplicity
1
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010029
Pls suggest if there is anything to add or correct in XS odata service syntax above
Regards
Kamal Jain
Vikas Madaan in response to Thomas Jung on page 29Apr 14 2014 458 PM
Thanks Thomas
Under which component
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 29Apr 14 2014 450 PM
No this isnt a known issue Ive seen Nor can I recreate the problem in my system No you cant maintain the
authentication in XSHTTPDEST itself It intentionally must be set in XSADMIN tool I can really only suggest
that you open a support ticket
Vikas MadaanApr 14 2014 431 PM
Hi Thomas
I am trying to pull data from SAP system onto HANA Database using XSJOB files I am calling RFC enabled
function modules over HTTP request It helps me replicating the real time ECC data onto HANA as well with
back ground jobs
I am facing one problem in the XSHTTPDEST file I am able to create and activate the file using studio and this
file is even visible in the web based XS administration tool But in the web based tool when i provide user and
password for basic authotication then system just clears the user id and password when i try to save This the
reason our HTTP requests are getting failed and below is the response we are getting in the response body
lthtmlgtltheadgtlttitlegtLogon Error Messagelttitlegt
Is this known issue or we are missing something Is it possible to provide user and password in the
XSHTTPDEST file Is there any particular syntax
I checked and i have the required authorizations as well develper Guide
Please help
Regards
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010030
Vikas Madaan
Abdul HakimFeb 22 2014 359 AM
Hi Thomas - Any recommended book or resource to learn and master Server Side Javascript There were
many books available in the market but as a beginner need to know the right resource book to start with and
master this stuffAlso whether SAP plan to conduct any training to teach Server Side Javascript similar to other
standard training offerings
Thanks
Hakim
Samuel Tanor-GyeduFeb 20 2014 839 AM
Thanks Thomas
I will definitely have a look at SHINE
Thomas Jung in response to gentilini andre on page 30Feb 19 2014 422 PM
Difficult to say what is wrong I several things which are different than our sample that does this You are using
a POST for instance instead of a GET However if you are gettting a 200 then I assume the service call is
correct In client side tools (like Chrome Developer Tools) you should be able to see the response object from
the call
However what I would really recommend is that you study the SHINE content (SAP HANA Interactive
Education) There is already a sample application which does this in SHINE Also it has some special
JavaScript in the UI to handle the file attachment via AXAJ call Perhaps that is the part you are missing
You can read more about SHINE here It is also included already installed in the latest version of the HANA
Developer Center trial image (SP7 based)
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
gentilini andreFeb 19 2014 325 PM
Hi Thomas
well I followed your hints but it still donacutet work
I created a xsjs File like below
function downloadExcel()
try
var body =
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010031
alert(drin)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
alert(drusse)
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount
tTax Amount tNetto Amount tCurrency n
while(rsnext())
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
catch (e)
alert(db conn funktioniert nicht)
var a = $requestparametersget(cmd)
$responsesetBody(Invalid Command +a)
switch (a)
case doex
$responsesetBody(Invalid Command +a)
alert(filedownload)
thisdownloadExcel()
break
default
$responsestatus = $nethttpINTERNAL_SERVER_ERROR
$responsesetBody(Invalid Command +a)
The Controllerjs File
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010032
doFileDownload function (oEvent)
jQuerysaprequire(sapuicommonsMessageBox)
sapuicommonsMessageBoxshow(Export Starten sapuicommonsMessageBoxIconconfirm
Information)
sapuicommonsMessageBoxconfirm(Export starteninform Confirmation)
return false
function inform(rValue)
alert (drinnnnne)
var aurl = FileDownloadxsjscmd=doex
if(rValue) If User presses Ok
alert(aurl)
jQueryajax(
url aurl
method POST
dataType json
datacmddoex
success sapuicommonsMessageBoxalert(Export wird ausgefuumlhrtConfirmation)
errorfunction onErrorCall(jqXHR textStatus errorThrown)
alert(jqXHRstatus)
sapuicommonsMessageBoxshow(jqXHRstatus
ERROR
Error in calling Service )
return
complete sapuicommonsMessageBoxalert(Export Erfolgreich
abgeschlossenConfirmation)
)
return false
else If the user presses Cancel
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010033
sapuicommonsMessageBoxalert(Vorgang abgebrochenNotification)
)
at last but not least the view
sapuijsview(zag1_ui_cv_03Index
Specifies the Controller belonging to this View
In the case that it is not implemented or that null is returned this View does not have a Controller
memberOf zag1_ui_cv_03Index
getControllerName function()
return zag1_ui_cv_03Index
Is initially called once after the Controller has been instantiated It is the place where the UI is
constructed
Since the Controller is given to this method its event handlers can be attached right away
memberOf zag1_ui_cv_03Index
createContent function(oController)
create a lite button with an icon and a text
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010034
lite true
)placeAt(btn)
oButton3attachPress(oControllerdoFileDownload)
var oButton4 = new sapuicommonsButton(
text Refresh
icon imagesrefreshjpg
lite true
press function() var data = oTableval()
if(data == )
alert(no data found)
return
print(content)
print(DatArray)
if (data = )
alert(Funzt)
JSONToCSVConvertor(data CUSTOMER AMOUNT true)
)placeAt(btn)
jQuerysaprequire(sapuitableTable)
create table control with properties
var oTable = new sapuitableTable(
width 100
rowHeight 50
title Amount per Partner
selectionMode sapuitableSelectionModeNone
)
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Company Name
)
template new sapuicommonsTextView(
text CompanyName
)
sortProperty CompanyName
))
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010035
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Partner ID
)
template new sapuicommonsTextView(
text PartnerId
)
sortProperty PartnerId
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Postal Code
textAlign sapuicoreTextAlignEnd
)
template new sapuicommonsTextView(
text PostalCode
textAlign sapuicoreTextAlignEnd
)
sortProperty PostalCode
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text City
)
template new sapuicommonsTextView(
text City
)
sortProperty City
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Purchase ID
)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010036
template new sapuicommonsTextView(
text PurchaseOrderId
)
sortProperty Currency
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Lifecycle Status
)
template new sapuicommonsTextView(
text LifecycleStatus
)
sortProperty LifecycleStatus
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Gross Amount
)
template new sapuicommonsTextView(
text GrossAmount
)
sortProperty GrossAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Tax Amount
)
template new sapuicommonsTextView(
text TaxAmount
)
sortProperty TaxAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Amount Netto
)
template new sapuicommonsTextView(
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010037
text CM_NET_Amount_001
)
sortProperty CM_NET_Amount_001
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Currency
)
template new sapuicommonsTextView(
text Currency
)
sortProperty Currency
))
var oModel = new sapuimodelodataODataModel
(httpqperiorvmcldsr8000ZAG1_WS_001ZAG1_CV_001xsodata false)
oTablesetModel(oModel)
oTablebindRows(Amount)
return oTable
)
It wonacutet call the function or better said the action of the button works fine till to the point where it should call the
xsjsfile to generate the excel-file I wondered that in the ajax part the error- success- and complete-part will
be executed at the same time and not only one of this statements The message is 200 (The request has
succeeded The information returned with the response is dependent on the method used in the request)
Maybe you can see where my mistake is or whats going wrong
Iacuteve the developer edition on cloudshare (Hana Studio rev68 Server is on SPS05)
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010038
Andreacute
Thomas Jung in response to Samuel Tanor-Gyedu on page 38Feb 19 2014 523 AM
I dont think I can help you This appears to a question about how odata4j works not about XS I have no
experience with odata4j myself
Samuel Tanor-GyeduFeb 18 2014 913 AM
Hi Thomas
I have an odata service with this endpointhttpss5hanaxshanatrialondemandcomservicesUserxsodata
I am now trying to consume it from eclipse with the odata4j libraries
This is how I get the endpoint
public UserServiceOdata(String endpointUri)
thisendpointUri = endpointUri
ODataConsumerdumpresponseHeaders(true)
consumer = ODataConsumerscreate(endpointUri)
This is my method to add a user
public User addUser(User user)
consumercreateEntity(entitySet)properties(OPropertiesint32(propertyUserId
usergetId()))properties(OPropertiesstring(propertyUserName
usergetName()))properties(OPropertiesstring(propertyUserEmail usergetEmail()))execute()
return user
When I call addUser method I get an Error
Caused by javaxxmlstreamXMLStreamException ParseError at [rowcol][78253]
Message The reference to entity sourceUrl must end with the delimiter
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010039
When I use this endpoint httpss5hanaxshanatrialondemandcomservicesUsersvc everything works fine
With the httpss5hanaxshanatrialondemandcomservicesUserxsodata I get errors
Please I would be very grateful for assistance
Thanks in advance
Regards
Samuel
Thomas Jung in response to gentilini andre on page 39Feb 18 2014 431 AM
You have a fundamental misunderstanding here You are placing server side JavaScript code in your client
side UI5 application The function downloadExcel is something you need to execute on the server It needs to
be in an XSJS file and it is called from the client side via AJAX - as a REST service not as a local function
gentilini andreFeb 17 2014 451 PM
Hello Thomas
Thank you for this great How-To Guide
Iacutem pretty new in SAPUI5 and tried your export-sample in my little trial project but it doesnacutet work
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010040
My Button for this looks like
ltcodegt
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
lite true
press function() alert(oButton3getText())
downloadExcel()
ltcodegt
and the function for this action looks like
ltcodegt
function downloadExcel()
var body =
alert(drin)
print($query)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount tTax
Amount tNetto Amount tCurrency n
while(rsnext())
if(rsnext() == )
alert($responsesetBody( Failed to retrieve data ))
alert($responsestatus = $nethttpINTERNAL_SERVER_ERROR)
else
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010041
ltcodegt
Iacutem afraid and hope that you can help me
Kind regards
Andreacute
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1246 PM
gtIs there any restriction or development limitation in the XSJSLIB files
Thats a very general question Difficult to answer without any context
Vikas Madaan in response to Thomas Jung on page 41Feb 11 2014 1245 PM
Thanks Thomas
I think we are on same page
Once quick question that came to my mind Is there any restriction or development limitation in the XSJSLIB
files
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1230 PM
gtCould please help me in understanding in more advantagesdisadvantages for both techniques
Youve summarized it pretty well already
gtbecuase i dont want to use both the approaches
Even with the CRUD support and exits in XSODATA its still pretty hard to do 100 via XSODATA There are
still valid use cases for XSJS when you need custom body custom read processing job scheduling etc Its
good to try and use XSODATA whenever possible but I wouldnt automatically exclude the use of XSJS
Vikas MadaanFeb 11 2014 1008 AM
Hi Thomas
Thanks a lot for sharing useful information through various blogs
In my current project we are evaluating use of XSOData or XSJS applications I saw your videos like the one
mentioned below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010042
httpwwwsaphanacomdocsDOC-4376
Want i understood from various blog is this
From SP7 we can write exsits in the OData services and it is very easy to consume at the client side just like
any REST base service and from my understanding it is Scalable as well I would love to use XSOData always
becuase development effort is very less compare to XSJS and it is very easy to rampup the team on OData
related development objects
XSJS were as provide more control becuase of server side scripting becuase it allows development on the
server side using JavaScript Core APIs of SAP HANA Extended Application Services are therefore exposed
as JavaScript functions providing easy access to the HTTP Request and Response object as well database
access to execute SQL or call SQLScript Procedures It provide us control over the body format and and URL
parameter definition
Could please help me in understanding in more advantagesdisadvantages for both techniques
I am very keen to understand and also explain the same to team members becuase i dont want to use both the
approaches and even sometimes customer can also ask the same to us
Also If we are on SP6 then from my understanding XSJS provides us more capability in terms of complex
application Corrent me If i am wrong
Thanks
Regards
Vikas Madaan
Thomas Jung in response to Raghuveer Phull on page 42Feb 5 2014 312 PM
Yes there are videos on the CRUD features of XSODATA which were new in SP6
For more on CRUD support in SP6 see this video
oData CreateUpdateDelete Support in SAP HANA SPS6
For the extended support for XSJS exits in SP7 see this video
SAP HANA SPS 07 XSODATA Exits in XSJS
Raghuveer PhullFeb 5 2014 122 AM
Do you have an exampledocumentationvideo where you can write a service which will populate Hana DB
What I am asking for is a way for my external script to populate the DB tables i have created in Hana DB
Thomas Jung in response to reda miraoui on page 43Jan 29 2014 411 PM
The source code for the examples shown here are shipped as part of SHINE (SAP HANA Interactive
Education)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010043
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Vivek Singh Bhoj in response to reda miraoui on page 43Jan 29 2014 352 PM
Hi Reda
You can import Shine Content in HANA and then check all these source codes
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Regards
Vivek
reda miraoui in response to Thomas Jung on page Jan 29 2014 344 PM
Hey Thomas
Is it possible to download source code of your project from this HANA tutorial
Thanks
Reda
Thomas Jung in response to Abdul Hakim on page 43Nov 21 2013 1133 PM
Yes River can be used as an alternative and when activated it will generate Server Side JavaScript andor
SQLScript
Abdul Hakim in response to Thomas Jung on page 44Nov 21 2013 747 PM
Hi Thomas - Was going through blog regarding River (RDL)Just a question on this
When you say Programming language for HANA native development is Server side Javascript SQL SQL
ScriptOnce RDL is rolled out whether RDL can be used for native application development instead of Server
side Java script SQL SQL Script I am very much new to this stuff so appreciate if you can also help on
how to get started with Server Side Java script SQL SQL Script for HANA
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 30 2013 750 AM
Hi Thomas
Thanks for your response I am talking about more content on shine
thanks
Ashutosh
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010044
Baskar Gopalakrishnan in response to Thomas Jung on page 44Oct 30 2013 1249 AM
Hi Thomas
Im a SAP PI Middleware consultantSAP topic leader in XIPI heavily worked on Java related
Netweaver stack I have knowledge in ABAP but not worked heavily in abap I have enrolled your sap hana
native application development course I feel very interesting I did work heavily in java and javascript projects
using eclipse development tool Do you think if I invest my time in just native hana development and proceed
in HANA field is a good step I dont have BW experience either
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 819 PM
Thanks for the clarification Much appreciated
Thomas Jung in response to Abdul Hakim on page 44Oct 29 2013 120 PM
gtABAP Close to HANA means whether we can expect a similar 2 tier architecture similar to HANA XS in the
future or what does that mean
No it doesnt mean that ABAP will become a 2 tier architecture We will not move the ABAP VMKernel into
HANA itself It will remain a separate application server At least for the current plansforeseeable future What
he was referring to was bringing the programming models closer For instance the new 740 SP5 feature that
allows you to write SQLScript directly within an ABAP class method
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 650 AM
Thomas - Thanks for the clarificationMuch appreciatedI was listening to ABAP on HANA session by
Thorsten Schneider this year Teched and he was mentioning that SAP Plans to bring ABAP very close to
HANA in the coming future but not much details have been discussed in the sessionABAP Close to HANA
means whether we can expect a similar 2 tier architecture similar to HANA XS in the future or what does that
mean
Thanks
Hakim
Thomas Jung in response to Abdul Hakim on page 45Oct 28 2013 703 PM
gt whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the option is
recommended by SAP then kindly share the pros and cons of each of the item
Taken from the TechEd CD103 session slides
Guidance
bulluse ABAP for optimization of existing progams (in context of SAP Business Suite or BW)
bullconsider HANA Native Development for development of new applications which will solely run on SAP HANA
bullcombine ABAP and HANA Native Development to enrich existing applications (eg SAP HANA Live Fiori)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010045
ABAP
bullapplications follow 3-tier architecture
bullABAP is in general database agnostic but with release 74 optimized for SAP HANA
bullProgramming language ABAP ABAP OO with the option to use SAP HANA features
bullIDE eclipse-based ABAP Development Tools
HANA Native Development
bullapplications follow 2-tier architecture
bullHANA Native Development is SAP HANA specific and embedded in the database
bullProgramming language River server-side JavaScript SQLSQLScript
bullIDE eclipse-based SAP HANA Studio + web IDE
Thomas Jung in response to ashutosh dixit on page 45Oct 28 2013 701 PM
gtIs there any more demos for the SHINE
Im not exactly sure what you mean by that We are building additional content for SHINE that will be delivered
in SP7
Abdul HakimOct 28 2013 326 PM
Thomas - Let us say a customer is running SAP Netweaver 74 ABAP with HANA DB and they have HANA
extended service as wellIf the customer wants to do new developments then what is the recommendation
from SAP ie whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the
option is recommended by SAP then kindly share the pros and cons of each of the item (SAP Netweaver 74
ABAP Vs SAP HANA XS)
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 28 2013 221 PM
Hi Thomas
Thanks a lot for your its working now
Is there any more demos for the SHINE
Thanks
Ashutosh
Thomas Jung in response to ashutosh dixit on page 46Oct 25 2013 809 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010046
As this content is now standard in SP6 as part of SHINE (SAP HANA INteractive Education) there also some
setup instructions on helpsapcom
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Basic points to check - have you generated the synonyms in the data generator Ran the data generator to
create some data Have the role assigned Added client 001 to your user profile
ashutosh dixitOct 24 2013 130 PM
Hi Thomas
Amazing blog - once again Thomas thanks
I have been following you for many days attended your OPEN SAP course also
That was an amazing course for new learner like me
One of our client is looking forward for XS based search Application identical to what you have created in your
DEMO
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010047
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010048
But I am not able to fetch the data on blank HTML page is coming with no data
If there is any step by step document related to this please help in getting that
Any help will be highly appreciated
Thanks
Ashutosh
Naveen KumarSep 26 2013 1130 AM
Good Document
Heber FabianoAug 27 2013 323 PM
Great content as always Keep sharing with us
Thomas Jung in response to Orel Stringa on page 48Aug 27 2013 147 PM
This is currently not possible The CORS support is for all origins We dont yet have the feature to maintain a
whitelist of CORS origins
Orel Stringa in response to Thomas Jung on page Aug 27 2013 801 AM
Hi Thomas
nice to see that SAP has made it possible with SP6 to specify cross origin resource sharing (CORS) support
via the xsaccess file SP6 HANA development guide has example of how to specify CORS support
I have build an XS application and would like to serve SAPUI5 on a diffhost than XSHANA
How can I specify that I would like to allow cross origin access restricted to certain domain(s) only
Is there a special keyword syntax for specifying that
Thank yoi
Orel
Vijay UthayakumarAug 27 2013 131 AM
Highly informative amp digestible Fantastic work
Jerry WangAug 1 2013 955 AM
Hi Tomas
Thank you
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010049
Jerry
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 644 PM
JSLint checks are very strict and often produce syntax errors for items that just stylistic and wont actually
cause an error upon activation or runtime You can either ignore the JSLint errors or deactivate JSLint for this
project in these cases However it might also be an indication that the JavaScript code you are trying to import
isnt compatible with Strict mode
httpsdevelopermozillaorgen-USdocsWebJavaScriptReferenceFunctions_and_function_scope
Strict_mode
Milan Vrozina in response to Thomas Jung on page 49Jul 21 2013 624 PM
Thanks for clarification I thought there would be some kind of import
But anyway in case of this specific library I have some problems with JSLint validation when I do cut and paste
of the original code
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 343 PM
What kind of problem are you having using this library Strict mode JavaScript which doesnt try to access the
DOM Window or other client side specific objects should work in Server Side XSJS Generally if you have a
library you just cut and paste into your XSJS or an XSJSLIB file and then call the functions from your code
Milan VrozinaJul 21 2013 339 PM
Hello
first and foremost thank you for perfect openSAP classes related to HANA development and for this blog as
well
I have one question related to server-side javascript You mentioned in course that is possible to use 3rd party
libraries or reuse 3rd party code But I cant find a possible way how to import 3rd party javascript library -as
is- to server and use it For example I would like to use JSZip library to zip some file before sending it to client
from xsjs application Is that possible Thank you
Chandrashekhar MahajanJul 3 2013 734 PM
This is excellent blog Now HANA XS is very much clear to me
Mohan krishnaJul 1 2013 144 PM
WOW - great blog Thomas This will be very helpful in understanding SAP hana Good Job
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010050
Abdul Hakim in response to Thomas Jung on page 50Jun 27 2013 833 PM
Thanks for the clarification
Thomas Jung in response to Abdul Hakim on page 50Jun 27 2013 659 PM
HANA Extended Application Services uses SQLScript and JavaScript as its two primary programming
languages
gtwhether the current SAP Business suite based on ABAP will be completely migrated to HANA service
No The Business Suite already runs on HANA but still via the ABAP application server It will continue to
leverage HANA via a combination of enhancements to ABAP and utilizing some of the technologies described
in this blog
gtAlso whether ABAP can be used to built application in HANA extended services
No There is no ABAP language container in HANA Extended Application Services
Abdul HakimJun 27 2013 405 PM
Hi Thomas - What is the programming language used for HANA Extended application services
As HANA is more than a database ie application platform by itself and as you mentioned that more and more
applications will be built on HANA i have question as how the future SAP ERP system looks likewhether the
current SAP Business suite based on ABAP will be completely migrated to HANA service in the future or SAP
ABAP server will continue to evolve and receive focus investment from SAP Also whether ABAP can be used
to built application in HANA extended services Your thoughts
Thanks
Abdul Hakim
Thomas Jung in response to Ravindra Channe on page 50Jun 11 2013 830 PM
Yes it is still planned However we are still a couple of weeks away and Ive not seen the final installers to say
for certain its there
Ravindra ChanneJun 11 2013 815 PM
Hi Thomas
Thanks for a wonderful and very informative blog Is there any update on 32 bit REGI file
Is it expected along with SPS6
Regards
Ravi
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010051
Thomas Jung in response to Amanda Rzepka on page Jun 7 2013 942 PM
gtCan the XS Services be used in a BW on HANA Scenario
Yes XS is part of ALL HANA systems You should check and make sure you are licensed for direct access to
the underlying HANA instance however
Thomas Jung in response to Holger Schimanski on page Jun 7 2013 941 PM
gtIs there a similar library which could be used in XS Engine
The XSODATA development object is similar We also have higher level frameworks for XMLA and Search
Services (InA) You can expect more such high level frameworks to be added to the HANA Extended
Application Services in the future
Thomas Jung in response to Manav Mehra on page Jun 7 2013 939 PM
Have you used something like the Chrome developer tools to see see if you are getting any client side
javascript errors or to see if the request to your xsodata service is successful
Thomas Jung in response to Christian Hufnagl on page 52Jun 7 2013 938 PM
It will ship as non-automatic content in SPS6 (all systems will have it and it just needs to be imported) The
delivery units are also part of this weeks updates to the Cloudshare and AWS developer center images They
are also available for download as part of the content of the openSAP course
Thomas Jung in response to Matthew Pickell on page 51Jun 7 2013 937 PM
CORS support will come with SPS6 at the end of June
Thomas Jung in response to Jeroen Custers on page 51Jun 7 2013 936 PM
gtWill this bug be fixed in HANA ver 56
Personally Ive still experienced this bug in SPS6 internal builds Must be a tricky one to find Luckily the
workaround of closing and reopening isnt too difficult Just annoying This also probably makes the bug low
priority
Jeroen Custers in response to Vivek Singh Bhoj on page 52Jun 7 2013 411 PM
This issue also occurs on rev56
Matthew PickellJun 7 2013 258 PM
Thomas
Has CORS been included in a release yet
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010052
Vivek Singh Bhoj in response to Chandra Edem on page 52Jun 5 2013 601 AM
Hi Chandra
Date for Week1 Assignment has been extended till June 11
So you can give Week 1 Assignment now
Christian HufnaglJun 4 2013 543 PM
Hi Thomas
thank you for the interesting tutorial
Can you tell me whether it is possible to download the source code of the ldquoPutting it all togetherrdquovideo And if yes Where can I download itThanks
Christoph
Vivek Singh BhojJun 4 2013 1116 AM
Hi Thomas
Thanks for OpenSAP classes
Your Youtube Account also have very good exercises
IN OpenSAP Week 2 Unit 3 tutorial after assigning admin role to my user Id i am not able to see sequences
synonyms triggers under my schema or any other schema i am only able to see Column Views Procedures
Tables and Views
Though now i am able to insert data into my created table
Can you let me know how i will be able to see Sequences under my schema without removing the admin role
I am using HANA revision 52
Got to know from OpenSAP that
This is a known issue and the only way that Ive seen to fix it is to actually close the studio and open it again
then refresh the node
Cheers
Rich Heilman
SAP HANA Product Management
Will this bug be fixed in HANA ver 56
Chandra Edem in response to Thomas Jung on page 53Jun 4 2013 646 AM
Thomas
I registered for OpenSAP course Introduction to Software Development on SAP HANA on June 2 900PM
I didnt know that it is going to end WEEK1 assignment test on 632013 300PM Is there any way can take
that WEEK1 Assignment Test
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010053
Thanks
Chandra
Thomas Jung in response to Alexander Bauer on page Jun 3 2013 856 PM
SAPUI5 gets updated auutomatically when you apply HANA revisions There is no additional download or
update needed
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010015
ALTER SYSTEM ALTER CONFIGURATION (topologyini system) UNSET (hostlthostnamegt xsengine)
WITH RECONFIGURE
ALTER SYSTEM ALTER CONFIGURATION (topologyini system) UNSET (volumes ltvolume_idgt) WITH
RECONFIGURE
ALTER SYSTEM ALTER CONFIGURATION (daemonini host lthostnamegt) SET (xsengineinstances) =
1 WITH RECONFIGURE
Then restart the HANA instance and after that make a full backup (and schedule the regular backup in order to
prevent this situation again)
Hope this will help someone like me -)
Have a nice day
Regards
Robert
Tarasankar Banerjee in response to Tarasankar Banerjee on page 15Nov 3 2014 1031 AM
Update
I tried to access the XS Admin console from another user and faced only the No valid Crypto error However
could still update the proxy user details and the sample application successfully ran at last The relevant roles
were provided in Granted Roles not Application Privileges Probably that was the issue earlier
I would check again with new Http Destination and Server side Java Script
Thanks a lot Thomas for all your help
Regards
Tarasankar
Tarasankar Banerjee in response to Thomas Jung on page 18Nov 3 2014 929 AM
Hi Thomas
I also tried to use the sample code from section 841 Tutorial Use the XSJS Outbound API of the HANA
Developer Guide with minor modifications (for package structure proxy settings etc) This time the destination
was found The new project structure with the sample files yahooxshttpdest and sapStockxsjs is as below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010016
However it did not bring any data The content of the response object indicated that there was Proxy
authentication issue
When I tried to check the Destination in the XS Admin Console surprisingly none of the fields are populated
and everything (except the Trust Store drop down) is disabled All these fields are supposed to be populated
as indicated in the Modeling Guide
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010017
However the User already has the following privileges
The same scenario was present for the Http Destination I prepared earlier There are couple of internal errors
at the bottom On clicking them the following list is displayed
1 Internal Error dbError(ConnectionprepareStatement) 258 - insufficient privilege Not authorized at
ptimequerycheckerquery_checkcc24182 No valid SAP Crypto configuration
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010018
It appears from various blogs that the second error (No valid SAP Crypto configuration) is related to SSL
configuration in HANA I would contact the HANA Administrator to look into this issue Of course it would be
great if you could provide some insight
However I have no clue regarding the first error Request your help and cooperation in this regard
The initial issue of not finding the HttpDestination which I created still persists
Thanks for all your help
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 18Oct 31 2014 342 PM
First of all you would never use the workspace name It isnt ever part of anything It is only the package
structure that counts The first item in your list is the only one with the correct package Off hand it looks right to
me You are supposed to supply the full package path Have you configured this HTTP Destination in the XS
Admin tool yet
Tarasankar Banerjee in response to Thomas Jung on page 18Oct 31 2014 326 PM
Updated it Thanks
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 18Oct 31 2014 313 PM
Your comment got cut off We never really get to see what your problem is
Tarasankar Banerjee in response to Thomas Jung on page 21Oct 31 2014 256 PM
Thanks Thomas
I am facing as issue while trying to use an HTTP Destination I understand that the xshttpdest and xsjs file
need to in the same folder Following is the structure of my test project
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010019
As you can see the HTTP Destination and the XSJS files are in the same folder services The workspace
name is XS_Workspace and the package structure is as follows
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010020
Now I am trying to read this destination
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010021
When I am using full package structure destination_package =
rootworkTara02XSTest01XSHttpTest01services I am receiving the
error message httpreadDestination destination not found (package
rootworkTara02XSTest01XSHttpTest01services name XSHttpDest01)
On using the workspace name destination_package = XS_Workspaceservices I am receiving the
error message User is not authorized to use destination (package XS_Workspaceservices name
XSHttpDest01)
On using destination_package = rootworkTara02XSTest01services also I am receiving the error
message User is not authorized to use destination (package rootworkTara02XSTest01services
name XSHttpDest01) Strangely the services folder is not directly under XSTest01
Lastly I deliberately gave a wrong service name destination_package = XS_Workspaceservices and
destination_name = XSHttpDest02 But even then I received the error message User is not authorized to
use destination (package XS_Workspaceservices name XSHttpDest02) not that the destination is not
found
Could you please help me to resolve this issue
Thanks a lot for your helps
Regards
Tarasankar
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010022
Thomas Jung in response to Tarasankar Banerjee on page 22Oct 30 2014 152 PM
Since SPS06 its possible to use outbound HTTP destinations and to call out to external services using XSJS
Thomas Jung in response to Tarasankar Banerjee on page 22Oct 30 2014 150 PM
gtSo when the program runs in server would it automatically consider the OS user credentials
No It doesnt automatically use anything You have to specific the user and password that you want to use for
the proxy Although many proxy servers dont require a username and password
Tarasankar Banerjee in response to Thomas Jung on page 23Oct 30 2014 707 AM
Hi Thomas
Just watched the video you shared above Thanks a lot for it It is really informative and helpful
Regards
Tarasankar
Tarasankar Banerjee in response to Tarasankar Banerjee on page 22Oct 30 2014 346 AM
Got answer for the second point SAP HANA XS Administration Tool is the place to configure Proxy settings
Regards
Tarasankar
Tarasankar Banerjee in response to Tarasankar Banerjee on page 22Oct 29 2014 314 PM
Dear Thomas
another question is that does the proxy settings in the HttpDestination refer to the OS user of the HANA
server We specify useProxy as true and authType as basic in the HttpDestination but not maintain any
user credentials So when the program runs in server would it automatically consider the OS user credentials
Thanks
Regards
Tarasankar
Tarasankar Banerjee in response to Thomas Jung on page 23Oct 29 2014 132 PM
Thanks Thomas I am currently checking this option only
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010023
My current requirement is to fetch Weather Data and Social Media data from various OData services and store
them in HANA for further analysis What might be the best way for this I am currently checking the option of
creating an XS application which would connect to the external services fetch the data and save that in HANA
using DB Connection Is this the best way Or should we try to use JAVA or some other way
Your valuable suggestions are most welcome Thanks
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 23Oct 29 2014 1256 PM
gtHowever is it possible to consume XSODATA service from XSJS instead of using DB Connection
You can via an outbound HTTP destination although I certainly wouldnt recommend it It would be rather
complex and not well performing
gtAlso is it possible to consume data from external OData services for weather data social media data etc from
XSJS
Sure with the same Outbound HTTP Connectivity
httpswwwyoutubecomwatchv=fWirvj9l7eY
Maintaining HTTP Destinations - SAP HANA Developer Guide - SAP Library
Tarasankar BanerjeeOct 29 2014 1119 AM
Dear Thomas
Thanks for the great blog
I am able to connect to Database and execute queries from XSJS service However is it possible to consume
XSODATA service from XSJS instead of using DB Connection
Also is it possible to consume data from external OData services for weather data social media data etc from
XSJS
If possible it would be great if you could provide some code sample or guidelines
Thanks
Regards
Tarasankar
Thomas Jung in response to Weiping Lu on page 24Sep 25 2014 833 AM
Please refer to service note 1849775
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010024
httpservicesapcomsapsupportnotes1849775
I believe it will address your issue
Weiping LuSep 24 2014 519 PM
Hi Tom
Great post and videos I have a tough issue calling a HANA procedure from XS takes gt 5min but from HANA
studio lt 1 min Were using Amazon AWS rev 70 and 73 Any help will be greatly appreciated
Thanks
WPL
Thomas Jung in response to Su Srikanth on page 24Aug 11 2014 253 PM
You transport XSODATA services like you would any other repository content - via a Delivery Unit
Su SrikanthAug 11 2014 750 AM
Hi Thomas
Great blog
Ive a query here - we create the odata services(andor URLs created to view in the web browser) in
development environment now if we have to transport it to the quality andor production environment how
can we do this - is the same as importexport or is there any specific way to do please help with any useful
pointers
Many thanks as always
Su
Thomas Jung in response to ARSHAD SHAIKH on page 24May 15 2014 231 PM
Ive never written any blogs on calculation views I dont cover that topic That is why I suggested you ask your
question in the proper SCN forum
Although looking at your your above SQL Statement I dont see why you couldnt do this directly in XSODATA
off of the table STATUS without the need for the calculation view or the SQLScript Procedure
ARSHAD SHAIKH in response to Thomas Jung on page 25May 15 2014 1154 AM
Hello Thomas
I am new to hana Please suggest me the blogs of you related to calculation view that calling
procedures(procedures have out parameter)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010025
I am trying to fetch the result of procedure in calc view and want to create odata service for that calculation
view
procedure code goes like this
---------------------------------------
CREATE PROCEDURE TWEETS_TODAY(OUT OP BIGINT)
language SQLSCRIPT sql security invoker default schema SOCIAL360 reads sql data as
BEGIN
SELECT COUNT() INTO OP FROM SOCIAL360STATUS WHERE CREATED_AT = CURRENT_DATE
END
calc view code goes like this
----------------------------------------
Begin Procedure Script
BEGIN
DECLARE OP BIGINT
CALL SOCIAL360TWEETS_TODAY(OPvar_out)
END End Procedure Script
Thanks
-Arshad
Thomas Jung in response to ARSHAD SHAIKH on page 25May 15 2014 944 AM
Your question seems to have no relation to the content in this blog Please consider instead asking general
HANA questions in the appropriate SCN Forum
ARSHAD SHAIKHMay 15 2014 917 AM
Hi Thomas
I want to call procedures in calculation view (procedures have out parameter)
Please suggest me step by step procedure with example and supporting documents
Thanks
ARSHAD SHAIKH
Henrique Pinto in response to Blair Krotenko on page 26Apr 16 2014 711 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010026
Hmm not really sure of that I see it but that might be because Im an employee
But the NET development partner I was working with was not enrolled in any kind of beta testing program and
they were able to download it so I guess you should as well
Make sure to go in the Installation and Upgrades menu and not the Support Packages and Patches
Go to httpservicesapcomswdc -gt Installations and Upgrades -gt Browse our Download Catalog -gt SAP In-
Memory (SAP HANA) -gt SAP HANA ADONET 10
Best regards
Henrique
Blair Krotenko in response to Henrique Pinto on page 26Apr 16 2014 656 PM
Thanks for the info Henrique but I cant find it I dont know if it is an authorization issue or do we need to be a
ramp-up customer to dl and use a beta product
Thanks
Blair
Henrique Pinto in response to Thomas Jung on page 27Apr 16 2014 614 PM
The ADONET provider is available for download in the SAP Service Marketplace (in beta edition so far)
Thomas Jung in response to Kamal Jain on page 26Apr 16 2014 514 PM
For general OData structure and syntax I find that the Odataorg website is very helpful For example on this
topic
httpwwwodataorgdocumentationodata-version-2-0uri-conventions
The syntax of a $expand query option is a comma-separated list of Navigation Properties Additionally each
Navigation Property can be followed by a forward slash and another Navigation Property to enable identifying a
multi-level relationship
The page also has some sample URLs
Kamal JainApr 16 2014 536 AM
Dear Thomas
I agree that we need to pass all the associations in the expand I tried with some of options but was not
through
Now i just tried with below syntax and able to achive Thx
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010027
httpdewdftzld025pgdevsapcorp8000DTHCPXSZPMIS_PRO_ACTUALxsodata
ZPROHEADER(PR07_000002)$expand=ZACTUZEMPD
Regards
Kamal Jain
Thomas Jung in response to Blair Krotenko on page 27Apr 15 2014 623 PM
We do plan to release an ADONET provider specific to HANA in the near future This would probably be the
best option for consumption from NET Until then I would think that ODBC is probably the next best option It
gives you generally easy portability from already existing database code You could consume OData as well
although that is more generally consumed from the UI layer itself It guess it somewhat depends upon where
you are calling the service from in your NET application
Blair KrotenkoApr 15 2014 409 PM
Hi Thomas
We are looking at consuming HANA data in a NET application and from what I can see there are 2 options -
OData and ODBC It seems to me that OData might be the better option when consuming HANA data in an XS
application while ODBC might be the better option for NET What are your thoughts Is there a paper on this
subject I havent been able to find a comparison document for this Are there any security caveats to be aware
of for these options
Thanks
Blair
Thomas Jung in response to Kamal Jain on page 27Apr 15 2014 136 PM
You have to list both associations in the expand on the URL if you want both relationships to be processed
Kamal JainApr 15 2014 1249 PM
Hi Thomas
Thx for valuable and useful information
I have an query regarding XS Odata service creation for more than 2 tables and get all the data in one
command
There is req in which service needs to be created for 3 tables to get data from all these
First table has Project ID as key second table has composite
ProjectID and Employee Id as key and third table has Employee id as
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010028
key
So if I create navigation for first 2 tables based on project id and use expand comand than its working fine and I
can see data of both the tables
Further if I add navigation for third table also as below then below expand is displaying data for first two tables
only Pls share how to use expand command in this case if possible to get all tables data based on project id
How to use navigation ZEMPD here
httpdewdftzld025pgdevsapcorp8000DTHCPXSZPMIS_PRO_ACTUALxsodata
ZPROHEADER(PR07_000002)$expand=ZACTUamp
service namespace
DTHCPXS
DTHCPDTHCPDBHCP_PROJECT_HEADER
as ZPROHEADER
navigates (PROJECT as
ZACTU)
DTHCPDTHCPDBHCPT_ZPMIS_ACTUAL
as ZACTU
navigates (EMPLOYEE as
ZEMPD )
DTHCPDTHCPDBHCP_ZPMIS_RES_MASTER
as ZEMPD
association PROJECT principal
ZPROHEADER(PROJECTID)
multiplicity 1 dependent
ZACTU(PROJECTID) multiplicity
association EMPLOYEE principal
ZACTU(EMPLOYEEID)
multiplicity 1 dependent
ZEMPD(EMPLOYEEID) multiplicity
1
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010029
Pls suggest if there is anything to add or correct in XS odata service syntax above
Regards
Kamal Jain
Vikas Madaan in response to Thomas Jung on page 29Apr 14 2014 458 PM
Thanks Thomas
Under which component
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 29Apr 14 2014 450 PM
No this isnt a known issue Ive seen Nor can I recreate the problem in my system No you cant maintain the
authentication in XSHTTPDEST itself It intentionally must be set in XSADMIN tool I can really only suggest
that you open a support ticket
Vikas MadaanApr 14 2014 431 PM
Hi Thomas
I am trying to pull data from SAP system onto HANA Database using XSJOB files I am calling RFC enabled
function modules over HTTP request It helps me replicating the real time ECC data onto HANA as well with
back ground jobs
I am facing one problem in the XSHTTPDEST file I am able to create and activate the file using studio and this
file is even visible in the web based XS administration tool But in the web based tool when i provide user and
password for basic authotication then system just clears the user id and password when i try to save This the
reason our HTTP requests are getting failed and below is the response we are getting in the response body
lthtmlgtltheadgtlttitlegtLogon Error Messagelttitlegt
Is this known issue or we are missing something Is it possible to provide user and password in the
XSHTTPDEST file Is there any particular syntax
I checked and i have the required authorizations as well develper Guide
Please help
Regards
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010030
Vikas Madaan
Abdul HakimFeb 22 2014 359 AM
Hi Thomas - Any recommended book or resource to learn and master Server Side Javascript There were
many books available in the market but as a beginner need to know the right resource book to start with and
master this stuffAlso whether SAP plan to conduct any training to teach Server Side Javascript similar to other
standard training offerings
Thanks
Hakim
Samuel Tanor-GyeduFeb 20 2014 839 AM
Thanks Thomas
I will definitely have a look at SHINE
Thomas Jung in response to gentilini andre on page 30Feb 19 2014 422 PM
Difficult to say what is wrong I several things which are different than our sample that does this You are using
a POST for instance instead of a GET However if you are gettting a 200 then I assume the service call is
correct In client side tools (like Chrome Developer Tools) you should be able to see the response object from
the call
However what I would really recommend is that you study the SHINE content (SAP HANA Interactive
Education) There is already a sample application which does this in SHINE Also it has some special
JavaScript in the UI to handle the file attachment via AXAJ call Perhaps that is the part you are missing
You can read more about SHINE here It is also included already installed in the latest version of the HANA
Developer Center trial image (SP7 based)
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
gentilini andreFeb 19 2014 325 PM
Hi Thomas
well I followed your hints but it still donacutet work
I created a xsjs File like below
function downloadExcel()
try
var body =
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010031
alert(drin)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
alert(drusse)
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount
tTax Amount tNetto Amount tCurrency n
while(rsnext())
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
catch (e)
alert(db conn funktioniert nicht)
var a = $requestparametersget(cmd)
$responsesetBody(Invalid Command +a)
switch (a)
case doex
$responsesetBody(Invalid Command +a)
alert(filedownload)
thisdownloadExcel()
break
default
$responsestatus = $nethttpINTERNAL_SERVER_ERROR
$responsesetBody(Invalid Command +a)
The Controllerjs File
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010032
doFileDownload function (oEvent)
jQuerysaprequire(sapuicommonsMessageBox)
sapuicommonsMessageBoxshow(Export Starten sapuicommonsMessageBoxIconconfirm
Information)
sapuicommonsMessageBoxconfirm(Export starteninform Confirmation)
return false
function inform(rValue)
alert (drinnnnne)
var aurl = FileDownloadxsjscmd=doex
if(rValue) If User presses Ok
alert(aurl)
jQueryajax(
url aurl
method POST
dataType json
datacmddoex
success sapuicommonsMessageBoxalert(Export wird ausgefuumlhrtConfirmation)
errorfunction onErrorCall(jqXHR textStatus errorThrown)
alert(jqXHRstatus)
sapuicommonsMessageBoxshow(jqXHRstatus
ERROR
Error in calling Service )
return
complete sapuicommonsMessageBoxalert(Export Erfolgreich
abgeschlossenConfirmation)
)
return false
else If the user presses Cancel
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010033
sapuicommonsMessageBoxalert(Vorgang abgebrochenNotification)
)
at last but not least the view
sapuijsview(zag1_ui_cv_03Index
Specifies the Controller belonging to this View
In the case that it is not implemented or that null is returned this View does not have a Controller
memberOf zag1_ui_cv_03Index
getControllerName function()
return zag1_ui_cv_03Index
Is initially called once after the Controller has been instantiated It is the place where the UI is
constructed
Since the Controller is given to this method its event handlers can be attached right away
memberOf zag1_ui_cv_03Index
createContent function(oController)
create a lite button with an icon and a text
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010034
lite true
)placeAt(btn)
oButton3attachPress(oControllerdoFileDownload)
var oButton4 = new sapuicommonsButton(
text Refresh
icon imagesrefreshjpg
lite true
press function() var data = oTableval()
if(data == )
alert(no data found)
return
print(content)
print(DatArray)
if (data = )
alert(Funzt)
JSONToCSVConvertor(data CUSTOMER AMOUNT true)
)placeAt(btn)
jQuerysaprequire(sapuitableTable)
create table control with properties
var oTable = new sapuitableTable(
width 100
rowHeight 50
title Amount per Partner
selectionMode sapuitableSelectionModeNone
)
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Company Name
)
template new sapuicommonsTextView(
text CompanyName
)
sortProperty CompanyName
))
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010035
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Partner ID
)
template new sapuicommonsTextView(
text PartnerId
)
sortProperty PartnerId
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Postal Code
textAlign sapuicoreTextAlignEnd
)
template new sapuicommonsTextView(
text PostalCode
textAlign sapuicoreTextAlignEnd
)
sortProperty PostalCode
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text City
)
template new sapuicommonsTextView(
text City
)
sortProperty City
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Purchase ID
)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010036
template new sapuicommonsTextView(
text PurchaseOrderId
)
sortProperty Currency
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Lifecycle Status
)
template new sapuicommonsTextView(
text LifecycleStatus
)
sortProperty LifecycleStatus
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Gross Amount
)
template new sapuicommonsTextView(
text GrossAmount
)
sortProperty GrossAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Tax Amount
)
template new sapuicommonsTextView(
text TaxAmount
)
sortProperty TaxAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Amount Netto
)
template new sapuicommonsTextView(
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010037
text CM_NET_Amount_001
)
sortProperty CM_NET_Amount_001
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Currency
)
template new sapuicommonsTextView(
text Currency
)
sortProperty Currency
))
var oModel = new sapuimodelodataODataModel
(httpqperiorvmcldsr8000ZAG1_WS_001ZAG1_CV_001xsodata false)
oTablesetModel(oModel)
oTablebindRows(Amount)
return oTable
)
It wonacutet call the function or better said the action of the button works fine till to the point where it should call the
xsjsfile to generate the excel-file I wondered that in the ajax part the error- success- and complete-part will
be executed at the same time and not only one of this statements The message is 200 (The request has
succeeded The information returned with the response is dependent on the method used in the request)
Maybe you can see where my mistake is or whats going wrong
Iacuteve the developer edition on cloudshare (Hana Studio rev68 Server is on SPS05)
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010038
Andreacute
Thomas Jung in response to Samuel Tanor-Gyedu on page 38Feb 19 2014 523 AM
I dont think I can help you This appears to a question about how odata4j works not about XS I have no
experience with odata4j myself
Samuel Tanor-GyeduFeb 18 2014 913 AM
Hi Thomas
I have an odata service with this endpointhttpss5hanaxshanatrialondemandcomservicesUserxsodata
I am now trying to consume it from eclipse with the odata4j libraries
This is how I get the endpoint
public UserServiceOdata(String endpointUri)
thisendpointUri = endpointUri
ODataConsumerdumpresponseHeaders(true)
consumer = ODataConsumerscreate(endpointUri)
This is my method to add a user
public User addUser(User user)
consumercreateEntity(entitySet)properties(OPropertiesint32(propertyUserId
usergetId()))properties(OPropertiesstring(propertyUserName
usergetName()))properties(OPropertiesstring(propertyUserEmail usergetEmail()))execute()
return user
When I call addUser method I get an Error
Caused by javaxxmlstreamXMLStreamException ParseError at [rowcol][78253]
Message The reference to entity sourceUrl must end with the delimiter
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010039
When I use this endpoint httpss5hanaxshanatrialondemandcomservicesUsersvc everything works fine
With the httpss5hanaxshanatrialondemandcomservicesUserxsodata I get errors
Please I would be very grateful for assistance
Thanks in advance
Regards
Samuel
Thomas Jung in response to gentilini andre on page 39Feb 18 2014 431 AM
You have a fundamental misunderstanding here You are placing server side JavaScript code in your client
side UI5 application The function downloadExcel is something you need to execute on the server It needs to
be in an XSJS file and it is called from the client side via AJAX - as a REST service not as a local function
gentilini andreFeb 17 2014 451 PM
Hello Thomas
Thank you for this great How-To Guide
Iacutem pretty new in SAPUI5 and tried your export-sample in my little trial project but it doesnacutet work
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010040
My Button for this looks like
ltcodegt
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
lite true
press function() alert(oButton3getText())
downloadExcel()
ltcodegt
and the function for this action looks like
ltcodegt
function downloadExcel()
var body =
alert(drin)
print($query)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount tTax
Amount tNetto Amount tCurrency n
while(rsnext())
if(rsnext() == )
alert($responsesetBody( Failed to retrieve data ))
alert($responsestatus = $nethttpINTERNAL_SERVER_ERROR)
else
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010041
ltcodegt
Iacutem afraid and hope that you can help me
Kind regards
Andreacute
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1246 PM
gtIs there any restriction or development limitation in the XSJSLIB files
Thats a very general question Difficult to answer without any context
Vikas Madaan in response to Thomas Jung on page 41Feb 11 2014 1245 PM
Thanks Thomas
I think we are on same page
Once quick question that came to my mind Is there any restriction or development limitation in the XSJSLIB
files
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1230 PM
gtCould please help me in understanding in more advantagesdisadvantages for both techniques
Youve summarized it pretty well already
gtbecuase i dont want to use both the approaches
Even with the CRUD support and exits in XSODATA its still pretty hard to do 100 via XSODATA There are
still valid use cases for XSJS when you need custom body custom read processing job scheduling etc Its
good to try and use XSODATA whenever possible but I wouldnt automatically exclude the use of XSJS
Vikas MadaanFeb 11 2014 1008 AM
Hi Thomas
Thanks a lot for sharing useful information through various blogs
In my current project we are evaluating use of XSOData or XSJS applications I saw your videos like the one
mentioned below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010042
httpwwwsaphanacomdocsDOC-4376
Want i understood from various blog is this
From SP7 we can write exsits in the OData services and it is very easy to consume at the client side just like
any REST base service and from my understanding it is Scalable as well I would love to use XSOData always
becuase development effort is very less compare to XSJS and it is very easy to rampup the team on OData
related development objects
XSJS were as provide more control becuase of server side scripting becuase it allows development on the
server side using JavaScript Core APIs of SAP HANA Extended Application Services are therefore exposed
as JavaScript functions providing easy access to the HTTP Request and Response object as well database
access to execute SQL or call SQLScript Procedures It provide us control over the body format and and URL
parameter definition
Could please help me in understanding in more advantagesdisadvantages for both techniques
I am very keen to understand and also explain the same to team members becuase i dont want to use both the
approaches and even sometimes customer can also ask the same to us
Also If we are on SP6 then from my understanding XSJS provides us more capability in terms of complex
application Corrent me If i am wrong
Thanks
Regards
Vikas Madaan
Thomas Jung in response to Raghuveer Phull on page 42Feb 5 2014 312 PM
Yes there are videos on the CRUD features of XSODATA which were new in SP6
For more on CRUD support in SP6 see this video
oData CreateUpdateDelete Support in SAP HANA SPS6
For the extended support for XSJS exits in SP7 see this video
SAP HANA SPS 07 XSODATA Exits in XSJS
Raghuveer PhullFeb 5 2014 122 AM
Do you have an exampledocumentationvideo where you can write a service which will populate Hana DB
What I am asking for is a way for my external script to populate the DB tables i have created in Hana DB
Thomas Jung in response to reda miraoui on page 43Jan 29 2014 411 PM
The source code for the examples shown here are shipped as part of SHINE (SAP HANA Interactive
Education)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010043
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Vivek Singh Bhoj in response to reda miraoui on page 43Jan 29 2014 352 PM
Hi Reda
You can import Shine Content in HANA and then check all these source codes
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Regards
Vivek
reda miraoui in response to Thomas Jung on page Jan 29 2014 344 PM
Hey Thomas
Is it possible to download source code of your project from this HANA tutorial
Thanks
Reda
Thomas Jung in response to Abdul Hakim on page 43Nov 21 2013 1133 PM
Yes River can be used as an alternative and when activated it will generate Server Side JavaScript andor
SQLScript
Abdul Hakim in response to Thomas Jung on page 44Nov 21 2013 747 PM
Hi Thomas - Was going through blog regarding River (RDL)Just a question on this
When you say Programming language for HANA native development is Server side Javascript SQL SQL
ScriptOnce RDL is rolled out whether RDL can be used for native application development instead of Server
side Java script SQL SQL Script I am very much new to this stuff so appreciate if you can also help on
how to get started with Server Side Java script SQL SQL Script for HANA
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 30 2013 750 AM
Hi Thomas
Thanks for your response I am talking about more content on shine
thanks
Ashutosh
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010044
Baskar Gopalakrishnan in response to Thomas Jung on page 44Oct 30 2013 1249 AM
Hi Thomas
Im a SAP PI Middleware consultantSAP topic leader in XIPI heavily worked on Java related
Netweaver stack I have knowledge in ABAP but not worked heavily in abap I have enrolled your sap hana
native application development course I feel very interesting I did work heavily in java and javascript projects
using eclipse development tool Do you think if I invest my time in just native hana development and proceed
in HANA field is a good step I dont have BW experience either
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 819 PM
Thanks for the clarification Much appreciated
Thomas Jung in response to Abdul Hakim on page 44Oct 29 2013 120 PM
gtABAP Close to HANA means whether we can expect a similar 2 tier architecture similar to HANA XS in the
future or what does that mean
No it doesnt mean that ABAP will become a 2 tier architecture We will not move the ABAP VMKernel into
HANA itself It will remain a separate application server At least for the current plansforeseeable future What
he was referring to was bringing the programming models closer For instance the new 740 SP5 feature that
allows you to write SQLScript directly within an ABAP class method
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 650 AM
Thomas - Thanks for the clarificationMuch appreciatedI was listening to ABAP on HANA session by
Thorsten Schneider this year Teched and he was mentioning that SAP Plans to bring ABAP very close to
HANA in the coming future but not much details have been discussed in the sessionABAP Close to HANA
means whether we can expect a similar 2 tier architecture similar to HANA XS in the future or what does that
mean
Thanks
Hakim
Thomas Jung in response to Abdul Hakim on page 45Oct 28 2013 703 PM
gt whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the option is
recommended by SAP then kindly share the pros and cons of each of the item
Taken from the TechEd CD103 session slides
Guidance
bulluse ABAP for optimization of existing progams (in context of SAP Business Suite or BW)
bullconsider HANA Native Development for development of new applications which will solely run on SAP HANA
bullcombine ABAP and HANA Native Development to enrich existing applications (eg SAP HANA Live Fiori)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010045
ABAP
bullapplications follow 3-tier architecture
bullABAP is in general database agnostic but with release 74 optimized for SAP HANA
bullProgramming language ABAP ABAP OO with the option to use SAP HANA features
bullIDE eclipse-based ABAP Development Tools
HANA Native Development
bullapplications follow 2-tier architecture
bullHANA Native Development is SAP HANA specific and embedded in the database
bullProgramming language River server-side JavaScript SQLSQLScript
bullIDE eclipse-based SAP HANA Studio + web IDE
Thomas Jung in response to ashutosh dixit on page 45Oct 28 2013 701 PM
gtIs there any more demos for the SHINE
Im not exactly sure what you mean by that We are building additional content for SHINE that will be delivered
in SP7
Abdul HakimOct 28 2013 326 PM
Thomas - Let us say a customer is running SAP Netweaver 74 ABAP with HANA DB and they have HANA
extended service as wellIf the customer wants to do new developments then what is the recommendation
from SAP ie whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the
option is recommended by SAP then kindly share the pros and cons of each of the item (SAP Netweaver 74
ABAP Vs SAP HANA XS)
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 28 2013 221 PM
Hi Thomas
Thanks a lot for your its working now
Is there any more demos for the SHINE
Thanks
Ashutosh
Thomas Jung in response to ashutosh dixit on page 46Oct 25 2013 809 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010046
As this content is now standard in SP6 as part of SHINE (SAP HANA INteractive Education) there also some
setup instructions on helpsapcom
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Basic points to check - have you generated the synonyms in the data generator Ran the data generator to
create some data Have the role assigned Added client 001 to your user profile
ashutosh dixitOct 24 2013 130 PM
Hi Thomas
Amazing blog - once again Thomas thanks
I have been following you for many days attended your OPEN SAP course also
That was an amazing course for new learner like me
One of our client is looking forward for XS based search Application identical to what you have created in your
DEMO
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010047
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010048
But I am not able to fetch the data on blank HTML page is coming with no data
If there is any step by step document related to this please help in getting that
Any help will be highly appreciated
Thanks
Ashutosh
Naveen KumarSep 26 2013 1130 AM
Good Document
Heber FabianoAug 27 2013 323 PM
Great content as always Keep sharing with us
Thomas Jung in response to Orel Stringa on page 48Aug 27 2013 147 PM
This is currently not possible The CORS support is for all origins We dont yet have the feature to maintain a
whitelist of CORS origins
Orel Stringa in response to Thomas Jung on page Aug 27 2013 801 AM
Hi Thomas
nice to see that SAP has made it possible with SP6 to specify cross origin resource sharing (CORS) support
via the xsaccess file SP6 HANA development guide has example of how to specify CORS support
I have build an XS application and would like to serve SAPUI5 on a diffhost than XSHANA
How can I specify that I would like to allow cross origin access restricted to certain domain(s) only
Is there a special keyword syntax for specifying that
Thank yoi
Orel
Vijay UthayakumarAug 27 2013 131 AM
Highly informative amp digestible Fantastic work
Jerry WangAug 1 2013 955 AM
Hi Tomas
Thank you
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010049
Jerry
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 644 PM
JSLint checks are very strict and often produce syntax errors for items that just stylistic and wont actually
cause an error upon activation or runtime You can either ignore the JSLint errors or deactivate JSLint for this
project in these cases However it might also be an indication that the JavaScript code you are trying to import
isnt compatible with Strict mode
httpsdevelopermozillaorgen-USdocsWebJavaScriptReferenceFunctions_and_function_scope
Strict_mode
Milan Vrozina in response to Thomas Jung on page 49Jul 21 2013 624 PM
Thanks for clarification I thought there would be some kind of import
But anyway in case of this specific library I have some problems with JSLint validation when I do cut and paste
of the original code
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 343 PM
What kind of problem are you having using this library Strict mode JavaScript which doesnt try to access the
DOM Window or other client side specific objects should work in Server Side XSJS Generally if you have a
library you just cut and paste into your XSJS or an XSJSLIB file and then call the functions from your code
Milan VrozinaJul 21 2013 339 PM
Hello
first and foremost thank you for perfect openSAP classes related to HANA development and for this blog as
well
I have one question related to server-side javascript You mentioned in course that is possible to use 3rd party
libraries or reuse 3rd party code But I cant find a possible way how to import 3rd party javascript library -as
is- to server and use it For example I would like to use JSZip library to zip some file before sending it to client
from xsjs application Is that possible Thank you
Chandrashekhar MahajanJul 3 2013 734 PM
This is excellent blog Now HANA XS is very much clear to me
Mohan krishnaJul 1 2013 144 PM
WOW - great blog Thomas This will be very helpful in understanding SAP hana Good Job
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010050
Abdul Hakim in response to Thomas Jung on page 50Jun 27 2013 833 PM
Thanks for the clarification
Thomas Jung in response to Abdul Hakim on page 50Jun 27 2013 659 PM
HANA Extended Application Services uses SQLScript and JavaScript as its two primary programming
languages
gtwhether the current SAP Business suite based on ABAP will be completely migrated to HANA service
No The Business Suite already runs on HANA but still via the ABAP application server It will continue to
leverage HANA via a combination of enhancements to ABAP and utilizing some of the technologies described
in this blog
gtAlso whether ABAP can be used to built application in HANA extended services
No There is no ABAP language container in HANA Extended Application Services
Abdul HakimJun 27 2013 405 PM
Hi Thomas - What is the programming language used for HANA Extended application services
As HANA is more than a database ie application platform by itself and as you mentioned that more and more
applications will be built on HANA i have question as how the future SAP ERP system looks likewhether the
current SAP Business suite based on ABAP will be completely migrated to HANA service in the future or SAP
ABAP server will continue to evolve and receive focus investment from SAP Also whether ABAP can be used
to built application in HANA extended services Your thoughts
Thanks
Abdul Hakim
Thomas Jung in response to Ravindra Channe on page 50Jun 11 2013 830 PM
Yes it is still planned However we are still a couple of weeks away and Ive not seen the final installers to say
for certain its there
Ravindra ChanneJun 11 2013 815 PM
Hi Thomas
Thanks for a wonderful and very informative blog Is there any update on 32 bit REGI file
Is it expected along with SPS6
Regards
Ravi
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010051
Thomas Jung in response to Amanda Rzepka on page Jun 7 2013 942 PM
gtCan the XS Services be used in a BW on HANA Scenario
Yes XS is part of ALL HANA systems You should check and make sure you are licensed for direct access to
the underlying HANA instance however
Thomas Jung in response to Holger Schimanski on page Jun 7 2013 941 PM
gtIs there a similar library which could be used in XS Engine
The XSODATA development object is similar We also have higher level frameworks for XMLA and Search
Services (InA) You can expect more such high level frameworks to be added to the HANA Extended
Application Services in the future
Thomas Jung in response to Manav Mehra on page Jun 7 2013 939 PM
Have you used something like the Chrome developer tools to see see if you are getting any client side
javascript errors or to see if the request to your xsodata service is successful
Thomas Jung in response to Christian Hufnagl on page 52Jun 7 2013 938 PM
It will ship as non-automatic content in SPS6 (all systems will have it and it just needs to be imported) The
delivery units are also part of this weeks updates to the Cloudshare and AWS developer center images They
are also available for download as part of the content of the openSAP course
Thomas Jung in response to Matthew Pickell on page 51Jun 7 2013 937 PM
CORS support will come with SPS6 at the end of June
Thomas Jung in response to Jeroen Custers on page 51Jun 7 2013 936 PM
gtWill this bug be fixed in HANA ver 56
Personally Ive still experienced this bug in SPS6 internal builds Must be a tricky one to find Luckily the
workaround of closing and reopening isnt too difficult Just annoying This also probably makes the bug low
priority
Jeroen Custers in response to Vivek Singh Bhoj on page 52Jun 7 2013 411 PM
This issue also occurs on rev56
Matthew PickellJun 7 2013 258 PM
Thomas
Has CORS been included in a release yet
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010052
Vivek Singh Bhoj in response to Chandra Edem on page 52Jun 5 2013 601 AM
Hi Chandra
Date for Week1 Assignment has been extended till June 11
So you can give Week 1 Assignment now
Christian HufnaglJun 4 2013 543 PM
Hi Thomas
thank you for the interesting tutorial
Can you tell me whether it is possible to download the source code of the ldquoPutting it all togetherrdquovideo And if yes Where can I download itThanks
Christoph
Vivek Singh BhojJun 4 2013 1116 AM
Hi Thomas
Thanks for OpenSAP classes
Your Youtube Account also have very good exercises
IN OpenSAP Week 2 Unit 3 tutorial after assigning admin role to my user Id i am not able to see sequences
synonyms triggers under my schema or any other schema i am only able to see Column Views Procedures
Tables and Views
Though now i am able to insert data into my created table
Can you let me know how i will be able to see Sequences under my schema without removing the admin role
I am using HANA revision 52
Got to know from OpenSAP that
This is a known issue and the only way that Ive seen to fix it is to actually close the studio and open it again
then refresh the node
Cheers
Rich Heilman
SAP HANA Product Management
Will this bug be fixed in HANA ver 56
Chandra Edem in response to Thomas Jung on page 53Jun 4 2013 646 AM
Thomas
I registered for OpenSAP course Introduction to Software Development on SAP HANA on June 2 900PM
I didnt know that it is going to end WEEK1 assignment test on 632013 300PM Is there any way can take
that WEEK1 Assignment Test
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010053
Thanks
Chandra
Thomas Jung in response to Alexander Bauer on page Jun 3 2013 856 PM
SAPUI5 gets updated auutomatically when you apply HANA revisions There is no additional download or
update needed
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010016
However it did not bring any data The content of the response object indicated that there was Proxy
authentication issue
When I tried to check the Destination in the XS Admin Console surprisingly none of the fields are populated
and everything (except the Trust Store drop down) is disabled All these fields are supposed to be populated
as indicated in the Modeling Guide
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010017
However the User already has the following privileges
The same scenario was present for the Http Destination I prepared earlier There are couple of internal errors
at the bottom On clicking them the following list is displayed
1 Internal Error dbError(ConnectionprepareStatement) 258 - insufficient privilege Not authorized at
ptimequerycheckerquery_checkcc24182 No valid SAP Crypto configuration
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010018
It appears from various blogs that the second error (No valid SAP Crypto configuration) is related to SSL
configuration in HANA I would contact the HANA Administrator to look into this issue Of course it would be
great if you could provide some insight
However I have no clue regarding the first error Request your help and cooperation in this regard
The initial issue of not finding the HttpDestination which I created still persists
Thanks for all your help
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 18Oct 31 2014 342 PM
First of all you would never use the workspace name It isnt ever part of anything It is only the package
structure that counts The first item in your list is the only one with the correct package Off hand it looks right to
me You are supposed to supply the full package path Have you configured this HTTP Destination in the XS
Admin tool yet
Tarasankar Banerjee in response to Thomas Jung on page 18Oct 31 2014 326 PM
Updated it Thanks
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 18Oct 31 2014 313 PM
Your comment got cut off We never really get to see what your problem is
Tarasankar Banerjee in response to Thomas Jung on page 21Oct 31 2014 256 PM
Thanks Thomas
I am facing as issue while trying to use an HTTP Destination I understand that the xshttpdest and xsjs file
need to in the same folder Following is the structure of my test project
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010019
As you can see the HTTP Destination and the XSJS files are in the same folder services The workspace
name is XS_Workspace and the package structure is as follows
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010020
Now I am trying to read this destination
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010021
When I am using full package structure destination_package =
rootworkTara02XSTest01XSHttpTest01services I am receiving the
error message httpreadDestination destination not found (package
rootworkTara02XSTest01XSHttpTest01services name XSHttpDest01)
On using the workspace name destination_package = XS_Workspaceservices I am receiving the
error message User is not authorized to use destination (package XS_Workspaceservices name
XSHttpDest01)
On using destination_package = rootworkTara02XSTest01services also I am receiving the error
message User is not authorized to use destination (package rootworkTara02XSTest01services
name XSHttpDest01) Strangely the services folder is not directly under XSTest01
Lastly I deliberately gave a wrong service name destination_package = XS_Workspaceservices and
destination_name = XSHttpDest02 But even then I received the error message User is not authorized to
use destination (package XS_Workspaceservices name XSHttpDest02) not that the destination is not
found
Could you please help me to resolve this issue
Thanks a lot for your helps
Regards
Tarasankar
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010022
Thomas Jung in response to Tarasankar Banerjee on page 22Oct 30 2014 152 PM
Since SPS06 its possible to use outbound HTTP destinations and to call out to external services using XSJS
Thomas Jung in response to Tarasankar Banerjee on page 22Oct 30 2014 150 PM
gtSo when the program runs in server would it automatically consider the OS user credentials
No It doesnt automatically use anything You have to specific the user and password that you want to use for
the proxy Although many proxy servers dont require a username and password
Tarasankar Banerjee in response to Thomas Jung on page 23Oct 30 2014 707 AM
Hi Thomas
Just watched the video you shared above Thanks a lot for it It is really informative and helpful
Regards
Tarasankar
Tarasankar Banerjee in response to Tarasankar Banerjee on page 22Oct 30 2014 346 AM
Got answer for the second point SAP HANA XS Administration Tool is the place to configure Proxy settings
Regards
Tarasankar
Tarasankar Banerjee in response to Tarasankar Banerjee on page 22Oct 29 2014 314 PM
Dear Thomas
another question is that does the proxy settings in the HttpDestination refer to the OS user of the HANA
server We specify useProxy as true and authType as basic in the HttpDestination but not maintain any
user credentials So when the program runs in server would it automatically consider the OS user credentials
Thanks
Regards
Tarasankar
Tarasankar Banerjee in response to Thomas Jung on page 23Oct 29 2014 132 PM
Thanks Thomas I am currently checking this option only
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010023
My current requirement is to fetch Weather Data and Social Media data from various OData services and store
them in HANA for further analysis What might be the best way for this I am currently checking the option of
creating an XS application which would connect to the external services fetch the data and save that in HANA
using DB Connection Is this the best way Or should we try to use JAVA or some other way
Your valuable suggestions are most welcome Thanks
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 23Oct 29 2014 1256 PM
gtHowever is it possible to consume XSODATA service from XSJS instead of using DB Connection
You can via an outbound HTTP destination although I certainly wouldnt recommend it It would be rather
complex and not well performing
gtAlso is it possible to consume data from external OData services for weather data social media data etc from
XSJS
Sure with the same Outbound HTTP Connectivity
httpswwwyoutubecomwatchv=fWirvj9l7eY
Maintaining HTTP Destinations - SAP HANA Developer Guide - SAP Library
Tarasankar BanerjeeOct 29 2014 1119 AM
Dear Thomas
Thanks for the great blog
I am able to connect to Database and execute queries from XSJS service However is it possible to consume
XSODATA service from XSJS instead of using DB Connection
Also is it possible to consume data from external OData services for weather data social media data etc from
XSJS
If possible it would be great if you could provide some code sample or guidelines
Thanks
Regards
Tarasankar
Thomas Jung in response to Weiping Lu on page 24Sep 25 2014 833 AM
Please refer to service note 1849775
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010024
httpservicesapcomsapsupportnotes1849775
I believe it will address your issue
Weiping LuSep 24 2014 519 PM
Hi Tom
Great post and videos I have a tough issue calling a HANA procedure from XS takes gt 5min but from HANA
studio lt 1 min Were using Amazon AWS rev 70 and 73 Any help will be greatly appreciated
Thanks
WPL
Thomas Jung in response to Su Srikanth on page 24Aug 11 2014 253 PM
You transport XSODATA services like you would any other repository content - via a Delivery Unit
Su SrikanthAug 11 2014 750 AM
Hi Thomas
Great blog
Ive a query here - we create the odata services(andor URLs created to view in the web browser) in
development environment now if we have to transport it to the quality andor production environment how
can we do this - is the same as importexport or is there any specific way to do please help with any useful
pointers
Many thanks as always
Su
Thomas Jung in response to ARSHAD SHAIKH on page 24May 15 2014 231 PM
Ive never written any blogs on calculation views I dont cover that topic That is why I suggested you ask your
question in the proper SCN forum
Although looking at your your above SQL Statement I dont see why you couldnt do this directly in XSODATA
off of the table STATUS without the need for the calculation view or the SQLScript Procedure
ARSHAD SHAIKH in response to Thomas Jung on page 25May 15 2014 1154 AM
Hello Thomas
I am new to hana Please suggest me the blogs of you related to calculation view that calling
procedures(procedures have out parameter)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010025
I am trying to fetch the result of procedure in calc view and want to create odata service for that calculation
view
procedure code goes like this
---------------------------------------
CREATE PROCEDURE TWEETS_TODAY(OUT OP BIGINT)
language SQLSCRIPT sql security invoker default schema SOCIAL360 reads sql data as
BEGIN
SELECT COUNT() INTO OP FROM SOCIAL360STATUS WHERE CREATED_AT = CURRENT_DATE
END
calc view code goes like this
----------------------------------------
Begin Procedure Script
BEGIN
DECLARE OP BIGINT
CALL SOCIAL360TWEETS_TODAY(OPvar_out)
END End Procedure Script
Thanks
-Arshad
Thomas Jung in response to ARSHAD SHAIKH on page 25May 15 2014 944 AM
Your question seems to have no relation to the content in this blog Please consider instead asking general
HANA questions in the appropriate SCN Forum
ARSHAD SHAIKHMay 15 2014 917 AM
Hi Thomas
I want to call procedures in calculation view (procedures have out parameter)
Please suggest me step by step procedure with example and supporting documents
Thanks
ARSHAD SHAIKH
Henrique Pinto in response to Blair Krotenko on page 26Apr 16 2014 711 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010026
Hmm not really sure of that I see it but that might be because Im an employee
But the NET development partner I was working with was not enrolled in any kind of beta testing program and
they were able to download it so I guess you should as well
Make sure to go in the Installation and Upgrades menu and not the Support Packages and Patches
Go to httpservicesapcomswdc -gt Installations and Upgrades -gt Browse our Download Catalog -gt SAP In-
Memory (SAP HANA) -gt SAP HANA ADONET 10
Best regards
Henrique
Blair Krotenko in response to Henrique Pinto on page 26Apr 16 2014 656 PM
Thanks for the info Henrique but I cant find it I dont know if it is an authorization issue or do we need to be a
ramp-up customer to dl and use a beta product
Thanks
Blair
Henrique Pinto in response to Thomas Jung on page 27Apr 16 2014 614 PM
The ADONET provider is available for download in the SAP Service Marketplace (in beta edition so far)
Thomas Jung in response to Kamal Jain on page 26Apr 16 2014 514 PM
For general OData structure and syntax I find that the Odataorg website is very helpful For example on this
topic
httpwwwodataorgdocumentationodata-version-2-0uri-conventions
The syntax of a $expand query option is a comma-separated list of Navigation Properties Additionally each
Navigation Property can be followed by a forward slash and another Navigation Property to enable identifying a
multi-level relationship
The page also has some sample URLs
Kamal JainApr 16 2014 536 AM
Dear Thomas
I agree that we need to pass all the associations in the expand I tried with some of options but was not
through
Now i just tried with below syntax and able to achive Thx
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010027
httpdewdftzld025pgdevsapcorp8000DTHCPXSZPMIS_PRO_ACTUALxsodata
ZPROHEADER(PR07_000002)$expand=ZACTUZEMPD
Regards
Kamal Jain
Thomas Jung in response to Blair Krotenko on page 27Apr 15 2014 623 PM
We do plan to release an ADONET provider specific to HANA in the near future This would probably be the
best option for consumption from NET Until then I would think that ODBC is probably the next best option It
gives you generally easy portability from already existing database code You could consume OData as well
although that is more generally consumed from the UI layer itself It guess it somewhat depends upon where
you are calling the service from in your NET application
Blair KrotenkoApr 15 2014 409 PM
Hi Thomas
We are looking at consuming HANA data in a NET application and from what I can see there are 2 options -
OData and ODBC It seems to me that OData might be the better option when consuming HANA data in an XS
application while ODBC might be the better option for NET What are your thoughts Is there a paper on this
subject I havent been able to find a comparison document for this Are there any security caveats to be aware
of for these options
Thanks
Blair
Thomas Jung in response to Kamal Jain on page 27Apr 15 2014 136 PM
You have to list both associations in the expand on the URL if you want both relationships to be processed
Kamal JainApr 15 2014 1249 PM
Hi Thomas
Thx for valuable and useful information
I have an query regarding XS Odata service creation for more than 2 tables and get all the data in one
command
There is req in which service needs to be created for 3 tables to get data from all these
First table has Project ID as key second table has composite
ProjectID and Employee Id as key and third table has Employee id as
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010028
key
So if I create navigation for first 2 tables based on project id and use expand comand than its working fine and I
can see data of both the tables
Further if I add navigation for third table also as below then below expand is displaying data for first two tables
only Pls share how to use expand command in this case if possible to get all tables data based on project id
How to use navigation ZEMPD here
httpdewdftzld025pgdevsapcorp8000DTHCPXSZPMIS_PRO_ACTUALxsodata
ZPROHEADER(PR07_000002)$expand=ZACTUamp
service namespace
DTHCPXS
DTHCPDTHCPDBHCP_PROJECT_HEADER
as ZPROHEADER
navigates (PROJECT as
ZACTU)
DTHCPDTHCPDBHCPT_ZPMIS_ACTUAL
as ZACTU
navigates (EMPLOYEE as
ZEMPD )
DTHCPDTHCPDBHCP_ZPMIS_RES_MASTER
as ZEMPD
association PROJECT principal
ZPROHEADER(PROJECTID)
multiplicity 1 dependent
ZACTU(PROJECTID) multiplicity
association EMPLOYEE principal
ZACTU(EMPLOYEEID)
multiplicity 1 dependent
ZEMPD(EMPLOYEEID) multiplicity
1
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010029
Pls suggest if there is anything to add or correct in XS odata service syntax above
Regards
Kamal Jain
Vikas Madaan in response to Thomas Jung on page 29Apr 14 2014 458 PM
Thanks Thomas
Under which component
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 29Apr 14 2014 450 PM
No this isnt a known issue Ive seen Nor can I recreate the problem in my system No you cant maintain the
authentication in XSHTTPDEST itself It intentionally must be set in XSADMIN tool I can really only suggest
that you open a support ticket
Vikas MadaanApr 14 2014 431 PM
Hi Thomas
I am trying to pull data from SAP system onto HANA Database using XSJOB files I am calling RFC enabled
function modules over HTTP request It helps me replicating the real time ECC data onto HANA as well with
back ground jobs
I am facing one problem in the XSHTTPDEST file I am able to create and activate the file using studio and this
file is even visible in the web based XS administration tool But in the web based tool when i provide user and
password for basic authotication then system just clears the user id and password when i try to save This the
reason our HTTP requests are getting failed and below is the response we are getting in the response body
lthtmlgtltheadgtlttitlegtLogon Error Messagelttitlegt
Is this known issue or we are missing something Is it possible to provide user and password in the
XSHTTPDEST file Is there any particular syntax
I checked and i have the required authorizations as well develper Guide
Please help
Regards
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010030
Vikas Madaan
Abdul HakimFeb 22 2014 359 AM
Hi Thomas - Any recommended book or resource to learn and master Server Side Javascript There were
many books available in the market but as a beginner need to know the right resource book to start with and
master this stuffAlso whether SAP plan to conduct any training to teach Server Side Javascript similar to other
standard training offerings
Thanks
Hakim
Samuel Tanor-GyeduFeb 20 2014 839 AM
Thanks Thomas
I will definitely have a look at SHINE
Thomas Jung in response to gentilini andre on page 30Feb 19 2014 422 PM
Difficult to say what is wrong I several things which are different than our sample that does this You are using
a POST for instance instead of a GET However if you are gettting a 200 then I assume the service call is
correct In client side tools (like Chrome Developer Tools) you should be able to see the response object from
the call
However what I would really recommend is that you study the SHINE content (SAP HANA Interactive
Education) There is already a sample application which does this in SHINE Also it has some special
JavaScript in the UI to handle the file attachment via AXAJ call Perhaps that is the part you are missing
You can read more about SHINE here It is also included already installed in the latest version of the HANA
Developer Center trial image (SP7 based)
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
gentilini andreFeb 19 2014 325 PM
Hi Thomas
well I followed your hints but it still donacutet work
I created a xsjs File like below
function downloadExcel()
try
var body =
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010031
alert(drin)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
alert(drusse)
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount
tTax Amount tNetto Amount tCurrency n
while(rsnext())
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
catch (e)
alert(db conn funktioniert nicht)
var a = $requestparametersget(cmd)
$responsesetBody(Invalid Command +a)
switch (a)
case doex
$responsesetBody(Invalid Command +a)
alert(filedownload)
thisdownloadExcel()
break
default
$responsestatus = $nethttpINTERNAL_SERVER_ERROR
$responsesetBody(Invalid Command +a)
The Controllerjs File
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010032
doFileDownload function (oEvent)
jQuerysaprequire(sapuicommonsMessageBox)
sapuicommonsMessageBoxshow(Export Starten sapuicommonsMessageBoxIconconfirm
Information)
sapuicommonsMessageBoxconfirm(Export starteninform Confirmation)
return false
function inform(rValue)
alert (drinnnnne)
var aurl = FileDownloadxsjscmd=doex
if(rValue) If User presses Ok
alert(aurl)
jQueryajax(
url aurl
method POST
dataType json
datacmddoex
success sapuicommonsMessageBoxalert(Export wird ausgefuumlhrtConfirmation)
errorfunction onErrorCall(jqXHR textStatus errorThrown)
alert(jqXHRstatus)
sapuicommonsMessageBoxshow(jqXHRstatus
ERROR
Error in calling Service )
return
complete sapuicommonsMessageBoxalert(Export Erfolgreich
abgeschlossenConfirmation)
)
return false
else If the user presses Cancel
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010033
sapuicommonsMessageBoxalert(Vorgang abgebrochenNotification)
)
at last but not least the view
sapuijsview(zag1_ui_cv_03Index
Specifies the Controller belonging to this View
In the case that it is not implemented or that null is returned this View does not have a Controller
memberOf zag1_ui_cv_03Index
getControllerName function()
return zag1_ui_cv_03Index
Is initially called once after the Controller has been instantiated It is the place where the UI is
constructed
Since the Controller is given to this method its event handlers can be attached right away
memberOf zag1_ui_cv_03Index
createContent function(oController)
create a lite button with an icon and a text
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010034
lite true
)placeAt(btn)
oButton3attachPress(oControllerdoFileDownload)
var oButton4 = new sapuicommonsButton(
text Refresh
icon imagesrefreshjpg
lite true
press function() var data = oTableval()
if(data == )
alert(no data found)
return
print(content)
print(DatArray)
if (data = )
alert(Funzt)
JSONToCSVConvertor(data CUSTOMER AMOUNT true)
)placeAt(btn)
jQuerysaprequire(sapuitableTable)
create table control with properties
var oTable = new sapuitableTable(
width 100
rowHeight 50
title Amount per Partner
selectionMode sapuitableSelectionModeNone
)
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Company Name
)
template new sapuicommonsTextView(
text CompanyName
)
sortProperty CompanyName
))
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010035
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Partner ID
)
template new sapuicommonsTextView(
text PartnerId
)
sortProperty PartnerId
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Postal Code
textAlign sapuicoreTextAlignEnd
)
template new sapuicommonsTextView(
text PostalCode
textAlign sapuicoreTextAlignEnd
)
sortProperty PostalCode
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text City
)
template new sapuicommonsTextView(
text City
)
sortProperty City
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Purchase ID
)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010036
template new sapuicommonsTextView(
text PurchaseOrderId
)
sortProperty Currency
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Lifecycle Status
)
template new sapuicommonsTextView(
text LifecycleStatus
)
sortProperty LifecycleStatus
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Gross Amount
)
template new sapuicommonsTextView(
text GrossAmount
)
sortProperty GrossAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Tax Amount
)
template new sapuicommonsTextView(
text TaxAmount
)
sortProperty TaxAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Amount Netto
)
template new sapuicommonsTextView(
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010037
text CM_NET_Amount_001
)
sortProperty CM_NET_Amount_001
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Currency
)
template new sapuicommonsTextView(
text Currency
)
sortProperty Currency
))
var oModel = new sapuimodelodataODataModel
(httpqperiorvmcldsr8000ZAG1_WS_001ZAG1_CV_001xsodata false)
oTablesetModel(oModel)
oTablebindRows(Amount)
return oTable
)
It wonacutet call the function or better said the action of the button works fine till to the point where it should call the
xsjsfile to generate the excel-file I wondered that in the ajax part the error- success- and complete-part will
be executed at the same time and not only one of this statements The message is 200 (The request has
succeeded The information returned with the response is dependent on the method used in the request)
Maybe you can see where my mistake is or whats going wrong
Iacuteve the developer edition on cloudshare (Hana Studio rev68 Server is on SPS05)
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010038
Andreacute
Thomas Jung in response to Samuel Tanor-Gyedu on page 38Feb 19 2014 523 AM
I dont think I can help you This appears to a question about how odata4j works not about XS I have no
experience with odata4j myself
Samuel Tanor-GyeduFeb 18 2014 913 AM
Hi Thomas
I have an odata service with this endpointhttpss5hanaxshanatrialondemandcomservicesUserxsodata
I am now trying to consume it from eclipse with the odata4j libraries
This is how I get the endpoint
public UserServiceOdata(String endpointUri)
thisendpointUri = endpointUri
ODataConsumerdumpresponseHeaders(true)
consumer = ODataConsumerscreate(endpointUri)
This is my method to add a user
public User addUser(User user)
consumercreateEntity(entitySet)properties(OPropertiesint32(propertyUserId
usergetId()))properties(OPropertiesstring(propertyUserName
usergetName()))properties(OPropertiesstring(propertyUserEmail usergetEmail()))execute()
return user
When I call addUser method I get an Error
Caused by javaxxmlstreamXMLStreamException ParseError at [rowcol][78253]
Message The reference to entity sourceUrl must end with the delimiter
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010039
When I use this endpoint httpss5hanaxshanatrialondemandcomservicesUsersvc everything works fine
With the httpss5hanaxshanatrialondemandcomservicesUserxsodata I get errors
Please I would be very grateful for assistance
Thanks in advance
Regards
Samuel
Thomas Jung in response to gentilini andre on page 39Feb 18 2014 431 AM
You have a fundamental misunderstanding here You are placing server side JavaScript code in your client
side UI5 application The function downloadExcel is something you need to execute on the server It needs to
be in an XSJS file and it is called from the client side via AJAX - as a REST service not as a local function
gentilini andreFeb 17 2014 451 PM
Hello Thomas
Thank you for this great How-To Guide
Iacutem pretty new in SAPUI5 and tried your export-sample in my little trial project but it doesnacutet work
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010040
My Button for this looks like
ltcodegt
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
lite true
press function() alert(oButton3getText())
downloadExcel()
ltcodegt
and the function for this action looks like
ltcodegt
function downloadExcel()
var body =
alert(drin)
print($query)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount tTax
Amount tNetto Amount tCurrency n
while(rsnext())
if(rsnext() == )
alert($responsesetBody( Failed to retrieve data ))
alert($responsestatus = $nethttpINTERNAL_SERVER_ERROR)
else
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010041
ltcodegt
Iacutem afraid and hope that you can help me
Kind regards
Andreacute
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1246 PM
gtIs there any restriction or development limitation in the XSJSLIB files
Thats a very general question Difficult to answer without any context
Vikas Madaan in response to Thomas Jung on page 41Feb 11 2014 1245 PM
Thanks Thomas
I think we are on same page
Once quick question that came to my mind Is there any restriction or development limitation in the XSJSLIB
files
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1230 PM
gtCould please help me in understanding in more advantagesdisadvantages for both techniques
Youve summarized it pretty well already
gtbecuase i dont want to use both the approaches
Even with the CRUD support and exits in XSODATA its still pretty hard to do 100 via XSODATA There are
still valid use cases for XSJS when you need custom body custom read processing job scheduling etc Its
good to try and use XSODATA whenever possible but I wouldnt automatically exclude the use of XSJS
Vikas MadaanFeb 11 2014 1008 AM
Hi Thomas
Thanks a lot for sharing useful information through various blogs
In my current project we are evaluating use of XSOData or XSJS applications I saw your videos like the one
mentioned below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010042
httpwwwsaphanacomdocsDOC-4376
Want i understood from various blog is this
From SP7 we can write exsits in the OData services and it is very easy to consume at the client side just like
any REST base service and from my understanding it is Scalable as well I would love to use XSOData always
becuase development effort is very less compare to XSJS and it is very easy to rampup the team on OData
related development objects
XSJS were as provide more control becuase of server side scripting becuase it allows development on the
server side using JavaScript Core APIs of SAP HANA Extended Application Services are therefore exposed
as JavaScript functions providing easy access to the HTTP Request and Response object as well database
access to execute SQL or call SQLScript Procedures It provide us control over the body format and and URL
parameter definition
Could please help me in understanding in more advantagesdisadvantages for both techniques
I am very keen to understand and also explain the same to team members becuase i dont want to use both the
approaches and even sometimes customer can also ask the same to us
Also If we are on SP6 then from my understanding XSJS provides us more capability in terms of complex
application Corrent me If i am wrong
Thanks
Regards
Vikas Madaan
Thomas Jung in response to Raghuveer Phull on page 42Feb 5 2014 312 PM
Yes there are videos on the CRUD features of XSODATA which were new in SP6
For more on CRUD support in SP6 see this video
oData CreateUpdateDelete Support in SAP HANA SPS6
For the extended support for XSJS exits in SP7 see this video
SAP HANA SPS 07 XSODATA Exits in XSJS
Raghuveer PhullFeb 5 2014 122 AM
Do you have an exampledocumentationvideo where you can write a service which will populate Hana DB
What I am asking for is a way for my external script to populate the DB tables i have created in Hana DB
Thomas Jung in response to reda miraoui on page 43Jan 29 2014 411 PM
The source code for the examples shown here are shipped as part of SHINE (SAP HANA Interactive
Education)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010043
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Vivek Singh Bhoj in response to reda miraoui on page 43Jan 29 2014 352 PM
Hi Reda
You can import Shine Content in HANA and then check all these source codes
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Regards
Vivek
reda miraoui in response to Thomas Jung on page Jan 29 2014 344 PM
Hey Thomas
Is it possible to download source code of your project from this HANA tutorial
Thanks
Reda
Thomas Jung in response to Abdul Hakim on page 43Nov 21 2013 1133 PM
Yes River can be used as an alternative and when activated it will generate Server Side JavaScript andor
SQLScript
Abdul Hakim in response to Thomas Jung on page 44Nov 21 2013 747 PM
Hi Thomas - Was going through blog regarding River (RDL)Just a question on this
When you say Programming language for HANA native development is Server side Javascript SQL SQL
ScriptOnce RDL is rolled out whether RDL can be used for native application development instead of Server
side Java script SQL SQL Script I am very much new to this stuff so appreciate if you can also help on
how to get started with Server Side Java script SQL SQL Script for HANA
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 30 2013 750 AM
Hi Thomas
Thanks for your response I am talking about more content on shine
thanks
Ashutosh
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010044
Baskar Gopalakrishnan in response to Thomas Jung on page 44Oct 30 2013 1249 AM
Hi Thomas
Im a SAP PI Middleware consultantSAP topic leader in XIPI heavily worked on Java related
Netweaver stack I have knowledge in ABAP but not worked heavily in abap I have enrolled your sap hana
native application development course I feel very interesting I did work heavily in java and javascript projects
using eclipse development tool Do you think if I invest my time in just native hana development and proceed
in HANA field is a good step I dont have BW experience either
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 819 PM
Thanks for the clarification Much appreciated
Thomas Jung in response to Abdul Hakim on page 44Oct 29 2013 120 PM
gtABAP Close to HANA means whether we can expect a similar 2 tier architecture similar to HANA XS in the
future or what does that mean
No it doesnt mean that ABAP will become a 2 tier architecture We will not move the ABAP VMKernel into
HANA itself It will remain a separate application server At least for the current plansforeseeable future What
he was referring to was bringing the programming models closer For instance the new 740 SP5 feature that
allows you to write SQLScript directly within an ABAP class method
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 650 AM
Thomas - Thanks for the clarificationMuch appreciatedI was listening to ABAP on HANA session by
Thorsten Schneider this year Teched and he was mentioning that SAP Plans to bring ABAP very close to
HANA in the coming future but not much details have been discussed in the sessionABAP Close to HANA
means whether we can expect a similar 2 tier architecture similar to HANA XS in the future or what does that
mean
Thanks
Hakim
Thomas Jung in response to Abdul Hakim on page 45Oct 28 2013 703 PM
gt whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the option is
recommended by SAP then kindly share the pros and cons of each of the item
Taken from the TechEd CD103 session slides
Guidance
bulluse ABAP for optimization of existing progams (in context of SAP Business Suite or BW)
bullconsider HANA Native Development for development of new applications which will solely run on SAP HANA
bullcombine ABAP and HANA Native Development to enrich existing applications (eg SAP HANA Live Fiori)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010045
ABAP
bullapplications follow 3-tier architecture
bullABAP is in general database agnostic but with release 74 optimized for SAP HANA
bullProgramming language ABAP ABAP OO with the option to use SAP HANA features
bullIDE eclipse-based ABAP Development Tools
HANA Native Development
bullapplications follow 2-tier architecture
bullHANA Native Development is SAP HANA specific and embedded in the database
bullProgramming language River server-side JavaScript SQLSQLScript
bullIDE eclipse-based SAP HANA Studio + web IDE
Thomas Jung in response to ashutosh dixit on page 45Oct 28 2013 701 PM
gtIs there any more demos for the SHINE
Im not exactly sure what you mean by that We are building additional content for SHINE that will be delivered
in SP7
Abdul HakimOct 28 2013 326 PM
Thomas - Let us say a customer is running SAP Netweaver 74 ABAP with HANA DB and they have HANA
extended service as wellIf the customer wants to do new developments then what is the recommendation
from SAP ie whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the
option is recommended by SAP then kindly share the pros and cons of each of the item (SAP Netweaver 74
ABAP Vs SAP HANA XS)
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 28 2013 221 PM
Hi Thomas
Thanks a lot for your its working now
Is there any more demos for the SHINE
Thanks
Ashutosh
Thomas Jung in response to ashutosh dixit on page 46Oct 25 2013 809 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010046
As this content is now standard in SP6 as part of SHINE (SAP HANA INteractive Education) there also some
setup instructions on helpsapcom
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Basic points to check - have you generated the synonyms in the data generator Ran the data generator to
create some data Have the role assigned Added client 001 to your user profile
ashutosh dixitOct 24 2013 130 PM
Hi Thomas
Amazing blog - once again Thomas thanks
I have been following you for many days attended your OPEN SAP course also
That was an amazing course for new learner like me
One of our client is looking forward for XS based search Application identical to what you have created in your
DEMO
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010047
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010048
But I am not able to fetch the data on blank HTML page is coming with no data
If there is any step by step document related to this please help in getting that
Any help will be highly appreciated
Thanks
Ashutosh
Naveen KumarSep 26 2013 1130 AM
Good Document
Heber FabianoAug 27 2013 323 PM
Great content as always Keep sharing with us
Thomas Jung in response to Orel Stringa on page 48Aug 27 2013 147 PM
This is currently not possible The CORS support is for all origins We dont yet have the feature to maintain a
whitelist of CORS origins
Orel Stringa in response to Thomas Jung on page Aug 27 2013 801 AM
Hi Thomas
nice to see that SAP has made it possible with SP6 to specify cross origin resource sharing (CORS) support
via the xsaccess file SP6 HANA development guide has example of how to specify CORS support
I have build an XS application and would like to serve SAPUI5 on a diffhost than XSHANA
How can I specify that I would like to allow cross origin access restricted to certain domain(s) only
Is there a special keyword syntax for specifying that
Thank yoi
Orel
Vijay UthayakumarAug 27 2013 131 AM
Highly informative amp digestible Fantastic work
Jerry WangAug 1 2013 955 AM
Hi Tomas
Thank you
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010049
Jerry
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 644 PM
JSLint checks are very strict and often produce syntax errors for items that just stylistic and wont actually
cause an error upon activation or runtime You can either ignore the JSLint errors or deactivate JSLint for this
project in these cases However it might also be an indication that the JavaScript code you are trying to import
isnt compatible with Strict mode
httpsdevelopermozillaorgen-USdocsWebJavaScriptReferenceFunctions_and_function_scope
Strict_mode
Milan Vrozina in response to Thomas Jung on page 49Jul 21 2013 624 PM
Thanks for clarification I thought there would be some kind of import
But anyway in case of this specific library I have some problems with JSLint validation when I do cut and paste
of the original code
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 343 PM
What kind of problem are you having using this library Strict mode JavaScript which doesnt try to access the
DOM Window or other client side specific objects should work in Server Side XSJS Generally if you have a
library you just cut and paste into your XSJS or an XSJSLIB file and then call the functions from your code
Milan VrozinaJul 21 2013 339 PM
Hello
first and foremost thank you for perfect openSAP classes related to HANA development and for this blog as
well
I have one question related to server-side javascript You mentioned in course that is possible to use 3rd party
libraries or reuse 3rd party code But I cant find a possible way how to import 3rd party javascript library -as
is- to server and use it For example I would like to use JSZip library to zip some file before sending it to client
from xsjs application Is that possible Thank you
Chandrashekhar MahajanJul 3 2013 734 PM
This is excellent blog Now HANA XS is very much clear to me
Mohan krishnaJul 1 2013 144 PM
WOW - great blog Thomas This will be very helpful in understanding SAP hana Good Job
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010050
Abdul Hakim in response to Thomas Jung on page 50Jun 27 2013 833 PM
Thanks for the clarification
Thomas Jung in response to Abdul Hakim on page 50Jun 27 2013 659 PM
HANA Extended Application Services uses SQLScript and JavaScript as its two primary programming
languages
gtwhether the current SAP Business suite based on ABAP will be completely migrated to HANA service
No The Business Suite already runs on HANA but still via the ABAP application server It will continue to
leverage HANA via a combination of enhancements to ABAP and utilizing some of the technologies described
in this blog
gtAlso whether ABAP can be used to built application in HANA extended services
No There is no ABAP language container in HANA Extended Application Services
Abdul HakimJun 27 2013 405 PM
Hi Thomas - What is the programming language used for HANA Extended application services
As HANA is more than a database ie application platform by itself and as you mentioned that more and more
applications will be built on HANA i have question as how the future SAP ERP system looks likewhether the
current SAP Business suite based on ABAP will be completely migrated to HANA service in the future or SAP
ABAP server will continue to evolve and receive focus investment from SAP Also whether ABAP can be used
to built application in HANA extended services Your thoughts
Thanks
Abdul Hakim
Thomas Jung in response to Ravindra Channe on page 50Jun 11 2013 830 PM
Yes it is still planned However we are still a couple of weeks away and Ive not seen the final installers to say
for certain its there
Ravindra ChanneJun 11 2013 815 PM
Hi Thomas
Thanks for a wonderful and very informative blog Is there any update on 32 bit REGI file
Is it expected along with SPS6
Regards
Ravi
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010051
Thomas Jung in response to Amanda Rzepka on page Jun 7 2013 942 PM
gtCan the XS Services be used in a BW on HANA Scenario
Yes XS is part of ALL HANA systems You should check and make sure you are licensed for direct access to
the underlying HANA instance however
Thomas Jung in response to Holger Schimanski on page Jun 7 2013 941 PM
gtIs there a similar library which could be used in XS Engine
The XSODATA development object is similar We also have higher level frameworks for XMLA and Search
Services (InA) You can expect more such high level frameworks to be added to the HANA Extended
Application Services in the future
Thomas Jung in response to Manav Mehra on page Jun 7 2013 939 PM
Have you used something like the Chrome developer tools to see see if you are getting any client side
javascript errors or to see if the request to your xsodata service is successful
Thomas Jung in response to Christian Hufnagl on page 52Jun 7 2013 938 PM
It will ship as non-automatic content in SPS6 (all systems will have it and it just needs to be imported) The
delivery units are also part of this weeks updates to the Cloudshare and AWS developer center images They
are also available for download as part of the content of the openSAP course
Thomas Jung in response to Matthew Pickell on page 51Jun 7 2013 937 PM
CORS support will come with SPS6 at the end of June
Thomas Jung in response to Jeroen Custers on page 51Jun 7 2013 936 PM
gtWill this bug be fixed in HANA ver 56
Personally Ive still experienced this bug in SPS6 internal builds Must be a tricky one to find Luckily the
workaround of closing and reopening isnt too difficult Just annoying This also probably makes the bug low
priority
Jeroen Custers in response to Vivek Singh Bhoj on page 52Jun 7 2013 411 PM
This issue also occurs on rev56
Matthew PickellJun 7 2013 258 PM
Thomas
Has CORS been included in a release yet
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010052
Vivek Singh Bhoj in response to Chandra Edem on page 52Jun 5 2013 601 AM
Hi Chandra
Date for Week1 Assignment has been extended till June 11
So you can give Week 1 Assignment now
Christian HufnaglJun 4 2013 543 PM
Hi Thomas
thank you for the interesting tutorial
Can you tell me whether it is possible to download the source code of the ldquoPutting it all togetherrdquovideo And if yes Where can I download itThanks
Christoph
Vivek Singh BhojJun 4 2013 1116 AM
Hi Thomas
Thanks for OpenSAP classes
Your Youtube Account also have very good exercises
IN OpenSAP Week 2 Unit 3 tutorial after assigning admin role to my user Id i am not able to see sequences
synonyms triggers under my schema or any other schema i am only able to see Column Views Procedures
Tables and Views
Though now i am able to insert data into my created table
Can you let me know how i will be able to see Sequences under my schema without removing the admin role
I am using HANA revision 52
Got to know from OpenSAP that
This is a known issue and the only way that Ive seen to fix it is to actually close the studio and open it again
then refresh the node
Cheers
Rich Heilman
SAP HANA Product Management
Will this bug be fixed in HANA ver 56
Chandra Edem in response to Thomas Jung on page 53Jun 4 2013 646 AM
Thomas
I registered for OpenSAP course Introduction to Software Development on SAP HANA on June 2 900PM
I didnt know that it is going to end WEEK1 assignment test on 632013 300PM Is there any way can take
that WEEK1 Assignment Test
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010053
Thanks
Chandra
Thomas Jung in response to Alexander Bauer on page Jun 3 2013 856 PM
SAPUI5 gets updated auutomatically when you apply HANA revisions There is no additional download or
update needed
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010017
However the User already has the following privileges
The same scenario was present for the Http Destination I prepared earlier There are couple of internal errors
at the bottom On clicking them the following list is displayed
1 Internal Error dbError(ConnectionprepareStatement) 258 - insufficient privilege Not authorized at
ptimequerycheckerquery_checkcc24182 No valid SAP Crypto configuration
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010018
It appears from various blogs that the second error (No valid SAP Crypto configuration) is related to SSL
configuration in HANA I would contact the HANA Administrator to look into this issue Of course it would be
great if you could provide some insight
However I have no clue regarding the first error Request your help and cooperation in this regard
The initial issue of not finding the HttpDestination which I created still persists
Thanks for all your help
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 18Oct 31 2014 342 PM
First of all you would never use the workspace name It isnt ever part of anything It is only the package
structure that counts The first item in your list is the only one with the correct package Off hand it looks right to
me You are supposed to supply the full package path Have you configured this HTTP Destination in the XS
Admin tool yet
Tarasankar Banerjee in response to Thomas Jung on page 18Oct 31 2014 326 PM
Updated it Thanks
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 18Oct 31 2014 313 PM
Your comment got cut off We never really get to see what your problem is
Tarasankar Banerjee in response to Thomas Jung on page 21Oct 31 2014 256 PM
Thanks Thomas
I am facing as issue while trying to use an HTTP Destination I understand that the xshttpdest and xsjs file
need to in the same folder Following is the structure of my test project
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010019
As you can see the HTTP Destination and the XSJS files are in the same folder services The workspace
name is XS_Workspace and the package structure is as follows
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010020
Now I am trying to read this destination
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010021
When I am using full package structure destination_package =
rootworkTara02XSTest01XSHttpTest01services I am receiving the
error message httpreadDestination destination not found (package
rootworkTara02XSTest01XSHttpTest01services name XSHttpDest01)
On using the workspace name destination_package = XS_Workspaceservices I am receiving the
error message User is not authorized to use destination (package XS_Workspaceservices name
XSHttpDest01)
On using destination_package = rootworkTara02XSTest01services also I am receiving the error
message User is not authorized to use destination (package rootworkTara02XSTest01services
name XSHttpDest01) Strangely the services folder is not directly under XSTest01
Lastly I deliberately gave a wrong service name destination_package = XS_Workspaceservices and
destination_name = XSHttpDest02 But even then I received the error message User is not authorized to
use destination (package XS_Workspaceservices name XSHttpDest02) not that the destination is not
found
Could you please help me to resolve this issue
Thanks a lot for your helps
Regards
Tarasankar
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010022
Thomas Jung in response to Tarasankar Banerjee on page 22Oct 30 2014 152 PM
Since SPS06 its possible to use outbound HTTP destinations and to call out to external services using XSJS
Thomas Jung in response to Tarasankar Banerjee on page 22Oct 30 2014 150 PM
gtSo when the program runs in server would it automatically consider the OS user credentials
No It doesnt automatically use anything You have to specific the user and password that you want to use for
the proxy Although many proxy servers dont require a username and password
Tarasankar Banerjee in response to Thomas Jung on page 23Oct 30 2014 707 AM
Hi Thomas
Just watched the video you shared above Thanks a lot for it It is really informative and helpful
Regards
Tarasankar
Tarasankar Banerjee in response to Tarasankar Banerjee on page 22Oct 30 2014 346 AM
Got answer for the second point SAP HANA XS Administration Tool is the place to configure Proxy settings
Regards
Tarasankar
Tarasankar Banerjee in response to Tarasankar Banerjee on page 22Oct 29 2014 314 PM
Dear Thomas
another question is that does the proxy settings in the HttpDestination refer to the OS user of the HANA
server We specify useProxy as true and authType as basic in the HttpDestination but not maintain any
user credentials So when the program runs in server would it automatically consider the OS user credentials
Thanks
Regards
Tarasankar
Tarasankar Banerjee in response to Thomas Jung on page 23Oct 29 2014 132 PM
Thanks Thomas I am currently checking this option only
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010023
My current requirement is to fetch Weather Data and Social Media data from various OData services and store
them in HANA for further analysis What might be the best way for this I am currently checking the option of
creating an XS application which would connect to the external services fetch the data and save that in HANA
using DB Connection Is this the best way Or should we try to use JAVA or some other way
Your valuable suggestions are most welcome Thanks
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 23Oct 29 2014 1256 PM
gtHowever is it possible to consume XSODATA service from XSJS instead of using DB Connection
You can via an outbound HTTP destination although I certainly wouldnt recommend it It would be rather
complex and not well performing
gtAlso is it possible to consume data from external OData services for weather data social media data etc from
XSJS
Sure with the same Outbound HTTP Connectivity
httpswwwyoutubecomwatchv=fWirvj9l7eY
Maintaining HTTP Destinations - SAP HANA Developer Guide - SAP Library
Tarasankar BanerjeeOct 29 2014 1119 AM
Dear Thomas
Thanks for the great blog
I am able to connect to Database and execute queries from XSJS service However is it possible to consume
XSODATA service from XSJS instead of using DB Connection
Also is it possible to consume data from external OData services for weather data social media data etc from
XSJS
If possible it would be great if you could provide some code sample or guidelines
Thanks
Regards
Tarasankar
Thomas Jung in response to Weiping Lu on page 24Sep 25 2014 833 AM
Please refer to service note 1849775
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010024
httpservicesapcomsapsupportnotes1849775
I believe it will address your issue
Weiping LuSep 24 2014 519 PM
Hi Tom
Great post and videos I have a tough issue calling a HANA procedure from XS takes gt 5min but from HANA
studio lt 1 min Were using Amazon AWS rev 70 and 73 Any help will be greatly appreciated
Thanks
WPL
Thomas Jung in response to Su Srikanth on page 24Aug 11 2014 253 PM
You transport XSODATA services like you would any other repository content - via a Delivery Unit
Su SrikanthAug 11 2014 750 AM
Hi Thomas
Great blog
Ive a query here - we create the odata services(andor URLs created to view in the web browser) in
development environment now if we have to transport it to the quality andor production environment how
can we do this - is the same as importexport or is there any specific way to do please help with any useful
pointers
Many thanks as always
Su
Thomas Jung in response to ARSHAD SHAIKH on page 24May 15 2014 231 PM
Ive never written any blogs on calculation views I dont cover that topic That is why I suggested you ask your
question in the proper SCN forum
Although looking at your your above SQL Statement I dont see why you couldnt do this directly in XSODATA
off of the table STATUS without the need for the calculation view or the SQLScript Procedure
ARSHAD SHAIKH in response to Thomas Jung on page 25May 15 2014 1154 AM
Hello Thomas
I am new to hana Please suggest me the blogs of you related to calculation view that calling
procedures(procedures have out parameter)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010025
I am trying to fetch the result of procedure in calc view and want to create odata service for that calculation
view
procedure code goes like this
---------------------------------------
CREATE PROCEDURE TWEETS_TODAY(OUT OP BIGINT)
language SQLSCRIPT sql security invoker default schema SOCIAL360 reads sql data as
BEGIN
SELECT COUNT() INTO OP FROM SOCIAL360STATUS WHERE CREATED_AT = CURRENT_DATE
END
calc view code goes like this
----------------------------------------
Begin Procedure Script
BEGIN
DECLARE OP BIGINT
CALL SOCIAL360TWEETS_TODAY(OPvar_out)
END End Procedure Script
Thanks
-Arshad
Thomas Jung in response to ARSHAD SHAIKH on page 25May 15 2014 944 AM
Your question seems to have no relation to the content in this blog Please consider instead asking general
HANA questions in the appropriate SCN Forum
ARSHAD SHAIKHMay 15 2014 917 AM
Hi Thomas
I want to call procedures in calculation view (procedures have out parameter)
Please suggest me step by step procedure with example and supporting documents
Thanks
ARSHAD SHAIKH
Henrique Pinto in response to Blair Krotenko on page 26Apr 16 2014 711 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010026
Hmm not really sure of that I see it but that might be because Im an employee
But the NET development partner I was working with was not enrolled in any kind of beta testing program and
they were able to download it so I guess you should as well
Make sure to go in the Installation and Upgrades menu and not the Support Packages and Patches
Go to httpservicesapcomswdc -gt Installations and Upgrades -gt Browse our Download Catalog -gt SAP In-
Memory (SAP HANA) -gt SAP HANA ADONET 10
Best regards
Henrique
Blair Krotenko in response to Henrique Pinto on page 26Apr 16 2014 656 PM
Thanks for the info Henrique but I cant find it I dont know if it is an authorization issue or do we need to be a
ramp-up customer to dl and use a beta product
Thanks
Blair
Henrique Pinto in response to Thomas Jung on page 27Apr 16 2014 614 PM
The ADONET provider is available for download in the SAP Service Marketplace (in beta edition so far)
Thomas Jung in response to Kamal Jain on page 26Apr 16 2014 514 PM
For general OData structure and syntax I find that the Odataorg website is very helpful For example on this
topic
httpwwwodataorgdocumentationodata-version-2-0uri-conventions
The syntax of a $expand query option is a comma-separated list of Navigation Properties Additionally each
Navigation Property can be followed by a forward slash and another Navigation Property to enable identifying a
multi-level relationship
The page also has some sample URLs
Kamal JainApr 16 2014 536 AM
Dear Thomas
I agree that we need to pass all the associations in the expand I tried with some of options but was not
through
Now i just tried with below syntax and able to achive Thx
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010027
httpdewdftzld025pgdevsapcorp8000DTHCPXSZPMIS_PRO_ACTUALxsodata
ZPROHEADER(PR07_000002)$expand=ZACTUZEMPD
Regards
Kamal Jain
Thomas Jung in response to Blair Krotenko on page 27Apr 15 2014 623 PM
We do plan to release an ADONET provider specific to HANA in the near future This would probably be the
best option for consumption from NET Until then I would think that ODBC is probably the next best option It
gives you generally easy portability from already existing database code You could consume OData as well
although that is more generally consumed from the UI layer itself It guess it somewhat depends upon where
you are calling the service from in your NET application
Blair KrotenkoApr 15 2014 409 PM
Hi Thomas
We are looking at consuming HANA data in a NET application and from what I can see there are 2 options -
OData and ODBC It seems to me that OData might be the better option when consuming HANA data in an XS
application while ODBC might be the better option for NET What are your thoughts Is there a paper on this
subject I havent been able to find a comparison document for this Are there any security caveats to be aware
of for these options
Thanks
Blair
Thomas Jung in response to Kamal Jain on page 27Apr 15 2014 136 PM
You have to list both associations in the expand on the URL if you want both relationships to be processed
Kamal JainApr 15 2014 1249 PM
Hi Thomas
Thx for valuable and useful information
I have an query regarding XS Odata service creation for more than 2 tables and get all the data in one
command
There is req in which service needs to be created for 3 tables to get data from all these
First table has Project ID as key second table has composite
ProjectID and Employee Id as key and third table has Employee id as
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010028
key
So if I create navigation for first 2 tables based on project id and use expand comand than its working fine and I
can see data of both the tables
Further if I add navigation for third table also as below then below expand is displaying data for first two tables
only Pls share how to use expand command in this case if possible to get all tables data based on project id
How to use navigation ZEMPD here
httpdewdftzld025pgdevsapcorp8000DTHCPXSZPMIS_PRO_ACTUALxsodata
ZPROHEADER(PR07_000002)$expand=ZACTUamp
service namespace
DTHCPXS
DTHCPDTHCPDBHCP_PROJECT_HEADER
as ZPROHEADER
navigates (PROJECT as
ZACTU)
DTHCPDTHCPDBHCPT_ZPMIS_ACTUAL
as ZACTU
navigates (EMPLOYEE as
ZEMPD )
DTHCPDTHCPDBHCP_ZPMIS_RES_MASTER
as ZEMPD
association PROJECT principal
ZPROHEADER(PROJECTID)
multiplicity 1 dependent
ZACTU(PROJECTID) multiplicity
association EMPLOYEE principal
ZACTU(EMPLOYEEID)
multiplicity 1 dependent
ZEMPD(EMPLOYEEID) multiplicity
1
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010029
Pls suggest if there is anything to add or correct in XS odata service syntax above
Regards
Kamal Jain
Vikas Madaan in response to Thomas Jung on page 29Apr 14 2014 458 PM
Thanks Thomas
Under which component
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 29Apr 14 2014 450 PM
No this isnt a known issue Ive seen Nor can I recreate the problem in my system No you cant maintain the
authentication in XSHTTPDEST itself It intentionally must be set in XSADMIN tool I can really only suggest
that you open a support ticket
Vikas MadaanApr 14 2014 431 PM
Hi Thomas
I am trying to pull data from SAP system onto HANA Database using XSJOB files I am calling RFC enabled
function modules over HTTP request It helps me replicating the real time ECC data onto HANA as well with
back ground jobs
I am facing one problem in the XSHTTPDEST file I am able to create and activate the file using studio and this
file is even visible in the web based XS administration tool But in the web based tool when i provide user and
password for basic authotication then system just clears the user id and password when i try to save This the
reason our HTTP requests are getting failed and below is the response we are getting in the response body
lthtmlgtltheadgtlttitlegtLogon Error Messagelttitlegt
Is this known issue or we are missing something Is it possible to provide user and password in the
XSHTTPDEST file Is there any particular syntax
I checked and i have the required authorizations as well develper Guide
Please help
Regards
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010030
Vikas Madaan
Abdul HakimFeb 22 2014 359 AM
Hi Thomas - Any recommended book or resource to learn and master Server Side Javascript There were
many books available in the market but as a beginner need to know the right resource book to start with and
master this stuffAlso whether SAP plan to conduct any training to teach Server Side Javascript similar to other
standard training offerings
Thanks
Hakim
Samuel Tanor-GyeduFeb 20 2014 839 AM
Thanks Thomas
I will definitely have a look at SHINE
Thomas Jung in response to gentilini andre on page 30Feb 19 2014 422 PM
Difficult to say what is wrong I several things which are different than our sample that does this You are using
a POST for instance instead of a GET However if you are gettting a 200 then I assume the service call is
correct In client side tools (like Chrome Developer Tools) you should be able to see the response object from
the call
However what I would really recommend is that you study the SHINE content (SAP HANA Interactive
Education) There is already a sample application which does this in SHINE Also it has some special
JavaScript in the UI to handle the file attachment via AXAJ call Perhaps that is the part you are missing
You can read more about SHINE here It is also included already installed in the latest version of the HANA
Developer Center trial image (SP7 based)
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
gentilini andreFeb 19 2014 325 PM
Hi Thomas
well I followed your hints but it still donacutet work
I created a xsjs File like below
function downloadExcel()
try
var body =
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010031
alert(drin)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
alert(drusse)
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount
tTax Amount tNetto Amount tCurrency n
while(rsnext())
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
catch (e)
alert(db conn funktioniert nicht)
var a = $requestparametersget(cmd)
$responsesetBody(Invalid Command +a)
switch (a)
case doex
$responsesetBody(Invalid Command +a)
alert(filedownload)
thisdownloadExcel()
break
default
$responsestatus = $nethttpINTERNAL_SERVER_ERROR
$responsesetBody(Invalid Command +a)
The Controllerjs File
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010032
doFileDownload function (oEvent)
jQuerysaprequire(sapuicommonsMessageBox)
sapuicommonsMessageBoxshow(Export Starten sapuicommonsMessageBoxIconconfirm
Information)
sapuicommonsMessageBoxconfirm(Export starteninform Confirmation)
return false
function inform(rValue)
alert (drinnnnne)
var aurl = FileDownloadxsjscmd=doex
if(rValue) If User presses Ok
alert(aurl)
jQueryajax(
url aurl
method POST
dataType json
datacmddoex
success sapuicommonsMessageBoxalert(Export wird ausgefuumlhrtConfirmation)
errorfunction onErrorCall(jqXHR textStatus errorThrown)
alert(jqXHRstatus)
sapuicommonsMessageBoxshow(jqXHRstatus
ERROR
Error in calling Service )
return
complete sapuicommonsMessageBoxalert(Export Erfolgreich
abgeschlossenConfirmation)
)
return false
else If the user presses Cancel
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010033
sapuicommonsMessageBoxalert(Vorgang abgebrochenNotification)
)
at last but not least the view
sapuijsview(zag1_ui_cv_03Index
Specifies the Controller belonging to this View
In the case that it is not implemented or that null is returned this View does not have a Controller
memberOf zag1_ui_cv_03Index
getControllerName function()
return zag1_ui_cv_03Index
Is initially called once after the Controller has been instantiated It is the place where the UI is
constructed
Since the Controller is given to this method its event handlers can be attached right away
memberOf zag1_ui_cv_03Index
createContent function(oController)
create a lite button with an icon and a text
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010034
lite true
)placeAt(btn)
oButton3attachPress(oControllerdoFileDownload)
var oButton4 = new sapuicommonsButton(
text Refresh
icon imagesrefreshjpg
lite true
press function() var data = oTableval()
if(data == )
alert(no data found)
return
print(content)
print(DatArray)
if (data = )
alert(Funzt)
JSONToCSVConvertor(data CUSTOMER AMOUNT true)
)placeAt(btn)
jQuerysaprequire(sapuitableTable)
create table control with properties
var oTable = new sapuitableTable(
width 100
rowHeight 50
title Amount per Partner
selectionMode sapuitableSelectionModeNone
)
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Company Name
)
template new sapuicommonsTextView(
text CompanyName
)
sortProperty CompanyName
))
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010035
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Partner ID
)
template new sapuicommonsTextView(
text PartnerId
)
sortProperty PartnerId
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Postal Code
textAlign sapuicoreTextAlignEnd
)
template new sapuicommonsTextView(
text PostalCode
textAlign sapuicoreTextAlignEnd
)
sortProperty PostalCode
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text City
)
template new sapuicommonsTextView(
text City
)
sortProperty City
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Purchase ID
)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010036
template new sapuicommonsTextView(
text PurchaseOrderId
)
sortProperty Currency
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Lifecycle Status
)
template new sapuicommonsTextView(
text LifecycleStatus
)
sortProperty LifecycleStatus
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Gross Amount
)
template new sapuicommonsTextView(
text GrossAmount
)
sortProperty GrossAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Tax Amount
)
template new sapuicommonsTextView(
text TaxAmount
)
sortProperty TaxAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Amount Netto
)
template new sapuicommonsTextView(
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010037
text CM_NET_Amount_001
)
sortProperty CM_NET_Amount_001
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Currency
)
template new sapuicommonsTextView(
text Currency
)
sortProperty Currency
))
var oModel = new sapuimodelodataODataModel
(httpqperiorvmcldsr8000ZAG1_WS_001ZAG1_CV_001xsodata false)
oTablesetModel(oModel)
oTablebindRows(Amount)
return oTable
)
It wonacutet call the function or better said the action of the button works fine till to the point where it should call the
xsjsfile to generate the excel-file I wondered that in the ajax part the error- success- and complete-part will
be executed at the same time and not only one of this statements The message is 200 (The request has
succeeded The information returned with the response is dependent on the method used in the request)
Maybe you can see where my mistake is or whats going wrong
Iacuteve the developer edition on cloudshare (Hana Studio rev68 Server is on SPS05)
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010038
Andreacute
Thomas Jung in response to Samuel Tanor-Gyedu on page 38Feb 19 2014 523 AM
I dont think I can help you This appears to a question about how odata4j works not about XS I have no
experience with odata4j myself
Samuel Tanor-GyeduFeb 18 2014 913 AM
Hi Thomas
I have an odata service with this endpointhttpss5hanaxshanatrialondemandcomservicesUserxsodata
I am now trying to consume it from eclipse with the odata4j libraries
This is how I get the endpoint
public UserServiceOdata(String endpointUri)
thisendpointUri = endpointUri
ODataConsumerdumpresponseHeaders(true)
consumer = ODataConsumerscreate(endpointUri)
This is my method to add a user
public User addUser(User user)
consumercreateEntity(entitySet)properties(OPropertiesint32(propertyUserId
usergetId()))properties(OPropertiesstring(propertyUserName
usergetName()))properties(OPropertiesstring(propertyUserEmail usergetEmail()))execute()
return user
When I call addUser method I get an Error
Caused by javaxxmlstreamXMLStreamException ParseError at [rowcol][78253]
Message The reference to entity sourceUrl must end with the delimiter
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010039
When I use this endpoint httpss5hanaxshanatrialondemandcomservicesUsersvc everything works fine
With the httpss5hanaxshanatrialondemandcomservicesUserxsodata I get errors
Please I would be very grateful for assistance
Thanks in advance
Regards
Samuel
Thomas Jung in response to gentilini andre on page 39Feb 18 2014 431 AM
You have a fundamental misunderstanding here You are placing server side JavaScript code in your client
side UI5 application The function downloadExcel is something you need to execute on the server It needs to
be in an XSJS file and it is called from the client side via AJAX - as a REST service not as a local function
gentilini andreFeb 17 2014 451 PM
Hello Thomas
Thank you for this great How-To Guide
Iacutem pretty new in SAPUI5 and tried your export-sample in my little trial project but it doesnacutet work
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010040
My Button for this looks like
ltcodegt
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
lite true
press function() alert(oButton3getText())
downloadExcel()
ltcodegt
and the function for this action looks like
ltcodegt
function downloadExcel()
var body =
alert(drin)
print($query)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount tTax
Amount tNetto Amount tCurrency n
while(rsnext())
if(rsnext() == )
alert($responsesetBody( Failed to retrieve data ))
alert($responsestatus = $nethttpINTERNAL_SERVER_ERROR)
else
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010041
ltcodegt
Iacutem afraid and hope that you can help me
Kind regards
Andreacute
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1246 PM
gtIs there any restriction or development limitation in the XSJSLIB files
Thats a very general question Difficult to answer without any context
Vikas Madaan in response to Thomas Jung on page 41Feb 11 2014 1245 PM
Thanks Thomas
I think we are on same page
Once quick question that came to my mind Is there any restriction or development limitation in the XSJSLIB
files
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1230 PM
gtCould please help me in understanding in more advantagesdisadvantages for both techniques
Youve summarized it pretty well already
gtbecuase i dont want to use both the approaches
Even with the CRUD support and exits in XSODATA its still pretty hard to do 100 via XSODATA There are
still valid use cases for XSJS when you need custom body custom read processing job scheduling etc Its
good to try and use XSODATA whenever possible but I wouldnt automatically exclude the use of XSJS
Vikas MadaanFeb 11 2014 1008 AM
Hi Thomas
Thanks a lot for sharing useful information through various blogs
In my current project we are evaluating use of XSOData or XSJS applications I saw your videos like the one
mentioned below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010042
httpwwwsaphanacomdocsDOC-4376
Want i understood from various blog is this
From SP7 we can write exsits in the OData services and it is very easy to consume at the client side just like
any REST base service and from my understanding it is Scalable as well I would love to use XSOData always
becuase development effort is very less compare to XSJS and it is very easy to rampup the team on OData
related development objects
XSJS were as provide more control becuase of server side scripting becuase it allows development on the
server side using JavaScript Core APIs of SAP HANA Extended Application Services are therefore exposed
as JavaScript functions providing easy access to the HTTP Request and Response object as well database
access to execute SQL or call SQLScript Procedures It provide us control over the body format and and URL
parameter definition
Could please help me in understanding in more advantagesdisadvantages for both techniques
I am very keen to understand and also explain the same to team members becuase i dont want to use both the
approaches and even sometimes customer can also ask the same to us
Also If we are on SP6 then from my understanding XSJS provides us more capability in terms of complex
application Corrent me If i am wrong
Thanks
Regards
Vikas Madaan
Thomas Jung in response to Raghuveer Phull on page 42Feb 5 2014 312 PM
Yes there are videos on the CRUD features of XSODATA which were new in SP6
For more on CRUD support in SP6 see this video
oData CreateUpdateDelete Support in SAP HANA SPS6
For the extended support for XSJS exits in SP7 see this video
SAP HANA SPS 07 XSODATA Exits in XSJS
Raghuveer PhullFeb 5 2014 122 AM
Do you have an exampledocumentationvideo where you can write a service which will populate Hana DB
What I am asking for is a way for my external script to populate the DB tables i have created in Hana DB
Thomas Jung in response to reda miraoui on page 43Jan 29 2014 411 PM
The source code for the examples shown here are shipped as part of SHINE (SAP HANA Interactive
Education)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010043
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Vivek Singh Bhoj in response to reda miraoui on page 43Jan 29 2014 352 PM
Hi Reda
You can import Shine Content in HANA and then check all these source codes
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Regards
Vivek
reda miraoui in response to Thomas Jung on page Jan 29 2014 344 PM
Hey Thomas
Is it possible to download source code of your project from this HANA tutorial
Thanks
Reda
Thomas Jung in response to Abdul Hakim on page 43Nov 21 2013 1133 PM
Yes River can be used as an alternative and when activated it will generate Server Side JavaScript andor
SQLScript
Abdul Hakim in response to Thomas Jung on page 44Nov 21 2013 747 PM
Hi Thomas - Was going through blog regarding River (RDL)Just a question on this
When you say Programming language for HANA native development is Server side Javascript SQL SQL
ScriptOnce RDL is rolled out whether RDL can be used for native application development instead of Server
side Java script SQL SQL Script I am very much new to this stuff so appreciate if you can also help on
how to get started with Server Side Java script SQL SQL Script for HANA
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 30 2013 750 AM
Hi Thomas
Thanks for your response I am talking about more content on shine
thanks
Ashutosh
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010044
Baskar Gopalakrishnan in response to Thomas Jung on page 44Oct 30 2013 1249 AM
Hi Thomas
Im a SAP PI Middleware consultantSAP topic leader in XIPI heavily worked on Java related
Netweaver stack I have knowledge in ABAP but not worked heavily in abap I have enrolled your sap hana
native application development course I feel very interesting I did work heavily in java and javascript projects
using eclipse development tool Do you think if I invest my time in just native hana development and proceed
in HANA field is a good step I dont have BW experience either
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 819 PM
Thanks for the clarification Much appreciated
Thomas Jung in response to Abdul Hakim on page 44Oct 29 2013 120 PM
gtABAP Close to HANA means whether we can expect a similar 2 tier architecture similar to HANA XS in the
future or what does that mean
No it doesnt mean that ABAP will become a 2 tier architecture We will not move the ABAP VMKernel into
HANA itself It will remain a separate application server At least for the current plansforeseeable future What
he was referring to was bringing the programming models closer For instance the new 740 SP5 feature that
allows you to write SQLScript directly within an ABAP class method
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 650 AM
Thomas - Thanks for the clarificationMuch appreciatedI was listening to ABAP on HANA session by
Thorsten Schneider this year Teched and he was mentioning that SAP Plans to bring ABAP very close to
HANA in the coming future but not much details have been discussed in the sessionABAP Close to HANA
means whether we can expect a similar 2 tier architecture similar to HANA XS in the future or what does that
mean
Thanks
Hakim
Thomas Jung in response to Abdul Hakim on page 45Oct 28 2013 703 PM
gt whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the option is
recommended by SAP then kindly share the pros and cons of each of the item
Taken from the TechEd CD103 session slides
Guidance
bulluse ABAP for optimization of existing progams (in context of SAP Business Suite or BW)
bullconsider HANA Native Development for development of new applications which will solely run on SAP HANA
bullcombine ABAP and HANA Native Development to enrich existing applications (eg SAP HANA Live Fiori)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010045
ABAP
bullapplications follow 3-tier architecture
bullABAP is in general database agnostic but with release 74 optimized for SAP HANA
bullProgramming language ABAP ABAP OO with the option to use SAP HANA features
bullIDE eclipse-based ABAP Development Tools
HANA Native Development
bullapplications follow 2-tier architecture
bullHANA Native Development is SAP HANA specific and embedded in the database
bullProgramming language River server-side JavaScript SQLSQLScript
bullIDE eclipse-based SAP HANA Studio + web IDE
Thomas Jung in response to ashutosh dixit on page 45Oct 28 2013 701 PM
gtIs there any more demos for the SHINE
Im not exactly sure what you mean by that We are building additional content for SHINE that will be delivered
in SP7
Abdul HakimOct 28 2013 326 PM
Thomas - Let us say a customer is running SAP Netweaver 74 ABAP with HANA DB and they have HANA
extended service as wellIf the customer wants to do new developments then what is the recommendation
from SAP ie whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the
option is recommended by SAP then kindly share the pros and cons of each of the item (SAP Netweaver 74
ABAP Vs SAP HANA XS)
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 28 2013 221 PM
Hi Thomas
Thanks a lot for your its working now
Is there any more demos for the SHINE
Thanks
Ashutosh
Thomas Jung in response to ashutosh dixit on page 46Oct 25 2013 809 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010046
As this content is now standard in SP6 as part of SHINE (SAP HANA INteractive Education) there also some
setup instructions on helpsapcom
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Basic points to check - have you generated the synonyms in the data generator Ran the data generator to
create some data Have the role assigned Added client 001 to your user profile
ashutosh dixitOct 24 2013 130 PM
Hi Thomas
Amazing blog - once again Thomas thanks
I have been following you for many days attended your OPEN SAP course also
That was an amazing course for new learner like me
One of our client is looking forward for XS based search Application identical to what you have created in your
DEMO
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010047
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010048
But I am not able to fetch the data on blank HTML page is coming with no data
If there is any step by step document related to this please help in getting that
Any help will be highly appreciated
Thanks
Ashutosh
Naveen KumarSep 26 2013 1130 AM
Good Document
Heber FabianoAug 27 2013 323 PM
Great content as always Keep sharing with us
Thomas Jung in response to Orel Stringa on page 48Aug 27 2013 147 PM
This is currently not possible The CORS support is for all origins We dont yet have the feature to maintain a
whitelist of CORS origins
Orel Stringa in response to Thomas Jung on page Aug 27 2013 801 AM
Hi Thomas
nice to see that SAP has made it possible with SP6 to specify cross origin resource sharing (CORS) support
via the xsaccess file SP6 HANA development guide has example of how to specify CORS support
I have build an XS application and would like to serve SAPUI5 on a diffhost than XSHANA
How can I specify that I would like to allow cross origin access restricted to certain domain(s) only
Is there a special keyword syntax for specifying that
Thank yoi
Orel
Vijay UthayakumarAug 27 2013 131 AM
Highly informative amp digestible Fantastic work
Jerry WangAug 1 2013 955 AM
Hi Tomas
Thank you
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010049
Jerry
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 644 PM
JSLint checks are very strict and often produce syntax errors for items that just stylistic and wont actually
cause an error upon activation or runtime You can either ignore the JSLint errors or deactivate JSLint for this
project in these cases However it might also be an indication that the JavaScript code you are trying to import
isnt compatible with Strict mode
httpsdevelopermozillaorgen-USdocsWebJavaScriptReferenceFunctions_and_function_scope
Strict_mode
Milan Vrozina in response to Thomas Jung on page 49Jul 21 2013 624 PM
Thanks for clarification I thought there would be some kind of import
But anyway in case of this specific library I have some problems with JSLint validation when I do cut and paste
of the original code
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 343 PM
What kind of problem are you having using this library Strict mode JavaScript which doesnt try to access the
DOM Window or other client side specific objects should work in Server Side XSJS Generally if you have a
library you just cut and paste into your XSJS or an XSJSLIB file and then call the functions from your code
Milan VrozinaJul 21 2013 339 PM
Hello
first and foremost thank you for perfect openSAP classes related to HANA development and for this blog as
well
I have one question related to server-side javascript You mentioned in course that is possible to use 3rd party
libraries or reuse 3rd party code But I cant find a possible way how to import 3rd party javascript library -as
is- to server and use it For example I would like to use JSZip library to zip some file before sending it to client
from xsjs application Is that possible Thank you
Chandrashekhar MahajanJul 3 2013 734 PM
This is excellent blog Now HANA XS is very much clear to me
Mohan krishnaJul 1 2013 144 PM
WOW - great blog Thomas This will be very helpful in understanding SAP hana Good Job
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010050
Abdul Hakim in response to Thomas Jung on page 50Jun 27 2013 833 PM
Thanks for the clarification
Thomas Jung in response to Abdul Hakim on page 50Jun 27 2013 659 PM
HANA Extended Application Services uses SQLScript and JavaScript as its two primary programming
languages
gtwhether the current SAP Business suite based on ABAP will be completely migrated to HANA service
No The Business Suite already runs on HANA but still via the ABAP application server It will continue to
leverage HANA via a combination of enhancements to ABAP and utilizing some of the technologies described
in this blog
gtAlso whether ABAP can be used to built application in HANA extended services
No There is no ABAP language container in HANA Extended Application Services
Abdul HakimJun 27 2013 405 PM
Hi Thomas - What is the programming language used for HANA Extended application services
As HANA is more than a database ie application platform by itself and as you mentioned that more and more
applications will be built on HANA i have question as how the future SAP ERP system looks likewhether the
current SAP Business suite based on ABAP will be completely migrated to HANA service in the future or SAP
ABAP server will continue to evolve and receive focus investment from SAP Also whether ABAP can be used
to built application in HANA extended services Your thoughts
Thanks
Abdul Hakim
Thomas Jung in response to Ravindra Channe on page 50Jun 11 2013 830 PM
Yes it is still planned However we are still a couple of weeks away and Ive not seen the final installers to say
for certain its there
Ravindra ChanneJun 11 2013 815 PM
Hi Thomas
Thanks for a wonderful and very informative blog Is there any update on 32 bit REGI file
Is it expected along with SPS6
Regards
Ravi
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010051
Thomas Jung in response to Amanda Rzepka on page Jun 7 2013 942 PM
gtCan the XS Services be used in a BW on HANA Scenario
Yes XS is part of ALL HANA systems You should check and make sure you are licensed for direct access to
the underlying HANA instance however
Thomas Jung in response to Holger Schimanski on page Jun 7 2013 941 PM
gtIs there a similar library which could be used in XS Engine
The XSODATA development object is similar We also have higher level frameworks for XMLA and Search
Services (InA) You can expect more such high level frameworks to be added to the HANA Extended
Application Services in the future
Thomas Jung in response to Manav Mehra on page Jun 7 2013 939 PM
Have you used something like the Chrome developer tools to see see if you are getting any client side
javascript errors or to see if the request to your xsodata service is successful
Thomas Jung in response to Christian Hufnagl on page 52Jun 7 2013 938 PM
It will ship as non-automatic content in SPS6 (all systems will have it and it just needs to be imported) The
delivery units are also part of this weeks updates to the Cloudshare and AWS developer center images They
are also available for download as part of the content of the openSAP course
Thomas Jung in response to Matthew Pickell on page 51Jun 7 2013 937 PM
CORS support will come with SPS6 at the end of June
Thomas Jung in response to Jeroen Custers on page 51Jun 7 2013 936 PM
gtWill this bug be fixed in HANA ver 56
Personally Ive still experienced this bug in SPS6 internal builds Must be a tricky one to find Luckily the
workaround of closing and reopening isnt too difficult Just annoying This also probably makes the bug low
priority
Jeroen Custers in response to Vivek Singh Bhoj on page 52Jun 7 2013 411 PM
This issue also occurs on rev56
Matthew PickellJun 7 2013 258 PM
Thomas
Has CORS been included in a release yet
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010052
Vivek Singh Bhoj in response to Chandra Edem on page 52Jun 5 2013 601 AM
Hi Chandra
Date for Week1 Assignment has been extended till June 11
So you can give Week 1 Assignment now
Christian HufnaglJun 4 2013 543 PM
Hi Thomas
thank you for the interesting tutorial
Can you tell me whether it is possible to download the source code of the ldquoPutting it all togetherrdquovideo And if yes Where can I download itThanks
Christoph
Vivek Singh BhojJun 4 2013 1116 AM
Hi Thomas
Thanks for OpenSAP classes
Your Youtube Account also have very good exercises
IN OpenSAP Week 2 Unit 3 tutorial after assigning admin role to my user Id i am not able to see sequences
synonyms triggers under my schema or any other schema i am only able to see Column Views Procedures
Tables and Views
Though now i am able to insert data into my created table
Can you let me know how i will be able to see Sequences under my schema without removing the admin role
I am using HANA revision 52
Got to know from OpenSAP that
This is a known issue and the only way that Ive seen to fix it is to actually close the studio and open it again
then refresh the node
Cheers
Rich Heilman
SAP HANA Product Management
Will this bug be fixed in HANA ver 56
Chandra Edem in response to Thomas Jung on page 53Jun 4 2013 646 AM
Thomas
I registered for OpenSAP course Introduction to Software Development on SAP HANA on June 2 900PM
I didnt know that it is going to end WEEK1 assignment test on 632013 300PM Is there any way can take
that WEEK1 Assignment Test
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010053
Thanks
Chandra
Thomas Jung in response to Alexander Bauer on page Jun 3 2013 856 PM
SAPUI5 gets updated auutomatically when you apply HANA revisions There is no additional download or
update needed
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010018
It appears from various blogs that the second error (No valid SAP Crypto configuration) is related to SSL
configuration in HANA I would contact the HANA Administrator to look into this issue Of course it would be
great if you could provide some insight
However I have no clue regarding the first error Request your help and cooperation in this regard
The initial issue of not finding the HttpDestination which I created still persists
Thanks for all your help
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 18Oct 31 2014 342 PM
First of all you would never use the workspace name It isnt ever part of anything It is only the package
structure that counts The first item in your list is the only one with the correct package Off hand it looks right to
me You are supposed to supply the full package path Have you configured this HTTP Destination in the XS
Admin tool yet
Tarasankar Banerjee in response to Thomas Jung on page 18Oct 31 2014 326 PM
Updated it Thanks
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 18Oct 31 2014 313 PM
Your comment got cut off We never really get to see what your problem is
Tarasankar Banerjee in response to Thomas Jung on page 21Oct 31 2014 256 PM
Thanks Thomas
I am facing as issue while trying to use an HTTP Destination I understand that the xshttpdest and xsjs file
need to in the same folder Following is the structure of my test project
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010019
As you can see the HTTP Destination and the XSJS files are in the same folder services The workspace
name is XS_Workspace and the package structure is as follows
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010020
Now I am trying to read this destination
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010021
When I am using full package structure destination_package =
rootworkTara02XSTest01XSHttpTest01services I am receiving the
error message httpreadDestination destination not found (package
rootworkTara02XSTest01XSHttpTest01services name XSHttpDest01)
On using the workspace name destination_package = XS_Workspaceservices I am receiving the
error message User is not authorized to use destination (package XS_Workspaceservices name
XSHttpDest01)
On using destination_package = rootworkTara02XSTest01services also I am receiving the error
message User is not authorized to use destination (package rootworkTara02XSTest01services
name XSHttpDest01) Strangely the services folder is not directly under XSTest01
Lastly I deliberately gave a wrong service name destination_package = XS_Workspaceservices and
destination_name = XSHttpDest02 But even then I received the error message User is not authorized to
use destination (package XS_Workspaceservices name XSHttpDest02) not that the destination is not
found
Could you please help me to resolve this issue
Thanks a lot for your helps
Regards
Tarasankar
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010022
Thomas Jung in response to Tarasankar Banerjee on page 22Oct 30 2014 152 PM
Since SPS06 its possible to use outbound HTTP destinations and to call out to external services using XSJS
Thomas Jung in response to Tarasankar Banerjee on page 22Oct 30 2014 150 PM
gtSo when the program runs in server would it automatically consider the OS user credentials
No It doesnt automatically use anything You have to specific the user and password that you want to use for
the proxy Although many proxy servers dont require a username and password
Tarasankar Banerjee in response to Thomas Jung on page 23Oct 30 2014 707 AM
Hi Thomas
Just watched the video you shared above Thanks a lot for it It is really informative and helpful
Regards
Tarasankar
Tarasankar Banerjee in response to Tarasankar Banerjee on page 22Oct 30 2014 346 AM
Got answer for the second point SAP HANA XS Administration Tool is the place to configure Proxy settings
Regards
Tarasankar
Tarasankar Banerjee in response to Tarasankar Banerjee on page 22Oct 29 2014 314 PM
Dear Thomas
another question is that does the proxy settings in the HttpDestination refer to the OS user of the HANA
server We specify useProxy as true and authType as basic in the HttpDestination but not maintain any
user credentials So when the program runs in server would it automatically consider the OS user credentials
Thanks
Regards
Tarasankar
Tarasankar Banerjee in response to Thomas Jung on page 23Oct 29 2014 132 PM
Thanks Thomas I am currently checking this option only
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010023
My current requirement is to fetch Weather Data and Social Media data from various OData services and store
them in HANA for further analysis What might be the best way for this I am currently checking the option of
creating an XS application which would connect to the external services fetch the data and save that in HANA
using DB Connection Is this the best way Or should we try to use JAVA or some other way
Your valuable suggestions are most welcome Thanks
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 23Oct 29 2014 1256 PM
gtHowever is it possible to consume XSODATA service from XSJS instead of using DB Connection
You can via an outbound HTTP destination although I certainly wouldnt recommend it It would be rather
complex and not well performing
gtAlso is it possible to consume data from external OData services for weather data social media data etc from
XSJS
Sure with the same Outbound HTTP Connectivity
httpswwwyoutubecomwatchv=fWirvj9l7eY
Maintaining HTTP Destinations - SAP HANA Developer Guide - SAP Library
Tarasankar BanerjeeOct 29 2014 1119 AM
Dear Thomas
Thanks for the great blog
I am able to connect to Database and execute queries from XSJS service However is it possible to consume
XSODATA service from XSJS instead of using DB Connection
Also is it possible to consume data from external OData services for weather data social media data etc from
XSJS
If possible it would be great if you could provide some code sample or guidelines
Thanks
Regards
Tarasankar
Thomas Jung in response to Weiping Lu on page 24Sep 25 2014 833 AM
Please refer to service note 1849775
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010024
httpservicesapcomsapsupportnotes1849775
I believe it will address your issue
Weiping LuSep 24 2014 519 PM
Hi Tom
Great post and videos I have a tough issue calling a HANA procedure from XS takes gt 5min but from HANA
studio lt 1 min Were using Amazon AWS rev 70 and 73 Any help will be greatly appreciated
Thanks
WPL
Thomas Jung in response to Su Srikanth on page 24Aug 11 2014 253 PM
You transport XSODATA services like you would any other repository content - via a Delivery Unit
Su SrikanthAug 11 2014 750 AM
Hi Thomas
Great blog
Ive a query here - we create the odata services(andor URLs created to view in the web browser) in
development environment now if we have to transport it to the quality andor production environment how
can we do this - is the same as importexport or is there any specific way to do please help with any useful
pointers
Many thanks as always
Su
Thomas Jung in response to ARSHAD SHAIKH on page 24May 15 2014 231 PM
Ive never written any blogs on calculation views I dont cover that topic That is why I suggested you ask your
question in the proper SCN forum
Although looking at your your above SQL Statement I dont see why you couldnt do this directly in XSODATA
off of the table STATUS without the need for the calculation view or the SQLScript Procedure
ARSHAD SHAIKH in response to Thomas Jung on page 25May 15 2014 1154 AM
Hello Thomas
I am new to hana Please suggest me the blogs of you related to calculation view that calling
procedures(procedures have out parameter)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010025
I am trying to fetch the result of procedure in calc view and want to create odata service for that calculation
view
procedure code goes like this
---------------------------------------
CREATE PROCEDURE TWEETS_TODAY(OUT OP BIGINT)
language SQLSCRIPT sql security invoker default schema SOCIAL360 reads sql data as
BEGIN
SELECT COUNT() INTO OP FROM SOCIAL360STATUS WHERE CREATED_AT = CURRENT_DATE
END
calc view code goes like this
----------------------------------------
Begin Procedure Script
BEGIN
DECLARE OP BIGINT
CALL SOCIAL360TWEETS_TODAY(OPvar_out)
END End Procedure Script
Thanks
-Arshad
Thomas Jung in response to ARSHAD SHAIKH on page 25May 15 2014 944 AM
Your question seems to have no relation to the content in this blog Please consider instead asking general
HANA questions in the appropriate SCN Forum
ARSHAD SHAIKHMay 15 2014 917 AM
Hi Thomas
I want to call procedures in calculation view (procedures have out parameter)
Please suggest me step by step procedure with example and supporting documents
Thanks
ARSHAD SHAIKH
Henrique Pinto in response to Blair Krotenko on page 26Apr 16 2014 711 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010026
Hmm not really sure of that I see it but that might be because Im an employee
But the NET development partner I was working with was not enrolled in any kind of beta testing program and
they were able to download it so I guess you should as well
Make sure to go in the Installation and Upgrades menu and not the Support Packages and Patches
Go to httpservicesapcomswdc -gt Installations and Upgrades -gt Browse our Download Catalog -gt SAP In-
Memory (SAP HANA) -gt SAP HANA ADONET 10
Best regards
Henrique
Blair Krotenko in response to Henrique Pinto on page 26Apr 16 2014 656 PM
Thanks for the info Henrique but I cant find it I dont know if it is an authorization issue or do we need to be a
ramp-up customer to dl and use a beta product
Thanks
Blair
Henrique Pinto in response to Thomas Jung on page 27Apr 16 2014 614 PM
The ADONET provider is available for download in the SAP Service Marketplace (in beta edition so far)
Thomas Jung in response to Kamal Jain on page 26Apr 16 2014 514 PM
For general OData structure and syntax I find that the Odataorg website is very helpful For example on this
topic
httpwwwodataorgdocumentationodata-version-2-0uri-conventions
The syntax of a $expand query option is a comma-separated list of Navigation Properties Additionally each
Navigation Property can be followed by a forward slash and another Navigation Property to enable identifying a
multi-level relationship
The page also has some sample URLs
Kamal JainApr 16 2014 536 AM
Dear Thomas
I agree that we need to pass all the associations in the expand I tried with some of options but was not
through
Now i just tried with below syntax and able to achive Thx
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010027
httpdewdftzld025pgdevsapcorp8000DTHCPXSZPMIS_PRO_ACTUALxsodata
ZPROHEADER(PR07_000002)$expand=ZACTUZEMPD
Regards
Kamal Jain
Thomas Jung in response to Blair Krotenko on page 27Apr 15 2014 623 PM
We do plan to release an ADONET provider specific to HANA in the near future This would probably be the
best option for consumption from NET Until then I would think that ODBC is probably the next best option It
gives you generally easy portability from already existing database code You could consume OData as well
although that is more generally consumed from the UI layer itself It guess it somewhat depends upon where
you are calling the service from in your NET application
Blair KrotenkoApr 15 2014 409 PM
Hi Thomas
We are looking at consuming HANA data in a NET application and from what I can see there are 2 options -
OData and ODBC It seems to me that OData might be the better option when consuming HANA data in an XS
application while ODBC might be the better option for NET What are your thoughts Is there a paper on this
subject I havent been able to find a comparison document for this Are there any security caveats to be aware
of for these options
Thanks
Blair
Thomas Jung in response to Kamal Jain on page 27Apr 15 2014 136 PM
You have to list both associations in the expand on the URL if you want both relationships to be processed
Kamal JainApr 15 2014 1249 PM
Hi Thomas
Thx for valuable and useful information
I have an query regarding XS Odata service creation for more than 2 tables and get all the data in one
command
There is req in which service needs to be created for 3 tables to get data from all these
First table has Project ID as key second table has composite
ProjectID and Employee Id as key and third table has Employee id as
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010028
key
So if I create navigation for first 2 tables based on project id and use expand comand than its working fine and I
can see data of both the tables
Further if I add navigation for third table also as below then below expand is displaying data for first two tables
only Pls share how to use expand command in this case if possible to get all tables data based on project id
How to use navigation ZEMPD here
httpdewdftzld025pgdevsapcorp8000DTHCPXSZPMIS_PRO_ACTUALxsodata
ZPROHEADER(PR07_000002)$expand=ZACTUamp
service namespace
DTHCPXS
DTHCPDTHCPDBHCP_PROJECT_HEADER
as ZPROHEADER
navigates (PROJECT as
ZACTU)
DTHCPDTHCPDBHCPT_ZPMIS_ACTUAL
as ZACTU
navigates (EMPLOYEE as
ZEMPD )
DTHCPDTHCPDBHCP_ZPMIS_RES_MASTER
as ZEMPD
association PROJECT principal
ZPROHEADER(PROJECTID)
multiplicity 1 dependent
ZACTU(PROJECTID) multiplicity
association EMPLOYEE principal
ZACTU(EMPLOYEEID)
multiplicity 1 dependent
ZEMPD(EMPLOYEEID) multiplicity
1
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010029
Pls suggest if there is anything to add or correct in XS odata service syntax above
Regards
Kamal Jain
Vikas Madaan in response to Thomas Jung on page 29Apr 14 2014 458 PM
Thanks Thomas
Under which component
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 29Apr 14 2014 450 PM
No this isnt a known issue Ive seen Nor can I recreate the problem in my system No you cant maintain the
authentication in XSHTTPDEST itself It intentionally must be set in XSADMIN tool I can really only suggest
that you open a support ticket
Vikas MadaanApr 14 2014 431 PM
Hi Thomas
I am trying to pull data from SAP system onto HANA Database using XSJOB files I am calling RFC enabled
function modules over HTTP request It helps me replicating the real time ECC data onto HANA as well with
back ground jobs
I am facing one problem in the XSHTTPDEST file I am able to create and activate the file using studio and this
file is even visible in the web based XS administration tool But in the web based tool when i provide user and
password for basic authotication then system just clears the user id and password when i try to save This the
reason our HTTP requests are getting failed and below is the response we are getting in the response body
lthtmlgtltheadgtlttitlegtLogon Error Messagelttitlegt
Is this known issue or we are missing something Is it possible to provide user and password in the
XSHTTPDEST file Is there any particular syntax
I checked and i have the required authorizations as well develper Guide
Please help
Regards
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010030
Vikas Madaan
Abdul HakimFeb 22 2014 359 AM
Hi Thomas - Any recommended book or resource to learn and master Server Side Javascript There were
many books available in the market but as a beginner need to know the right resource book to start with and
master this stuffAlso whether SAP plan to conduct any training to teach Server Side Javascript similar to other
standard training offerings
Thanks
Hakim
Samuel Tanor-GyeduFeb 20 2014 839 AM
Thanks Thomas
I will definitely have a look at SHINE
Thomas Jung in response to gentilini andre on page 30Feb 19 2014 422 PM
Difficult to say what is wrong I several things which are different than our sample that does this You are using
a POST for instance instead of a GET However if you are gettting a 200 then I assume the service call is
correct In client side tools (like Chrome Developer Tools) you should be able to see the response object from
the call
However what I would really recommend is that you study the SHINE content (SAP HANA Interactive
Education) There is already a sample application which does this in SHINE Also it has some special
JavaScript in the UI to handle the file attachment via AXAJ call Perhaps that is the part you are missing
You can read more about SHINE here It is also included already installed in the latest version of the HANA
Developer Center trial image (SP7 based)
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
gentilini andreFeb 19 2014 325 PM
Hi Thomas
well I followed your hints but it still donacutet work
I created a xsjs File like below
function downloadExcel()
try
var body =
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010031
alert(drin)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
alert(drusse)
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount
tTax Amount tNetto Amount tCurrency n
while(rsnext())
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
catch (e)
alert(db conn funktioniert nicht)
var a = $requestparametersget(cmd)
$responsesetBody(Invalid Command +a)
switch (a)
case doex
$responsesetBody(Invalid Command +a)
alert(filedownload)
thisdownloadExcel()
break
default
$responsestatus = $nethttpINTERNAL_SERVER_ERROR
$responsesetBody(Invalid Command +a)
The Controllerjs File
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010032
doFileDownload function (oEvent)
jQuerysaprequire(sapuicommonsMessageBox)
sapuicommonsMessageBoxshow(Export Starten sapuicommonsMessageBoxIconconfirm
Information)
sapuicommonsMessageBoxconfirm(Export starteninform Confirmation)
return false
function inform(rValue)
alert (drinnnnne)
var aurl = FileDownloadxsjscmd=doex
if(rValue) If User presses Ok
alert(aurl)
jQueryajax(
url aurl
method POST
dataType json
datacmddoex
success sapuicommonsMessageBoxalert(Export wird ausgefuumlhrtConfirmation)
errorfunction onErrorCall(jqXHR textStatus errorThrown)
alert(jqXHRstatus)
sapuicommonsMessageBoxshow(jqXHRstatus
ERROR
Error in calling Service )
return
complete sapuicommonsMessageBoxalert(Export Erfolgreich
abgeschlossenConfirmation)
)
return false
else If the user presses Cancel
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010033
sapuicommonsMessageBoxalert(Vorgang abgebrochenNotification)
)
at last but not least the view
sapuijsview(zag1_ui_cv_03Index
Specifies the Controller belonging to this View
In the case that it is not implemented or that null is returned this View does not have a Controller
memberOf zag1_ui_cv_03Index
getControllerName function()
return zag1_ui_cv_03Index
Is initially called once after the Controller has been instantiated It is the place where the UI is
constructed
Since the Controller is given to this method its event handlers can be attached right away
memberOf zag1_ui_cv_03Index
createContent function(oController)
create a lite button with an icon and a text
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010034
lite true
)placeAt(btn)
oButton3attachPress(oControllerdoFileDownload)
var oButton4 = new sapuicommonsButton(
text Refresh
icon imagesrefreshjpg
lite true
press function() var data = oTableval()
if(data == )
alert(no data found)
return
print(content)
print(DatArray)
if (data = )
alert(Funzt)
JSONToCSVConvertor(data CUSTOMER AMOUNT true)
)placeAt(btn)
jQuerysaprequire(sapuitableTable)
create table control with properties
var oTable = new sapuitableTable(
width 100
rowHeight 50
title Amount per Partner
selectionMode sapuitableSelectionModeNone
)
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Company Name
)
template new sapuicommonsTextView(
text CompanyName
)
sortProperty CompanyName
))
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010035
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Partner ID
)
template new sapuicommonsTextView(
text PartnerId
)
sortProperty PartnerId
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Postal Code
textAlign sapuicoreTextAlignEnd
)
template new sapuicommonsTextView(
text PostalCode
textAlign sapuicoreTextAlignEnd
)
sortProperty PostalCode
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text City
)
template new sapuicommonsTextView(
text City
)
sortProperty City
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Purchase ID
)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010036
template new sapuicommonsTextView(
text PurchaseOrderId
)
sortProperty Currency
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Lifecycle Status
)
template new sapuicommonsTextView(
text LifecycleStatus
)
sortProperty LifecycleStatus
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Gross Amount
)
template new sapuicommonsTextView(
text GrossAmount
)
sortProperty GrossAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Tax Amount
)
template new sapuicommonsTextView(
text TaxAmount
)
sortProperty TaxAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Amount Netto
)
template new sapuicommonsTextView(
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010037
text CM_NET_Amount_001
)
sortProperty CM_NET_Amount_001
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Currency
)
template new sapuicommonsTextView(
text Currency
)
sortProperty Currency
))
var oModel = new sapuimodelodataODataModel
(httpqperiorvmcldsr8000ZAG1_WS_001ZAG1_CV_001xsodata false)
oTablesetModel(oModel)
oTablebindRows(Amount)
return oTable
)
It wonacutet call the function or better said the action of the button works fine till to the point where it should call the
xsjsfile to generate the excel-file I wondered that in the ajax part the error- success- and complete-part will
be executed at the same time and not only one of this statements The message is 200 (The request has
succeeded The information returned with the response is dependent on the method used in the request)
Maybe you can see where my mistake is or whats going wrong
Iacuteve the developer edition on cloudshare (Hana Studio rev68 Server is on SPS05)
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010038
Andreacute
Thomas Jung in response to Samuel Tanor-Gyedu on page 38Feb 19 2014 523 AM
I dont think I can help you This appears to a question about how odata4j works not about XS I have no
experience with odata4j myself
Samuel Tanor-GyeduFeb 18 2014 913 AM
Hi Thomas
I have an odata service with this endpointhttpss5hanaxshanatrialondemandcomservicesUserxsodata
I am now trying to consume it from eclipse with the odata4j libraries
This is how I get the endpoint
public UserServiceOdata(String endpointUri)
thisendpointUri = endpointUri
ODataConsumerdumpresponseHeaders(true)
consumer = ODataConsumerscreate(endpointUri)
This is my method to add a user
public User addUser(User user)
consumercreateEntity(entitySet)properties(OPropertiesint32(propertyUserId
usergetId()))properties(OPropertiesstring(propertyUserName
usergetName()))properties(OPropertiesstring(propertyUserEmail usergetEmail()))execute()
return user
When I call addUser method I get an Error
Caused by javaxxmlstreamXMLStreamException ParseError at [rowcol][78253]
Message The reference to entity sourceUrl must end with the delimiter
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010039
When I use this endpoint httpss5hanaxshanatrialondemandcomservicesUsersvc everything works fine
With the httpss5hanaxshanatrialondemandcomservicesUserxsodata I get errors
Please I would be very grateful for assistance
Thanks in advance
Regards
Samuel
Thomas Jung in response to gentilini andre on page 39Feb 18 2014 431 AM
You have a fundamental misunderstanding here You are placing server side JavaScript code in your client
side UI5 application The function downloadExcel is something you need to execute on the server It needs to
be in an XSJS file and it is called from the client side via AJAX - as a REST service not as a local function
gentilini andreFeb 17 2014 451 PM
Hello Thomas
Thank you for this great How-To Guide
Iacutem pretty new in SAPUI5 and tried your export-sample in my little trial project but it doesnacutet work
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010040
My Button for this looks like
ltcodegt
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
lite true
press function() alert(oButton3getText())
downloadExcel()
ltcodegt
and the function for this action looks like
ltcodegt
function downloadExcel()
var body =
alert(drin)
print($query)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount tTax
Amount tNetto Amount tCurrency n
while(rsnext())
if(rsnext() == )
alert($responsesetBody( Failed to retrieve data ))
alert($responsestatus = $nethttpINTERNAL_SERVER_ERROR)
else
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010041
ltcodegt
Iacutem afraid and hope that you can help me
Kind regards
Andreacute
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1246 PM
gtIs there any restriction or development limitation in the XSJSLIB files
Thats a very general question Difficult to answer without any context
Vikas Madaan in response to Thomas Jung on page 41Feb 11 2014 1245 PM
Thanks Thomas
I think we are on same page
Once quick question that came to my mind Is there any restriction or development limitation in the XSJSLIB
files
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1230 PM
gtCould please help me in understanding in more advantagesdisadvantages for both techniques
Youve summarized it pretty well already
gtbecuase i dont want to use both the approaches
Even with the CRUD support and exits in XSODATA its still pretty hard to do 100 via XSODATA There are
still valid use cases for XSJS when you need custom body custom read processing job scheduling etc Its
good to try and use XSODATA whenever possible but I wouldnt automatically exclude the use of XSJS
Vikas MadaanFeb 11 2014 1008 AM
Hi Thomas
Thanks a lot for sharing useful information through various blogs
In my current project we are evaluating use of XSOData or XSJS applications I saw your videos like the one
mentioned below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010042
httpwwwsaphanacomdocsDOC-4376
Want i understood from various blog is this
From SP7 we can write exsits in the OData services and it is very easy to consume at the client side just like
any REST base service and from my understanding it is Scalable as well I would love to use XSOData always
becuase development effort is very less compare to XSJS and it is very easy to rampup the team on OData
related development objects
XSJS were as provide more control becuase of server side scripting becuase it allows development on the
server side using JavaScript Core APIs of SAP HANA Extended Application Services are therefore exposed
as JavaScript functions providing easy access to the HTTP Request and Response object as well database
access to execute SQL or call SQLScript Procedures It provide us control over the body format and and URL
parameter definition
Could please help me in understanding in more advantagesdisadvantages for both techniques
I am very keen to understand and also explain the same to team members becuase i dont want to use both the
approaches and even sometimes customer can also ask the same to us
Also If we are on SP6 then from my understanding XSJS provides us more capability in terms of complex
application Corrent me If i am wrong
Thanks
Regards
Vikas Madaan
Thomas Jung in response to Raghuveer Phull on page 42Feb 5 2014 312 PM
Yes there are videos on the CRUD features of XSODATA which were new in SP6
For more on CRUD support in SP6 see this video
oData CreateUpdateDelete Support in SAP HANA SPS6
For the extended support for XSJS exits in SP7 see this video
SAP HANA SPS 07 XSODATA Exits in XSJS
Raghuveer PhullFeb 5 2014 122 AM
Do you have an exampledocumentationvideo where you can write a service which will populate Hana DB
What I am asking for is a way for my external script to populate the DB tables i have created in Hana DB
Thomas Jung in response to reda miraoui on page 43Jan 29 2014 411 PM
The source code for the examples shown here are shipped as part of SHINE (SAP HANA Interactive
Education)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010043
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Vivek Singh Bhoj in response to reda miraoui on page 43Jan 29 2014 352 PM
Hi Reda
You can import Shine Content in HANA and then check all these source codes
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Regards
Vivek
reda miraoui in response to Thomas Jung on page Jan 29 2014 344 PM
Hey Thomas
Is it possible to download source code of your project from this HANA tutorial
Thanks
Reda
Thomas Jung in response to Abdul Hakim on page 43Nov 21 2013 1133 PM
Yes River can be used as an alternative and when activated it will generate Server Side JavaScript andor
SQLScript
Abdul Hakim in response to Thomas Jung on page 44Nov 21 2013 747 PM
Hi Thomas - Was going through blog regarding River (RDL)Just a question on this
When you say Programming language for HANA native development is Server side Javascript SQL SQL
ScriptOnce RDL is rolled out whether RDL can be used for native application development instead of Server
side Java script SQL SQL Script I am very much new to this stuff so appreciate if you can also help on
how to get started with Server Side Java script SQL SQL Script for HANA
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 30 2013 750 AM
Hi Thomas
Thanks for your response I am talking about more content on shine
thanks
Ashutosh
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010044
Baskar Gopalakrishnan in response to Thomas Jung on page 44Oct 30 2013 1249 AM
Hi Thomas
Im a SAP PI Middleware consultantSAP topic leader in XIPI heavily worked on Java related
Netweaver stack I have knowledge in ABAP but not worked heavily in abap I have enrolled your sap hana
native application development course I feel very interesting I did work heavily in java and javascript projects
using eclipse development tool Do you think if I invest my time in just native hana development and proceed
in HANA field is a good step I dont have BW experience either
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 819 PM
Thanks for the clarification Much appreciated
Thomas Jung in response to Abdul Hakim on page 44Oct 29 2013 120 PM
gtABAP Close to HANA means whether we can expect a similar 2 tier architecture similar to HANA XS in the
future or what does that mean
No it doesnt mean that ABAP will become a 2 tier architecture We will not move the ABAP VMKernel into
HANA itself It will remain a separate application server At least for the current plansforeseeable future What
he was referring to was bringing the programming models closer For instance the new 740 SP5 feature that
allows you to write SQLScript directly within an ABAP class method
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 650 AM
Thomas - Thanks for the clarificationMuch appreciatedI was listening to ABAP on HANA session by
Thorsten Schneider this year Teched and he was mentioning that SAP Plans to bring ABAP very close to
HANA in the coming future but not much details have been discussed in the sessionABAP Close to HANA
means whether we can expect a similar 2 tier architecture similar to HANA XS in the future or what does that
mean
Thanks
Hakim
Thomas Jung in response to Abdul Hakim on page 45Oct 28 2013 703 PM
gt whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the option is
recommended by SAP then kindly share the pros and cons of each of the item
Taken from the TechEd CD103 session slides
Guidance
bulluse ABAP for optimization of existing progams (in context of SAP Business Suite or BW)
bullconsider HANA Native Development for development of new applications which will solely run on SAP HANA
bullcombine ABAP and HANA Native Development to enrich existing applications (eg SAP HANA Live Fiori)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010045
ABAP
bullapplications follow 3-tier architecture
bullABAP is in general database agnostic but with release 74 optimized for SAP HANA
bullProgramming language ABAP ABAP OO with the option to use SAP HANA features
bullIDE eclipse-based ABAP Development Tools
HANA Native Development
bullapplications follow 2-tier architecture
bullHANA Native Development is SAP HANA specific and embedded in the database
bullProgramming language River server-side JavaScript SQLSQLScript
bullIDE eclipse-based SAP HANA Studio + web IDE
Thomas Jung in response to ashutosh dixit on page 45Oct 28 2013 701 PM
gtIs there any more demos for the SHINE
Im not exactly sure what you mean by that We are building additional content for SHINE that will be delivered
in SP7
Abdul HakimOct 28 2013 326 PM
Thomas - Let us say a customer is running SAP Netweaver 74 ABAP with HANA DB and they have HANA
extended service as wellIf the customer wants to do new developments then what is the recommendation
from SAP ie whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the
option is recommended by SAP then kindly share the pros and cons of each of the item (SAP Netweaver 74
ABAP Vs SAP HANA XS)
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 28 2013 221 PM
Hi Thomas
Thanks a lot for your its working now
Is there any more demos for the SHINE
Thanks
Ashutosh
Thomas Jung in response to ashutosh dixit on page 46Oct 25 2013 809 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010046
As this content is now standard in SP6 as part of SHINE (SAP HANA INteractive Education) there also some
setup instructions on helpsapcom
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Basic points to check - have you generated the synonyms in the data generator Ran the data generator to
create some data Have the role assigned Added client 001 to your user profile
ashutosh dixitOct 24 2013 130 PM
Hi Thomas
Amazing blog - once again Thomas thanks
I have been following you for many days attended your OPEN SAP course also
That was an amazing course for new learner like me
One of our client is looking forward for XS based search Application identical to what you have created in your
DEMO
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010047
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010048
But I am not able to fetch the data on blank HTML page is coming with no data
If there is any step by step document related to this please help in getting that
Any help will be highly appreciated
Thanks
Ashutosh
Naveen KumarSep 26 2013 1130 AM
Good Document
Heber FabianoAug 27 2013 323 PM
Great content as always Keep sharing with us
Thomas Jung in response to Orel Stringa on page 48Aug 27 2013 147 PM
This is currently not possible The CORS support is for all origins We dont yet have the feature to maintain a
whitelist of CORS origins
Orel Stringa in response to Thomas Jung on page Aug 27 2013 801 AM
Hi Thomas
nice to see that SAP has made it possible with SP6 to specify cross origin resource sharing (CORS) support
via the xsaccess file SP6 HANA development guide has example of how to specify CORS support
I have build an XS application and would like to serve SAPUI5 on a diffhost than XSHANA
How can I specify that I would like to allow cross origin access restricted to certain domain(s) only
Is there a special keyword syntax for specifying that
Thank yoi
Orel
Vijay UthayakumarAug 27 2013 131 AM
Highly informative amp digestible Fantastic work
Jerry WangAug 1 2013 955 AM
Hi Tomas
Thank you
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010049
Jerry
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 644 PM
JSLint checks are very strict and often produce syntax errors for items that just stylistic and wont actually
cause an error upon activation or runtime You can either ignore the JSLint errors or deactivate JSLint for this
project in these cases However it might also be an indication that the JavaScript code you are trying to import
isnt compatible with Strict mode
httpsdevelopermozillaorgen-USdocsWebJavaScriptReferenceFunctions_and_function_scope
Strict_mode
Milan Vrozina in response to Thomas Jung on page 49Jul 21 2013 624 PM
Thanks for clarification I thought there would be some kind of import
But anyway in case of this specific library I have some problems with JSLint validation when I do cut and paste
of the original code
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 343 PM
What kind of problem are you having using this library Strict mode JavaScript which doesnt try to access the
DOM Window or other client side specific objects should work in Server Side XSJS Generally if you have a
library you just cut and paste into your XSJS or an XSJSLIB file and then call the functions from your code
Milan VrozinaJul 21 2013 339 PM
Hello
first and foremost thank you for perfect openSAP classes related to HANA development and for this blog as
well
I have one question related to server-side javascript You mentioned in course that is possible to use 3rd party
libraries or reuse 3rd party code But I cant find a possible way how to import 3rd party javascript library -as
is- to server and use it For example I would like to use JSZip library to zip some file before sending it to client
from xsjs application Is that possible Thank you
Chandrashekhar MahajanJul 3 2013 734 PM
This is excellent blog Now HANA XS is very much clear to me
Mohan krishnaJul 1 2013 144 PM
WOW - great blog Thomas This will be very helpful in understanding SAP hana Good Job
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010050
Abdul Hakim in response to Thomas Jung on page 50Jun 27 2013 833 PM
Thanks for the clarification
Thomas Jung in response to Abdul Hakim on page 50Jun 27 2013 659 PM
HANA Extended Application Services uses SQLScript and JavaScript as its two primary programming
languages
gtwhether the current SAP Business suite based on ABAP will be completely migrated to HANA service
No The Business Suite already runs on HANA but still via the ABAP application server It will continue to
leverage HANA via a combination of enhancements to ABAP and utilizing some of the technologies described
in this blog
gtAlso whether ABAP can be used to built application in HANA extended services
No There is no ABAP language container in HANA Extended Application Services
Abdul HakimJun 27 2013 405 PM
Hi Thomas - What is the programming language used for HANA Extended application services
As HANA is more than a database ie application platform by itself and as you mentioned that more and more
applications will be built on HANA i have question as how the future SAP ERP system looks likewhether the
current SAP Business suite based on ABAP will be completely migrated to HANA service in the future or SAP
ABAP server will continue to evolve and receive focus investment from SAP Also whether ABAP can be used
to built application in HANA extended services Your thoughts
Thanks
Abdul Hakim
Thomas Jung in response to Ravindra Channe on page 50Jun 11 2013 830 PM
Yes it is still planned However we are still a couple of weeks away and Ive not seen the final installers to say
for certain its there
Ravindra ChanneJun 11 2013 815 PM
Hi Thomas
Thanks for a wonderful and very informative blog Is there any update on 32 bit REGI file
Is it expected along with SPS6
Regards
Ravi
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010051
Thomas Jung in response to Amanda Rzepka on page Jun 7 2013 942 PM
gtCan the XS Services be used in a BW on HANA Scenario
Yes XS is part of ALL HANA systems You should check and make sure you are licensed for direct access to
the underlying HANA instance however
Thomas Jung in response to Holger Schimanski on page Jun 7 2013 941 PM
gtIs there a similar library which could be used in XS Engine
The XSODATA development object is similar We also have higher level frameworks for XMLA and Search
Services (InA) You can expect more such high level frameworks to be added to the HANA Extended
Application Services in the future
Thomas Jung in response to Manav Mehra on page Jun 7 2013 939 PM
Have you used something like the Chrome developer tools to see see if you are getting any client side
javascript errors or to see if the request to your xsodata service is successful
Thomas Jung in response to Christian Hufnagl on page 52Jun 7 2013 938 PM
It will ship as non-automatic content in SPS6 (all systems will have it and it just needs to be imported) The
delivery units are also part of this weeks updates to the Cloudshare and AWS developer center images They
are also available for download as part of the content of the openSAP course
Thomas Jung in response to Matthew Pickell on page 51Jun 7 2013 937 PM
CORS support will come with SPS6 at the end of June
Thomas Jung in response to Jeroen Custers on page 51Jun 7 2013 936 PM
gtWill this bug be fixed in HANA ver 56
Personally Ive still experienced this bug in SPS6 internal builds Must be a tricky one to find Luckily the
workaround of closing and reopening isnt too difficult Just annoying This also probably makes the bug low
priority
Jeroen Custers in response to Vivek Singh Bhoj on page 52Jun 7 2013 411 PM
This issue also occurs on rev56
Matthew PickellJun 7 2013 258 PM
Thomas
Has CORS been included in a release yet
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010052
Vivek Singh Bhoj in response to Chandra Edem on page 52Jun 5 2013 601 AM
Hi Chandra
Date for Week1 Assignment has been extended till June 11
So you can give Week 1 Assignment now
Christian HufnaglJun 4 2013 543 PM
Hi Thomas
thank you for the interesting tutorial
Can you tell me whether it is possible to download the source code of the ldquoPutting it all togetherrdquovideo And if yes Where can I download itThanks
Christoph
Vivek Singh BhojJun 4 2013 1116 AM
Hi Thomas
Thanks for OpenSAP classes
Your Youtube Account also have very good exercises
IN OpenSAP Week 2 Unit 3 tutorial after assigning admin role to my user Id i am not able to see sequences
synonyms triggers under my schema or any other schema i am only able to see Column Views Procedures
Tables and Views
Though now i am able to insert data into my created table
Can you let me know how i will be able to see Sequences under my schema without removing the admin role
I am using HANA revision 52
Got to know from OpenSAP that
This is a known issue and the only way that Ive seen to fix it is to actually close the studio and open it again
then refresh the node
Cheers
Rich Heilman
SAP HANA Product Management
Will this bug be fixed in HANA ver 56
Chandra Edem in response to Thomas Jung on page 53Jun 4 2013 646 AM
Thomas
I registered for OpenSAP course Introduction to Software Development on SAP HANA on June 2 900PM
I didnt know that it is going to end WEEK1 assignment test on 632013 300PM Is there any way can take
that WEEK1 Assignment Test
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010053
Thanks
Chandra
Thomas Jung in response to Alexander Bauer on page Jun 3 2013 856 PM
SAPUI5 gets updated auutomatically when you apply HANA revisions There is no additional download or
update needed
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010019
As you can see the HTTP Destination and the XSJS files are in the same folder services The workspace
name is XS_Workspace and the package structure is as follows
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010020
Now I am trying to read this destination
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010021
When I am using full package structure destination_package =
rootworkTara02XSTest01XSHttpTest01services I am receiving the
error message httpreadDestination destination not found (package
rootworkTara02XSTest01XSHttpTest01services name XSHttpDest01)
On using the workspace name destination_package = XS_Workspaceservices I am receiving the
error message User is not authorized to use destination (package XS_Workspaceservices name
XSHttpDest01)
On using destination_package = rootworkTara02XSTest01services also I am receiving the error
message User is not authorized to use destination (package rootworkTara02XSTest01services
name XSHttpDest01) Strangely the services folder is not directly under XSTest01
Lastly I deliberately gave a wrong service name destination_package = XS_Workspaceservices and
destination_name = XSHttpDest02 But even then I received the error message User is not authorized to
use destination (package XS_Workspaceservices name XSHttpDest02) not that the destination is not
found
Could you please help me to resolve this issue
Thanks a lot for your helps
Regards
Tarasankar
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010022
Thomas Jung in response to Tarasankar Banerjee on page 22Oct 30 2014 152 PM
Since SPS06 its possible to use outbound HTTP destinations and to call out to external services using XSJS
Thomas Jung in response to Tarasankar Banerjee on page 22Oct 30 2014 150 PM
gtSo when the program runs in server would it automatically consider the OS user credentials
No It doesnt automatically use anything You have to specific the user and password that you want to use for
the proxy Although many proxy servers dont require a username and password
Tarasankar Banerjee in response to Thomas Jung on page 23Oct 30 2014 707 AM
Hi Thomas
Just watched the video you shared above Thanks a lot for it It is really informative and helpful
Regards
Tarasankar
Tarasankar Banerjee in response to Tarasankar Banerjee on page 22Oct 30 2014 346 AM
Got answer for the second point SAP HANA XS Administration Tool is the place to configure Proxy settings
Regards
Tarasankar
Tarasankar Banerjee in response to Tarasankar Banerjee on page 22Oct 29 2014 314 PM
Dear Thomas
another question is that does the proxy settings in the HttpDestination refer to the OS user of the HANA
server We specify useProxy as true and authType as basic in the HttpDestination but not maintain any
user credentials So when the program runs in server would it automatically consider the OS user credentials
Thanks
Regards
Tarasankar
Tarasankar Banerjee in response to Thomas Jung on page 23Oct 29 2014 132 PM
Thanks Thomas I am currently checking this option only
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010023
My current requirement is to fetch Weather Data and Social Media data from various OData services and store
them in HANA for further analysis What might be the best way for this I am currently checking the option of
creating an XS application which would connect to the external services fetch the data and save that in HANA
using DB Connection Is this the best way Or should we try to use JAVA or some other way
Your valuable suggestions are most welcome Thanks
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 23Oct 29 2014 1256 PM
gtHowever is it possible to consume XSODATA service from XSJS instead of using DB Connection
You can via an outbound HTTP destination although I certainly wouldnt recommend it It would be rather
complex and not well performing
gtAlso is it possible to consume data from external OData services for weather data social media data etc from
XSJS
Sure with the same Outbound HTTP Connectivity
httpswwwyoutubecomwatchv=fWirvj9l7eY
Maintaining HTTP Destinations - SAP HANA Developer Guide - SAP Library
Tarasankar BanerjeeOct 29 2014 1119 AM
Dear Thomas
Thanks for the great blog
I am able to connect to Database and execute queries from XSJS service However is it possible to consume
XSODATA service from XSJS instead of using DB Connection
Also is it possible to consume data from external OData services for weather data social media data etc from
XSJS
If possible it would be great if you could provide some code sample or guidelines
Thanks
Regards
Tarasankar
Thomas Jung in response to Weiping Lu on page 24Sep 25 2014 833 AM
Please refer to service note 1849775
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010024
httpservicesapcomsapsupportnotes1849775
I believe it will address your issue
Weiping LuSep 24 2014 519 PM
Hi Tom
Great post and videos I have a tough issue calling a HANA procedure from XS takes gt 5min but from HANA
studio lt 1 min Were using Amazon AWS rev 70 and 73 Any help will be greatly appreciated
Thanks
WPL
Thomas Jung in response to Su Srikanth on page 24Aug 11 2014 253 PM
You transport XSODATA services like you would any other repository content - via a Delivery Unit
Su SrikanthAug 11 2014 750 AM
Hi Thomas
Great blog
Ive a query here - we create the odata services(andor URLs created to view in the web browser) in
development environment now if we have to transport it to the quality andor production environment how
can we do this - is the same as importexport or is there any specific way to do please help with any useful
pointers
Many thanks as always
Su
Thomas Jung in response to ARSHAD SHAIKH on page 24May 15 2014 231 PM
Ive never written any blogs on calculation views I dont cover that topic That is why I suggested you ask your
question in the proper SCN forum
Although looking at your your above SQL Statement I dont see why you couldnt do this directly in XSODATA
off of the table STATUS without the need for the calculation view or the SQLScript Procedure
ARSHAD SHAIKH in response to Thomas Jung on page 25May 15 2014 1154 AM
Hello Thomas
I am new to hana Please suggest me the blogs of you related to calculation view that calling
procedures(procedures have out parameter)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010025
I am trying to fetch the result of procedure in calc view and want to create odata service for that calculation
view
procedure code goes like this
---------------------------------------
CREATE PROCEDURE TWEETS_TODAY(OUT OP BIGINT)
language SQLSCRIPT sql security invoker default schema SOCIAL360 reads sql data as
BEGIN
SELECT COUNT() INTO OP FROM SOCIAL360STATUS WHERE CREATED_AT = CURRENT_DATE
END
calc view code goes like this
----------------------------------------
Begin Procedure Script
BEGIN
DECLARE OP BIGINT
CALL SOCIAL360TWEETS_TODAY(OPvar_out)
END End Procedure Script
Thanks
-Arshad
Thomas Jung in response to ARSHAD SHAIKH on page 25May 15 2014 944 AM
Your question seems to have no relation to the content in this blog Please consider instead asking general
HANA questions in the appropriate SCN Forum
ARSHAD SHAIKHMay 15 2014 917 AM
Hi Thomas
I want to call procedures in calculation view (procedures have out parameter)
Please suggest me step by step procedure with example and supporting documents
Thanks
ARSHAD SHAIKH
Henrique Pinto in response to Blair Krotenko on page 26Apr 16 2014 711 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010026
Hmm not really sure of that I see it but that might be because Im an employee
But the NET development partner I was working with was not enrolled in any kind of beta testing program and
they were able to download it so I guess you should as well
Make sure to go in the Installation and Upgrades menu and not the Support Packages and Patches
Go to httpservicesapcomswdc -gt Installations and Upgrades -gt Browse our Download Catalog -gt SAP In-
Memory (SAP HANA) -gt SAP HANA ADONET 10
Best regards
Henrique
Blair Krotenko in response to Henrique Pinto on page 26Apr 16 2014 656 PM
Thanks for the info Henrique but I cant find it I dont know if it is an authorization issue or do we need to be a
ramp-up customer to dl and use a beta product
Thanks
Blair
Henrique Pinto in response to Thomas Jung on page 27Apr 16 2014 614 PM
The ADONET provider is available for download in the SAP Service Marketplace (in beta edition so far)
Thomas Jung in response to Kamal Jain on page 26Apr 16 2014 514 PM
For general OData structure and syntax I find that the Odataorg website is very helpful For example on this
topic
httpwwwodataorgdocumentationodata-version-2-0uri-conventions
The syntax of a $expand query option is a comma-separated list of Navigation Properties Additionally each
Navigation Property can be followed by a forward slash and another Navigation Property to enable identifying a
multi-level relationship
The page also has some sample URLs
Kamal JainApr 16 2014 536 AM
Dear Thomas
I agree that we need to pass all the associations in the expand I tried with some of options but was not
through
Now i just tried with below syntax and able to achive Thx
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010027
httpdewdftzld025pgdevsapcorp8000DTHCPXSZPMIS_PRO_ACTUALxsodata
ZPROHEADER(PR07_000002)$expand=ZACTUZEMPD
Regards
Kamal Jain
Thomas Jung in response to Blair Krotenko on page 27Apr 15 2014 623 PM
We do plan to release an ADONET provider specific to HANA in the near future This would probably be the
best option for consumption from NET Until then I would think that ODBC is probably the next best option It
gives you generally easy portability from already existing database code You could consume OData as well
although that is more generally consumed from the UI layer itself It guess it somewhat depends upon where
you are calling the service from in your NET application
Blair KrotenkoApr 15 2014 409 PM
Hi Thomas
We are looking at consuming HANA data in a NET application and from what I can see there are 2 options -
OData and ODBC It seems to me that OData might be the better option when consuming HANA data in an XS
application while ODBC might be the better option for NET What are your thoughts Is there a paper on this
subject I havent been able to find a comparison document for this Are there any security caveats to be aware
of for these options
Thanks
Blair
Thomas Jung in response to Kamal Jain on page 27Apr 15 2014 136 PM
You have to list both associations in the expand on the URL if you want both relationships to be processed
Kamal JainApr 15 2014 1249 PM
Hi Thomas
Thx for valuable and useful information
I have an query regarding XS Odata service creation for more than 2 tables and get all the data in one
command
There is req in which service needs to be created for 3 tables to get data from all these
First table has Project ID as key second table has composite
ProjectID and Employee Id as key and third table has Employee id as
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010028
key
So if I create navigation for first 2 tables based on project id and use expand comand than its working fine and I
can see data of both the tables
Further if I add navigation for third table also as below then below expand is displaying data for first two tables
only Pls share how to use expand command in this case if possible to get all tables data based on project id
How to use navigation ZEMPD here
httpdewdftzld025pgdevsapcorp8000DTHCPXSZPMIS_PRO_ACTUALxsodata
ZPROHEADER(PR07_000002)$expand=ZACTUamp
service namespace
DTHCPXS
DTHCPDTHCPDBHCP_PROJECT_HEADER
as ZPROHEADER
navigates (PROJECT as
ZACTU)
DTHCPDTHCPDBHCPT_ZPMIS_ACTUAL
as ZACTU
navigates (EMPLOYEE as
ZEMPD )
DTHCPDTHCPDBHCP_ZPMIS_RES_MASTER
as ZEMPD
association PROJECT principal
ZPROHEADER(PROJECTID)
multiplicity 1 dependent
ZACTU(PROJECTID) multiplicity
association EMPLOYEE principal
ZACTU(EMPLOYEEID)
multiplicity 1 dependent
ZEMPD(EMPLOYEEID) multiplicity
1
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010029
Pls suggest if there is anything to add or correct in XS odata service syntax above
Regards
Kamal Jain
Vikas Madaan in response to Thomas Jung on page 29Apr 14 2014 458 PM
Thanks Thomas
Under which component
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 29Apr 14 2014 450 PM
No this isnt a known issue Ive seen Nor can I recreate the problem in my system No you cant maintain the
authentication in XSHTTPDEST itself It intentionally must be set in XSADMIN tool I can really only suggest
that you open a support ticket
Vikas MadaanApr 14 2014 431 PM
Hi Thomas
I am trying to pull data from SAP system onto HANA Database using XSJOB files I am calling RFC enabled
function modules over HTTP request It helps me replicating the real time ECC data onto HANA as well with
back ground jobs
I am facing one problem in the XSHTTPDEST file I am able to create and activate the file using studio and this
file is even visible in the web based XS administration tool But in the web based tool when i provide user and
password for basic authotication then system just clears the user id and password when i try to save This the
reason our HTTP requests are getting failed and below is the response we are getting in the response body
lthtmlgtltheadgtlttitlegtLogon Error Messagelttitlegt
Is this known issue or we are missing something Is it possible to provide user and password in the
XSHTTPDEST file Is there any particular syntax
I checked and i have the required authorizations as well develper Guide
Please help
Regards
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010030
Vikas Madaan
Abdul HakimFeb 22 2014 359 AM
Hi Thomas - Any recommended book or resource to learn and master Server Side Javascript There were
many books available in the market but as a beginner need to know the right resource book to start with and
master this stuffAlso whether SAP plan to conduct any training to teach Server Side Javascript similar to other
standard training offerings
Thanks
Hakim
Samuel Tanor-GyeduFeb 20 2014 839 AM
Thanks Thomas
I will definitely have a look at SHINE
Thomas Jung in response to gentilini andre on page 30Feb 19 2014 422 PM
Difficult to say what is wrong I several things which are different than our sample that does this You are using
a POST for instance instead of a GET However if you are gettting a 200 then I assume the service call is
correct In client side tools (like Chrome Developer Tools) you should be able to see the response object from
the call
However what I would really recommend is that you study the SHINE content (SAP HANA Interactive
Education) There is already a sample application which does this in SHINE Also it has some special
JavaScript in the UI to handle the file attachment via AXAJ call Perhaps that is the part you are missing
You can read more about SHINE here It is also included already installed in the latest version of the HANA
Developer Center trial image (SP7 based)
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
gentilini andreFeb 19 2014 325 PM
Hi Thomas
well I followed your hints but it still donacutet work
I created a xsjs File like below
function downloadExcel()
try
var body =
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010031
alert(drin)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
alert(drusse)
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount
tTax Amount tNetto Amount tCurrency n
while(rsnext())
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
catch (e)
alert(db conn funktioniert nicht)
var a = $requestparametersget(cmd)
$responsesetBody(Invalid Command +a)
switch (a)
case doex
$responsesetBody(Invalid Command +a)
alert(filedownload)
thisdownloadExcel()
break
default
$responsestatus = $nethttpINTERNAL_SERVER_ERROR
$responsesetBody(Invalid Command +a)
The Controllerjs File
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010032
doFileDownload function (oEvent)
jQuerysaprequire(sapuicommonsMessageBox)
sapuicommonsMessageBoxshow(Export Starten sapuicommonsMessageBoxIconconfirm
Information)
sapuicommonsMessageBoxconfirm(Export starteninform Confirmation)
return false
function inform(rValue)
alert (drinnnnne)
var aurl = FileDownloadxsjscmd=doex
if(rValue) If User presses Ok
alert(aurl)
jQueryajax(
url aurl
method POST
dataType json
datacmddoex
success sapuicommonsMessageBoxalert(Export wird ausgefuumlhrtConfirmation)
errorfunction onErrorCall(jqXHR textStatus errorThrown)
alert(jqXHRstatus)
sapuicommonsMessageBoxshow(jqXHRstatus
ERROR
Error in calling Service )
return
complete sapuicommonsMessageBoxalert(Export Erfolgreich
abgeschlossenConfirmation)
)
return false
else If the user presses Cancel
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010033
sapuicommonsMessageBoxalert(Vorgang abgebrochenNotification)
)
at last but not least the view
sapuijsview(zag1_ui_cv_03Index
Specifies the Controller belonging to this View
In the case that it is not implemented or that null is returned this View does not have a Controller
memberOf zag1_ui_cv_03Index
getControllerName function()
return zag1_ui_cv_03Index
Is initially called once after the Controller has been instantiated It is the place where the UI is
constructed
Since the Controller is given to this method its event handlers can be attached right away
memberOf zag1_ui_cv_03Index
createContent function(oController)
create a lite button with an icon and a text
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010034
lite true
)placeAt(btn)
oButton3attachPress(oControllerdoFileDownload)
var oButton4 = new sapuicommonsButton(
text Refresh
icon imagesrefreshjpg
lite true
press function() var data = oTableval()
if(data == )
alert(no data found)
return
print(content)
print(DatArray)
if (data = )
alert(Funzt)
JSONToCSVConvertor(data CUSTOMER AMOUNT true)
)placeAt(btn)
jQuerysaprequire(sapuitableTable)
create table control with properties
var oTable = new sapuitableTable(
width 100
rowHeight 50
title Amount per Partner
selectionMode sapuitableSelectionModeNone
)
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Company Name
)
template new sapuicommonsTextView(
text CompanyName
)
sortProperty CompanyName
))
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010035
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Partner ID
)
template new sapuicommonsTextView(
text PartnerId
)
sortProperty PartnerId
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Postal Code
textAlign sapuicoreTextAlignEnd
)
template new sapuicommonsTextView(
text PostalCode
textAlign sapuicoreTextAlignEnd
)
sortProperty PostalCode
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text City
)
template new sapuicommonsTextView(
text City
)
sortProperty City
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Purchase ID
)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010036
template new sapuicommonsTextView(
text PurchaseOrderId
)
sortProperty Currency
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Lifecycle Status
)
template new sapuicommonsTextView(
text LifecycleStatus
)
sortProperty LifecycleStatus
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Gross Amount
)
template new sapuicommonsTextView(
text GrossAmount
)
sortProperty GrossAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Tax Amount
)
template new sapuicommonsTextView(
text TaxAmount
)
sortProperty TaxAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Amount Netto
)
template new sapuicommonsTextView(
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010037
text CM_NET_Amount_001
)
sortProperty CM_NET_Amount_001
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Currency
)
template new sapuicommonsTextView(
text Currency
)
sortProperty Currency
))
var oModel = new sapuimodelodataODataModel
(httpqperiorvmcldsr8000ZAG1_WS_001ZAG1_CV_001xsodata false)
oTablesetModel(oModel)
oTablebindRows(Amount)
return oTable
)
It wonacutet call the function or better said the action of the button works fine till to the point where it should call the
xsjsfile to generate the excel-file I wondered that in the ajax part the error- success- and complete-part will
be executed at the same time and not only one of this statements The message is 200 (The request has
succeeded The information returned with the response is dependent on the method used in the request)
Maybe you can see where my mistake is or whats going wrong
Iacuteve the developer edition on cloudshare (Hana Studio rev68 Server is on SPS05)
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010038
Andreacute
Thomas Jung in response to Samuel Tanor-Gyedu on page 38Feb 19 2014 523 AM
I dont think I can help you This appears to a question about how odata4j works not about XS I have no
experience with odata4j myself
Samuel Tanor-GyeduFeb 18 2014 913 AM
Hi Thomas
I have an odata service with this endpointhttpss5hanaxshanatrialondemandcomservicesUserxsodata
I am now trying to consume it from eclipse with the odata4j libraries
This is how I get the endpoint
public UserServiceOdata(String endpointUri)
thisendpointUri = endpointUri
ODataConsumerdumpresponseHeaders(true)
consumer = ODataConsumerscreate(endpointUri)
This is my method to add a user
public User addUser(User user)
consumercreateEntity(entitySet)properties(OPropertiesint32(propertyUserId
usergetId()))properties(OPropertiesstring(propertyUserName
usergetName()))properties(OPropertiesstring(propertyUserEmail usergetEmail()))execute()
return user
When I call addUser method I get an Error
Caused by javaxxmlstreamXMLStreamException ParseError at [rowcol][78253]
Message The reference to entity sourceUrl must end with the delimiter
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010039
When I use this endpoint httpss5hanaxshanatrialondemandcomservicesUsersvc everything works fine
With the httpss5hanaxshanatrialondemandcomservicesUserxsodata I get errors
Please I would be very grateful for assistance
Thanks in advance
Regards
Samuel
Thomas Jung in response to gentilini andre on page 39Feb 18 2014 431 AM
You have a fundamental misunderstanding here You are placing server side JavaScript code in your client
side UI5 application The function downloadExcel is something you need to execute on the server It needs to
be in an XSJS file and it is called from the client side via AJAX - as a REST service not as a local function
gentilini andreFeb 17 2014 451 PM
Hello Thomas
Thank you for this great How-To Guide
Iacutem pretty new in SAPUI5 and tried your export-sample in my little trial project but it doesnacutet work
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010040
My Button for this looks like
ltcodegt
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
lite true
press function() alert(oButton3getText())
downloadExcel()
ltcodegt
and the function for this action looks like
ltcodegt
function downloadExcel()
var body =
alert(drin)
print($query)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount tTax
Amount tNetto Amount tCurrency n
while(rsnext())
if(rsnext() == )
alert($responsesetBody( Failed to retrieve data ))
alert($responsestatus = $nethttpINTERNAL_SERVER_ERROR)
else
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010041
ltcodegt
Iacutem afraid and hope that you can help me
Kind regards
Andreacute
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1246 PM
gtIs there any restriction or development limitation in the XSJSLIB files
Thats a very general question Difficult to answer without any context
Vikas Madaan in response to Thomas Jung on page 41Feb 11 2014 1245 PM
Thanks Thomas
I think we are on same page
Once quick question that came to my mind Is there any restriction or development limitation in the XSJSLIB
files
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1230 PM
gtCould please help me in understanding in more advantagesdisadvantages for both techniques
Youve summarized it pretty well already
gtbecuase i dont want to use both the approaches
Even with the CRUD support and exits in XSODATA its still pretty hard to do 100 via XSODATA There are
still valid use cases for XSJS when you need custom body custom read processing job scheduling etc Its
good to try and use XSODATA whenever possible but I wouldnt automatically exclude the use of XSJS
Vikas MadaanFeb 11 2014 1008 AM
Hi Thomas
Thanks a lot for sharing useful information through various blogs
In my current project we are evaluating use of XSOData or XSJS applications I saw your videos like the one
mentioned below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010042
httpwwwsaphanacomdocsDOC-4376
Want i understood from various blog is this
From SP7 we can write exsits in the OData services and it is very easy to consume at the client side just like
any REST base service and from my understanding it is Scalable as well I would love to use XSOData always
becuase development effort is very less compare to XSJS and it is very easy to rampup the team on OData
related development objects
XSJS were as provide more control becuase of server side scripting becuase it allows development on the
server side using JavaScript Core APIs of SAP HANA Extended Application Services are therefore exposed
as JavaScript functions providing easy access to the HTTP Request and Response object as well database
access to execute SQL or call SQLScript Procedures It provide us control over the body format and and URL
parameter definition
Could please help me in understanding in more advantagesdisadvantages for both techniques
I am very keen to understand and also explain the same to team members becuase i dont want to use both the
approaches and even sometimes customer can also ask the same to us
Also If we are on SP6 then from my understanding XSJS provides us more capability in terms of complex
application Corrent me If i am wrong
Thanks
Regards
Vikas Madaan
Thomas Jung in response to Raghuveer Phull on page 42Feb 5 2014 312 PM
Yes there are videos on the CRUD features of XSODATA which were new in SP6
For more on CRUD support in SP6 see this video
oData CreateUpdateDelete Support in SAP HANA SPS6
For the extended support for XSJS exits in SP7 see this video
SAP HANA SPS 07 XSODATA Exits in XSJS
Raghuveer PhullFeb 5 2014 122 AM
Do you have an exampledocumentationvideo where you can write a service which will populate Hana DB
What I am asking for is a way for my external script to populate the DB tables i have created in Hana DB
Thomas Jung in response to reda miraoui on page 43Jan 29 2014 411 PM
The source code for the examples shown here are shipped as part of SHINE (SAP HANA Interactive
Education)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010043
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Vivek Singh Bhoj in response to reda miraoui on page 43Jan 29 2014 352 PM
Hi Reda
You can import Shine Content in HANA and then check all these source codes
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Regards
Vivek
reda miraoui in response to Thomas Jung on page Jan 29 2014 344 PM
Hey Thomas
Is it possible to download source code of your project from this HANA tutorial
Thanks
Reda
Thomas Jung in response to Abdul Hakim on page 43Nov 21 2013 1133 PM
Yes River can be used as an alternative and when activated it will generate Server Side JavaScript andor
SQLScript
Abdul Hakim in response to Thomas Jung on page 44Nov 21 2013 747 PM
Hi Thomas - Was going through blog regarding River (RDL)Just a question on this
When you say Programming language for HANA native development is Server side Javascript SQL SQL
ScriptOnce RDL is rolled out whether RDL can be used for native application development instead of Server
side Java script SQL SQL Script I am very much new to this stuff so appreciate if you can also help on
how to get started with Server Side Java script SQL SQL Script for HANA
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 30 2013 750 AM
Hi Thomas
Thanks for your response I am talking about more content on shine
thanks
Ashutosh
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010044
Baskar Gopalakrishnan in response to Thomas Jung on page 44Oct 30 2013 1249 AM
Hi Thomas
Im a SAP PI Middleware consultantSAP topic leader in XIPI heavily worked on Java related
Netweaver stack I have knowledge in ABAP but not worked heavily in abap I have enrolled your sap hana
native application development course I feel very interesting I did work heavily in java and javascript projects
using eclipse development tool Do you think if I invest my time in just native hana development and proceed
in HANA field is a good step I dont have BW experience either
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 819 PM
Thanks for the clarification Much appreciated
Thomas Jung in response to Abdul Hakim on page 44Oct 29 2013 120 PM
gtABAP Close to HANA means whether we can expect a similar 2 tier architecture similar to HANA XS in the
future or what does that mean
No it doesnt mean that ABAP will become a 2 tier architecture We will not move the ABAP VMKernel into
HANA itself It will remain a separate application server At least for the current plansforeseeable future What
he was referring to was bringing the programming models closer For instance the new 740 SP5 feature that
allows you to write SQLScript directly within an ABAP class method
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 650 AM
Thomas - Thanks for the clarificationMuch appreciatedI was listening to ABAP on HANA session by
Thorsten Schneider this year Teched and he was mentioning that SAP Plans to bring ABAP very close to
HANA in the coming future but not much details have been discussed in the sessionABAP Close to HANA
means whether we can expect a similar 2 tier architecture similar to HANA XS in the future or what does that
mean
Thanks
Hakim
Thomas Jung in response to Abdul Hakim on page 45Oct 28 2013 703 PM
gt whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the option is
recommended by SAP then kindly share the pros and cons of each of the item
Taken from the TechEd CD103 session slides
Guidance
bulluse ABAP for optimization of existing progams (in context of SAP Business Suite or BW)
bullconsider HANA Native Development for development of new applications which will solely run on SAP HANA
bullcombine ABAP and HANA Native Development to enrich existing applications (eg SAP HANA Live Fiori)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010045
ABAP
bullapplications follow 3-tier architecture
bullABAP is in general database agnostic but with release 74 optimized for SAP HANA
bullProgramming language ABAP ABAP OO with the option to use SAP HANA features
bullIDE eclipse-based ABAP Development Tools
HANA Native Development
bullapplications follow 2-tier architecture
bullHANA Native Development is SAP HANA specific and embedded in the database
bullProgramming language River server-side JavaScript SQLSQLScript
bullIDE eclipse-based SAP HANA Studio + web IDE
Thomas Jung in response to ashutosh dixit on page 45Oct 28 2013 701 PM
gtIs there any more demos for the SHINE
Im not exactly sure what you mean by that We are building additional content for SHINE that will be delivered
in SP7
Abdul HakimOct 28 2013 326 PM
Thomas - Let us say a customer is running SAP Netweaver 74 ABAP with HANA DB and they have HANA
extended service as wellIf the customer wants to do new developments then what is the recommendation
from SAP ie whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the
option is recommended by SAP then kindly share the pros and cons of each of the item (SAP Netweaver 74
ABAP Vs SAP HANA XS)
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 28 2013 221 PM
Hi Thomas
Thanks a lot for your its working now
Is there any more demos for the SHINE
Thanks
Ashutosh
Thomas Jung in response to ashutosh dixit on page 46Oct 25 2013 809 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010046
As this content is now standard in SP6 as part of SHINE (SAP HANA INteractive Education) there also some
setup instructions on helpsapcom
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Basic points to check - have you generated the synonyms in the data generator Ran the data generator to
create some data Have the role assigned Added client 001 to your user profile
ashutosh dixitOct 24 2013 130 PM
Hi Thomas
Amazing blog - once again Thomas thanks
I have been following you for many days attended your OPEN SAP course also
That was an amazing course for new learner like me
One of our client is looking forward for XS based search Application identical to what you have created in your
DEMO
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010047
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010048
But I am not able to fetch the data on blank HTML page is coming with no data
If there is any step by step document related to this please help in getting that
Any help will be highly appreciated
Thanks
Ashutosh
Naveen KumarSep 26 2013 1130 AM
Good Document
Heber FabianoAug 27 2013 323 PM
Great content as always Keep sharing with us
Thomas Jung in response to Orel Stringa on page 48Aug 27 2013 147 PM
This is currently not possible The CORS support is for all origins We dont yet have the feature to maintain a
whitelist of CORS origins
Orel Stringa in response to Thomas Jung on page Aug 27 2013 801 AM
Hi Thomas
nice to see that SAP has made it possible with SP6 to specify cross origin resource sharing (CORS) support
via the xsaccess file SP6 HANA development guide has example of how to specify CORS support
I have build an XS application and would like to serve SAPUI5 on a diffhost than XSHANA
How can I specify that I would like to allow cross origin access restricted to certain domain(s) only
Is there a special keyword syntax for specifying that
Thank yoi
Orel
Vijay UthayakumarAug 27 2013 131 AM
Highly informative amp digestible Fantastic work
Jerry WangAug 1 2013 955 AM
Hi Tomas
Thank you
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010049
Jerry
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 644 PM
JSLint checks are very strict and often produce syntax errors for items that just stylistic and wont actually
cause an error upon activation or runtime You can either ignore the JSLint errors or deactivate JSLint for this
project in these cases However it might also be an indication that the JavaScript code you are trying to import
isnt compatible with Strict mode
httpsdevelopermozillaorgen-USdocsWebJavaScriptReferenceFunctions_and_function_scope
Strict_mode
Milan Vrozina in response to Thomas Jung on page 49Jul 21 2013 624 PM
Thanks for clarification I thought there would be some kind of import
But anyway in case of this specific library I have some problems with JSLint validation when I do cut and paste
of the original code
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 343 PM
What kind of problem are you having using this library Strict mode JavaScript which doesnt try to access the
DOM Window or other client side specific objects should work in Server Side XSJS Generally if you have a
library you just cut and paste into your XSJS or an XSJSLIB file and then call the functions from your code
Milan VrozinaJul 21 2013 339 PM
Hello
first and foremost thank you for perfect openSAP classes related to HANA development and for this blog as
well
I have one question related to server-side javascript You mentioned in course that is possible to use 3rd party
libraries or reuse 3rd party code But I cant find a possible way how to import 3rd party javascript library -as
is- to server and use it For example I would like to use JSZip library to zip some file before sending it to client
from xsjs application Is that possible Thank you
Chandrashekhar MahajanJul 3 2013 734 PM
This is excellent blog Now HANA XS is very much clear to me
Mohan krishnaJul 1 2013 144 PM
WOW - great blog Thomas This will be very helpful in understanding SAP hana Good Job
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010050
Abdul Hakim in response to Thomas Jung on page 50Jun 27 2013 833 PM
Thanks for the clarification
Thomas Jung in response to Abdul Hakim on page 50Jun 27 2013 659 PM
HANA Extended Application Services uses SQLScript and JavaScript as its two primary programming
languages
gtwhether the current SAP Business suite based on ABAP will be completely migrated to HANA service
No The Business Suite already runs on HANA but still via the ABAP application server It will continue to
leverage HANA via a combination of enhancements to ABAP and utilizing some of the technologies described
in this blog
gtAlso whether ABAP can be used to built application in HANA extended services
No There is no ABAP language container in HANA Extended Application Services
Abdul HakimJun 27 2013 405 PM
Hi Thomas - What is the programming language used for HANA Extended application services
As HANA is more than a database ie application platform by itself and as you mentioned that more and more
applications will be built on HANA i have question as how the future SAP ERP system looks likewhether the
current SAP Business suite based on ABAP will be completely migrated to HANA service in the future or SAP
ABAP server will continue to evolve and receive focus investment from SAP Also whether ABAP can be used
to built application in HANA extended services Your thoughts
Thanks
Abdul Hakim
Thomas Jung in response to Ravindra Channe on page 50Jun 11 2013 830 PM
Yes it is still planned However we are still a couple of weeks away and Ive not seen the final installers to say
for certain its there
Ravindra ChanneJun 11 2013 815 PM
Hi Thomas
Thanks for a wonderful and very informative blog Is there any update on 32 bit REGI file
Is it expected along with SPS6
Regards
Ravi
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010051
Thomas Jung in response to Amanda Rzepka on page Jun 7 2013 942 PM
gtCan the XS Services be used in a BW on HANA Scenario
Yes XS is part of ALL HANA systems You should check and make sure you are licensed for direct access to
the underlying HANA instance however
Thomas Jung in response to Holger Schimanski on page Jun 7 2013 941 PM
gtIs there a similar library which could be used in XS Engine
The XSODATA development object is similar We also have higher level frameworks for XMLA and Search
Services (InA) You can expect more such high level frameworks to be added to the HANA Extended
Application Services in the future
Thomas Jung in response to Manav Mehra on page Jun 7 2013 939 PM
Have you used something like the Chrome developer tools to see see if you are getting any client side
javascript errors or to see if the request to your xsodata service is successful
Thomas Jung in response to Christian Hufnagl on page 52Jun 7 2013 938 PM
It will ship as non-automatic content in SPS6 (all systems will have it and it just needs to be imported) The
delivery units are also part of this weeks updates to the Cloudshare and AWS developer center images They
are also available for download as part of the content of the openSAP course
Thomas Jung in response to Matthew Pickell on page 51Jun 7 2013 937 PM
CORS support will come with SPS6 at the end of June
Thomas Jung in response to Jeroen Custers on page 51Jun 7 2013 936 PM
gtWill this bug be fixed in HANA ver 56
Personally Ive still experienced this bug in SPS6 internal builds Must be a tricky one to find Luckily the
workaround of closing and reopening isnt too difficult Just annoying This also probably makes the bug low
priority
Jeroen Custers in response to Vivek Singh Bhoj on page 52Jun 7 2013 411 PM
This issue also occurs on rev56
Matthew PickellJun 7 2013 258 PM
Thomas
Has CORS been included in a release yet
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010052
Vivek Singh Bhoj in response to Chandra Edem on page 52Jun 5 2013 601 AM
Hi Chandra
Date for Week1 Assignment has been extended till June 11
So you can give Week 1 Assignment now
Christian HufnaglJun 4 2013 543 PM
Hi Thomas
thank you for the interesting tutorial
Can you tell me whether it is possible to download the source code of the ldquoPutting it all togetherrdquovideo And if yes Where can I download itThanks
Christoph
Vivek Singh BhojJun 4 2013 1116 AM
Hi Thomas
Thanks for OpenSAP classes
Your Youtube Account also have very good exercises
IN OpenSAP Week 2 Unit 3 tutorial after assigning admin role to my user Id i am not able to see sequences
synonyms triggers under my schema or any other schema i am only able to see Column Views Procedures
Tables and Views
Though now i am able to insert data into my created table
Can you let me know how i will be able to see Sequences under my schema without removing the admin role
I am using HANA revision 52
Got to know from OpenSAP that
This is a known issue and the only way that Ive seen to fix it is to actually close the studio and open it again
then refresh the node
Cheers
Rich Heilman
SAP HANA Product Management
Will this bug be fixed in HANA ver 56
Chandra Edem in response to Thomas Jung on page 53Jun 4 2013 646 AM
Thomas
I registered for OpenSAP course Introduction to Software Development on SAP HANA on June 2 900PM
I didnt know that it is going to end WEEK1 assignment test on 632013 300PM Is there any way can take
that WEEK1 Assignment Test
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010053
Thanks
Chandra
Thomas Jung in response to Alexander Bauer on page Jun 3 2013 856 PM
SAPUI5 gets updated auutomatically when you apply HANA revisions There is no additional download or
update needed
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010020
Now I am trying to read this destination
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010021
When I am using full package structure destination_package =
rootworkTara02XSTest01XSHttpTest01services I am receiving the
error message httpreadDestination destination not found (package
rootworkTara02XSTest01XSHttpTest01services name XSHttpDest01)
On using the workspace name destination_package = XS_Workspaceservices I am receiving the
error message User is not authorized to use destination (package XS_Workspaceservices name
XSHttpDest01)
On using destination_package = rootworkTara02XSTest01services also I am receiving the error
message User is not authorized to use destination (package rootworkTara02XSTest01services
name XSHttpDest01) Strangely the services folder is not directly under XSTest01
Lastly I deliberately gave a wrong service name destination_package = XS_Workspaceservices and
destination_name = XSHttpDest02 But even then I received the error message User is not authorized to
use destination (package XS_Workspaceservices name XSHttpDest02) not that the destination is not
found
Could you please help me to resolve this issue
Thanks a lot for your helps
Regards
Tarasankar
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010022
Thomas Jung in response to Tarasankar Banerjee on page 22Oct 30 2014 152 PM
Since SPS06 its possible to use outbound HTTP destinations and to call out to external services using XSJS
Thomas Jung in response to Tarasankar Banerjee on page 22Oct 30 2014 150 PM
gtSo when the program runs in server would it automatically consider the OS user credentials
No It doesnt automatically use anything You have to specific the user and password that you want to use for
the proxy Although many proxy servers dont require a username and password
Tarasankar Banerjee in response to Thomas Jung on page 23Oct 30 2014 707 AM
Hi Thomas
Just watched the video you shared above Thanks a lot for it It is really informative and helpful
Regards
Tarasankar
Tarasankar Banerjee in response to Tarasankar Banerjee on page 22Oct 30 2014 346 AM
Got answer for the second point SAP HANA XS Administration Tool is the place to configure Proxy settings
Regards
Tarasankar
Tarasankar Banerjee in response to Tarasankar Banerjee on page 22Oct 29 2014 314 PM
Dear Thomas
another question is that does the proxy settings in the HttpDestination refer to the OS user of the HANA
server We specify useProxy as true and authType as basic in the HttpDestination but not maintain any
user credentials So when the program runs in server would it automatically consider the OS user credentials
Thanks
Regards
Tarasankar
Tarasankar Banerjee in response to Thomas Jung on page 23Oct 29 2014 132 PM
Thanks Thomas I am currently checking this option only
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010023
My current requirement is to fetch Weather Data and Social Media data from various OData services and store
them in HANA for further analysis What might be the best way for this I am currently checking the option of
creating an XS application which would connect to the external services fetch the data and save that in HANA
using DB Connection Is this the best way Or should we try to use JAVA or some other way
Your valuable suggestions are most welcome Thanks
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 23Oct 29 2014 1256 PM
gtHowever is it possible to consume XSODATA service from XSJS instead of using DB Connection
You can via an outbound HTTP destination although I certainly wouldnt recommend it It would be rather
complex and not well performing
gtAlso is it possible to consume data from external OData services for weather data social media data etc from
XSJS
Sure with the same Outbound HTTP Connectivity
httpswwwyoutubecomwatchv=fWirvj9l7eY
Maintaining HTTP Destinations - SAP HANA Developer Guide - SAP Library
Tarasankar BanerjeeOct 29 2014 1119 AM
Dear Thomas
Thanks for the great blog
I am able to connect to Database and execute queries from XSJS service However is it possible to consume
XSODATA service from XSJS instead of using DB Connection
Also is it possible to consume data from external OData services for weather data social media data etc from
XSJS
If possible it would be great if you could provide some code sample or guidelines
Thanks
Regards
Tarasankar
Thomas Jung in response to Weiping Lu on page 24Sep 25 2014 833 AM
Please refer to service note 1849775
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010024
httpservicesapcomsapsupportnotes1849775
I believe it will address your issue
Weiping LuSep 24 2014 519 PM
Hi Tom
Great post and videos I have a tough issue calling a HANA procedure from XS takes gt 5min but from HANA
studio lt 1 min Were using Amazon AWS rev 70 and 73 Any help will be greatly appreciated
Thanks
WPL
Thomas Jung in response to Su Srikanth on page 24Aug 11 2014 253 PM
You transport XSODATA services like you would any other repository content - via a Delivery Unit
Su SrikanthAug 11 2014 750 AM
Hi Thomas
Great blog
Ive a query here - we create the odata services(andor URLs created to view in the web browser) in
development environment now if we have to transport it to the quality andor production environment how
can we do this - is the same as importexport or is there any specific way to do please help with any useful
pointers
Many thanks as always
Su
Thomas Jung in response to ARSHAD SHAIKH on page 24May 15 2014 231 PM
Ive never written any blogs on calculation views I dont cover that topic That is why I suggested you ask your
question in the proper SCN forum
Although looking at your your above SQL Statement I dont see why you couldnt do this directly in XSODATA
off of the table STATUS without the need for the calculation view or the SQLScript Procedure
ARSHAD SHAIKH in response to Thomas Jung on page 25May 15 2014 1154 AM
Hello Thomas
I am new to hana Please suggest me the blogs of you related to calculation view that calling
procedures(procedures have out parameter)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010025
I am trying to fetch the result of procedure in calc view and want to create odata service for that calculation
view
procedure code goes like this
---------------------------------------
CREATE PROCEDURE TWEETS_TODAY(OUT OP BIGINT)
language SQLSCRIPT sql security invoker default schema SOCIAL360 reads sql data as
BEGIN
SELECT COUNT() INTO OP FROM SOCIAL360STATUS WHERE CREATED_AT = CURRENT_DATE
END
calc view code goes like this
----------------------------------------
Begin Procedure Script
BEGIN
DECLARE OP BIGINT
CALL SOCIAL360TWEETS_TODAY(OPvar_out)
END End Procedure Script
Thanks
-Arshad
Thomas Jung in response to ARSHAD SHAIKH on page 25May 15 2014 944 AM
Your question seems to have no relation to the content in this blog Please consider instead asking general
HANA questions in the appropriate SCN Forum
ARSHAD SHAIKHMay 15 2014 917 AM
Hi Thomas
I want to call procedures in calculation view (procedures have out parameter)
Please suggest me step by step procedure with example and supporting documents
Thanks
ARSHAD SHAIKH
Henrique Pinto in response to Blair Krotenko on page 26Apr 16 2014 711 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010026
Hmm not really sure of that I see it but that might be because Im an employee
But the NET development partner I was working with was not enrolled in any kind of beta testing program and
they were able to download it so I guess you should as well
Make sure to go in the Installation and Upgrades menu and not the Support Packages and Patches
Go to httpservicesapcomswdc -gt Installations and Upgrades -gt Browse our Download Catalog -gt SAP In-
Memory (SAP HANA) -gt SAP HANA ADONET 10
Best regards
Henrique
Blair Krotenko in response to Henrique Pinto on page 26Apr 16 2014 656 PM
Thanks for the info Henrique but I cant find it I dont know if it is an authorization issue or do we need to be a
ramp-up customer to dl and use a beta product
Thanks
Blair
Henrique Pinto in response to Thomas Jung on page 27Apr 16 2014 614 PM
The ADONET provider is available for download in the SAP Service Marketplace (in beta edition so far)
Thomas Jung in response to Kamal Jain on page 26Apr 16 2014 514 PM
For general OData structure and syntax I find that the Odataorg website is very helpful For example on this
topic
httpwwwodataorgdocumentationodata-version-2-0uri-conventions
The syntax of a $expand query option is a comma-separated list of Navigation Properties Additionally each
Navigation Property can be followed by a forward slash and another Navigation Property to enable identifying a
multi-level relationship
The page also has some sample URLs
Kamal JainApr 16 2014 536 AM
Dear Thomas
I agree that we need to pass all the associations in the expand I tried with some of options but was not
through
Now i just tried with below syntax and able to achive Thx
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010027
httpdewdftzld025pgdevsapcorp8000DTHCPXSZPMIS_PRO_ACTUALxsodata
ZPROHEADER(PR07_000002)$expand=ZACTUZEMPD
Regards
Kamal Jain
Thomas Jung in response to Blair Krotenko on page 27Apr 15 2014 623 PM
We do plan to release an ADONET provider specific to HANA in the near future This would probably be the
best option for consumption from NET Until then I would think that ODBC is probably the next best option It
gives you generally easy portability from already existing database code You could consume OData as well
although that is more generally consumed from the UI layer itself It guess it somewhat depends upon where
you are calling the service from in your NET application
Blair KrotenkoApr 15 2014 409 PM
Hi Thomas
We are looking at consuming HANA data in a NET application and from what I can see there are 2 options -
OData and ODBC It seems to me that OData might be the better option when consuming HANA data in an XS
application while ODBC might be the better option for NET What are your thoughts Is there a paper on this
subject I havent been able to find a comparison document for this Are there any security caveats to be aware
of for these options
Thanks
Blair
Thomas Jung in response to Kamal Jain on page 27Apr 15 2014 136 PM
You have to list both associations in the expand on the URL if you want both relationships to be processed
Kamal JainApr 15 2014 1249 PM
Hi Thomas
Thx for valuable and useful information
I have an query regarding XS Odata service creation for more than 2 tables and get all the data in one
command
There is req in which service needs to be created for 3 tables to get data from all these
First table has Project ID as key second table has composite
ProjectID and Employee Id as key and third table has Employee id as
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010028
key
So if I create navigation for first 2 tables based on project id and use expand comand than its working fine and I
can see data of both the tables
Further if I add navigation for third table also as below then below expand is displaying data for first two tables
only Pls share how to use expand command in this case if possible to get all tables data based on project id
How to use navigation ZEMPD here
httpdewdftzld025pgdevsapcorp8000DTHCPXSZPMIS_PRO_ACTUALxsodata
ZPROHEADER(PR07_000002)$expand=ZACTUamp
service namespace
DTHCPXS
DTHCPDTHCPDBHCP_PROJECT_HEADER
as ZPROHEADER
navigates (PROJECT as
ZACTU)
DTHCPDTHCPDBHCPT_ZPMIS_ACTUAL
as ZACTU
navigates (EMPLOYEE as
ZEMPD )
DTHCPDTHCPDBHCP_ZPMIS_RES_MASTER
as ZEMPD
association PROJECT principal
ZPROHEADER(PROJECTID)
multiplicity 1 dependent
ZACTU(PROJECTID) multiplicity
association EMPLOYEE principal
ZACTU(EMPLOYEEID)
multiplicity 1 dependent
ZEMPD(EMPLOYEEID) multiplicity
1
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010029
Pls suggest if there is anything to add or correct in XS odata service syntax above
Regards
Kamal Jain
Vikas Madaan in response to Thomas Jung on page 29Apr 14 2014 458 PM
Thanks Thomas
Under which component
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 29Apr 14 2014 450 PM
No this isnt a known issue Ive seen Nor can I recreate the problem in my system No you cant maintain the
authentication in XSHTTPDEST itself It intentionally must be set in XSADMIN tool I can really only suggest
that you open a support ticket
Vikas MadaanApr 14 2014 431 PM
Hi Thomas
I am trying to pull data from SAP system onto HANA Database using XSJOB files I am calling RFC enabled
function modules over HTTP request It helps me replicating the real time ECC data onto HANA as well with
back ground jobs
I am facing one problem in the XSHTTPDEST file I am able to create and activate the file using studio and this
file is even visible in the web based XS administration tool But in the web based tool when i provide user and
password for basic authotication then system just clears the user id and password when i try to save This the
reason our HTTP requests are getting failed and below is the response we are getting in the response body
lthtmlgtltheadgtlttitlegtLogon Error Messagelttitlegt
Is this known issue or we are missing something Is it possible to provide user and password in the
XSHTTPDEST file Is there any particular syntax
I checked and i have the required authorizations as well develper Guide
Please help
Regards
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010030
Vikas Madaan
Abdul HakimFeb 22 2014 359 AM
Hi Thomas - Any recommended book or resource to learn and master Server Side Javascript There were
many books available in the market but as a beginner need to know the right resource book to start with and
master this stuffAlso whether SAP plan to conduct any training to teach Server Side Javascript similar to other
standard training offerings
Thanks
Hakim
Samuel Tanor-GyeduFeb 20 2014 839 AM
Thanks Thomas
I will definitely have a look at SHINE
Thomas Jung in response to gentilini andre on page 30Feb 19 2014 422 PM
Difficult to say what is wrong I several things which are different than our sample that does this You are using
a POST for instance instead of a GET However if you are gettting a 200 then I assume the service call is
correct In client side tools (like Chrome Developer Tools) you should be able to see the response object from
the call
However what I would really recommend is that you study the SHINE content (SAP HANA Interactive
Education) There is already a sample application which does this in SHINE Also it has some special
JavaScript in the UI to handle the file attachment via AXAJ call Perhaps that is the part you are missing
You can read more about SHINE here It is also included already installed in the latest version of the HANA
Developer Center trial image (SP7 based)
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
gentilini andreFeb 19 2014 325 PM
Hi Thomas
well I followed your hints but it still donacutet work
I created a xsjs File like below
function downloadExcel()
try
var body =
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010031
alert(drin)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
alert(drusse)
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount
tTax Amount tNetto Amount tCurrency n
while(rsnext())
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
catch (e)
alert(db conn funktioniert nicht)
var a = $requestparametersget(cmd)
$responsesetBody(Invalid Command +a)
switch (a)
case doex
$responsesetBody(Invalid Command +a)
alert(filedownload)
thisdownloadExcel()
break
default
$responsestatus = $nethttpINTERNAL_SERVER_ERROR
$responsesetBody(Invalid Command +a)
The Controllerjs File
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010032
doFileDownload function (oEvent)
jQuerysaprequire(sapuicommonsMessageBox)
sapuicommonsMessageBoxshow(Export Starten sapuicommonsMessageBoxIconconfirm
Information)
sapuicommonsMessageBoxconfirm(Export starteninform Confirmation)
return false
function inform(rValue)
alert (drinnnnne)
var aurl = FileDownloadxsjscmd=doex
if(rValue) If User presses Ok
alert(aurl)
jQueryajax(
url aurl
method POST
dataType json
datacmddoex
success sapuicommonsMessageBoxalert(Export wird ausgefuumlhrtConfirmation)
errorfunction onErrorCall(jqXHR textStatus errorThrown)
alert(jqXHRstatus)
sapuicommonsMessageBoxshow(jqXHRstatus
ERROR
Error in calling Service )
return
complete sapuicommonsMessageBoxalert(Export Erfolgreich
abgeschlossenConfirmation)
)
return false
else If the user presses Cancel
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010033
sapuicommonsMessageBoxalert(Vorgang abgebrochenNotification)
)
at last but not least the view
sapuijsview(zag1_ui_cv_03Index
Specifies the Controller belonging to this View
In the case that it is not implemented or that null is returned this View does not have a Controller
memberOf zag1_ui_cv_03Index
getControllerName function()
return zag1_ui_cv_03Index
Is initially called once after the Controller has been instantiated It is the place where the UI is
constructed
Since the Controller is given to this method its event handlers can be attached right away
memberOf zag1_ui_cv_03Index
createContent function(oController)
create a lite button with an icon and a text
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010034
lite true
)placeAt(btn)
oButton3attachPress(oControllerdoFileDownload)
var oButton4 = new sapuicommonsButton(
text Refresh
icon imagesrefreshjpg
lite true
press function() var data = oTableval()
if(data == )
alert(no data found)
return
print(content)
print(DatArray)
if (data = )
alert(Funzt)
JSONToCSVConvertor(data CUSTOMER AMOUNT true)
)placeAt(btn)
jQuerysaprequire(sapuitableTable)
create table control with properties
var oTable = new sapuitableTable(
width 100
rowHeight 50
title Amount per Partner
selectionMode sapuitableSelectionModeNone
)
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Company Name
)
template new sapuicommonsTextView(
text CompanyName
)
sortProperty CompanyName
))
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010035
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Partner ID
)
template new sapuicommonsTextView(
text PartnerId
)
sortProperty PartnerId
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Postal Code
textAlign sapuicoreTextAlignEnd
)
template new sapuicommonsTextView(
text PostalCode
textAlign sapuicoreTextAlignEnd
)
sortProperty PostalCode
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text City
)
template new sapuicommonsTextView(
text City
)
sortProperty City
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Purchase ID
)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010036
template new sapuicommonsTextView(
text PurchaseOrderId
)
sortProperty Currency
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Lifecycle Status
)
template new sapuicommonsTextView(
text LifecycleStatus
)
sortProperty LifecycleStatus
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Gross Amount
)
template new sapuicommonsTextView(
text GrossAmount
)
sortProperty GrossAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Tax Amount
)
template new sapuicommonsTextView(
text TaxAmount
)
sortProperty TaxAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Amount Netto
)
template new sapuicommonsTextView(
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010037
text CM_NET_Amount_001
)
sortProperty CM_NET_Amount_001
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Currency
)
template new sapuicommonsTextView(
text Currency
)
sortProperty Currency
))
var oModel = new sapuimodelodataODataModel
(httpqperiorvmcldsr8000ZAG1_WS_001ZAG1_CV_001xsodata false)
oTablesetModel(oModel)
oTablebindRows(Amount)
return oTable
)
It wonacutet call the function or better said the action of the button works fine till to the point where it should call the
xsjsfile to generate the excel-file I wondered that in the ajax part the error- success- and complete-part will
be executed at the same time and not only one of this statements The message is 200 (The request has
succeeded The information returned with the response is dependent on the method used in the request)
Maybe you can see where my mistake is or whats going wrong
Iacuteve the developer edition on cloudshare (Hana Studio rev68 Server is on SPS05)
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010038
Andreacute
Thomas Jung in response to Samuel Tanor-Gyedu on page 38Feb 19 2014 523 AM
I dont think I can help you This appears to a question about how odata4j works not about XS I have no
experience with odata4j myself
Samuel Tanor-GyeduFeb 18 2014 913 AM
Hi Thomas
I have an odata service with this endpointhttpss5hanaxshanatrialondemandcomservicesUserxsodata
I am now trying to consume it from eclipse with the odata4j libraries
This is how I get the endpoint
public UserServiceOdata(String endpointUri)
thisendpointUri = endpointUri
ODataConsumerdumpresponseHeaders(true)
consumer = ODataConsumerscreate(endpointUri)
This is my method to add a user
public User addUser(User user)
consumercreateEntity(entitySet)properties(OPropertiesint32(propertyUserId
usergetId()))properties(OPropertiesstring(propertyUserName
usergetName()))properties(OPropertiesstring(propertyUserEmail usergetEmail()))execute()
return user
When I call addUser method I get an Error
Caused by javaxxmlstreamXMLStreamException ParseError at [rowcol][78253]
Message The reference to entity sourceUrl must end with the delimiter
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010039
When I use this endpoint httpss5hanaxshanatrialondemandcomservicesUsersvc everything works fine
With the httpss5hanaxshanatrialondemandcomservicesUserxsodata I get errors
Please I would be very grateful for assistance
Thanks in advance
Regards
Samuel
Thomas Jung in response to gentilini andre on page 39Feb 18 2014 431 AM
You have a fundamental misunderstanding here You are placing server side JavaScript code in your client
side UI5 application The function downloadExcel is something you need to execute on the server It needs to
be in an XSJS file and it is called from the client side via AJAX - as a REST service not as a local function
gentilini andreFeb 17 2014 451 PM
Hello Thomas
Thank you for this great How-To Guide
Iacutem pretty new in SAPUI5 and tried your export-sample in my little trial project but it doesnacutet work
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010040
My Button for this looks like
ltcodegt
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
lite true
press function() alert(oButton3getText())
downloadExcel()
ltcodegt
and the function for this action looks like
ltcodegt
function downloadExcel()
var body =
alert(drin)
print($query)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount tTax
Amount tNetto Amount tCurrency n
while(rsnext())
if(rsnext() == )
alert($responsesetBody( Failed to retrieve data ))
alert($responsestatus = $nethttpINTERNAL_SERVER_ERROR)
else
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010041
ltcodegt
Iacutem afraid and hope that you can help me
Kind regards
Andreacute
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1246 PM
gtIs there any restriction or development limitation in the XSJSLIB files
Thats a very general question Difficult to answer without any context
Vikas Madaan in response to Thomas Jung on page 41Feb 11 2014 1245 PM
Thanks Thomas
I think we are on same page
Once quick question that came to my mind Is there any restriction or development limitation in the XSJSLIB
files
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1230 PM
gtCould please help me in understanding in more advantagesdisadvantages for both techniques
Youve summarized it pretty well already
gtbecuase i dont want to use both the approaches
Even with the CRUD support and exits in XSODATA its still pretty hard to do 100 via XSODATA There are
still valid use cases for XSJS when you need custom body custom read processing job scheduling etc Its
good to try and use XSODATA whenever possible but I wouldnt automatically exclude the use of XSJS
Vikas MadaanFeb 11 2014 1008 AM
Hi Thomas
Thanks a lot for sharing useful information through various blogs
In my current project we are evaluating use of XSOData or XSJS applications I saw your videos like the one
mentioned below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010042
httpwwwsaphanacomdocsDOC-4376
Want i understood from various blog is this
From SP7 we can write exsits in the OData services and it is very easy to consume at the client side just like
any REST base service and from my understanding it is Scalable as well I would love to use XSOData always
becuase development effort is very less compare to XSJS and it is very easy to rampup the team on OData
related development objects
XSJS were as provide more control becuase of server side scripting becuase it allows development on the
server side using JavaScript Core APIs of SAP HANA Extended Application Services are therefore exposed
as JavaScript functions providing easy access to the HTTP Request and Response object as well database
access to execute SQL or call SQLScript Procedures It provide us control over the body format and and URL
parameter definition
Could please help me in understanding in more advantagesdisadvantages for both techniques
I am very keen to understand and also explain the same to team members becuase i dont want to use both the
approaches and even sometimes customer can also ask the same to us
Also If we are on SP6 then from my understanding XSJS provides us more capability in terms of complex
application Corrent me If i am wrong
Thanks
Regards
Vikas Madaan
Thomas Jung in response to Raghuveer Phull on page 42Feb 5 2014 312 PM
Yes there are videos on the CRUD features of XSODATA which were new in SP6
For more on CRUD support in SP6 see this video
oData CreateUpdateDelete Support in SAP HANA SPS6
For the extended support for XSJS exits in SP7 see this video
SAP HANA SPS 07 XSODATA Exits in XSJS
Raghuveer PhullFeb 5 2014 122 AM
Do you have an exampledocumentationvideo where you can write a service which will populate Hana DB
What I am asking for is a way for my external script to populate the DB tables i have created in Hana DB
Thomas Jung in response to reda miraoui on page 43Jan 29 2014 411 PM
The source code for the examples shown here are shipped as part of SHINE (SAP HANA Interactive
Education)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010043
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Vivek Singh Bhoj in response to reda miraoui on page 43Jan 29 2014 352 PM
Hi Reda
You can import Shine Content in HANA and then check all these source codes
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Regards
Vivek
reda miraoui in response to Thomas Jung on page Jan 29 2014 344 PM
Hey Thomas
Is it possible to download source code of your project from this HANA tutorial
Thanks
Reda
Thomas Jung in response to Abdul Hakim on page 43Nov 21 2013 1133 PM
Yes River can be used as an alternative and when activated it will generate Server Side JavaScript andor
SQLScript
Abdul Hakim in response to Thomas Jung on page 44Nov 21 2013 747 PM
Hi Thomas - Was going through blog regarding River (RDL)Just a question on this
When you say Programming language for HANA native development is Server side Javascript SQL SQL
ScriptOnce RDL is rolled out whether RDL can be used for native application development instead of Server
side Java script SQL SQL Script I am very much new to this stuff so appreciate if you can also help on
how to get started with Server Side Java script SQL SQL Script for HANA
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 30 2013 750 AM
Hi Thomas
Thanks for your response I am talking about more content on shine
thanks
Ashutosh
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010044
Baskar Gopalakrishnan in response to Thomas Jung on page 44Oct 30 2013 1249 AM
Hi Thomas
Im a SAP PI Middleware consultantSAP topic leader in XIPI heavily worked on Java related
Netweaver stack I have knowledge in ABAP but not worked heavily in abap I have enrolled your sap hana
native application development course I feel very interesting I did work heavily in java and javascript projects
using eclipse development tool Do you think if I invest my time in just native hana development and proceed
in HANA field is a good step I dont have BW experience either
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 819 PM
Thanks for the clarification Much appreciated
Thomas Jung in response to Abdul Hakim on page 44Oct 29 2013 120 PM
gtABAP Close to HANA means whether we can expect a similar 2 tier architecture similar to HANA XS in the
future or what does that mean
No it doesnt mean that ABAP will become a 2 tier architecture We will not move the ABAP VMKernel into
HANA itself It will remain a separate application server At least for the current plansforeseeable future What
he was referring to was bringing the programming models closer For instance the new 740 SP5 feature that
allows you to write SQLScript directly within an ABAP class method
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 650 AM
Thomas - Thanks for the clarificationMuch appreciatedI was listening to ABAP on HANA session by
Thorsten Schneider this year Teched and he was mentioning that SAP Plans to bring ABAP very close to
HANA in the coming future but not much details have been discussed in the sessionABAP Close to HANA
means whether we can expect a similar 2 tier architecture similar to HANA XS in the future or what does that
mean
Thanks
Hakim
Thomas Jung in response to Abdul Hakim on page 45Oct 28 2013 703 PM
gt whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the option is
recommended by SAP then kindly share the pros and cons of each of the item
Taken from the TechEd CD103 session slides
Guidance
bulluse ABAP for optimization of existing progams (in context of SAP Business Suite or BW)
bullconsider HANA Native Development for development of new applications which will solely run on SAP HANA
bullcombine ABAP and HANA Native Development to enrich existing applications (eg SAP HANA Live Fiori)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010045
ABAP
bullapplications follow 3-tier architecture
bullABAP is in general database agnostic but with release 74 optimized for SAP HANA
bullProgramming language ABAP ABAP OO with the option to use SAP HANA features
bullIDE eclipse-based ABAP Development Tools
HANA Native Development
bullapplications follow 2-tier architecture
bullHANA Native Development is SAP HANA specific and embedded in the database
bullProgramming language River server-side JavaScript SQLSQLScript
bullIDE eclipse-based SAP HANA Studio + web IDE
Thomas Jung in response to ashutosh dixit on page 45Oct 28 2013 701 PM
gtIs there any more demos for the SHINE
Im not exactly sure what you mean by that We are building additional content for SHINE that will be delivered
in SP7
Abdul HakimOct 28 2013 326 PM
Thomas - Let us say a customer is running SAP Netweaver 74 ABAP with HANA DB and they have HANA
extended service as wellIf the customer wants to do new developments then what is the recommendation
from SAP ie whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the
option is recommended by SAP then kindly share the pros and cons of each of the item (SAP Netweaver 74
ABAP Vs SAP HANA XS)
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 28 2013 221 PM
Hi Thomas
Thanks a lot for your its working now
Is there any more demos for the SHINE
Thanks
Ashutosh
Thomas Jung in response to ashutosh dixit on page 46Oct 25 2013 809 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010046
As this content is now standard in SP6 as part of SHINE (SAP HANA INteractive Education) there also some
setup instructions on helpsapcom
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Basic points to check - have you generated the synonyms in the data generator Ran the data generator to
create some data Have the role assigned Added client 001 to your user profile
ashutosh dixitOct 24 2013 130 PM
Hi Thomas
Amazing blog - once again Thomas thanks
I have been following you for many days attended your OPEN SAP course also
That was an amazing course for new learner like me
One of our client is looking forward for XS based search Application identical to what you have created in your
DEMO
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010047
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010048
But I am not able to fetch the data on blank HTML page is coming with no data
If there is any step by step document related to this please help in getting that
Any help will be highly appreciated
Thanks
Ashutosh
Naveen KumarSep 26 2013 1130 AM
Good Document
Heber FabianoAug 27 2013 323 PM
Great content as always Keep sharing with us
Thomas Jung in response to Orel Stringa on page 48Aug 27 2013 147 PM
This is currently not possible The CORS support is for all origins We dont yet have the feature to maintain a
whitelist of CORS origins
Orel Stringa in response to Thomas Jung on page Aug 27 2013 801 AM
Hi Thomas
nice to see that SAP has made it possible with SP6 to specify cross origin resource sharing (CORS) support
via the xsaccess file SP6 HANA development guide has example of how to specify CORS support
I have build an XS application and would like to serve SAPUI5 on a diffhost than XSHANA
How can I specify that I would like to allow cross origin access restricted to certain domain(s) only
Is there a special keyword syntax for specifying that
Thank yoi
Orel
Vijay UthayakumarAug 27 2013 131 AM
Highly informative amp digestible Fantastic work
Jerry WangAug 1 2013 955 AM
Hi Tomas
Thank you
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010049
Jerry
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 644 PM
JSLint checks are very strict and often produce syntax errors for items that just stylistic and wont actually
cause an error upon activation or runtime You can either ignore the JSLint errors or deactivate JSLint for this
project in these cases However it might also be an indication that the JavaScript code you are trying to import
isnt compatible with Strict mode
httpsdevelopermozillaorgen-USdocsWebJavaScriptReferenceFunctions_and_function_scope
Strict_mode
Milan Vrozina in response to Thomas Jung on page 49Jul 21 2013 624 PM
Thanks for clarification I thought there would be some kind of import
But anyway in case of this specific library I have some problems with JSLint validation when I do cut and paste
of the original code
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 343 PM
What kind of problem are you having using this library Strict mode JavaScript which doesnt try to access the
DOM Window or other client side specific objects should work in Server Side XSJS Generally if you have a
library you just cut and paste into your XSJS or an XSJSLIB file and then call the functions from your code
Milan VrozinaJul 21 2013 339 PM
Hello
first and foremost thank you for perfect openSAP classes related to HANA development and for this blog as
well
I have one question related to server-side javascript You mentioned in course that is possible to use 3rd party
libraries or reuse 3rd party code But I cant find a possible way how to import 3rd party javascript library -as
is- to server and use it For example I would like to use JSZip library to zip some file before sending it to client
from xsjs application Is that possible Thank you
Chandrashekhar MahajanJul 3 2013 734 PM
This is excellent blog Now HANA XS is very much clear to me
Mohan krishnaJul 1 2013 144 PM
WOW - great blog Thomas This will be very helpful in understanding SAP hana Good Job
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010050
Abdul Hakim in response to Thomas Jung on page 50Jun 27 2013 833 PM
Thanks for the clarification
Thomas Jung in response to Abdul Hakim on page 50Jun 27 2013 659 PM
HANA Extended Application Services uses SQLScript and JavaScript as its two primary programming
languages
gtwhether the current SAP Business suite based on ABAP will be completely migrated to HANA service
No The Business Suite already runs on HANA but still via the ABAP application server It will continue to
leverage HANA via a combination of enhancements to ABAP and utilizing some of the technologies described
in this blog
gtAlso whether ABAP can be used to built application in HANA extended services
No There is no ABAP language container in HANA Extended Application Services
Abdul HakimJun 27 2013 405 PM
Hi Thomas - What is the programming language used for HANA Extended application services
As HANA is more than a database ie application platform by itself and as you mentioned that more and more
applications will be built on HANA i have question as how the future SAP ERP system looks likewhether the
current SAP Business suite based on ABAP will be completely migrated to HANA service in the future or SAP
ABAP server will continue to evolve and receive focus investment from SAP Also whether ABAP can be used
to built application in HANA extended services Your thoughts
Thanks
Abdul Hakim
Thomas Jung in response to Ravindra Channe on page 50Jun 11 2013 830 PM
Yes it is still planned However we are still a couple of weeks away and Ive not seen the final installers to say
for certain its there
Ravindra ChanneJun 11 2013 815 PM
Hi Thomas
Thanks for a wonderful and very informative blog Is there any update on 32 bit REGI file
Is it expected along with SPS6
Regards
Ravi
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010051
Thomas Jung in response to Amanda Rzepka on page Jun 7 2013 942 PM
gtCan the XS Services be used in a BW on HANA Scenario
Yes XS is part of ALL HANA systems You should check and make sure you are licensed for direct access to
the underlying HANA instance however
Thomas Jung in response to Holger Schimanski on page Jun 7 2013 941 PM
gtIs there a similar library which could be used in XS Engine
The XSODATA development object is similar We also have higher level frameworks for XMLA and Search
Services (InA) You can expect more such high level frameworks to be added to the HANA Extended
Application Services in the future
Thomas Jung in response to Manav Mehra on page Jun 7 2013 939 PM
Have you used something like the Chrome developer tools to see see if you are getting any client side
javascript errors or to see if the request to your xsodata service is successful
Thomas Jung in response to Christian Hufnagl on page 52Jun 7 2013 938 PM
It will ship as non-automatic content in SPS6 (all systems will have it and it just needs to be imported) The
delivery units are also part of this weeks updates to the Cloudshare and AWS developer center images They
are also available for download as part of the content of the openSAP course
Thomas Jung in response to Matthew Pickell on page 51Jun 7 2013 937 PM
CORS support will come with SPS6 at the end of June
Thomas Jung in response to Jeroen Custers on page 51Jun 7 2013 936 PM
gtWill this bug be fixed in HANA ver 56
Personally Ive still experienced this bug in SPS6 internal builds Must be a tricky one to find Luckily the
workaround of closing and reopening isnt too difficult Just annoying This also probably makes the bug low
priority
Jeroen Custers in response to Vivek Singh Bhoj on page 52Jun 7 2013 411 PM
This issue also occurs on rev56
Matthew PickellJun 7 2013 258 PM
Thomas
Has CORS been included in a release yet
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010052
Vivek Singh Bhoj in response to Chandra Edem on page 52Jun 5 2013 601 AM
Hi Chandra
Date for Week1 Assignment has been extended till June 11
So you can give Week 1 Assignment now
Christian HufnaglJun 4 2013 543 PM
Hi Thomas
thank you for the interesting tutorial
Can you tell me whether it is possible to download the source code of the ldquoPutting it all togetherrdquovideo And if yes Where can I download itThanks
Christoph
Vivek Singh BhojJun 4 2013 1116 AM
Hi Thomas
Thanks for OpenSAP classes
Your Youtube Account also have very good exercises
IN OpenSAP Week 2 Unit 3 tutorial after assigning admin role to my user Id i am not able to see sequences
synonyms triggers under my schema or any other schema i am only able to see Column Views Procedures
Tables and Views
Though now i am able to insert data into my created table
Can you let me know how i will be able to see Sequences under my schema without removing the admin role
I am using HANA revision 52
Got to know from OpenSAP that
This is a known issue and the only way that Ive seen to fix it is to actually close the studio and open it again
then refresh the node
Cheers
Rich Heilman
SAP HANA Product Management
Will this bug be fixed in HANA ver 56
Chandra Edem in response to Thomas Jung on page 53Jun 4 2013 646 AM
Thomas
I registered for OpenSAP course Introduction to Software Development on SAP HANA on June 2 900PM
I didnt know that it is going to end WEEK1 assignment test on 632013 300PM Is there any way can take
that WEEK1 Assignment Test
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010053
Thanks
Chandra
Thomas Jung in response to Alexander Bauer on page Jun 3 2013 856 PM
SAPUI5 gets updated auutomatically when you apply HANA revisions There is no additional download or
update needed
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010021
When I am using full package structure destination_package =
rootworkTara02XSTest01XSHttpTest01services I am receiving the
error message httpreadDestination destination not found (package
rootworkTara02XSTest01XSHttpTest01services name XSHttpDest01)
On using the workspace name destination_package = XS_Workspaceservices I am receiving the
error message User is not authorized to use destination (package XS_Workspaceservices name
XSHttpDest01)
On using destination_package = rootworkTara02XSTest01services also I am receiving the error
message User is not authorized to use destination (package rootworkTara02XSTest01services
name XSHttpDest01) Strangely the services folder is not directly under XSTest01
Lastly I deliberately gave a wrong service name destination_package = XS_Workspaceservices and
destination_name = XSHttpDest02 But even then I received the error message User is not authorized to
use destination (package XS_Workspaceservices name XSHttpDest02) not that the destination is not
found
Could you please help me to resolve this issue
Thanks a lot for your helps
Regards
Tarasankar
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010022
Thomas Jung in response to Tarasankar Banerjee on page 22Oct 30 2014 152 PM
Since SPS06 its possible to use outbound HTTP destinations and to call out to external services using XSJS
Thomas Jung in response to Tarasankar Banerjee on page 22Oct 30 2014 150 PM
gtSo when the program runs in server would it automatically consider the OS user credentials
No It doesnt automatically use anything You have to specific the user and password that you want to use for
the proxy Although many proxy servers dont require a username and password
Tarasankar Banerjee in response to Thomas Jung on page 23Oct 30 2014 707 AM
Hi Thomas
Just watched the video you shared above Thanks a lot for it It is really informative and helpful
Regards
Tarasankar
Tarasankar Banerjee in response to Tarasankar Banerjee on page 22Oct 30 2014 346 AM
Got answer for the second point SAP HANA XS Administration Tool is the place to configure Proxy settings
Regards
Tarasankar
Tarasankar Banerjee in response to Tarasankar Banerjee on page 22Oct 29 2014 314 PM
Dear Thomas
another question is that does the proxy settings in the HttpDestination refer to the OS user of the HANA
server We specify useProxy as true and authType as basic in the HttpDestination but not maintain any
user credentials So when the program runs in server would it automatically consider the OS user credentials
Thanks
Regards
Tarasankar
Tarasankar Banerjee in response to Thomas Jung on page 23Oct 29 2014 132 PM
Thanks Thomas I am currently checking this option only
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010023
My current requirement is to fetch Weather Data and Social Media data from various OData services and store
them in HANA for further analysis What might be the best way for this I am currently checking the option of
creating an XS application which would connect to the external services fetch the data and save that in HANA
using DB Connection Is this the best way Or should we try to use JAVA or some other way
Your valuable suggestions are most welcome Thanks
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 23Oct 29 2014 1256 PM
gtHowever is it possible to consume XSODATA service from XSJS instead of using DB Connection
You can via an outbound HTTP destination although I certainly wouldnt recommend it It would be rather
complex and not well performing
gtAlso is it possible to consume data from external OData services for weather data social media data etc from
XSJS
Sure with the same Outbound HTTP Connectivity
httpswwwyoutubecomwatchv=fWirvj9l7eY
Maintaining HTTP Destinations - SAP HANA Developer Guide - SAP Library
Tarasankar BanerjeeOct 29 2014 1119 AM
Dear Thomas
Thanks for the great blog
I am able to connect to Database and execute queries from XSJS service However is it possible to consume
XSODATA service from XSJS instead of using DB Connection
Also is it possible to consume data from external OData services for weather data social media data etc from
XSJS
If possible it would be great if you could provide some code sample or guidelines
Thanks
Regards
Tarasankar
Thomas Jung in response to Weiping Lu on page 24Sep 25 2014 833 AM
Please refer to service note 1849775
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010024
httpservicesapcomsapsupportnotes1849775
I believe it will address your issue
Weiping LuSep 24 2014 519 PM
Hi Tom
Great post and videos I have a tough issue calling a HANA procedure from XS takes gt 5min but from HANA
studio lt 1 min Were using Amazon AWS rev 70 and 73 Any help will be greatly appreciated
Thanks
WPL
Thomas Jung in response to Su Srikanth on page 24Aug 11 2014 253 PM
You transport XSODATA services like you would any other repository content - via a Delivery Unit
Su SrikanthAug 11 2014 750 AM
Hi Thomas
Great blog
Ive a query here - we create the odata services(andor URLs created to view in the web browser) in
development environment now if we have to transport it to the quality andor production environment how
can we do this - is the same as importexport or is there any specific way to do please help with any useful
pointers
Many thanks as always
Su
Thomas Jung in response to ARSHAD SHAIKH on page 24May 15 2014 231 PM
Ive never written any blogs on calculation views I dont cover that topic That is why I suggested you ask your
question in the proper SCN forum
Although looking at your your above SQL Statement I dont see why you couldnt do this directly in XSODATA
off of the table STATUS without the need for the calculation view or the SQLScript Procedure
ARSHAD SHAIKH in response to Thomas Jung on page 25May 15 2014 1154 AM
Hello Thomas
I am new to hana Please suggest me the blogs of you related to calculation view that calling
procedures(procedures have out parameter)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010025
I am trying to fetch the result of procedure in calc view and want to create odata service for that calculation
view
procedure code goes like this
---------------------------------------
CREATE PROCEDURE TWEETS_TODAY(OUT OP BIGINT)
language SQLSCRIPT sql security invoker default schema SOCIAL360 reads sql data as
BEGIN
SELECT COUNT() INTO OP FROM SOCIAL360STATUS WHERE CREATED_AT = CURRENT_DATE
END
calc view code goes like this
----------------------------------------
Begin Procedure Script
BEGIN
DECLARE OP BIGINT
CALL SOCIAL360TWEETS_TODAY(OPvar_out)
END End Procedure Script
Thanks
-Arshad
Thomas Jung in response to ARSHAD SHAIKH on page 25May 15 2014 944 AM
Your question seems to have no relation to the content in this blog Please consider instead asking general
HANA questions in the appropriate SCN Forum
ARSHAD SHAIKHMay 15 2014 917 AM
Hi Thomas
I want to call procedures in calculation view (procedures have out parameter)
Please suggest me step by step procedure with example and supporting documents
Thanks
ARSHAD SHAIKH
Henrique Pinto in response to Blair Krotenko on page 26Apr 16 2014 711 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010026
Hmm not really sure of that I see it but that might be because Im an employee
But the NET development partner I was working with was not enrolled in any kind of beta testing program and
they were able to download it so I guess you should as well
Make sure to go in the Installation and Upgrades menu and not the Support Packages and Patches
Go to httpservicesapcomswdc -gt Installations and Upgrades -gt Browse our Download Catalog -gt SAP In-
Memory (SAP HANA) -gt SAP HANA ADONET 10
Best regards
Henrique
Blair Krotenko in response to Henrique Pinto on page 26Apr 16 2014 656 PM
Thanks for the info Henrique but I cant find it I dont know if it is an authorization issue or do we need to be a
ramp-up customer to dl and use a beta product
Thanks
Blair
Henrique Pinto in response to Thomas Jung on page 27Apr 16 2014 614 PM
The ADONET provider is available for download in the SAP Service Marketplace (in beta edition so far)
Thomas Jung in response to Kamal Jain on page 26Apr 16 2014 514 PM
For general OData structure and syntax I find that the Odataorg website is very helpful For example on this
topic
httpwwwodataorgdocumentationodata-version-2-0uri-conventions
The syntax of a $expand query option is a comma-separated list of Navigation Properties Additionally each
Navigation Property can be followed by a forward slash and another Navigation Property to enable identifying a
multi-level relationship
The page also has some sample URLs
Kamal JainApr 16 2014 536 AM
Dear Thomas
I agree that we need to pass all the associations in the expand I tried with some of options but was not
through
Now i just tried with below syntax and able to achive Thx
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010027
httpdewdftzld025pgdevsapcorp8000DTHCPXSZPMIS_PRO_ACTUALxsodata
ZPROHEADER(PR07_000002)$expand=ZACTUZEMPD
Regards
Kamal Jain
Thomas Jung in response to Blair Krotenko on page 27Apr 15 2014 623 PM
We do plan to release an ADONET provider specific to HANA in the near future This would probably be the
best option for consumption from NET Until then I would think that ODBC is probably the next best option It
gives you generally easy portability from already existing database code You could consume OData as well
although that is more generally consumed from the UI layer itself It guess it somewhat depends upon where
you are calling the service from in your NET application
Blair KrotenkoApr 15 2014 409 PM
Hi Thomas
We are looking at consuming HANA data in a NET application and from what I can see there are 2 options -
OData and ODBC It seems to me that OData might be the better option when consuming HANA data in an XS
application while ODBC might be the better option for NET What are your thoughts Is there a paper on this
subject I havent been able to find a comparison document for this Are there any security caveats to be aware
of for these options
Thanks
Blair
Thomas Jung in response to Kamal Jain on page 27Apr 15 2014 136 PM
You have to list both associations in the expand on the URL if you want both relationships to be processed
Kamal JainApr 15 2014 1249 PM
Hi Thomas
Thx for valuable and useful information
I have an query regarding XS Odata service creation for more than 2 tables and get all the data in one
command
There is req in which service needs to be created for 3 tables to get data from all these
First table has Project ID as key second table has composite
ProjectID and Employee Id as key and third table has Employee id as
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010028
key
So if I create navigation for first 2 tables based on project id and use expand comand than its working fine and I
can see data of both the tables
Further if I add navigation for third table also as below then below expand is displaying data for first two tables
only Pls share how to use expand command in this case if possible to get all tables data based on project id
How to use navigation ZEMPD here
httpdewdftzld025pgdevsapcorp8000DTHCPXSZPMIS_PRO_ACTUALxsodata
ZPROHEADER(PR07_000002)$expand=ZACTUamp
service namespace
DTHCPXS
DTHCPDTHCPDBHCP_PROJECT_HEADER
as ZPROHEADER
navigates (PROJECT as
ZACTU)
DTHCPDTHCPDBHCPT_ZPMIS_ACTUAL
as ZACTU
navigates (EMPLOYEE as
ZEMPD )
DTHCPDTHCPDBHCP_ZPMIS_RES_MASTER
as ZEMPD
association PROJECT principal
ZPROHEADER(PROJECTID)
multiplicity 1 dependent
ZACTU(PROJECTID) multiplicity
association EMPLOYEE principal
ZACTU(EMPLOYEEID)
multiplicity 1 dependent
ZEMPD(EMPLOYEEID) multiplicity
1
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010029
Pls suggest if there is anything to add or correct in XS odata service syntax above
Regards
Kamal Jain
Vikas Madaan in response to Thomas Jung on page 29Apr 14 2014 458 PM
Thanks Thomas
Under which component
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 29Apr 14 2014 450 PM
No this isnt a known issue Ive seen Nor can I recreate the problem in my system No you cant maintain the
authentication in XSHTTPDEST itself It intentionally must be set in XSADMIN tool I can really only suggest
that you open a support ticket
Vikas MadaanApr 14 2014 431 PM
Hi Thomas
I am trying to pull data from SAP system onto HANA Database using XSJOB files I am calling RFC enabled
function modules over HTTP request It helps me replicating the real time ECC data onto HANA as well with
back ground jobs
I am facing one problem in the XSHTTPDEST file I am able to create and activate the file using studio and this
file is even visible in the web based XS administration tool But in the web based tool when i provide user and
password for basic authotication then system just clears the user id and password when i try to save This the
reason our HTTP requests are getting failed and below is the response we are getting in the response body
lthtmlgtltheadgtlttitlegtLogon Error Messagelttitlegt
Is this known issue or we are missing something Is it possible to provide user and password in the
XSHTTPDEST file Is there any particular syntax
I checked and i have the required authorizations as well develper Guide
Please help
Regards
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010030
Vikas Madaan
Abdul HakimFeb 22 2014 359 AM
Hi Thomas - Any recommended book or resource to learn and master Server Side Javascript There were
many books available in the market but as a beginner need to know the right resource book to start with and
master this stuffAlso whether SAP plan to conduct any training to teach Server Side Javascript similar to other
standard training offerings
Thanks
Hakim
Samuel Tanor-GyeduFeb 20 2014 839 AM
Thanks Thomas
I will definitely have a look at SHINE
Thomas Jung in response to gentilini andre on page 30Feb 19 2014 422 PM
Difficult to say what is wrong I several things which are different than our sample that does this You are using
a POST for instance instead of a GET However if you are gettting a 200 then I assume the service call is
correct In client side tools (like Chrome Developer Tools) you should be able to see the response object from
the call
However what I would really recommend is that you study the SHINE content (SAP HANA Interactive
Education) There is already a sample application which does this in SHINE Also it has some special
JavaScript in the UI to handle the file attachment via AXAJ call Perhaps that is the part you are missing
You can read more about SHINE here It is also included already installed in the latest version of the HANA
Developer Center trial image (SP7 based)
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
gentilini andreFeb 19 2014 325 PM
Hi Thomas
well I followed your hints but it still donacutet work
I created a xsjs File like below
function downloadExcel()
try
var body =
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010031
alert(drin)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
alert(drusse)
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount
tTax Amount tNetto Amount tCurrency n
while(rsnext())
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
catch (e)
alert(db conn funktioniert nicht)
var a = $requestparametersget(cmd)
$responsesetBody(Invalid Command +a)
switch (a)
case doex
$responsesetBody(Invalid Command +a)
alert(filedownload)
thisdownloadExcel()
break
default
$responsestatus = $nethttpINTERNAL_SERVER_ERROR
$responsesetBody(Invalid Command +a)
The Controllerjs File
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010032
doFileDownload function (oEvent)
jQuerysaprequire(sapuicommonsMessageBox)
sapuicommonsMessageBoxshow(Export Starten sapuicommonsMessageBoxIconconfirm
Information)
sapuicommonsMessageBoxconfirm(Export starteninform Confirmation)
return false
function inform(rValue)
alert (drinnnnne)
var aurl = FileDownloadxsjscmd=doex
if(rValue) If User presses Ok
alert(aurl)
jQueryajax(
url aurl
method POST
dataType json
datacmddoex
success sapuicommonsMessageBoxalert(Export wird ausgefuumlhrtConfirmation)
errorfunction onErrorCall(jqXHR textStatus errorThrown)
alert(jqXHRstatus)
sapuicommonsMessageBoxshow(jqXHRstatus
ERROR
Error in calling Service )
return
complete sapuicommonsMessageBoxalert(Export Erfolgreich
abgeschlossenConfirmation)
)
return false
else If the user presses Cancel
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010033
sapuicommonsMessageBoxalert(Vorgang abgebrochenNotification)
)
at last but not least the view
sapuijsview(zag1_ui_cv_03Index
Specifies the Controller belonging to this View
In the case that it is not implemented or that null is returned this View does not have a Controller
memberOf zag1_ui_cv_03Index
getControllerName function()
return zag1_ui_cv_03Index
Is initially called once after the Controller has been instantiated It is the place where the UI is
constructed
Since the Controller is given to this method its event handlers can be attached right away
memberOf zag1_ui_cv_03Index
createContent function(oController)
create a lite button with an icon and a text
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010034
lite true
)placeAt(btn)
oButton3attachPress(oControllerdoFileDownload)
var oButton4 = new sapuicommonsButton(
text Refresh
icon imagesrefreshjpg
lite true
press function() var data = oTableval()
if(data == )
alert(no data found)
return
print(content)
print(DatArray)
if (data = )
alert(Funzt)
JSONToCSVConvertor(data CUSTOMER AMOUNT true)
)placeAt(btn)
jQuerysaprequire(sapuitableTable)
create table control with properties
var oTable = new sapuitableTable(
width 100
rowHeight 50
title Amount per Partner
selectionMode sapuitableSelectionModeNone
)
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Company Name
)
template new sapuicommonsTextView(
text CompanyName
)
sortProperty CompanyName
))
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010035
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Partner ID
)
template new sapuicommonsTextView(
text PartnerId
)
sortProperty PartnerId
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Postal Code
textAlign sapuicoreTextAlignEnd
)
template new sapuicommonsTextView(
text PostalCode
textAlign sapuicoreTextAlignEnd
)
sortProperty PostalCode
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text City
)
template new sapuicommonsTextView(
text City
)
sortProperty City
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Purchase ID
)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010036
template new sapuicommonsTextView(
text PurchaseOrderId
)
sortProperty Currency
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Lifecycle Status
)
template new sapuicommonsTextView(
text LifecycleStatus
)
sortProperty LifecycleStatus
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Gross Amount
)
template new sapuicommonsTextView(
text GrossAmount
)
sortProperty GrossAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Tax Amount
)
template new sapuicommonsTextView(
text TaxAmount
)
sortProperty TaxAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Amount Netto
)
template new sapuicommonsTextView(
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010037
text CM_NET_Amount_001
)
sortProperty CM_NET_Amount_001
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Currency
)
template new sapuicommonsTextView(
text Currency
)
sortProperty Currency
))
var oModel = new sapuimodelodataODataModel
(httpqperiorvmcldsr8000ZAG1_WS_001ZAG1_CV_001xsodata false)
oTablesetModel(oModel)
oTablebindRows(Amount)
return oTable
)
It wonacutet call the function or better said the action of the button works fine till to the point where it should call the
xsjsfile to generate the excel-file I wondered that in the ajax part the error- success- and complete-part will
be executed at the same time and not only one of this statements The message is 200 (The request has
succeeded The information returned with the response is dependent on the method used in the request)
Maybe you can see where my mistake is or whats going wrong
Iacuteve the developer edition on cloudshare (Hana Studio rev68 Server is on SPS05)
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010038
Andreacute
Thomas Jung in response to Samuel Tanor-Gyedu on page 38Feb 19 2014 523 AM
I dont think I can help you This appears to a question about how odata4j works not about XS I have no
experience with odata4j myself
Samuel Tanor-GyeduFeb 18 2014 913 AM
Hi Thomas
I have an odata service with this endpointhttpss5hanaxshanatrialondemandcomservicesUserxsodata
I am now trying to consume it from eclipse with the odata4j libraries
This is how I get the endpoint
public UserServiceOdata(String endpointUri)
thisendpointUri = endpointUri
ODataConsumerdumpresponseHeaders(true)
consumer = ODataConsumerscreate(endpointUri)
This is my method to add a user
public User addUser(User user)
consumercreateEntity(entitySet)properties(OPropertiesint32(propertyUserId
usergetId()))properties(OPropertiesstring(propertyUserName
usergetName()))properties(OPropertiesstring(propertyUserEmail usergetEmail()))execute()
return user
When I call addUser method I get an Error
Caused by javaxxmlstreamXMLStreamException ParseError at [rowcol][78253]
Message The reference to entity sourceUrl must end with the delimiter
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010039
When I use this endpoint httpss5hanaxshanatrialondemandcomservicesUsersvc everything works fine
With the httpss5hanaxshanatrialondemandcomservicesUserxsodata I get errors
Please I would be very grateful for assistance
Thanks in advance
Regards
Samuel
Thomas Jung in response to gentilini andre on page 39Feb 18 2014 431 AM
You have a fundamental misunderstanding here You are placing server side JavaScript code in your client
side UI5 application The function downloadExcel is something you need to execute on the server It needs to
be in an XSJS file and it is called from the client side via AJAX - as a REST service not as a local function
gentilini andreFeb 17 2014 451 PM
Hello Thomas
Thank you for this great How-To Guide
Iacutem pretty new in SAPUI5 and tried your export-sample in my little trial project but it doesnacutet work
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010040
My Button for this looks like
ltcodegt
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
lite true
press function() alert(oButton3getText())
downloadExcel()
ltcodegt
and the function for this action looks like
ltcodegt
function downloadExcel()
var body =
alert(drin)
print($query)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount tTax
Amount tNetto Amount tCurrency n
while(rsnext())
if(rsnext() == )
alert($responsesetBody( Failed to retrieve data ))
alert($responsestatus = $nethttpINTERNAL_SERVER_ERROR)
else
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010041
ltcodegt
Iacutem afraid and hope that you can help me
Kind regards
Andreacute
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1246 PM
gtIs there any restriction or development limitation in the XSJSLIB files
Thats a very general question Difficult to answer without any context
Vikas Madaan in response to Thomas Jung on page 41Feb 11 2014 1245 PM
Thanks Thomas
I think we are on same page
Once quick question that came to my mind Is there any restriction or development limitation in the XSJSLIB
files
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1230 PM
gtCould please help me in understanding in more advantagesdisadvantages for both techniques
Youve summarized it pretty well already
gtbecuase i dont want to use both the approaches
Even with the CRUD support and exits in XSODATA its still pretty hard to do 100 via XSODATA There are
still valid use cases for XSJS when you need custom body custom read processing job scheduling etc Its
good to try and use XSODATA whenever possible but I wouldnt automatically exclude the use of XSJS
Vikas MadaanFeb 11 2014 1008 AM
Hi Thomas
Thanks a lot for sharing useful information through various blogs
In my current project we are evaluating use of XSOData or XSJS applications I saw your videos like the one
mentioned below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010042
httpwwwsaphanacomdocsDOC-4376
Want i understood from various blog is this
From SP7 we can write exsits in the OData services and it is very easy to consume at the client side just like
any REST base service and from my understanding it is Scalable as well I would love to use XSOData always
becuase development effort is very less compare to XSJS and it is very easy to rampup the team on OData
related development objects
XSJS were as provide more control becuase of server side scripting becuase it allows development on the
server side using JavaScript Core APIs of SAP HANA Extended Application Services are therefore exposed
as JavaScript functions providing easy access to the HTTP Request and Response object as well database
access to execute SQL or call SQLScript Procedures It provide us control over the body format and and URL
parameter definition
Could please help me in understanding in more advantagesdisadvantages for both techniques
I am very keen to understand and also explain the same to team members becuase i dont want to use both the
approaches and even sometimes customer can also ask the same to us
Also If we are on SP6 then from my understanding XSJS provides us more capability in terms of complex
application Corrent me If i am wrong
Thanks
Regards
Vikas Madaan
Thomas Jung in response to Raghuveer Phull on page 42Feb 5 2014 312 PM
Yes there are videos on the CRUD features of XSODATA which were new in SP6
For more on CRUD support in SP6 see this video
oData CreateUpdateDelete Support in SAP HANA SPS6
For the extended support for XSJS exits in SP7 see this video
SAP HANA SPS 07 XSODATA Exits in XSJS
Raghuveer PhullFeb 5 2014 122 AM
Do you have an exampledocumentationvideo where you can write a service which will populate Hana DB
What I am asking for is a way for my external script to populate the DB tables i have created in Hana DB
Thomas Jung in response to reda miraoui on page 43Jan 29 2014 411 PM
The source code for the examples shown here are shipped as part of SHINE (SAP HANA Interactive
Education)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010043
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Vivek Singh Bhoj in response to reda miraoui on page 43Jan 29 2014 352 PM
Hi Reda
You can import Shine Content in HANA and then check all these source codes
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Regards
Vivek
reda miraoui in response to Thomas Jung on page Jan 29 2014 344 PM
Hey Thomas
Is it possible to download source code of your project from this HANA tutorial
Thanks
Reda
Thomas Jung in response to Abdul Hakim on page 43Nov 21 2013 1133 PM
Yes River can be used as an alternative and when activated it will generate Server Side JavaScript andor
SQLScript
Abdul Hakim in response to Thomas Jung on page 44Nov 21 2013 747 PM
Hi Thomas - Was going through blog regarding River (RDL)Just a question on this
When you say Programming language for HANA native development is Server side Javascript SQL SQL
ScriptOnce RDL is rolled out whether RDL can be used for native application development instead of Server
side Java script SQL SQL Script I am very much new to this stuff so appreciate if you can also help on
how to get started with Server Side Java script SQL SQL Script for HANA
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 30 2013 750 AM
Hi Thomas
Thanks for your response I am talking about more content on shine
thanks
Ashutosh
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010044
Baskar Gopalakrishnan in response to Thomas Jung on page 44Oct 30 2013 1249 AM
Hi Thomas
Im a SAP PI Middleware consultantSAP topic leader in XIPI heavily worked on Java related
Netweaver stack I have knowledge in ABAP but not worked heavily in abap I have enrolled your sap hana
native application development course I feel very interesting I did work heavily in java and javascript projects
using eclipse development tool Do you think if I invest my time in just native hana development and proceed
in HANA field is a good step I dont have BW experience either
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 819 PM
Thanks for the clarification Much appreciated
Thomas Jung in response to Abdul Hakim on page 44Oct 29 2013 120 PM
gtABAP Close to HANA means whether we can expect a similar 2 tier architecture similar to HANA XS in the
future or what does that mean
No it doesnt mean that ABAP will become a 2 tier architecture We will not move the ABAP VMKernel into
HANA itself It will remain a separate application server At least for the current plansforeseeable future What
he was referring to was bringing the programming models closer For instance the new 740 SP5 feature that
allows you to write SQLScript directly within an ABAP class method
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 650 AM
Thomas - Thanks for the clarificationMuch appreciatedI was listening to ABAP on HANA session by
Thorsten Schneider this year Teched and he was mentioning that SAP Plans to bring ABAP very close to
HANA in the coming future but not much details have been discussed in the sessionABAP Close to HANA
means whether we can expect a similar 2 tier architecture similar to HANA XS in the future or what does that
mean
Thanks
Hakim
Thomas Jung in response to Abdul Hakim on page 45Oct 28 2013 703 PM
gt whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the option is
recommended by SAP then kindly share the pros and cons of each of the item
Taken from the TechEd CD103 session slides
Guidance
bulluse ABAP for optimization of existing progams (in context of SAP Business Suite or BW)
bullconsider HANA Native Development for development of new applications which will solely run on SAP HANA
bullcombine ABAP and HANA Native Development to enrich existing applications (eg SAP HANA Live Fiori)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010045
ABAP
bullapplications follow 3-tier architecture
bullABAP is in general database agnostic but with release 74 optimized for SAP HANA
bullProgramming language ABAP ABAP OO with the option to use SAP HANA features
bullIDE eclipse-based ABAP Development Tools
HANA Native Development
bullapplications follow 2-tier architecture
bullHANA Native Development is SAP HANA specific and embedded in the database
bullProgramming language River server-side JavaScript SQLSQLScript
bullIDE eclipse-based SAP HANA Studio + web IDE
Thomas Jung in response to ashutosh dixit on page 45Oct 28 2013 701 PM
gtIs there any more demos for the SHINE
Im not exactly sure what you mean by that We are building additional content for SHINE that will be delivered
in SP7
Abdul HakimOct 28 2013 326 PM
Thomas - Let us say a customer is running SAP Netweaver 74 ABAP with HANA DB and they have HANA
extended service as wellIf the customer wants to do new developments then what is the recommendation
from SAP ie whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the
option is recommended by SAP then kindly share the pros and cons of each of the item (SAP Netweaver 74
ABAP Vs SAP HANA XS)
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 28 2013 221 PM
Hi Thomas
Thanks a lot for your its working now
Is there any more demos for the SHINE
Thanks
Ashutosh
Thomas Jung in response to ashutosh dixit on page 46Oct 25 2013 809 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010046
As this content is now standard in SP6 as part of SHINE (SAP HANA INteractive Education) there also some
setup instructions on helpsapcom
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Basic points to check - have you generated the synonyms in the data generator Ran the data generator to
create some data Have the role assigned Added client 001 to your user profile
ashutosh dixitOct 24 2013 130 PM
Hi Thomas
Amazing blog - once again Thomas thanks
I have been following you for many days attended your OPEN SAP course also
That was an amazing course for new learner like me
One of our client is looking forward for XS based search Application identical to what you have created in your
DEMO
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010047
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010048
But I am not able to fetch the data on blank HTML page is coming with no data
If there is any step by step document related to this please help in getting that
Any help will be highly appreciated
Thanks
Ashutosh
Naveen KumarSep 26 2013 1130 AM
Good Document
Heber FabianoAug 27 2013 323 PM
Great content as always Keep sharing with us
Thomas Jung in response to Orel Stringa on page 48Aug 27 2013 147 PM
This is currently not possible The CORS support is for all origins We dont yet have the feature to maintain a
whitelist of CORS origins
Orel Stringa in response to Thomas Jung on page Aug 27 2013 801 AM
Hi Thomas
nice to see that SAP has made it possible with SP6 to specify cross origin resource sharing (CORS) support
via the xsaccess file SP6 HANA development guide has example of how to specify CORS support
I have build an XS application and would like to serve SAPUI5 on a diffhost than XSHANA
How can I specify that I would like to allow cross origin access restricted to certain domain(s) only
Is there a special keyword syntax for specifying that
Thank yoi
Orel
Vijay UthayakumarAug 27 2013 131 AM
Highly informative amp digestible Fantastic work
Jerry WangAug 1 2013 955 AM
Hi Tomas
Thank you
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010049
Jerry
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 644 PM
JSLint checks are very strict and often produce syntax errors for items that just stylistic and wont actually
cause an error upon activation or runtime You can either ignore the JSLint errors or deactivate JSLint for this
project in these cases However it might also be an indication that the JavaScript code you are trying to import
isnt compatible with Strict mode
httpsdevelopermozillaorgen-USdocsWebJavaScriptReferenceFunctions_and_function_scope
Strict_mode
Milan Vrozina in response to Thomas Jung on page 49Jul 21 2013 624 PM
Thanks for clarification I thought there would be some kind of import
But anyway in case of this specific library I have some problems with JSLint validation when I do cut and paste
of the original code
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 343 PM
What kind of problem are you having using this library Strict mode JavaScript which doesnt try to access the
DOM Window or other client side specific objects should work in Server Side XSJS Generally if you have a
library you just cut and paste into your XSJS or an XSJSLIB file and then call the functions from your code
Milan VrozinaJul 21 2013 339 PM
Hello
first and foremost thank you for perfect openSAP classes related to HANA development and for this blog as
well
I have one question related to server-side javascript You mentioned in course that is possible to use 3rd party
libraries or reuse 3rd party code But I cant find a possible way how to import 3rd party javascript library -as
is- to server and use it For example I would like to use JSZip library to zip some file before sending it to client
from xsjs application Is that possible Thank you
Chandrashekhar MahajanJul 3 2013 734 PM
This is excellent blog Now HANA XS is very much clear to me
Mohan krishnaJul 1 2013 144 PM
WOW - great blog Thomas This will be very helpful in understanding SAP hana Good Job
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010050
Abdul Hakim in response to Thomas Jung on page 50Jun 27 2013 833 PM
Thanks for the clarification
Thomas Jung in response to Abdul Hakim on page 50Jun 27 2013 659 PM
HANA Extended Application Services uses SQLScript and JavaScript as its two primary programming
languages
gtwhether the current SAP Business suite based on ABAP will be completely migrated to HANA service
No The Business Suite already runs on HANA but still via the ABAP application server It will continue to
leverage HANA via a combination of enhancements to ABAP and utilizing some of the technologies described
in this blog
gtAlso whether ABAP can be used to built application in HANA extended services
No There is no ABAP language container in HANA Extended Application Services
Abdul HakimJun 27 2013 405 PM
Hi Thomas - What is the programming language used for HANA Extended application services
As HANA is more than a database ie application platform by itself and as you mentioned that more and more
applications will be built on HANA i have question as how the future SAP ERP system looks likewhether the
current SAP Business suite based on ABAP will be completely migrated to HANA service in the future or SAP
ABAP server will continue to evolve and receive focus investment from SAP Also whether ABAP can be used
to built application in HANA extended services Your thoughts
Thanks
Abdul Hakim
Thomas Jung in response to Ravindra Channe on page 50Jun 11 2013 830 PM
Yes it is still planned However we are still a couple of weeks away and Ive not seen the final installers to say
for certain its there
Ravindra ChanneJun 11 2013 815 PM
Hi Thomas
Thanks for a wonderful and very informative blog Is there any update on 32 bit REGI file
Is it expected along with SPS6
Regards
Ravi
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010051
Thomas Jung in response to Amanda Rzepka on page Jun 7 2013 942 PM
gtCan the XS Services be used in a BW on HANA Scenario
Yes XS is part of ALL HANA systems You should check and make sure you are licensed for direct access to
the underlying HANA instance however
Thomas Jung in response to Holger Schimanski on page Jun 7 2013 941 PM
gtIs there a similar library which could be used in XS Engine
The XSODATA development object is similar We also have higher level frameworks for XMLA and Search
Services (InA) You can expect more such high level frameworks to be added to the HANA Extended
Application Services in the future
Thomas Jung in response to Manav Mehra on page Jun 7 2013 939 PM
Have you used something like the Chrome developer tools to see see if you are getting any client side
javascript errors or to see if the request to your xsodata service is successful
Thomas Jung in response to Christian Hufnagl on page 52Jun 7 2013 938 PM
It will ship as non-automatic content in SPS6 (all systems will have it and it just needs to be imported) The
delivery units are also part of this weeks updates to the Cloudshare and AWS developer center images They
are also available for download as part of the content of the openSAP course
Thomas Jung in response to Matthew Pickell on page 51Jun 7 2013 937 PM
CORS support will come with SPS6 at the end of June
Thomas Jung in response to Jeroen Custers on page 51Jun 7 2013 936 PM
gtWill this bug be fixed in HANA ver 56
Personally Ive still experienced this bug in SPS6 internal builds Must be a tricky one to find Luckily the
workaround of closing and reopening isnt too difficult Just annoying This also probably makes the bug low
priority
Jeroen Custers in response to Vivek Singh Bhoj on page 52Jun 7 2013 411 PM
This issue also occurs on rev56
Matthew PickellJun 7 2013 258 PM
Thomas
Has CORS been included in a release yet
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010052
Vivek Singh Bhoj in response to Chandra Edem on page 52Jun 5 2013 601 AM
Hi Chandra
Date for Week1 Assignment has been extended till June 11
So you can give Week 1 Assignment now
Christian HufnaglJun 4 2013 543 PM
Hi Thomas
thank you for the interesting tutorial
Can you tell me whether it is possible to download the source code of the ldquoPutting it all togetherrdquovideo And if yes Where can I download itThanks
Christoph
Vivek Singh BhojJun 4 2013 1116 AM
Hi Thomas
Thanks for OpenSAP classes
Your Youtube Account also have very good exercises
IN OpenSAP Week 2 Unit 3 tutorial after assigning admin role to my user Id i am not able to see sequences
synonyms triggers under my schema or any other schema i am only able to see Column Views Procedures
Tables and Views
Though now i am able to insert data into my created table
Can you let me know how i will be able to see Sequences under my schema without removing the admin role
I am using HANA revision 52
Got to know from OpenSAP that
This is a known issue and the only way that Ive seen to fix it is to actually close the studio and open it again
then refresh the node
Cheers
Rich Heilman
SAP HANA Product Management
Will this bug be fixed in HANA ver 56
Chandra Edem in response to Thomas Jung on page 53Jun 4 2013 646 AM
Thomas
I registered for OpenSAP course Introduction to Software Development on SAP HANA on June 2 900PM
I didnt know that it is going to end WEEK1 assignment test on 632013 300PM Is there any way can take
that WEEK1 Assignment Test
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010053
Thanks
Chandra
Thomas Jung in response to Alexander Bauer on page Jun 3 2013 856 PM
SAPUI5 gets updated auutomatically when you apply HANA revisions There is no additional download or
update needed
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010022
Thomas Jung in response to Tarasankar Banerjee on page 22Oct 30 2014 152 PM
Since SPS06 its possible to use outbound HTTP destinations and to call out to external services using XSJS
Thomas Jung in response to Tarasankar Banerjee on page 22Oct 30 2014 150 PM
gtSo when the program runs in server would it automatically consider the OS user credentials
No It doesnt automatically use anything You have to specific the user and password that you want to use for
the proxy Although many proxy servers dont require a username and password
Tarasankar Banerjee in response to Thomas Jung on page 23Oct 30 2014 707 AM
Hi Thomas
Just watched the video you shared above Thanks a lot for it It is really informative and helpful
Regards
Tarasankar
Tarasankar Banerjee in response to Tarasankar Banerjee on page 22Oct 30 2014 346 AM
Got answer for the second point SAP HANA XS Administration Tool is the place to configure Proxy settings
Regards
Tarasankar
Tarasankar Banerjee in response to Tarasankar Banerjee on page 22Oct 29 2014 314 PM
Dear Thomas
another question is that does the proxy settings in the HttpDestination refer to the OS user of the HANA
server We specify useProxy as true and authType as basic in the HttpDestination but not maintain any
user credentials So when the program runs in server would it automatically consider the OS user credentials
Thanks
Regards
Tarasankar
Tarasankar Banerjee in response to Thomas Jung on page 23Oct 29 2014 132 PM
Thanks Thomas I am currently checking this option only
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010023
My current requirement is to fetch Weather Data and Social Media data from various OData services and store
them in HANA for further analysis What might be the best way for this I am currently checking the option of
creating an XS application which would connect to the external services fetch the data and save that in HANA
using DB Connection Is this the best way Or should we try to use JAVA or some other way
Your valuable suggestions are most welcome Thanks
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 23Oct 29 2014 1256 PM
gtHowever is it possible to consume XSODATA service from XSJS instead of using DB Connection
You can via an outbound HTTP destination although I certainly wouldnt recommend it It would be rather
complex and not well performing
gtAlso is it possible to consume data from external OData services for weather data social media data etc from
XSJS
Sure with the same Outbound HTTP Connectivity
httpswwwyoutubecomwatchv=fWirvj9l7eY
Maintaining HTTP Destinations - SAP HANA Developer Guide - SAP Library
Tarasankar BanerjeeOct 29 2014 1119 AM
Dear Thomas
Thanks for the great blog
I am able to connect to Database and execute queries from XSJS service However is it possible to consume
XSODATA service from XSJS instead of using DB Connection
Also is it possible to consume data from external OData services for weather data social media data etc from
XSJS
If possible it would be great if you could provide some code sample or guidelines
Thanks
Regards
Tarasankar
Thomas Jung in response to Weiping Lu on page 24Sep 25 2014 833 AM
Please refer to service note 1849775
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010024
httpservicesapcomsapsupportnotes1849775
I believe it will address your issue
Weiping LuSep 24 2014 519 PM
Hi Tom
Great post and videos I have a tough issue calling a HANA procedure from XS takes gt 5min but from HANA
studio lt 1 min Were using Amazon AWS rev 70 and 73 Any help will be greatly appreciated
Thanks
WPL
Thomas Jung in response to Su Srikanth on page 24Aug 11 2014 253 PM
You transport XSODATA services like you would any other repository content - via a Delivery Unit
Su SrikanthAug 11 2014 750 AM
Hi Thomas
Great blog
Ive a query here - we create the odata services(andor URLs created to view in the web browser) in
development environment now if we have to transport it to the quality andor production environment how
can we do this - is the same as importexport or is there any specific way to do please help with any useful
pointers
Many thanks as always
Su
Thomas Jung in response to ARSHAD SHAIKH on page 24May 15 2014 231 PM
Ive never written any blogs on calculation views I dont cover that topic That is why I suggested you ask your
question in the proper SCN forum
Although looking at your your above SQL Statement I dont see why you couldnt do this directly in XSODATA
off of the table STATUS without the need for the calculation view or the SQLScript Procedure
ARSHAD SHAIKH in response to Thomas Jung on page 25May 15 2014 1154 AM
Hello Thomas
I am new to hana Please suggest me the blogs of you related to calculation view that calling
procedures(procedures have out parameter)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010025
I am trying to fetch the result of procedure in calc view and want to create odata service for that calculation
view
procedure code goes like this
---------------------------------------
CREATE PROCEDURE TWEETS_TODAY(OUT OP BIGINT)
language SQLSCRIPT sql security invoker default schema SOCIAL360 reads sql data as
BEGIN
SELECT COUNT() INTO OP FROM SOCIAL360STATUS WHERE CREATED_AT = CURRENT_DATE
END
calc view code goes like this
----------------------------------------
Begin Procedure Script
BEGIN
DECLARE OP BIGINT
CALL SOCIAL360TWEETS_TODAY(OPvar_out)
END End Procedure Script
Thanks
-Arshad
Thomas Jung in response to ARSHAD SHAIKH on page 25May 15 2014 944 AM
Your question seems to have no relation to the content in this blog Please consider instead asking general
HANA questions in the appropriate SCN Forum
ARSHAD SHAIKHMay 15 2014 917 AM
Hi Thomas
I want to call procedures in calculation view (procedures have out parameter)
Please suggest me step by step procedure with example and supporting documents
Thanks
ARSHAD SHAIKH
Henrique Pinto in response to Blair Krotenko on page 26Apr 16 2014 711 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010026
Hmm not really sure of that I see it but that might be because Im an employee
But the NET development partner I was working with was not enrolled in any kind of beta testing program and
they were able to download it so I guess you should as well
Make sure to go in the Installation and Upgrades menu and not the Support Packages and Patches
Go to httpservicesapcomswdc -gt Installations and Upgrades -gt Browse our Download Catalog -gt SAP In-
Memory (SAP HANA) -gt SAP HANA ADONET 10
Best regards
Henrique
Blair Krotenko in response to Henrique Pinto on page 26Apr 16 2014 656 PM
Thanks for the info Henrique but I cant find it I dont know if it is an authorization issue or do we need to be a
ramp-up customer to dl and use a beta product
Thanks
Blair
Henrique Pinto in response to Thomas Jung on page 27Apr 16 2014 614 PM
The ADONET provider is available for download in the SAP Service Marketplace (in beta edition so far)
Thomas Jung in response to Kamal Jain on page 26Apr 16 2014 514 PM
For general OData structure and syntax I find that the Odataorg website is very helpful For example on this
topic
httpwwwodataorgdocumentationodata-version-2-0uri-conventions
The syntax of a $expand query option is a comma-separated list of Navigation Properties Additionally each
Navigation Property can be followed by a forward slash and another Navigation Property to enable identifying a
multi-level relationship
The page also has some sample URLs
Kamal JainApr 16 2014 536 AM
Dear Thomas
I agree that we need to pass all the associations in the expand I tried with some of options but was not
through
Now i just tried with below syntax and able to achive Thx
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010027
httpdewdftzld025pgdevsapcorp8000DTHCPXSZPMIS_PRO_ACTUALxsodata
ZPROHEADER(PR07_000002)$expand=ZACTUZEMPD
Regards
Kamal Jain
Thomas Jung in response to Blair Krotenko on page 27Apr 15 2014 623 PM
We do plan to release an ADONET provider specific to HANA in the near future This would probably be the
best option for consumption from NET Until then I would think that ODBC is probably the next best option It
gives you generally easy portability from already existing database code You could consume OData as well
although that is more generally consumed from the UI layer itself It guess it somewhat depends upon where
you are calling the service from in your NET application
Blair KrotenkoApr 15 2014 409 PM
Hi Thomas
We are looking at consuming HANA data in a NET application and from what I can see there are 2 options -
OData and ODBC It seems to me that OData might be the better option when consuming HANA data in an XS
application while ODBC might be the better option for NET What are your thoughts Is there a paper on this
subject I havent been able to find a comparison document for this Are there any security caveats to be aware
of for these options
Thanks
Blair
Thomas Jung in response to Kamal Jain on page 27Apr 15 2014 136 PM
You have to list both associations in the expand on the URL if you want both relationships to be processed
Kamal JainApr 15 2014 1249 PM
Hi Thomas
Thx for valuable and useful information
I have an query regarding XS Odata service creation for more than 2 tables and get all the data in one
command
There is req in which service needs to be created for 3 tables to get data from all these
First table has Project ID as key second table has composite
ProjectID and Employee Id as key and third table has Employee id as
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010028
key
So if I create navigation for first 2 tables based on project id and use expand comand than its working fine and I
can see data of both the tables
Further if I add navigation for third table also as below then below expand is displaying data for first two tables
only Pls share how to use expand command in this case if possible to get all tables data based on project id
How to use navigation ZEMPD here
httpdewdftzld025pgdevsapcorp8000DTHCPXSZPMIS_PRO_ACTUALxsodata
ZPROHEADER(PR07_000002)$expand=ZACTUamp
service namespace
DTHCPXS
DTHCPDTHCPDBHCP_PROJECT_HEADER
as ZPROHEADER
navigates (PROJECT as
ZACTU)
DTHCPDTHCPDBHCPT_ZPMIS_ACTUAL
as ZACTU
navigates (EMPLOYEE as
ZEMPD )
DTHCPDTHCPDBHCP_ZPMIS_RES_MASTER
as ZEMPD
association PROJECT principal
ZPROHEADER(PROJECTID)
multiplicity 1 dependent
ZACTU(PROJECTID) multiplicity
association EMPLOYEE principal
ZACTU(EMPLOYEEID)
multiplicity 1 dependent
ZEMPD(EMPLOYEEID) multiplicity
1
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010029
Pls suggest if there is anything to add or correct in XS odata service syntax above
Regards
Kamal Jain
Vikas Madaan in response to Thomas Jung on page 29Apr 14 2014 458 PM
Thanks Thomas
Under which component
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 29Apr 14 2014 450 PM
No this isnt a known issue Ive seen Nor can I recreate the problem in my system No you cant maintain the
authentication in XSHTTPDEST itself It intentionally must be set in XSADMIN tool I can really only suggest
that you open a support ticket
Vikas MadaanApr 14 2014 431 PM
Hi Thomas
I am trying to pull data from SAP system onto HANA Database using XSJOB files I am calling RFC enabled
function modules over HTTP request It helps me replicating the real time ECC data onto HANA as well with
back ground jobs
I am facing one problem in the XSHTTPDEST file I am able to create and activate the file using studio and this
file is even visible in the web based XS administration tool But in the web based tool when i provide user and
password for basic authotication then system just clears the user id and password when i try to save This the
reason our HTTP requests are getting failed and below is the response we are getting in the response body
lthtmlgtltheadgtlttitlegtLogon Error Messagelttitlegt
Is this known issue or we are missing something Is it possible to provide user and password in the
XSHTTPDEST file Is there any particular syntax
I checked and i have the required authorizations as well develper Guide
Please help
Regards
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010030
Vikas Madaan
Abdul HakimFeb 22 2014 359 AM
Hi Thomas - Any recommended book or resource to learn and master Server Side Javascript There were
many books available in the market but as a beginner need to know the right resource book to start with and
master this stuffAlso whether SAP plan to conduct any training to teach Server Side Javascript similar to other
standard training offerings
Thanks
Hakim
Samuel Tanor-GyeduFeb 20 2014 839 AM
Thanks Thomas
I will definitely have a look at SHINE
Thomas Jung in response to gentilini andre on page 30Feb 19 2014 422 PM
Difficult to say what is wrong I several things which are different than our sample that does this You are using
a POST for instance instead of a GET However if you are gettting a 200 then I assume the service call is
correct In client side tools (like Chrome Developer Tools) you should be able to see the response object from
the call
However what I would really recommend is that you study the SHINE content (SAP HANA Interactive
Education) There is already a sample application which does this in SHINE Also it has some special
JavaScript in the UI to handle the file attachment via AXAJ call Perhaps that is the part you are missing
You can read more about SHINE here It is also included already installed in the latest version of the HANA
Developer Center trial image (SP7 based)
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
gentilini andreFeb 19 2014 325 PM
Hi Thomas
well I followed your hints but it still donacutet work
I created a xsjs File like below
function downloadExcel()
try
var body =
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010031
alert(drin)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
alert(drusse)
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount
tTax Amount tNetto Amount tCurrency n
while(rsnext())
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
catch (e)
alert(db conn funktioniert nicht)
var a = $requestparametersget(cmd)
$responsesetBody(Invalid Command +a)
switch (a)
case doex
$responsesetBody(Invalid Command +a)
alert(filedownload)
thisdownloadExcel()
break
default
$responsestatus = $nethttpINTERNAL_SERVER_ERROR
$responsesetBody(Invalid Command +a)
The Controllerjs File
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010032
doFileDownload function (oEvent)
jQuerysaprequire(sapuicommonsMessageBox)
sapuicommonsMessageBoxshow(Export Starten sapuicommonsMessageBoxIconconfirm
Information)
sapuicommonsMessageBoxconfirm(Export starteninform Confirmation)
return false
function inform(rValue)
alert (drinnnnne)
var aurl = FileDownloadxsjscmd=doex
if(rValue) If User presses Ok
alert(aurl)
jQueryajax(
url aurl
method POST
dataType json
datacmddoex
success sapuicommonsMessageBoxalert(Export wird ausgefuumlhrtConfirmation)
errorfunction onErrorCall(jqXHR textStatus errorThrown)
alert(jqXHRstatus)
sapuicommonsMessageBoxshow(jqXHRstatus
ERROR
Error in calling Service )
return
complete sapuicommonsMessageBoxalert(Export Erfolgreich
abgeschlossenConfirmation)
)
return false
else If the user presses Cancel
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010033
sapuicommonsMessageBoxalert(Vorgang abgebrochenNotification)
)
at last but not least the view
sapuijsview(zag1_ui_cv_03Index
Specifies the Controller belonging to this View
In the case that it is not implemented or that null is returned this View does not have a Controller
memberOf zag1_ui_cv_03Index
getControllerName function()
return zag1_ui_cv_03Index
Is initially called once after the Controller has been instantiated It is the place where the UI is
constructed
Since the Controller is given to this method its event handlers can be attached right away
memberOf zag1_ui_cv_03Index
createContent function(oController)
create a lite button with an icon and a text
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010034
lite true
)placeAt(btn)
oButton3attachPress(oControllerdoFileDownload)
var oButton4 = new sapuicommonsButton(
text Refresh
icon imagesrefreshjpg
lite true
press function() var data = oTableval()
if(data == )
alert(no data found)
return
print(content)
print(DatArray)
if (data = )
alert(Funzt)
JSONToCSVConvertor(data CUSTOMER AMOUNT true)
)placeAt(btn)
jQuerysaprequire(sapuitableTable)
create table control with properties
var oTable = new sapuitableTable(
width 100
rowHeight 50
title Amount per Partner
selectionMode sapuitableSelectionModeNone
)
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Company Name
)
template new sapuicommonsTextView(
text CompanyName
)
sortProperty CompanyName
))
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010035
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Partner ID
)
template new sapuicommonsTextView(
text PartnerId
)
sortProperty PartnerId
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Postal Code
textAlign sapuicoreTextAlignEnd
)
template new sapuicommonsTextView(
text PostalCode
textAlign sapuicoreTextAlignEnd
)
sortProperty PostalCode
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text City
)
template new sapuicommonsTextView(
text City
)
sortProperty City
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Purchase ID
)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010036
template new sapuicommonsTextView(
text PurchaseOrderId
)
sortProperty Currency
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Lifecycle Status
)
template new sapuicommonsTextView(
text LifecycleStatus
)
sortProperty LifecycleStatus
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Gross Amount
)
template new sapuicommonsTextView(
text GrossAmount
)
sortProperty GrossAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Tax Amount
)
template new sapuicommonsTextView(
text TaxAmount
)
sortProperty TaxAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Amount Netto
)
template new sapuicommonsTextView(
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010037
text CM_NET_Amount_001
)
sortProperty CM_NET_Amount_001
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Currency
)
template new sapuicommonsTextView(
text Currency
)
sortProperty Currency
))
var oModel = new sapuimodelodataODataModel
(httpqperiorvmcldsr8000ZAG1_WS_001ZAG1_CV_001xsodata false)
oTablesetModel(oModel)
oTablebindRows(Amount)
return oTable
)
It wonacutet call the function or better said the action of the button works fine till to the point where it should call the
xsjsfile to generate the excel-file I wondered that in the ajax part the error- success- and complete-part will
be executed at the same time and not only one of this statements The message is 200 (The request has
succeeded The information returned with the response is dependent on the method used in the request)
Maybe you can see where my mistake is or whats going wrong
Iacuteve the developer edition on cloudshare (Hana Studio rev68 Server is on SPS05)
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010038
Andreacute
Thomas Jung in response to Samuel Tanor-Gyedu on page 38Feb 19 2014 523 AM
I dont think I can help you This appears to a question about how odata4j works not about XS I have no
experience with odata4j myself
Samuel Tanor-GyeduFeb 18 2014 913 AM
Hi Thomas
I have an odata service with this endpointhttpss5hanaxshanatrialondemandcomservicesUserxsodata
I am now trying to consume it from eclipse with the odata4j libraries
This is how I get the endpoint
public UserServiceOdata(String endpointUri)
thisendpointUri = endpointUri
ODataConsumerdumpresponseHeaders(true)
consumer = ODataConsumerscreate(endpointUri)
This is my method to add a user
public User addUser(User user)
consumercreateEntity(entitySet)properties(OPropertiesint32(propertyUserId
usergetId()))properties(OPropertiesstring(propertyUserName
usergetName()))properties(OPropertiesstring(propertyUserEmail usergetEmail()))execute()
return user
When I call addUser method I get an Error
Caused by javaxxmlstreamXMLStreamException ParseError at [rowcol][78253]
Message The reference to entity sourceUrl must end with the delimiter
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010039
When I use this endpoint httpss5hanaxshanatrialondemandcomservicesUsersvc everything works fine
With the httpss5hanaxshanatrialondemandcomservicesUserxsodata I get errors
Please I would be very grateful for assistance
Thanks in advance
Regards
Samuel
Thomas Jung in response to gentilini andre on page 39Feb 18 2014 431 AM
You have a fundamental misunderstanding here You are placing server side JavaScript code in your client
side UI5 application The function downloadExcel is something you need to execute on the server It needs to
be in an XSJS file and it is called from the client side via AJAX - as a REST service not as a local function
gentilini andreFeb 17 2014 451 PM
Hello Thomas
Thank you for this great How-To Guide
Iacutem pretty new in SAPUI5 and tried your export-sample in my little trial project but it doesnacutet work
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010040
My Button for this looks like
ltcodegt
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
lite true
press function() alert(oButton3getText())
downloadExcel()
ltcodegt
and the function for this action looks like
ltcodegt
function downloadExcel()
var body =
alert(drin)
print($query)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount tTax
Amount tNetto Amount tCurrency n
while(rsnext())
if(rsnext() == )
alert($responsesetBody( Failed to retrieve data ))
alert($responsestatus = $nethttpINTERNAL_SERVER_ERROR)
else
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010041
ltcodegt
Iacutem afraid and hope that you can help me
Kind regards
Andreacute
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1246 PM
gtIs there any restriction or development limitation in the XSJSLIB files
Thats a very general question Difficult to answer without any context
Vikas Madaan in response to Thomas Jung on page 41Feb 11 2014 1245 PM
Thanks Thomas
I think we are on same page
Once quick question that came to my mind Is there any restriction or development limitation in the XSJSLIB
files
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1230 PM
gtCould please help me in understanding in more advantagesdisadvantages for both techniques
Youve summarized it pretty well already
gtbecuase i dont want to use both the approaches
Even with the CRUD support and exits in XSODATA its still pretty hard to do 100 via XSODATA There are
still valid use cases for XSJS when you need custom body custom read processing job scheduling etc Its
good to try and use XSODATA whenever possible but I wouldnt automatically exclude the use of XSJS
Vikas MadaanFeb 11 2014 1008 AM
Hi Thomas
Thanks a lot for sharing useful information through various blogs
In my current project we are evaluating use of XSOData or XSJS applications I saw your videos like the one
mentioned below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010042
httpwwwsaphanacomdocsDOC-4376
Want i understood from various blog is this
From SP7 we can write exsits in the OData services and it is very easy to consume at the client side just like
any REST base service and from my understanding it is Scalable as well I would love to use XSOData always
becuase development effort is very less compare to XSJS and it is very easy to rampup the team on OData
related development objects
XSJS were as provide more control becuase of server side scripting becuase it allows development on the
server side using JavaScript Core APIs of SAP HANA Extended Application Services are therefore exposed
as JavaScript functions providing easy access to the HTTP Request and Response object as well database
access to execute SQL or call SQLScript Procedures It provide us control over the body format and and URL
parameter definition
Could please help me in understanding in more advantagesdisadvantages for both techniques
I am very keen to understand and also explain the same to team members becuase i dont want to use both the
approaches and even sometimes customer can also ask the same to us
Also If we are on SP6 then from my understanding XSJS provides us more capability in terms of complex
application Corrent me If i am wrong
Thanks
Regards
Vikas Madaan
Thomas Jung in response to Raghuveer Phull on page 42Feb 5 2014 312 PM
Yes there are videos on the CRUD features of XSODATA which were new in SP6
For more on CRUD support in SP6 see this video
oData CreateUpdateDelete Support in SAP HANA SPS6
For the extended support for XSJS exits in SP7 see this video
SAP HANA SPS 07 XSODATA Exits in XSJS
Raghuveer PhullFeb 5 2014 122 AM
Do you have an exampledocumentationvideo where you can write a service which will populate Hana DB
What I am asking for is a way for my external script to populate the DB tables i have created in Hana DB
Thomas Jung in response to reda miraoui on page 43Jan 29 2014 411 PM
The source code for the examples shown here are shipped as part of SHINE (SAP HANA Interactive
Education)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010043
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Vivek Singh Bhoj in response to reda miraoui on page 43Jan 29 2014 352 PM
Hi Reda
You can import Shine Content in HANA and then check all these source codes
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Regards
Vivek
reda miraoui in response to Thomas Jung on page Jan 29 2014 344 PM
Hey Thomas
Is it possible to download source code of your project from this HANA tutorial
Thanks
Reda
Thomas Jung in response to Abdul Hakim on page 43Nov 21 2013 1133 PM
Yes River can be used as an alternative and when activated it will generate Server Side JavaScript andor
SQLScript
Abdul Hakim in response to Thomas Jung on page 44Nov 21 2013 747 PM
Hi Thomas - Was going through blog regarding River (RDL)Just a question on this
When you say Programming language for HANA native development is Server side Javascript SQL SQL
ScriptOnce RDL is rolled out whether RDL can be used for native application development instead of Server
side Java script SQL SQL Script I am very much new to this stuff so appreciate if you can also help on
how to get started with Server Side Java script SQL SQL Script for HANA
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 30 2013 750 AM
Hi Thomas
Thanks for your response I am talking about more content on shine
thanks
Ashutosh
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010044
Baskar Gopalakrishnan in response to Thomas Jung on page 44Oct 30 2013 1249 AM
Hi Thomas
Im a SAP PI Middleware consultantSAP topic leader in XIPI heavily worked on Java related
Netweaver stack I have knowledge in ABAP but not worked heavily in abap I have enrolled your sap hana
native application development course I feel very interesting I did work heavily in java and javascript projects
using eclipse development tool Do you think if I invest my time in just native hana development and proceed
in HANA field is a good step I dont have BW experience either
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 819 PM
Thanks for the clarification Much appreciated
Thomas Jung in response to Abdul Hakim on page 44Oct 29 2013 120 PM
gtABAP Close to HANA means whether we can expect a similar 2 tier architecture similar to HANA XS in the
future or what does that mean
No it doesnt mean that ABAP will become a 2 tier architecture We will not move the ABAP VMKernel into
HANA itself It will remain a separate application server At least for the current plansforeseeable future What
he was referring to was bringing the programming models closer For instance the new 740 SP5 feature that
allows you to write SQLScript directly within an ABAP class method
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 650 AM
Thomas - Thanks for the clarificationMuch appreciatedI was listening to ABAP on HANA session by
Thorsten Schneider this year Teched and he was mentioning that SAP Plans to bring ABAP very close to
HANA in the coming future but not much details have been discussed in the sessionABAP Close to HANA
means whether we can expect a similar 2 tier architecture similar to HANA XS in the future or what does that
mean
Thanks
Hakim
Thomas Jung in response to Abdul Hakim on page 45Oct 28 2013 703 PM
gt whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the option is
recommended by SAP then kindly share the pros and cons of each of the item
Taken from the TechEd CD103 session slides
Guidance
bulluse ABAP for optimization of existing progams (in context of SAP Business Suite or BW)
bullconsider HANA Native Development for development of new applications which will solely run on SAP HANA
bullcombine ABAP and HANA Native Development to enrich existing applications (eg SAP HANA Live Fiori)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010045
ABAP
bullapplications follow 3-tier architecture
bullABAP is in general database agnostic but with release 74 optimized for SAP HANA
bullProgramming language ABAP ABAP OO with the option to use SAP HANA features
bullIDE eclipse-based ABAP Development Tools
HANA Native Development
bullapplications follow 2-tier architecture
bullHANA Native Development is SAP HANA specific and embedded in the database
bullProgramming language River server-side JavaScript SQLSQLScript
bullIDE eclipse-based SAP HANA Studio + web IDE
Thomas Jung in response to ashutosh dixit on page 45Oct 28 2013 701 PM
gtIs there any more demos for the SHINE
Im not exactly sure what you mean by that We are building additional content for SHINE that will be delivered
in SP7
Abdul HakimOct 28 2013 326 PM
Thomas - Let us say a customer is running SAP Netweaver 74 ABAP with HANA DB and they have HANA
extended service as wellIf the customer wants to do new developments then what is the recommendation
from SAP ie whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the
option is recommended by SAP then kindly share the pros and cons of each of the item (SAP Netweaver 74
ABAP Vs SAP HANA XS)
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 28 2013 221 PM
Hi Thomas
Thanks a lot for your its working now
Is there any more demos for the SHINE
Thanks
Ashutosh
Thomas Jung in response to ashutosh dixit on page 46Oct 25 2013 809 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010046
As this content is now standard in SP6 as part of SHINE (SAP HANA INteractive Education) there also some
setup instructions on helpsapcom
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Basic points to check - have you generated the synonyms in the data generator Ran the data generator to
create some data Have the role assigned Added client 001 to your user profile
ashutosh dixitOct 24 2013 130 PM
Hi Thomas
Amazing blog - once again Thomas thanks
I have been following you for many days attended your OPEN SAP course also
That was an amazing course for new learner like me
One of our client is looking forward for XS based search Application identical to what you have created in your
DEMO
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010047
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010048
But I am not able to fetch the data on blank HTML page is coming with no data
If there is any step by step document related to this please help in getting that
Any help will be highly appreciated
Thanks
Ashutosh
Naveen KumarSep 26 2013 1130 AM
Good Document
Heber FabianoAug 27 2013 323 PM
Great content as always Keep sharing with us
Thomas Jung in response to Orel Stringa on page 48Aug 27 2013 147 PM
This is currently not possible The CORS support is for all origins We dont yet have the feature to maintain a
whitelist of CORS origins
Orel Stringa in response to Thomas Jung on page Aug 27 2013 801 AM
Hi Thomas
nice to see that SAP has made it possible with SP6 to specify cross origin resource sharing (CORS) support
via the xsaccess file SP6 HANA development guide has example of how to specify CORS support
I have build an XS application and would like to serve SAPUI5 on a diffhost than XSHANA
How can I specify that I would like to allow cross origin access restricted to certain domain(s) only
Is there a special keyword syntax for specifying that
Thank yoi
Orel
Vijay UthayakumarAug 27 2013 131 AM
Highly informative amp digestible Fantastic work
Jerry WangAug 1 2013 955 AM
Hi Tomas
Thank you
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010049
Jerry
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 644 PM
JSLint checks are very strict and often produce syntax errors for items that just stylistic and wont actually
cause an error upon activation or runtime You can either ignore the JSLint errors or deactivate JSLint for this
project in these cases However it might also be an indication that the JavaScript code you are trying to import
isnt compatible with Strict mode
httpsdevelopermozillaorgen-USdocsWebJavaScriptReferenceFunctions_and_function_scope
Strict_mode
Milan Vrozina in response to Thomas Jung on page 49Jul 21 2013 624 PM
Thanks for clarification I thought there would be some kind of import
But anyway in case of this specific library I have some problems with JSLint validation when I do cut and paste
of the original code
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 343 PM
What kind of problem are you having using this library Strict mode JavaScript which doesnt try to access the
DOM Window or other client side specific objects should work in Server Side XSJS Generally if you have a
library you just cut and paste into your XSJS or an XSJSLIB file and then call the functions from your code
Milan VrozinaJul 21 2013 339 PM
Hello
first and foremost thank you for perfect openSAP classes related to HANA development and for this blog as
well
I have one question related to server-side javascript You mentioned in course that is possible to use 3rd party
libraries or reuse 3rd party code But I cant find a possible way how to import 3rd party javascript library -as
is- to server and use it For example I would like to use JSZip library to zip some file before sending it to client
from xsjs application Is that possible Thank you
Chandrashekhar MahajanJul 3 2013 734 PM
This is excellent blog Now HANA XS is very much clear to me
Mohan krishnaJul 1 2013 144 PM
WOW - great blog Thomas This will be very helpful in understanding SAP hana Good Job
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010050
Abdul Hakim in response to Thomas Jung on page 50Jun 27 2013 833 PM
Thanks for the clarification
Thomas Jung in response to Abdul Hakim on page 50Jun 27 2013 659 PM
HANA Extended Application Services uses SQLScript and JavaScript as its two primary programming
languages
gtwhether the current SAP Business suite based on ABAP will be completely migrated to HANA service
No The Business Suite already runs on HANA but still via the ABAP application server It will continue to
leverage HANA via a combination of enhancements to ABAP and utilizing some of the technologies described
in this blog
gtAlso whether ABAP can be used to built application in HANA extended services
No There is no ABAP language container in HANA Extended Application Services
Abdul HakimJun 27 2013 405 PM
Hi Thomas - What is the programming language used for HANA Extended application services
As HANA is more than a database ie application platform by itself and as you mentioned that more and more
applications will be built on HANA i have question as how the future SAP ERP system looks likewhether the
current SAP Business suite based on ABAP will be completely migrated to HANA service in the future or SAP
ABAP server will continue to evolve and receive focus investment from SAP Also whether ABAP can be used
to built application in HANA extended services Your thoughts
Thanks
Abdul Hakim
Thomas Jung in response to Ravindra Channe on page 50Jun 11 2013 830 PM
Yes it is still planned However we are still a couple of weeks away and Ive not seen the final installers to say
for certain its there
Ravindra ChanneJun 11 2013 815 PM
Hi Thomas
Thanks for a wonderful and very informative blog Is there any update on 32 bit REGI file
Is it expected along with SPS6
Regards
Ravi
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010051
Thomas Jung in response to Amanda Rzepka on page Jun 7 2013 942 PM
gtCan the XS Services be used in a BW on HANA Scenario
Yes XS is part of ALL HANA systems You should check and make sure you are licensed for direct access to
the underlying HANA instance however
Thomas Jung in response to Holger Schimanski on page Jun 7 2013 941 PM
gtIs there a similar library which could be used in XS Engine
The XSODATA development object is similar We also have higher level frameworks for XMLA and Search
Services (InA) You can expect more such high level frameworks to be added to the HANA Extended
Application Services in the future
Thomas Jung in response to Manav Mehra on page Jun 7 2013 939 PM
Have you used something like the Chrome developer tools to see see if you are getting any client side
javascript errors or to see if the request to your xsodata service is successful
Thomas Jung in response to Christian Hufnagl on page 52Jun 7 2013 938 PM
It will ship as non-automatic content in SPS6 (all systems will have it and it just needs to be imported) The
delivery units are also part of this weeks updates to the Cloudshare and AWS developer center images They
are also available for download as part of the content of the openSAP course
Thomas Jung in response to Matthew Pickell on page 51Jun 7 2013 937 PM
CORS support will come with SPS6 at the end of June
Thomas Jung in response to Jeroen Custers on page 51Jun 7 2013 936 PM
gtWill this bug be fixed in HANA ver 56
Personally Ive still experienced this bug in SPS6 internal builds Must be a tricky one to find Luckily the
workaround of closing and reopening isnt too difficult Just annoying This also probably makes the bug low
priority
Jeroen Custers in response to Vivek Singh Bhoj on page 52Jun 7 2013 411 PM
This issue also occurs on rev56
Matthew PickellJun 7 2013 258 PM
Thomas
Has CORS been included in a release yet
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010052
Vivek Singh Bhoj in response to Chandra Edem on page 52Jun 5 2013 601 AM
Hi Chandra
Date for Week1 Assignment has been extended till June 11
So you can give Week 1 Assignment now
Christian HufnaglJun 4 2013 543 PM
Hi Thomas
thank you for the interesting tutorial
Can you tell me whether it is possible to download the source code of the ldquoPutting it all togetherrdquovideo And if yes Where can I download itThanks
Christoph
Vivek Singh BhojJun 4 2013 1116 AM
Hi Thomas
Thanks for OpenSAP classes
Your Youtube Account also have very good exercises
IN OpenSAP Week 2 Unit 3 tutorial after assigning admin role to my user Id i am not able to see sequences
synonyms triggers under my schema or any other schema i am only able to see Column Views Procedures
Tables and Views
Though now i am able to insert data into my created table
Can you let me know how i will be able to see Sequences under my schema without removing the admin role
I am using HANA revision 52
Got to know from OpenSAP that
This is a known issue and the only way that Ive seen to fix it is to actually close the studio and open it again
then refresh the node
Cheers
Rich Heilman
SAP HANA Product Management
Will this bug be fixed in HANA ver 56
Chandra Edem in response to Thomas Jung on page 53Jun 4 2013 646 AM
Thomas
I registered for OpenSAP course Introduction to Software Development on SAP HANA on June 2 900PM
I didnt know that it is going to end WEEK1 assignment test on 632013 300PM Is there any way can take
that WEEK1 Assignment Test
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010053
Thanks
Chandra
Thomas Jung in response to Alexander Bauer on page Jun 3 2013 856 PM
SAPUI5 gets updated auutomatically when you apply HANA revisions There is no additional download or
update needed
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010023
My current requirement is to fetch Weather Data and Social Media data from various OData services and store
them in HANA for further analysis What might be the best way for this I am currently checking the option of
creating an XS application which would connect to the external services fetch the data and save that in HANA
using DB Connection Is this the best way Or should we try to use JAVA or some other way
Your valuable suggestions are most welcome Thanks
Regards
Tarasankar
Thomas Jung in response to Tarasankar Banerjee on page 23Oct 29 2014 1256 PM
gtHowever is it possible to consume XSODATA service from XSJS instead of using DB Connection
You can via an outbound HTTP destination although I certainly wouldnt recommend it It would be rather
complex and not well performing
gtAlso is it possible to consume data from external OData services for weather data social media data etc from
XSJS
Sure with the same Outbound HTTP Connectivity
httpswwwyoutubecomwatchv=fWirvj9l7eY
Maintaining HTTP Destinations - SAP HANA Developer Guide - SAP Library
Tarasankar BanerjeeOct 29 2014 1119 AM
Dear Thomas
Thanks for the great blog
I am able to connect to Database and execute queries from XSJS service However is it possible to consume
XSODATA service from XSJS instead of using DB Connection
Also is it possible to consume data from external OData services for weather data social media data etc from
XSJS
If possible it would be great if you could provide some code sample or guidelines
Thanks
Regards
Tarasankar
Thomas Jung in response to Weiping Lu on page 24Sep 25 2014 833 AM
Please refer to service note 1849775
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010024
httpservicesapcomsapsupportnotes1849775
I believe it will address your issue
Weiping LuSep 24 2014 519 PM
Hi Tom
Great post and videos I have a tough issue calling a HANA procedure from XS takes gt 5min but from HANA
studio lt 1 min Were using Amazon AWS rev 70 and 73 Any help will be greatly appreciated
Thanks
WPL
Thomas Jung in response to Su Srikanth on page 24Aug 11 2014 253 PM
You transport XSODATA services like you would any other repository content - via a Delivery Unit
Su SrikanthAug 11 2014 750 AM
Hi Thomas
Great blog
Ive a query here - we create the odata services(andor URLs created to view in the web browser) in
development environment now if we have to transport it to the quality andor production environment how
can we do this - is the same as importexport or is there any specific way to do please help with any useful
pointers
Many thanks as always
Su
Thomas Jung in response to ARSHAD SHAIKH on page 24May 15 2014 231 PM
Ive never written any blogs on calculation views I dont cover that topic That is why I suggested you ask your
question in the proper SCN forum
Although looking at your your above SQL Statement I dont see why you couldnt do this directly in XSODATA
off of the table STATUS without the need for the calculation view or the SQLScript Procedure
ARSHAD SHAIKH in response to Thomas Jung on page 25May 15 2014 1154 AM
Hello Thomas
I am new to hana Please suggest me the blogs of you related to calculation view that calling
procedures(procedures have out parameter)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010025
I am trying to fetch the result of procedure in calc view and want to create odata service for that calculation
view
procedure code goes like this
---------------------------------------
CREATE PROCEDURE TWEETS_TODAY(OUT OP BIGINT)
language SQLSCRIPT sql security invoker default schema SOCIAL360 reads sql data as
BEGIN
SELECT COUNT() INTO OP FROM SOCIAL360STATUS WHERE CREATED_AT = CURRENT_DATE
END
calc view code goes like this
----------------------------------------
Begin Procedure Script
BEGIN
DECLARE OP BIGINT
CALL SOCIAL360TWEETS_TODAY(OPvar_out)
END End Procedure Script
Thanks
-Arshad
Thomas Jung in response to ARSHAD SHAIKH on page 25May 15 2014 944 AM
Your question seems to have no relation to the content in this blog Please consider instead asking general
HANA questions in the appropriate SCN Forum
ARSHAD SHAIKHMay 15 2014 917 AM
Hi Thomas
I want to call procedures in calculation view (procedures have out parameter)
Please suggest me step by step procedure with example and supporting documents
Thanks
ARSHAD SHAIKH
Henrique Pinto in response to Blair Krotenko on page 26Apr 16 2014 711 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010026
Hmm not really sure of that I see it but that might be because Im an employee
But the NET development partner I was working with was not enrolled in any kind of beta testing program and
they were able to download it so I guess you should as well
Make sure to go in the Installation and Upgrades menu and not the Support Packages and Patches
Go to httpservicesapcomswdc -gt Installations and Upgrades -gt Browse our Download Catalog -gt SAP In-
Memory (SAP HANA) -gt SAP HANA ADONET 10
Best regards
Henrique
Blair Krotenko in response to Henrique Pinto on page 26Apr 16 2014 656 PM
Thanks for the info Henrique but I cant find it I dont know if it is an authorization issue or do we need to be a
ramp-up customer to dl and use a beta product
Thanks
Blair
Henrique Pinto in response to Thomas Jung on page 27Apr 16 2014 614 PM
The ADONET provider is available for download in the SAP Service Marketplace (in beta edition so far)
Thomas Jung in response to Kamal Jain on page 26Apr 16 2014 514 PM
For general OData structure and syntax I find that the Odataorg website is very helpful For example on this
topic
httpwwwodataorgdocumentationodata-version-2-0uri-conventions
The syntax of a $expand query option is a comma-separated list of Navigation Properties Additionally each
Navigation Property can be followed by a forward slash and another Navigation Property to enable identifying a
multi-level relationship
The page also has some sample URLs
Kamal JainApr 16 2014 536 AM
Dear Thomas
I agree that we need to pass all the associations in the expand I tried with some of options but was not
through
Now i just tried with below syntax and able to achive Thx
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010027
httpdewdftzld025pgdevsapcorp8000DTHCPXSZPMIS_PRO_ACTUALxsodata
ZPROHEADER(PR07_000002)$expand=ZACTUZEMPD
Regards
Kamal Jain
Thomas Jung in response to Blair Krotenko on page 27Apr 15 2014 623 PM
We do plan to release an ADONET provider specific to HANA in the near future This would probably be the
best option for consumption from NET Until then I would think that ODBC is probably the next best option It
gives you generally easy portability from already existing database code You could consume OData as well
although that is more generally consumed from the UI layer itself It guess it somewhat depends upon where
you are calling the service from in your NET application
Blair KrotenkoApr 15 2014 409 PM
Hi Thomas
We are looking at consuming HANA data in a NET application and from what I can see there are 2 options -
OData and ODBC It seems to me that OData might be the better option when consuming HANA data in an XS
application while ODBC might be the better option for NET What are your thoughts Is there a paper on this
subject I havent been able to find a comparison document for this Are there any security caveats to be aware
of for these options
Thanks
Blair
Thomas Jung in response to Kamal Jain on page 27Apr 15 2014 136 PM
You have to list both associations in the expand on the URL if you want both relationships to be processed
Kamal JainApr 15 2014 1249 PM
Hi Thomas
Thx for valuable and useful information
I have an query regarding XS Odata service creation for more than 2 tables and get all the data in one
command
There is req in which service needs to be created for 3 tables to get data from all these
First table has Project ID as key second table has composite
ProjectID and Employee Id as key and third table has Employee id as
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010028
key
So if I create navigation for first 2 tables based on project id and use expand comand than its working fine and I
can see data of both the tables
Further if I add navigation for third table also as below then below expand is displaying data for first two tables
only Pls share how to use expand command in this case if possible to get all tables data based on project id
How to use navigation ZEMPD here
httpdewdftzld025pgdevsapcorp8000DTHCPXSZPMIS_PRO_ACTUALxsodata
ZPROHEADER(PR07_000002)$expand=ZACTUamp
service namespace
DTHCPXS
DTHCPDTHCPDBHCP_PROJECT_HEADER
as ZPROHEADER
navigates (PROJECT as
ZACTU)
DTHCPDTHCPDBHCPT_ZPMIS_ACTUAL
as ZACTU
navigates (EMPLOYEE as
ZEMPD )
DTHCPDTHCPDBHCP_ZPMIS_RES_MASTER
as ZEMPD
association PROJECT principal
ZPROHEADER(PROJECTID)
multiplicity 1 dependent
ZACTU(PROJECTID) multiplicity
association EMPLOYEE principal
ZACTU(EMPLOYEEID)
multiplicity 1 dependent
ZEMPD(EMPLOYEEID) multiplicity
1
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010029
Pls suggest if there is anything to add or correct in XS odata service syntax above
Regards
Kamal Jain
Vikas Madaan in response to Thomas Jung on page 29Apr 14 2014 458 PM
Thanks Thomas
Under which component
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 29Apr 14 2014 450 PM
No this isnt a known issue Ive seen Nor can I recreate the problem in my system No you cant maintain the
authentication in XSHTTPDEST itself It intentionally must be set in XSADMIN tool I can really only suggest
that you open a support ticket
Vikas MadaanApr 14 2014 431 PM
Hi Thomas
I am trying to pull data from SAP system onto HANA Database using XSJOB files I am calling RFC enabled
function modules over HTTP request It helps me replicating the real time ECC data onto HANA as well with
back ground jobs
I am facing one problem in the XSHTTPDEST file I am able to create and activate the file using studio and this
file is even visible in the web based XS administration tool But in the web based tool when i provide user and
password for basic authotication then system just clears the user id and password when i try to save This the
reason our HTTP requests are getting failed and below is the response we are getting in the response body
lthtmlgtltheadgtlttitlegtLogon Error Messagelttitlegt
Is this known issue or we are missing something Is it possible to provide user and password in the
XSHTTPDEST file Is there any particular syntax
I checked and i have the required authorizations as well develper Guide
Please help
Regards
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010030
Vikas Madaan
Abdul HakimFeb 22 2014 359 AM
Hi Thomas - Any recommended book or resource to learn and master Server Side Javascript There were
many books available in the market but as a beginner need to know the right resource book to start with and
master this stuffAlso whether SAP plan to conduct any training to teach Server Side Javascript similar to other
standard training offerings
Thanks
Hakim
Samuel Tanor-GyeduFeb 20 2014 839 AM
Thanks Thomas
I will definitely have a look at SHINE
Thomas Jung in response to gentilini andre on page 30Feb 19 2014 422 PM
Difficult to say what is wrong I several things which are different than our sample that does this You are using
a POST for instance instead of a GET However if you are gettting a 200 then I assume the service call is
correct In client side tools (like Chrome Developer Tools) you should be able to see the response object from
the call
However what I would really recommend is that you study the SHINE content (SAP HANA Interactive
Education) There is already a sample application which does this in SHINE Also it has some special
JavaScript in the UI to handle the file attachment via AXAJ call Perhaps that is the part you are missing
You can read more about SHINE here It is also included already installed in the latest version of the HANA
Developer Center trial image (SP7 based)
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
gentilini andreFeb 19 2014 325 PM
Hi Thomas
well I followed your hints but it still donacutet work
I created a xsjs File like below
function downloadExcel()
try
var body =
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010031
alert(drin)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
alert(drusse)
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount
tTax Amount tNetto Amount tCurrency n
while(rsnext())
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
catch (e)
alert(db conn funktioniert nicht)
var a = $requestparametersget(cmd)
$responsesetBody(Invalid Command +a)
switch (a)
case doex
$responsesetBody(Invalid Command +a)
alert(filedownload)
thisdownloadExcel()
break
default
$responsestatus = $nethttpINTERNAL_SERVER_ERROR
$responsesetBody(Invalid Command +a)
The Controllerjs File
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010032
doFileDownload function (oEvent)
jQuerysaprequire(sapuicommonsMessageBox)
sapuicommonsMessageBoxshow(Export Starten sapuicommonsMessageBoxIconconfirm
Information)
sapuicommonsMessageBoxconfirm(Export starteninform Confirmation)
return false
function inform(rValue)
alert (drinnnnne)
var aurl = FileDownloadxsjscmd=doex
if(rValue) If User presses Ok
alert(aurl)
jQueryajax(
url aurl
method POST
dataType json
datacmddoex
success sapuicommonsMessageBoxalert(Export wird ausgefuumlhrtConfirmation)
errorfunction onErrorCall(jqXHR textStatus errorThrown)
alert(jqXHRstatus)
sapuicommonsMessageBoxshow(jqXHRstatus
ERROR
Error in calling Service )
return
complete sapuicommonsMessageBoxalert(Export Erfolgreich
abgeschlossenConfirmation)
)
return false
else If the user presses Cancel
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010033
sapuicommonsMessageBoxalert(Vorgang abgebrochenNotification)
)
at last but not least the view
sapuijsview(zag1_ui_cv_03Index
Specifies the Controller belonging to this View
In the case that it is not implemented or that null is returned this View does not have a Controller
memberOf zag1_ui_cv_03Index
getControllerName function()
return zag1_ui_cv_03Index
Is initially called once after the Controller has been instantiated It is the place where the UI is
constructed
Since the Controller is given to this method its event handlers can be attached right away
memberOf zag1_ui_cv_03Index
createContent function(oController)
create a lite button with an icon and a text
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010034
lite true
)placeAt(btn)
oButton3attachPress(oControllerdoFileDownload)
var oButton4 = new sapuicommonsButton(
text Refresh
icon imagesrefreshjpg
lite true
press function() var data = oTableval()
if(data == )
alert(no data found)
return
print(content)
print(DatArray)
if (data = )
alert(Funzt)
JSONToCSVConvertor(data CUSTOMER AMOUNT true)
)placeAt(btn)
jQuerysaprequire(sapuitableTable)
create table control with properties
var oTable = new sapuitableTable(
width 100
rowHeight 50
title Amount per Partner
selectionMode sapuitableSelectionModeNone
)
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Company Name
)
template new sapuicommonsTextView(
text CompanyName
)
sortProperty CompanyName
))
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010035
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Partner ID
)
template new sapuicommonsTextView(
text PartnerId
)
sortProperty PartnerId
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Postal Code
textAlign sapuicoreTextAlignEnd
)
template new sapuicommonsTextView(
text PostalCode
textAlign sapuicoreTextAlignEnd
)
sortProperty PostalCode
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text City
)
template new sapuicommonsTextView(
text City
)
sortProperty City
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Purchase ID
)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010036
template new sapuicommonsTextView(
text PurchaseOrderId
)
sortProperty Currency
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Lifecycle Status
)
template new sapuicommonsTextView(
text LifecycleStatus
)
sortProperty LifecycleStatus
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Gross Amount
)
template new sapuicommonsTextView(
text GrossAmount
)
sortProperty GrossAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Tax Amount
)
template new sapuicommonsTextView(
text TaxAmount
)
sortProperty TaxAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Amount Netto
)
template new sapuicommonsTextView(
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010037
text CM_NET_Amount_001
)
sortProperty CM_NET_Amount_001
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Currency
)
template new sapuicommonsTextView(
text Currency
)
sortProperty Currency
))
var oModel = new sapuimodelodataODataModel
(httpqperiorvmcldsr8000ZAG1_WS_001ZAG1_CV_001xsodata false)
oTablesetModel(oModel)
oTablebindRows(Amount)
return oTable
)
It wonacutet call the function or better said the action of the button works fine till to the point where it should call the
xsjsfile to generate the excel-file I wondered that in the ajax part the error- success- and complete-part will
be executed at the same time and not only one of this statements The message is 200 (The request has
succeeded The information returned with the response is dependent on the method used in the request)
Maybe you can see where my mistake is or whats going wrong
Iacuteve the developer edition on cloudshare (Hana Studio rev68 Server is on SPS05)
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010038
Andreacute
Thomas Jung in response to Samuel Tanor-Gyedu on page 38Feb 19 2014 523 AM
I dont think I can help you This appears to a question about how odata4j works not about XS I have no
experience with odata4j myself
Samuel Tanor-GyeduFeb 18 2014 913 AM
Hi Thomas
I have an odata service with this endpointhttpss5hanaxshanatrialondemandcomservicesUserxsodata
I am now trying to consume it from eclipse with the odata4j libraries
This is how I get the endpoint
public UserServiceOdata(String endpointUri)
thisendpointUri = endpointUri
ODataConsumerdumpresponseHeaders(true)
consumer = ODataConsumerscreate(endpointUri)
This is my method to add a user
public User addUser(User user)
consumercreateEntity(entitySet)properties(OPropertiesint32(propertyUserId
usergetId()))properties(OPropertiesstring(propertyUserName
usergetName()))properties(OPropertiesstring(propertyUserEmail usergetEmail()))execute()
return user
When I call addUser method I get an Error
Caused by javaxxmlstreamXMLStreamException ParseError at [rowcol][78253]
Message The reference to entity sourceUrl must end with the delimiter
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010039
When I use this endpoint httpss5hanaxshanatrialondemandcomservicesUsersvc everything works fine
With the httpss5hanaxshanatrialondemandcomservicesUserxsodata I get errors
Please I would be very grateful for assistance
Thanks in advance
Regards
Samuel
Thomas Jung in response to gentilini andre on page 39Feb 18 2014 431 AM
You have a fundamental misunderstanding here You are placing server side JavaScript code in your client
side UI5 application The function downloadExcel is something you need to execute on the server It needs to
be in an XSJS file and it is called from the client side via AJAX - as a REST service not as a local function
gentilini andreFeb 17 2014 451 PM
Hello Thomas
Thank you for this great How-To Guide
Iacutem pretty new in SAPUI5 and tried your export-sample in my little trial project but it doesnacutet work
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010040
My Button for this looks like
ltcodegt
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
lite true
press function() alert(oButton3getText())
downloadExcel()
ltcodegt
and the function for this action looks like
ltcodegt
function downloadExcel()
var body =
alert(drin)
print($query)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount tTax
Amount tNetto Amount tCurrency n
while(rsnext())
if(rsnext() == )
alert($responsesetBody( Failed to retrieve data ))
alert($responsestatus = $nethttpINTERNAL_SERVER_ERROR)
else
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010041
ltcodegt
Iacutem afraid and hope that you can help me
Kind regards
Andreacute
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1246 PM
gtIs there any restriction or development limitation in the XSJSLIB files
Thats a very general question Difficult to answer without any context
Vikas Madaan in response to Thomas Jung on page 41Feb 11 2014 1245 PM
Thanks Thomas
I think we are on same page
Once quick question that came to my mind Is there any restriction or development limitation in the XSJSLIB
files
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1230 PM
gtCould please help me in understanding in more advantagesdisadvantages for both techniques
Youve summarized it pretty well already
gtbecuase i dont want to use both the approaches
Even with the CRUD support and exits in XSODATA its still pretty hard to do 100 via XSODATA There are
still valid use cases for XSJS when you need custom body custom read processing job scheduling etc Its
good to try and use XSODATA whenever possible but I wouldnt automatically exclude the use of XSJS
Vikas MadaanFeb 11 2014 1008 AM
Hi Thomas
Thanks a lot for sharing useful information through various blogs
In my current project we are evaluating use of XSOData or XSJS applications I saw your videos like the one
mentioned below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010042
httpwwwsaphanacomdocsDOC-4376
Want i understood from various blog is this
From SP7 we can write exsits in the OData services and it is very easy to consume at the client side just like
any REST base service and from my understanding it is Scalable as well I would love to use XSOData always
becuase development effort is very less compare to XSJS and it is very easy to rampup the team on OData
related development objects
XSJS were as provide more control becuase of server side scripting becuase it allows development on the
server side using JavaScript Core APIs of SAP HANA Extended Application Services are therefore exposed
as JavaScript functions providing easy access to the HTTP Request and Response object as well database
access to execute SQL or call SQLScript Procedures It provide us control over the body format and and URL
parameter definition
Could please help me in understanding in more advantagesdisadvantages for both techniques
I am very keen to understand and also explain the same to team members becuase i dont want to use both the
approaches and even sometimes customer can also ask the same to us
Also If we are on SP6 then from my understanding XSJS provides us more capability in terms of complex
application Corrent me If i am wrong
Thanks
Regards
Vikas Madaan
Thomas Jung in response to Raghuveer Phull on page 42Feb 5 2014 312 PM
Yes there are videos on the CRUD features of XSODATA which were new in SP6
For more on CRUD support in SP6 see this video
oData CreateUpdateDelete Support in SAP HANA SPS6
For the extended support for XSJS exits in SP7 see this video
SAP HANA SPS 07 XSODATA Exits in XSJS
Raghuveer PhullFeb 5 2014 122 AM
Do you have an exampledocumentationvideo where you can write a service which will populate Hana DB
What I am asking for is a way for my external script to populate the DB tables i have created in Hana DB
Thomas Jung in response to reda miraoui on page 43Jan 29 2014 411 PM
The source code for the examples shown here are shipped as part of SHINE (SAP HANA Interactive
Education)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010043
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Vivek Singh Bhoj in response to reda miraoui on page 43Jan 29 2014 352 PM
Hi Reda
You can import Shine Content in HANA and then check all these source codes
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Regards
Vivek
reda miraoui in response to Thomas Jung on page Jan 29 2014 344 PM
Hey Thomas
Is it possible to download source code of your project from this HANA tutorial
Thanks
Reda
Thomas Jung in response to Abdul Hakim on page 43Nov 21 2013 1133 PM
Yes River can be used as an alternative and when activated it will generate Server Side JavaScript andor
SQLScript
Abdul Hakim in response to Thomas Jung on page 44Nov 21 2013 747 PM
Hi Thomas - Was going through blog regarding River (RDL)Just a question on this
When you say Programming language for HANA native development is Server side Javascript SQL SQL
ScriptOnce RDL is rolled out whether RDL can be used for native application development instead of Server
side Java script SQL SQL Script I am very much new to this stuff so appreciate if you can also help on
how to get started with Server Side Java script SQL SQL Script for HANA
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 30 2013 750 AM
Hi Thomas
Thanks for your response I am talking about more content on shine
thanks
Ashutosh
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010044
Baskar Gopalakrishnan in response to Thomas Jung on page 44Oct 30 2013 1249 AM
Hi Thomas
Im a SAP PI Middleware consultantSAP topic leader in XIPI heavily worked on Java related
Netweaver stack I have knowledge in ABAP but not worked heavily in abap I have enrolled your sap hana
native application development course I feel very interesting I did work heavily in java and javascript projects
using eclipse development tool Do you think if I invest my time in just native hana development and proceed
in HANA field is a good step I dont have BW experience either
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 819 PM
Thanks for the clarification Much appreciated
Thomas Jung in response to Abdul Hakim on page 44Oct 29 2013 120 PM
gtABAP Close to HANA means whether we can expect a similar 2 tier architecture similar to HANA XS in the
future or what does that mean
No it doesnt mean that ABAP will become a 2 tier architecture We will not move the ABAP VMKernel into
HANA itself It will remain a separate application server At least for the current plansforeseeable future What
he was referring to was bringing the programming models closer For instance the new 740 SP5 feature that
allows you to write SQLScript directly within an ABAP class method
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 650 AM
Thomas - Thanks for the clarificationMuch appreciatedI was listening to ABAP on HANA session by
Thorsten Schneider this year Teched and he was mentioning that SAP Plans to bring ABAP very close to
HANA in the coming future but not much details have been discussed in the sessionABAP Close to HANA
means whether we can expect a similar 2 tier architecture similar to HANA XS in the future or what does that
mean
Thanks
Hakim
Thomas Jung in response to Abdul Hakim on page 45Oct 28 2013 703 PM
gt whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the option is
recommended by SAP then kindly share the pros and cons of each of the item
Taken from the TechEd CD103 session slides
Guidance
bulluse ABAP for optimization of existing progams (in context of SAP Business Suite or BW)
bullconsider HANA Native Development for development of new applications which will solely run on SAP HANA
bullcombine ABAP and HANA Native Development to enrich existing applications (eg SAP HANA Live Fiori)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010045
ABAP
bullapplications follow 3-tier architecture
bullABAP is in general database agnostic but with release 74 optimized for SAP HANA
bullProgramming language ABAP ABAP OO with the option to use SAP HANA features
bullIDE eclipse-based ABAP Development Tools
HANA Native Development
bullapplications follow 2-tier architecture
bullHANA Native Development is SAP HANA specific and embedded in the database
bullProgramming language River server-side JavaScript SQLSQLScript
bullIDE eclipse-based SAP HANA Studio + web IDE
Thomas Jung in response to ashutosh dixit on page 45Oct 28 2013 701 PM
gtIs there any more demos for the SHINE
Im not exactly sure what you mean by that We are building additional content for SHINE that will be delivered
in SP7
Abdul HakimOct 28 2013 326 PM
Thomas - Let us say a customer is running SAP Netweaver 74 ABAP with HANA DB and they have HANA
extended service as wellIf the customer wants to do new developments then what is the recommendation
from SAP ie whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the
option is recommended by SAP then kindly share the pros and cons of each of the item (SAP Netweaver 74
ABAP Vs SAP HANA XS)
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 28 2013 221 PM
Hi Thomas
Thanks a lot for your its working now
Is there any more demos for the SHINE
Thanks
Ashutosh
Thomas Jung in response to ashutosh dixit on page 46Oct 25 2013 809 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010046
As this content is now standard in SP6 as part of SHINE (SAP HANA INteractive Education) there also some
setup instructions on helpsapcom
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Basic points to check - have you generated the synonyms in the data generator Ran the data generator to
create some data Have the role assigned Added client 001 to your user profile
ashutosh dixitOct 24 2013 130 PM
Hi Thomas
Amazing blog - once again Thomas thanks
I have been following you for many days attended your OPEN SAP course also
That was an amazing course for new learner like me
One of our client is looking forward for XS based search Application identical to what you have created in your
DEMO
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010047
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010048
But I am not able to fetch the data on blank HTML page is coming with no data
If there is any step by step document related to this please help in getting that
Any help will be highly appreciated
Thanks
Ashutosh
Naveen KumarSep 26 2013 1130 AM
Good Document
Heber FabianoAug 27 2013 323 PM
Great content as always Keep sharing with us
Thomas Jung in response to Orel Stringa on page 48Aug 27 2013 147 PM
This is currently not possible The CORS support is for all origins We dont yet have the feature to maintain a
whitelist of CORS origins
Orel Stringa in response to Thomas Jung on page Aug 27 2013 801 AM
Hi Thomas
nice to see that SAP has made it possible with SP6 to specify cross origin resource sharing (CORS) support
via the xsaccess file SP6 HANA development guide has example of how to specify CORS support
I have build an XS application and would like to serve SAPUI5 on a diffhost than XSHANA
How can I specify that I would like to allow cross origin access restricted to certain domain(s) only
Is there a special keyword syntax for specifying that
Thank yoi
Orel
Vijay UthayakumarAug 27 2013 131 AM
Highly informative amp digestible Fantastic work
Jerry WangAug 1 2013 955 AM
Hi Tomas
Thank you
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010049
Jerry
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 644 PM
JSLint checks are very strict and often produce syntax errors for items that just stylistic and wont actually
cause an error upon activation or runtime You can either ignore the JSLint errors or deactivate JSLint for this
project in these cases However it might also be an indication that the JavaScript code you are trying to import
isnt compatible with Strict mode
httpsdevelopermozillaorgen-USdocsWebJavaScriptReferenceFunctions_and_function_scope
Strict_mode
Milan Vrozina in response to Thomas Jung on page 49Jul 21 2013 624 PM
Thanks for clarification I thought there would be some kind of import
But anyway in case of this specific library I have some problems with JSLint validation when I do cut and paste
of the original code
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 343 PM
What kind of problem are you having using this library Strict mode JavaScript which doesnt try to access the
DOM Window or other client side specific objects should work in Server Side XSJS Generally if you have a
library you just cut and paste into your XSJS or an XSJSLIB file and then call the functions from your code
Milan VrozinaJul 21 2013 339 PM
Hello
first and foremost thank you for perfect openSAP classes related to HANA development and for this blog as
well
I have one question related to server-side javascript You mentioned in course that is possible to use 3rd party
libraries or reuse 3rd party code But I cant find a possible way how to import 3rd party javascript library -as
is- to server and use it For example I would like to use JSZip library to zip some file before sending it to client
from xsjs application Is that possible Thank you
Chandrashekhar MahajanJul 3 2013 734 PM
This is excellent blog Now HANA XS is very much clear to me
Mohan krishnaJul 1 2013 144 PM
WOW - great blog Thomas This will be very helpful in understanding SAP hana Good Job
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010050
Abdul Hakim in response to Thomas Jung on page 50Jun 27 2013 833 PM
Thanks for the clarification
Thomas Jung in response to Abdul Hakim on page 50Jun 27 2013 659 PM
HANA Extended Application Services uses SQLScript and JavaScript as its two primary programming
languages
gtwhether the current SAP Business suite based on ABAP will be completely migrated to HANA service
No The Business Suite already runs on HANA but still via the ABAP application server It will continue to
leverage HANA via a combination of enhancements to ABAP and utilizing some of the technologies described
in this blog
gtAlso whether ABAP can be used to built application in HANA extended services
No There is no ABAP language container in HANA Extended Application Services
Abdul HakimJun 27 2013 405 PM
Hi Thomas - What is the programming language used for HANA Extended application services
As HANA is more than a database ie application platform by itself and as you mentioned that more and more
applications will be built on HANA i have question as how the future SAP ERP system looks likewhether the
current SAP Business suite based on ABAP will be completely migrated to HANA service in the future or SAP
ABAP server will continue to evolve and receive focus investment from SAP Also whether ABAP can be used
to built application in HANA extended services Your thoughts
Thanks
Abdul Hakim
Thomas Jung in response to Ravindra Channe on page 50Jun 11 2013 830 PM
Yes it is still planned However we are still a couple of weeks away and Ive not seen the final installers to say
for certain its there
Ravindra ChanneJun 11 2013 815 PM
Hi Thomas
Thanks for a wonderful and very informative blog Is there any update on 32 bit REGI file
Is it expected along with SPS6
Regards
Ravi
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010051
Thomas Jung in response to Amanda Rzepka on page Jun 7 2013 942 PM
gtCan the XS Services be used in a BW on HANA Scenario
Yes XS is part of ALL HANA systems You should check and make sure you are licensed for direct access to
the underlying HANA instance however
Thomas Jung in response to Holger Schimanski on page Jun 7 2013 941 PM
gtIs there a similar library which could be used in XS Engine
The XSODATA development object is similar We also have higher level frameworks for XMLA and Search
Services (InA) You can expect more such high level frameworks to be added to the HANA Extended
Application Services in the future
Thomas Jung in response to Manav Mehra on page Jun 7 2013 939 PM
Have you used something like the Chrome developer tools to see see if you are getting any client side
javascript errors or to see if the request to your xsodata service is successful
Thomas Jung in response to Christian Hufnagl on page 52Jun 7 2013 938 PM
It will ship as non-automatic content in SPS6 (all systems will have it and it just needs to be imported) The
delivery units are also part of this weeks updates to the Cloudshare and AWS developer center images They
are also available for download as part of the content of the openSAP course
Thomas Jung in response to Matthew Pickell on page 51Jun 7 2013 937 PM
CORS support will come with SPS6 at the end of June
Thomas Jung in response to Jeroen Custers on page 51Jun 7 2013 936 PM
gtWill this bug be fixed in HANA ver 56
Personally Ive still experienced this bug in SPS6 internal builds Must be a tricky one to find Luckily the
workaround of closing and reopening isnt too difficult Just annoying This also probably makes the bug low
priority
Jeroen Custers in response to Vivek Singh Bhoj on page 52Jun 7 2013 411 PM
This issue also occurs on rev56
Matthew PickellJun 7 2013 258 PM
Thomas
Has CORS been included in a release yet
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010052
Vivek Singh Bhoj in response to Chandra Edem on page 52Jun 5 2013 601 AM
Hi Chandra
Date for Week1 Assignment has been extended till June 11
So you can give Week 1 Assignment now
Christian HufnaglJun 4 2013 543 PM
Hi Thomas
thank you for the interesting tutorial
Can you tell me whether it is possible to download the source code of the ldquoPutting it all togetherrdquovideo And if yes Where can I download itThanks
Christoph
Vivek Singh BhojJun 4 2013 1116 AM
Hi Thomas
Thanks for OpenSAP classes
Your Youtube Account also have very good exercises
IN OpenSAP Week 2 Unit 3 tutorial after assigning admin role to my user Id i am not able to see sequences
synonyms triggers under my schema or any other schema i am only able to see Column Views Procedures
Tables and Views
Though now i am able to insert data into my created table
Can you let me know how i will be able to see Sequences under my schema without removing the admin role
I am using HANA revision 52
Got to know from OpenSAP that
This is a known issue and the only way that Ive seen to fix it is to actually close the studio and open it again
then refresh the node
Cheers
Rich Heilman
SAP HANA Product Management
Will this bug be fixed in HANA ver 56
Chandra Edem in response to Thomas Jung on page 53Jun 4 2013 646 AM
Thomas
I registered for OpenSAP course Introduction to Software Development on SAP HANA on June 2 900PM
I didnt know that it is going to end WEEK1 assignment test on 632013 300PM Is there any way can take
that WEEK1 Assignment Test
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010053
Thanks
Chandra
Thomas Jung in response to Alexander Bauer on page Jun 3 2013 856 PM
SAPUI5 gets updated auutomatically when you apply HANA revisions There is no additional download or
update needed
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010024
httpservicesapcomsapsupportnotes1849775
I believe it will address your issue
Weiping LuSep 24 2014 519 PM
Hi Tom
Great post and videos I have a tough issue calling a HANA procedure from XS takes gt 5min but from HANA
studio lt 1 min Were using Amazon AWS rev 70 and 73 Any help will be greatly appreciated
Thanks
WPL
Thomas Jung in response to Su Srikanth on page 24Aug 11 2014 253 PM
You transport XSODATA services like you would any other repository content - via a Delivery Unit
Su SrikanthAug 11 2014 750 AM
Hi Thomas
Great blog
Ive a query here - we create the odata services(andor URLs created to view in the web browser) in
development environment now if we have to transport it to the quality andor production environment how
can we do this - is the same as importexport or is there any specific way to do please help with any useful
pointers
Many thanks as always
Su
Thomas Jung in response to ARSHAD SHAIKH on page 24May 15 2014 231 PM
Ive never written any blogs on calculation views I dont cover that topic That is why I suggested you ask your
question in the proper SCN forum
Although looking at your your above SQL Statement I dont see why you couldnt do this directly in XSODATA
off of the table STATUS without the need for the calculation view or the SQLScript Procedure
ARSHAD SHAIKH in response to Thomas Jung on page 25May 15 2014 1154 AM
Hello Thomas
I am new to hana Please suggest me the blogs of you related to calculation view that calling
procedures(procedures have out parameter)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010025
I am trying to fetch the result of procedure in calc view and want to create odata service for that calculation
view
procedure code goes like this
---------------------------------------
CREATE PROCEDURE TWEETS_TODAY(OUT OP BIGINT)
language SQLSCRIPT sql security invoker default schema SOCIAL360 reads sql data as
BEGIN
SELECT COUNT() INTO OP FROM SOCIAL360STATUS WHERE CREATED_AT = CURRENT_DATE
END
calc view code goes like this
----------------------------------------
Begin Procedure Script
BEGIN
DECLARE OP BIGINT
CALL SOCIAL360TWEETS_TODAY(OPvar_out)
END End Procedure Script
Thanks
-Arshad
Thomas Jung in response to ARSHAD SHAIKH on page 25May 15 2014 944 AM
Your question seems to have no relation to the content in this blog Please consider instead asking general
HANA questions in the appropriate SCN Forum
ARSHAD SHAIKHMay 15 2014 917 AM
Hi Thomas
I want to call procedures in calculation view (procedures have out parameter)
Please suggest me step by step procedure with example and supporting documents
Thanks
ARSHAD SHAIKH
Henrique Pinto in response to Blair Krotenko on page 26Apr 16 2014 711 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010026
Hmm not really sure of that I see it but that might be because Im an employee
But the NET development partner I was working with was not enrolled in any kind of beta testing program and
they were able to download it so I guess you should as well
Make sure to go in the Installation and Upgrades menu and not the Support Packages and Patches
Go to httpservicesapcomswdc -gt Installations and Upgrades -gt Browse our Download Catalog -gt SAP In-
Memory (SAP HANA) -gt SAP HANA ADONET 10
Best regards
Henrique
Blair Krotenko in response to Henrique Pinto on page 26Apr 16 2014 656 PM
Thanks for the info Henrique but I cant find it I dont know if it is an authorization issue or do we need to be a
ramp-up customer to dl and use a beta product
Thanks
Blair
Henrique Pinto in response to Thomas Jung on page 27Apr 16 2014 614 PM
The ADONET provider is available for download in the SAP Service Marketplace (in beta edition so far)
Thomas Jung in response to Kamal Jain on page 26Apr 16 2014 514 PM
For general OData structure and syntax I find that the Odataorg website is very helpful For example on this
topic
httpwwwodataorgdocumentationodata-version-2-0uri-conventions
The syntax of a $expand query option is a comma-separated list of Navigation Properties Additionally each
Navigation Property can be followed by a forward slash and another Navigation Property to enable identifying a
multi-level relationship
The page also has some sample URLs
Kamal JainApr 16 2014 536 AM
Dear Thomas
I agree that we need to pass all the associations in the expand I tried with some of options but was not
through
Now i just tried with below syntax and able to achive Thx
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010027
httpdewdftzld025pgdevsapcorp8000DTHCPXSZPMIS_PRO_ACTUALxsodata
ZPROHEADER(PR07_000002)$expand=ZACTUZEMPD
Regards
Kamal Jain
Thomas Jung in response to Blair Krotenko on page 27Apr 15 2014 623 PM
We do plan to release an ADONET provider specific to HANA in the near future This would probably be the
best option for consumption from NET Until then I would think that ODBC is probably the next best option It
gives you generally easy portability from already existing database code You could consume OData as well
although that is more generally consumed from the UI layer itself It guess it somewhat depends upon where
you are calling the service from in your NET application
Blair KrotenkoApr 15 2014 409 PM
Hi Thomas
We are looking at consuming HANA data in a NET application and from what I can see there are 2 options -
OData and ODBC It seems to me that OData might be the better option when consuming HANA data in an XS
application while ODBC might be the better option for NET What are your thoughts Is there a paper on this
subject I havent been able to find a comparison document for this Are there any security caveats to be aware
of for these options
Thanks
Blair
Thomas Jung in response to Kamal Jain on page 27Apr 15 2014 136 PM
You have to list both associations in the expand on the URL if you want both relationships to be processed
Kamal JainApr 15 2014 1249 PM
Hi Thomas
Thx for valuable and useful information
I have an query regarding XS Odata service creation for more than 2 tables and get all the data in one
command
There is req in which service needs to be created for 3 tables to get data from all these
First table has Project ID as key second table has composite
ProjectID and Employee Id as key and third table has Employee id as
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010028
key
So if I create navigation for first 2 tables based on project id and use expand comand than its working fine and I
can see data of both the tables
Further if I add navigation for third table also as below then below expand is displaying data for first two tables
only Pls share how to use expand command in this case if possible to get all tables data based on project id
How to use navigation ZEMPD here
httpdewdftzld025pgdevsapcorp8000DTHCPXSZPMIS_PRO_ACTUALxsodata
ZPROHEADER(PR07_000002)$expand=ZACTUamp
service namespace
DTHCPXS
DTHCPDTHCPDBHCP_PROJECT_HEADER
as ZPROHEADER
navigates (PROJECT as
ZACTU)
DTHCPDTHCPDBHCPT_ZPMIS_ACTUAL
as ZACTU
navigates (EMPLOYEE as
ZEMPD )
DTHCPDTHCPDBHCP_ZPMIS_RES_MASTER
as ZEMPD
association PROJECT principal
ZPROHEADER(PROJECTID)
multiplicity 1 dependent
ZACTU(PROJECTID) multiplicity
association EMPLOYEE principal
ZACTU(EMPLOYEEID)
multiplicity 1 dependent
ZEMPD(EMPLOYEEID) multiplicity
1
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010029
Pls suggest if there is anything to add or correct in XS odata service syntax above
Regards
Kamal Jain
Vikas Madaan in response to Thomas Jung on page 29Apr 14 2014 458 PM
Thanks Thomas
Under which component
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 29Apr 14 2014 450 PM
No this isnt a known issue Ive seen Nor can I recreate the problem in my system No you cant maintain the
authentication in XSHTTPDEST itself It intentionally must be set in XSADMIN tool I can really only suggest
that you open a support ticket
Vikas MadaanApr 14 2014 431 PM
Hi Thomas
I am trying to pull data from SAP system onto HANA Database using XSJOB files I am calling RFC enabled
function modules over HTTP request It helps me replicating the real time ECC data onto HANA as well with
back ground jobs
I am facing one problem in the XSHTTPDEST file I am able to create and activate the file using studio and this
file is even visible in the web based XS administration tool But in the web based tool when i provide user and
password for basic authotication then system just clears the user id and password when i try to save This the
reason our HTTP requests are getting failed and below is the response we are getting in the response body
lthtmlgtltheadgtlttitlegtLogon Error Messagelttitlegt
Is this known issue or we are missing something Is it possible to provide user and password in the
XSHTTPDEST file Is there any particular syntax
I checked and i have the required authorizations as well develper Guide
Please help
Regards
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010030
Vikas Madaan
Abdul HakimFeb 22 2014 359 AM
Hi Thomas - Any recommended book or resource to learn and master Server Side Javascript There were
many books available in the market but as a beginner need to know the right resource book to start with and
master this stuffAlso whether SAP plan to conduct any training to teach Server Side Javascript similar to other
standard training offerings
Thanks
Hakim
Samuel Tanor-GyeduFeb 20 2014 839 AM
Thanks Thomas
I will definitely have a look at SHINE
Thomas Jung in response to gentilini andre on page 30Feb 19 2014 422 PM
Difficult to say what is wrong I several things which are different than our sample that does this You are using
a POST for instance instead of a GET However if you are gettting a 200 then I assume the service call is
correct In client side tools (like Chrome Developer Tools) you should be able to see the response object from
the call
However what I would really recommend is that you study the SHINE content (SAP HANA Interactive
Education) There is already a sample application which does this in SHINE Also it has some special
JavaScript in the UI to handle the file attachment via AXAJ call Perhaps that is the part you are missing
You can read more about SHINE here It is also included already installed in the latest version of the HANA
Developer Center trial image (SP7 based)
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
gentilini andreFeb 19 2014 325 PM
Hi Thomas
well I followed your hints but it still donacutet work
I created a xsjs File like below
function downloadExcel()
try
var body =
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010031
alert(drin)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
alert(drusse)
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount
tTax Amount tNetto Amount tCurrency n
while(rsnext())
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
catch (e)
alert(db conn funktioniert nicht)
var a = $requestparametersget(cmd)
$responsesetBody(Invalid Command +a)
switch (a)
case doex
$responsesetBody(Invalid Command +a)
alert(filedownload)
thisdownloadExcel()
break
default
$responsestatus = $nethttpINTERNAL_SERVER_ERROR
$responsesetBody(Invalid Command +a)
The Controllerjs File
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010032
doFileDownload function (oEvent)
jQuerysaprequire(sapuicommonsMessageBox)
sapuicommonsMessageBoxshow(Export Starten sapuicommonsMessageBoxIconconfirm
Information)
sapuicommonsMessageBoxconfirm(Export starteninform Confirmation)
return false
function inform(rValue)
alert (drinnnnne)
var aurl = FileDownloadxsjscmd=doex
if(rValue) If User presses Ok
alert(aurl)
jQueryajax(
url aurl
method POST
dataType json
datacmddoex
success sapuicommonsMessageBoxalert(Export wird ausgefuumlhrtConfirmation)
errorfunction onErrorCall(jqXHR textStatus errorThrown)
alert(jqXHRstatus)
sapuicommonsMessageBoxshow(jqXHRstatus
ERROR
Error in calling Service )
return
complete sapuicommonsMessageBoxalert(Export Erfolgreich
abgeschlossenConfirmation)
)
return false
else If the user presses Cancel
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010033
sapuicommonsMessageBoxalert(Vorgang abgebrochenNotification)
)
at last but not least the view
sapuijsview(zag1_ui_cv_03Index
Specifies the Controller belonging to this View
In the case that it is not implemented or that null is returned this View does not have a Controller
memberOf zag1_ui_cv_03Index
getControllerName function()
return zag1_ui_cv_03Index
Is initially called once after the Controller has been instantiated It is the place where the UI is
constructed
Since the Controller is given to this method its event handlers can be attached right away
memberOf zag1_ui_cv_03Index
createContent function(oController)
create a lite button with an icon and a text
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010034
lite true
)placeAt(btn)
oButton3attachPress(oControllerdoFileDownload)
var oButton4 = new sapuicommonsButton(
text Refresh
icon imagesrefreshjpg
lite true
press function() var data = oTableval()
if(data == )
alert(no data found)
return
print(content)
print(DatArray)
if (data = )
alert(Funzt)
JSONToCSVConvertor(data CUSTOMER AMOUNT true)
)placeAt(btn)
jQuerysaprequire(sapuitableTable)
create table control with properties
var oTable = new sapuitableTable(
width 100
rowHeight 50
title Amount per Partner
selectionMode sapuitableSelectionModeNone
)
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Company Name
)
template new sapuicommonsTextView(
text CompanyName
)
sortProperty CompanyName
))
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010035
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Partner ID
)
template new sapuicommonsTextView(
text PartnerId
)
sortProperty PartnerId
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Postal Code
textAlign sapuicoreTextAlignEnd
)
template new sapuicommonsTextView(
text PostalCode
textAlign sapuicoreTextAlignEnd
)
sortProperty PostalCode
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text City
)
template new sapuicommonsTextView(
text City
)
sortProperty City
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Purchase ID
)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010036
template new sapuicommonsTextView(
text PurchaseOrderId
)
sortProperty Currency
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Lifecycle Status
)
template new sapuicommonsTextView(
text LifecycleStatus
)
sortProperty LifecycleStatus
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Gross Amount
)
template new sapuicommonsTextView(
text GrossAmount
)
sortProperty GrossAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Tax Amount
)
template new sapuicommonsTextView(
text TaxAmount
)
sortProperty TaxAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Amount Netto
)
template new sapuicommonsTextView(
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010037
text CM_NET_Amount_001
)
sortProperty CM_NET_Amount_001
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Currency
)
template new sapuicommonsTextView(
text Currency
)
sortProperty Currency
))
var oModel = new sapuimodelodataODataModel
(httpqperiorvmcldsr8000ZAG1_WS_001ZAG1_CV_001xsodata false)
oTablesetModel(oModel)
oTablebindRows(Amount)
return oTable
)
It wonacutet call the function or better said the action of the button works fine till to the point where it should call the
xsjsfile to generate the excel-file I wondered that in the ajax part the error- success- and complete-part will
be executed at the same time and not only one of this statements The message is 200 (The request has
succeeded The information returned with the response is dependent on the method used in the request)
Maybe you can see where my mistake is or whats going wrong
Iacuteve the developer edition on cloudshare (Hana Studio rev68 Server is on SPS05)
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010038
Andreacute
Thomas Jung in response to Samuel Tanor-Gyedu on page 38Feb 19 2014 523 AM
I dont think I can help you This appears to a question about how odata4j works not about XS I have no
experience with odata4j myself
Samuel Tanor-GyeduFeb 18 2014 913 AM
Hi Thomas
I have an odata service with this endpointhttpss5hanaxshanatrialondemandcomservicesUserxsodata
I am now trying to consume it from eclipse with the odata4j libraries
This is how I get the endpoint
public UserServiceOdata(String endpointUri)
thisendpointUri = endpointUri
ODataConsumerdumpresponseHeaders(true)
consumer = ODataConsumerscreate(endpointUri)
This is my method to add a user
public User addUser(User user)
consumercreateEntity(entitySet)properties(OPropertiesint32(propertyUserId
usergetId()))properties(OPropertiesstring(propertyUserName
usergetName()))properties(OPropertiesstring(propertyUserEmail usergetEmail()))execute()
return user
When I call addUser method I get an Error
Caused by javaxxmlstreamXMLStreamException ParseError at [rowcol][78253]
Message The reference to entity sourceUrl must end with the delimiter
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010039
When I use this endpoint httpss5hanaxshanatrialondemandcomservicesUsersvc everything works fine
With the httpss5hanaxshanatrialondemandcomservicesUserxsodata I get errors
Please I would be very grateful for assistance
Thanks in advance
Regards
Samuel
Thomas Jung in response to gentilini andre on page 39Feb 18 2014 431 AM
You have a fundamental misunderstanding here You are placing server side JavaScript code in your client
side UI5 application The function downloadExcel is something you need to execute on the server It needs to
be in an XSJS file and it is called from the client side via AJAX - as a REST service not as a local function
gentilini andreFeb 17 2014 451 PM
Hello Thomas
Thank you for this great How-To Guide
Iacutem pretty new in SAPUI5 and tried your export-sample in my little trial project but it doesnacutet work
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010040
My Button for this looks like
ltcodegt
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
lite true
press function() alert(oButton3getText())
downloadExcel()
ltcodegt
and the function for this action looks like
ltcodegt
function downloadExcel()
var body =
alert(drin)
print($query)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount tTax
Amount tNetto Amount tCurrency n
while(rsnext())
if(rsnext() == )
alert($responsesetBody( Failed to retrieve data ))
alert($responsestatus = $nethttpINTERNAL_SERVER_ERROR)
else
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010041
ltcodegt
Iacutem afraid and hope that you can help me
Kind regards
Andreacute
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1246 PM
gtIs there any restriction or development limitation in the XSJSLIB files
Thats a very general question Difficult to answer without any context
Vikas Madaan in response to Thomas Jung on page 41Feb 11 2014 1245 PM
Thanks Thomas
I think we are on same page
Once quick question that came to my mind Is there any restriction or development limitation in the XSJSLIB
files
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1230 PM
gtCould please help me in understanding in more advantagesdisadvantages for both techniques
Youve summarized it pretty well already
gtbecuase i dont want to use both the approaches
Even with the CRUD support and exits in XSODATA its still pretty hard to do 100 via XSODATA There are
still valid use cases for XSJS when you need custom body custom read processing job scheduling etc Its
good to try and use XSODATA whenever possible but I wouldnt automatically exclude the use of XSJS
Vikas MadaanFeb 11 2014 1008 AM
Hi Thomas
Thanks a lot for sharing useful information through various blogs
In my current project we are evaluating use of XSOData or XSJS applications I saw your videos like the one
mentioned below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010042
httpwwwsaphanacomdocsDOC-4376
Want i understood from various blog is this
From SP7 we can write exsits in the OData services and it is very easy to consume at the client side just like
any REST base service and from my understanding it is Scalable as well I would love to use XSOData always
becuase development effort is very less compare to XSJS and it is very easy to rampup the team on OData
related development objects
XSJS were as provide more control becuase of server side scripting becuase it allows development on the
server side using JavaScript Core APIs of SAP HANA Extended Application Services are therefore exposed
as JavaScript functions providing easy access to the HTTP Request and Response object as well database
access to execute SQL or call SQLScript Procedures It provide us control over the body format and and URL
parameter definition
Could please help me in understanding in more advantagesdisadvantages for both techniques
I am very keen to understand and also explain the same to team members becuase i dont want to use both the
approaches and even sometimes customer can also ask the same to us
Also If we are on SP6 then from my understanding XSJS provides us more capability in terms of complex
application Corrent me If i am wrong
Thanks
Regards
Vikas Madaan
Thomas Jung in response to Raghuveer Phull on page 42Feb 5 2014 312 PM
Yes there are videos on the CRUD features of XSODATA which were new in SP6
For more on CRUD support in SP6 see this video
oData CreateUpdateDelete Support in SAP HANA SPS6
For the extended support for XSJS exits in SP7 see this video
SAP HANA SPS 07 XSODATA Exits in XSJS
Raghuveer PhullFeb 5 2014 122 AM
Do you have an exampledocumentationvideo where you can write a service which will populate Hana DB
What I am asking for is a way for my external script to populate the DB tables i have created in Hana DB
Thomas Jung in response to reda miraoui on page 43Jan 29 2014 411 PM
The source code for the examples shown here are shipped as part of SHINE (SAP HANA Interactive
Education)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010043
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Vivek Singh Bhoj in response to reda miraoui on page 43Jan 29 2014 352 PM
Hi Reda
You can import Shine Content in HANA and then check all these source codes
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Regards
Vivek
reda miraoui in response to Thomas Jung on page Jan 29 2014 344 PM
Hey Thomas
Is it possible to download source code of your project from this HANA tutorial
Thanks
Reda
Thomas Jung in response to Abdul Hakim on page 43Nov 21 2013 1133 PM
Yes River can be used as an alternative and when activated it will generate Server Side JavaScript andor
SQLScript
Abdul Hakim in response to Thomas Jung on page 44Nov 21 2013 747 PM
Hi Thomas - Was going through blog regarding River (RDL)Just a question on this
When you say Programming language for HANA native development is Server side Javascript SQL SQL
ScriptOnce RDL is rolled out whether RDL can be used for native application development instead of Server
side Java script SQL SQL Script I am very much new to this stuff so appreciate if you can also help on
how to get started with Server Side Java script SQL SQL Script for HANA
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 30 2013 750 AM
Hi Thomas
Thanks for your response I am talking about more content on shine
thanks
Ashutosh
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010044
Baskar Gopalakrishnan in response to Thomas Jung on page 44Oct 30 2013 1249 AM
Hi Thomas
Im a SAP PI Middleware consultantSAP topic leader in XIPI heavily worked on Java related
Netweaver stack I have knowledge in ABAP but not worked heavily in abap I have enrolled your sap hana
native application development course I feel very interesting I did work heavily in java and javascript projects
using eclipse development tool Do you think if I invest my time in just native hana development and proceed
in HANA field is a good step I dont have BW experience either
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 819 PM
Thanks for the clarification Much appreciated
Thomas Jung in response to Abdul Hakim on page 44Oct 29 2013 120 PM
gtABAP Close to HANA means whether we can expect a similar 2 tier architecture similar to HANA XS in the
future or what does that mean
No it doesnt mean that ABAP will become a 2 tier architecture We will not move the ABAP VMKernel into
HANA itself It will remain a separate application server At least for the current plansforeseeable future What
he was referring to was bringing the programming models closer For instance the new 740 SP5 feature that
allows you to write SQLScript directly within an ABAP class method
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 650 AM
Thomas - Thanks for the clarificationMuch appreciatedI was listening to ABAP on HANA session by
Thorsten Schneider this year Teched and he was mentioning that SAP Plans to bring ABAP very close to
HANA in the coming future but not much details have been discussed in the sessionABAP Close to HANA
means whether we can expect a similar 2 tier architecture similar to HANA XS in the future or what does that
mean
Thanks
Hakim
Thomas Jung in response to Abdul Hakim on page 45Oct 28 2013 703 PM
gt whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the option is
recommended by SAP then kindly share the pros and cons of each of the item
Taken from the TechEd CD103 session slides
Guidance
bulluse ABAP for optimization of existing progams (in context of SAP Business Suite or BW)
bullconsider HANA Native Development for development of new applications which will solely run on SAP HANA
bullcombine ABAP and HANA Native Development to enrich existing applications (eg SAP HANA Live Fiori)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010045
ABAP
bullapplications follow 3-tier architecture
bullABAP is in general database agnostic but with release 74 optimized for SAP HANA
bullProgramming language ABAP ABAP OO with the option to use SAP HANA features
bullIDE eclipse-based ABAP Development Tools
HANA Native Development
bullapplications follow 2-tier architecture
bullHANA Native Development is SAP HANA specific and embedded in the database
bullProgramming language River server-side JavaScript SQLSQLScript
bullIDE eclipse-based SAP HANA Studio + web IDE
Thomas Jung in response to ashutosh dixit on page 45Oct 28 2013 701 PM
gtIs there any more demos for the SHINE
Im not exactly sure what you mean by that We are building additional content for SHINE that will be delivered
in SP7
Abdul HakimOct 28 2013 326 PM
Thomas - Let us say a customer is running SAP Netweaver 74 ABAP with HANA DB and they have HANA
extended service as wellIf the customer wants to do new developments then what is the recommendation
from SAP ie whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the
option is recommended by SAP then kindly share the pros and cons of each of the item (SAP Netweaver 74
ABAP Vs SAP HANA XS)
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 28 2013 221 PM
Hi Thomas
Thanks a lot for your its working now
Is there any more demos for the SHINE
Thanks
Ashutosh
Thomas Jung in response to ashutosh dixit on page 46Oct 25 2013 809 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010046
As this content is now standard in SP6 as part of SHINE (SAP HANA INteractive Education) there also some
setup instructions on helpsapcom
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Basic points to check - have you generated the synonyms in the data generator Ran the data generator to
create some data Have the role assigned Added client 001 to your user profile
ashutosh dixitOct 24 2013 130 PM
Hi Thomas
Amazing blog - once again Thomas thanks
I have been following you for many days attended your OPEN SAP course also
That was an amazing course for new learner like me
One of our client is looking forward for XS based search Application identical to what you have created in your
DEMO
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010047
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010048
But I am not able to fetch the data on blank HTML page is coming with no data
If there is any step by step document related to this please help in getting that
Any help will be highly appreciated
Thanks
Ashutosh
Naveen KumarSep 26 2013 1130 AM
Good Document
Heber FabianoAug 27 2013 323 PM
Great content as always Keep sharing with us
Thomas Jung in response to Orel Stringa on page 48Aug 27 2013 147 PM
This is currently not possible The CORS support is for all origins We dont yet have the feature to maintain a
whitelist of CORS origins
Orel Stringa in response to Thomas Jung on page Aug 27 2013 801 AM
Hi Thomas
nice to see that SAP has made it possible with SP6 to specify cross origin resource sharing (CORS) support
via the xsaccess file SP6 HANA development guide has example of how to specify CORS support
I have build an XS application and would like to serve SAPUI5 on a diffhost than XSHANA
How can I specify that I would like to allow cross origin access restricted to certain domain(s) only
Is there a special keyword syntax for specifying that
Thank yoi
Orel
Vijay UthayakumarAug 27 2013 131 AM
Highly informative amp digestible Fantastic work
Jerry WangAug 1 2013 955 AM
Hi Tomas
Thank you
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010049
Jerry
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 644 PM
JSLint checks are very strict and often produce syntax errors for items that just stylistic and wont actually
cause an error upon activation or runtime You can either ignore the JSLint errors or deactivate JSLint for this
project in these cases However it might also be an indication that the JavaScript code you are trying to import
isnt compatible with Strict mode
httpsdevelopermozillaorgen-USdocsWebJavaScriptReferenceFunctions_and_function_scope
Strict_mode
Milan Vrozina in response to Thomas Jung on page 49Jul 21 2013 624 PM
Thanks for clarification I thought there would be some kind of import
But anyway in case of this specific library I have some problems with JSLint validation when I do cut and paste
of the original code
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 343 PM
What kind of problem are you having using this library Strict mode JavaScript which doesnt try to access the
DOM Window or other client side specific objects should work in Server Side XSJS Generally if you have a
library you just cut and paste into your XSJS or an XSJSLIB file and then call the functions from your code
Milan VrozinaJul 21 2013 339 PM
Hello
first and foremost thank you for perfect openSAP classes related to HANA development and for this blog as
well
I have one question related to server-side javascript You mentioned in course that is possible to use 3rd party
libraries or reuse 3rd party code But I cant find a possible way how to import 3rd party javascript library -as
is- to server and use it For example I would like to use JSZip library to zip some file before sending it to client
from xsjs application Is that possible Thank you
Chandrashekhar MahajanJul 3 2013 734 PM
This is excellent blog Now HANA XS is very much clear to me
Mohan krishnaJul 1 2013 144 PM
WOW - great blog Thomas This will be very helpful in understanding SAP hana Good Job
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010050
Abdul Hakim in response to Thomas Jung on page 50Jun 27 2013 833 PM
Thanks for the clarification
Thomas Jung in response to Abdul Hakim on page 50Jun 27 2013 659 PM
HANA Extended Application Services uses SQLScript and JavaScript as its two primary programming
languages
gtwhether the current SAP Business suite based on ABAP will be completely migrated to HANA service
No The Business Suite already runs on HANA but still via the ABAP application server It will continue to
leverage HANA via a combination of enhancements to ABAP and utilizing some of the technologies described
in this blog
gtAlso whether ABAP can be used to built application in HANA extended services
No There is no ABAP language container in HANA Extended Application Services
Abdul HakimJun 27 2013 405 PM
Hi Thomas - What is the programming language used for HANA Extended application services
As HANA is more than a database ie application platform by itself and as you mentioned that more and more
applications will be built on HANA i have question as how the future SAP ERP system looks likewhether the
current SAP Business suite based on ABAP will be completely migrated to HANA service in the future or SAP
ABAP server will continue to evolve and receive focus investment from SAP Also whether ABAP can be used
to built application in HANA extended services Your thoughts
Thanks
Abdul Hakim
Thomas Jung in response to Ravindra Channe on page 50Jun 11 2013 830 PM
Yes it is still planned However we are still a couple of weeks away and Ive not seen the final installers to say
for certain its there
Ravindra ChanneJun 11 2013 815 PM
Hi Thomas
Thanks for a wonderful and very informative blog Is there any update on 32 bit REGI file
Is it expected along with SPS6
Regards
Ravi
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010051
Thomas Jung in response to Amanda Rzepka on page Jun 7 2013 942 PM
gtCan the XS Services be used in a BW on HANA Scenario
Yes XS is part of ALL HANA systems You should check and make sure you are licensed for direct access to
the underlying HANA instance however
Thomas Jung in response to Holger Schimanski on page Jun 7 2013 941 PM
gtIs there a similar library which could be used in XS Engine
The XSODATA development object is similar We also have higher level frameworks for XMLA and Search
Services (InA) You can expect more such high level frameworks to be added to the HANA Extended
Application Services in the future
Thomas Jung in response to Manav Mehra on page Jun 7 2013 939 PM
Have you used something like the Chrome developer tools to see see if you are getting any client side
javascript errors or to see if the request to your xsodata service is successful
Thomas Jung in response to Christian Hufnagl on page 52Jun 7 2013 938 PM
It will ship as non-automatic content in SPS6 (all systems will have it and it just needs to be imported) The
delivery units are also part of this weeks updates to the Cloudshare and AWS developer center images They
are also available for download as part of the content of the openSAP course
Thomas Jung in response to Matthew Pickell on page 51Jun 7 2013 937 PM
CORS support will come with SPS6 at the end of June
Thomas Jung in response to Jeroen Custers on page 51Jun 7 2013 936 PM
gtWill this bug be fixed in HANA ver 56
Personally Ive still experienced this bug in SPS6 internal builds Must be a tricky one to find Luckily the
workaround of closing and reopening isnt too difficult Just annoying This also probably makes the bug low
priority
Jeroen Custers in response to Vivek Singh Bhoj on page 52Jun 7 2013 411 PM
This issue also occurs on rev56
Matthew PickellJun 7 2013 258 PM
Thomas
Has CORS been included in a release yet
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010052
Vivek Singh Bhoj in response to Chandra Edem on page 52Jun 5 2013 601 AM
Hi Chandra
Date for Week1 Assignment has been extended till June 11
So you can give Week 1 Assignment now
Christian HufnaglJun 4 2013 543 PM
Hi Thomas
thank you for the interesting tutorial
Can you tell me whether it is possible to download the source code of the ldquoPutting it all togetherrdquovideo And if yes Where can I download itThanks
Christoph
Vivek Singh BhojJun 4 2013 1116 AM
Hi Thomas
Thanks for OpenSAP classes
Your Youtube Account also have very good exercises
IN OpenSAP Week 2 Unit 3 tutorial after assigning admin role to my user Id i am not able to see sequences
synonyms triggers under my schema or any other schema i am only able to see Column Views Procedures
Tables and Views
Though now i am able to insert data into my created table
Can you let me know how i will be able to see Sequences under my schema without removing the admin role
I am using HANA revision 52
Got to know from OpenSAP that
This is a known issue and the only way that Ive seen to fix it is to actually close the studio and open it again
then refresh the node
Cheers
Rich Heilman
SAP HANA Product Management
Will this bug be fixed in HANA ver 56
Chandra Edem in response to Thomas Jung on page 53Jun 4 2013 646 AM
Thomas
I registered for OpenSAP course Introduction to Software Development on SAP HANA on June 2 900PM
I didnt know that it is going to end WEEK1 assignment test on 632013 300PM Is there any way can take
that WEEK1 Assignment Test
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010053
Thanks
Chandra
Thomas Jung in response to Alexander Bauer on page Jun 3 2013 856 PM
SAPUI5 gets updated auutomatically when you apply HANA revisions There is no additional download or
update needed
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010025
I am trying to fetch the result of procedure in calc view and want to create odata service for that calculation
view
procedure code goes like this
---------------------------------------
CREATE PROCEDURE TWEETS_TODAY(OUT OP BIGINT)
language SQLSCRIPT sql security invoker default schema SOCIAL360 reads sql data as
BEGIN
SELECT COUNT() INTO OP FROM SOCIAL360STATUS WHERE CREATED_AT = CURRENT_DATE
END
calc view code goes like this
----------------------------------------
Begin Procedure Script
BEGIN
DECLARE OP BIGINT
CALL SOCIAL360TWEETS_TODAY(OPvar_out)
END End Procedure Script
Thanks
-Arshad
Thomas Jung in response to ARSHAD SHAIKH on page 25May 15 2014 944 AM
Your question seems to have no relation to the content in this blog Please consider instead asking general
HANA questions in the appropriate SCN Forum
ARSHAD SHAIKHMay 15 2014 917 AM
Hi Thomas
I want to call procedures in calculation view (procedures have out parameter)
Please suggest me step by step procedure with example and supporting documents
Thanks
ARSHAD SHAIKH
Henrique Pinto in response to Blair Krotenko on page 26Apr 16 2014 711 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010026
Hmm not really sure of that I see it but that might be because Im an employee
But the NET development partner I was working with was not enrolled in any kind of beta testing program and
they were able to download it so I guess you should as well
Make sure to go in the Installation and Upgrades menu and not the Support Packages and Patches
Go to httpservicesapcomswdc -gt Installations and Upgrades -gt Browse our Download Catalog -gt SAP In-
Memory (SAP HANA) -gt SAP HANA ADONET 10
Best regards
Henrique
Blair Krotenko in response to Henrique Pinto on page 26Apr 16 2014 656 PM
Thanks for the info Henrique but I cant find it I dont know if it is an authorization issue or do we need to be a
ramp-up customer to dl and use a beta product
Thanks
Blair
Henrique Pinto in response to Thomas Jung on page 27Apr 16 2014 614 PM
The ADONET provider is available for download in the SAP Service Marketplace (in beta edition so far)
Thomas Jung in response to Kamal Jain on page 26Apr 16 2014 514 PM
For general OData structure and syntax I find that the Odataorg website is very helpful For example on this
topic
httpwwwodataorgdocumentationodata-version-2-0uri-conventions
The syntax of a $expand query option is a comma-separated list of Navigation Properties Additionally each
Navigation Property can be followed by a forward slash and another Navigation Property to enable identifying a
multi-level relationship
The page also has some sample URLs
Kamal JainApr 16 2014 536 AM
Dear Thomas
I agree that we need to pass all the associations in the expand I tried with some of options but was not
through
Now i just tried with below syntax and able to achive Thx
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010027
httpdewdftzld025pgdevsapcorp8000DTHCPXSZPMIS_PRO_ACTUALxsodata
ZPROHEADER(PR07_000002)$expand=ZACTUZEMPD
Regards
Kamal Jain
Thomas Jung in response to Blair Krotenko on page 27Apr 15 2014 623 PM
We do plan to release an ADONET provider specific to HANA in the near future This would probably be the
best option for consumption from NET Until then I would think that ODBC is probably the next best option It
gives you generally easy portability from already existing database code You could consume OData as well
although that is more generally consumed from the UI layer itself It guess it somewhat depends upon where
you are calling the service from in your NET application
Blair KrotenkoApr 15 2014 409 PM
Hi Thomas
We are looking at consuming HANA data in a NET application and from what I can see there are 2 options -
OData and ODBC It seems to me that OData might be the better option when consuming HANA data in an XS
application while ODBC might be the better option for NET What are your thoughts Is there a paper on this
subject I havent been able to find a comparison document for this Are there any security caveats to be aware
of for these options
Thanks
Blair
Thomas Jung in response to Kamal Jain on page 27Apr 15 2014 136 PM
You have to list both associations in the expand on the URL if you want both relationships to be processed
Kamal JainApr 15 2014 1249 PM
Hi Thomas
Thx for valuable and useful information
I have an query regarding XS Odata service creation for more than 2 tables and get all the data in one
command
There is req in which service needs to be created for 3 tables to get data from all these
First table has Project ID as key second table has composite
ProjectID and Employee Id as key and third table has Employee id as
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010028
key
So if I create navigation for first 2 tables based on project id and use expand comand than its working fine and I
can see data of both the tables
Further if I add navigation for third table also as below then below expand is displaying data for first two tables
only Pls share how to use expand command in this case if possible to get all tables data based on project id
How to use navigation ZEMPD here
httpdewdftzld025pgdevsapcorp8000DTHCPXSZPMIS_PRO_ACTUALxsodata
ZPROHEADER(PR07_000002)$expand=ZACTUamp
service namespace
DTHCPXS
DTHCPDTHCPDBHCP_PROJECT_HEADER
as ZPROHEADER
navigates (PROJECT as
ZACTU)
DTHCPDTHCPDBHCPT_ZPMIS_ACTUAL
as ZACTU
navigates (EMPLOYEE as
ZEMPD )
DTHCPDTHCPDBHCP_ZPMIS_RES_MASTER
as ZEMPD
association PROJECT principal
ZPROHEADER(PROJECTID)
multiplicity 1 dependent
ZACTU(PROJECTID) multiplicity
association EMPLOYEE principal
ZACTU(EMPLOYEEID)
multiplicity 1 dependent
ZEMPD(EMPLOYEEID) multiplicity
1
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010029
Pls suggest if there is anything to add or correct in XS odata service syntax above
Regards
Kamal Jain
Vikas Madaan in response to Thomas Jung on page 29Apr 14 2014 458 PM
Thanks Thomas
Under which component
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 29Apr 14 2014 450 PM
No this isnt a known issue Ive seen Nor can I recreate the problem in my system No you cant maintain the
authentication in XSHTTPDEST itself It intentionally must be set in XSADMIN tool I can really only suggest
that you open a support ticket
Vikas MadaanApr 14 2014 431 PM
Hi Thomas
I am trying to pull data from SAP system onto HANA Database using XSJOB files I am calling RFC enabled
function modules over HTTP request It helps me replicating the real time ECC data onto HANA as well with
back ground jobs
I am facing one problem in the XSHTTPDEST file I am able to create and activate the file using studio and this
file is even visible in the web based XS administration tool But in the web based tool when i provide user and
password for basic authotication then system just clears the user id and password when i try to save This the
reason our HTTP requests are getting failed and below is the response we are getting in the response body
lthtmlgtltheadgtlttitlegtLogon Error Messagelttitlegt
Is this known issue or we are missing something Is it possible to provide user and password in the
XSHTTPDEST file Is there any particular syntax
I checked and i have the required authorizations as well develper Guide
Please help
Regards
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010030
Vikas Madaan
Abdul HakimFeb 22 2014 359 AM
Hi Thomas - Any recommended book or resource to learn and master Server Side Javascript There were
many books available in the market but as a beginner need to know the right resource book to start with and
master this stuffAlso whether SAP plan to conduct any training to teach Server Side Javascript similar to other
standard training offerings
Thanks
Hakim
Samuel Tanor-GyeduFeb 20 2014 839 AM
Thanks Thomas
I will definitely have a look at SHINE
Thomas Jung in response to gentilini andre on page 30Feb 19 2014 422 PM
Difficult to say what is wrong I several things which are different than our sample that does this You are using
a POST for instance instead of a GET However if you are gettting a 200 then I assume the service call is
correct In client side tools (like Chrome Developer Tools) you should be able to see the response object from
the call
However what I would really recommend is that you study the SHINE content (SAP HANA Interactive
Education) There is already a sample application which does this in SHINE Also it has some special
JavaScript in the UI to handle the file attachment via AXAJ call Perhaps that is the part you are missing
You can read more about SHINE here It is also included already installed in the latest version of the HANA
Developer Center trial image (SP7 based)
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
gentilini andreFeb 19 2014 325 PM
Hi Thomas
well I followed your hints but it still donacutet work
I created a xsjs File like below
function downloadExcel()
try
var body =
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010031
alert(drin)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
alert(drusse)
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount
tTax Amount tNetto Amount tCurrency n
while(rsnext())
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
catch (e)
alert(db conn funktioniert nicht)
var a = $requestparametersget(cmd)
$responsesetBody(Invalid Command +a)
switch (a)
case doex
$responsesetBody(Invalid Command +a)
alert(filedownload)
thisdownloadExcel()
break
default
$responsestatus = $nethttpINTERNAL_SERVER_ERROR
$responsesetBody(Invalid Command +a)
The Controllerjs File
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010032
doFileDownload function (oEvent)
jQuerysaprequire(sapuicommonsMessageBox)
sapuicommonsMessageBoxshow(Export Starten sapuicommonsMessageBoxIconconfirm
Information)
sapuicommonsMessageBoxconfirm(Export starteninform Confirmation)
return false
function inform(rValue)
alert (drinnnnne)
var aurl = FileDownloadxsjscmd=doex
if(rValue) If User presses Ok
alert(aurl)
jQueryajax(
url aurl
method POST
dataType json
datacmddoex
success sapuicommonsMessageBoxalert(Export wird ausgefuumlhrtConfirmation)
errorfunction onErrorCall(jqXHR textStatus errorThrown)
alert(jqXHRstatus)
sapuicommonsMessageBoxshow(jqXHRstatus
ERROR
Error in calling Service )
return
complete sapuicommonsMessageBoxalert(Export Erfolgreich
abgeschlossenConfirmation)
)
return false
else If the user presses Cancel
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010033
sapuicommonsMessageBoxalert(Vorgang abgebrochenNotification)
)
at last but not least the view
sapuijsview(zag1_ui_cv_03Index
Specifies the Controller belonging to this View
In the case that it is not implemented or that null is returned this View does not have a Controller
memberOf zag1_ui_cv_03Index
getControllerName function()
return zag1_ui_cv_03Index
Is initially called once after the Controller has been instantiated It is the place where the UI is
constructed
Since the Controller is given to this method its event handlers can be attached right away
memberOf zag1_ui_cv_03Index
createContent function(oController)
create a lite button with an icon and a text
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010034
lite true
)placeAt(btn)
oButton3attachPress(oControllerdoFileDownload)
var oButton4 = new sapuicommonsButton(
text Refresh
icon imagesrefreshjpg
lite true
press function() var data = oTableval()
if(data == )
alert(no data found)
return
print(content)
print(DatArray)
if (data = )
alert(Funzt)
JSONToCSVConvertor(data CUSTOMER AMOUNT true)
)placeAt(btn)
jQuerysaprequire(sapuitableTable)
create table control with properties
var oTable = new sapuitableTable(
width 100
rowHeight 50
title Amount per Partner
selectionMode sapuitableSelectionModeNone
)
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Company Name
)
template new sapuicommonsTextView(
text CompanyName
)
sortProperty CompanyName
))
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010035
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Partner ID
)
template new sapuicommonsTextView(
text PartnerId
)
sortProperty PartnerId
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Postal Code
textAlign sapuicoreTextAlignEnd
)
template new sapuicommonsTextView(
text PostalCode
textAlign sapuicoreTextAlignEnd
)
sortProperty PostalCode
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text City
)
template new sapuicommonsTextView(
text City
)
sortProperty City
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Purchase ID
)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010036
template new sapuicommonsTextView(
text PurchaseOrderId
)
sortProperty Currency
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Lifecycle Status
)
template new sapuicommonsTextView(
text LifecycleStatus
)
sortProperty LifecycleStatus
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Gross Amount
)
template new sapuicommonsTextView(
text GrossAmount
)
sortProperty GrossAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Tax Amount
)
template new sapuicommonsTextView(
text TaxAmount
)
sortProperty TaxAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Amount Netto
)
template new sapuicommonsTextView(
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010037
text CM_NET_Amount_001
)
sortProperty CM_NET_Amount_001
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Currency
)
template new sapuicommonsTextView(
text Currency
)
sortProperty Currency
))
var oModel = new sapuimodelodataODataModel
(httpqperiorvmcldsr8000ZAG1_WS_001ZAG1_CV_001xsodata false)
oTablesetModel(oModel)
oTablebindRows(Amount)
return oTable
)
It wonacutet call the function or better said the action of the button works fine till to the point where it should call the
xsjsfile to generate the excel-file I wondered that in the ajax part the error- success- and complete-part will
be executed at the same time and not only one of this statements The message is 200 (The request has
succeeded The information returned with the response is dependent on the method used in the request)
Maybe you can see where my mistake is or whats going wrong
Iacuteve the developer edition on cloudshare (Hana Studio rev68 Server is on SPS05)
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010038
Andreacute
Thomas Jung in response to Samuel Tanor-Gyedu on page 38Feb 19 2014 523 AM
I dont think I can help you This appears to a question about how odata4j works not about XS I have no
experience with odata4j myself
Samuel Tanor-GyeduFeb 18 2014 913 AM
Hi Thomas
I have an odata service with this endpointhttpss5hanaxshanatrialondemandcomservicesUserxsodata
I am now trying to consume it from eclipse with the odata4j libraries
This is how I get the endpoint
public UserServiceOdata(String endpointUri)
thisendpointUri = endpointUri
ODataConsumerdumpresponseHeaders(true)
consumer = ODataConsumerscreate(endpointUri)
This is my method to add a user
public User addUser(User user)
consumercreateEntity(entitySet)properties(OPropertiesint32(propertyUserId
usergetId()))properties(OPropertiesstring(propertyUserName
usergetName()))properties(OPropertiesstring(propertyUserEmail usergetEmail()))execute()
return user
When I call addUser method I get an Error
Caused by javaxxmlstreamXMLStreamException ParseError at [rowcol][78253]
Message The reference to entity sourceUrl must end with the delimiter
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010039
When I use this endpoint httpss5hanaxshanatrialondemandcomservicesUsersvc everything works fine
With the httpss5hanaxshanatrialondemandcomservicesUserxsodata I get errors
Please I would be very grateful for assistance
Thanks in advance
Regards
Samuel
Thomas Jung in response to gentilini andre on page 39Feb 18 2014 431 AM
You have a fundamental misunderstanding here You are placing server side JavaScript code in your client
side UI5 application The function downloadExcel is something you need to execute on the server It needs to
be in an XSJS file and it is called from the client side via AJAX - as a REST service not as a local function
gentilini andreFeb 17 2014 451 PM
Hello Thomas
Thank you for this great How-To Guide
Iacutem pretty new in SAPUI5 and tried your export-sample in my little trial project but it doesnacutet work
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010040
My Button for this looks like
ltcodegt
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
lite true
press function() alert(oButton3getText())
downloadExcel()
ltcodegt
and the function for this action looks like
ltcodegt
function downloadExcel()
var body =
alert(drin)
print($query)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount tTax
Amount tNetto Amount tCurrency n
while(rsnext())
if(rsnext() == )
alert($responsesetBody( Failed to retrieve data ))
alert($responsestatus = $nethttpINTERNAL_SERVER_ERROR)
else
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010041
ltcodegt
Iacutem afraid and hope that you can help me
Kind regards
Andreacute
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1246 PM
gtIs there any restriction or development limitation in the XSJSLIB files
Thats a very general question Difficult to answer without any context
Vikas Madaan in response to Thomas Jung on page 41Feb 11 2014 1245 PM
Thanks Thomas
I think we are on same page
Once quick question that came to my mind Is there any restriction or development limitation in the XSJSLIB
files
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1230 PM
gtCould please help me in understanding in more advantagesdisadvantages for both techniques
Youve summarized it pretty well already
gtbecuase i dont want to use both the approaches
Even with the CRUD support and exits in XSODATA its still pretty hard to do 100 via XSODATA There are
still valid use cases for XSJS when you need custom body custom read processing job scheduling etc Its
good to try and use XSODATA whenever possible but I wouldnt automatically exclude the use of XSJS
Vikas MadaanFeb 11 2014 1008 AM
Hi Thomas
Thanks a lot for sharing useful information through various blogs
In my current project we are evaluating use of XSOData or XSJS applications I saw your videos like the one
mentioned below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010042
httpwwwsaphanacomdocsDOC-4376
Want i understood from various blog is this
From SP7 we can write exsits in the OData services and it is very easy to consume at the client side just like
any REST base service and from my understanding it is Scalable as well I would love to use XSOData always
becuase development effort is very less compare to XSJS and it is very easy to rampup the team on OData
related development objects
XSJS were as provide more control becuase of server side scripting becuase it allows development on the
server side using JavaScript Core APIs of SAP HANA Extended Application Services are therefore exposed
as JavaScript functions providing easy access to the HTTP Request and Response object as well database
access to execute SQL or call SQLScript Procedures It provide us control over the body format and and URL
parameter definition
Could please help me in understanding in more advantagesdisadvantages for both techniques
I am very keen to understand and also explain the same to team members becuase i dont want to use both the
approaches and even sometimes customer can also ask the same to us
Also If we are on SP6 then from my understanding XSJS provides us more capability in terms of complex
application Corrent me If i am wrong
Thanks
Regards
Vikas Madaan
Thomas Jung in response to Raghuveer Phull on page 42Feb 5 2014 312 PM
Yes there are videos on the CRUD features of XSODATA which were new in SP6
For more on CRUD support in SP6 see this video
oData CreateUpdateDelete Support in SAP HANA SPS6
For the extended support for XSJS exits in SP7 see this video
SAP HANA SPS 07 XSODATA Exits in XSJS
Raghuveer PhullFeb 5 2014 122 AM
Do you have an exampledocumentationvideo where you can write a service which will populate Hana DB
What I am asking for is a way for my external script to populate the DB tables i have created in Hana DB
Thomas Jung in response to reda miraoui on page 43Jan 29 2014 411 PM
The source code for the examples shown here are shipped as part of SHINE (SAP HANA Interactive
Education)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010043
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Vivek Singh Bhoj in response to reda miraoui on page 43Jan 29 2014 352 PM
Hi Reda
You can import Shine Content in HANA and then check all these source codes
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Regards
Vivek
reda miraoui in response to Thomas Jung on page Jan 29 2014 344 PM
Hey Thomas
Is it possible to download source code of your project from this HANA tutorial
Thanks
Reda
Thomas Jung in response to Abdul Hakim on page 43Nov 21 2013 1133 PM
Yes River can be used as an alternative and when activated it will generate Server Side JavaScript andor
SQLScript
Abdul Hakim in response to Thomas Jung on page 44Nov 21 2013 747 PM
Hi Thomas - Was going through blog regarding River (RDL)Just a question on this
When you say Programming language for HANA native development is Server side Javascript SQL SQL
ScriptOnce RDL is rolled out whether RDL can be used for native application development instead of Server
side Java script SQL SQL Script I am very much new to this stuff so appreciate if you can also help on
how to get started with Server Side Java script SQL SQL Script for HANA
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 30 2013 750 AM
Hi Thomas
Thanks for your response I am talking about more content on shine
thanks
Ashutosh
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010044
Baskar Gopalakrishnan in response to Thomas Jung on page 44Oct 30 2013 1249 AM
Hi Thomas
Im a SAP PI Middleware consultantSAP topic leader in XIPI heavily worked on Java related
Netweaver stack I have knowledge in ABAP but not worked heavily in abap I have enrolled your sap hana
native application development course I feel very interesting I did work heavily in java and javascript projects
using eclipse development tool Do you think if I invest my time in just native hana development and proceed
in HANA field is a good step I dont have BW experience either
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 819 PM
Thanks for the clarification Much appreciated
Thomas Jung in response to Abdul Hakim on page 44Oct 29 2013 120 PM
gtABAP Close to HANA means whether we can expect a similar 2 tier architecture similar to HANA XS in the
future or what does that mean
No it doesnt mean that ABAP will become a 2 tier architecture We will not move the ABAP VMKernel into
HANA itself It will remain a separate application server At least for the current plansforeseeable future What
he was referring to was bringing the programming models closer For instance the new 740 SP5 feature that
allows you to write SQLScript directly within an ABAP class method
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 650 AM
Thomas - Thanks for the clarificationMuch appreciatedI was listening to ABAP on HANA session by
Thorsten Schneider this year Teched and he was mentioning that SAP Plans to bring ABAP very close to
HANA in the coming future but not much details have been discussed in the sessionABAP Close to HANA
means whether we can expect a similar 2 tier architecture similar to HANA XS in the future or what does that
mean
Thanks
Hakim
Thomas Jung in response to Abdul Hakim on page 45Oct 28 2013 703 PM
gt whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the option is
recommended by SAP then kindly share the pros and cons of each of the item
Taken from the TechEd CD103 session slides
Guidance
bulluse ABAP for optimization of existing progams (in context of SAP Business Suite or BW)
bullconsider HANA Native Development for development of new applications which will solely run on SAP HANA
bullcombine ABAP and HANA Native Development to enrich existing applications (eg SAP HANA Live Fiori)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010045
ABAP
bullapplications follow 3-tier architecture
bullABAP is in general database agnostic but with release 74 optimized for SAP HANA
bullProgramming language ABAP ABAP OO with the option to use SAP HANA features
bullIDE eclipse-based ABAP Development Tools
HANA Native Development
bullapplications follow 2-tier architecture
bullHANA Native Development is SAP HANA specific and embedded in the database
bullProgramming language River server-side JavaScript SQLSQLScript
bullIDE eclipse-based SAP HANA Studio + web IDE
Thomas Jung in response to ashutosh dixit on page 45Oct 28 2013 701 PM
gtIs there any more demos for the SHINE
Im not exactly sure what you mean by that We are building additional content for SHINE that will be delivered
in SP7
Abdul HakimOct 28 2013 326 PM
Thomas - Let us say a customer is running SAP Netweaver 74 ABAP with HANA DB and they have HANA
extended service as wellIf the customer wants to do new developments then what is the recommendation
from SAP ie whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the
option is recommended by SAP then kindly share the pros and cons of each of the item (SAP Netweaver 74
ABAP Vs SAP HANA XS)
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 28 2013 221 PM
Hi Thomas
Thanks a lot for your its working now
Is there any more demos for the SHINE
Thanks
Ashutosh
Thomas Jung in response to ashutosh dixit on page 46Oct 25 2013 809 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010046
As this content is now standard in SP6 as part of SHINE (SAP HANA INteractive Education) there also some
setup instructions on helpsapcom
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Basic points to check - have you generated the synonyms in the data generator Ran the data generator to
create some data Have the role assigned Added client 001 to your user profile
ashutosh dixitOct 24 2013 130 PM
Hi Thomas
Amazing blog - once again Thomas thanks
I have been following you for many days attended your OPEN SAP course also
That was an amazing course for new learner like me
One of our client is looking forward for XS based search Application identical to what you have created in your
DEMO
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010047
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010048
But I am not able to fetch the data on blank HTML page is coming with no data
If there is any step by step document related to this please help in getting that
Any help will be highly appreciated
Thanks
Ashutosh
Naveen KumarSep 26 2013 1130 AM
Good Document
Heber FabianoAug 27 2013 323 PM
Great content as always Keep sharing with us
Thomas Jung in response to Orel Stringa on page 48Aug 27 2013 147 PM
This is currently not possible The CORS support is for all origins We dont yet have the feature to maintain a
whitelist of CORS origins
Orel Stringa in response to Thomas Jung on page Aug 27 2013 801 AM
Hi Thomas
nice to see that SAP has made it possible with SP6 to specify cross origin resource sharing (CORS) support
via the xsaccess file SP6 HANA development guide has example of how to specify CORS support
I have build an XS application and would like to serve SAPUI5 on a diffhost than XSHANA
How can I specify that I would like to allow cross origin access restricted to certain domain(s) only
Is there a special keyword syntax for specifying that
Thank yoi
Orel
Vijay UthayakumarAug 27 2013 131 AM
Highly informative amp digestible Fantastic work
Jerry WangAug 1 2013 955 AM
Hi Tomas
Thank you
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010049
Jerry
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 644 PM
JSLint checks are very strict and often produce syntax errors for items that just stylistic and wont actually
cause an error upon activation or runtime You can either ignore the JSLint errors or deactivate JSLint for this
project in these cases However it might also be an indication that the JavaScript code you are trying to import
isnt compatible with Strict mode
httpsdevelopermozillaorgen-USdocsWebJavaScriptReferenceFunctions_and_function_scope
Strict_mode
Milan Vrozina in response to Thomas Jung on page 49Jul 21 2013 624 PM
Thanks for clarification I thought there would be some kind of import
But anyway in case of this specific library I have some problems with JSLint validation when I do cut and paste
of the original code
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 343 PM
What kind of problem are you having using this library Strict mode JavaScript which doesnt try to access the
DOM Window or other client side specific objects should work in Server Side XSJS Generally if you have a
library you just cut and paste into your XSJS or an XSJSLIB file and then call the functions from your code
Milan VrozinaJul 21 2013 339 PM
Hello
first and foremost thank you for perfect openSAP classes related to HANA development and for this blog as
well
I have one question related to server-side javascript You mentioned in course that is possible to use 3rd party
libraries or reuse 3rd party code But I cant find a possible way how to import 3rd party javascript library -as
is- to server and use it For example I would like to use JSZip library to zip some file before sending it to client
from xsjs application Is that possible Thank you
Chandrashekhar MahajanJul 3 2013 734 PM
This is excellent blog Now HANA XS is very much clear to me
Mohan krishnaJul 1 2013 144 PM
WOW - great blog Thomas This will be very helpful in understanding SAP hana Good Job
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010050
Abdul Hakim in response to Thomas Jung on page 50Jun 27 2013 833 PM
Thanks for the clarification
Thomas Jung in response to Abdul Hakim on page 50Jun 27 2013 659 PM
HANA Extended Application Services uses SQLScript and JavaScript as its two primary programming
languages
gtwhether the current SAP Business suite based on ABAP will be completely migrated to HANA service
No The Business Suite already runs on HANA but still via the ABAP application server It will continue to
leverage HANA via a combination of enhancements to ABAP and utilizing some of the technologies described
in this blog
gtAlso whether ABAP can be used to built application in HANA extended services
No There is no ABAP language container in HANA Extended Application Services
Abdul HakimJun 27 2013 405 PM
Hi Thomas - What is the programming language used for HANA Extended application services
As HANA is more than a database ie application platform by itself and as you mentioned that more and more
applications will be built on HANA i have question as how the future SAP ERP system looks likewhether the
current SAP Business suite based on ABAP will be completely migrated to HANA service in the future or SAP
ABAP server will continue to evolve and receive focus investment from SAP Also whether ABAP can be used
to built application in HANA extended services Your thoughts
Thanks
Abdul Hakim
Thomas Jung in response to Ravindra Channe on page 50Jun 11 2013 830 PM
Yes it is still planned However we are still a couple of weeks away and Ive not seen the final installers to say
for certain its there
Ravindra ChanneJun 11 2013 815 PM
Hi Thomas
Thanks for a wonderful and very informative blog Is there any update on 32 bit REGI file
Is it expected along with SPS6
Regards
Ravi
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010051
Thomas Jung in response to Amanda Rzepka on page Jun 7 2013 942 PM
gtCan the XS Services be used in a BW on HANA Scenario
Yes XS is part of ALL HANA systems You should check and make sure you are licensed for direct access to
the underlying HANA instance however
Thomas Jung in response to Holger Schimanski on page Jun 7 2013 941 PM
gtIs there a similar library which could be used in XS Engine
The XSODATA development object is similar We also have higher level frameworks for XMLA and Search
Services (InA) You can expect more such high level frameworks to be added to the HANA Extended
Application Services in the future
Thomas Jung in response to Manav Mehra on page Jun 7 2013 939 PM
Have you used something like the Chrome developer tools to see see if you are getting any client side
javascript errors or to see if the request to your xsodata service is successful
Thomas Jung in response to Christian Hufnagl on page 52Jun 7 2013 938 PM
It will ship as non-automatic content in SPS6 (all systems will have it and it just needs to be imported) The
delivery units are also part of this weeks updates to the Cloudshare and AWS developer center images They
are also available for download as part of the content of the openSAP course
Thomas Jung in response to Matthew Pickell on page 51Jun 7 2013 937 PM
CORS support will come with SPS6 at the end of June
Thomas Jung in response to Jeroen Custers on page 51Jun 7 2013 936 PM
gtWill this bug be fixed in HANA ver 56
Personally Ive still experienced this bug in SPS6 internal builds Must be a tricky one to find Luckily the
workaround of closing and reopening isnt too difficult Just annoying This also probably makes the bug low
priority
Jeroen Custers in response to Vivek Singh Bhoj on page 52Jun 7 2013 411 PM
This issue also occurs on rev56
Matthew PickellJun 7 2013 258 PM
Thomas
Has CORS been included in a release yet
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010052
Vivek Singh Bhoj in response to Chandra Edem on page 52Jun 5 2013 601 AM
Hi Chandra
Date for Week1 Assignment has been extended till June 11
So you can give Week 1 Assignment now
Christian HufnaglJun 4 2013 543 PM
Hi Thomas
thank you for the interesting tutorial
Can you tell me whether it is possible to download the source code of the ldquoPutting it all togetherrdquovideo And if yes Where can I download itThanks
Christoph
Vivek Singh BhojJun 4 2013 1116 AM
Hi Thomas
Thanks for OpenSAP classes
Your Youtube Account also have very good exercises
IN OpenSAP Week 2 Unit 3 tutorial after assigning admin role to my user Id i am not able to see sequences
synonyms triggers under my schema or any other schema i am only able to see Column Views Procedures
Tables and Views
Though now i am able to insert data into my created table
Can you let me know how i will be able to see Sequences under my schema without removing the admin role
I am using HANA revision 52
Got to know from OpenSAP that
This is a known issue and the only way that Ive seen to fix it is to actually close the studio and open it again
then refresh the node
Cheers
Rich Heilman
SAP HANA Product Management
Will this bug be fixed in HANA ver 56
Chandra Edem in response to Thomas Jung on page 53Jun 4 2013 646 AM
Thomas
I registered for OpenSAP course Introduction to Software Development on SAP HANA on June 2 900PM
I didnt know that it is going to end WEEK1 assignment test on 632013 300PM Is there any way can take
that WEEK1 Assignment Test
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010053
Thanks
Chandra
Thomas Jung in response to Alexander Bauer on page Jun 3 2013 856 PM
SAPUI5 gets updated auutomatically when you apply HANA revisions There is no additional download or
update needed
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010026
Hmm not really sure of that I see it but that might be because Im an employee
But the NET development partner I was working with was not enrolled in any kind of beta testing program and
they were able to download it so I guess you should as well
Make sure to go in the Installation and Upgrades menu and not the Support Packages and Patches
Go to httpservicesapcomswdc -gt Installations and Upgrades -gt Browse our Download Catalog -gt SAP In-
Memory (SAP HANA) -gt SAP HANA ADONET 10
Best regards
Henrique
Blair Krotenko in response to Henrique Pinto on page 26Apr 16 2014 656 PM
Thanks for the info Henrique but I cant find it I dont know if it is an authorization issue or do we need to be a
ramp-up customer to dl and use a beta product
Thanks
Blair
Henrique Pinto in response to Thomas Jung on page 27Apr 16 2014 614 PM
The ADONET provider is available for download in the SAP Service Marketplace (in beta edition so far)
Thomas Jung in response to Kamal Jain on page 26Apr 16 2014 514 PM
For general OData structure and syntax I find that the Odataorg website is very helpful For example on this
topic
httpwwwodataorgdocumentationodata-version-2-0uri-conventions
The syntax of a $expand query option is a comma-separated list of Navigation Properties Additionally each
Navigation Property can be followed by a forward slash and another Navigation Property to enable identifying a
multi-level relationship
The page also has some sample URLs
Kamal JainApr 16 2014 536 AM
Dear Thomas
I agree that we need to pass all the associations in the expand I tried with some of options but was not
through
Now i just tried with below syntax and able to achive Thx
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010027
httpdewdftzld025pgdevsapcorp8000DTHCPXSZPMIS_PRO_ACTUALxsodata
ZPROHEADER(PR07_000002)$expand=ZACTUZEMPD
Regards
Kamal Jain
Thomas Jung in response to Blair Krotenko on page 27Apr 15 2014 623 PM
We do plan to release an ADONET provider specific to HANA in the near future This would probably be the
best option for consumption from NET Until then I would think that ODBC is probably the next best option It
gives you generally easy portability from already existing database code You could consume OData as well
although that is more generally consumed from the UI layer itself It guess it somewhat depends upon where
you are calling the service from in your NET application
Blair KrotenkoApr 15 2014 409 PM
Hi Thomas
We are looking at consuming HANA data in a NET application and from what I can see there are 2 options -
OData and ODBC It seems to me that OData might be the better option when consuming HANA data in an XS
application while ODBC might be the better option for NET What are your thoughts Is there a paper on this
subject I havent been able to find a comparison document for this Are there any security caveats to be aware
of for these options
Thanks
Blair
Thomas Jung in response to Kamal Jain on page 27Apr 15 2014 136 PM
You have to list both associations in the expand on the URL if you want both relationships to be processed
Kamal JainApr 15 2014 1249 PM
Hi Thomas
Thx for valuable and useful information
I have an query regarding XS Odata service creation for more than 2 tables and get all the data in one
command
There is req in which service needs to be created for 3 tables to get data from all these
First table has Project ID as key second table has composite
ProjectID and Employee Id as key and third table has Employee id as
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010028
key
So if I create navigation for first 2 tables based on project id and use expand comand than its working fine and I
can see data of both the tables
Further if I add navigation for third table also as below then below expand is displaying data for first two tables
only Pls share how to use expand command in this case if possible to get all tables data based on project id
How to use navigation ZEMPD here
httpdewdftzld025pgdevsapcorp8000DTHCPXSZPMIS_PRO_ACTUALxsodata
ZPROHEADER(PR07_000002)$expand=ZACTUamp
service namespace
DTHCPXS
DTHCPDTHCPDBHCP_PROJECT_HEADER
as ZPROHEADER
navigates (PROJECT as
ZACTU)
DTHCPDTHCPDBHCPT_ZPMIS_ACTUAL
as ZACTU
navigates (EMPLOYEE as
ZEMPD )
DTHCPDTHCPDBHCP_ZPMIS_RES_MASTER
as ZEMPD
association PROJECT principal
ZPROHEADER(PROJECTID)
multiplicity 1 dependent
ZACTU(PROJECTID) multiplicity
association EMPLOYEE principal
ZACTU(EMPLOYEEID)
multiplicity 1 dependent
ZEMPD(EMPLOYEEID) multiplicity
1
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010029
Pls suggest if there is anything to add or correct in XS odata service syntax above
Regards
Kamal Jain
Vikas Madaan in response to Thomas Jung on page 29Apr 14 2014 458 PM
Thanks Thomas
Under which component
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 29Apr 14 2014 450 PM
No this isnt a known issue Ive seen Nor can I recreate the problem in my system No you cant maintain the
authentication in XSHTTPDEST itself It intentionally must be set in XSADMIN tool I can really only suggest
that you open a support ticket
Vikas MadaanApr 14 2014 431 PM
Hi Thomas
I am trying to pull data from SAP system onto HANA Database using XSJOB files I am calling RFC enabled
function modules over HTTP request It helps me replicating the real time ECC data onto HANA as well with
back ground jobs
I am facing one problem in the XSHTTPDEST file I am able to create and activate the file using studio and this
file is even visible in the web based XS administration tool But in the web based tool when i provide user and
password for basic authotication then system just clears the user id and password when i try to save This the
reason our HTTP requests are getting failed and below is the response we are getting in the response body
lthtmlgtltheadgtlttitlegtLogon Error Messagelttitlegt
Is this known issue or we are missing something Is it possible to provide user and password in the
XSHTTPDEST file Is there any particular syntax
I checked and i have the required authorizations as well develper Guide
Please help
Regards
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010030
Vikas Madaan
Abdul HakimFeb 22 2014 359 AM
Hi Thomas - Any recommended book or resource to learn and master Server Side Javascript There were
many books available in the market but as a beginner need to know the right resource book to start with and
master this stuffAlso whether SAP plan to conduct any training to teach Server Side Javascript similar to other
standard training offerings
Thanks
Hakim
Samuel Tanor-GyeduFeb 20 2014 839 AM
Thanks Thomas
I will definitely have a look at SHINE
Thomas Jung in response to gentilini andre on page 30Feb 19 2014 422 PM
Difficult to say what is wrong I several things which are different than our sample that does this You are using
a POST for instance instead of a GET However if you are gettting a 200 then I assume the service call is
correct In client side tools (like Chrome Developer Tools) you should be able to see the response object from
the call
However what I would really recommend is that you study the SHINE content (SAP HANA Interactive
Education) There is already a sample application which does this in SHINE Also it has some special
JavaScript in the UI to handle the file attachment via AXAJ call Perhaps that is the part you are missing
You can read more about SHINE here It is also included already installed in the latest version of the HANA
Developer Center trial image (SP7 based)
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
gentilini andreFeb 19 2014 325 PM
Hi Thomas
well I followed your hints but it still donacutet work
I created a xsjs File like below
function downloadExcel()
try
var body =
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010031
alert(drin)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
alert(drusse)
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount
tTax Amount tNetto Amount tCurrency n
while(rsnext())
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
catch (e)
alert(db conn funktioniert nicht)
var a = $requestparametersget(cmd)
$responsesetBody(Invalid Command +a)
switch (a)
case doex
$responsesetBody(Invalid Command +a)
alert(filedownload)
thisdownloadExcel()
break
default
$responsestatus = $nethttpINTERNAL_SERVER_ERROR
$responsesetBody(Invalid Command +a)
The Controllerjs File
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010032
doFileDownload function (oEvent)
jQuerysaprequire(sapuicommonsMessageBox)
sapuicommonsMessageBoxshow(Export Starten sapuicommonsMessageBoxIconconfirm
Information)
sapuicommonsMessageBoxconfirm(Export starteninform Confirmation)
return false
function inform(rValue)
alert (drinnnnne)
var aurl = FileDownloadxsjscmd=doex
if(rValue) If User presses Ok
alert(aurl)
jQueryajax(
url aurl
method POST
dataType json
datacmddoex
success sapuicommonsMessageBoxalert(Export wird ausgefuumlhrtConfirmation)
errorfunction onErrorCall(jqXHR textStatus errorThrown)
alert(jqXHRstatus)
sapuicommonsMessageBoxshow(jqXHRstatus
ERROR
Error in calling Service )
return
complete sapuicommonsMessageBoxalert(Export Erfolgreich
abgeschlossenConfirmation)
)
return false
else If the user presses Cancel
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010033
sapuicommonsMessageBoxalert(Vorgang abgebrochenNotification)
)
at last but not least the view
sapuijsview(zag1_ui_cv_03Index
Specifies the Controller belonging to this View
In the case that it is not implemented or that null is returned this View does not have a Controller
memberOf zag1_ui_cv_03Index
getControllerName function()
return zag1_ui_cv_03Index
Is initially called once after the Controller has been instantiated It is the place where the UI is
constructed
Since the Controller is given to this method its event handlers can be attached right away
memberOf zag1_ui_cv_03Index
createContent function(oController)
create a lite button with an icon and a text
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010034
lite true
)placeAt(btn)
oButton3attachPress(oControllerdoFileDownload)
var oButton4 = new sapuicommonsButton(
text Refresh
icon imagesrefreshjpg
lite true
press function() var data = oTableval()
if(data == )
alert(no data found)
return
print(content)
print(DatArray)
if (data = )
alert(Funzt)
JSONToCSVConvertor(data CUSTOMER AMOUNT true)
)placeAt(btn)
jQuerysaprequire(sapuitableTable)
create table control with properties
var oTable = new sapuitableTable(
width 100
rowHeight 50
title Amount per Partner
selectionMode sapuitableSelectionModeNone
)
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Company Name
)
template new sapuicommonsTextView(
text CompanyName
)
sortProperty CompanyName
))
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010035
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Partner ID
)
template new sapuicommonsTextView(
text PartnerId
)
sortProperty PartnerId
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Postal Code
textAlign sapuicoreTextAlignEnd
)
template new sapuicommonsTextView(
text PostalCode
textAlign sapuicoreTextAlignEnd
)
sortProperty PostalCode
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text City
)
template new sapuicommonsTextView(
text City
)
sortProperty City
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Purchase ID
)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010036
template new sapuicommonsTextView(
text PurchaseOrderId
)
sortProperty Currency
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Lifecycle Status
)
template new sapuicommonsTextView(
text LifecycleStatus
)
sortProperty LifecycleStatus
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Gross Amount
)
template new sapuicommonsTextView(
text GrossAmount
)
sortProperty GrossAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Tax Amount
)
template new sapuicommonsTextView(
text TaxAmount
)
sortProperty TaxAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Amount Netto
)
template new sapuicommonsTextView(
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010037
text CM_NET_Amount_001
)
sortProperty CM_NET_Amount_001
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Currency
)
template new sapuicommonsTextView(
text Currency
)
sortProperty Currency
))
var oModel = new sapuimodelodataODataModel
(httpqperiorvmcldsr8000ZAG1_WS_001ZAG1_CV_001xsodata false)
oTablesetModel(oModel)
oTablebindRows(Amount)
return oTable
)
It wonacutet call the function or better said the action of the button works fine till to the point where it should call the
xsjsfile to generate the excel-file I wondered that in the ajax part the error- success- and complete-part will
be executed at the same time and not only one of this statements The message is 200 (The request has
succeeded The information returned with the response is dependent on the method used in the request)
Maybe you can see where my mistake is or whats going wrong
Iacuteve the developer edition on cloudshare (Hana Studio rev68 Server is on SPS05)
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010038
Andreacute
Thomas Jung in response to Samuel Tanor-Gyedu on page 38Feb 19 2014 523 AM
I dont think I can help you This appears to a question about how odata4j works not about XS I have no
experience with odata4j myself
Samuel Tanor-GyeduFeb 18 2014 913 AM
Hi Thomas
I have an odata service with this endpointhttpss5hanaxshanatrialondemandcomservicesUserxsodata
I am now trying to consume it from eclipse with the odata4j libraries
This is how I get the endpoint
public UserServiceOdata(String endpointUri)
thisendpointUri = endpointUri
ODataConsumerdumpresponseHeaders(true)
consumer = ODataConsumerscreate(endpointUri)
This is my method to add a user
public User addUser(User user)
consumercreateEntity(entitySet)properties(OPropertiesint32(propertyUserId
usergetId()))properties(OPropertiesstring(propertyUserName
usergetName()))properties(OPropertiesstring(propertyUserEmail usergetEmail()))execute()
return user
When I call addUser method I get an Error
Caused by javaxxmlstreamXMLStreamException ParseError at [rowcol][78253]
Message The reference to entity sourceUrl must end with the delimiter
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010039
When I use this endpoint httpss5hanaxshanatrialondemandcomservicesUsersvc everything works fine
With the httpss5hanaxshanatrialondemandcomservicesUserxsodata I get errors
Please I would be very grateful for assistance
Thanks in advance
Regards
Samuel
Thomas Jung in response to gentilini andre on page 39Feb 18 2014 431 AM
You have a fundamental misunderstanding here You are placing server side JavaScript code in your client
side UI5 application The function downloadExcel is something you need to execute on the server It needs to
be in an XSJS file and it is called from the client side via AJAX - as a REST service not as a local function
gentilini andreFeb 17 2014 451 PM
Hello Thomas
Thank you for this great How-To Guide
Iacutem pretty new in SAPUI5 and tried your export-sample in my little trial project but it doesnacutet work
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010040
My Button for this looks like
ltcodegt
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
lite true
press function() alert(oButton3getText())
downloadExcel()
ltcodegt
and the function for this action looks like
ltcodegt
function downloadExcel()
var body =
alert(drin)
print($query)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount tTax
Amount tNetto Amount tCurrency n
while(rsnext())
if(rsnext() == )
alert($responsesetBody( Failed to retrieve data ))
alert($responsestatus = $nethttpINTERNAL_SERVER_ERROR)
else
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010041
ltcodegt
Iacutem afraid and hope that you can help me
Kind regards
Andreacute
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1246 PM
gtIs there any restriction or development limitation in the XSJSLIB files
Thats a very general question Difficult to answer without any context
Vikas Madaan in response to Thomas Jung on page 41Feb 11 2014 1245 PM
Thanks Thomas
I think we are on same page
Once quick question that came to my mind Is there any restriction or development limitation in the XSJSLIB
files
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1230 PM
gtCould please help me in understanding in more advantagesdisadvantages for both techniques
Youve summarized it pretty well already
gtbecuase i dont want to use both the approaches
Even with the CRUD support and exits in XSODATA its still pretty hard to do 100 via XSODATA There are
still valid use cases for XSJS when you need custom body custom read processing job scheduling etc Its
good to try and use XSODATA whenever possible but I wouldnt automatically exclude the use of XSJS
Vikas MadaanFeb 11 2014 1008 AM
Hi Thomas
Thanks a lot for sharing useful information through various blogs
In my current project we are evaluating use of XSOData or XSJS applications I saw your videos like the one
mentioned below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010042
httpwwwsaphanacomdocsDOC-4376
Want i understood from various blog is this
From SP7 we can write exsits in the OData services and it is very easy to consume at the client side just like
any REST base service and from my understanding it is Scalable as well I would love to use XSOData always
becuase development effort is very less compare to XSJS and it is very easy to rampup the team on OData
related development objects
XSJS were as provide more control becuase of server side scripting becuase it allows development on the
server side using JavaScript Core APIs of SAP HANA Extended Application Services are therefore exposed
as JavaScript functions providing easy access to the HTTP Request and Response object as well database
access to execute SQL or call SQLScript Procedures It provide us control over the body format and and URL
parameter definition
Could please help me in understanding in more advantagesdisadvantages for both techniques
I am very keen to understand and also explain the same to team members becuase i dont want to use both the
approaches and even sometimes customer can also ask the same to us
Also If we are on SP6 then from my understanding XSJS provides us more capability in terms of complex
application Corrent me If i am wrong
Thanks
Regards
Vikas Madaan
Thomas Jung in response to Raghuveer Phull on page 42Feb 5 2014 312 PM
Yes there are videos on the CRUD features of XSODATA which were new in SP6
For more on CRUD support in SP6 see this video
oData CreateUpdateDelete Support in SAP HANA SPS6
For the extended support for XSJS exits in SP7 see this video
SAP HANA SPS 07 XSODATA Exits in XSJS
Raghuveer PhullFeb 5 2014 122 AM
Do you have an exampledocumentationvideo where you can write a service which will populate Hana DB
What I am asking for is a way for my external script to populate the DB tables i have created in Hana DB
Thomas Jung in response to reda miraoui on page 43Jan 29 2014 411 PM
The source code for the examples shown here are shipped as part of SHINE (SAP HANA Interactive
Education)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010043
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Vivek Singh Bhoj in response to reda miraoui on page 43Jan 29 2014 352 PM
Hi Reda
You can import Shine Content in HANA and then check all these source codes
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Regards
Vivek
reda miraoui in response to Thomas Jung on page Jan 29 2014 344 PM
Hey Thomas
Is it possible to download source code of your project from this HANA tutorial
Thanks
Reda
Thomas Jung in response to Abdul Hakim on page 43Nov 21 2013 1133 PM
Yes River can be used as an alternative and when activated it will generate Server Side JavaScript andor
SQLScript
Abdul Hakim in response to Thomas Jung on page 44Nov 21 2013 747 PM
Hi Thomas - Was going through blog regarding River (RDL)Just a question on this
When you say Programming language for HANA native development is Server side Javascript SQL SQL
ScriptOnce RDL is rolled out whether RDL can be used for native application development instead of Server
side Java script SQL SQL Script I am very much new to this stuff so appreciate if you can also help on
how to get started with Server Side Java script SQL SQL Script for HANA
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 30 2013 750 AM
Hi Thomas
Thanks for your response I am talking about more content on shine
thanks
Ashutosh
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010044
Baskar Gopalakrishnan in response to Thomas Jung on page 44Oct 30 2013 1249 AM
Hi Thomas
Im a SAP PI Middleware consultantSAP topic leader in XIPI heavily worked on Java related
Netweaver stack I have knowledge in ABAP but not worked heavily in abap I have enrolled your sap hana
native application development course I feel very interesting I did work heavily in java and javascript projects
using eclipse development tool Do you think if I invest my time in just native hana development and proceed
in HANA field is a good step I dont have BW experience either
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 819 PM
Thanks for the clarification Much appreciated
Thomas Jung in response to Abdul Hakim on page 44Oct 29 2013 120 PM
gtABAP Close to HANA means whether we can expect a similar 2 tier architecture similar to HANA XS in the
future or what does that mean
No it doesnt mean that ABAP will become a 2 tier architecture We will not move the ABAP VMKernel into
HANA itself It will remain a separate application server At least for the current plansforeseeable future What
he was referring to was bringing the programming models closer For instance the new 740 SP5 feature that
allows you to write SQLScript directly within an ABAP class method
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 650 AM
Thomas - Thanks for the clarificationMuch appreciatedI was listening to ABAP on HANA session by
Thorsten Schneider this year Teched and he was mentioning that SAP Plans to bring ABAP very close to
HANA in the coming future but not much details have been discussed in the sessionABAP Close to HANA
means whether we can expect a similar 2 tier architecture similar to HANA XS in the future or what does that
mean
Thanks
Hakim
Thomas Jung in response to Abdul Hakim on page 45Oct 28 2013 703 PM
gt whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the option is
recommended by SAP then kindly share the pros and cons of each of the item
Taken from the TechEd CD103 session slides
Guidance
bulluse ABAP for optimization of existing progams (in context of SAP Business Suite or BW)
bullconsider HANA Native Development for development of new applications which will solely run on SAP HANA
bullcombine ABAP and HANA Native Development to enrich existing applications (eg SAP HANA Live Fiori)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010045
ABAP
bullapplications follow 3-tier architecture
bullABAP is in general database agnostic but with release 74 optimized for SAP HANA
bullProgramming language ABAP ABAP OO with the option to use SAP HANA features
bullIDE eclipse-based ABAP Development Tools
HANA Native Development
bullapplications follow 2-tier architecture
bullHANA Native Development is SAP HANA specific and embedded in the database
bullProgramming language River server-side JavaScript SQLSQLScript
bullIDE eclipse-based SAP HANA Studio + web IDE
Thomas Jung in response to ashutosh dixit on page 45Oct 28 2013 701 PM
gtIs there any more demos for the SHINE
Im not exactly sure what you mean by that We are building additional content for SHINE that will be delivered
in SP7
Abdul HakimOct 28 2013 326 PM
Thomas - Let us say a customer is running SAP Netweaver 74 ABAP with HANA DB and they have HANA
extended service as wellIf the customer wants to do new developments then what is the recommendation
from SAP ie whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the
option is recommended by SAP then kindly share the pros and cons of each of the item (SAP Netweaver 74
ABAP Vs SAP HANA XS)
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 28 2013 221 PM
Hi Thomas
Thanks a lot for your its working now
Is there any more demos for the SHINE
Thanks
Ashutosh
Thomas Jung in response to ashutosh dixit on page 46Oct 25 2013 809 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010046
As this content is now standard in SP6 as part of SHINE (SAP HANA INteractive Education) there also some
setup instructions on helpsapcom
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Basic points to check - have you generated the synonyms in the data generator Ran the data generator to
create some data Have the role assigned Added client 001 to your user profile
ashutosh dixitOct 24 2013 130 PM
Hi Thomas
Amazing blog - once again Thomas thanks
I have been following you for many days attended your OPEN SAP course also
That was an amazing course for new learner like me
One of our client is looking forward for XS based search Application identical to what you have created in your
DEMO
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010047
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010048
But I am not able to fetch the data on blank HTML page is coming with no data
If there is any step by step document related to this please help in getting that
Any help will be highly appreciated
Thanks
Ashutosh
Naveen KumarSep 26 2013 1130 AM
Good Document
Heber FabianoAug 27 2013 323 PM
Great content as always Keep sharing with us
Thomas Jung in response to Orel Stringa on page 48Aug 27 2013 147 PM
This is currently not possible The CORS support is for all origins We dont yet have the feature to maintain a
whitelist of CORS origins
Orel Stringa in response to Thomas Jung on page Aug 27 2013 801 AM
Hi Thomas
nice to see that SAP has made it possible with SP6 to specify cross origin resource sharing (CORS) support
via the xsaccess file SP6 HANA development guide has example of how to specify CORS support
I have build an XS application and would like to serve SAPUI5 on a diffhost than XSHANA
How can I specify that I would like to allow cross origin access restricted to certain domain(s) only
Is there a special keyword syntax for specifying that
Thank yoi
Orel
Vijay UthayakumarAug 27 2013 131 AM
Highly informative amp digestible Fantastic work
Jerry WangAug 1 2013 955 AM
Hi Tomas
Thank you
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010049
Jerry
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 644 PM
JSLint checks are very strict and often produce syntax errors for items that just stylistic and wont actually
cause an error upon activation or runtime You can either ignore the JSLint errors or deactivate JSLint for this
project in these cases However it might also be an indication that the JavaScript code you are trying to import
isnt compatible with Strict mode
httpsdevelopermozillaorgen-USdocsWebJavaScriptReferenceFunctions_and_function_scope
Strict_mode
Milan Vrozina in response to Thomas Jung on page 49Jul 21 2013 624 PM
Thanks for clarification I thought there would be some kind of import
But anyway in case of this specific library I have some problems with JSLint validation when I do cut and paste
of the original code
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 343 PM
What kind of problem are you having using this library Strict mode JavaScript which doesnt try to access the
DOM Window or other client side specific objects should work in Server Side XSJS Generally if you have a
library you just cut and paste into your XSJS or an XSJSLIB file and then call the functions from your code
Milan VrozinaJul 21 2013 339 PM
Hello
first and foremost thank you for perfect openSAP classes related to HANA development and for this blog as
well
I have one question related to server-side javascript You mentioned in course that is possible to use 3rd party
libraries or reuse 3rd party code But I cant find a possible way how to import 3rd party javascript library -as
is- to server and use it For example I would like to use JSZip library to zip some file before sending it to client
from xsjs application Is that possible Thank you
Chandrashekhar MahajanJul 3 2013 734 PM
This is excellent blog Now HANA XS is very much clear to me
Mohan krishnaJul 1 2013 144 PM
WOW - great blog Thomas This will be very helpful in understanding SAP hana Good Job
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010050
Abdul Hakim in response to Thomas Jung on page 50Jun 27 2013 833 PM
Thanks for the clarification
Thomas Jung in response to Abdul Hakim on page 50Jun 27 2013 659 PM
HANA Extended Application Services uses SQLScript and JavaScript as its two primary programming
languages
gtwhether the current SAP Business suite based on ABAP will be completely migrated to HANA service
No The Business Suite already runs on HANA but still via the ABAP application server It will continue to
leverage HANA via a combination of enhancements to ABAP and utilizing some of the technologies described
in this blog
gtAlso whether ABAP can be used to built application in HANA extended services
No There is no ABAP language container in HANA Extended Application Services
Abdul HakimJun 27 2013 405 PM
Hi Thomas - What is the programming language used for HANA Extended application services
As HANA is more than a database ie application platform by itself and as you mentioned that more and more
applications will be built on HANA i have question as how the future SAP ERP system looks likewhether the
current SAP Business suite based on ABAP will be completely migrated to HANA service in the future or SAP
ABAP server will continue to evolve and receive focus investment from SAP Also whether ABAP can be used
to built application in HANA extended services Your thoughts
Thanks
Abdul Hakim
Thomas Jung in response to Ravindra Channe on page 50Jun 11 2013 830 PM
Yes it is still planned However we are still a couple of weeks away and Ive not seen the final installers to say
for certain its there
Ravindra ChanneJun 11 2013 815 PM
Hi Thomas
Thanks for a wonderful and very informative blog Is there any update on 32 bit REGI file
Is it expected along with SPS6
Regards
Ravi
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010051
Thomas Jung in response to Amanda Rzepka on page Jun 7 2013 942 PM
gtCan the XS Services be used in a BW on HANA Scenario
Yes XS is part of ALL HANA systems You should check and make sure you are licensed for direct access to
the underlying HANA instance however
Thomas Jung in response to Holger Schimanski on page Jun 7 2013 941 PM
gtIs there a similar library which could be used in XS Engine
The XSODATA development object is similar We also have higher level frameworks for XMLA and Search
Services (InA) You can expect more such high level frameworks to be added to the HANA Extended
Application Services in the future
Thomas Jung in response to Manav Mehra on page Jun 7 2013 939 PM
Have you used something like the Chrome developer tools to see see if you are getting any client side
javascript errors or to see if the request to your xsodata service is successful
Thomas Jung in response to Christian Hufnagl on page 52Jun 7 2013 938 PM
It will ship as non-automatic content in SPS6 (all systems will have it and it just needs to be imported) The
delivery units are also part of this weeks updates to the Cloudshare and AWS developer center images They
are also available for download as part of the content of the openSAP course
Thomas Jung in response to Matthew Pickell on page 51Jun 7 2013 937 PM
CORS support will come with SPS6 at the end of June
Thomas Jung in response to Jeroen Custers on page 51Jun 7 2013 936 PM
gtWill this bug be fixed in HANA ver 56
Personally Ive still experienced this bug in SPS6 internal builds Must be a tricky one to find Luckily the
workaround of closing and reopening isnt too difficult Just annoying This also probably makes the bug low
priority
Jeroen Custers in response to Vivek Singh Bhoj on page 52Jun 7 2013 411 PM
This issue also occurs on rev56
Matthew PickellJun 7 2013 258 PM
Thomas
Has CORS been included in a release yet
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010052
Vivek Singh Bhoj in response to Chandra Edem on page 52Jun 5 2013 601 AM
Hi Chandra
Date for Week1 Assignment has been extended till June 11
So you can give Week 1 Assignment now
Christian HufnaglJun 4 2013 543 PM
Hi Thomas
thank you for the interesting tutorial
Can you tell me whether it is possible to download the source code of the ldquoPutting it all togetherrdquovideo And if yes Where can I download itThanks
Christoph
Vivek Singh BhojJun 4 2013 1116 AM
Hi Thomas
Thanks for OpenSAP classes
Your Youtube Account also have very good exercises
IN OpenSAP Week 2 Unit 3 tutorial after assigning admin role to my user Id i am not able to see sequences
synonyms triggers under my schema or any other schema i am only able to see Column Views Procedures
Tables and Views
Though now i am able to insert data into my created table
Can you let me know how i will be able to see Sequences under my schema without removing the admin role
I am using HANA revision 52
Got to know from OpenSAP that
This is a known issue and the only way that Ive seen to fix it is to actually close the studio and open it again
then refresh the node
Cheers
Rich Heilman
SAP HANA Product Management
Will this bug be fixed in HANA ver 56
Chandra Edem in response to Thomas Jung on page 53Jun 4 2013 646 AM
Thomas
I registered for OpenSAP course Introduction to Software Development on SAP HANA on June 2 900PM
I didnt know that it is going to end WEEK1 assignment test on 632013 300PM Is there any way can take
that WEEK1 Assignment Test
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010053
Thanks
Chandra
Thomas Jung in response to Alexander Bauer on page Jun 3 2013 856 PM
SAPUI5 gets updated auutomatically when you apply HANA revisions There is no additional download or
update needed
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010027
httpdewdftzld025pgdevsapcorp8000DTHCPXSZPMIS_PRO_ACTUALxsodata
ZPROHEADER(PR07_000002)$expand=ZACTUZEMPD
Regards
Kamal Jain
Thomas Jung in response to Blair Krotenko on page 27Apr 15 2014 623 PM
We do plan to release an ADONET provider specific to HANA in the near future This would probably be the
best option for consumption from NET Until then I would think that ODBC is probably the next best option It
gives you generally easy portability from already existing database code You could consume OData as well
although that is more generally consumed from the UI layer itself It guess it somewhat depends upon where
you are calling the service from in your NET application
Blair KrotenkoApr 15 2014 409 PM
Hi Thomas
We are looking at consuming HANA data in a NET application and from what I can see there are 2 options -
OData and ODBC It seems to me that OData might be the better option when consuming HANA data in an XS
application while ODBC might be the better option for NET What are your thoughts Is there a paper on this
subject I havent been able to find a comparison document for this Are there any security caveats to be aware
of for these options
Thanks
Blair
Thomas Jung in response to Kamal Jain on page 27Apr 15 2014 136 PM
You have to list both associations in the expand on the URL if you want both relationships to be processed
Kamal JainApr 15 2014 1249 PM
Hi Thomas
Thx for valuable and useful information
I have an query regarding XS Odata service creation for more than 2 tables and get all the data in one
command
There is req in which service needs to be created for 3 tables to get data from all these
First table has Project ID as key second table has composite
ProjectID and Employee Id as key and third table has Employee id as
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010028
key
So if I create navigation for first 2 tables based on project id and use expand comand than its working fine and I
can see data of both the tables
Further if I add navigation for third table also as below then below expand is displaying data for first two tables
only Pls share how to use expand command in this case if possible to get all tables data based on project id
How to use navigation ZEMPD here
httpdewdftzld025pgdevsapcorp8000DTHCPXSZPMIS_PRO_ACTUALxsodata
ZPROHEADER(PR07_000002)$expand=ZACTUamp
service namespace
DTHCPXS
DTHCPDTHCPDBHCP_PROJECT_HEADER
as ZPROHEADER
navigates (PROJECT as
ZACTU)
DTHCPDTHCPDBHCPT_ZPMIS_ACTUAL
as ZACTU
navigates (EMPLOYEE as
ZEMPD )
DTHCPDTHCPDBHCP_ZPMIS_RES_MASTER
as ZEMPD
association PROJECT principal
ZPROHEADER(PROJECTID)
multiplicity 1 dependent
ZACTU(PROJECTID) multiplicity
association EMPLOYEE principal
ZACTU(EMPLOYEEID)
multiplicity 1 dependent
ZEMPD(EMPLOYEEID) multiplicity
1
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010029
Pls suggest if there is anything to add or correct in XS odata service syntax above
Regards
Kamal Jain
Vikas Madaan in response to Thomas Jung on page 29Apr 14 2014 458 PM
Thanks Thomas
Under which component
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 29Apr 14 2014 450 PM
No this isnt a known issue Ive seen Nor can I recreate the problem in my system No you cant maintain the
authentication in XSHTTPDEST itself It intentionally must be set in XSADMIN tool I can really only suggest
that you open a support ticket
Vikas MadaanApr 14 2014 431 PM
Hi Thomas
I am trying to pull data from SAP system onto HANA Database using XSJOB files I am calling RFC enabled
function modules over HTTP request It helps me replicating the real time ECC data onto HANA as well with
back ground jobs
I am facing one problem in the XSHTTPDEST file I am able to create and activate the file using studio and this
file is even visible in the web based XS administration tool But in the web based tool when i provide user and
password for basic authotication then system just clears the user id and password when i try to save This the
reason our HTTP requests are getting failed and below is the response we are getting in the response body
lthtmlgtltheadgtlttitlegtLogon Error Messagelttitlegt
Is this known issue or we are missing something Is it possible to provide user and password in the
XSHTTPDEST file Is there any particular syntax
I checked and i have the required authorizations as well develper Guide
Please help
Regards
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010030
Vikas Madaan
Abdul HakimFeb 22 2014 359 AM
Hi Thomas - Any recommended book or resource to learn and master Server Side Javascript There were
many books available in the market but as a beginner need to know the right resource book to start with and
master this stuffAlso whether SAP plan to conduct any training to teach Server Side Javascript similar to other
standard training offerings
Thanks
Hakim
Samuel Tanor-GyeduFeb 20 2014 839 AM
Thanks Thomas
I will definitely have a look at SHINE
Thomas Jung in response to gentilini andre on page 30Feb 19 2014 422 PM
Difficult to say what is wrong I several things which are different than our sample that does this You are using
a POST for instance instead of a GET However if you are gettting a 200 then I assume the service call is
correct In client side tools (like Chrome Developer Tools) you should be able to see the response object from
the call
However what I would really recommend is that you study the SHINE content (SAP HANA Interactive
Education) There is already a sample application which does this in SHINE Also it has some special
JavaScript in the UI to handle the file attachment via AXAJ call Perhaps that is the part you are missing
You can read more about SHINE here It is also included already installed in the latest version of the HANA
Developer Center trial image (SP7 based)
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
gentilini andreFeb 19 2014 325 PM
Hi Thomas
well I followed your hints but it still donacutet work
I created a xsjs File like below
function downloadExcel()
try
var body =
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010031
alert(drin)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
alert(drusse)
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount
tTax Amount tNetto Amount tCurrency n
while(rsnext())
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
catch (e)
alert(db conn funktioniert nicht)
var a = $requestparametersget(cmd)
$responsesetBody(Invalid Command +a)
switch (a)
case doex
$responsesetBody(Invalid Command +a)
alert(filedownload)
thisdownloadExcel()
break
default
$responsestatus = $nethttpINTERNAL_SERVER_ERROR
$responsesetBody(Invalid Command +a)
The Controllerjs File
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010032
doFileDownload function (oEvent)
jQuerysaprequire(sapuicommonsMessageBox)
sapuicommonsMessageBoxshow(Export Starten sapuicommonsMessageBoxIconconfirm
Information)
sapuicommonsMessageBoxconfirm(Export starteninform Confirmation)
return false
function inform(rValue)
alert (drinnnnne)
var aurl = FileDownloadxsjscmd=doex
if(rValue) If User presses Ok
alert(aurl)
jQueryajax(
url aurl
method POST
dataType json
datacmddoex
success sapuicommonsMessageBoxalert(Export wird ausgefuumlhrtConfirmation)
errorfunction onErrorCall(jqXHR textStatus errorThrown)
alert(jqXHRstatus)
sapuicommonsMessageBoxshow(jqXHRstatus
ERROR
Error in calling Service )
return
complete sapuicommonsMessageBoxalert(Export Erfolgreich
abgeschlossenConfirmation)
)
return false
else If the user presses Cancel
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010033
sapuicommonsMessageBoxalert(Vorgang abgebrochenNotification)
)
at last but not least the view
sapuijsview(zag1_ui_cv_03Index
Specifies the Controller belonging to this View
In the case that it is not implemented or that null is returned this View does not have a Controller
memberOf zag1_ui_cv_03Index
getControllerName function()
return zag1_ui_cv_03Index
Is initially called once after the Controller has been instantiated It is the place where the UI is
constructed
Since the Controller is given to this method its event handlers can be attached right away
memberOf zag1_ui_cv_03Index
createContent function(oController)
create a lite button with an icon and a text
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010034
lite true
)placeAt(btn)
oButton3attachPress(oControllerdoFileDownload)
var oButton4 = new sapuicommonsButton(
text Refresh
icon imagesrefreshjpg
lite true
press function() var data = oTableval()
if(data == )
alert(no data found)
return
print(content)
print(DatArray)
if (data = )
alert(Funzt)
JSONToCSVConvertor(data CUSTOMER AMOUNT true)
)placeAt(btn)
jQuerysaprequire(sapuitableTable)
create table control with properties
var oTable = new sapuitableTable(
width 100
rowHeight 50
title Amount per Partner
selectionMode sapuitableSelectionModeNone
)
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Company Name
)
template new sapuicommonsTextView(
text CompanyName
)
sortProperty CompanyName
))
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010035
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Partner ID
)
template new sapuicommonsTextView(
text PartnerId
)
sortProperty PartnerId
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Postal Code
textAlign sapuicoreTextAlignEnd
)
template new sapuicommonsTextView(
text PostalCode
textAlign sapuicoreTextAlignEnd
)
sortProperty PostalCode
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text City
)
template new sapuicommonsTextView(
text City
)
sortProperty City
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Purchase ID
)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010036
template new sapuicommonsTextView(
text PurchaseOrderId
)
sortProperty Currency
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Lifecycle Status
)
template new sapuicommonsTextView(
text LifecycleStatus
)
sortProperty LifecycleStatus
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Gross Amount
)
template new sapuicommonsTextView(
text GrossAmount
)
sortProperty GrossAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Tax Amount
)
template new sapuicommonsTextView(
text TaxAmount
)
sortProperty TaxAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Amount Netto
)
template new sapuicommonsTextView(
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010037
text CM_NET_Amount_001
)
sortProperty CM_NET_Amount_001
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Currency
)
template new sapuicommonsTextView(
text Currency
)
sortProperty Currency
))
var oModel = new sapuimodelodataODataModel
(httpqperiorvmcldsr8000ZAG1_WS_001ZAG1_CV_001xsodata false)
oTablesetModel(oModel)
oTablebindRows(Amount)
return oTable
)
It wonacutet call the function or better said the action of the button works fine till to the point where it should call the
xsjsfile to generate the excel-file I wondered that in the ajax part the error- success- and complete-part will
be executed at the same time and not only one of this statements The message is 200 (The request has
succeeded The information returned with the response is dependent on the method used in the request)
Maybe you can see where my mistake is or whats going wrong
Iacuteve the developer edition on cloudshare (Hana Studio rev68 Server is on SPS05)
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010038
Andreacute
Thomas Jung in response to Samuel Tanor-Gyedu on page 38Feb 19 2014 523 AM
I dont think I can help you This appears to a question about how odata4j works not about XS I have no
experience with odata4j myself
Samuel Tanor-GyeduFeb 18 2014 913 AM
Hi Thomas
I have an odata service with this endpointhttpss5hanaxshanatrialondemandcomservicesUserxsodata
I am now trying to consume it from eclipse with the odata4j libraries
This is how I get the endpoint
public UserServiceOdata(String endpointUri)
thisendpointUri = endpointUri
ODataConsumerdumpresponseHeaders(true)
consumer = ODataConsumerscreate(endpointUri)
This is my method to add a user
public User addUser(User user)
consumercreateEntity(entitySet)properties(OPropertiesint32(propertyUserId
usergetId()))properties(OPropertiesstring(propertyUserName
usergetName()))properties(OPropertiesstring(propertyUserEmail usergetEmail()))execute()
return user
When I call addUser method I get an Error
Caused by javaxxmlstreamXMLStreamException ParseError at [rowcol][78253]
Message The reference to entity sourceUrl must end with the delimiter
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010039
When I use this endpoint httpss5hanaxshanatrialondemandcomservicesUsersvc everything works fine
With the httpss5hanaxshanatrialondemandcomservicesUserxsodata I get errors
Please I would be very grateful for assistance
Thanks in advance
Regards
Samuel
Thomas Jung in response to gentilini andre on page 39Feb 18 2014 431 AM
You have a fundamental misunderstanding here You are placing server side JavaScript code in your client
side UI5 application The function downloadExcel is something you need to execute on the server It needs to
be in an XSJS file and it is called from the client side via AJAX - as a REST service not as a local function
gentilini andreFeb 17 2014 451 PM
Hello Thomas
Thank you for this great How-To Guide
Iacutem pretty new in SAPUI5 and tried your export-sample in my little trial project but it doesnacutet work
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010040
My Button for this looks like
ltcodegt
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
lite true
press function() alert(oButton3getText())
downloadExcel()
ltcodegt
and the function for this action looks like
ltcodegt
function downloadExcel()
var body =
alert(drin)
print($query)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount tTax
Amount tNetto Amount tCurrency n
while(rsnext())
if(rsnext() == )
alert($responsesetBody( Failed to retrieve data ))
alert($responsestatus = $nethttpINTERNAL_SERVER_ERROR)
else
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010041
ltcodegt
Iacutem afraid and hope that you can help me
Kind regards
Andreacute
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1246 PM
gtIs there any restriction or development limitation in the XSJSLIB files
Thats a very general question Difficult to answer without any context
Vikas Madaan in response to Thomas Jung on page 41Feb 11 2014 1245 PM
Thanks Thomas
I think we are on same page
Once quick question that came to my mind Is there any restriction or development limitation in the XSJSLIB
files
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1230 PM
gtCould please help me in understanding in more advantagesdisadvantages for both techniques
Youve summarized it pretty well already
gtbecuase i dont want to use both the approaches
Even with the CRUD support and exits in XSODATA its still pretty hard to do 100 via XSODATA There are
still valid use cases for XSJS when you need custom body custom read processing job scheduling etc Its
good to try and use XSODATA whenever possible but I wouldnt automatically exclude the use of XSJS
Vikas MadaanFeb 11 2014 1008 AM
Hi Thomas
Thanks a lot for sharing useful information through various blogs
In my current project we are evaluating use of XSOData or XSJS applications I saw your videos like the one
mentioned below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010042
httpwwwsaphanacomdocsDOC-4376
Want i understood from various blog is this
From SP7 we can write exsits in the OData services and it is very easy to consume at the client side just like
any REST base service and from my understanding it is Scalable as well I would love to use XSOData always
becuase development effort is very less compare to XSJS and it is very easy to rampup the team on OData
related development objects
XSJS were as provide more control becuase of server side scripting becuase it allows development on the
server side using JavaScript Core APIs of SAP HANA Extended Application Services are therefore exposed
as JavaScript functions providing easy access to the HTTP Request and Response object as well database
access to execute SQL or call SQLScript Procedures It provide us control over the body format and and URL
parameter definition
Could please help me in understanding in more advantagesdisadvantages for both techniques
I am very keen to understand and also explain the same to team members becuase i dont want to use both the
approaches and even sometimes customer can also ask the same to us
Also If we are on SP6 then from my understanding XSJS provides us more capability in terms of complex
application Corrent me If i am wrong
Thanks
Regards
Vikas Madaan
Thomas Jung in response to Raghuveer Phull on page 42Feb 5 2014 312 PM
Yes there are videos on the CRUD features of XSODATA which were new in SP6
For more on CRUD support in SP6 see this video
oData CreateUpdateDelete Support in SAP HANA SPS6
For the extended support for XSJS exits in SP7 see this video
SAP HANA SPS 07 XSODATA Exits in XSJS
Raghuveer PhullFeb 5 2014 122 AM
Do you have an exampledocumentationvideo where you can write a service which will populate Hana DB
What I am asking for is a way for my external script to populate the DB tables i have created in Hana DB
Thomas Jung in response to reda miraoui on page 43Jan 29 2014 411 PM
The source code for the examples shown here are shipped as part of SHINE (SAP HANA Interactive
Education)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010043
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Vivek Singh Bhoj in response to reda miraoui on page 43Jan 29 2014 352 PM
Hi Reda
You can import Shine Content in HANA and then check all these source codes
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Regards
Vivek
reda miraoui in response to Thomas Jung on page Jan 29 2014 344 PM
Hey Thomas
Is it possible to download source code of your project from this HANA tutorial
Thanks
Reda
Thomas Jung in response to Abdul Hakim on page 43Nov 21 2013 1133 PM
Yes River can be used as an alternative and when activated it will generate Server Side JavaScript andor
SQLScript
Abdul Hakim in response to Thomas Jung on page 44Nov 21 2013 747 PM
Hi Thomas - Was going through blog regarding River (RDL)Just a question on this
When you say Programming language for HANA native development is Server side Javascript SQL SQL
ScriptOnce RDL is rolled out whether RDL can be used for native application development instead of Server
side Java script SQL SQL Script I am very much new to this stuff so appreciate if you can also help on
how to get started with Server Side Java script SQL SQL Script for HANA
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 30 2013 750 AM
Hi Thomas
Thanks for your response I am talking about more content on shine
thanks
Ashutosh
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010044
Baskar Gopalakrishnan in response to Thomas Jung on page 44Oct 30 2013 1249 AM
Hi Thomas
Im a SAP PI Middleware consultantSAP topic leader in XIPI heavily worked on Java related
Netweaver stack I have knowledge in ABAP but not worked heavily in abap I have enrolled your sap hana
native application development course I feel very interesting I did work heavily in java and javascript projects
using eclipse development tool Do you think if I invest my time in just native hana development and proceed
in HANA field is a good step I dont have BW experience either
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 819 PM
Thanks for the clarification Much appreciated
Thomas Jung in response to Abdul Hakim on page 44Oct 29 2013 120 PM
gtABAP Close to HANA means whether we can expect a similar 2 tier architecture similar to HANA XS in the
future or what does that mean
No it doesnt mean that ABAP will become a 2 tier architecture We will not move the ABAP VMKernel into
HANA itself It will remain a separate application server At least for the current plansforeseeable future What
he was referring to was bringing the programming models closer For instance the new 740 SP5 feature that
allows you to write SQLScript directly within an ABAP class method
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 650 AM
Thomas - Thanks for the clarificationMuch appreciatedI was listening to ABAP on HANA session by
Thorsten Schneider this year Teched and he was mentioning that SAP Plans to bring ABAP very close to
HANA in the coming future but not much details have been discussed in the sessionABAP Close to HANA
means whether we can expect a similar 2 tier architecture similar to HANA XS in the future or what does that
mean
Thanks
Hakim
Thomas Jung in response to Abdul Hakim on page 45Oct 28 2013 703 PM
gt whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the option is
recommended by SAP then kindly share the pros and cons of each of the item
Taken from the TechEd CD103 session slides
Guidance
bulluse ABAP for optimization of existing progams (in context of SAP Business Suite or BW)
bullconsider HANA Native Development for development of new applications which will solely run on SAP HANA
bullcombine ABAP and HANA Native Development to enrich existing applications (eg SAP HANA Live Fiori)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010045
ABAP
bullapplications follow 3-tier architecture
bullABAP is in general database agnostic but with release 74 optimized for SAP HANA
bullProgramming language ABAP ABAP OO with the option to use SAP HANA features
bullIDE eclipse-based ABAP Development Tools
HANA Native Development
bullapplications follow 2-tier architecture
bullHANA Native Development is SAP HANA specific and embedded in the database
bullProgramming language River server-side JavaScript SQLSQLScript
bullIDE eclipse-based SAP HANA Studio + web IDE
Thomas Jung in response to ashutosh dixit on page 45Oct 28 2013 701 PM
gtIs there any more demos for the SHINE
Im not exactly sure what you mean by that We are building additional content for SHINE that will be delivered
in SP7
Abdul HakimOct 28 2013 326 PM
Thomas - Let us say a customer is running SAP Netweaver 74 ABAP with HANA DB and they have HANA
extended service as wellIf the customer wants to do new developments then what is the recommendation
from SAP ie whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the
option is recommended by SAP then kindly share the pros and cons of each of the item (SAP Netweaver 74
ABAP Vs SAP HANA XS)
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 28 2013 221 PM
Hi Thomas
Thanks a lot for your its working now
Is there any more demos for the SHINE
Thanks
Ashutosh
Thomas Jung in response to ashutosh dixit on page 46Oct 25 2013 809 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010046
As this content is now standard in SP6 as part of SHINE (SAP HANA INteractive Education) there also some
setup instructions on helpsapcom
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Basic points to check - have you generated the synonyms in the data generator Ran the data generator to
create some data Have the role assigned Added client 001 to your user profile
ashutosh dixitOct 24 2013 130 PM
Hi Thomas
Amazing blog - once again Thomas thanks
I have been following you for many days attended your OPEN SAP course also
That was an amazing course for new learner like me
One of our client is looking forward for XS based search Application identical to what you have created in your
DEMO
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010047
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010048
But I am not able to fetch the data on blank HTML page is coming with no data
If there is any step by step document related to this please help in getting that
Any help will be highly appreciated
Thanks
Ashutosh
Naveen KumarSep 26 2013 1130 AM
Good Document
Heber FabianoAug 27 2013 323 PM
Great content as always Keep sharing with us
Thomas Jung in response to Orel Stringa on page 48Aug 27 2013 147 PM
This is currently not possible The CORS support is for all origins We dont yet have the feature to maintain a
whitelist of CORS origins
Orel Stringa in response to Thomas Jung on page Aug 27 2013 801 AM
Hi Thomas
nice to see that SAP has made it possible with SP6 to specify cross origin resource sharing (CORS) support
via the xsaccess file SP6 HANA development guide has example of how to specify CORS support
I have build an XS application and would like to serve SAPUI5 on a diffhost than XSHANA
How can I specify that I would like to allow cross origin access restricted to certain domain(s) only
Is there a special keyword syntax for specifying that
Thank yoi
Orel
Vijay UthayakumarAug 27 2013 131 AM
Highly informative amp digestible Fantastic work
Jerry WangAug 1 2013 955 AM
Hi Tomas
Thank you
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010049
Jerry
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 644 PM
JSLint checks are very strict and often produce syntax errors for items that just stylistic and wont actually
cause an error upon activation or runtime You can either ignore the JSLint errors or deactivate JSLint for this
project in these cases However it might also be an indication that the JavaScript code you are trying to import
isnt compatible with Strict mode
httpsdevelopermozillaorgen-USdocsWebJavaScriptReferenceFunctions_and_function_scope
Strict_mode
Milan Vrozina in response to Thomas Jung on page 49Jul 21 2013 624 PM
Thanks for clarification I thought there would be some kind of import
But anyway in case of this specific library I have some problems with JSLint validation when I do cut and paste
of the original code
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 343 PM
What kind of problem are you having using this library Strict mode JavaScript which doesnt try to access the
DOM Window or other client side specific objects should work in Server Side XSJS Generally if you have a
library you just cut and paste into your XSJS or an XSJSLIB file and then call the functions from your code
Milan VrozinaJul 21 2013 339 PM
Hello
first and foremost thank you for perfect openSAP classes related to HANA development and for this blog as
well
I have one question related to server-side javascript You mentioned in course that is possible to use 3rd party
libraries or reuse 3rd party code But I cant find a possible way how to import 3rd party javascript library -as
is- to server and use it For example I would like to use JSZip library to zip some file before sending it to client
from xsjs application Is that possible Thank you
Chandrashekhar MahajanJul 3 2013 734 PM
This is excellent blog Now HANA XS is very much clear to me
Mohan krishnaJul 1 2013 144 PM
WOW - great blog Thomas This will be very helpful in understanding SAP hana Good Job
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010050
Abdul Hakim in response to Thomas Jung on page 50Jun 27 2013 833 PM
Thanks for the clarification
Thomas Jung in response to Abdul Hakim on page 50Jun 27 2013 659 PM
HANA Extended Application Services uses SQLScript and JavaScript as its two primary programming
languages
gtwhether the current SAP Business suite based on ABAP will be completely migrated to HANA service
No The Business Suite already runs on HANA but still via the ABAP application server It will continue to
leverage HANA via a combination of enhancements to ABAP and utilizing some of the technologies described
in this blog
gtAlso whether ABAP can be used to built application in HANA extended services
No There is no ABAP language container in HANA Extended Application Services
Abdul HakimJun 27 2013 405 PM
Hi Thomas - What is the programming language used for HANA Extended application services
As HANA is more than a database ie application platform by itself and as you mentioned that more and more
applications will be built on HANA i have question as how the future SAP ERP system looks likewhether the
current SAP Business suite based on ABAP will be completely migrated to HANA service in the future or SAP
ABAP server will continue to evolve and receive focus investment from SAP Also whether ABAP can be used
to built application in HANA extended services Your thoughts
Thanks
Abdul Hakim
Thomas Jung in response to Ravindra Channe on page 50Jun 11 2013 830 PM
Yes it is still planned However we are still a couple of weeks away and Ive not seen the final installers to say
for certain its there
Ravindra ChanneJun 11 2013 815 PM
Hi Thomas
Thanks for a wonderful and very informative blog Is there any update on 32 bit REGI file
Is it expected along with SPS6
Regards
Ravi
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010051
Thomas Jung in response to Amanda Rzepka on page Jun 7 2013 942 PM
gtCan the XS Services be used in a BW on HANA Scenario
Yes XS is part of ALL HANA systems You should check and make sure you are licensed for direct access to
the underlying HANA instance however
Thomas Jung in response to Holger Schimanski on page Jun 7 2013 941 PM
gtIs there a similar library which could be used in XS Engine
The XSODATA development object is similar We also have higher level frameworks for XMLA and Search
Services (InA) You can expect more such high level frameworks to be added to the HANA Extended
Application Services in the future
Thomas Jung in response to Manav Mehra on page Jun 7 2013 939 PM
Have you used something like the Chrome developer tools to see see if you are getting any client side
javascript errors or to see if the request to your xsodata service is successful
Thomas Jung in response to Christian Hufnagl on page 52Jun 7 2013 938 PM
It will ship as non-automatic content in SPS6 (all systems will have it and it just needs to be imported) The
delivery units are also part of this weeks updates to the Cloudshare and AWS developer center images They
are also available for download as part of the content of the openSAP course
Thomas Jung in response to Matthew Pickell on page 51Jun 7 2013 937 PM
CORS support will come with SPS6 at the end of June
Thomas Jung in response to Jeroen Custers on page 51Jun 7 2013 936 PM
gtWill this bug be fixed in HANA ver 56
Personally Ive still experienced this bug in SPS6 internal builds Must be a tricky one to find Luckily the
workaround of closing and reopening isnt too difficult Just annoying This also probably makes the bug low
priority
Jeroen Custers in response to Vivek Singh Bhoj on page 52Jun 7 2013 411 PM
This issue also occurs on rev56
Matthew PickellJun 7 2013 258 PM
Thomas
Has CORS been included in a release yet
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010052
Vivek Singh Bhoj in response to Chandra Edem on page 52Jun 5 2013 601 AM
Hi Chandra
Date for Week1 Assignment has been extended till June 11
So you can give Week 1 Assignment now
Christian HufnaglJun 4 2013 543 PM
Hi Thomas
thank you for the interesting tutorial
Can you tell me whether it is possible to download the source code of the ldquoPutting it all togetherrdquovideo And if yes Where can I download itThanks
Christoph
Vivek Singh BhojJun 4 2013 1116 AM
Hi Thomas
Thanks for OpenSAP classes
Your Youtube Account also have very good exercises
IN OpenSAP Week 2 Unit 3 tutorial after assigning admin role to my user Id i am not able to see sequences
synonyms triggers under my schema or any other schema i am only able to see Column Views Procedures
Tables and Views
Though now i am able to insert data into my created table
Can you let me know how i will be able to see Sequences under my schema without removing the admin role
I am using HANA revision 52
Got to know from OpenSAP that
This is a known issue and the only way that Ive seen to fix it is to actually close the studio and open it again
then refresh the node
Cheers
Rich Heilman
SAP HANA Product Management
Will this bug be fixed in HANA ver 56
Chandra Edem in response to Thomas Jung on page 53Jun 4 2013 646 AM
Thomas
I registered for OpenSAP course Introduction to Software Development on SAP HANA on June 2 900PM
I didnt know that it is going to end WEEK1 assignment test on 632013 300PM Is there any way can take
that WEEK1 Assignment Test
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010053
Thanks
Chandra
Thomas Jung in response to Alexander Bauer on page Jun 3 2013 856 PM
SAPUI5 gets updated auutomatically when you apply HANA revisions There is no additional download or
update needed
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010028
key
So if I create navigation for first 2 tables based on project id and use expand comand than its working fine and I
can see data of both the tables
Further if I add navigation for third table also as below then below expand is displaying data for first two tables
only Pls share how to use expand command in this case if possible to get all tables data based on project id
How to use navigation ZEMPD here
httpdewdftzld025pgdevsapcorp8000DTHCPXSZPMIS_PRO_ACTUALxsodata
ZPROHEADER(PR07_000002)$expand=ZACTUamp
service namespace
DTHCPXS
DTHCPDTHCPDBHCP_PROJECT_HEADER
as ZPROHEADER
navigates (PROJECT as
ZACTU)
DTHCPDTHCPDBHCPT_ZPMIS_ACTUAL
as ZACTU
navigates (EMPLOYEE as
ZEMPD )
DTHCPDTHCPDBHCP_ZPMIS_RES_MASTER
as ZEMPD
association PROJECT principal
ZPROHEADER(PROJECTID)
multiplicity 1 dependent
ZACTU(PROJECTID) multiplicity
association EMPLOYEE principal
ZACTU(EMPLOYEEID)
multiplicity 1 dependent
ZEMPD(EMPLOYEEID) multiplicity
1
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010029
Pls suggest if there is anything to add or correct in XS odata service syntax above
Regards
Kamal Jain
Vikas Madaan in response to Thomas Jung on page 29Apr 14 2014 458 PM
Thanks Thomas
Under which component
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 29Apr 14 2014 450 PM
No this isnt a known issue Ive seen Nor can I recreate the problem in my system No you cant maintain the
authentication in XSHTTPDEST itself It intentionally must be set in XSADMIN tool I can really only suggest
that you open a support ticket
Vikas MadaanApr 14 2014 431 PM
Hi Thomas
I am trying to pull data from SAP system onto HANA Database using XSJOB files I am calling RFC enabled
function modules over HTTP request It helps me replicating the real time ECC data onto HANA as well with
back ground jobs
I am facing one problem in the XSHTTPDEST file I am able to create and activate the file using studio and this
file is even visible in the web based XS administration tool But in the web based tool when i provide user and
password for basic authotication then system just clears the user id and password when i try to save This the
reason our HTTP requests are getting failed and below is the response we are getting in the response body
lthtmlgtltheadgtlttitlegtLogon Error Messagelttitlegt
Is this known issue or we are missing something Is it possible to provide user and password in the
XSHTTPDEST file Is there any particular syntax
I checked and i have the required authorizations as well develper Guide
Please help
Regards
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010030
Vikas Madaan
Abdul HakimFeb 22 2014 359 AM
Hi Thomas - Any recommended book or resource to learn and master Server Side Javascript There were
many books available in the market but as a beginner need to know the right resource book to start with and
master this stuffAlso whether SAP plan to conduct any training to teach Server Side Javascript similar to other
standard training offerings
Thanks
Hakim
Samuel Tanor-GyeduFeb 20 2014 839 AM
Thanks Thomas
I will definitely have a look at SHINE
Thomas Jung in response to gentilini andre on page 30Feb 19 2014 422 PM
Difficult to say what is wrong I several things which are different than our sample that does this You are using
a POST for instance instead of a GET However if you are gettting a 200 then I assume the service call is
correct In client side tools (like Chrome Developer Tools) you should be able to see the response object from
the call
However what I would really recommend is that you study the SHINE content (SAP HANA Interactive
Education) There is already a sample application which does this in SHINE Also it has some special
JavaScript in the UI to handle the file attachment via AXAJ call Perhaps that is the part you are missing
You can read more about SHINE here It is also included already installed in the latest version of the HANA
Developer Center trial image (SP7 based)
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
gentilini andreFeb 19 2014 325 PM
Hi Thomas
well I followed your hints but it still donacutet work
I created a xsjs File like below
function downloadExcel()
try
var body =
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010031
alert(drin)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
alert(drusse)
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount
tTax Amount tNetto Amount tCurrency n
while(rsnext())
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
catch (e)
alert(db conn funktioniert nicht)
var a = $requestparametersget(cmd)
$responsesetBody(Invalid Command +a)
switch (a)
case doex
$responsesetBody(Invalid Command +a)
alert(filedownload)
thisdownloadExcel()
break
default
$responsestatus = $nethttpINTERNAL_SERVER_ERROR
$responsesetBody(Invalid Command +a)
The Controllerjs File
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010032
doFileDownload function (oEvent)
jQuerysaprequire(sapuicommonsMessageBox)
sapuicommonsMessageBoxshow(Export Starten sapuicommonsMessageBoxIconconfirm
Information)
sapuicommonsMessageBoxconfirm(Export starteninform Confirmation)
return false
function inform(rValue)
alert (drinnnnne)
var aurl = FileDownloadxsjscmd=doex
if(rValue) If User presses Ok
alert(aurl)
jQueryajax(
url aurl
method POST
dataType json
datacmddoex
success sapuicommonsMessageBoxalert(Export wird ausgefuumlhrtConfirmation)
errorfunction onErrorCall(jqXHR textStatus errorThrown)
alert(jqXHRstatus)
sapuicommonsMessageBoxshow(jqXHRstatus
ERROR
Error in calling Service )
return
complete sapuicommonsMessageBoxalert(Export Erfolgreich
abgeschlossenConfirmation)
)
return false
else If the user presses Cancel
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010033
sapuicommonsMessageBoxalert(Vorgang abgebrochenNotification)
)
at last but not least the view
sapuijsview(zag1_ui_cv_03Index
Specifies the Controller belonging to this View
In the case that it is not implemented or that null is returned this View does not have a Controller
memberOf zag1_ui_cv_03Index
getControllerName function()
return zag1_ui_cv_03Index
Is initially called once after the Controller has been instantiated It is the place where the UI is
constructed
Since the Controller is given to this method its event handlers can be attached right away
memberOf zag1_ui_cv_03Index
createContent function(oController)
create a lite button with an icon and a text
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010034
lite true
)placeAt(btn)
oButton3attachPress(oControllerdoFileDownload)
var oButton4 = new sapuicommonsButton(
text Refresh
icon imagesrefreshjpg
lite true
press function() var data = oTableval()
if(data == )
alert(no data found)
return
print(content)
print(DatArray)
if (data = )
alert(Funzt)
JSONToCSVConvertor(data CUSTOMER AMOUNT true)
)placeAt(btn)
jQuerysaprequire(sapuitableTable)
create table control with properties
var oTable = new sapuitableTable(
width 100
rowHeight 50
title Amount per Partner
selectionMode sapuitableSelectionModeNone
)
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Company Name
)
template new sapuicommonsTextView(
text CompanyName
)
sortProperty CompanyName
))
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010035
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Partner ID
)
template new sapuicommonsTextView(
text PartnerId
)
sortProperty PartnerId
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Postal Code
textAlign sapuicoreTextAlignEnd
)
template new sapuicommonsTextView(
text PostalCode
textAlign sapuicoreTextAlignEnd
)
sortProperty PostalCode
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text City
)
template new sapuicommonsTextView(
text City
)
sortProperty City
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Purchase ID
)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010036
template new sapuicommonsTextView(
text PurchaseOrderId
)
sortProperty Currency
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Lifecycle Status
)
template new sapuicommonsTextView(
text LifecycleStatus
)
sortProperty LifecycleStatus
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Gross Amount
)
template new sapuicommonsTextView(
text GrossAmount
)
sortProperty GrossAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Tax Amount
)
template new sapuicommonsTextView(
text TaxAmount
)
sortProperty TaxAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Amount Netto
)
template new sapuicommonsTextView(
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010037
text CM_NET_Amount_001
)
sortProperty CM_NET_Amount_001
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Currency
)
template new sapuicommonsTextView(
text Currency
)
sortProperty Currency
))
var oModel = new sapuimodelodataODataModel
(httpqperiorvmcldsr8000ZAG1_WS_001ZAG1_CV_001xsodata false)
oTablesetModel(oModel)
oTablebindRows(Amount)
return oTable
)
It wonacutet call the function or better said the action of the button works fine till to the point where it should call the
xsjsfile to generate the excel-file I wondered that in the ajax part the error- success- and complete-part will
be executed at the same time and not only one of this statements The message is 200 (The request has
succeeded The information returned with the response is dependent on the method used in the request)
Maybe you can see where my mistake is or whats going wrong
Iacuteve the developer edition on cloudshare (Hana Studio rev68 Server is on SPS05)
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010038
Andreacute
Thomas Jung in response to Samuel Tanor-Gyedu on page 38Feb 19 2014 523 AM
I dont think I can help you This appears to a question about how odata4j works not about XS I have no
experience with odata4j myself
Samuel Tanor-GyeduFeb 18 2014 913 AM
Hi Thomas
I have an odata service with this endpointhttpss5hanaxshanatrialondemandcomservicesUserxsodata
I am now trying to consume it from eclipse with the odata4j libraries
This is how I get the endpoint
public UserServiceOdata(String endpointUri)
thisendpointUri = endpointUri
ODataConsumerdumpresponseHeaders(true)
consumer = ODataConsumerscreate(endpointUri)
This is my method to add a user
public User addUser(User user)
consumercreateEntity(entitySet)properties(OPropertiesint32(propertyUserId
usergetId()))properties(OPropertiesstring(propertyUserName
usergetName()))properties(OPropertiesstring(propertyUserEmail usergetEmail()))execute()
return user
When I call addUser method I get an Error
Caused by javaxxmlstreamXMLStreamException ParseError at [rowcol][78253]
Message The reference to entity sourceUrl must end with the delimiter
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010039
When I use this endpoint httpss5hanaxshanatrialondemandcomservicesUsersvc everything works fine
With the httpss5hanaxshanatrialondemandcomservicesUserxsodata I get errors
Please I would be very grateful for assistance
Thanks in advance
Regards
Samuel
Thomas Jung in response to gentilini andre on page 39Feb 18 2014 431 AM
You have a fundamental misunderstanding here You are placing server side JavaScript code in your client
side UI5 application The function downloadExcel is something you need to execute on the server It needs to
be in an XSJS file and it is called from the client side via AJAX - as a REST service not as a local function
gentilini andreFeb 17 2014 451 PM
Hello Thomas
Thank you for this great How-To Guide
Iacutem pretty new in SAPUI5 and tried your export-sample in my little trial project but it doesnacutet work
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010040
My Button for this looks like
ltcodegt
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
lite true
press function() alert(oButton3getText())
downloadExcel()
ltcodegt
and the function for this action looks like
ltcodegt
function downloadExcel()
var body =
alert(drin)
print($query)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount tTax
Amount tNetto Amount tCurrency n
while(rsnext())
if(rsnext() == )
alert($responsesetBody( Failed to retrieve data ))
alert($responsestatus = $nethttpINTERNAL_SERVER_ERROR)
else
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010041
ltcodegt
Iacutem afraid and hope that you can help me
Kind regards
Andreacute
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1246 PM
gtIs there any restriction or development limitation in the XSJSLIB files
Thats a very general question Difficult to answer without any context
Vikas Madaan in response to Thomas Jung on page 41Feb 11 2014 1245 PM
Thanks Thomas
I think we are on same page
Once quick question that came to my mind Is there any restriction or development limitation in the XSJSLIB
files
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1230 PM
gtCould please help me in understanding in more advantagesdisadvantages for both techniques
Youve summarized it pretty well already
gtbecuase i dont want to use both the approaches
Even with the CRUD support and exits in XSODATA its still pretty hard to do 100 via XSODATA There are
still valid use cases for XSJS when you need custom body custom read processing job scheduling etc Its
good to try and use XSODATA whenever possible but I wouldnt automatically exclude the use of XSJS
Vikas MadaanFeb 11 2014 1008 AM
Hi Thomas
Thanks a lot for sharing useful information through various blogs
In my current project we are evaluating use of XSOData or XSJS applications I saw your videos like the one
mentioned below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010042
httpwwwsaphanacomdocsDOC-4376
Want i understood from various blog is this
From SP7 we can write exsits in the OData services and it is very easy to consume at the client side just like
any REST base service and from my understanding it is Scalable as well I would love to use XSOData always
becuase development effort is very less compare to XSJS and it is very easy to rampup the team on OData
related development objects
XSJS were as provide more control becuase of server side scripting becuase it allows development on the
server side using JavaScript Core APIs of SAP HANA Extended Application Services are therefore exposed
as JavaScript functions providing easy access to the HTTP Request and Response object as well database
access to execute SQL or call SQLScript Procedures It provide us control over the body format and and URL
parameter definition
Could please help me in understanding in more advantagesdisadvantages for both techniques
I am very keen to understand and also explain the same to team members becuase i dont want to use both the
approaches and even sometimes customer can also ask the same to us
Also If we are on SP6 then from my understanding XSJS provides us more capability in terms of complex
application Corrent me If i am wrong
Thanks
Regards
Vikas Madaan
Thomas Jung in response to Raghuveer Phull on page 42Feb 5 2014 312 PM
Yes there are videos on the CRUD features of XSODATA which were new in SP6
For more on CRUD support in SP6 see this video
oData CreateUpdateDelete Support in SAP HANA SPS6
For the extended support for XSJS exits in SP7 see this video
SAP HANA SPS 07 XSODATA Exits in XSJS
Raghuveer PhullFeb 5 2014 122 AM
Do you have an exampledocumentationvideo where you can write a service which will populate Hana DB
What I am asking for is a way for my external script to populate the DB tables i have created in Hana DB
Thomas Jung in response to reda miraoui on page 43Jan 29 2014 411 PM
The source code for the examples shown here are shipped as part of SHINE (SAP HANA Interactive
Education)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010043
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Vivek Singh Bhoj in response to reda miraoui on page 43Jan 29 2014 352 PM
Hi Reda
You can import Shine Content in HANA and then check all these source codes
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Regards
Vivek
reda miraoui in response to Thomas Jung on page Jan 29 2014 344 PM
Hey Thomas
Is it possible to download source code of your project from this HANA tutorial
Thanks
Reda
Thomas Jung in response to Abdul Hakim on page 43Nov 21 2013 1133 PM
Yes River can be used as an alternative and when activated it will generate Server Side JavaScript andor
SQLScript
Abdul Hakim in response to Thomas Jung on page 44Nov 21 2013 747 PM
Hi Thomas - Was going through blog regarding River (RDL)Just a question on this
When you say Programming language for HANA native development is Server side Javascript SQL SQL
ScriptOnce RDL is rolled out whether RDL can be used for native application development instead of Server
side Java script SQL SQL Script I am very much new to this stuff so appreciate if you can also help on
how to get started with Server Side Java script SQL SQL Script for HANA
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 30 2013 750 AM
Hi Thomas
Thanks for your response I am talking about more content on shine
thanks
Ashutosh
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010044
Baskar Gopalakrishnan in response to Thomas Jung on page 44Oct 30 2013 1249 AM
Hi Thomas
Im a SAP PI Middleware consultantSAP topic leader in XIPI heavily worked on Java related
Netweaver stack I have knowledge in ABAP but not worked heavily in abap I have enrolled your sap hana
native application development course I feel very interesting I did work heavily in java and javascript projects
using eclipse development tool Do you think if I invest my time in just native hana development and proceed
in HANA field is a good step I dont have BW experience either
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 819 PM
Thanks for the clarification Much appreciated
Thomas Jung in response to Abdul Hakim on page 44Oct 29 2013 120 PM
gtABAP Close to HANA means whether we can expect a similar 2 tier architecture similar to HANA XS in the
future or what does that mean
No it doesnt mean that ABAP will become a 2 tier architecture We will not move the ABAP VMKernel into
HANA itself It will remain a separate application server At least for the current plansforeseeable future What
he was referring to was bringing the programming models closer For instance the new 740 SP5 feature that
allows you to write SQLScript directly within an ABAP class method
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 650 AM
Thomas - Thanks for the clarificationMuch appreciatedI was listening to ABAP on HANA session by
Thorsten Schneider this year Teched and he was mentioning that SAP Plans to bring ABAP very close to
HANA in the coming future but not much details have been discussed in the sessionABAP Close to HANA
means whether we can expect a similar 2 tier architecture similar to HANA XS in the future or what does that
mean
Thanks
Hakim
Thomas Jung in response to Abdul Hakim on page 45Oct 28 2013 703 PM
gt whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the option is
recommended by SAP then kindly share the pros and cons of each of the item
Taken from the TechEd CD103 session slides
Guidance
bulluse ABAP for optimization of existing progams (in context of SAP Business Suite or BW)
bullconsider HANA Native Development for development of new applications which will solely run on SAP HANA
bullcombine ABAP and HANA Native Development to enrich existing applications (eg SAP HANA Live Fiori)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010045
ABAP
bullapplications follow 3-tier architecture
bullABAP is in general database agnostic but with release 74 optimized for SAP HANA
bullProgramming language ABAP ABAP OO with the option to use SAP HANA features
bullIDE eclipse-based ABAP Development Tools
HANA Native Development
bullapplications follow 2-tier architecture
bullHANA Native Development is SAP HANA specific and embedded in the database
bullProgramming language River server-side JavaScript SQLSQLScript
bullIDE eclipse-based SAP HANA Studio + web IDE
Thomas Jung in response to ashutosh dixit on page 45Oct 28 2013 701 PM
gtIs there any more demos for the SHINE
Im not exactly sure what you mean by that We are building additional content for SHINE that will be delivered
in SP7
Abdul HakimOct 28 2013 326 PM
Thomas - Let us say a customer is running SAP Netweaver 74 ABAP with HANA DB and they have HANA
extended service as wellIf the customer wants to do new developments then what is the recommendation
from SAP ie whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the
option is recommended by SAP then kindly share the pros and cons of each of the item (SAP Netweaver 74
ABAP Vs SAP HANA XS)
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 28 2013 221 PM
Hi Thomas
Thanks a lot for your its working now
Is there any more demos for the SHINE
Thanks
Ashutosh
Thomas Jung in response to ashutosh dixit on page 46Oct 25 2013 809 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010046
As this content is now standard in SP6 as part of SHINE (SAP HANA INteractive Education) there also some
setup instructions on helpsapcom
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Basic points to check - have you generated the synonyms in the data generator Ran the data generator to
create some data Have the role assigned Added client 001 to your user profile
ashutosh dixitOct 24 2013 130 PM
Hi Thomas
Amazing blog - once again Thomas thanks
I have been following you for many days attended your OPEN SAP course also
That was an amazing course for new learner like me
One of our client is looking forward for XS based search Application identical to what you have created in your
DEMO
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010047
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010048
But I am not able to fetch the data on blank HTML page is coming with no data
If there is any step by step document related to this please help in getting that
Any help will be highly appreciated
Thanks
Ashutosh
Naveen KumarSep 26 2013 1130 AM
Good Document
Heber FabianoAug 27 2013 323 PM
Great content as always Keep sharing with us
Thomas Jung in response to Orel Stringa on page 48Aug 27 2013 147 PM
This is currently not possible The CORS support is for all origins We dont yet have the feature to maintain a
whitelist of CORS origins
Orel Stringa in response to Thomas Jung on page Aug 27 2013 801 AM
Hi Thomas
nice to see that SAP has made it possible with SP6 to specify cross origin resource sharing (CORS) support
via the xsaccess file SP6 HANA development guide has example of how to specify CORS support
I have build an XS application and would like to serve SAPUI5 on a diffhost than XSHANA
How can I specify that I would like to allow cross origin access restricted to certain domain(s) only
Is there a special keyword syntax for specifying that
Thank yoi
Orel
Vijay UthayakumarAug 27 2013 131 AM
Highly informative amp digestible Fantastic work
Jerry WangAug 1 2013 955 AM
Hi Tomas
Thank you
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010049
Jerry
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 644 PM
JSLint checks are very strict and often produce syntax errors for items that just stylistic and wont actually
cause an error upon activation or runtime You can either ignore the JSLint errors or deactivate JSLint for this
project in these cases However it might also be an indication that the JavaScript code you are trying to import
isnt compatible with Strict mode
httpsdevelopermozillaorgen-USdocsWebJavaScriptReferenceFunctions_and_function_scope
Strict_mode
Milan Vrozina in response to Thomas Jung on page 49Jul 21 2013 624 PM
Thanks for clarification I thought there would be some kind of import
But anyway in case of this specific library I have some problems with JSLint validation when I do cut and paste
of the original code
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 343 PM
What kind of problem are you having using this library Strict mode JavaScript which doesnt try to access the
DOM Window or other client side specific objects should work in Server Side XSJS Generally if you have a
library you just cut and paste into your XSJS or an XSJSLIB file and then call the functions from your code
Milan VrozinaJul 21 2013 339 PM
Hello
first and foremost thank you for perfect openSAP classes related to HANA development and for this blog as
well
I have one question related to server-side javascript You mentioned in course that is possible to use 3rd party
libraries or reuse 3rd party code But I cant find a possible way how to import 3rd party javascript library -as
is- to server and use it For example I would like to use JSZip library to zip some file before sending it to client
from xsjs application Is that possible Thank you
Chandrashekhar MahajanJul 3 2013 734 PM
This is excellent blog Now HANA XS is very much clear to me
Mohan krishnaJul 1 2013 144 PM
WOW - great blog Thomas This will be very helpful in understanding SAP hana Good Job
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010050
Abdul Hakim in response to Thomas Jung on page 50Jun 27 2013 833 PM
Thanks for the clarification
Thomas Jung in response to Abdul Hakim on page 50Jun 27 2013 659 PM
HANA Extended Application Services uses SQLScript and JavaScript as its two primary programming
languages
gtwhether the current SAP Business suite based on ABAP will be completely migrated to HANA service
No The Business Suite already runs on HANA but still via the ABAP application server It will continue to
leverage HANA via a combination of enhancements to ABAP and utilizing some of the technologies described
in this blog
gtAlso whether ABAP can be used to built application in HANA extended services
No There is no ABAP language container in HANA Extended Application Services
Abdul HakimJun 27 2013 405 PM
Hi Thomas - What is the programming language used for HANA Extended application services
As HANA is more than a database ie application platform by itself and as you mentioned that more and more
applications will be built on HANA i have question as how the future SAP ERP system looks likewhether the
current SAP Business suite based on ABAP will be completely migrated to HANA service in the future or SAP
ABAP server will continue to evolve and receive focus investment from SAP Also whether ABAP can be used
to built application in HANA extended services Your thoughts
Thanks
Abdul Hakim
Thomas Jung in response to Ravindra Channe on page 50Jun 11 2013 830 PM
Yes it is still planned However we are still a couple of weeks away and Ive not seen the final installers to say
for certain its there
Ravindra ChanneJun 11 2013 815 PM
Hi Thomas
Thanks for a wonderful and very informative blog Is there any update on 32 bit REGI file
Is it expected along with SPS6
Regards
Ravi
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010051
Thomas Jung in response to Amanda Rzepka on page Jun 7 2013 942 PM
gtCan the XS Services be used in a BW on HANA Scenario
Yes XS is part of ALL HANA systems You should check and make sure you are licensed for direct access to
the underlying HANA instance however
Thomas Jung in response to Holger Schimanski on page Jun 7 2013 941 PM
gtIs there a similar library which could be used in XS Engine
The XSODATA development object is similar We also have higher level frameworks for XMLA and Search
Services (InA) You can expect more such high level frameworks to be added to the HANA Extended
Application Services in the future
Thomas Jung in response to Manav Mehra on page Jun 7 2013 939 PM
Have you used something like the Chrome developer tools to see see if you are getting any client side
javascript errors or to see if the request to your xsodata service is successful
Thomas Jung in response to Christian Hufnagl on page 52Jun 7 2013 938 PM
It will ship as non-automatic content in SPS6 (all systems will have it and it just needs to be imported) The
delivery units are also part of this weeks updates to the Cloudshare and AWS developer center images They
are also available for download as part of the content of the openSAP course
Thomas Jung in response to Matthew Pickell on page 51Jun 7 2013 937 PM
CORS support will come with SPS6 at the end of June
Thomas Jung in response to Jeroen Custers on page 51Jun 7 2013 936 PM
gtWill this bug be fixed in HANA ver 56
Personally Ive still experienced this bug in SPS6 internal builds Must be a tricky one to find Luckily the
workaround of closing and reopening isnt too difficult Just annoying This also probably makes the bug low
priority
Jeroen Custers in response to Vivek Singh Bhoj on page 52Jun 7 2013 411 PM
This issue also occurs on rev56
Matthew PickellJun 7 2013 258 PM
Thomas
Has CORS been included in a release yet
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010052
Vivek Singh Bhoj in response to Chandra Edem on page 52Jun 5 2013 601 AM
Hi Chandra
Date for Week1 Assignment has been extended till June 11
So you can give Week 1 Assignment now
Christian HufnaglJun 4 2013 543 PM
Hi Thomas
thank you for the interesting tutorial
Can you tell me whether it is possible to download the source code of the ldquoPutting it all togetherrdquovideo And if yes Where can I download itThanks
Christoph
Vivek Singh BhojJun 4 2013 1116 AM
Hi Thomas
Thanks for OpenSAP classes
Your Youtube Account also have very good exercises
IN OpenSAP Week 2 Unit 3 tutorial after assigning admin role to my user Id i am not able to see sequences
synonyms triggers under my schema or any other schema i am only able to see Column Views Procedures
Tables and Views
Though now i am able to insert data into my created table
Can you let me know how i will be able to see Sequences under my schema without removing the admin role
I am using HANA revision 52
Got to know from OpenSAP that
This is a known issue and the only way that Ive seen to fix it is to actually close the studio and open it again
then refresh the node
Cheers
Rich Heilman
SAP HANA Product Management
Will this bug be fixed in HANA ver 56
Chandra Edem in response to Thomas Jung on page 53Jun 4 2013 646 AM
Thomas
I registered for OpenSAP course Introduction to Software Development on SAP HANA on June 2 900PM
I didnt know that it is going to end WEEK1 assignment test on 632013 300PM Is there any way can take
that WEEK1 Assignment Test
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010053
Thanks
Chandra
Thomas Jung in response to Alexander Bauer on page Jun 3 2013 856 PM
SAPUI5 gets updated auutomatically when you apply HANA revisions There is no additional download or
update needed
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010029
Pls suggest if there is anything to add or correct in XS odata service syntax above
Regards
Kamal Jain
Vikas Madaan in response to Thomas Jung on page 29Apr 14 2014 458 PM
Thanks Thomas
Under which component
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 29Apr 14 2014 450 PM
No this isnt a known issue Ive seen Nor can I recreate the problem in my system No you cant maintain the
authentication in XSHTTPDEST itself It intentionally must be set in XSADMIN tool I can really only suggest
that you open a support ticket
Vikas MadaanApr 14 2014 431 PM
Hi Thomas
I am trying to pull data from SAP system onto HANA Database using XSJOB files I am calling RFC enabled
function modules over HTTP request It helps me replicating the real time ECC data onto HANA as well with
back ground jobs
I am facing one problem in the XSHTTPDEST file I am able to create and activate the file using studio and this
file is even visible in the web based XS administration tool But in the web based tool when i provide user and
password for basic authotication then system just clears the user id and password when i try to save This the
reason our HTTP requests are getting failed and below is the response we are getting in the response body
lthtmlgtltheadgtlttitlegtLogon Error Messagelttitlegt
Is this known issue or we are missing something Is it possible to provide user and password in the
XSHTTPDEST file Is there any particular syntax
I checked and i have the required authorizations as well develper Guide
Please help
Regards
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010030
Vikas Madaan
Abdul HakimFeb 22 2014 359 AM
Hi Thomas - Any recommended book or resource to learn and master Server Side Javascript There were
many books available in the market but as a beginner need to know the right resource book to start with and
master this stuffAlso whether SAP plan to conduct any training to teach Server Side Javascript similar to other
standard training offerings
Thanks
Hakim
Samuel Tanor-GyeduFeb 20 2014 839 AM
Thanks Thomas
I will definitely have a look at SHINE
Thomas Jung in response to gentilini andre on page 30Feb 19 2014 422 PM
Difficult to say what is wrong I several things which are different than our sample that does this You are using
a POST for instance instead of a GET However if you are gettting a 200 then I assume the service call is
correct In client side tools (like Chrome Developer Tools) you should be able to see the response object from
the call
However what I would really recommend is that you study the SHINE content (SAP HANA Interactive
Education) There is already a sample application which does this in SHINE Also it has some special
JavaScript in the UI to handle the file attachment via AXAJ call Perhaps that is the part you are missing
You can read more about SHINE here It is also included already installed in the latest version of the HANA
Developer Center trial image (SP7 based)
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
gentilini andreFeb 19 2014 325 PM
Hi Thomas
well I followed your hints but it still donacutet work
I created a xsjs File like below
function downloadExcel()
try
var body =
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010031
alert(drin)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
alert(drusse)
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount
tTax Amount tNetto Amount tCurrency n
while(rsnext())
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
catch (e)
alert(db conn funktioniert nicht)
var a = $requestparametersget(cmd)
$responsesetBody(Invalid Command +a)
switch (a)
case doex
$responsesetBody(Invalid Command +a)
alert(filedownload)
thisdownloadExcel()
break
default
$responsestatus = $nethttpINTERNAL_SERVER_ERROR
$responsesetBody(Invalid Command +a)
The Controllerjs File
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010032
doFileDownload function (oEvent)
jQuerysaprequire(sapuicommonsMessageBox)
sapuicommonsMessageBoxshow(Export Starten sapuicommonsMessageBoxIconconfirm
Information)
sapuicommonsMessageBoxconfirm(Export starteninform Confirmation)
return false
function inform(rValue)
alert (drinnnnne)
var aurl = FileDownloadxsjscmd=doex
if(rValue) If User presses Ok
alert(aurl)
jQueryajax(
url aurl
method POST
dataType json
datacmddoex
success sapuicommonsMessageBoxalert(Export wird ausgefuumlhrtConfirmation)
errorfunction onErrorCall(jqXHR textStatus errorThrown)
alert(jqXHRstatus)
sapuicommonsMessageBoxshow(jqXHRstatus
ERROR
Error in calling Service )
return
complete sapuicommonsMessageBoxalert(Export Erfolgreich
abgeschlossenConfirmation)
)
return false
else If the user presses Cancel
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010033
sapuicommonsMessageBoxalert(Vorgang abgebrochenNotification)
)
at last but not least the view
sapuijsview(zag1_ui_cv_03Index
Specifies the Controller belonging to this View
In the case that it is not implemented or that null is returned this View does not have a Controller
memberOf zag1_ui_cv_03Index
getControllerName function()
return zag1_ui_cv_03Index
Is initially called once after the Controller has been instantiated It is the place where the UI is
constructed
Since the Controller is given to this method its event handlers can be attached right away
memberOf zag1_ui_cv_03Index
createContent function(oController)
create a lite button with an icon and a text
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010034
lite true
)placeAt(btn)
oButton3attachPress(oControllerdoFileDownload)
var oButton4 = new sapuicommonsButton(
text Refresh
icon imagesrefreshjpg
lite true
press function() var data = oTableval()
if(data == )
alert(no data found)
return
print(content)
print(DatArray)
if (data = )
alert(Funzt)
JSONToCSVConvertor(data CUSTOMER AMOUNT true)
)placeAt(btn)
jQuerysaprequire(sapuitableTable)
create table control with properties
var oTable = new sapuitableTable(
width 100
rowHeight 50
title Amount per Partner
selectionMode sapuitableSelectionModeNone
)
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Company Name
)
template new sapuicommonsTextView(
text CompanyName
)
sortProperty CompanyName
))
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010035
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Partner ID
)
template new sapuicommonsTextView(
text PartnerId
)
sortProperty PartnerId
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Postal Code
textAlign sapuicoreTextAlignEnd
)
template new sapuicommonsTextView(
text PostalCode
textAlign sapuicoreTextAlignEnd
)
sortProperty PostalCode
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text City
)
template new sapuicommonsTextView(
text City
)
sortProperty City
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Purchase ID
)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010036
template new sapuicommonsTextView(
text PurchaseOrderId
)
sortProperty Currency
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Lifecycle Status
)
template new sapuicommonsTextView(
text LifecycleStatus
)
sortProperty LifecycleStatus
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Gross Amount
)
template new sapuicommonsTextView(
text GrossAmount
)
sortProperty GrossAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Tax Amount
)
template new sapuicommonsTextView(
text TaxAmount
)
sortProperty TaxAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Amount Netto
)
template new sapuicommonsTextView(
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010037
text CM_NET_Amount_001
)
sortProperty CM_NET_Amount_001
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Currency
)
template new sapuicommonsTextView(
text Currency
)
sortProperty Currency
))
var oModel = new sapuimodelodataODataModel
(httpqperiorvmcldsr8000ZAG1_WS_001ZAG1_CV_001xsodata false)
oTablesetModel(oModel)
oTablebindRows(Amount)
return oTable
)
It wonacutet call the function or better said the action of the button works fine till to the point where it should call the
xsjsfile to generate the excel-file I wondered that in the ajax part the error- success- and complete-part will
be executed at the same time and not only one of this statements The message is 200 (The request has
succeeded The information returned with the response is dependent on the method used in the request)
Maybe you can see where my mistake is or whats going wrong
Iacuteve the developer edition on cloudshare (Hana Studio rev68 Server is on SPS05)
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010038
Andreacute
Thomas Jung in response to Samuel Tanor-Gyedu on page 38Feb 19 2014 523 AM
I dont think I can help you This appears to a question about how odata4j works not about XS I have no
experience with odata4j myself
Samuel Tanor-GyeduFeb 18 2014 913 AM
Hi Thomas
I have an odata service with this endpointhttpss5hanaxshanatrialondemandcomservicesUserxsodata
I am now trying to consume it from eclipse with the odata4j libraries
This is how I get the endpoint
public UserServiceOdata(String endpointUri)
thisendpointUri = endpointUri
ODataConsumerdumpresponseHeaders(true)
consumer = ODataConsumerscreate(endpointUri)
This is my method to add a user
public User addUser(User user)
consumercreateEntity(entitySet)properties(OPropertiesint32(propertyUserId
usergetId()))properties(OPropertiesstring(propertyUserName
usergetName()))properties(OPropertiesstring(propertyUserEmail usergetEmail()))execute()
return user
When I call addUser method I get an Error
Caused by javaxxmlstreamXMLStreamException ParseError at [rowcol][78253]
Message The reference to entity sourceUrl must end with the delimiter
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010039
When I use this endpoint httpss5hanaxshanatrialondemandcomservicesUsersvc everything works fine
With the httpss5hanaxshanatrialondemandcomservicesUserxsodata I get errors
Please I would be very grateful for assistance
Thanks in advance
Regards
Samuel
Thomas Jung in response to gentilini andre on page 39Feb 18 2014 431 AM
You have a fundamental misunderstanding here You are placing server side JavaScript code in your client
side UI5 application The function downloadExcel is something you need to execute on the server It needs to
be in an XSJS file and it is called from the client side via AJAX - as a REST service not as a local function
gentilini andreFeb 17 2014 451 PM
Hello Thomas
Thank you for this great How-To Guide
Iacutem pretty new in SAPUI5 and tried your export-sample in my little trial project but it doesnacutet work
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010040
My Button for this looks like
ltcodegt
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
lite true
press function() alert(oButton3getText())
downloadExcel()
ltcodegt
and the function for this action looks like
ltcodegt
function downloadExcel()
var body =
alert(drin)
print($query)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount tTax
Amount tNetto Amount tCurrency n
while(rsnext())
if(rsnext() == )
alert($responsesetBody( Failed to retrieve data ))
alert($responsestatus = $nethttpINTERNAL_SERVER_ERROR)
else
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010041
ltcodegt
Iacutem afraid and hope that you can help me
Kind regards
Andreacute
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1246 PM
gtIs there any restriction or development limitation in the XSJSLIB files
Thats a very general question Difficult to answer without any context
Vikas Madaan in response to Thomas Jung on page 41Feb 11 2014 1245 PM
Thanks Thomas
I think we are on same page
Once quick question that came to my mind Is there any restriction or development limitation in the XSJSLIB
files
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1230 PM
gtCould please help me in understanding in more advantagesdisadvantages for both techniques
Youve summarized it pretty well already
gtbecuase i dont want to use both the approaches
Even with the CRUD support and exits in XSODATA its still pretty hard to do 100 via XSODATA There are
still valid use cases for XSJS when you need custom body custom read processing job scheduling etc Its
good to try and use XSODATA whenever possible but I wouldnt automatically exclude the use of XSJS
Vikas MadaanFeb 11 2014 1008 AM
Hi Thomas
Thanks a lot for sharing useful information through various blogs
In my current project we are evaluating use of XSOData or XSJS applications I saw your videos like the one
mentioned below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010042
httpwwwsaphanacomdocsDOC-4376
Want i understood from various blog is this
From SP7 we can write exsits in the OData services and it is very easy to consume at the client side just like
any REST base service and from my understanding it is Scalable as well I would love to use XSOData always
becuase development effort is very less compare to XSJS and it is very easy to rampup the team on OData
related development objects
XSJS were as provide more control becuase of server side scripting becuase it allows development on the
server side using JavaScript Core APIs of SAP HANA Extended Application Services are therefore exposed
as JavaScript functions providing easy access to the HTTP Request and Response object as well database
access to execute SQL or call SQLScript Procedures It provide us control over the body format and and URL
parameter definition
Could please help me in understanding in more advantagesdisadvantages for both techniques
I am very keen to understand and also explain the same to team members becuase i dont want to use both the
approaches and even sometimes customer can also ask the same to us
Also If we are on SP6 then from my understanding XSJS provides us more capability in terms of complex
application Corrent me If i am wrong
Thanks
Regards
Vikas Madaan
Thomas Jung in response to Raghuveer Phull on page 42Feb 5 2014 312 PM
Yes there are videos on the CRUD features of XSODATA which were new in SP6
For more on CRUD support in SP6 see this video
oData CreateUpdateDelete Support in SAP HANA SPS6
For the extended support for XSJS exits in SP7 see this video
SAP HANA SPS 07 XSODATA Exits in XSJS
Raghuveer PhullFeb 5 2014 122 AM
Do you have an exampledocumentationvideo where you can write a service which will populate Hana DB
What I am asking for is a way for my external script to populate the DB tables i have created in Hana DB
Thomas Jung in response to reda miraoui on page 43Jan 29 2014 411 PM
The source code for the examples shown here are shipped as part of SHINE (SAP HANA Interactive
Education)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010043
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Vivek Singh Bhoj in response to reda miraoui on page 43Jan 29 2014 352 PM
Hi Reda
You can import Shine Content in HANA and then check all these source codes
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Regards
Vivek
reda miraoui in response to Thomas Jung on page Jan 29 2014 344 PM
Hey Thomas
Is it possible to download source code of your project from this HANA tutorial
Thanks
Reda
Thomas Jung in response to Abdul Hakim on page 43Nov 21 2013 1133 PM
Yes River can be used as an alternative and when activated it will generate Server Side JavaScript andor
SQLScript
Abdul Hakim in response to Thomas Jung on page 44Nov 21 2013 747 PM
Hi Thomas - Was going through blog regarding River (RDL)Just a question on this
When you say Programming language for HANA native development is Server side Javascript SQL SQL
ScriptOnce RDL is rolled out whether RDL can be used for native application development instead of Server
side Java script SQL SQL Script I am very much new to this stuff so appreciate if you can also help on
how to get started with Server Side Java script SQL SQL Script for HANA
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 30 2013 750 AM
Hi Thomas
Thanks for your response I am talking about more content on shine
thanks
Ashutosh
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010044
Baskar Gopalakrishnan in response to Thomas Jung on page 44Oct 30 2013 1249 AM
Hi Thomas
Im a SAP PI Middleware consultantSAP topic leader in XIPI heavily worked on Java related
Netweaver stack I have knowledge in ABAP but not worked heavily in abap I have enrolled your sap hana
native application development course I feel very interesting I did work heavily in java and javascript projects
using eclipse development tool Do you think if I invest my time in just native hana development and proceed
in HANA field is a good step I dont have BW experience either
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 819 PM
Thanks for the clarification Much appreciated
Thomas Jung in response to Abdul Hakim on page 44Oct 29 2013 120 PM
gtABAP Close to HANA means whether we can expect a similar 2 tier architecture similar to HANA XS in the
future or what does that mean
No it doesnt mean that ABAP will become a 2 tier architecture We will not move the ABAP VMKernel into
HANA itself It will remain a separate application server At least for the current plansforeseeable future What
he was referring to was bringing the programming models closer For instance the new 740 SP5 feature that
allows you to write SQLScript directly within an ABAP class method
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 650 AM
Thomas - Thanks for the clarificationMuch appreciatedI was listening to ABAP on HANA session by
Thorsten Schneider this year Teched and he was mentioning that SAP Plans to bring ABAP very close to
HANA in the coming future but not much details have been discussed in the sessionABAP Close to HANA
means whether we can expect a similar 2 tier architecture similar to HANA XS in the future or what does that
mean
Thanks
Hakim
Thomas Jung in response to Abdul Hakim on page 45Oct 28 2013 703 PM
gt whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the option is
recommended by SAP then kindly share the pros and cons of each of the item
Taken from the TechEd CD103 session slides
Guidance
bulluse ABAP for optimization of existing progams (in context of SAP Business Suite or BW)
bullconsider HANA Native Development for development of new applications which will solely run on SAP HANA
bullcombine ABAP and HANA Native Development to enrich existing applications (eg SAP HANA Live Fiori)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010045
ABAP
bullapplications follow 3-tier architecture
bullABAP is in general database agnostic but with release 74 optimized for SAP HANA
bullProgramming language ABAP ABAP OO with the option to use SAP HANA features
bullIDE eclipse-based ABAP Development Tools
HANA Native Development
bullapplications follow 2-tier architecture
bullHANA Native Development is SAP HANA specific and embedded in the database
bullProgramming language River server-side JavaScript SQLSQLScript
bullIDE eclipse-based SAP HANA Studio + web IDE
Thomas Jung in response to ashutosh dixit on page 45Oct 28 2013 701 PM
gtIs there any more demos for the SHINE
Im not exactly sure what you mean by that We are building additional content for SHINE that will be delivered
in SP7
Abdul HakimOct 28 2013 326 PM
Thomas - Let us say a customer is running SAP Netweaver 74 ABAP with HANA DB and they have HANA
extended service as wellIf the customer wants to do new developments then what is the recommendation
from SAP ie whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the
option is recommended by SAP then kindly share the pros and cons of each of the item (SAP Netweaver 74
ABAP Vs SAP HANA XS)
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 28 2013 221 PM
Hi Thomas
Thanks a lot for your its working now
Is there any more demos for the SHINE
Thanks
Ashutosh
Thomas Jung in response to ashutosh dixit on page 46Oct 25 2013 809 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010046
As this content is now standard in SP6 as part of SHINE (SAP HANA INteractive Education) there also some
setup instructions on helpsapcom
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Basic points to check - have you generated the synonyms in the data generator Ran the data generator to
create some data Have the role assigned Added client 001 to your user profile
ashutosh dixitOct 24 2013 130 PM
Hi Thomas
Amazing blog - once again Thomas thanks
I have been following you for many days attended your OPEN SAP course also
That was an amazing course for new learner like me
One of our client is looking forward for XS based search Application identical to what you have created in your
DEMO
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010047
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010048
But I am not able to fetch the data on blank HTML page is coming with no data
If there is any step by step document related to this please help in getting that
Any help will be highly appreciated
Thanks
Ashutosh
Naveen KumarSep 26 2013 1130 AM
Good Document
Heber FabianoAug 27 2013 323 PM
Great content as always Keep sharing with us
Thomas Jung in response to Orel Stringa on page 48Aug 27 2013 147 PM
This is currently not possible The CORS support is for all origins We dont yet have the feature to maintain a
whitelist of CORS origins
Orel Stringa in response to Thomas Jung on page Aug 27 2013 801 AM
Hi Thomas
nice to see that SAP has made it possible with SP6 to specify cross origin resource sharing (CORS) support
via the xsaccess file SP6 HANA development guide has example of how to specify CORS support
I have build an XS application and would like to serve SAPUI5 on a diffhost than XSHANA
How can I specify that I would like to allow cross origin access restricted to certain domain(s) only
Is there a special keyword syntax for specifying that
Thank yoi
Orel
Vijay UthayakumarAug 27 2013 131 AM
Highly informative amp digestible Fantastic work
Jerry WangAug 1 2013 955 AM
Hi Tomas
Thank you
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010049
Jerry
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 644 PM
JSLint checks are very strict and often produce syntax errors for items that just stylistic and wont actually
cause an error upon activation or runtime You can either ignore the JSLint errors or deactivate JSLint for this
project in these cases However it might also be an indication that the JavaScript code you are trying to import
isnt compatible with Strict mode
httpsdevelopermozillaorgen-USdocsWebJavaScriptReferenceFunctions_and_function_scope
Strict_mode
Milan Vrozina in response to Thomas Jung on page 49Jul 21 2013 624 PM
Thanks for clarification I thought there would be some kind of import
But anyway in case of this specific library I have some problems with JSLint validation when I do cut and paste
of the original code
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 343 PM
What kind of problem are you having using this library Strict mode JavaScript which doesnt try to access the
DOM Window or other client side specific objects should work in Server Side XSJS Generally if you have a
library you just cut and paste into your XSJS or an XSJSLIB file and then call the functions from your code
Milan VrozinaJul 21 2013 339 PM
Hello
first and foremost thank you for perfect openSAP classes related to HANA development and for this blog as
well
I have one question related to server-side javascript You mentioned in course that is possible to use 3rd party
libraries or reuse 3rd party code But I cant find a possible way how to import 3rd party javascript library -as
is- to server and use it For example I would like to use JSZip library to zip some file before sending it to client
from xsjs application Is that possible Thank you
Chandrashekhar MahajanJul 3 2013 734 PM
This is excellent blog Now HANA XS is very much clear to me
Mohan krishnaJul 1 2013 144 PM
WOW - great blog Thomas This will be very helpful in understanding SAP hana Good Job
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010050
Abdul Hakim in response to Thomas Jung on page 50Jun 27 2013 833 PM
Thanks for the clarification
Thomas Jung in response to Abdul Hakim on page 50Jun 27 2013 659 PM
HANA Extended Application Services uses SQLScript and JavaScript as its two primary programming
languages
gtwhether the current SAP Business suite based on ABAP will be completely migrated to HANA service
No The Business Suite already runs on HANA but still via the ABAP application server It will continue to
leverage HANA via a combination of enhancements to ABAP and utilizing some of the technologies described
in this blog
gtAlso whether ABAP can be used to built application in HANA extended services
No There is no ABAP language container in HANA Extended Application Services
Abdul HakimJun 27 2013 405 PM
Hi Thomas - What is the programming language used for HANA Extended application services
As HANA is more than a database ie application platform by itself and as you mentioned that more and more
applications will be built on HANA i have question as how the future SAP ERP system looks likewhether the
current SAP Business suite based on ABAP will be completely migrated to HANA service in the future or SAP
ABAP server will continue to evolve and receive focus investment from SAP Also whether ABAP can be used
to built application in HANA extended services Your thoughts
Thanks
Abdul Hakim
Thomas Jung in response to Ravindra Channe on page 50Jun 11 2013 830 PM
Yes it is still planned However we are still a couple of weeks away and Ive not seen the final installers to say
for certain its there
Ravindra ChanneJun 11 2013 815 PM
Hi Thomas
Thanks for a wonderful and very informative blog Is there any update on 32 bit REGI file
Is it expected along with SPS6
Regards
Ravi
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010051
Thomas Jung in response to Amanda Rzepka on page Jun 7 2013 942 PM
gtCan the XS Services be used in a BW on HANA Scenario
Yes XS is part of ALL HANA systems You should check and make sure you are licensed for direct access to
the underlying HANA instance however
Thomas Jung in response to Holger Schimanski on page Jun 7 2013 941 PM
gtIs there a similar library which could be used in XS Engine
The XSODATA development object is similar We also have higher level frameworks for XMLA and Search
Services (InA) You can expect more such high level frameworks to be added to the HANA Extended
Application Services in the future
Thomas Jung in response to Manav Mehra on page Jun 7 2013 939 PM
Have you used something like the Chrome developer tools to see see if you are getting any client side
javascript errors or to see if the request to your xsodata service is successful
Thomas Jung in response to Christian Hufnagl on page 52Jun 7 2013 938 PM
It will ship as non-automatic content in SPS6 (all systems will have it and it just needs to be imported) The
delivery units are also part of this weeks updates to the Cloudshare and AWS developer center images They
are also available for download as part of the content of the openSAP course
Thomas Jung in response to Matthew Pickell on page 51Jun 7 2013 937 PM
CORS support will come with SPS6 at the end of June
Thomas Jung in response to Jeroen Custers on page 51Jun 7 2013 936 PM
gtWill this bug be fixed in HANA ver 56
Personally Ive still experienced this bug in SPS6 internal builds Must be a tricky one to find Luckily the
workaround of closing and reopening isnt too difficult Just annoying This also probably makes the bug low
priority
Jeroen Custers in response to Vivek Singh Bhoj on page 52Jun 7 2013 411 PM
This issue also occurs on rev56
Matthew PickellJun 7 2013 258 PM
Thomas
Has CORS been included in a release yet
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010052
Vivek Singh Bhoj in response to Chandra Edem on page 52Jun 5 2013 601 AM
Hi Chandra
Date for Week1 Assignment has been extended till June 11
So you can give Week 1 Assignment now
Christian HufnaglJun 4 2013 543 PM
Hi Thomas
thank you for the interesting tutorial
Can you tell me whether it is possible to download the source code of the ldquoPutting it all togetherrdquovideo And if yes Where can I download itThanks
Christoph
Vivek Singh BhojJun 4 2013 1116 AM
Hi Thomas
Thanks for OpenSAP classes
Your Youtube Account also have very good exercises
IN OpenSAP Week 2 Unit 3 tutorial after assigning admin role to my user Id i am not able to see sequences
synonyms triggers under my schema or any other schema i am only able to see Column Views Procedures
Tables and Views
Though now i am able to insert data into my created table
Can you let me know how i will be able to see Sequences under my schema without removing the admin role
I am using HANA revision 52
Got to know from OpenSAP that
This is a known issue and the only way that Ive seen to fix it is to actually close the studio and open it again
then refresh the node
Cheers
Rich Heilman
SAP HANA Product Management
Will this bug be fixed in HANA ver 56
Chandra Edem in response to Thomas Jung on page 53Jun 4 2013 646 AM
Thomas
I registered for OpenSAP course Introduction to Software Development on SAP HANA on June 2 900PM
I didnt know that it is going to end WEEK1 assignment test on 632013 300PM Is there any way can take
that WEEK1 Assignment Test
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010053
Thanks
Chandra
Thomas Jung in response to Alexander Bauer on page Jun 3 2013 856 PM
SAPUI5 gets updated auutomatically when you apply HANA revisions There is no additional download or
update needed
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010030
Vikas Madaan
Abdul HakimFeb 22 2014 359 AM
Hi Thomas - Any recommended book or resource to learn and master Server Side Javascript There were
many books available in the market but as a beginner need to know the right resource book to start with and
master this stuffAlso whether SAP plan to conduct any training to teach Server Side Javascript similar to other
standard training offerings
Thanks
Hakim
Samuel Tanor-GyeduFeb 20 2014 839 AM
Thanks Thomas
I will definitely have a look at SHINE
Thomas Jung in response to gentilini andre on page 30Feb 19 2014 422 PM
Difficult to say what is wrong I several things which are different than our sample that does this You are using
a POST for instance instead of a GET However if you are gettting a 200 then I assume the service call is
correct In client side tools (like Chrome Developer Tools) you should be able to see the response object from
the call
However what I would really recommend is that you study the SHINE content (SAP HANA Interactive
Education) There is already a sample application which does this in SHINE Also it has some special
JavaScript in the UI to handle the file attachment via AXAJ call Perhaps that is the part you are missing
You can read more about SHINE here It is also included already installed in the latest version of the HANA
Developer Center trial image (SP7 based)
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
gentilini andreFeb 19 2014 325 PM
Hi Thomas
well I followed your hints but it still donacutet work
I created a xsjs File like below
function downloadExcel()
try
var body =
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010031
alert(drin)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
alert(drusse)
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount
tTax Amount tNetto Amount tCurrency n
while(rsnext())
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
catch (e)
alert(db conn funktioniert nicht)
var a = $requestparametersget(cmd)
$responsesetBody(Invalid Command +a)
switch (a)
case doex
$responsesetBody(Invalid Command +a)
alert(filedownload)
thisdownloadExcel()
break
default
$responsestatus = $nethttpINTERNAL_SERVER_ERROR
$responsesetBody(Invalid Command +a)
The Controllerjs File
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010032
doFileDownload function (oEvent)
jQuerysaprequire(sapuicommonsMessageBox)
sapuicommonsMessageBoxshow(Export Starten sapuicommonsMessageBoxIconconfirm
Information)
sapuicommonsMessageBoxconfirm(Export starteninform Confirmation)
return false
function inform(rValue)
alert (drinnnnne)
var aurl = FileDownloadxsjscmd=doex
if(rValue) If User presses Ok
alert(aurl)
jQueryajax(
url aurl
method POST
dataType json
datacmddoex
success sapuicommonsMessageBoxalert(Export wird ausgefuumlhrtConfirmation)
errorfunction onErrorCall(jqXHR textStatus errorThrown)
alert(jqXHRstatus)
sapuicommonsMessageBoxshow(jqXHRstatus
ERROR
Error in calling Service )
return
complete sapuicommonsMessageBoxalert(Export Erfolgreich
abgeschlossenConfirmation)
)
return false
else If the user presses Cancel
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010033
sapuicommonsMessageBoxalert(Vorgang abgebrochenNotification)
)
at last but not least the view
sapuijsview(zag1_ui_cv_03Index
Specifies the Controller belonging to this View
In the case that it is not implemented or that null is returned this View does not have a Controller
memberOf zag1_ui_cv_03Index
getControllerName function()
return zag1_ui_cv_03Index
Is initially called once after the Controller has been instantiated It is the place where the UI is
constructed
Since the Controller is given to this method its event handlers can be attached right away
memberOf zag1_ui_cv_03Index
createContent function(oController)
create a lite button with an icon and a text
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010034
lite true
)placeAt(btn)
oButton3attachPress(oControllerdoFileDownload)
var oButton4 = new sapuicommonsButton(
text Refresh
icon imagesrefreshjpg
lite true
press function() var data = oTableval()
if(data == )
alert(no data found)
return
print(content)
print(DatArray)
if (data = )
alert(Funzt)
JSONToCSVConvertor(data CUSTOMER AMOUNT true)
)placeAt(btn)
jQuerysaprequire(sapuitableTable)
create table control with properties
var oTable = new sapuitableTable(
width 100
rowHeight 50
title Amount per Partner
selectionMode sapuitableSelectionModeNone
)
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Company Name
)
template new sapuicommonsTextView(
text CompanyName
)
sortProperty CompanyName
))
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010035
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Partner ID
)
template new sapuicommonsTextView(
text PartnerId
)
sortProperty PartnerId
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Postal Code
textAlign sapuicoreTextAlignEnd
)
template new sapuicommonsTextView(
text PostalCode
textAlign sapuicoreTextAlignEnd
)
sortProperty PostalCode
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text City
)
template new sapuicommonsTextView(
text City
)
sortProperty City
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Purchase ID
)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010036
template new sapuicommonsTextView(
text PurchaseOrderId
)
sortProperty Currency
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Lifecycle Status
)
template new sapuicommonsTextView(
text LifecycleStatus
)
sortProperty LifecycleStatus
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Gross Amount
)
template new sapuicommonsTextView(
text GrossAmount
)
sortProperty GrossAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Tax Amount
)
template new sapuicommonsTextView(
text TaxAmount
)
sortProperty TaxAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Amount Netto
)
template new sapuicommonsTextView(
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010037
text CM_NET_Amount_001
)
sortProperty CM_NET_Amount_001
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Currency
)
template new sapuicommonsTextView(
text Currency
)
sortProperty Currency
))
var oModel = new sapuimodelodataODataModel
(httpqperiorvmcldsr8000ZAG1_WS_001ZAG1_CV_001xsodata false)
oTablesetModel(oModel)
oTablebindRows(Amount)
return oTable
)
It wonacutet call the function or better said the action of the button works fine till to the point where it should call the
xsjsfile to generate the excel-file I wondered that in the ajax part the error- success- and complete-part will
be executed at the same time and not only one of this statements The message is 200 (The request has
succeeded The information returned with the response is dependent on the method used in the request)
Maybe you can see where my mistake is or whats going wrong
Iacuteve the developer edition on cloudshare (Hana Studio rev68 Server is on SPS05)
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010038
Andreacute
Thomas Jung in response to Samuel Tanor-Gyedu on page 38Feb 19 2014 523 AM
I dont think I can help you This appears to a question about how odata4j works not about XS I have no
experience with odata4j myself
Samuel Tanor-GyeduFeb 18 2014 913 AM
Hi Thomas
I have an odata service with this endpointhttpss5hanaxshanatrialondemandcomservicesUserxsodata
I am now trying to consume it from eclipse with the odata4j libraries
This is how I get the endpoint
public UserServiceOdata(String endpointUri)
thisendpointUri = endpointUri
ODataConsumerdumpresponseHeaders(true)
consumer = ODataConsumerscreate(endpointUri)
This is my method to add a user
public User addUser(User user)
consumercreateEntity(entitySet)properties(OPropertiesint32(propertyUserId
usergetId()))properties(OPropertiesstring(propertyUserName
usergetName()))properties(OPropertiesstring(propertyUserEmail usergetEmail()))execute()
return user
When I call addUser method I get an Error
Caused by javaxxmlstreamXMLStreamException ParseError at [rowcol][78253]
Message The reference to entity sourceUrl must end with the delimiter
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010039
When I use this endpoint httpss5hanaxshanatrialondemandcomservicesUsersvc everything works fine
With the httpss5hanaxshanatrialondemandcomservicesUserxsodata I get errors
Please I would be very grateful for assistance
Thanks in advance
Regards
Samuel
Thomas Jung in response to gentilini andre on page 39Feb 18 2014 431 AM
You have a fundamental misunderstanding here You are placing server side JavaScript code in your client
side UI5 application The function downloadExcel is something you need to execute on the server It needs to
be in an XSJS file and it is called from the client side via AJAX - as a REST service not as a local function
gentilini andreFeb 17 2014 451 PM
Hello Thomas
Thank you for this great How-To Guide
Iacutem pretty new in SAPUI5 and tried your export-sample in my little trial project but it doesnacutet work
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010040
My Button for this looks like
ltcodegt
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
lite true
press function() alert(oButton3getText())
downloadExcel()
ltcodegt
and the function for this action looks like
ltcodegt
function downloadExcel()
var body =
alert(drin)
print($query)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount tTax
Amount tNetto Amount tCurrency n
while(rsnext())
if(rsnext() == )
alert($responsesetBody( Failed to retrieve data ))
alert($responsestatus = $nethttpINTERNAL_SERVER_ERROR)
else
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010041
ltcodegt
Iacutem afraid and hope that you can help me
Kind regards
Andreacute
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1246 PM
gtIs there any restriction or development limitation in the XSJSLIB files
Thats a very general question Difficult to answer without any context
Vikas Madaan in response to Thomas Jung on page 41Feb 11 2014 1245 PM
Thanks Thomas
I think we are on same page
Once quick question that came to my mind Is there any restriction or development limitation in the XSJSLIB
files
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1230 PM
gtCould please help me in understanding in more advantagesdisadvantages for both techniques
Youve summarized it pretty well already
gtbecuase i dont want to use both the approaches
Even with the CRUD support and exits in XSODATA its still pretty hard to do 100 via XSODATA There are
still valid use cases for XSJS when you need custom body custom read processing job scheduling etc Its
good to try and use XSODATA whenever possible but I wouldnt automatically exclude the use of XSJS
Vikas MadaanFeb 11 2014 1008 AM
Hi Thomas
Thanks a lot for sharing useful information through various blogs
In my current project we are evaluating use of XSOData or XSJS applications I saw your videos like the one
mentioned below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010042
httpwwwsaphanacomdocsDOC-4376
Want i understood from various blog is this
From SP7 we can write exsits in the OData services and it is very easy to consume at the client side just like
any REST base service and from my understanding it is Scalable as well I would love to use XSOData always
becuase development effort is very less compare to XSJS and it is very easy to rampup the team on OData
related development objects
XSJS were as provide more control becuase of server side scripting becuase it allows development on the
server side using JavaScript Core APIs of SAP HANA Extended Application Services are therefore exposed
as JavaScript functions providing easy access to the HTTP Request and Response object as well database
access to execute SQL or call SQLScript Procedures It provide us control over the body format and and URL
parameter definition
Could please help me in understanding in more advantagesdisadvantages for both techniques
I am very keen to understand and also explain the same to team members becuase i dont want to use both the
approaches and even sometimes customer can also ask the same to us
Also If we are on SP6 then from my understanding XSJS provides us more capability in terms of complex
application Corrent me If i am wrong
Thanks
Regards
Vikas Madaan
Thomas Jung in response to Raghuveer Phull on page 42Feb 5 2014 312 PM
Yes there are videos on the CRUD features of XSODATA which were new in SP6
For more on CRUD support in SP6 see this video
oData CreateUpdateDelete Support in SAP HANA SPS6
For the extended support for XSJS exits in SP7 see this video
SAP HANA SPS 07 XSODATA Exits in XSJS
Raghuveer PhullFeb 5 2014 122 AM
Do you have an exampledocumentationvideo where you can write a service which will populate Hana DB
What I am asking for is a way for my external script to populate the DB tables i have created in Hana DB
Thomas Jung in response to reda miraoui on page 43Jan 29 2014 411 PM
The source code for the examples shown here are shipped as part of SHINE (SAP HANA Interactive
Education)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010043
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Vivek Singh Bhoj in response to reda miraoui on page 43Jan 29 2014 352 PM
Hi Reda
You can import Shine Content in HANA and then check all these source codes
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Regards
Vivek
reda miraoui in response to Thomas Jung on page Jan 29 2014 344 PM
Hey Thomas
Is it possible to download source code of your project from this HANA tutorial
Thanks
Reda
Thomas Jung in response to Abdul Hakim on page 43Nov 21 2013 1133 PM
Yes River can be used as an alternative and when activated it will generate Server Side JavaScript andor
SQLScript
Abdul Hakim in response to Thomas Jung on page 44Nov 21 2013 747 PM
Hi Thomas - Was going through blog regarding River (RDL)Just a question on this
When you say Programming language for HANA native development is Server side Javascript SQL SQL
ScriptOnce RDL is rolled out whether RDL can be used for native application development instead of Server
side Java script SQL SQL Script I am very much new to this stuff so appreciate if you can also help on
how to get started with Server Side Java script SQL SQL Script for HANA
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 30 2013 750 AM
Hi Thomas
Thanks for your response I am talking about more content on shine
thanks
Ashutosh
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010044
Baskar Gopalakrishnan in response to Thomas Jung on page 44Oct 30 2013 1249 AM
Hi Thomas
Im a SAP PI Middleware consultantSAP topic leader in XIPI heavily worked on Java related
Netweaver stack I have knowledge in ABAP but not worked heavily in abap I have enrolled your sap hana
native application development course I feel very interesting I did work heavily in java and javascript projects
using eclipse development tool Do you think if I invest my time in just native hana development and proceed
in HANA field is a good step I dont have BW experience either
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 819 PM
Thanks for the clarification Much appreciated
Thomas Jung in response to Abdul Hakim on page 44Oct 29 2013 120 PM
gtABAP Close to HANA means whether we can expect a similar 2 tier architecture similar to HANA XS in the
future or what does that mean
No it doesnt mean that ABAP will become a 2 tier architecture We will not move the ABAP VMKernel into
HANA itself It will remain a separate application server At least for the current plansforeseeable future What
he was referring to was bringing the programming models closer For instance the new 740 SP5 feature that
allows you to write SQLScript directly within an ABAP class method
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 650 AM
Thomas - Thanks for the clarificationMuch appreciatedI was listening to ABAP on HANA session by
Thorsten Schneider this year Teched and he was mentioning that SAP Plans to bring ABAP very close to
HANA in the coming future but not much details have been discussed in the sessionABAP Close to HANA
means whether we can expect a similar 2 tier architecture similar to HANA XS in the future or what does that
mean
Thanks
Hakim
Thomas Jung in response to Abdul Hakim on page 45Oct 28 2013 703 PM
gt whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the option is
recommended by SAP then kindly share the pros and cons of each of the item
Taken from the TechEd CD103 session slides
Guidance
bulluse ABAP for optimization of existing progams (in context of SAP Business Suite or BW)
bullconsider HANA Native Development for development of new applications which will solely run on SAP HANA
bullcombine ABAP and HANA Native Development to enrich existing applications (eg SAP HANA Live Fiori)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010045
ABAP
bullapplications follow 3-tier architecture
bullABAP is in general database agnostic but with release 74 optimized for SAP HANA
bullProgramming language ABAP ABAP OO with the option to use SAP HANA features
bullIDE eclipse-based ABAP Development Tools
HANA Native Development
bullapplications follow 2-tier architecture
bullHANA Native Development is SAP HANA specific and embedded in the database
bullProgramming language River server-side JavaScript SQLSQLScript
bullIDE eclipse-based SAP HANA Studio + web IDE
Thomas Jung in response to ashutosh dixit on page 45Oct 28 2013 701 PM
gtIs there any more demos for the SHINE
Im not exactly sure what you mean by that We are building additional content for SHINE that will be delivered
in SP7
Abdul HakimOct 28 2013 326 PM
Thomas - Let us say a customer is running SAP Netweaver 74 ABAP with HANA DB and they have HANA
extended service as wellIf the customer wants to do new developments then what is the recommendation
from SAP ie whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the
option is recommended by SAP then kindly share the pros and cons of each of the item (SAP Netweaver 74
ABAP Vs SAP HANA XS)
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 28 2013 221 PM
Hi Thomas
Thanks a lot for your its working now
Is there any more demos for the SHINE
Thanks
Ashutosh
Thomas Jung in response to ashutosh dixit on page 46Oct 25 2013 809 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010046
As this content is now standard in SP6 as part of SHINE (SAP HANA INteractive Education) there also some
setup instructions on helpsapcom
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Basic points to check - have you generated the synonyms in the data generator Ran the data generator to
create some data Have the role assigned Added client 001 to your user profile
ashutosh dixitOct 24 2013 130 PM
Hi Thomas
Amazing blog - once again Thomas thanks
I have been following you for many days attended your OPEN SAP course also
That was an amazing course for new learner like me
One of our client is looking forward for XS based search Application identical to what you have created in your
DEMO
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010047
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010048
But I am not able to fetch the data on blank HTML page is coming with no data
If there is any step by step document related to this please help in getting that
Any help will be highly appreciated
Thanks
Ashutosh
Naveen KumarSep 26 2013 1130 AM
Good Document
Heber FabianoAug 27 2013 323 PM
Great content as always Keep sharing with us
Thomas Jung in response to Orel Stringa on page 48Aug 27 2013 147 PM
This is currently not possible The CORS support is for all origins We dont yet have the feature to maintain a
whitelist of CORS origins
Orel Stringa in response to Thomas Jung on page Aug 27 2013 801 AM
Hi Thomas
nice to see that SAP has made it possible with SP6 to specify cross origin resource sharing (CORS) support
via the xsaccess file SP6 HANA development guide has example of how to specify CORS support
I have build an XS application and would like to serve SAPUI5 on a diffhost than XSHANA
How can I specify that I would like to allow cross origin access restricted to certain domain(s) only
Is there a special keyword syntax for specifying that
Thank yoi
Orel
Vijay UthayakumarAug 27 2013 131 AM
Highly informative amp digestible Fantastic work
Jerry WangAug 1 2013 955 AM
Hi Tomas
Thank you
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010049
Jerry
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 644 PM
JSLint checks are very strict and often produce syntax errors for items that just stylistic and wont actually
cause an error upon activation or runtime You can either ignore the JSLint errors or deactivate JSLint for this
project in these cases However it might also be an indication that the JavaScript code you are trying to import
isnt compatible with Strict mode
httpsdevelopermozillaorgen-USdocsWebJavaScriptReferenceFunctions_and_function_scope
Strict_mode
Milan Vrozina in response to Thomas Jung on page 49Jul 21 2013 624 PM
Thanks for clarification I thought there would be some kind of import
But anyway in case of this specific library I have some problems with JSLint validation when I do cut and paste
of the original code
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 343 PM
What kind of problem are you having using this library Strict mode JavaScript which doesnt try to access the
DOM Window or other client side specific objects should work in Server Side XSJS Generally if you have a
library you just cut and paste into your XSJS or an XSJSLIB file and then call the functions from your code
Milan VrozinaJul 21 2013 339 PM
Hello
first and foremost thank you for perfect openSAP classes related to HANA development and for this blog as
well
I have one question related to server-side javascript You mentioned in course that is possible to use 3rd party
libraries or reuse 3rd party code But I cant find a possible way how to import 3rd party javascript library -as
is- to server and use it For example I would like to use JSZip library to zip some file before sending it to client
from xsjs application Is that possible Thank you
Chandrashekhar MahajanJul 3 2013 734 PM
This is excellent blog Now HANA XS is very much clear to me
Mohan krishnaJul 1 2013 144 PM
WOW - great blog Thomas This will be very helpful in understanding SAP hana Good Job
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010050
Abdul Hakim in response to Thomas Jung on page 50Jun 27 2013 833 PM
Thanks for the clarification
Thomas Jung in response to Abdul Hakim on page 50Jun 27 2013 659 PM
HANA Extended Application Services uses SQLScript and JavaScript as its two primary programming
languages
gtwhether the current SAP Business suite based on ABAP will be completely migrated to HANA service
No The Business Suite already runs on HANA but still via the ABAP application server It will continue to
leverage HANA via a combination of enhancements to ABAP and utilizing some of the technologies described
in this blog
gtAlso whether ABAP can be used to built application in HANA extended services
No There is no ABAP language container in HANA Extended Application Services
Abdul HakimJun 27 2013 405 PM
Hi Thomas - What is the programming language used for HANA Extended application services
As HANA is more than a database ie application platform by itself and as you mentioned that more and more
applications will be built on HANA i have question as how the future SAP ERP system looks likewhether the
current SAP Business suite based on ABAP will be completely migrated to HANA service in the future or SAP
ABAP server will continue to evolve and receive focus investment from SAP Also whether ABAP can be used
to built application in HANA extended services Your thoughts
Thanks
Abdul Hakim
Thomas Jung in response to Ravindra Channe on page 50Jun 11 2013 830 PM
Yes it is still planned However we are still a couple of weeks away and Ive not seen the final installers to say
for certain its there
Ravindra ChanneJun 11 2013 815 PM
Hi Thomas
Thanks for a wonderful and very informative blog Is there any update on 32 bit REGI file
Is it expected along with SPS6
Regards
Ravi
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010051
Thomas Jung in response to Amanda Rzepka on page Jun 7 2013 942 PM
gtCan the XS Services be used in a BW on HANA Scenario
Yes XS is part of ALL HANA systems You should check and make sure you are licensed for direct access to
the underlying HANA instance however
Thomas Jung in response to Holger Schimanski on page Jun 7 2013 941 PM
gtIs there a similar library which could be used in XS Engine
The XSODATA development object is similar We also have higher level frameworks for XMLA and Search
Services (InA) You can expect more such high level frameworks to be added to the HANA Extended
Application Services in the future
Thomas Jung in response to Manav Mehra on page Jun 7 2013 939 PM
Have you used something like the Chrome developer tools to see see if you are getting any client side
javascript errors or to see if the request to your xsodata service is successful
Thomas Jung in response to Christian Hufnagl on page 52Jun 7 2013 938 PM
It will ship as non-automatic content in SPS6 (all systems will have it and it just needs to be imported) The
delivery units are also part of this weeks updates to the Cloudshare and AWS developer center images They
are also available for download as part of the content of the openSAP course
Thomas Jung in response to Matthew Pickell on page 51Jun 7 2013 937 PM
CORS support will come with SPS6 at the end of June
Thomas Jung in response to Jeroen Custers on page 51Jun 7 2013 936 PM
gtWill this bug be fixed in HANA ver 56
Personally Ive still experienced this bug in SPS6 internal builds Must be a tricky one to find Luckily the
workaround of closing and reopening isnt too difficult Just annoying This also probably makes the bug low
priority
Jeroen Custers in response to Vivek Singh Bhoj on page 52Jun 7 2013 411 PM
This issue also occurs on rev56
Matthew PickellJun 7 2013 258 PM
Thomas
Has CORS been included in a release yet
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010052
Vivek Singh Bhoj in response to Chandra Edem on page 52Jun 5 2013 601 AM
Hi Chandra
Date for Week1 Assignment has been extended till June 11
So you can give Week 1 Assignment now
Christian HufnaglJun 4 2013 543 PM
Hi Thomas
thank you for the interesting tutorial
Can you tell me whether it is possible to download the source code of the ldquoPutting it all togetherrdquovideo And if yes Where can I download itThanks
Christoph
Vivek Singh BhojJun 4 2013 1116 AM
Hi Thomas
Thanks for OpenSAP classes
Your Youtube Account also have very good exercises
IN OpenSAP Week 2 Unit 3 tutorial after assigning admin role to my user Id i am not able to see sequences
synonyms triggers under my schema or any other schema i am only able to see Column Views Procedures
Tables and Views
Though now i am able to insert data into my created table
Can you let me know how i will be able to see Sequences under my schema without removing the admin role
I am using HANA revision 52
Got to know from OpenSAP that
This is a known issue and the only way that Ive seen to fix it is to actually close the studio and open it again
then refresh the node
Cheers
Rich Heilman
SAP HANA Product Management
Will this bug be fixed in HANA ver 56
Chandra Edem in response to Thomas Jung on page 53Jun 4 2013 646 AM
Thomas
I registered for OpenSAP course Introduction to Software Development on SAP HANA on June 2 900PM
I didnt know that it is going to end WEEK1 assignment test on 632013 300PM Is there any way can take
that WEEK1 Assignment Test
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010053
Thanks
Chandra
Thomas Jung in response to Alexander Bauer on page Jun 3 2013 856 PM
SAPUI5 gets updated auutomatically when you apply HANA revisions There is no additional download or
update needed
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010031
alert(drin)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
alert(drusse)
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount
tTax Amount tNetto Amount tCurrency n
while(rsnext())
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
catch (e)
alert(db conn funktioniert nicht)
var a = $requestparametersget(cmd)
$responsesetBody(Invalid Command +a)
switch (a)
case doex
$responsesetBody(Invalid Command +a)
alert(filedownload)
thisdownloadExcel()
break
default
$responsestatus = $nethttpINTERNAL_SERVER_ERROR
$responsesetBody(Invalid Command +a)
The Controllerjs File
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010032
doFileDownload function (oEvent)
jQuerysaprequire(sapuicommonsMessageBox)
sapuicommonsMessageBoxshow(Export Starten sapuicommonsMessageBoxIconconfirm
Information)
sapuicommonsMessageBoxconfirm(Export starteninform Confirmation)
return false
function inform(rValue)
alert (drinnnnne)
var aurl = FileDownloadxsjscmd=doex
if(rValue) If User presses Ok
alert(aurl)
jQueryajax(
url aurl
method POST
dataType json
datacmddoex
success sapuicommonsMessageBoxalert(Export wird ausgefuumlhrtConfirmation)
errorfunction onErrorCall(jqXHR textStatus errorThrown)
alert(jqXHRstatus)
sapuicommonsMessageBoxshow(jqXHRstatus
ERROR
Error in calling Service )
return
complete sapuicommonsMessageBoxalert(Export Erfolgreich
abgeschlossenConfirmation)
)
return false
else If the user presses Cancel
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010033
sapuicommonsMessageBoxalert(Vorgang abgebrochenNotification)
)
at last but not least the view
sapuijsview(zag1_ui_cv_03Index
Specifies the Controller belonging to this View
In the case that it is not implemented or that null is returned this View does not have a Controller
memberOf zag1_ui_cv_03Index
getControllerName function()
return zag1_ui_cv_03Index
Is initially called once after the Controller has been instantiated It is the place where the UI is
constructed
Since the Controller is given to this method its event handlers can be attached right away
memberOf zag1_ui_cv_03Index
createContent function(oController)
create a lite button with an icon and a text
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010034
lite true
)placeAt(btn)
oButton3attachPress(oControllerdoFileDownload)
var oButton4 = new sapuicommonsButton(
text Refresh
icon imagesrefreshjpg
lite true
press function() var data = oTableval()
if(data == )
alert(no data found)
return
print(content)
print(DatArray)
if (data = )
alert(Funzt)
JSONToCSVConvertor(data CUSTOMER AMOUNT true)
)placeAt(btn)
jQuerysaprequire(sapuitableTable)
create table control with properties
var oTable = new sapuitableTable(
width 100
rowHeight 50
title Amount per Partner
selectionMode sapuitableSelectionModeNone
)
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Company Name
)
template new sapuicommonsTextView(
text CompanyName
)
sortProperty CompanyName
))
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010035
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Partner ID
)
template new sapuicommonsTextView(
text PartnerId
)
sortProperty PartnerId
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Postal Code
textAlign sapuicoreTextAlignEnd
)
template new sapuicommonsTextView(
text PostalCode
textAlign sapuicoreTextAlignEnd
)
sortProperty PostalCode
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text City
)
template new sapuicommonsTextView(
text City
)
sortProperty City
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Purchase ID
)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010036
template new sapuicommonsTextView(
text PurchaseOrderId
)
sortProperty Currency
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Lifecycle Status
)
template new sapuicommonsTextView(
text LifecycleStatus
)
sortProperty LifecycleStatus
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Gross Amount
)
template new sapuicommonsTextView(
text GrossAmount
)
sortProperty GrossAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Tax Amount
)
template new sapuicommonsTextView(
text TaxAmount
)
sortProperty TaxAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Amount Netto
)
template new sapuicommonsTextView(
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010037
text CM_NET_Amount_001
)
sortProperty CM_NET_Amount_001
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Currency
)
template new sapuicommonsTextView(
text Currency
)
sortProperty Currency
))
var oModel = new sapuimodelodataODataModel
(httpqperiorvmcldsr8000ZAG1_WS_001ZAG1_CV_001xsodata false)
oTablesetModel(oModel)
oTablebindRows(Amount)
return oTable
)
It wonacutet call the function or better said the action of the button works fine till to the point where it should call the
xsjsfile to generate the excel-file I wondered that in the ajax part the error- success- and complete-part will
be executed at the same time and not only one of this statements The message is 200 (The request has
succeeded The information returned with the response is dependent on the method used in the request)
Maybe you can see where my mistake is or whats going wrong
Iacuteve the developer edition on cloudshare (Hana Studio rev68 Server is on SPS05)
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010038
Andreacute
Thomas Jung in response to Samuel Tanor-Gyedu on page 38Feb 19 2014 523 AM
I dont think I can help you This appears to a question about how odata4j works not about XS I have no
experience with odata4j myself
Samuel Tanor-GyeduFeb 18 2014 913 AM
Hi Thomas
I have an odata service with this endpointhttpss5hanaxshanatrialondemandcomservicesUserxsodata
I am now trying to consume it from eclipse with the odata4j libraries
This is how I get the endpoint
public UserServiceOdata(String endpointUri)
thisendpointUri = endpointUri
ODataConsumerdumpresponseHeaders(true)
consumer = ODataConsumerscreate(endpointUri)
This is my method to add a user
public User addUser(User user)
consumercreateEntity(entitySet)properties(OPropertiesint32(propertyUserId
usergetId()))properties(OPropertiesstring(propertyUserName
usergetName()))properties(OPropertiesstring(propertyUserEmail usergetEmail()))execute()
return user
When I call addUser method I get an Error
Caused by javaxxmlstreamXMLStreamException ParseError at [rowcol][78253]
Message The reference to entity sourceUrl must end with the delimiter
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010039
When I use this endpoint httpss5hanaxshanatrialondemandcomservicesUsersvc everything works fine
With the httpss5hanaxshanatrialondemandcomservicesUserxsodata I get errors
Please I would be very grateful for assistance
Thanks in advance
Regards
Samuel
Thomas Jung in response to gentilini andre on page 39Feb 18 2014 431 AM
You have a fundamental misunderstanding here You are placing server side JavaScript code in your client
side UI5 application The function downloadExcel is something you need to execute on the server It needs to
be in an XSJS file and it is called from the client side via AJAX - as a REST service not as a local function
gentilini andreFeb 17 2014 451 PM
Hello Thomas
Thank you for this great How-To Guide
Iacutem pretty new in SAPUI5 and tried your export-sample in my little trial project but it doesnacutet work
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010040
My Button for this looks like
ltcodegt
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
lite true
press function() alert(oButton3getText())
downloadExcel()
ltcodegt
and the function for this action looks like
ltcodegt
function downloadExcel()
var body =
alert(drin)
print($query)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount tTax
Amount tNetto Amount tCurrency n
while(rsnext())
if(rsnext() == )
alert($responsesetBody( Failed to retrieve data ))
alert($responsestatus = $nethttpINTERNAL_SERVER_ERROR)
else
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010041
ltcodegt
Iacutem afraid and hope that you can help me
Kind regards
Andreacute
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1246 PM
gtIs there any restriction or development limitation in the XSJSLIB files
Thats a very general question Difficult to answer without any context
Vikas Madaan in response to Thomas Jung on page 41Feb 11 2014 1245 PM
Thanks Thomas
I think we are on same page
Once quick question that came to my mind Is there any restriction or development limitation in the XSJSLIB
files
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1230 PM
gtCould please help me in understanding in more advantagesdisadvantages for both techniques
Youve summarized it pretty well already
gtbecuase i dont want to use both the approaches
Even with the CRUD support and exits in XSODATA its still pretty hard to do 100 via XSODATA There are
still valid use cases for XSJS when you need custom body custom read processing job scheduling etc Its
good to try and use XSODATA whenever possible but I wouldnt automatically exclude the use of XSJS
Vikas MadaanFeb 11 2014 1008 AM
Hi Thomas
Thanks a lot for sharing useful information through various blogs
In my current project we are evaluating use of XSOData or XSJS applications I saw your videos like the one
mentioned below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010042
httpwwwsaphanacomdocsDOC-4376
Want i understood from various blog is this
From SP7 we can write exsits in the OData services and it is very easy to consume at the client side just like
any REST base service and from my understanding it is Scalable as well I would love to use XSOData always
becuase development effort is very less compare to XSJS and it is very easy to rampup the team on OData
related development objects
XSJS were as provide more control becuase of server side scripting becuase it allows development on the
server side using JavaScript Core APIs of SAP HANA Extended Application Services are therefore exposed
as JavaScript functions providing easy access to the HTTP Request and Response object as well database
access to execute SQL or call SQLScript Procedures It provide us control over the body format and and URL
parameter definition
Could please help me in understanding in more advantagesdisadvantages for both techniques
I am very keen to understand and also explain the same to team members becuase i dont want to use both the
approaches and even sometimes customer can also ask the same to us
Also If we are on SP6 then from my understanding XSJS provides us more capability in terms of complex
application Corrent me If i am wrong
Thanks
Regards
Vikas Madaan
Thomas Jung in response to Raghuveer Phull on page 42Feb 5 2014 312 PM
Yes there are videos on the CRUD features of XSODATA which were new in SP6
For more on CRUD support in SP6 see this video
oData CreateUpdateDelete Support in SAP HANA SPS6
For the extended support for XSJS exits in SP7 see this video
SAP HANA SPS 07 XSODATA Exits in XSJS
Raghuveer PhullFeb 5 2014 122 AM
Do you have an exampledocumentationvideo where you can write a service which will populate Hana DB
What I am asking for is a way for my external script to populate the DB tables i have created in Hana DB
Thomas Jung in response to reda miraoui on page 43Jan 29 2014 411 PM
The source code for the examples shown here are shipped as part of SHINE (SAP HANA Interactive
Education)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010043
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Vivek Singh Bhoj in response to reda miraoui on page 43Jan 29 2014 352 PM
Hi Reda
You can import Shine Content in HANA and then check all these source codes
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Regards
Vivek
reda miraoui in response to Thomas Jung on page Jan 29 2014 344 PM
Hey Thomas
Is it possible to download source code of your project from this HANA tutorial
Thanks
Reda
Thomas Jung in response to Abdul Hakim on page 43Nov 21 2013 1133 PM
Yes River can be used as an alternative and when activated it will generate Server Side JavaScript andor
SQLScript
Abdul Hakim in response to Thomas Jung on page 44Nov 21 2013 747 PM
Hi Thomas - Was going through blog regarding River (RDL)Just a question on this
When you say Programming language for HANA native development is Server side Javascript SQL SQL
ScriptOnce RDL is rolled out whether RDL can be used for native application development instead of Server
side Java script SQL SQL Script I am very much new to this stuff so appreciate if you can also help on
how to get started with Server Side Java script SQL SQL Script for HANA
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 30 2013 750 AM
Hi Thomas
Thanks for your response I am talking about more content on shine
thanks
Ashutosh
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010044
Baskar Gopalakrishnan in response to Thomas Jung on page 44Oct 30 2013 1249 AM
Hi Thomas
Im a SAP PI Middleware consultantSAP topic leader in XIPI heavily worked on Java related
Netweaver stack I have knowledge in ABAP but not worked heavily in abap I have enrolled your sap hana
native application development course I feel very interesting I did work heavily in java and javascript projects
using eclipse development tool Do you think if I invest my time in just native hana development and proceed
in HANA field is a good step I dont have BW experience either
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 819 PM
Thanks for the clarification Much appreciated
Thomas Jung in response to Abdul Hakim on page 44Oct 29 2013 120 PM
gtABAP Close to HANA means whether we can expect a similar 2 tier architecture similar to HANA XS in the
future or what does that mean
No it doesnt mean that ABAP will become a 2 tier architecture We will not move the ABAP VMKernel into
HANA itself It will remain a separate application server At least for the current plansforeseeable future What
he was referring to was bringing the programming models closer For instance the new 740 SP5 feature that
allows you to write SQLScript directly within an ABAP class method
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 650 AM
Thomas - Thanks for the clarificationMuch appreciatedI was listening to ABAP on HANA session by
Thorsten Schneider this year Teched and he was mentioning that SAP Plans to bring ABAP very close to
HANA in the coming future but not much details have been discussed in the sessionABAP Close to HANA
means whether we can expect a similar 2 tier architecture similar to HANA XS in the future or what does that
mean
Thanks
Hakim
Thomas Jung in response to Abdul Hakim on page 45Oct 28 2013 703 PM
gt whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the option is
recommended by SAP then kindly share the pros and cons of each of the item
Taken from the TechEd CD103 session slides
Guidance
bulluse ABAP for optimization of existing progams (in context of SAP Business Suite or BW)
bullconsider HANA Native Development for development of new applications which will solely run on SAP HANA
bullcombine ABAP and HANA Native Development to enrich existing applications (eg SAP HANA Live Fiori)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010045
ABAP
bullapplications follow 3-tier architecture
bullABAP is in general database agnostic but with release 74 optimized for SAP HANA
bullProgramming language ABAP ABAP OO with the option to use SAP HANA features
bullIDE eclipse-based ABAP Development Tools
HANA Native Development
bullapplications follow 2-tier architecture
bullHANA Native Development is SAP HANA specific and embedded in the database
bullProgramming language River server-side JavaScript SQLSQLScript
bullIDE eclipse-based SAP HANA Studio + web IDE
Thomas Jung in response to ashutosh dixit on page 45Oct 28 2013 701 PM
gtIs there any more demos for the SHINE
Im not exactly sure what you mean by that We are building additional content for SHINE that will be delivered
in SP7
Abdul HakimOct 28 2013 326 PM
Thomas - Let us say a customer is running SAP Netweaver 74 ABAP with HANA DB and they have HANA
extended service as wellIf the customer wants to do new developments then what is the recommendation
from SAP ie whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the
option is recommended by SAP then kindly share the pros and cons of each of the item (SAP Netweaver 74
ABAP Vs SAP HANA XS)
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 28 2013 221 PM
Hi Thomas
Thanks a lot for your its working now
Is there any more demos for the SHINE
Thanks
Ashutosh
Thomas Jung in response to ashutosh dixit on page 46Oct 25 2013 809 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010046
As this content is now standard in SP6 as part of SHINE (SAP HANA INteractive Education) there also some
setup instructions on helpsapcom
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Basic points to check - have you generated the synonyms in the data generator Ran the data generator to
create some data Have the role assigned Added client 001 to your user profile
ashutosh dixitOct 24 2013 130 PM
Hi Thomas
Amazing blog - once again Thomas thanks
I have been following you for many days attended your OPEN SAP course also
That was an amazing course for new learner like me
One of our client is looking forward for XS based search Application identical to what you have created in your
DEMO
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010047
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010048
But I am not able to fetch the data on blank HTML page is coming with no data
If there is any step by step document related to this please help in getting that
Any help will be highly appreciated
Thanks
Ashutosh
Naveen KumarSep 26 2013 1130 AM
Good Document
Heber FabianoAug 27 2013 323 PM
Great content as always Keep sharing with us
Thomas Jung in response to Orel Stringa on page 48Aug 27 2013 147 PM
This is currently not possible The CORS support is for all origins We dont yet have the feature to maintain a
whitelist of CORS origins
Orel Stringa in response to Thomas Jung on page Aug 27 2013 801 AM
Hi Thomas
nice to see that SAP has made it possible with SP6 to specify cross origin resource sharing (CORS) support
via the xsaccess file SP6 HANA development guide has example of how to specify CORS support
I have build an XS application and would like to serve SAPUI5 on a diffhost than XSHANA
How can I specify that I would like to allow cross origin access restricted to certain domain(s) only
Is there a special keyword syntax for specifying that
Thank yoi
Orel
Vijay UthayakumarAug 27 2013 131 AM
Highly informative amp digestible Fantastic work
Jerry WangAug 1 2013 955 AM
Hi Tomas
Thank you
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010049
Jerry
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 644 PM
JSLint checks are very strict and often produce syntax errors for items that just stylistic and wont actually
cause an error upon activation or runtime You can either ignore the JSLint errors or deactivate JSLint for this
project in these cases However it might also be an indication that the JavaScript code you are trying to import
isnt compatible with Strict mode
httpsdevelopermozillaorgen-USdocsWebJavaScriptReferenceFunctions_and_function_scope
Strict_mode
Milan Vrozina in response to Thomas Jung on page 49Jul 21 2013 624 PM
Thanks for clarification I thought there would be some kind of import
But anyway in case of this specific library I have some problems with JSLint validation when I do cut and paste
of the original code
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 343 PM
What kind of problem are you having using this library Strict mode JavaScript which doesnt try to access the
DOM Window or other client side specific objects should work in Server Side XSJS Generally if you have a
library you just cut and paste into your XSJS or an XSJSLIB file and then call the functions from your code
Milan VrozinaJul 21 2013 339 PM
Hello
first and foremost thank you for perfect openSAP classes related to HANA development and for this blog as
well
I have one question related to server-side javascript You mentioned in course that is possible to use 3rd party
libraries or reuse 3rd party code But I cant find a possible way how to import 3rd party javascript library -as
is- to server and use it For example I would like to use JSZip library to zip some file before sending it to client
from xsjs application Is that possible Thank you
Chandrashekhar MahajanJul 3 2013 734 PM
This is excellent blog Now HANA XS is very much clear to me
Mohan krishnaJul 1 2013 144 PM
WOW - great blog Thomas This will be very helpful in understanding SAP hana Good Job
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010050
Abdul Hakim in response to Thomas Jung on page 50Jun 27 2013 833 PM
Thanks for the clarification
Thomas Jung in response to Abdul Hakim on page 50Jun 27 2013 659 PM
HANA Extended Application Services uses SQLScript and JavaScript as its two primary programming
languages
gtwhether the current SAP Business suite based on ABAP will be completely migrated to HANA service
No The Business Suite already runs on HANA but still via the ABAP application server It will continue to
leverage HANA via a combination of enhancements to ABAP and utilizing some of the technologies described
in this blog
gtAlso whether ABAP can be used to built application in HANA extended services
No There is no ABAP language container in HANA Extended Application Services
Abdul HakimJun 27 2013 405 PM
Hi Thomas - What is the programming language used for HANA Extended application services
As HANA is more than a database ie application platform by itself and as you mentioned that more and more
applications will be built on HANA i have question as how the future SAP ERP system looks likewhether the
current SAP Business suite based on ABAP will be completely migrated to HANA service in the future or SAP
ABAP server will continue to evolve and receive focus investment from SAP Also whether ABAP can be used
to built application in HANA extended services Your thoughts
Thanks
Abdul Hakim
Thomas Jung in response to Ravindra Channe on page 50Jun 11 2013 830 PM
Yes it is still planned However we are still a couple of weeks away and Ive not seen the final installers to say
for certain its there
Ravindra ChanneJun 11 2013 815 PM
Hi Thomas
Thanks for a wonderful and very informative blog Is there any update on 32 bit REGI file
Is it expected along with SPS6
Regards
Ravi
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010051
Thomas Jung in response to Amanda Rzepka on page Jun 7 2013 942 PM
gtCan the XS Services be used in a BW on HANA Scenario
Yes XS is part of ALL HANA systems You should check and make sure you are licensed for direct access to
the underlying HANA instance however
Thomas Jung in response to Holger Schimanski on page Jun 7 2013 941 PM
gtIs there a similar library which could be used in XS Engine
The XSODATA development object is similar We also have higher level frameworks for XMLA and Search
Services (InA) You can expect more such high level frameworks to be added to the HANA Extended
Application Services in the future
Thomas Jung in response to Manav Mehra on page Jun 7 2013 939 PM
Have you used something like the Chrome developer tools to see see if you are getting any client side
javascript errors or to see if the request to your xsodata service is successful
Thomas Jung in response to Christian Hufnagl on page 52Jun 7 2013 938 PM
It will ship as non-automatic content in SPS6 (all systems will have it and it just needs to be imported) The
delivery units are also part of this weeks updates to the Cloudshare and AWS developer center images They
are also available for download as part of the content of the openSAP course
Thomas Jung in response to Matthew Pickell on page 51Jun 7 2013 937 PM
CORS support will come with SPS6 at the end of June
Thomas Jung in response to Jeroen Custers on page 51Jun 7 2013 936 PM
gtWill this bug be fixed in HANA ver 56
Personally Ive still experienced this bug in SPS6 internal builds Must be a tricky one to find Luckily the
workaround of closing and reopening isnt too difficult Just annoying This also probably makes the bug low
priority
Jeroen Custers in response to Vivek Singh Bhoj on page 52Jun 7 2013 411 PM
This issue also occurs on rev56
Matthew PickellJun 7 2013 258 PM
Thomas
Has CORS been included in a release yet
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010052
Vivek Singh Bhoj in response to Chandra Edem on page 52Jun 5 2013 601 AM
Hi Chandra
Date for Week1 Assignment has been extended till June 11
So you can give Week 1 Assignment now
Christian HufnaglJun 4 2013 543 PM
Hi Thomas
thank you for the interesting tutorial
Can you tell me whether it is possible to download the source code of the ldquoPutting it all togetherrdquovideo And if yes Where can I download itThanks
Christoph
Vivek Singh BhojJun 4 2013 1116 AM
Hi Thomas
Thanks for OpenSAP classes
Your Youtube Account also have very good exercises
IN OpenSAP Week 2 Unit 3 tutorial after assigning admin role to my user Id i am not able to see sequences
synonyms triggers under my schema or any other schema i am only able to see Column Views Procedures
Tables and Views
Though now i am able to insert data into my created table
Can you let me know how i will be able to see Sequences under my schema without removing the admin role
I am using HANA revision 52
Got to know from OpenSAP that
This is a known issue and the only way that Ive seen to fix it is to actually close the studio and open it again
then refresh the node
Cheers
Rich Heilman
SAP HANA Product Management
Will this bug be fixed in HANA ver 56
Chandra Edem in response to Thomas Jung on page 53Jun 4 2013 646 AM
Thomas
I registered for OpenSAP course Introduction to Software Development on SAP HANA on June 2 900PM
I didnt know that it is going to end WEEK1 assignment test on 632013 300PM Is there any way can take
that WEEK1 Assignment Test
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010053
Thanks
Chandra
Thomas Jung in response to Alexander Bauer on page Jun 3 2013 856 PM
SAPUI5 gets updated auutomatically when you apply HANA revisions There is no additional download or
update needed
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010032
doFileDownload function (oEvent)
jQuerysaprequire(sapuicommonsMessageBox)
sapuicommonsMessageBoxshow(Export Starten sapuicommonsMessageBoxIconconfirm
Information)
sapuicommonsMessageBoxconfirm(Export starteninform Confirmation)
return false
function inform(rValue)
alert (drinnnnne)
var aurl = FileDownloadxsjscmd=doex
if(rValue) If User presses Ok
alert(aurl)
jQueryajax(
url aurl
method POST
dataType json
datacmddoex
success sapuicommonsMessageBoxalert(Export wird ausgefuumlhrtConfirmation)
errorfunction onErrorCall(jqXHR textStatus errorThrown)
alert(jqXHRstatus)
sapuicommonsMessageBoxshow(jqXHRstatus
ERROR
Error in calling Service )
return
complete sapuicommonsMessageBoxalert(Export Erfolgreich
abgeschlossenConfirmation)
)
return false
else If the user presses Cancel
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010033
sapuicommonsMessageBoxalert(Vorgang abgebrochenNotification)
)
at last but not least the view
sapuijsview(zag1_ui_cv_03Index
Specifies the Controller belonging to this View
In the case that it is not implemented or that null is returned this View does not have a Controller
memberOf zag1_ui_cv_03Index
getControllerName function()
return zag1_ui_cv_03Index
Is initially called once after the Controller has been instantiated It is the place where the UI is
constructed
Since the Controller is given to this method its event handlers can be attached right away
memberOf zag1_ui_cv_03Index
createContent function(oController)
create a lite button with an icon and a text
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010034
lite true
)placeAt(btn)
oButton3attachPress(oControllerdoFileDownload)
var oButton4 = new sapuicommonsButton(
text Refresh
icon imagesrefreshjpg
lite true
press function() var data = oTableval()
if(data == )
alert(no data found)
return
print(content)
print(DatArray)
if (data = )
alert(Funzt)
JSONToCSVConvertor(data CUSTOMER AMOUNT true)
)placeAt(btn)
jQuerysaprequire(sapuitableTable)
create table control with properties
var oTable = new sapuitableTable(
width 100
rowHeight 50
title Amount per Partner
selectionMode sapuitableSelectionModeNone
)
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Company Name
)
template new sapuicommonsTextView(
text CompanyName
)
sortProperty CompanyName
))
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010035
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Partner ID
)
template new sapuicommonsTextView(
text PartnerId
)
sortProperty PartnerId
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Postal Code
textAlign sapuicoreTextAlignEnd
)
template new sapuicommonsTextView(
text PostalCode
textAlign sapuicoreTextAlignEnd
)
sortProperty PostalCode
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text City
)
template new sapuicommonsTextView(
text City
)
sortProperty City
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Purchase ID
)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010036
template new sapuicommonsTextView(
text PurchaseOrderId
)
sortProperty Currency
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Lifecycle Status
)
template new sapuicommonsTextView(
text LifecycleStatus
)
sortProperty LifecycleStatus
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Gross Amount
)
template new sapuicommonsTextView(
text GrossAmount
)
sortProperty GrossAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Tax Amount
)
template new sapuicommonsTextView(
text TaxAmount
)
sortProperty TaxAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Amount Netto
)
template new sapuicommonsTextView(
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010037
text CM_NET_Amount_001
)
sortProperty CM_NET_Amount_001
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Currency
)
template new sapuicommonsTextView(
text Currency
)
sortProperty Currency
))
var oModel = new sapuimodelodataODataModel
(httpqperiorvmcldsr8000ZAG1_WS_001ZAG1_CV_001xsodata false)
oTablesetModel(oModel)
oTablebindRows(Amount)
return oTable
)
It wonacutet call the function or better said the action of the button works fine till to the point where it should call the
xsjsfile to generate the excel-file I wondered that in the ajax part the error- success- and complete-part will
be executed at the same time and not only one of this statements The message is 200 (The request has
succeeded The information returned with the response is dependent on the method used in the request)
Maybe you can see where my mistake is or whats going wrong
Iacuteve the developer edition on cloudshare (Hana Studio rev68 Server is on SPS05)
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010038
Andreacute
Thomas Jung in response to Samuel Tanor-Gyedu on page 38Feb 19 2014 523 AM
I dont think I can help you This appears to a question about how odata4j works not about XS I have no
experience with odata4j myself
Samuel Tanor-GyeduFeb 18 2014 913 AM
Hi Thomas
I have an odata service with this endpointhttpss5hanaxshanatrialondemandcomservicesUserxsodata
I am now trying to consume it from eclipse with the odata4j libraries
This is how I get the endpoint
public UserServiceOdata(String endpointUri)
thisendpointUri = endpointUri
ODataConsumerdumpresponseHeaders(true)
consumer = ODataConsumerscreate(endpointUri)
This is my method to add a user
public User addUser(User user)
consumercreateEntity(entitySet)properties(OPropertiesint32(propertyUserId
usergetId()))properties(OPropertiesstring(propertyUserName
usergetName()))properties(OPropertiesstring(propertyUserEmail usergetEmail()))execute()
return user
When I call addUser method I get an Error
Caused by javaxxmlstreamXMLStreamException ParseError at [rowcol][78253]
Message The reference to entity sourceUrl must end with the delimiter
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010039
When I use this endpoint httpss5hanaxshanatrialondemandcomservicesUsersvc everything works fine
With the httpss5hanaxshanatrialondemandcomservicesUserxsodata I get errors
Please I would be very grateful for assistance
Thanks in advance
Regards
Samuel
Thomas Jung in response to gentilini andre on page 39Feb 18 2014 431 AM
You have a fundamental misunderstanding here You are placing server side JavaScript code in your client
side UI5 application The function downloadExcel is something you need to execute on the server It needs to
be in an XSJS file and it is called from the client side via AJAX - as a REST service not as a local function
gentilini andreFeb 17 2014 451 PM
Hello Thomas
Thank you for this great How-To Guide
Iacutem pretty new in SAPUI5 and tried your export-sample in my little trial project but it doesnacutet work
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010040
My Button for this looks like
ltcodegt
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
lite true
press function() alert(oButton3getText())
downloadExcel()
ltcodegt
and the function for this action looks like
ltcodegt
function downloadExcel()
var body =
alert(drin)
print($query)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount tTax
Amount tNetto Amount tCurrency n
while(rsnext())
if(rsnext() == )
alert($responsesetBody( Failed to retrieve data ))
alert($responsestatus = $nethttpINTERNAL_SERVER_ERROR)
else
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010041
ltcodegt
Iacutem afraid and hope that you can help me
Kind regards
Andreacute
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1246 PM
gtIs there any restriction or development limitation in the XSJSLIB files
Thats a very general question Difficult to answer without any context
Vikas Madaan in response to Thomas Jung on page 41Feb 11 2014 1245 PM
Thanks Thomas
I think we are on same page
Once quick question that came to my mind Is there any restriction or development limitation in the XSJSLIB
files
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1230 PM
gtCould please help me in understanding in more advantagesdisadvantages for both techniques
Youve summarized it pretty well already
gtbecuase i dont want to use both the approaches
Even with the CRUD support and exits in XSODATA its still pretty hard to do 100 via XSODATA There are
still valid use cases for XSJS when you need custom body custom read processing job scheduling etc Its
good to try and use XSODATA whenever possible but I wouldnt automatically exclude the use of XSJS
Vikas MadaanFeb 11 2014 1008 AM
Hi Thomas
Thanks a lot for sharing useful information through various blogs
In my current project we are evaluating use of XSOData or XSJS applications I saw your videos like the one
mentioned below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010042
httpwwwsaphanacomdocsDOC-4376
Want i understood from various blog is this
From SP7 we can write exsits in the OData services and it is very easy to consume at the client side just like
any REST base service and from my understanding it is Scalable as well I would love to use XSOData always
becuase development effort is very less compare to XSJS and it is very easy to rampup the team on OData
related development objects
XSJS were as provide more control becuase of server side scripting becuase it allows development on the
server side using JavaScript Core APIs of SAP HANA Extended Application Services are therefore exposed
as JavaScript functions providing easy access to the HTTP Request and Response object as well database
access to execute SQL or call SQLScript Procedures It provide us control over the body format and and URL
parameter definition
Could please help me in understanding in more advantagesdisadvantages for both techniques
I am very keen to understand and also explain the same to team members becuase i dont want to use both the
approaches and even sometimes customer can also ask the same to us
Also If we are on SP6 then from my understanding XSJS provides us more capability in terms of complex
application Corrent me If i am wrong
Thanks
Regards
Vikas Madaan
Thomas Jung in response to Raghuveer Phull on page 42Feb 5 2014 312 PM
Yes there are videos on the CRUD features of XSODATA which were new in SP6
For more on CRUD support in SP6 see this video
oData CreateUpdateDelete Support in SAP HANA SPS6
For the extended support for XSJS exits in SP7 see this video
SAP HANA SPS 07 XSODATA Exits in XSJS
Raghuveer PhullFeb 5 2014 122 AM
Do you have an exampledocumentationvideo where you can write a service which will populate Hana DB
What I am asking for is a way for my external script to populate the DB tables i have created in Hana DB
Thomas Jung in response to reda miraoui on page 43Jan 29 2014 411 PM
The source code for the examples shown here are shipped as part of SHINE (SAP HANA Interactive
Education)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010043
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Vivek Singh Bhoj in response to reda miraoui on page 43Jan 29 2014 352 PM
Hi Reda
You can import Shine Content in HANA and then check all these source codes
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Regards
Vivek
reda miraoui in response to Thomas Jung on page Jan 29 2014 344 PM
Hey Thomas
Is it possible to download source code of your project from this HANA tutorial
Thanks
Reda
Thomas Jung in response to Abdul Hakim on page 43Nov 21 2013 1133 PM
Yes River can be used as an alternative and when activated it will generate Server Side JavaScript andor
SQLScript
Abdul Hakim in response to Thomas Jung on page 44Nov 21 2013 747 PM
Hi Thomas - Was going through blog regarding River (RDL)Just a question on this
When you say Programming language for HANA native development is Server side Javascript SQL SQL
ScriptOnce RDL is rolled out whether RDL can be used for native application development instead of Server
side Java script SQL SQL Script I am very much new to this stuff so appreciate if you can also help on
how to get started with Server Side Java script SQL SQL Script for HANA
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 30 2013 750 AM
Hi Thomas
Thanks for your response I am talking about more content on shine
thanks
Ashutosh
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010044
Baskar Gopalakrishnan in response to Thomas Jung on page 44Oct 30 2013 1249 AM
Hi Thomas
Im a SAP PI Middleware consultantSAP topic leader in XIPI heavily worked on Java related
Netweaver stack I have knowledge in ABAP but not worked heavily in abap I have enrolled your sap hana
native application development course I feel very interesting I did work heavily in java and javascript projects
using eclipse development tool Do you think if I invest my time in just native hana development and proceed
in HANA field is a good step I dont have BW experience either
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 819 PM
Thanks for the clarification Much appreciated
Thomas Jung in response to Abdul Hakim on page 44Oct 29 2013 120 PM
gtABAP Close to HANA means whether we can expect a similar 2 tier architecture similar to HANA XS in the
future or what does that mean
No it doesnt mean that ABAP will become a 2 tier architecture We will not move the ABAP VMKernel into
HANA itself It will remain a separate application server At least for the current plansforeseeable future What
he was referring to was bringing the programming models closer For instance the new 740 SP5 feature that
allows you to write SQLScript directly within an ABAP class method
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 650 AM
Thomas - Thanks for the clarificationMuch appreciatedI was listening to ABAP on HANA session by
Thorsten Schneider this year Teched and he was mentioning that SAP Plans to bring ABAP very close to
HANA in the coming future but not much details have been discussed in the sessionABAP Close to HANA
means whether we can expect a similar 2 tier architecture similar to HANA XS in the future or what does that
mean
Thanks
Hakim
Thomas Jung in response to Abdul Hakim on page 45Oct 28 2013 703 PM
gt whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the option is
recommended by SAP then kindly share the pros and cons of each of the item
Taken from the TechEd CD103 session slides
Guidance
bulluse ABAP for optimization of existing progams (in context of SAP Business Suite or BW)
bullconsider HANA Native Development for development of new applications which will solely run on SAP HANA
bullcombine ABAP and HANA Native Development to enrich existing applications (eg SAP HANA Live Fiori)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010045
ABAP
bullapplications follow 3-tier architecture
bullABAP is in general database agnostic but with release 74 optimized for SAP HANA
bullProgramming language ABAP ABAP OO with the option to use SAP HANA features
bullIDE eclipse-based ABAP Development Tools
HANA Native Development
bullapplications follow 2-tier architecture
bullHANA Native Development is SAP HANA specific and embedded in the database
bullProgramming language River server-side JavaScript SQLSQLScript
bullIDE eclipse-based SAP HANA Studio + web IDE
Thomas Jung in response to ashutosh dixit on page 45Oct 28 2013 701 PM
gtIs there any more demos for the SHINE
Im not exactly sure what you mean by that We are building additional content for SHINE that will be delivered
in SP7
Abdul HakimOct 28 2013 326 PM
Thomas - Let us say a customer is running SAP Netweaver 74 ABAP with HANA DB and they have HANA
extended service as wellIf the customer wants to do new developments then what is the recommendation
from SAP ie whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the
option is recommended by SAP then kindly share the pros and cons of each of the item (SAP Netweaver 74
ABAP Vs SAP HANA XS)
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 28 2013 221 PM
Hi Thomas
Thanks a lot for your its working now
Is there any more demos for the SHINE
Thanks
Ashutosh
Thomas Jung in response to ashutosh dixit on page 46Oct 25 2013 809 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010046
As this content is now standard in SP6 as part of SHINE (SAP HANA INteractive Education) there also some
setup instructions on helpsapcom
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Basic points to check - have you generated the synonyms in the data generator Ran the data generator to
create some data Have the role assigned Added client 001 to your user profile
ashutosh dixitOct 24 2013 130 PM
Hi Thomas
Amazing blog - once again Thomas thanks
I have been following you for many days attended your OPEN SAP course also
That was an amazing course for new learner like me
One of our client is looking forward for XS based search Application identical to what you have created in your
DEMO
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010047
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010048
But I am not able to fetch the data on blank HTML page is coming with no data
If there is any step by step document related to this please help in getting that
Any help will be highly appreciated
Thanks
Ashutosh
Naveen KumarSep 26 2013 1130 AM
Good Document
Heber FabianoAug 27 2013 323 PM
Great content as always Keep sharing with us
Thomas Jung in response to Orel Stringa on page 48Aug 27 2013 147 PM
This is currently not possible The CORS support is for all origins We dont yet have the feature to maintain a
whitelist of CORS origins
Orel Stringa in response to Thomas Jung on page Aug 27 2013 801 AM
Hi Thomas
nice to see that SAP has made it possible with SP6 to specify cross origin resource sharing (CORS) support
via the xsaccess file SP6 HANA development guide has example of how to specify CORS support
I have build an XS application and would like to serve SAPUI5 on a diffhost than XSHANA
How can I specify that I would like to allow cross origin access restricted to certain domain(s) only
Is there a special keyword syntax for specifying that
Thank yoi
Orel
Vijay UthayakumarAug 27 2013 131 AM
Highly informative amp digestible Fantastic work
Jerry WangAug 1 2013 955 AM
Hi Tomas
Thank you
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010049
Jerry
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 644 PM
JSLint checks are very strict and often produce syntax errors for items that just stylistic and wont actually
cause an error upon activation or runtime You can either ignore the JSLint errors or deactivate JSLint for this
project in these cases However it might also be an indication that the JavaScript code you are trying to import
isnt compatible with Strict mode
httpsdevelopermozillaorgen-USdocsWebJavaScriptReferenceFunctions_and_function_scope
Strict_mode
Milan Vrozina in response to Thomas Jung on page 49Jul 21 2013 624 PM
Thanks for clarification I thought there would be some kind of import
But anyway in case of this specific library I have some problems with JSLint validation when I do cut and paste
of the original code
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 343 PM
What kind of problem are you having using this library Strict mode JavaScript which doesnt try to access the
DOM Window or other client side specific objects should work in Server Side XSJS Generally if you have a
library you just cut and paste into your XSJS or an XSJSLIB file and then call the functions from your code
Milan VrozinaJul 21 2013 339 PM
Hello
first and foremost thank you for perfect openSAP classes related to HANA development and for this blog as
well
I have one question related to server-side javascript You mentioned in course that is possible to use 3rd party
libraries or reuse 3rd party code But I cant find a possible way how to import 3rd party javascript library -as
is- to server and use it For example I would like to use JSZip library to zip some file before sending it to client
from xsjs application Is that possible Thank you
Chandrashekhar MahajanJul 3 2013 734 PM
This is excellent blog Now HANA XS is very much clear to me
Mohan krishnaJul 1 2013 144 PM
WOW - great blog Thomas This will be very helpful in understanding SAP hana Good Job
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010050
Abdul Hakim in response to Thomas Jung on page 50Jun 27 2013 833 PM
Thanks for the clarification
Thomas Jung in response to Abdul Hakim on page 50Jun 27 2013 659 PM
HANA Extended Application Services uses SQLScript and JavaScript as its two primary programming
languages
gtwhether the current SAP Business suite based on ABAP will be completely migrated to HANA service
No The Business Suite already runs on HANA but still via the ABAP application server It will continue to
leverage HANA via a combination of enhancements to ABAP and utilizing some of the technologies described
in this blog
gtAlso whether ABAP can be used to built application in HANA extended services
No There is no ABAP language container in HANA Extended Application Services
Abdul HakimJun 27 2013 405 PM
Hi Thomas - What is the programming language used for HANA Extended application services
As HANA is more than a database ie application platform by itself and as you mentioned that more and more
applications will be built on HANA i have question as how the future SAP ERP system looks likewhether the
current SAP Business suite based on ABAP will be completely migrated to HANA service in the future or SAP
ABAP server will continue to evolve and receive focus investment from SAP Also whether ABAP can be used
to built application in HANA extended services Your thoughts
Thanks
Abdul Hakim
Thomas Jung in response to Ravindra Channe on page 50Jun 11 2013 830 PM
Yes it is still planned However we are still a couple of weeks away and Ive not seen the final installers to say
for certain its there
Ravindra ChanneJun 11 2013 815 PM
Hi Thomas
Thanks for a wonderful and very informative blog Is there any update on 32 bit REGI file
Is it expected along with SPS6
Regards
Ravi
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010051
Thomas Jung in response to Amanda Rzepka on page Jun 7 2013 942 PM
gtCan the XS Services be used in a BW on HANA Scenario
Yes XS is part of ALL HANA systems You should check and make sure you are licensed for direct access to
the underlying HANA instance however
Thomas Jung in response to Holger Schimanski on page Jun 7 2013 941 PM
gtIs there a similar library which could be used in XS Engine
The XSODATA development object is similar We also have higher level frameworks for XMLA and Search
Services (InA) You can expect more such high level frameworks to be added to the HANA Extended
Application Services in the future
Thomas Jung in response to Manav Mehra on page Jun 7 2013 939 PM
Have you used something like the Chrome developer tools to see see if you are getting any client side
javascript errors or to see if the request to your xsodata service is successful
Thomas Jung in response to Christian Hufnagl on page 52Jun 7 2013 938 PM
It will ship as non-automatic content in SPS6 (all systems will have it and it just needs to be imported) The
delivery units are also part of this weeks updates to the Cloudshare and AWS developer center images They
are also available for download as part of the content of the openSAP course
Thomas Jung in response to Matthew Pickell on page 51Jun 7 2013 937 PM
CORS support will come with SPS6 at the end of June
Thomas Jung in response to Jeroen Custers on page 51Jun 7 2013 936 PM
gtWill this bug be fixed in HANA ver 56
Personally Ive still experienced this bug in SPS6 internal builds Must be a tricky one to find Luckily the
workaround of closing and reopening isnt too difficult Just annoying This also probably makes the bug low
priority
Jeroen Custers in response to Vivek Singh Bhoj on page 52Jun 7 2013 411 PM
This issue also occurs on rev56
Matthew PickellJun 7 2013 258 PM
Thomas
Has CORS been included in a release yet
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010052
Vivek Singh Bhoj in response to Chandra Edem on page 52Jun 5 2013 601 AM
Hi Chandra
Date for Week1 Assignment has been extended till June 11
So you can give Week 1 Assignment now
Christian HufnaglJun 4 2013 543 PM
Hi Thomas
thank you for the interesting tutorial
Can you tell me whether it is possible to download the source code of the ldquoPutting it all togetherrdquovideo And if yes Where can I download itThanks
Christoph
Vivek Singh BhojJun 4 2013 1116 AM
Hi Thomas
Thanks for OpenSAP classes
Your Youtube Account also have very good exercises
IN OpenSAP Week 2 Unit 3 tutorial after assigning admin role to my user Id i am not able to see sequences
synonyms triggers under my schema or any other schema i am only able to see Column Views Procedures
Tables and Views
Though now i am able to insert data into my created table
Can you let me know how i will be able to see Sequences under my schema without removing the admin role
I am using HANA revision 52
Got to know from OpenSAP that
This is a known issue and the only way that Ive seen to fix it is to actually close the studio and open it again
then refresh the node
Cheers
Rich Heilman
SAP HANA Product Management
Will this bug be fixed in HANA ver 56
Chandra Edem in response to Thomas Jung on page 53Jun 4 2013 646 AM
Thomas
I registered for OpenSAP course Introduction to Software Development on SAP HANA on June 2 900PM
I didnt know that it is going to end WEEK1 assignment test on 632013 300PM Is there any way can take
that WEEK1 Assignment Test
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010053
Thanks
Chandra
Thomas Jung in response to Alexander Bauer on page Jun 3 2013 856 PM
SAPUI5 gets updated auutomatically when you apply HANA revisions There is no additional download or
update needed
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010033
sapuicommonsMessageBoxalert(Vorgang abgebrochenNotification)
)
at last but not least the view
sapuijsview(zag1_ui_cv_03Index
Specifies the Controller belonging to this View
In the case that it is not implemented or that null is returned this View does not have a Controller
memberOf zag1_ui_cv_03Index
getControllerName function()
return zag1_ui_cv_03Index
Is initially called once after the Controller has been instantiated It is the place where the UI is
constructed
Since the Controller is given to this method its event handlers can be attached right away
memberOf zag1_ui_cv_03Index
createContent function(oController)
create a lite button with an icon and a text
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010034
lite true
)placeAt(btn)
oButton3attachPress(oControllerdoFileDownload)
var oButton4 = new sapuicommonsButton(
text Refresh
icon imagesrefreshjpg
lite true
press function() var data = oTableval()
if(data == )
alert(no data found)
return
print(content)
print(DatArray)
if (data = )
alert(Funzt)
JSONToCSVConvertor(data CUSTOMER AMOUNT true)
)placeAt(btn)
jQuerysaprequire(sapuitableTable)
create table control with properties
var oTable = new sapuitableTable(
width 100
rowHeight 50
title Amount per Partner
selectionMode sapuitableSelectionModeNone
)
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Company Name
)
template new sapuicommonsTextView(
text CompanyName
)
sortProperty CompanyName
))
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010035
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Partner ID
)
template new sapuicommonsTextView(
text PartnerId
)
sortProperty PartnerId
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Postal Code
textAlign sapuicoreTextAlignEnd
)
template new sapuicommonsTextView(
text PostalCode
textAlign sapuicoreTextAlignEnd
)
sortProperty PostalCode
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text City
)
template new sapuicommonsTextView(
text City
)
sortProperty City
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Purchase ID
)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010036
template new sapuicommonsTextView(
text PurchaseOrderId
)
sortProperty Currency
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Lifecycle Status
)
template new sapuicommonsTextView(
text LifecycleStatus
)
sortProperty LifecycleStatus
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Gross Amount
)
template new sapuicommonsTextView(
text GrossAmount
)
sortProperty GrossAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Tax Amount
)
template new sapuicommonsTextView(
text TaxAmount
)
sortProperty TaxAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Amount Netto
)
template new sapuicommonsTextView(
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010037
text CM_NET_Amount_001
)
sortProperty CM_NET_Amount_001
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Currency
)
template new sapuicommonsTextView(
text Currency
)
sortProperty Currency
))
var oModel = new sapuimodelodataODataModel
(httpqperiorvmcldsr8000ZAG1_WS_001ZAG1_CV_001xsodata false)
oTablesetModel(oModel)
oTablebindRows(Amount)
return oTable
)
It wonacutet call the function or better said the action of the button works fine till to the point where it should call the
xsjsfile to generate the excel-file I wondered that in the ajax part the error- success- and complete-part will
be executed at the same time and not only one of this statements The message is 200 (The request has
succeeded The information returned with the response is dependent on the method used in the request)
Maybe you can see where my mistake is or whats going wrong
Iacuteve the developer edition on cloudshare (Hana Studio rev68 Server is on SPS05)
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010038
Andreacute
Thomas Jung in response to Samuel Tanor-Gyedu on page 38Feb 19 2014 523 AM
I dont think I can help you This appears to a question about how odata4j works not about XS I have no
experience with odata4j myself
Samuel Tanor-GyeduFeb 18 2014 913 AM
Hi Thomas
I have an odata service with this endpointhttpss5hanaxshanatrialondemandcomservicesUserxsodata
I am now trying to consume it from eclipse with the odata4j libraries
This is how I get the endpoint
public UserServiceOdata(String endpointUri)
thisendpointUri = endpointUri
ODataConsumerdumpresponseHeaders(true)
consumer = ODataConsumerscreate(endpointUri)
This is my method to add a user
public User addUser(User user)
consumercreateEntity(entitySet)properties(OPropertiesint32(propertyUserId
usergetId()))properties(OPropertiesstring(propertyUserName
usergetName()))properties(OPropertiesstring(propertyUserEmail usergetEmail()))execute()
return user
When I call addUser method I get an Error
Caused by javaxxmlstreamXMLStreamException ParseError at [rowcol][78253]
Message The reference to entity sourceUrl must end with the delimiter
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010039
When I use this endpoint httpss5hanaxshanatrialondemandcomservicesUsersvc everything works fine
With the httpss5hanaxshanatrialondemandcomservicesUserxsodata I get errors
Please I would be very grateful for assistance
Thanks in advance
Regards
Samuel
Thomas Jung in response to gentilini andre on page 39Feb 18 2014 431 AM
You have a fundamental misunderstanding here You are placing server side JavaScript code in your client
side UI5 application The function downloadExcel is something you need to execute on the server It needs to
be in an XSJS file and it is called from the client side via AJAX - as a REST service not as a local function
gentilini andreFeb 17 2014 451 PM
Hello Thomas
Thank you for this great How-To Guide
Iacutem pretty new in SAPUI5 and tried your export-sample in my little trial project but it doesnacutet work
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010040
My Button for this looks like
ltcodegt
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
lite true
press function() alert(oButton3getText())
downloadExcel()
ltcodegt
and the function for this action looks like
ltcodegt
function downloadExcel()
var body =
alert(drin)
print($query)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount tTax
Amount tNetto Amount tCurrency n
while(rsnext())
if(rsnext() == )
alert($responsesetBody( Failed to retrieve data ))
alert($responsestatus = $nethttpINTERNAL_SERVER_ERROR)
else
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010041
ltcodegt
Iacutem afraid and hope that you can help me
Kind regards
Andreacute
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1246 PM
gtIs there any restriction or development limitation in the XSJSLIB files
Thats a very general question Difficult to answer without any context
Vikas Madaan in response to Thomas Jung on page 41Feb 11 2014 1245 PM
Thanks Thomas
I think we are on same page
Once quick question that came to my mind Is there any restriction or development limitation in the XSJSLIB
files
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1230 PM
gtCould please help me in understanding in more advantagesdisadvantages for both techniques
Youve summarized it pretty well already
gtbecuase i dont want to use both the approaches
Even with the CRUD support and exits in XSODATA its still pretty hard to do 100 via XSODATA There are
still valid use cases for XSJS when you need custom body custom read processing job scheduling etc Its
good to try and use XSODATA whenever possible but I wouldnt automatically exclude the use of XSJS
Vikas MadaanFeb 11 2014 1008 AM
Hi Thomas
Thanks a lot for sharing useful information through various blogs
In my current project we are evaluating use of XSOData or XSJS applications I saw your videos like the one
mentioned below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010042
httpwwwsaphanacomdocsDOC-4376
Want i understood from various blog is this
From SP7 we can write exsits in the OData services and it is very easy to consume at the client side just like
any REST base service and from my understanding it is Scalable as well I would love to use XSOData always
becuase development effort is very less compare to XSJS and it is very easy to rampup the team on OData
related development objects
XSJS were as provide more control becuase of server side scripting becuase it allows development on the
server side using JavaScript Core APIs of SAP HANA Extended Application Services are therefore exposed
as JavaScript functions providing easy access to the HTTP Request and Response object as well database
access to execute SQL or call SQLScript Procedures It provide us control over the body format and and URL
parameter definition
Could please help me in understanding in more advantagesdisadvantages for both techniques
I am very keen to understand and also explain the same to team members becuase i dont want to use both the
approaches and even sometimes customer can also ask the same to us
Also If we are on SP6 then from my understanding XSJS provides us more capability in terms of complex
application Corrent me If i am wrong
Thanks
Regards
Vikas Madaan
Thomas Jung in response to Raghuveer Phull on page 42Feb 5 2014 312 PM
Yes there are videos on the CRUD features of XSODATA which were new in SP6
For more on CRUD support in SP6 see this video
oData CreateUpdateDelete Support in SAP HANA SPS6
For the extended support for XSJS exits in SP7 see this video
SAP HANA SPS 07 XSODATA Exits in XSJS
Raghuveer PhullFeb 5 2014 122 AM
Do you have an exampledocumentationvideo where you can write a service which will populate Hana DB
What I am asking for is a way for my external script to populate the DB tables i have created in Hana DB
Thomas Jung in response to reda miraoui on page 43Jan 29 2014 411 PM
The source code for the examples shown here are shipped as part of SHINE (SAP HANA Interactive
Education)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010043
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Vivek Singh Bhoj in response to reda miraoui on page 43Jan 29 2014 352 PM
Hi Reda
You can import Shine Content in HANA and then check all these source codes
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Regards
Vivek
reda miraoui in response to Thomas Jung on page Jan 29 2014 344 PM
Hey Thomas
Is it possible to download source code of your project from this HANA tutorial
Thanks
Reda
Thomas Jung in response to Abdul Hakim on page 43Nov 21 2013 1133 PM
Yes River can be used as an alternative and when activated it will generate Server Side JavaScript andor
SQLScript
Abdul Hakim in response to Thomas Jung on page 44Nov 21 2013 747 PM
Hi Thomas - Was going through blog regarding River (RDL)Just a question on this
When you say Programming language for HANA native development is Server side Javascript SQL SQL
ScriptOnce RDL is rolled out whether RDL can be used for native application development instead of Server
side Java script SQL SQL Script I am very much new to this stuff so appreciate if you can also help on
how to get started with Server Side Java script SQL SQL Script for HANA
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 30 2013 750 AM
Hi Thomas
Thanks for your response I am talking about more content on shine
thanks
Ashutosh
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010044
Baskar Gopalakrishnan in response to Thomas Jung on page 44Oct 30 2013 1249 AM
Hi Thomas
Im a SAP PI Middleware consultantSAP topic leader in XIPI heavily worked on Java related
Netweaver stack I have knowledge in ABAP but not worked heavily in abap I have enrolled your sap hana
native application development course I feel very interesting I did work heavily in java and javascript projects
using eclipse development tool Do you think if I invest my time in just native hana development and proceed
in HANA field is a good step I dont have BW experience either
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 819 PM
Thanks for the clarification Much appreciated
Thomas Jung in response to Abdul Hakim on page 44Oct 29 2013 120 PM
gtABAP Close to HANA means whether we can expect a similar 2 tier architecture similar to HANA XS in the
future or what does that mean
No it doesnt mean that ABAP will become a 2 tier architecture We will not move the ABAP VMKernel into
HANA itself It will remain a separate application server At least for the current plansforeseeable future What
he was referring to was bringing the programming models closer For instance the new 740 SP5 feature that
allows you to write SQLScript directly within an ABAP class method
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 650 AM
Thomas - Thanks for the clarificationMuch appreciatedI was listening to ABAP on HANA session by
Thorsten Schneider this year Teched and he was mentioning that SAP Plans to bring ABAP very close to
HANA in the coming future but not much details have been discussed in the sessionABAP Close to HANA
means whether we can expect a similar 2 tier architecture similar to HANA XS in the future or what does that
mean
Thanks
Hakim
Thomas Jung in response to Abdul Hakim on page 45Oct 28 2013 703 PM
gt whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the option is
recommended by SAP then kindly share the pros and cons of each of the item
Taken from the TechEd CD103 session slides
Guidance
bulluse ABAP for optimization of existing progams (in context of SAP Business Suite or BW)
bullconsider HANA Native Development for development of new applications which will solely run on SAP HANA
bullcombine ABAP and HANA Native Development to enrich existing applications (eg SAP HANA Live Fiori)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010045
ABAP
bullapplications follow 3-tier architecture
bullABAP is in general database agnostic but with release 74 optimized for SAP HANA
bullProgramming language ABAP ABAP OO with the option to use SAP HANA features
bullIDE eclipse-based ABAP Development Tools
HANA Native Development
bullapplications follow 2-tier architecture
bullHANA Native Development is SAP HANA specific and embedded in the database
bullProgramming language River server-side JavaScript SQLSQLScript
bullIDE eclipse-based SAP HANA Studio + web IDE
Thomas Jung in response to ashutosh dixit on page 45Oct 28 2013 701 PM
gtIs there any more demos for the SHINE
Im not exactly sure what you mean by that We are building additional content for SHINE that will be delivered
in SP7
Abdul HakimOct 28 2013 326 PM
Thomas - Let us say a customer is running SAP Netweaver 74 ABAP with HANA DB and they have HANA
extended service as wellIf the customer wants to do new developments then what is the recommendation
from SAP ie whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the
option is recommended by SAP then kindly share the pros and cons of each of the item (SAP Netweaver 74
ABAP Vs SAP HANA XS)
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 28 2013 221 PM
Hi Thomas
Thanks a lot for your its working now
Is there any more demos for the SHINE
Thanks
Ashutosh
Thomas Jung in response to ashutosh dixit on page 46Oct 25 2013 809 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010046
As this content is now standard in SP6 as part of SHINE (SAP HANA INteractive Education) there also some
setup instructions on helpsapcom
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Basic points to check - have you generated the synonyms in the data generator Ran the data generator to
create some data Have the role assigned Added client 001 to your user profile
ashutosh dixitOct 24 2013 130 PM
Hi Thomas
Amazing blog - once again Thomas thanks
I have been following you for many days attended your OPEN SAP course also
That was an amazing course for new learner like me
One of our client is looking forward for XS based search Application identical to what you have created in your
DEMO
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010047
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010048
But I am not able to fetch the data on blank HTML page is coming with no data
If there is any step by step document related to this please help in getting that
Any help will be highly appreciated
Thanks
Ashutosh
Naveen KumarSep 26 2013 1130 AM
Good Document
Heber FabianoAug 27 2013 323 PM
Great content as always Keep sharing with us
Thomas Jung in response to Orel Stringa on page 48Aug 27 2013 147 PM
This is currently not possible The CORS support is for all origins We dont yet have the feature to maintain a
whitelist of CORS origins
Orel Stringa in response to Thomas Jung on page Aug 27 2013 801 AM
Hi Thomas
nice to see that SAP has made it possible with SP6 to specify cross origin resource sharing (CORS) support
via the xsaccess file SP6 HANA development guide has example of how to specify CORS support
I have build an XS application and would like to serve SAPUI5 on a diffhost than XSHANA
How can I specify that I would like to allow cross origin access restricted to certain domain(s) only
Is there a special keyword syntax for specifying that
Thank yoi
Orel
Vijay UthayakumarAug 27 2013 131 AM
Highly informative amp digestible Fantastic work
Jerry WangAug 1 2013 955 AM
Hi Tomas
Thank you
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010049
Jerry
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 644 PM
JSLint checks are very strict and often produce syntax errors for items that just stylistic and wont actually
cause an error upon activation or runtime You can either ignore the JSLint errors or deactivate JSLint for this
project in these cases However it might also be an indication that the JavaScript code you are trying to import
isnt compatible with Strict mode
httpsdevelopermozillaorgen-USdocsWebJavaScriptReferenceFunctions_and_function_scope
Strict_mode
Milan Vrozina in response to Thomas Jung on page 49Jul 21 2013 624 PM
Thanks for clarification I thought there would be some kind of import
But anyway in case of this specific library I have some problems with JSLint validation when I do cut and paste
of the original code
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 343 PM
What kind of problem are you having using this library Strict mode JavaScript which doesnt try to access the
DOM Window or other client side specific objects should work in Server Side XSJS Generally if you have a
library you just cut and paste into your XSJS or an XSJSLIB file and then call the functions from your code
Milan VrozinaJul 21 2013 339 PM
Hello
first and foremost thank you for perfect openSAP classes related to HANA development and for this blog as
well
I have one question related to server-side javascript You mentioned in course that is possible to use 3rd party
libraries or reuse 3rd party code But I cant find a possible way how to import 3rd party javascript library -as
is- to server and use it For example I would like to use JSZip library to zip some file before sending it to client
from xsjs application Is that possible Thank you
Chandrashekhar MahajanJul 3 2013 734 PM
This is excellent blog Now HANA XS is very much clear to me
Mohan krishnaJul 1 2013 144 PM
WOW - great blog Thomas This will be very helpful in understanding SAP hana Good Job
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010050
Abdul Hakim in response to Thomas Jung on page 50Jun 27 2013 833 PM
Thanks for the clarification
Thomas Jung in response to Abdul Hakim on page 50Jun 27 2013 659 PM
HANA Extended Application Services uses SQLScript and JavaScript as its two primary programming
languages
gtwhether the current SAP Business suite based on ABAP will be completely migrated to HANA service
No The Business Suite already runs on HANA but still via the ABAP application server It will continue to
leverage HANA via a combination of enhancements to ABAP and utilizing some of the technologies described
in this blog
gtAlso whether ABAP can be used to built application in HANA extended services
No There is no ABAP language container in HANA Extended Application Services
Abdul HakimJun 27 2013 405 PM
Hi Thomas - What is the programming language used for HANA Extended application services
As HANA is more than a database ie application platform by itself and as you mentioned that more and more
applications will be built on HANA i have question as how the future SAP ERP system looks likewhether the
current SAP Business suite based on ABAP will be completely migrated to HANA service in the future or SAP
ABAP server will continue to evolve and receive focus investment from SAP Also whether ABAP can be used
to built application in HANA extended services Your thoughts
Thanks
Abdul Hakim
Thomas Jung in response to Ravindra Channe on page 50Jun 11 2013 830 PM
Yes it is still planned However we are still a couple of weeks away and Ive not seen the final installers to say
for certain its there
Ravindra ChanneJun 11 2013 815 PM
Hi Thomas
Thanks for a wonderful and very informative blog Is there any update on 32 bit REGI file
Is it expected along with SPS6
Regards
Ravi
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010051
Thomas Jung in response to Amanda Rzepka on page Jun 7 2013 942 PM
gtCan the XS Services be used in a BW on HANA Scenario
Yes XS is part of ALL HANA systems You should check and make sure you are licensed for direct access to
the underlying HANA instance however
Thomas Jung in response to Holger Schimanski on page Jun 7 2013 941 PM
gtIs there a similar library which could be used in XS Engine
The XSODATA development object is similar We also have higher level frameworks for XMLA and Search
Services (InA) You can expect more such high level frameworks to be added to the HANA Extended
Application Services in the future
Thomas Jung in response to Manav Mehra on page Jun 7 2013 939 PM
Have you used something like the Chrome developer tools to see see if you are getting any client side
javascript errors or to see if the request to your xsodata service is successful
Thomas Jung in response to Christian Hufnagl on page 52Jun 7 2013 938 PM
It will ship as non-automatic content in SPS6 (all systems will have it and it just needs to be imported) The
delivery units are also part of this weeks updates to the Cloudshare and AWS developer center images They
are also available for download as part of the content of the openSAP course
Thomas Jung in response to Matthew Pickell on page 51Jun 7 2013 937 PM
CORS support will come with SPS6 at the end of June
Thomas Jung in response to Jeroen Custers on page 51Jun 7 2013 936 PM
gtWill this bug be fixed in HANA ver 56
Personally Ive still experienced this bug in SPS6 internal builds Must be a tricky one to find Luckily the
workaround of closing and reopening isnt too difficult Just annoying This also probably makes the bug low
priority
Jeroen Custers in response to Vivek Singh Bhoj on page 52Jun 7 2013 411 PM
This issue also occurs on rev56
Matthew PickellJun 7 2013 258 PM
Thomas
Has CORS been included in a release yet
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010052
Vivek Singh Bhoj in response to Chandra Edem on page 52Jun 5 2013 601 AM
Hi Chandra
Date for Week1 Assignment has been extended till June 11
So you can give Week 1 Assignment now
Christian HufnaglJun 4 2013 543 PM
Hi Thomas
thank you for the interesting tutorial
Can you tell me whether it is possible to download the source code of the ldquoPutting it all togetherrdquovideo And if yes Where can I download itThanks
Christoph
Vivek Singh BhojJun 4 2013 1116 AM
Hi Thomas
Thanks for OpenSAP classes
Your Youtube Account also have very good exercises
IN OpenSAP Week 2 Unit 3 tutorial after assigning admin role to my user Id i am not able to see sequences
synonyms triggers under my schema or any other schema i am only able to see Column Views Procedures
Tables and Views
Though now i am able to insert data into my created table
Can you let me know how i will be able to see Sequences under my schema without removing the admin role
I am using HANA revision 52
Got to know from OpenSAP that
This is a known issue and the only way that Ive seen to fix it is to actually close the studio and open it again
then refresh the node
Cheers
Rich Heilman
SAP HANA Product Management
Will this bug be fixed in HANA ver 56
Chandra Edem in response to Thomas Jung on page 53Jun 4 2013 646 AM
Thomas
I registered for OpenSAP course Introduction to Software Development on SAP HANA on June 2 900PM
I didnt know that it is going to end WEEK1 assignment test on 632013 300PM Is there any way can take
that WEEK1 Assignment Test
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010053
Thanks
Chandra
Thomas Jung in response to Alexander Bauer on page Jun 3 2013 856 PM
SAPUI5 gets updated auutomatically when you apply HANA revisions There is no additional download or
update needed
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010034
lite true
)placeAt(btn)
oButton3attachPress(oControllerdoFileDownload)
var oButton4 = new sapuicommonsButton(
text Refresh
icon imagesrefreshjpg
lite true
press function() var data = oTableval()
if(data == )
alert(no data found)
return
print(content)
print(DatArray)
if (data = )
alert(Funzt)
JSONToCSVConvertor(data CUSTOMER AMOUNT true)
)placeAt(btn)
jQuerysaprequire(sapuitableTable)
create table control with properties
var oTable = new sapuitableTable(
width 100
rowHeight 50
title Amount per Partner
selectionMode sapuitableSelectionModeNone
)
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Company Name
)
template new sapuicommonsTextView(
text CompanyName
)
sortProperty CompanyName
))
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010035
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Partner ID
)
template new sapuicommonsTextView(
text PartnerId
)
sortProperty PartnerId
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Postal Code
textAlign sapuicoreTextAlignEnd
)
template new sapuicommonsTextView(
text PostalCode
textAlign sapuicoreTextAlignEnd
)
sortProperty PostalCode
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text City
)
template new sapuicommonsTextView(
text City
)
sortProperty City
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Purchase ID
)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010036
template new sapuicommonsTextView(
text PurchaseOrderId
)
sortProperty Currency
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Lifecycle Status
)
template new sapuicommonsTextView(
text LifecycleStatus
)
sortProperty LifecycleStatus
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Gross Amount
)
template new sapuicommonsTextView(
text GrossAmount
)
sortProperty GrossAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Tax Amount
)
template new sapuicommonsTextView(
text TaxAmount
)
sortProperty TaxAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Amount Netto
)
template new sapuicommonsTextView(
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010037
text CM_NET_Amount_001
)
sortProperty CM_NET_Amount_001
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Currency
)
template new sapuicommonsTextView(
text Currency
)
sortProperty Currency
))
var oModel = new sapuimodelodataODataModel
(httpqperiorvmcldsr8000ZAG1_WS_001ZAG1_CV_001xsodata false)
oTablesetModel(oModel)
oTablebindRows(Amount)
return oTable
)
It wonacutet call the function or better said the action of the button works fine till to the point where it should call the
xsjsfile to generate the excel-file I wondered that in the ajax part the error- success- and complete-part will
be executed at the same time and not only one of this statements The message is 200 (The request has
succeeded The information returned with the response is dependent on the method used in the request)
Maybe you can see where my mistake is or whats going wrong
Iacuteve the developer edition on cloudshare (Hana Studio rev68 Server is on SPS05)
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010038
Andreacute
Thomas Jung in response to Samuel Tanor-Gyedu on page 38Feb 19 2014 523 AM
I dont think I can help you This appears to a question about how odata4j works not about XS I have no
experience with odata4j myself
Samuel Tanor-GyeduFeb 18 2014 913 AM
Hi Thomas
I have an odata service with this endpointhttpss5hanaxshanatrialondemandcomservicesUserxsodata
I am now trying to consume it from eclipse with the odata4j libraries
This is how I get the endpoint
public UserServiceOdata(String endpointUri)
thisendpointUri = endpointUri
ODataConsumerdumpresponseHeaders(true)
consumer = ODataConsumerscreate(endpointUri)
This is my method to add a user
public User addUser(User user)
consumercreateEntity(entitySet)properties(OPropertiesint32(propertyUserId
usergetId()))properties(OPropertiesstring(propertyUserName
usergetName()))properties(OPropertiesstring(propertyUserEmail usergetEmail()))execute()
return user
When I call addUser method I get an Error
Caused by javaxxmlstreamXMLStreamException ParseError at [rowcol][78253]
Message The reference to entity sourceUrl must end with the delimiter
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010039
When I use this endpoint httpss5hanaxshanatrialondemandcomservicesUsersvc everything works fine
With the httpss5hanaxshanatrialondemandcomservicesUserxsodata I get errors
Please I would be very grateful for assistance
Thanks in advance
Regards
Samuel
Thomas Jung in response to gentilini andre on page 39Feb 18 2014 431 AM
You have a fundamental misunderstanding here You are placing server side JavaScript code in your client
side UI5 application The function downloadExcel is something you need to execute on the server It needs to
be in an XSJS file and it is called from the client side via AJAX - as a REST service not as a local function
gentilini andreFeb 17 2014 451 PM
Hello Thomas
Thank you for this great How-To Guide
Iacutem pretty new in SAPUI5 and tried your export-sample in my little trial project but it doesnacutet work
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010040
My Button for this looks like
ltcodegt
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
lite true
press function() alert(oButton3getText())
downloadExcel()
ltcodegt
and the function for this action looks like
ltcodegt
function downloadExcel()
var body =
alert(drin)
print($query)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount tTax
Amount tNetto Amount tCurrency n
while(rsnext())
if(rsnext() == )
alert($responsesetBody( Failed to retrieve data ))
alert($responsestatus = $nethttpINTERNAL_SERVER_ERROR)
else
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010041
ltcodegt
Iacutem afraid and hope that you can help me
Kind regards
Andreacute
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1246 PM
gtIs there any restriction or development limitation in the XSJSLIB files
Thats a very general question Difficult to answer without any context
Vikas Madaan in response to Thomas Jung on page 41Feb 11 2014 1245 PM
Thanks Thomas
I think we are on same page
Once quick question that came to my mind Is there any restriction or development limitation in the XSJSLIB
files
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1230 PM
gtCould please help me in understanding in more advantagesdisadvantages for both techniques
Youve summarized it pretty well already
gtbecuase i dont want to use both the approaches
Even with the CRUD support and exits in XSODATA its still pretty hard to do 100 via XSODATA There are
still valid use cases for XSJS when you need custom body custom read processing job scheduling etc Its
good to try and use XSODATA whenever possible but I wouldnt automatically exclude the use of XSJS
Vikas MadaanFeb 11 2014 1008 AM
Hi Thomas
Thanks a lot for sharing useful information through various blogs
In my current project we are evaluating use of XSOData or XSJS applications I saw your videos like the one
mentioned below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010042
httpwwwsaphanacomdocsDOC-4376
Want i understood from various blog is this
From SP7 we can write exsits in the OData services and it is very easy to consume at the client side just like
any REST base service and from my understanding it is Scalable as well I would love to use XSOData always
becuase development effort is very less compare to XSJS and it is very easy to rampup the team on OData
related development objects
XSJS were as provide more control becuase of server side scripting becuase it allows development on the
server side using JavaScript Core APIs of SAP HANA Extended Application Services are therefore exposed
as JavaScript functions providing easy access to the HTTP Request and Response object as well database
access to execute SQL or call SQLScript Procedures It provide us control over the body format and and URL
parameter definition
Could please help me in understanding in more advantagesdisadvantages for both techniques
I am very keen to understand and also explain the same to team members becuase i dont want to use both the
approaches and even sometimes customer can also ask the same to us
Also If we are on SP6 then from my understanding XSJS provides us more capability in terms of complex
application Corrent me If i am wrong
Thanks
Regards
Vikas Madaan
Thomas Jung in response to Raghuveer Phull on page 42Feb 5 2014 312 PM
Yes there are videos on the CRUD features of XSODATA which were new in SP6
For more on CRUD support in SP6 see this video
oData CreateUpdateDelete Support in SAP HANA SPS6
For the extended support for XSJS exits in SP7 see this video
SAP HANA SPS 07 XSODATA Exits in XSJS
Raghuveer PhullFeb 5 2014 122 AM
Do you have an exampledocumentationvideo where you can write a service which will populate Hana DB
What I am asking for is a way for my external script to populate the DB tables i have created in Hana DB
Thomas Jung in response to reda miraoui on page 43Jan 29 2014 411 PM
The source code for the examples shown here are shipped as part of SHINE (SAP HANA Interactive
Education)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010043
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Vivek Singh Bhoj in response to reda miraoui on page 43Jan 29 2014 352 PM
Hi Reda
You can import Shine Content in HANA and then check all these source codes
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Regards
Vivek
reda miraoui in response to Thomas Jung on page Jan 29 2014 344 PM
Hey Thomas
Is it possible to download source code of your project from this HANA tutorial
Thanks
Reda
Thomas Jung in response to Abdul Hakim on page 43Nov 21 2013 1133 PM
Yes River can be used as an alternative and when activated it will generate Server Side JavaScript andor
SQLScript
Abdul Hakim in response to Thomas Jung on page 44Nov 21 2013 747 PM
Hi Thomas - Was going through blog regarding River (RDL)Just a question on this
When you say Programming language for HANA native development is Server side Javascript SQL SQL
ScriptOnce RDL is rolled out whether RDL can be used for native application development instead of Server
side Java script SQL SQL Script I am very much new to this stuff so appreciate if you can also help on
how to get started with Server Side Java script SQL SQL Script for HANA
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 30 2013 750 AM
Hi Thomas
Thanks for your response I am talking about more content on shine
thanks
Ashutosh
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010044
Baskar Gopalakrishnan in response to Thomas Jung on page 44Oct 30 2013 1249 AM
Hi Thomas
Im a SAP PI Middleware consultantSAP topic leader in XIPI heavily worked on Java related
Netweaver stack I have knowledge in ABAP but not worked heavily in abap I have enrolled your sap hana
native application development course I feel very interesting I did work heavily in java and javascript projects
using eclipse development tool Do you think if I invest my time in just native hana development and proceed
in HANA field is a good step I dont have BW experience either
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 819 PM
Thanks for the clarification Much appreciated
Thomas Jung in response to Abdul Hakim on page 44Oct 29 2013 120 PM
gtABAP Close to HANA means whether we can expect a similar 2 tier architecture similar to HANA XS in the
future or what does that mean
No it doesnt mean that ABAP will become a 2 tier architecture We will not move the ABAP VMKernel into
HANA itself It will remain a separate application server At least for the current plansforeseeable future What
he was referring to was bringing the programming models closer For instance the new 740 SP5 feature that
allows you to write SQLScript directly within an ABAP class method
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 650 AM
Thomas - Thanks for the clarificationMuch appreciatedI was listening to ABAP on HANA session by
Thorsten Schneider this year Teched and he was mentioning that SAP Plans to bring ABAP very close to
HANA in the coming future but not much details have been discussed in the sessionABAP Close to HANA
means whether we can expect a similar 2 tier architecture similar to HANA XS in the future or what does that
mean
Thanks
Hakim
Thomas Jung in response to Abdul Hakim on page 45Oct 28 2013 703 PM
gt whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the option is
recommended by SAP then kindly share the pros and cons of each of the item
Taken from the TechEd CD103 session slides
Guidance
bulluse ABAP for optimization of existing progams (in context of SAP Business Suite or BW)
bullconsider HANA Native Development for development of new applications which will solely run on SAP HANA
bullcombine ABAP and HANA Native Development to enrich existing applications (eg SAP HANA Live Fiori)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010045
ABAP
bullapplications follow 3-tier architecture
bullABAP is in general database agnostic but with release 74 optimized for SAP HANA
bullProgramming language ABAP ABAP OO with the option to use SAP HANA features
bullIDE eclipse-based ABAP Development Tools
HANA Native Development
bullapplications follow 2-tier architecture
bullHANA Native Development is SAP HANA specific and embedded in the database
bullProgramming language River server-side JavaScript SQLSQLScript
bullIDE eclipse-based SAP HANA Studio + web IDE
Thomas Jung in response to ashutosh dixit on page 45Oct 28 2013 701 PM
gtIs there any more demos for the SHINE
Im not exactly sure what you mean by that We are building additional content for SHINE that will be delivered
in SP7
Abdul HakimOct 28 2013 326 PM
Thomas - Let us say a customer is running SAP Netweaver 74 ABAP with HANA DB and they have HANA
extended service as wellIf the customer wants to do new developments then what is the recommendation
from SAP ie whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the
option is recommended by SAP then kindly share the pros and cons of each of the item (SAP Netweaver 74
ABAP Vs SAP HANA XS)
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 28 2013 221 PM
Hi Thomas
Thanks a lot for your its working now
Is there any more demos for the SHINE
Thanks
Ashutosh
Thomas Jung in response to ashutosh dixit on page 46Oct 25 2013 809 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010046
As this content is now standard in SP6 as part of SHINE (SAP HANA INteractive Education) there also some
setup instructions on helpsapcom
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Basic points to check - have you generated the synonyms in the data generator Ran the data generator to
create some data Have the role assigned Added client 001 to your user profile
ashutosh dixitOct 24 2013 130 PM
Hi Thomas
Amazing blog - once again Thomas thanks
I have been following you for many days attended your OPEN SAP course also
That was an amazing course for new learner like me
One of our client is looking forward for XS based search Application identical to what you have created in your
DEMO
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010047
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010048
But I am not able to fetch the data on blank HTML page is coming with no data
If there is any step by step document related to this please help in getting that
Any help will be highly appreciated
Thanks
Ashutosh
Naveen KumarSep 26 2013 1130 AM
Good Document
Heber FabianoAug 27 2013 323 PM
Great content as always Keep sharing with us
Thomas Jung in response to Orel Stringa on page 48Aug 27 2013 147 PM
This is currently not possible The CORS support is for all origins We dont yet have the feature to maintain a
whitelist of CORS origins
Orel Stringa in response to Thomas Jung on page Aug 27 2013 801 AM
Hi Thomas
nice to see that SAP has made it possible with SP6 to specify cross origin resource sharing (CORS) support
via the xsaccess file SP6 HANA development guide has example of how to specify CORS support
I have build an XS application and would like to serve SAPUI5 on a diffhost than XSHANA
How can I specify that I would like to allow cross origin access restricted to certain domain(s) only
Is there a special keyword syntax for specifying that
Thank yoi
Orel
Vijay UthayakumarAug 27 2013 131 AM
Highly informative amp digestible Fantastic work
Jerry WangAug 1 2013 955 AM
Hi Tomas
Thank you
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010049
Jerry
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 644 PM
JSLint checks are very strict and often produce syntax errors for items that just stylistic and wont actually
cause an error upon activation or runtime You can either ignore the JSLint errors or deactivate JSLint for this
project in these cases However it might also be an indication that the JavaScript code you are trying to import
isnt compatible with Strict mode
httpsdevelopermozillaorgen-USdocsWebJavaScriptReferenceFunctions_and_function_scope
Strict_mode
Milan Vrozina in response to Thomas Jung on page 49Jul 21 2013 624 PM
Thanks for clarification I thought there would be some kind of import
But anyway in case of this specific library I have some problems with JSLint validation when I do cut and paste
of the original code
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 343 PM
What kind of problem are you having using this library Strict mode JavaScript which doesnt try to access the
DOM Window or other client side specific objects should work in Server Side XSJS Generally if you have a
library you just cut and paste into your XSJS or an XSJSLIB file and then call the functions from your code
Milan VrozinaJul 21 2013 339 PM
Hello
first and foremost thank you for perfect openSAP classes related to HANA development and for this blog as
well
I have one question related to server-side javascript You mentioned in course that is possible to use 3rd party
libraries or reuse 3rd party code But I cant find a possible way how to import 3rd party javascript library -as
is- to server and use it For example I would like to use JSZip library to zip some file before sending it to client
from xsjs application Is that possible Thank you
Chandrashekhar MahajanJul 3 2013 734 PM
This is excellent blog Now HANA XS is very much clear to me
Mohan krishnaJul 1 2013 144 PM
WOW - great blog Thomas This will be very helpful in understanding SAP hana Good Job
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010050
Abdul Hakim in response to Thomas Jung on page 50Jun 27 2013 833 PM
Thanks for the clarification
Thomas Jung in response to Abdul Hakim on page 50Jun 27 2013 659 PM
HANA Extended Application Services uses SQLScript and JavaScript as its two primary programming
languages
gtwhether the current SAP Business suite based on ABAP will be completely migrated to HANA service
No The Business Suite already runs on HANA but still via the ABAP application server It will continue to
leverage HANA via a combination of enhancements to ABAP and utilizing some of the technologies described
in this blog
gtAlso whether ABAP can be used to built application in HANA extended services
No There is no ABAP language container in HANA Extended Application Services
Abdul HakimJun 27 2013 405 PM
Hi Thomas - What is the programming language used for HANA Extended application services
As HANA is more than a database ie application platform by itself and as you mentioned that more and more
applications will be built on HANA i have question as how the future SAP ERP system looks likewhether the
current SAP Business suite based on ABAP will be completely migrated to HANA service in the future or SAP
ABAP server will continue to evolve and receive focus investment from SAP Also whether ABAP can be used
to built application in HANA extended services Your thoughts
Thanks
Abdul Hakim
Thomas Jung in response to Ravindra Channe on page 50Jun 11 2013 830 PM
Yes it is still planned However we are still a couple of weeks away and Ive not seen the final installers to say
for certain its there
Ravindra ChanneJun 11 2013 815 PM
Hi Thomas
Thanks for a wonderful and very informative blog Is there any update on 32 bit REGI file
Is it expected along with SPS6
Regards
Ravi
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010051
Thomas Jung in response to Amanda Rzepka on page Jun 7 2013 942 PM
gtCan the XS Services be used in a BW on HANA Scenario
Yes XS is part of ALL HANA systems You should check and make sure you are licensed for direct access to
the underlying HANA instance however
Thomas Jung in response to Holger Schimanski on page Jun 7 2013 941 PM
gtIs there a similar library which could be used in XS Engine
The XSODATA development object is similar We also have higher level frameworks for XMLA and Search
Services (InA) You can expect more such high level frameworks to be added to the HANA Extended
Application Services in the future
Thomas Jung in response to Manav Mehra on page Jun 7 2013 939 PM
Have you used something like the Chrome developer tools to see see if you are getting any client side
javascript errors or to see if the request to your xsodata service is successful
Thomas Jung in response to Christian Hufnagl on page 52Jun 7 2013 938 PM
It will ship as non-automatic content in SPS6 (all systems will have it and it just needs to be imported) The
delivery units are also part of this weeks updates to the Cloudshare and AWS developer center images They
are also available for download as part of the content of the openSAP course
Thomas Jung in response to Matthew Pickell on page 51Jun 7 2013 937 PM
CORS support will come with SPS6 at the end of June
Thomas Jung in response to Jeroen Custers on page 51Jun 7 2013 936 PM
gtWill this bug be fixed in HANA ver 56
Personally Ive still experienced this bug in SPS6 internal builds Must be a tricky one to find Luckily the
workaround of closing and reopening isnt too difficult Just annoying This also probably makes the bug low
priority
Jeroen Custers in response to Vivek Singh Bhoj on page 52Jun 7 2013 411 PM
This issue also occurs on rev56
Matthew PickellJun 7 2013 258 PM
Thomas
Has CORS been included in a release yet
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010052
Vivek Singh Bhoj in response to Chandra Edem on page 52Jun 5 2013 601 AM
Hi Chandra
Date for Week1 Assignment has been extended till June 11
So you can give Week 1 Assignment now
Christian HufnaglJun 4 2013 543 PM
Hi Thomas
thank you for the interesting tutorial
Can you tell me whether it is possible to download the source code of the ldquoPutting it all togetherrdquovideo And if yes Where can I download itThanks
Christoph
Vivek Singh BhojJun 4 2013 1116 AM
Hi Thomas
Thanks for OpenSAP classes
Your Youtube Account also have very good exercises
IN OpenSAP Week 2 Unit 3 tutorial after assigning admin role to my user Id i am not able to see sequences
synonyms triggers under my schema or any other schema i am only able to see Column Views Procedures
Tables and Views
Though now i am able to insert data into my created table
Can you let me know how i will be able to see Sequences under my schema without removing the admin role
I am using HANA revision 52
Got to know from OpenSAP that
This is a known issue and the only way that Ive seen to fix it is to actually close the studio and open it again
then refresh the node
Cheers
Rich Heilman
SAP HANA Product Management
Will this bug be fixed in HANA ver 56
Chandra Edem in response to Thomas Jung on page 53Jun 4 2013 646 AM
Thomas
I registered for OpenSAP course Introduction to Software Development on SAP HANA on June 2 900PM
I didnt know that it is going to end WEEK1 assignment test on 632013 300PM Is there any way can take
that WEEK1 Assignment Test
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010053
Thanks
Chandra
Thomas Jung in response to Alexander Bauer on page Jun 3 2013 856 PM
SAPUI5 gets updated auutomatically when you apply HANA revisions There is no additional download or
update needed
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010035
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Partner ID
)
template new sapuicommonsTextView(
text PartnerId
)
sortProperty PartnerId
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Postal Code
textAlign sapuicoreTextAlignEnd
)
template new sapuicommonsTextView(
text PostalCode
textAlign sapuicoreTextAlignEnd
)
sortProperty PostalCode
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text City
)
template new sapuicommonsTextView(
text City
)
sortProperty City
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Purchase ID
)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010036
template new sapuicommonsTextView(
text PurchaseOrderId
)
sortProperty Currency
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Lifecycle Status
)
template new sapuicommonsTextView(
text LifecycleStatus
)
sortProperty LifecycleStatus
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Gross Amount
)
template new sapuicommonsTextView(
text GrossAmount
)
sortProperty GrossAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Tax Amount
)
template new sapuicommonsTextView(
text TaxAmount
)
sortProperty TaxAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Amount Netto
)
template new sapuicommonsTextView(
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010037
text CM_NET_Amount_001
)
sortProperty CM_NET_Amount_001
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Currency
)
template new sapuicommonsTextView(
text Currency
)
sortProperty Currency
))
var oModel = new sapuimodelodataODataModel
(httpqperiorvmcldsr8000ZAG1_WS_001ZAG1_CV_001xsodata false)
oTablesetModel(oModel)
oTablebindRows(Amount)
return oTable
)
It wonacutet call the function or better said the action of the button works fine till to the point where it should call the
xsjsfile to generate the excel-file I wondered that in the ajax part the error- success- and complete-part will
be executed at the same time and not only one of this statements The message is 200 (The request has
succeeded The information returned with the response is dependent on the method used in the request)
Maybe you can see where my mistake is or whats going wrong
Iacuteve the developer edition on cloudshare (Hana Studio rev68 Server is on SPS05)
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010038
Andreacute
Thomas Jung in response to Samuel Tanor-Gyedu on page 38Feb 19 2014 523 AM
I dont think I can help you This appears to a question about how odata4j works not about XS I have no
experience with odata4j myself
Samuel Tanor-GyeduFeb 18 2014 913 AM
Hi Thomas
I have an odata service with this endpointhttpss5hanaxshanatrialondemandcomservicesUserxsodata
I am now trying to consume it from eclipse with the odata4j libraries
This is how I get the endpoint
public UserServiceOdata(String endpointUri)
thisendpointUri = endpointUri
ODataConsumerdumpresponseHeaders(true)
consumer = ODataConsumerscreate(endpointUri)
This is my method to add a user
public User addUser(User user)
consumercreateEntity(entitySet)properties(OPropertiesint32(propertyUserId
usergetId()))properties(OPropertiesstring(propertyUserName
usergetName()))properties(OPropertiesstring(propertyUserEmail usergetEmail()))execute()
return user
When I call addUser method I get an Error
Caused by javaxxmlstreamXMLStreamException ParseError at [rowcol][78253]
Message The reference to entity sourceUrl must end with the delimiter
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010039
When I use this endpoint httpss5hanaxshanatrialondemandcomservicesUsersvc everything works fine
With the httpss5hanaxshanatrialondemandcomservicesUserxsodata I get errors
Please I would be very grateful for assistance
Thanks in advance
Regards
Samuel
Thomas Jung in response to gentilini andre on page 39Feb 18 2014 431 AM
You have a fundamental misunderstanding here You are placing server side JavaScript code in your client
side UI5 application The function downloadExcel is something you need to execute on the server It needs to
be in an XSJS file and it is called from the client side via AJAX - as a REST service not as a local function
gentilini andreFeb 17 2014 451 PM
Hello Thomas
Thank you for this great How-To Guide
Iacutem pretty new in SAPUI5 and tried your export-sample in my little trial project but it doesnacutet work
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010040
My Button for this looks like
ltcodegt
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
lite true
press function() alert(oButton3getText())
downloadExcel()
ltcodegt
and the function for this action looks like
ltcodegt
function downloadExcel()
var body =
alert(drin)
print($query)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount tTax
Amount tNetto Amount tCurrency n
while(rsnext())
if(rsnext() == )
alert($responsesetBody( Failed to retrieve data ))
alert($responsestatus = $nethttpINTERNAL_SERVER_ERROR)
else
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010041
ltcodegt
Iacutem afraid and hope that you can help me
Kind regards
Andreacute
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1246 PM
gtIs there any restriction or development limitation in the XSJSLIB files
Thats a very general question Difficult to answer without any context
Vikas Madaan in response to Thomas Jung on page 41Feb 11 2014 1245 PM
Thanks Thomas
I think we are on same page
Once quick question that came to my mind Is there any restriction or development limitation in the XSJSLIB
files
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1230 PM
gtCould please help me in understanding in more advantagesdisadvantages for both techniques
Youve summarized it pretty well already
gtbecuase i dont want to use both the approaches
Even with the CRUD support and exits in XSODATA its still pretty hard to do 100 via XSODATA There are
still valid use cases for XSJS when you need custom body custom read processing job scheduling etc Its
good to try and use XSODATA whenever possible but I wouldnt automatically exclude the use of XSJS
Vikas MadaanFeb 11 2014 1008 AM
Hi Thomas
Thanks a lot for sharing useful information through various blogs
In my current project we are evaluating use of XSOData or XSJS applications I saw your videos like the one
mentioned below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010042
httpwwwsaphanacomdocsDOC-4376
Want i understood from various blog is this
From SP7 we can write exsits in the OData services and it is very easy to consume at the client side just like
any REST base service and from my understanding it is Scalable as well I would love to use XSOData always
becuase development effort is very less compare to XSJS and it is very easy to rampup the team on OData
related development objects
XSJS were as provide more control becuase of server side scripting becuase it allows development on the
server side using JavaScript Core APIs of SAP HANA Extended Application Services are therefore exposed
as JavaScript functions providing easy access to the HTTP Request and Response object as well database
access to execute SQL or call SQLScript Procedures It provide us control over the body format and and URL
parameter definition
Could please help me in understanding in more advantagesdisadvantages for both techniques
I am very keen to understand and also explain the same to team members becuase i dont want to use both the
approaches and even sometimes customer can also ask the same to us
Also If we are on SP6 then from my understanding XSJS provides us more capability in terms of complex
application Corrent me If i am wrong
Thanks
Regards
Vikas Madaan
Thomas Jung in response to Raghuveer Phull on page 42Feb 5 2014 312 PM
Yes there are videos on the CRUD features of XSODATA which were new in SP6
For more on CRUD support in SP6 see this video
oData CreateUpdateDelete Support in SAP HANA SPS6
For the extended support for XSJS exits in SP7 see this video
SAP HANA SPS 07 XSODATA Exits in XSJS
Raghuveer PhullFeb 5 2014 122 AM
Do you have an exampledocumentationvideo where you can write a service which will populate Hana DB
What I am asking for is a way for my external script to populate the DB tables i have created in Hana DB
Thomas Jung in response to reda miraoui on page 43Jan 29 2014 411 PM
The source code for the examples shown here are shipped as part of SHINE (SAP HANA Interactive
Education)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010043
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Vivek Singh Bhoj in response to reda miraoui on page 43Jan 29 2014 352 PM
Hi Reda
You can import Shine Content in HANA and then check all these source codes
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Regards
Vivek
reda miraoui in response to Thomas Jung on page Jan 29 2014 344 PM
Hey Thomas
Is it possible to download source code of your project from this HANA tutorial
Thanks
Reda
Thomas Jung in response to Abdul Hakim on page 43Nov 21 2013 1133 PM
Yes River can be used as an alternative and when activated it will generate Server Side JavaScript andor
SQLScript
Abdul Hakim in response to Thomas Jung on page 44Nov 21 2013 747 PM
Hi Thomas - Was going through blog regarding River (RDL)Just a question on this
When you say Programming language for HANA native development is Server side Javascript SQL SQL
ScriptOnce RDL is rolled out whether RDL can be used for native application development instead of Server
side Java script SQL SQL Script I am very much new to this stuff so appreciate if you can also help on
how to get started with Server Side Java script SQL SQL Script for HANA
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 30 2013 750 AM
Hi Thomas
Thanks for your response I am talking about more content on shine
thanks
Ashutosh
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010044
Baskar Gopalakrishnan in response to Thomas Jung on page 44Oct 30 2013 1249 AM
Hi Thomas
Im a SAP PI Middleware consultantSAP topic leader in XIPI heavily worked on Java related
Netweaver stack I have knowledge in ABAP but not worked heavily in abap I have enrolled your sap hana
native application development course I feel very interesting I did work heavily in java and javascript projects
using eclipse development tool Do you think if I invest my time in just native hana development and proceed
in HANA field is a good step I dont have BW experience either
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 819 PM
Thanks for the clarification Much appreciated
Thomas Jung in response to Abdul Hakim on page 44Oct 29 2013 120 PM
gtABAP Close to HANA means whether we can expect a similar 2 tier architecture similar to HANA XS in the
future or what does that mean
No it doesnt mean that ABAP will become a 2 tier architecture We will not move the ABAP VMKernel into
HANA itself It will remain a separate application server At least for the current plansforeseeable future What
he was referring to was bringing the programming models closer For instance the new 740 SP5 feature that
allows you to write SQLScript directly within an ABAP class method
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 650 AM
Thomas - Thanks for the clarificationMuch appreciatedI was listening to ABAP on HANA session by
Thorsten Schneider this year Teched and he was mentioning that SAP Plans to bring ABAP very close to
HANA in the coming future but not much details have been discussed in the sessionABAP Close to HANA
means whether we can expect a similar 2 tier architecture similar to HANA XS in the future or what does that
mean
Thanks
Hakim
Thomas Jung in response to Abdul Hakim on page 45Oct 28 2013 703 PM
gt whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the option is
recommended by SAP then kindly share the pros and cons of each of the item
Taken from the TechEd CD103 session slides
Guidance
bulluse ABAP for optimization of existing progams (in context of SAP Business Suite or BW)
bullconsider HANA Native Development for development of new applications which will solely run on SAP HANA
bullcombine ABAP and HANA Native Development to enrich existing applications (eg SAP HANA Live Fiori)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010045
ABAP
bullapplications follow 3-tier architecture
bullABAP is in general database agnostic but with release 74 optimized for SAP HANA
bullProgramming language ABAP ABAP OO with the option to use SAP HANA features
bullIDE eclipse-based ABAP Development Tools
HANA Native Development
bullapplications follow 2-tier architecture
bullHANA Native Development is SAP HANA specific and embedded in the database
bullProgramming language River server-side JavaScript SQLSQLScript
bullIDE eclipse-based SAP HANA Studio + web IDE
Thomas Jung in response to ashutosh dixit on page 45Oct 28 2013 701 PM
gtIs there any more demos for the SHINE
Im not exactly sure what you mean by that We are building additional content for SHINE that will be delivered
in SP7
Abdul HakimOct 28 2013 326 PM
Thomas - Let us say a customer is running SAP Netweaver 74 ABAP with HANA DB and they have HANA
extended service as wellIf the customer wants to do new developments then what is the recommendation
from SAP ie whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the
option is recommended by SAP then kindly share the pros and cons of each of the item (SAP Netweaver 74
ABAP Vs SAP HANA XS)
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 28 2013 221 PM
Hi Thomas
Thanks a lot for your its working now
Is there any more demos for the SHINE
Thanks
Ashutosh
Thomas Jung in response to ashutosh dixit on page 46Oct 25 2013 809 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010046
As this content is now standard in SP6 as part of SHINE (SAP HANA INteractive Education) there also some
setup instructions on helpsapcom
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Basic points to check - have you generated the synonyms in the data generator Ran the data generator to
create some data Have the role assigned Added client 001 to your user profile
ashutosh dixitOct 24 2013 130 PM
Hi Thomas
Amazing blog - once again Thomas thanks
I have been following you for many days attended your OPEN SAP course also
That was an amazing course for new learner like me
One of our client is looking forward for XS based search Application identical to what you have created in your
DEMO
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010047
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010048
But I am not able to fetch the data on blank HTML page is coming with no data
If there is any step by step document related to this please help in getting that
Any help will be highly appreciated
Thanks
Ashutosh
Naveen KumarSep 26 2013 1130 AM
Good Document
Heber FabianoAug 27 2013 323 PM
Great content as always Keep sharing with us
Thomas Jung in response to Orel Stringa on page 48Aug 27 2013 147 PM
This is currently not possible The CORS support is for all origins We dont yet have the feature to maintain a
whitelist of CORS origins
Orel Stringa in response to Thomas Jung on page Aug 27 2013 801 AM
Hi Thomas
nice to see that SAP has made it possible with SP6 to specify cross origin resource sharing (CORS) support
via the xsaccess file SP6 HANA development guide has example of how to specify CORS support
I have build an XS application and would like to serve SAPUI5 on a diffhost than XSHANA
How can I specify that I would like to allow cross origin access restricted to certain domain(s) only
Is there a special keyword syntax for specifying that
Thank yoi
Orel
Vijay UthayakumarAug 27 2013 131 AM
Highly informative amp digestible Fantastic work
Jerry WangAug 1 2013 955 AM
Hi Tomas
Thank you
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010049
Jerry
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 644 PM
JSLint checks are very strict and often produce syntax errors for items that just stylistic and wont actually
cause an error upon activation or runtime You can either ignore the JSLint errors or deactivate JSLint for this
project in these cases However it might also be an indication that the JavaScript code you are trying to import
isnt compatible with Strict mode
httpsdevelopermozillaorgen-USdocsWebJavaScriptReferenceFunctions_and_function_scope
Strict_mode
Milan Vrozina in response to Thomas Jung on page 49Jul 21 2013 624 PM
Thanks for clarification I thought there would be some kind of import
But anyway in case of this specific library I have some problems with JSLint validation when I do cut and paste
of the original code
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 343 PM
What kind of problem are you having using this library Strict mode JavaScript which doesnt try to access the
DOM Window or other client side specific objects should work in Server Side XSJS Generally if you have a
library you just cut and paste into your XSJS or an XSJSLIB file and then call the functions from your code
Milan VrozinaJul 21 2013 339 PM
Hello
first and foremost thank you for perfect openSAP classes related to HANA development and for this blog as
well
I have one question related to server-side javascript You mentioned in course that is possible to use 3rd party
libraries or reuse 3rd party code But I cant find a possible way how to import 3rd party javascript library -as
is- to server and use it For example I would like to use JSZip library to zip some file before sending it to client
from xsjs application Is that possible Thank you
Chandrashekhar MahajanJul 3 2013 734 PM
This is excellent blog Now HANA XS is very much clear to me
Mohan krishnaJul 1 2013 144 PM
WOW - great blog Thomas This will be very helpful in understanding SAP hana Good Job
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010050
Abdul Hakim in response to Thomas Jung on page 50Jun 27 2013 833 PM
Thanks for the clarification
Thomas Jung in response to Abdul Hakim on page 50Jun 27 2013 659 PM
HANA Extended Application Services uses SQLScript and JavaScript as its two primary programming
languages
gtwhether the current SAP Business suite based on ABAP will be completely migrated to HANA service
No The Business Suite already runs on HANA but still via the ABAP application server It will continue to
leverage HANA via a combination of enhancements to ABAP and utilizing some of the technologies described
in this blog
gtAlso whether ABAP can be used to built application in HANA extended services
No There is no ABAP language container in HANA Extended Application Services
Abdul HakimJun 27 2013 405 PM
Hi Thomas - What is the programming language used for HANA Extended application services
As HANA is more than a database ie application platform by itself and as you mentioned that more and more
applications will be built on HANA i have question as how the future SAP ERP system looks likewhether the
current SAP Business suite based on ABAP will be completely migrated to HANA service in the future or SAP
ABAP server will continue to evolve and receive focus investment from SAP Also whether ABAP can be used
to built application in HANA extended services Your thoughts
Thanks
Abdul Hakim
Thomas Jung in response to Ravindra Channe on page 50Jun 11 2013 830 PM
Yes it is still planned However we are still a couple of weeks away and Ive not seen the final installers to say
for certain its there
Ravindra ChanneJun 11 2013 815 PM
Hi Thomas
Thanks for a wonderful and very informative blog Is there any update on 32 bit REGI file
Is it expected along with SPS6
Regards
Ravi
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010051
Thomas Jung in response to Amanda Rzepka on page Jun 7 2013 942 PM
gtCan the XS Services be used in a BW on HANA Scenario
Yes XS is part of ALL HANA systems You should check and make sure you are licensed for direct access to
the underlying HANA instance however
Thomas Jung in response to Holger Schimanski on page Jun 7 2013 941 PM
gtIs there a similar library which could be used in XS Engine
The XSODATA development object is similar We also have higher level frameworks for XMLA and Search
Services (InA) You can expect more such high level frameworks to be added to the HANA Extended
Application Services in the future
Thomas Jung in response to Manav Mehra on page Jun 7 2013 939 PM
Have you used something like the Chrome developer tools to see see if you are getting any client side
javascript errors or to see if the request to your xsodata service is successful
Thomas Jung in response to Christian Hufnagl on page 52Jun 7 2013 938 PM
It will ship as non-automatic content in SPS6 (all systems will have it and it just needs to be imported) The
delivery units are also part of this weeks updates to the Cloudshare and AWS developer center images They
are also available for download as part of the content of the openSAP course
Thomas Jung in response to Matthew Pickell on page 51Jun 7 2013 937 PM
CORS support will come with SPS6 at the end of June
Thomas Jung in response to Jeroen Custers on page 51Jun 7 2013 936 PM
gtWill this bug be fixed in HANA ver 56
Personally Ive still experienced this bug in SPS6 internal builds Must be a tricky one to find Luckily the
workaround of closing and reopening isnt too difficult Just annoying This also probably makes the bug low
priority
Jeroen Custers in response to Vivek Singh Bhoj on page 52Jun 7 2013 411 PM
This issue also occurs on rev56
Matthew PickellJun 7 2013 258 PM
Thomas
Has CORS been included in a release yet
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010052
Vivek Singh Bhoj in response to Chandra Edem on page 52Jun 5 2013 601 AM
Hi Chandra
Date for Week1 Assignment has been extended till June 11
So you can give Week 1 Assignment now
Christian HufnaglJun 4 2013 543 PM
Hi Thomas
thank you for the interesting tutorial
Can you tell me whether it is possible to download the source code of the ldquoPutting it all togetherrdquovideo And if yes Where can I download itThanks
Christoph
Vivek Singh BhojJun 4 2013 1116 AM
Hi Thomas
Thanks for OpenSAP classes
Your Youtube Account also have very good exercises
IN OpenSAP Week 2 Unit 3 tutorial after assigning admin role to my user Id i am not able to see sequences
synonyms triggers under my schema or any other schema i am only able to see Column Views Procedures
Tables and Views
Though now i am able to insert data into my created table
Can you let me know how i will be able to see Sequences under my schema without removing the admin role
I am using HANA revision 52
Got to know from OpenSAP that
This is a known issue and the only way that Ive seen to fix it is to actually close the studio and open it again
then refresh the node
Cheers
Rich Heilman
SAP HANA Product Management
Will this bug be fixed in HANA ver 56
Chandra Edem in response to Thomas Jung on page 53Jun 4 2013 646 AM
Thomas
I registered for OpenSAP course Introduction to Software Development on SAP HANA on June 2 900PM
I didnt know that it is going to end WEEK1 assignment test on 632013 300PM Is there any way can take
that WEEK1 Assignment Test
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010053
Thanks
Chandra
Thomas Jung in response to Alexander Bauer on page Jun 3 2013 856 PM
SAPUI5 gets updated auutomatically when you apply HANA revisions There is no additional download or
update needed
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010036
template new sapuicommonsTextView(
text PurchaseOrderId
)
sortProperty Currency
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Lifecycle Status
)
template new sapuicommonsTextView(
text LifecycleStatus
)
sortProperty LifecycleStatus
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Gross Amount
)
template new sapuicommonsTextView(
text GrossAmount
)
sortProperty GrossAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Tax Amount
)
template new sapuicommonsTextView(
text TaxAmount
)
sortProperty TaxAmount
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Amount Netto
)
template new sapuicommonsTextView(
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010037
text CM_NET_Amount_001
)
sortProperty CM_NET_Amount_001
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Currency
)
template new sapuicommonsTextView(
text Currency
)
sortProperty Currency
))
var oModel = new sapuimodelodataODataModel
(httpqperiorvmcldsr8000ZAG1_WS_001ZAG1_CV_001xsodata false)
oTablesetModel(oModel)
oTablebindRows(Amount)
return oTable
)
It wonacutet call the function or better said the action of the button works fine till to the point where it should call the
xsjsfile to generate the excel-file I wondered that in the ajax part the error- success- and complete-part will
be executed at the same time and not only one of this statements The message is 200 (The request has
succeeded The information returned with the response is dependent on the method used in the request)
Maybe you can see where my mistake is or whats going wrong
Iacuteve the developer edition on cloudshare (Hana Studio rev68 Server is on SPS05)
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010038
Andreacute
Thomas Jung in response to Samuel Tanor-Gyedu on page 38Feb 19 2014 523 AM
I dont think I can help you This appears to a question about how odata4j works not about XS I have no
experience with odata4j myself
Samuel Tanor-GyeduFeb 18 2014 913 AM
Hi Thomas
I have an odata service with this endpointhttpss5hanaxshanatrialondemandcomservicesUserxsodata
I am now trying to consume it from eclipse with the odata4j libraries
This is how I get the endpoint
public UserServiceOdata(String endpointUri)
thisendpointUri = endpointUri
ODataConsumerdumpresponseHeaders(true)
consumer = ODataConsumerscreate(endpointUri)
This is my method to add a user
public User addUser(User user)
consumercreateEntity(entitySet)properties(OPropertiesint32(propertyUserId
usergetId()))properties(OPropertiesstring(propertyUserName
usergetName()))properties(OPropertiesstring(propertyUserEmail usergetEmail()))execute()
return user
When I call addUser method I get an Error
Caused by javaxxmlstreamXMLStreamException ParseError at [rowcol][78253]
Message The reference to entity sourceUrl must end with the delimiter
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010039
When I use this endpoint httpss5hanaxshanatrialondemandcomservicesUsersvc everything works fine
With the httpss5hanaxshanatrialondemandcomservicesUserxsodata I get errors
Please I would be very grateful for assistance
Thanks in advance
Regards
Samuel
Thomas Jung in response to gentilini andre on page 39Feb 18 2014 431 AM
You have a fundamental misunderstanding here You are placing server side JavaScript code in your client
side UI5 application The function downloadExcel is something you need to execute on the server It needs to
be in an XSJS file and it is called from the client side via AJAX - as a REST service not as a local function
gentilini andreFeb 17 2014 451 PM
Hello Thomas
Thank you for this great How-To Guide
Iacutem pretty new in SAPUI5 and tried your export-sample in my little trial project but it doesnacutet work
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010040
My Button for this looks like
ltcodegt
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
lite true
press function() alert(oButton3getText())
downloadExcel()
ltcodegt
and the function for this action looks like
ltcodegt
function downloadExcel()
var body =
alert(drin)
print($query)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount tTax
Amount tNetto Amount tCurrency n
while(rsnext())
if(rsnext() == )
alert($responsesetBody( Failed to retrieve data ))
alert($responsestatus = $nethttpINTERNAL_SERVER_ERROR)
else
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010041
ltcodegt
Iacutem afraid and hope that you can help me
Kind regards
Andreacute
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1246 PM
gtIs there any restriction or development limitation in the XSJSLIB files
Thats a very general question Difficult to answer without any context
Vikas Madaan in response to Thomas Jung on page 41Feb 11 2014 1245 PM
Thanks Thomas
I think we are on same page
Once quick question that came to my mind Is there any restriction or development limitation in the XSJSLIB
files
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1230 PM
gtCould please help me in understanding in more advantagesdisadvantages for both techniques
Youve summarized it pretty well already
gtbecuase i dont want to use both the approaches
Even with the CRUD support and exits in XSODATA its still pretty hard to do 100 via XSODATA There are
still valid use cases for XSJS when you need custom body custom read processing job scheduling etc Its
good to try and use XSODATA whenever possible but I wouldnt automatically exclude the use of XSJS
Vikas MadaanFeb 11 2014 1008 AM
Hi Thomas
Thanks a lot for sharing useful information through various blogs
In my current project we are evaluating use of XSOData or XSJS applications I saw your videos like the one
mentioned below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010042
httpwwwsaphanacomdocsDOC-4376
Want i understood from various blog is this
From SP7 we can write exsits in the OData services and it is very easy to consume at the client side just like
any REST base service and from my understanding it is Scalable as well I would love to use XSOData always
becuase development effort is very less compare to XSJS and it is very easy to rampup the team on OData
related development objects
XSJS were as provide more control becuase of server side scripting becuase it allows development on the
server side using JavaScript Core APIs of SAP HANA Extended Application Services are therefore exposed
as JavaScript functions providing easy access to the HTTP Request and Response object as well database
access to execute SQL or call SQLScript Procedures It provide us control over the body format and and URL
parameter definition
Could please help me in understanding in more advantagesdisadvantages for both techniques
I am very keen to understand and also explain the same to team members becuase i dont want to use both the
approaches and even sometimes customer can also ask the same to us
Also If we are on SP6 then from my understanding XSJS provides us more capability in terms of complex
application Corrent me If i am wrong
Thanks
Regards
Vikas Madaan
Thomas Jung in response to Raghuveer Phull on page 42Feb 5 2014 312 PM
Yes there are videos on the CRUD features of XSODATA which were new in SP6
For more on CRUD support in SP6 see this video
oData CreateUpdateDelete Support in SAP HANA SPS6
For the extended support for XSJS exits in SP7 see this video
SAP HANA SPS 07 XSODATA Exits in XSJS
Raghuveer PhullFeb 5 2014 122 AM
Do you have an exampledocumentationvideo where you can write a service which will populate Hana DB
What I am asking for is a way for my external script to populate the DB tables i have created in Hana DB
Thomas Jung in response to reda miraoui on page 43Jan 29 2014 411 PM
The source code for the examples shown here are shipped as part of SHINE (SAP HANA Interactive
Education)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010043
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Vivek Singh Bhoj in response to reda miraoui on page 43Jan 29 2014 352 PM
Hi Reda
You can import Shine Content in HANA and then check all these source codes
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Regards
Vivek
reda miraoui in response to Thomas Jung on page Jan 29 2014 344 PM
Hey Thomas
Is it possible to download source code of your project from this HANA tutorial
Thanks
Reda
Thomas Jung in response to Abdul Hakim on page 43Nov 21 2013 1133 PM
Yes River can be used as an alternative and when activated it will generate Server Side JavaScript andor
SQLScript
Abdul Hakim in response to Thomas Jung on page 44Nov 21 2013 747 PM
Hi Thomas - Was going through blog regarding River (RDL)Just a question on this
When you say Programming language for HANA native development is Server side Javascript SQL SQL
ScriptOnce RDL is rolled out whether RDL can be used for native application development instead of Server
side Java script SQL SQL Script I am very much new to this stuff so appreciate if you can also help on
how to get started with Server Side Java script SQL SQL Script for HANA
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 30 2013 750 AM
Hi Thomas
Thanks for your response I am talking about more content on shine
thanks
Ashutosh
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010044
Baskar Gopalakrishnan in response to Thomas Jung on page 44Oct 30 2013 1249 AM
Hi Thomas
Im a SAP PI Middleware consultantSAP topic leader in XIPI heavily worked on Java related
Netweaver stack I have knowledge in ABAP but not worked heavily in abap I have enrolled your sap hana
native application development course I feel very interesting I did work heavily in java and javascript projects
using eclipse development tool Do you think if I invest my time in just native hana development and proceed
in HANA field is a good step I dont have BW experience either
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 819 PM
Thanks for the clarification Much appreciated
Thomas Jung in response to Abdul Hakim on page 44Oct 29 2013 120 PM
gtABAP Close to HANA means whether we can expect a similar 2 tier architecture similar to HANA XS in the
future or what does that mean
No it doesnt mean that ABAP will become a 2 tier architecture We will not move the ABAP VMKernel into
HANA itself It will remain a separate application server At least for the current plansforeseeable future What
he was referring to was bringing the programming models closer For instance the new 740 SP5 feature that
allows you to write SQLScript directly within an ABAP class method
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 650 AM
Thomas - Thanks for the clarificationMuch appreciatedI was listening to ABAP on HANA session by
Thorsten Schneider this year Teched and he was mentioning that SAP Plans to bring ABAP very close to
HANA in the coming future but not much details have been discussed in the sessionABAP Close to HANA
means whether we can expect a similar 2 tier architecture similar to HANA XS in the future or what does that
mean
Thanks
Hakim
Thomas Jung in response to Abdul Hakim on page 45Oct 28 2013 703 PM
gt whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the option is
recommended by SAP then kindly share the pros and cons of each of the item
Taken from the TechEd CD103 session slides
Guidance
bulluse ABAP for optimization of existing progams (in context of SAP Business Suite or BW)
bullconsider HANA Native Development for development of new applications which will solely run on SAP HANA
bullcombine ABAP and HANA Native Development to enrich existing applications (eg SAP HANA Live Fiori)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010045
ABAP
bullapplications follow 3-tier architecture
bullABAP is in general database agnostic but with release 74 optimized for SAP HANA
bullProgramming language ABAP ABAP OO with the option to use SAP HANA features
bullIDE eclipse-based ABAP Development Tools
HANA Native Development
bullapplications follow 2-tier architecture
bullHANA Native Development is SAP HANA specific and embedded in the database
bullProgramming language River server-side JavaScript SQLSQLScript
bullIDE eclipse-based SAP HANA Studio + web IDE
Thomas Jung in response to ashutosh dixit on page 45Oct 28 2013 701 PM
gtIs there any more demos for the SHINE
Im not exactly sure what you mean by that We are building additional content for SHINE that will be delivered
in SP7
Abdul HakimOct 28 2013 326 PM
Thomas - Let us say a customer is running SAP Netweaver 74 ABAP with HANA DB and they have HANA
extended service as wellIf the customer wants to do new developments then what is the recommendation
from SAP ie whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the
option is recommended by SAP then kindly share the pros and cons of each of the item (SAP Netweaver 74
ABAP Vs SAP HANA XS)
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 28 2013 221 PM
Hi Thomas
Thanks a lot for your its working now
Is there any more demos for the SHINE
Thanks
Ashutosh
Thomas Jung in response to ashutosh dixit on page 46Oct 25 2013 809 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010046
As this content is now standard in SP6 as part of SHINE (SAP HANA INteractive Education) there also some
setup instructions on helpsapcom
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Basic points to check - have you generated the synonyms in the data generator Ran the data generator to
create some data Have the role assigned Added client 001 to your user profile
ashutosh dixitOct 24 2013 130 PM
Hi Thomas
Amazing blog - once again Thomas thanks
I have been following you for many days attended your OPEN SAP course also
That was an amazing course for new learner like me
One of our client is looking forward for XS based search Application identical to what you have created in your
DEMO
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010047
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010048
But I am not able to fetch the data on blank HTML page is coming with no data
If there is any step by step document related to this please help in getting that
Any help will be highly appreciated
Thanks
Ashutosh
Naveen KumarSep 26 2013 1130 AM
Good Document
Heber FabianoAug 27 2013 323 PM
Great content as always Keep sharing with us
Thomas Jung in response to Orel Stringa on page 48Aug 27 2013 147 PM
This is currently not possible The CORS support is for all origins We dont yet have the feature to maintain a
whitelist of CORS origins
Orel Stringa in response to Thomas Jung on page Aug 27 2013 801 AM
Hi Thomas
nice to see that SAP has made it possible with SP6 to specify cross origin resource sharing (CORS) support
via the xsaccess file SP6 HANA development guide has example of how to specify CORS support
I have build an XS application and would like to serve SAPUI5 on a diffhost than XSHANA
How can I specify that I would like to allow cross origin access restricted to certain domain(s) only
Is there a special keyword syntax for specifying that
Thank yoi
Orel
Vijay UthayakumarAug 27 2013 131 AM
Highly informative amp digestible Fantastic work
Jerry WangAug 1 2013 955 AM
Hi Tomas
Thank you
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010049
Jerry
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 644 PM
JSLint checks are very strict and often produce syntax errors for items that just stylistic and wont actually
cause an error upon activation or runtime You can either ignore the JSLint errors or deactivate JSLint for this
project in these cases However it might also be an indication that the JavaScript code you are trying to import
isnt compatible with Strict mode
httpsdevelopermozillaorgen-USdocsWebJavaScriptReferenceFunctions_and_function_scope
Strict_mode
Milan Vrozina in response to Thomas Jung on page 49Jul 21 2013 624 PM
Thanks for clarification I thought there would be some kind of import
But anyway in case of this specific library I have some problems with JSLint validation when I do cut and paste
of the original code
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 343 PM
What kind of problem are you having using this library Strict mode JavaScript which doesnt try to access the
DOM Window or other client side specific objects should work in Server Side XSJS Generally if you have a
library you just cut and paste into your XSJS or an XSJSLIB file and then call the functions from your code
Milan VrozinaJul 21 2013 339 PM
Hello
first and foremost thank you for perfect openSAP classes related to HANA development and for this blog as
well
I have one question related to server-side javascript You mentioned in course that is possible to use 3rd party
libraries or reuse 3rd party code But I cant find a possible way how to import 3rd party javascript library -as
is- to server and use it For example I would like to use JSZip library to zip some file before sending it to client
from xsjs application Is that possible Thank you
Chandrashekhar MahajanJul 3 2013 734 PM
This is excellent blog Now HANA XS is very much clear to me
Mohan krishnaJul 1 2013 144 PM
WOW - great blog Thomas This will be very helpful in understanding SAP hana Good Job
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010050
Abdul Hakim in response to Thomas Jung on page 50Jun 27 2013 833 PM
Thanks for the clarification
Thomas Jung in response to Abdul Hakim on page 50Jun 27 2013 659 PM
HANA Extended Application Services uses SQLScript and JavaScript as its two primary programming
languages
gtwhether the current SAP Business suite based on ABAP will be completely migrated to HANA service
No The Business Suite already runs on HANA but still via the ABAP application server It will continue to
leverage HANA via a combination of enhancements to ABAP and utilizing some of the technologies described
in this blog
gtAlso whether ABAP can be used to built application in HANA extended services
No There is no ABAP language container in HANA Extended Application Services
Abdul HakimJun 27 2013 405 PM
Hi Thomas - What is the programming language used for HANA Extended application services
As HANA is more than a database ie application platform by itself and as you mentioned that more and more
applications will be built on HANA i have question as how the future SAP ERP system looks likewhether the
current SAP Business suite based on ABAP will be completely migrated to HANA service in the future or SAP
ABAP server will continue to evolve and receive focus investment from SAP Also whether ABAP can be used
to built application in HANA extended services Your thoughts
Thanks
Abdul Hakim
Thomas Jung in response to Ravindra Channe on page 50Jun 11 2013 830 PM
Yes it is still planned However we are still a couple of weeks away and Ive not seen the final installers to say
for certain its there
Ravindra ChanneJun 11 2013 815 PM
Hi Thomas
Thanks for a wonderful and very informative blog Is there any update on 32 bit REGI file
Is it expected along with SPS6
Regards
Ravi
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010051
Thomas Jung in response to Amanda Rzepka on page Jun 7 2013 942 PM
gtCan the XS Services be used in a BW on HANA Scenario
Yes XS is part of ALL HANA systems You should check and make sure you are licensed for direct access to
the underlying HANA instance however
Thomas Jung in response to Holger Schimanski on page Jun 7 2013 941 PM
gtIs there a similar library which could be used in XS Engine
The XSODATA development object is similar We also have higher level frameworks for XMLA and Search
Services (InA) You can expect more such high level frameworks to be added to the HANA Extended
Application Services in the future
Thomas Jung in response to Manav Mehra on page Jun 7 2013 939 PM
Have you used something like the Chrome developer tools to see see if you are getting any client side
javascript errors or to see if the request to your xsodata service is successful
Thomas Jung in response to Christian Hufnagl on page 52Jun 7 2013 938 PM
It will ship as non-automatic content in SPS6 (all systems will have it and it just needs to be imported) The
delivery units are also part of this weeks updates to the Cloudshare and AWS developer center images They
are also available for download as part of the content of the openSAP course
Thomas Jung in response to Matthew Pickell on page 51Jun 7 2013 937 PM
CORS support will come with SPS6 at the end of June
Thomas Jung in response to Jeroen Custers on page 51Jun 7 2013 936 PM
gtWill this bug be fixed in HANA ver 56
Personally Ive still experienced this bug in SPS6 internal builds Must be a tricky one to find Luckily the
workaround of closing and reopening isnt too difficult Just annoying This also probably makes the bug low
priority
Jeroen Custers in response to Vivek Singh Bhoj on page 52Jun 7 2013 411 PM
This issue also occurs on rev56
Matthew PickellJun 7 2013 258 PM
Thomas
Has CORS been included in a release yet
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010052
Vivek Singh Bhoj in response to Chandra Edem on page 52Jun 5 2013 601 AM
Hi Chandra
Date for Week1 Assignment has been extended till June 11
So you can give Week 1 Assignment now
Christian HufnaglJun 4 2013 543 PM
Hi Thomas
thank you for the interesting tutorial
Can you tell me whether it is possible to download the source code of the ldquoPutting it all togetherrdquovideo And if yes Where can I download itThanks
Christoph
Vivek Singh BhojJun 4 2013 1116 AM
Hi Thomas
Thanks for OpenSAP classes
Your Youtube Account also have very good exercises
IN OpenSAP Week 2 Unit 3 tutorial after assigning admin role to my user Id i am not able to see sequences
synonyms triggers under my schema or any other schema i am only able to see Column Views Procedures
Tables and Views
Though now i am able to insert data into my created table
Can you let me know how i will be able to see Sequences under my schema without removing the admin role
I am using HANA revision 52
Got to know from OpenSAP that
This is a known issue and the only way that Ive seen to fix it is to actually close the studio and open it again
then refresh the node
Cheers
Rich Heilman
SAP HANA Product Management
Will this bug be fixed in HANA ver 56
Chandra Edem in response to Thomas Jung on page 53Jun 4 2013 646 AM
Thomas
I registered for OpenSAP course Introduction to Software Development on SAP HANA on June 2 900PM
I didnt know that it is going to end WEEK1 assignment test on 632013 300PM Is there any way can take
that WEEK1 Assignment Test
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010053
Thanks
Chandra
Thomas Jung in response to Alexander Bauer on page Jun 3 2013 856 PM
SAPUI5 gets updated auutomatically when you apply HANA revisions There is no additional download or
update needed
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010037
text CM_NET_Amount_001
)
sortProperty CM_NET_Amount_001
))
oTableaddColumn(new sapuitableColumn(
label new sapuicommonsLabel(
text Currency
)
template new sapuicommonsTextView(
text Currency
)
sortProperty Currency
))
var oModel = new sapuimodelodataODataModel
(httpqperiorvmcldsr8000ZAG1_WS_001ZAG1_CV_001xsodata false)
oTablesetModel(oModel)
oTablebindRows(Amount)
return oTable
)
It wonacutet call the function or better said the action of the button works fine till to the point where it should call the
xsjsfile to generate the excel-file I wondered that in the ajax part the error- success- and complete-part will
be executed at the same time and not only one of this statements The message is 200 (The request has
succeeded The information returned with the response is dependent on the method used in the request)
Maybe you can see where my mistake is or whats going wrong
Iacuteve the developer edition on cloudshare (Hana Studio rev68 Server is on SPS05)
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010038
Andreacute
Thomas Jung in response to Samuel Tanor-Gyedu on page 38Feb 19 2014 523 AM
I dont think I can help you This appears to a question about how odata4j works not about XS I have no
experience with odata4j myself
Samuel Tanor-GyeduFeb 18 2014 913 AM
Hi Thomas
I have an odata service with this endpointhttpss5hanaxshanatrialondemandcomservicesUserxsodata
I am now trying to consume it from eclipse with the odata4j libraries
This is how I get the endpoint
public UserServiceOdata(String endpointUri)
thisendpointUri = endpointUri
ODataConsumerdumpresponseHeaders(true)
consumer = ODataConsumerscreate(endpointUri)
This is my method to add a user
public User addUser(User user)
consumercreateEntity(entitySet)properties(OPropertiesint32(propertyUserId
usergetId()))properties(OPropertiesstring(propertyUserName
usergetName()))properties(OPropertiesstring(propertyUserEmail usergetEmail()))execute()
return user
When I call addUser method I get an Error
Caused by javaxxmlstreamXMLStreamException ParseError at [rowcol][78253]
Message The reference to entity sourceUrl must end with the delimiter
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010039
When I use this endpoint httpss5hanaxshanatrialondemandcomservicesUsersvc everything works fine
With the httpss5hanaxshanatrialondemandcomservicesUserxsodata I get errors
Please I would be very grateful for assistance
Thanks in advance
Regards
Samuel
Thomas Jung in response to gentilini andre on page 39Feb 18 2014 431 AM
You have a fundamental misunderstanding here You are placing server side JavaScript code in your client
side UI5 application The function downloadExcel is something you need to execute on the server It needs to
be in an XSJS file and it is called from the client side via AJAX - as a REST service not as a local function
gentilini andreFeb 17 2014 451 PM
Hello Thomas
Thank you for this great How-To Guide
Iacutem pretty new in SAPUI5 and tried your export-sample in my little trial project but it doesnacutet work
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010040
My Button for this looks like
ltcodegt
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
lite true
press function() alert(oButton3getText())
downloadExcel()
ltcodegt
and the function for this action looks like
ltcodegt
function downloadExcel()
var body =
alert(drin)
print($query)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount tTax
Amount tNetto Amount tCurrency n
while(rsnext())
if(rsnext() == )
alert($responsesetBody( Failed to retrieve data ))
alert($responsestatus = $nethttpINTERNAL_SERVER_ERROR)
else
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010041
ltcodegt
Iacutem afraid and hope that you can help me
Kind regards
Andreacute
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1246 PM
gtIs there any restriction or development limitation in the XSJSLIB files
Thats a very general question Difficult to answer without any context
Vikas Madaan in response to Thomas Jung on page 41Feb 11 2014 1245 PM
Thanks Thomas
I think we are on same page
Once quick question that came to my mind Is there any restriction or development limitation in the XSJSLIB
files
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1230 PM
gtCould please help me in understanding in more advantagesdisadvantages for both techniques
Youve summarized it pretty well already
gtbecuase i dont want to use both the approaches
Even with the CRUD support and exits in XSODATA its still pretty hard to do 100 via XSODATA There are
still valid use cases for XSJS when you need custom body custom read processing job scheduling etc Its
good to try and use XSODATA whenever possible but I wouldnt automatically exclude the use of XSJS
Vikas MadaanFeb 11 2014 1008 AM
Hi Thomas
Thanks a lot for sharing useful information through various blogs
In my current project we are evaluating use of XSOData or XSJS applications I saw your videos like the one
mentioned below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010042
httpwwwsaphanacomdocsDOC-4376
Want i understood from various blog is this
From SP7 we can write exsits in the OData services and it is very easy to consume at the client side just like
any REST base service and from my understanding it is Scalable as well I would love to use XSOData always
becuase development effort is very less compare to XSJS and it is very easy to rampup the team on OData
related development objects
XSJS were as provide more control becuase of server side scripting becuase it allows development on the
server side using JavaScript Core APIs of SAP HANA Extended Application Services are therefore exposed
as JavaScript functions providing easy access to the HTTP Request and Response object as well database
access to execute SQL or call SQLScript Procedures It provide us control over the body format and and URL
parameter definition
Could please help me in understanding in more advantagesdisadvantages for both techniques
I am very keen to understand and also explain the same to team members becuase i dont want to use both the
approaches and even sometimes customer can also ask the same to us
Also If we are on SP6 then from my understanding XSJS provides us more capability in terms of complex
application Corrent me If i am wrong
Thanks
Regards
Vikas Madaan
Thomas Jung in response to Raghuveer Phull on page 42Feb 5 2014 312 PM
Yes there are videos on the CRUD features of XSODATA which were new in SP6
For more on CRUD support in SP6 see this video
oData CreateUpdateDelete Support in SAP HANA SPS6
For the extended support for XSJS exits in SP7 see this video
SAP HANA SPS 07 XSODATA Exits in XSJS
Raghuveer PhullFeb 5 2014 122 AM
Do you have an exampledocumentationvideo where you can write a service which will populate Hana DB
What I am asking for is a way for my external script to populate the DB tables i have created in Hana DB
Thomas Jung in response to reda miraoui on page 43Jan 29 2014 411 PM
The source code for the examples shown here are shipped as part of SHINE (SAP HANA Interactive
Education)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010043
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Vivek Singh Bhoj in response to reda miraoui on page 43Jan 29 2014 352 PM
Hi Reda
You can import Shine Content in HANA and then check all these source codes
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Regards
Vivek
reda miraoui in response to Thomas Jung on page Jan 29 2014 344 PM
Hey Thomas
Is it possible to download source code of your project from this HANA tutorial
Thanks
Reda
Thomas Jung in response to Abdul Hakim on page 43Nov 21 2013 1133 PM
Yes River can be used as an alternative and when activated it will generate Server Side JavaScript andor
SQLScript
Abdul Hakim in response to Thomas Jung on page 44Nov 21 2013 747 PM
Hi Thomas - Was going through blog regarding River (RDL)Just a question on this
When you say Programming language for HANA native development is Server side Javascript SQL SQL
ScriptOnce RDL is rolled out whether RDL can be used for native application development instead of Server
side Java script SQL SQL Script I am very much new to this stuff so appreciate if you can also help on
how to get started with Server Side Java script SQL SQL Script for HANA
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 30 2013 750 AM
Hi Thomas
Thanks for your response I am talking about more content on shine
thanks
Ashutosh
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010044
Baskar Gopalakrishnan in response to Thomas Jung on page 44Oct 30 2013 1249 AM
Hi Thomas
Im a SAP PI Middleware consultantSAP topic leader in XIPI heavily worked on Java related
Netweaver stack I have knowledge in ABAP but not worked heavily in abap I have enrolled your sap hana
native application development course I feel very interesting I did work heavily in java and javascript projects
using eclipse development tool Do you think if I invest my time in just native hana development and proceed
in HANA field is a good step I dont have BW experience either
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 819 PM
Thanks for the clarification Much appreciated
Thomas Jung in response to Abdul Hakim on page 44Oct 29 2013 120 PM
gtABAP Close to HANA means whether we can expect a similar 2 tier architecture similar to HANA XS in the
future or what does that mean
No it doesnt mean that ABAP will become a 2 tier architecture We will not move the ABAP VMKernel into
HANA itself It will remain a separate application server At least for the current plansforeseeable future What
he was referring to was bringing the programming models closer For instance the new 740 SP5 feature that
allows you to write SQLScript directly within an ABAP class method
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 650 AM
Thomas - Thanks for the clarificationMuch appreciatedI was listening to ABAP on HANA session by
Thorsten Schneider this year Teched and he was mentioning that SAP Plans to bring ABAP very close to
HANA in the coming future but not much details have been discussed in the sessionABAP Close to HANA
means whether we can expect a similar 2 tier architecture similar to HANA XS in the future or what does that
mean
Thanks
Hakim
Thomas Jung in response to Abdul Hakim on page 45Oct 28 2013 703 PM
gt whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the option is
recommended by SAP then kindly share the pros and cons of each of the item
Taken from the TechEd CD103 session slides
Guidance
bulluse ABAP for optimization of existing progams (in context of SAP Business Suite or BW)
bullconsider HANA Native Development for development of new applications which will solely run on SAP HANA
bullcombine ABAP and HANA Native Development to enrich existing applications (eg SAP HANA Live Fiori)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010045
ABAP
bullapplications follow 3-tier architecture
bullABAP is in general database agnostic but with release 74 optimized for SAP HANA
bullProgramming language ABAP ABAP OO with the option to use SAP HANA features
bullIDE eclipse-based ABAP Development Tools
HANA Native Development
bullapplications follow 2-tier architecture
bullHANA Native Development is SAP HANA specific and embedded in the database
bullProgramming language River server-side JavaScript SQLSQLScript
bullIDE eclipse-based SAP HANA Studio + web IDE
Thomas Jung in response to ashutosh dixit on page 45Oct 28 2013 701 PM
gtIs there any more demos for the SHINE
Im not exactly sure what you mean by that We are building additional content for SHINE that will be delivered
in SP7
Abdul HakimOct 28 2013 326 PM
Thomas - Let us say a customer is running SAP Netweaver 74 ABAP with HANA DB and they have HANA
extended service as wellIf the customer wants to do new developments then what is the recommendation
from SAP ie whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the
option is recommended by SAP then kindly share the pros and cons of each of the item (SAP Netweaver 74
ABAP Vs SAP HANA XS)
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 28 2013 221 PM
Hi Thomas
Thanks a lot for your its working now
Is there any more demos for the SHINE
Thanks
Ashutosh
Thomas Jung in response to ashutosh dixit on page 46Oct 25 2013 809 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010046
As this content is now standard in SP6 as part of SHINE (SAP HANA INteractive Education) there also some
setup instructions on helpsapcom
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Basic points to check - have you generated the synonyms in the data generator Ran the data generator to
create some data Have the role assigned Added client 001 to your user profile
ashutosh dixitOct 24 2013 130 PM
Hi Thomas
Amazing blog - once again Thomas thanks
I have been following you for many days attended your OPEN SAP course also
That was an amazing course for new learner like me
One of our client is looking forward for XS based search Application identical to what you have created in your
DEMO
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010047
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010048
But I am not able to fetch the data on blank HTML page is coming with no data
If there is any step by step document related to this please help in getting that
Any help will be highly appreciated
Thanks
Ashutosh
Naveen KumarSep 26 2013 1130 AM
Good Document
Heber FabianoAug 27 2013 323 PM
Great content as always Keep sharing with us
Thomas Jung in response to Orel Stringa on page 48Aug 27 2013 147 PM
This is currently not possible The CORS support is for all origins We dont yet have the feature to maintain a
whitelist of CORS origins
Orel Stringa in response to Thomas Jung on page Aug 27 2013 801 AM
Hi Thomas
nice to see that SAP has made it possible with SP6 to specify cross origin resource sharing (CORS) support
via the xsaccess file SP6 HANA development guide has example of how to specify CORS support
I have build an XS application and would like to serve SAPUI5 on a diffhost than XSHANA
How can I specify that I would like to allow cross origin access restricted to certain domain(s) only
Is there a special keyword syntax for specifying that
Thank yoi
Orel
Vijay UthayakumarAug 27 2013 131 AM
Highly informative amp digestible Fantastic work
Jerry WangAug 1 2013 955 AM
Hi Tomas
Thank you
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010049
Jerry
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 644 PM
JSLint checks are very strict and often produce syntax errors for items that just stylistic and wont actually
cause an error upon activation or runtime You can either ignore the JSLint errors or deactivate JSLint for this
project in these cases However it might also be an indication that the JavaScript code you are trying to import
isnt compatible with Strict mode
httpsdevelopermozillaorgen-USdocsWebJavaScriptReferenceFunctions_and_function_scope
Strict_mode
Milan Vrozina in response to Thomas Jung on page 49Jul 21 2013 624 PM
Thanks for clarification I thought there would be some kind of import
But anyway in case of this specific library I have some problems with JSLint validation when I do cut and paste
of the original code
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 343 PM
What kind of problem are you having using this library Strict mode JavaScript which doesnt try to access the
DOM Window or other client side specific objects should work in Server Side XSJS Generally if you have a
library you just cut and paste into your XSJS or an XSJSLIB file and then call the functions from your code
Milan VrozinaJul 21 2013 339 PM
Hello
first and foremost thank you for perfect openSAP classes related to HANA development and for this blog as
well
I have one question related to server-side javascript You mentioned in course that is possible to use 3rd party
libraries or reuse 3rd party code But I cant find a possible way how to import 3rd party javascript library -as
is- to server and use it For example I would like to use JSZip library to zip some file before sending it to client
from xsjs application Is that possible Thank you
Chandrashekhar MahajanJul 3 2013 734 PM
This is excellent blog Now HANA XS is very much clear to me
Mohan krishnaJul 1 2013 144 PM
WOW - great blog Thomas This will be very helpful in understanding SAP hana Good Job
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010050
Abdul Hakim in response to Thomas Jung on page 50Jun 27 2013 833 PM
Thanks for the clarification
Thomas Jung in response to Abdul Hakim on page 50Jun 27 2013 659 PM
HANA Extended Application Services uses SQLScript and JavaScript as its two primary programming
languages
gtwhether the current SAP Business suite based on ABAP will be completely migrated to HANA service
No The Business Suite already runs on HANA but still via the ABAP application server It will continue to
leverage HANA via a combination of enhancements to ABAP and utilizing some of the technologies described
in this blog
gtAlso whether ABAP can be used to built application in HANA extended services
No There is no ABAP language container in HANA Extended Application Services
Abdul HakimJun 27 2013 405 PM
Hi Thomas - What is the programming language used for HANA Extended application services
As HANA is more than a database ie application platform by itself and as you mentioned that more and more
applications will be built on HANA i have question as how the future SAP ERP system looks likewhether the
current SAP Business suite based on ABAP will be completely migrated to HANA service in the future or SAP
ABAP server will continue to evolve and receive focus investment from SAP Also whether ABAP can be used
to built application in HANA extended services Your thoughts
Thanks
Abdul Hakim
Thomas Jung in response to Ravindra Channe on page 50Jun 11 2013 830 PM
Yes it is still planned However we are still a couple of weeks away and Ive not seen the final installers to say
for certain its there
Ravindra ChanneJun 11 2013 815 PM
Hi Thomas
Thanks for a wonderful and very informative blog Is there any update on 32 bit REGI file
Is it expected along with SPS6
Regards
Ravi
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010051
Thomas Jung in response to Amanda Rzepka on page Jun 7 2013 942 PM
gtCan the XS Services be used in a BW on HANA Scenario
Yes XS is part of ALL HANA systems You should check and make sure you are licensed for direct access to
the underlying HANA instance however
Thomas Jung in response to Holger Schimanski on page Jun 7 2013 941 PM
gtIs there a similar library which could be used in XS Engine
The XSODATA development object is similar We also have higher level frameworks for XMLA and Search
Services (InA) You can expect more such high level frameworks to be added to the HANA Extended
Application Services in the future
Thomas Jung in response to Manav Mehra on page Jun 7 2013 939 PM
Have you used something like the Chrome developer tools to see see if you are getting any client side
javascript errors or to see if the request to your xsodata service is successful
Thomas Jung in response to Christian Hufnagl on page 52Jun 7 2013 938 PM
It will ship as non-automatic content in SPS6 (all systems will have it and it just needs to be imported) The
delivery units are also part of this weeks updates to the Cloudshare and AWS developer center images They
are also available for download as part of the content of the openSAP course
Thomas Jung in response to Matthew Pickell on page 51Jun 7 2013 937 PM
CORS support will come with SPS6 at the end of June
Thomas Jung in response to Jeroen Custers on page 51Jun 7 2013 936 PM
gtWill this bug be fixed in HANA ver 56
Personally Ive still experienced this bug in SPS6 internal builds Must be a tricky one to find Luckily the
workaround of closing and reopening isnt too difficult Just annoying This also probably makes the bug low
priority
Jeroen Custers in response to Vivek Singh Bhoj on page 52Jun 7 2013 411 PM
This issue also occurs on rev56
Matthew PickellJun 7 2013 258 PM
Thomas
Has CORS been included in a release yet
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010052
Vivek Singh Bhoj in response to Chandra Edem on page 52Jun 5 2013 601 AM
Hi Chandra
Date for Week1 Assignment has been extended till June 11
So you can give Week 1 Assignment now
Christian HufnaglJun 4 2013 543 PM
Hi Thomas
thank you for the interesting tutorial
Can you tell me whether it is possible to download the source code of the ldquoPutting it all togetherrdquovideo And if yes Where can I download itThanks
Christoph
Vivek Singh BhojJun 4 2013 1116 AM
Hi Thomas
Thanks for OpenSAP classes
Your Youtube Account also have very good exercises
IN OpenSAP Week 2 Unit 3 tutorial after assigning admin role to my user Id i am not able to see sequences
synonyms triggers under my schema or any other schema i am only able to see Column Views Procedures
Tables and Views
Though now i am able to insert data into my created table
Can you let me know how i will be able to see Sequences under my schema without removing the admin role
I am using HANA revision 52
Got to know from OpenSAP that
This is a known issue and the only way that Ive seen to fix it is to actually close the studio and open it again
then refresh the node
Cheers
Rich Heilman
SAP HANA Product Management
Will this bug be fixed in HANA ver 56
Chandra Edem in response to Thomas Jung on page 53Jun 4 2013 646 AM
Thomas
I registered for OpenSAP course Introduction to Software Development on SAP HANA on June 2 900PM
I didnt know that it is going to end WEEK1 assignment test on 632013 300PM Is there any way can take
that WEEK1 Assignment Test
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010053
Thanks
Chandra
Thomas Jung in response to Alexander Bauer on page Jun 3 2013 856 PM
SAPUI5 gets updated auutomatically when you apply HANA revisions There is no additional download or
update needed
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010038
Andreacute
Thomas Jung in response to Samuel Tanor-Gyedu on page 38Feb 19 2014 523 AM
I dont think I can help you This appears to a question about how odata4j works not about XS I have no
experience with odata4j myself
Samuel Tanor-GyeduFeb 18 2014 913 AM
Hi Thomas
I have an odata service with this endpointhttpss5hanaxshanatrialondemandcomservicesUserxsodata
I am now trying to consume it from eclipse with the odata4j libraries
This is how I get the endpoint
public UserServiceOdata(String endpointUri)
thisendpointUri = endpointUri
ODataConsumerdumpresponseHeaders(true)
consumer = ODataConsumerscreate(endpointUri)
This is my method to add a user
public User addUser(User user)
consumercreateEntity(entitySet)properties(OPropertiesint32(propertyUserId
usergetId()))properties(OPropertiesstring(propertyUserName
usergetName()))properties(OPropertiesstring(propertyUserEmail usergetEmail()))execute()
return user
When I call addUser method I get an Error
Caused by javaxxmlstreamXMLStreamException ParseError at [rowcol][78253]
Message The reference to entity sourceUrl must end with the delimiter
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010039
When I use this endpoint httpss5hanaxshanatrialondemandcomservicesUsersvc everything works fine
With the httpss5hanaxshanatrialondemandcomservicesUserxsodata I get errors
Please I would be very grateful for assistance
Thanks in advance
Regards
Samuel
Thomas Jung in response to gentilini andre on page 39Feb 18 2014 431 AM
You have a fundamental misunderstanding here You are placing server side JavaScript code in your client
side UI5 application The function downloadExcel is something you need to execute on the server It needs to
be in an XSJS file and it is called from the client side via AJAX - as a REST service not as a local function
gentilini andreFeb 17 2014 451 PM
Hello Thomas
Thank you for this great How-To Guide
Iacutem pretty new in SAPUI5 and tried your export-sample in my little trial project but it doesnacutet work
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010040
My Button for this looks like
ltcodegt
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
lite true
press function() alert(oButton3getText())
downloadExcel()
ltcodegt
and the function for this action looks like
ltcodegt
function downloadExcel()
var body =
alert(drin)
print($query)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount tTax
Amount tNetto Amount tCurrency n
while(rsnext())
if(rsnext() == )
alert($responsesetBody( Failed to retrieve data ))
alert($responsestatus = $nethttpINTERNAL_SERVER_ERROR)
else
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010041
ltcodegt
Iacutem afraid and hope that you can help me
Kind regards
Andreacute
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1246 PM
gtIs there any restriction or development limitation in the XSJSLIB files
Thats a very general question Difficult to answer without any context
Vikas Madaan in response to Thomas Jung on page 41Feb 11 2014 1245 PM
Thanks Thomas
I think we are on same page
Once quick question that came to my mind Is there any restriction or development limitation in the XSJSLIB
files
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1230 PM
gtCould please help me in understanding in more advantagesdisadvantages for both techniques
Youve summarized it pretty well already
gtbecuase i dont want to use both the approaches
Even with the CRUD support and exits in XSODATA its still pretty hard to do 100 via XSODATA There are
still valid use cases for XSJS when you need custom body custom read processing job scheduling etc Its
good to try and use XSODATA whenever possible but I wouldnt automatically exclude the use of XSJS
Vikas MadaanFeb 11 2014 1008 AM
Hi Thomas
Thanks a lot for sharing useful information through various blogs
In my current project we are evaluating use of XSOData or XSJS applications I saw your videos like the one
mentioned below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010042
httpwwwsaphanacomdocsDOC-4376
Want i understood from various blog is this
From SP7 we can write exsits in the OData services and it is very easy to consume at the client side just like
any REST base service and from my understanding it is Scalable as well I would love to use XSOData always
becuase development effort is very less compare to XSJS and it is very easy to rampup the team on OData
related development objects
XSJS were as provide more control becuase of server side scripting becuase it allows development on the
server side using JavaScript Core APIs of SAP HANA Extended Application Services are therefore exposed
as JavaScript functions providing easy access to the HTTP Request and Response object as well database
access to execute SQL or call SQLScript Procedures It provide us control over the body format and and URL
parameter definition
Could please help me in understanding in more advantagesdisadvantages for both techniques
I am very keen to understand and also explain the same to team members becuase i dont want to use both the
approaches and even sometimes customer can also ask the same to us
Also If we are on SP6 then from my understanding XSJS provides us more capability in terms of complex
application Corrent me If i am wrong
Thanks
Regards
Vikas Madaan
Thomas Jung in response to Raghuveer Phull on page 42Feb 5 2014 312 PM
Yes there are videos on the CRUD features of XSODATA which were new in SP6
For more on CRUD support in SP6 see this video
oData CreateUpdateDelete Support in SAP HANA SPS6
For the extended support for XSJS exits in SP7 see this video
SAP HANA SPS 07 XSODATA Exits in XSJS
Raghuveer PhullFeb 5 2014 122 AM
Do you have an exampledocumentationvideo where you can write a service which will populate Hana DB
What I am asking for is a way for my external script to populate the DB tables i have created in Hana DB
Thomas Jung in response to reda miraoui on page 43Jan 29 2014 411 PM
The source code for the examples shown here are shipped as part of SHINE (SAP HANA Interactive
Education)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010043
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Vivek Singh Bhoj in response to reda miraoui on page 43Jan 29 2014 352 PM
Hi Reda
You can import Shine Content in HANA and then check all these source codes
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Regards
Vivek
reda miraoui in response to Thomas Jung on page Jan 29 2014 344 PM
Hey Thomas
Is it possible to download source code of your project from this HANA tutorial
Thanks
Reda
Thomas Jung in response to Abdul Hakim on page 43Nov 21 2013 1133 PM
Yes River can be used as an alternative and when activated it will generate Server Side JavaScript andor
SQLScript
Abdul Hakim in response to Thomas Jung on page 44Nov 21 2013 747 PM
Hi Thomas - Was going through blog regarding River (RDL)Just a question on this
When you say Programming language for HANA native development is Server side Javascript SQL SQL
ScriptOnce RDL is rolled out whether RDL can be used for native application development instead of Server
side Java script SQL SQL Script I am very much new to this stuff so appreciate if you can also help on
how to get started with Server Side Java script SQL SQL Script for HANA
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 30 2013 750 AM
Hi Thomas
Thanks for your response I am talking about more content on shine
thanks
Ashutosh
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010044
Baskar Gopalakrishnan in response to Thomas Jung on page 44Oct 30 2013 1249 AM
Hi Thomas
Im a SAP PI Middleware consultantSAP topic leader in XIPI heavily worked on Java related
Netweaver stack I have knowledge in ABAP but not worked heavily in abap I have enrolled your sap hana
native application development course I feel very interesting I did work heavily in java and javascript projects
using eclipse development tool Do you think if I invest my time in just native hana development and proceed
in HANA field is a good step I dont have BW experience either
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 819 PM
Thanks for the clarification Much appreciated
Thomas Jung in response to Abdul Hakim on page 44Oct 29 2013 120 PM
gtABAP Close to HANA means whether we can expect a similar 2 tier architecture similar to HANA XS in the
future or what does that mean
No it doesnt mean that ABAP will become a 2 tier architecture We will not move the ABAP VMKernel into
HANA itself It will remain a separate application server At least for the current plansforeseeable future What
he was referring to was bringing the programming models closer For instance the new 740 SP5 feature that
allows you to write SQLScript directly within an ABAP class method
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 650 AM
Thomas - Thanks for the clarificationMuch appreciatedI was listening to ABAP on HANA session by
Thorsten Schneider this year Teched and he was mentioning that SAP Plans to bring ABAP very close to
HANA in the coming future but not much details have been discussed in the sessionABAP Close to HANA
means whether we can expect a similar 2 tier architecture similar to HANA XS in the future or what does that
mean
Thanks
Hakim
Thomas Jung in response to Abdul Hakim on page 45Oct 28 2013 703 PM
gt whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the option is
recommended by SAP then kindly share the pros and cons of each of the item
Taken from the TechEd CD103 session slides
Guidance
bulluse ABAP for optimization of existing progams (in context of SAP Business Suite or BW)
bullconsider HANA Native Development for development of new applications which will solely run on SAP HANA
bullcombine ABAP and HANA Native Development to enrich existing applications (eg SAP HANA Live Fiori)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010045
ABAP
bullapplications follow 3-tier architecture
bullABAP is in general database agnostic but with release 74 optimized for SAP HANA
bullProgramming language ABAP ABAP OO with the option to use SAP HANA features
bullIDE eclipse-based ABAP Development Tools
HANA Native Development
bullapplications follow 2-tier architecture
bullHANA Native Development is SAP HANA specific and embedded in the database
bullProgramming language River server-side JavaScript SQLSQLScript
bullIDE eclipse-based SAP HANA Studio + web IDE
Thomas Jung in response to ashutosh dixit on page 45Oct 28 2013 701 PM
gtIs there any more demos for the SHINE
Im not exactly sure what you mean by that We are building additional content for SHINE that will be delivered
in SP7
Abdul HakimOct 28 2013 326 PM
Thomas - Let us say a customer is running SAP Netweaver 74 ABAP with HANA DB and they have HANA
extended service as wellIf the customer wants to do new developments then what is the recommendation
from SAP ie whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the
option is recommended by SAP then kindly share the pros and cons of each of the item (SAP Netweaver 74
ABAP Vs SAP HANA XS)
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 28 2013 221 PM
Hi Thomas
Thanks a lot for your its working now
Is there any more demos for the SHINE
Thanks
Ashutosh
Thomas Jung in response to ashutosh dixit on page 46Oct 25 2013 809 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010046
As this content is now standard in SP6 as part of SHINE (SAP HANA INteractive Education) there also some
setup instructions on helpsapcom
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Basic points to check - have you generated the synonyms in the data generator Ran the data generator to
create some data Have the role assigned Added client 001 to your user profile
ashutosh dixitOct 24 2013 130 PM
Hi Thomas
Amazing blog - once again Thomas thanks
I have been following you for many days attended your OPEN SAP course also
That was an amazing course for new learner like me
One of our client is looking forward for XS based search Application identical to what you have created in your
DEMO
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010047
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010048
But I am not able to fetch the data on blank HTML page is coming with no data
If there is any step by step document related to this please help in getting that
Any help will be highly appreciated
Thanks
Ashutosh
Naveen KumarSep 26 2013 1130 AM
Good Document
Heber FabianoAug 27 2013 323 PM
Great content as always Keep sharing with us
Thomas Jung in response to Orel Stringa on page 48Aug 27 2013 147 PM
This is currently not possible The CORS support is for all origins We dont yet have the feature to maintain a
whitelist of CORS origins
Orel Stringa in response to Thomas Jung on page Aug 27 2013 801 AM
Hi Thomas
nice to see that SAP has made it possible with SP6 to specify cross origin resource sharing (CORS) support
via the xsaccess file SP6 HANA development guide has example of how to specify CORS support
I have build an XS application and would like to serve SAPUI5 on a diffhost than XSHANA
How can I specify that I would like to allow cross origin access restricted to certain domain(s) only
Is there a special keyword syntax for specifying that
Thank yoi
Orel
Vijay UthayakumarAug 27 2013 131 AM
Highly informative amp digestible Fantastic work
Jerry WangAug 1 2013 955 AM
Hi Tomas
Thank you
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010049
Jerry
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 644 PM
JSLint checks are very strict and often produce syntax errors for items that just stylistic and wont actually
cause an error upon activation or runtime You can either ignore the JSLint errors or deactivate JSLint for this
project in these cases However it might also be an indication that the JavaScript code you are trying to import
isnt compatible with Strict mode
httpsdevelopermozillaorgen-USdocsWebJavaScriptReferenceFunctions_and_function_scope
Strict_mode
Milan Vrozina in response to Thomas Jung on page 49Jul 21 2013 624 PM
Thanks for clarification I thought there would be some kind of import
But anyway in case of this specific library I have some problems with JSLint validation when I do cut and paste
of the original code
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 343 PM
What kind of problem are you having using this library Strict mode JavaScript which doesnt try to access the
DOM Window or other client side specific objects should work in Server Side XSJS Generally if you have a
library you just cut and paste into your XSJS or an XSJSLIB file and then call the functions from your code
Milan VrozinaJul 21 2013 339 PM
Hello
first and foremost thank you for perfect openSAP classes related to HANA development and for this blog as
well
I have one question related to server-side javascript You mentioned in course that is possible to use 3rd party
libraries or reuse 3rd party code But I cant find a possible way how to import 3rd party javascript library -as
is- to server and use it For example I would like to use JSZip library to zip some file before sending it to client
from xsjs application Is that possible Thank you
Chandrashekhar MahajanJul 3 2013 734 PM
This is excellent blog Now HANA XS is very much clear to me
Mohan krishnaJul 1 2013 144 PM
WOW - great blog Thomas This will be very helpful in understanding SAP hana Good Job
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010050
Abdul Hakim in response to Thomas Jung on page 50Jun 27 2013 833 PM
Thanks for the clarification
Thomas Jung in response to Abdul Hakim on page 50Jun 27 2013 659 PM
HANA Extended Application Services uses SQLScript and JavaScript as its two primary programming
languages
gtwhether the current SAP Business suite based on ABAP will be completely migrated to HANA service
No The Business Suite already runs on HANA but still via the ABAP application server It will continue to
leverage HANA via a combination of enhancements to ABAP and utilizing some of the technologies described
in this blog
gtAlso whether ABAP can be used to built application in HANA extended services
No There is no ABAP language container in HANA Extended Application Services
Abdul HakimJun 27 2013 405 PM
Hi Thomas - What is the programming language used for HANA Extended application services
As HANA is more than a database ie application platform by itself and as you mentioned that more and more
applications will be built on HANA i have question as how the future SAP ERP system looks likewhether the
current SAP Business suite based on ABAP will be completely migrated to HANA service in the future or SAP
ABAP server will continue to evolve and receive focus investment from SAP Also whether ABAP can be used
to built application in HANA extended services Your thoughts
Thanks
Abdul Hakim
Thomas Jung in response to Ravindra Channe on page 50Jun 11 2013 830 PM
Yes it is still planned However we are still a couple of weeks away and Ive not seen the final installers to say
for certain its there
Ravindra ChanneJun 11 2013 815 PM
Hi Thomas
Thanks for a wonderful and very informative blog Is there any update on 32 bit REGI file
Is it expected along with SPS6
Regards
Ravi
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010051
Thomas Jung in response to Amanda Rzepka on page Jun 7 2013 942 PM
gtCan the XS Services be used in a BW on HANA Scenario
Yes XS is part of ALL HANA systems You should check and make sure you are licensed for direct access to
the underlying HANA instance however
Thomas Jung in response to Holger Schimanski on page Jun 7 2013 941 PM
gtIs there a similar library which could be used in XS Engine
The XSODATA development object is similar We also have higher level frameworks for XMLA and Search
Services (InA) You can expect more such high level frameworks to be added to the HANA Extended
Application Services in the future
Thomas Jung in response to Manav Mehra on page Jun 7 2013 939 PM
Have you used something like the Chrome developer tools to see see if you are getting any client side
javascript errors or to see if the request to your xsodata service is successful
Thomas Jung in response to Christian Hufnagl on page 52Jun 7 2013 938 PM
It will ship as non-automatic content in SPS6 (all systems will have it and it just needs to be imported) The
delivery units are also part of this weeks updates to the Cloudshare and AWS developer center images They
are also available for download as part of the content of the openSAP course
Thomas Jung in response to Matthew Pickell on page 51Jun 7 2013 937 PM
CORS support will come with SPS6 at the end of June
Thomas Jung in response to Jeroen Custers on page 51Jun 7 2013 936 PM
gtWill this bug be fixed in HANA ver 56
Personally Ive still experienced this bug in SPS6 internal builds Must be a tricky one to find Luckily the
workaround of closing and reopening isnt too difficult Just annoying This also probably makes the bug low
priority
Jeroen Custers in response to Vivek Singh Bhoj on page 52Jun 7 2013 411 PM
This issue also occurs on rev56
Matthew PickellJun 7 2013 258 PM
Thomas
Has CORS been included in a release yet
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010052
Vivek Singh Bhoj in response to Chandra Edem on page 52Jun 5 2013 601 AM
Hi Chandra
Date for Week1 Assignment has been extended till June 11
So you can give Week 1 Assignment now
Christian HufnaglJun 4 2013 543 PM
Hi Thomas
thank you for the interesting tutorial
Can you tell me whether it is possible to download the source code of the ldquoPutting it all togetherrdquovideo And if yes Where can I download itThanks
Christoph
Vivek Singh BhojJun 4 2013 1116 AM
Hi Thomas
Thanks for OpenSAP classes
Your Youtube Account also have very good exercises
IN OpenSAP Week 2 Unit 3 tutorial after assigning admin role to my user Id i am not able to see sequences
synonyms triggers under my schema or any other schema i am only able to see Column Views Procedures
Tables and Views
Though now i am able to insert data into my created table
Can you let me know how i will be able to see Sequences under my schema without removing the admin role
I am using HANA revision 52
Got to know from OpenSAP that
This is a known issue and the only way that Ive seen to fix it is to actually close the studio and open it again
then refresh the node
Cheers
Rich Heilman
SAP HANA Product Management
Will this bug be fixed in HANA ver 56
Chandra Edem in response to Thomas Jung on page 53Jun 4 2013 646 AM
Thomas
I registered for OpenSAP course Introduction to Software Development on SAP HANA on June 2 900PM
I didnt know that it is going to end WEEK1 assignment test on 632013 300PM Is there any way can take
that WEEK1 Assignment Test
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010053
Thanks
Chandra
Thomas Jung in response to Alexander Bauer on page Jun 3 2013 856 PM
SAPUI5 gets updated auutomatically when you apply HANA revisions There is no additional download or
update needed
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010039
When I use this endpoint httpss5hanaxshanatrialondemandcomservicesUsersvc everything works fine
With the httpss5hanaxshanatrialondemandcomservicesUserxsodata I get errors
Please I would be very grateful for assistance
Thanks in advance
Regards
Samuel
Thomas Jung in response to gentilini andre on page 39Feb 18 2014 431 AM
You have a fundamental misunderstanding here You are placing server side JavaScript code in your client
side UI5 application The function downloadExcel is something you need to execute on the server It needs to
be in an XSJS file and it is called from the client side via AJAX - as a REST service not as a local function
gentilini andreFeb 17 2014 451 PM
Hello Thomas
Thank you for this great How-To Guide
Iacutem pretty new in SAPUI5 and tried your export-sample in my little trial project but it doesnacutet work
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010040
My Button for this looks like
ltcodegt
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
lite true
press function() alert(oButton3getText())
downloadExcel()
ltcodegt
and the function for this action looks like
ltcodegt
function downloadExcel()
var body =
alert(drin)
print($query)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount tTax
Amount tNetto Amount tCurrency n
while(rsnext())
if(rsnext() == )
alert($responsesetBody( Failed to retrieve data ))
alert($responsestatus = $nethttpINTERNAL_SERVER_ERROR)
else
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010041
ltcodegt
Iacutem afraid and hope that you can help me
Kind regards
Andreacute
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1246 PM
gtIs there any restriction or development limitation in the XSJSLIB files
Thats a very general question Difficult to answer without any context
Vikas Madaan in response to Thomas Jung on page 41Feb 11 2014 1245 PM
Thanks Thomas
I think we are on same page
Once quick question that came to my mind Is there any restriction or development limitation in the XSJSLIB
files
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1230 PM
gtCould please help me in understanding in more advantagesdisadvantages for both techniques
Youve summarized it pretty well already
gtbecuase i dont want to use both the approaches
Even with the CRUD support and exits in XSODATA its still pretty hard to do 100 via XSODATA There are
still valid use cases for XSJS when you need custom body custom read processing job scheduling etc Its
good to try and use XSODATA whenever possible but I wouldnt automatically exclude the use of XSJS
Vikas MadaanFeb 11 2014 1008 AM
Hi Thomas
Thanks a lot for sharing useful information through various blogs
In my current project we are evaluating use of XSOData or XSJS applications I saw your videos like the one
mentioned below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010042
httpwwwsaphanacomdocsDOC-4376
Want i understood from various blog is this
From SP7 we can write exsits in the OData services and it is very easy to consume at the client side just like
any REST base service and from my understanding it is Scalable as well I would love to use XSOData always
becuase development effort is very less compare to XSJS and it is very easy to rampup the team on OData
related development objects
XSJS were as provide more control becuase of server side scripting becuase it allows development on the
server side using JavaScript Core APIs of SAP HANA Extended Application Services are therefore exposed
as JavaScript functions providing easy access to the HTTP Request and Response object as well database
access to execute SQL or call SQLScript Procedures It provide us control over the body format and and URL
parameter definition
Could please help me in understanding in more advantagesdisadvantages for both techniques
I am very keen to understand and also explain the same to team members becuase i dont want to use both the
approaches and even sometimes customer can also ask the same to us
Also If we are on SP6 then from my understanding XSJS provides us more capability in terms of complex
application Corrent me If i am wrong
Thanks
Regards
Vikas Madaan
Thomas Jung in response to Raghuveer Phull on page 42Feb 5 2014 312 PM
Yes there are videos on the CRUD features of XSODATA which were new in SP6
For more on CRUD support in SP6 see this video
oData CreateUpdateDelete Support in SAP HANA SPS6
For the extended support for XSJS exits in SP7 see this video
SAP HANA SPS 07 XSODATA Exits in XSJS
Raghuveer PhullFeb 5 2014 122 AM
Do you have an exampledocumentationvideo where you can write a service which will populate Hana DB
What I am asking for is a way for my external script to populate the DB tables i have created in Hana DB
Thomas Jung in response to reda miraoui on page 43Jan 29 2014 411 PM
The source code for the examples shown here are shipped as part of SHINE (SAP HANA Interactive
Education)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010043
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Vivek Singh Bhoj in response to reda miraoui on page 43Jan 29 2014 352 PM
Hi Reda
You can import Shine Content in HANA and then check all these source codes
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Regards
Vivek
reda miraoui in response to Thomas Jung on page Jan 29 2014 344 PM
Hey Thomas
Is it possible to download source code of your project from this HANA tutorial
Thanks
Reda
Thomas Jung in response to Abdul Hakim on page 43Nov 21 2013 1133 PM
Yes River can be used as an alternative and when activated it will generate Server Side JavaScript andor
SQLScript
Abdul Hakim in response to Thomas Jung on page 44Nov 21 2013 747 PM
Hi Thomas - Was going through blog regarding River (RDL)Just a question on this
When you say Programming language for HANA native development is Server side Javascript SQL SQL
ScriptOnce RDL is rolled out whether RDL can be used for native application development instead of Server
side Java script SQL SQL Script I am very much new to this stuff so appreciate if you can also help on
how to get started with Server Side Java script SQL SQL Script for HANA
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 30 2013 750 AM
Hi Thomas
Thanks for your response I am talking about more content on shine
thanks
Ashutosh
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010044
Baskar Gopalakrishnan in response to Thomas Jung on page 44Oct 30 2013 1249 AM
Hi Thomas
Im a SAP PI Middleware consultantSAP topic leader in XIPI heavily worked on Java related
Netweaver stack I have knowledge in ABAP but not worked heavily in abap I have enrolled your sap hana
native application development course I feel very interesting I did work heavily in java and javascript projects
using eclipse development tool Do you think if I invest my time in just native hana development and proceed
in HANA field is a good step I dont have BW experience either
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 819 PM
Thanks for the clarification Much appreciated
Thomas Jung in response to Abdul Hakim on page 44Oct 29 2013 120 PM
gtABAP Close to HANA means whether we can expect a similar 2 tier architecture similar to HANA XS in the
future or what does that mean
No it doesnt mean that ABAP will become a 2 tier architecture We will not move the ABAP VMKernel into
HANA itself It will remain a separate application server At least for the current plansforeseeable future What
he was referring to was bringing the programming models closer For instance the new 740 SP5 feature that
allows you to write SQLScript directly within an ABAP class method
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 650 AM
Thomas - Thanks for the clarificationMuch appreciatedI was listening to ABAP on HANA session by
Thorsten Schneider this year Teched and he was mentioning that SAP Plans to bring ABAP very close to
HANA in the coming future but not much details have been discussed in the sessionABAP Close to HANA
means whether we can expect a similar 2 tier architecture similar to HANA XS in the future or what does that
mean
Thanks
Hakim
Thomas Jung in response to Abdul Hakim on page 45Oct 28 2013 703 PM
gt whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the option is
recommended by SAP then kindly share the pros and cons of each of the item
Taken from the TechEd CD103 session slides
Guidance
bulluse ABAP for optimization of existing progams (in context of SAP Business Suite or BW)
bullconsider HANA Native Development for development of new applications which will solely run on SAP HANA
bullcombine ABAP and HANA Native Development to enrich existing applications (eg SAP HANA Live Fiori)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010045
ABAP
bullapplications follow 3-tier architecture
bullABAP is in general database agnostic but with release 74 optimized for SAP HANA
bullProgramming language ABAP ABAP OO with the option to use SAP HANA features
bullIDE eclipse-based ABAP Development Tools
HANA Native Development
bullapplications follow 2-tier architecture
bullHANA Native Development is SAP HANA specific and embedded in the database
bullProgramming language River server-side JavaScript SQLSQLScript
bullIDE eclipse-based SAP HANA Studio + web IDE
Thomas Jung in response to ashutosh dixit on page 45Oct 28 2013 701 PM
gtIs there any more demos for the SHINE
Im not exactly sure what you mean by that We are building additional content for SHINE that will be delivered
in SP7
Abdul HakimOct 28 2013 326 PM
Thomas - Let us say a customer is running SAP Netweaver 74 ABAP with HANA DB and they have HANA
extended service as wellIf the customer wants to do new developments then what is the recommendation
from SAP ie whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the
option is recommended by SAP then kindly share the pros and cons of each of the item (SAP Netweaver 74
ABAP Vs SAP HANA XS)
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 28 2013 221 PM
Hi Thomas
Thanks a lot for your its working now
Is there any more demos for the SHINE
Thanks
Ashutosh
Thomas Jung in response to ashutosh dixit on page 46Oct 25 2013 809 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010046
As this content is now standard in SP6 as part of SHINE (SAP HANA INteractive Education) there also some
setup instructions on helpsapcom
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Basic points to check - have you generated the synonyms in the data generator Ran the data generator to
create some data Have the role assigned Added client 001 to your user profile
ashutosh dixitOct 24 2013 130 PM
Hi Thomas
Amazing blog - once again Thomas thanks
I have been following you for many days attended your OPEN SAP course also
That was an amazing course for new learner like me
One of our client is looking forward for XS based search Application identical to what you have created in your
DEMO
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010047
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010048
But I am not able to fetch the data on blank HTML page is coming with no data
If there is any step by step document related to this please help in getting that
Any help will be highly appreciated
Thanks
Ashutosh
Naveen KumarSep 26 2013 1130 AM
Good Document
Heber FabianoAug 27 2013 323 PM
Great content as always Keep sharing with us
Thomas Jung in response to Orel Stringa on page 48Aug 27 2013 147 PM
This is currently not possible The CORS support is for all origins We dont yet have the feature to maintain a
whitelist of CORS origins
Orel Stringa in response to Thomas Jung on page Aug 27 2013 801 AM
Hi Thomas
nice to see that SAP has made it possible with SP6 to specify cross origin resource sharing (CORS) support
via the xsaccess file SP6 HANA development guide has example of how to specify CORS support
I have build an XS application and would like to serve SAPUI5 on a diffhost than XSHANA
How can I specify that I would like to allow cross origin access restricted to certain domain(s) only
Is there a special keyword syntax for specifying that
Thank yoi
Orel
Vijay UthayakumarAug 27 2013 131 AM
Highly informative amp digestible Fantastic work
Jerry WangAug 1 2013 955 AM
Hi Tomas
Thank you
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010049
Jerry
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 644 PM
JSLint checks are very strict and often produce syntax errors for items that just stylistic and wont actually
cause an error upon activation or runtime You can either ignore the JSLint errors or deactivate JSLint for this
project in these cases However it might also be an indication that the JavaScript code you are trying to import
isnt compatible with Strict mode
httpsdevelopermozillaorgen-USdocsWebJavaScriptReferenceFunctions_and_function_scope
Strict_mode
Milan Vrozina in response to Thomas Jung on page 49Jul 21 2013 624 PM
Thanks for clarification I thought there would be some kind of import
But anyway in case of this specific library I have some problems with JSLint validation when I do cut and paste
of the original code
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 343 PM
What kind of problem are you having using this library Strict mode JavaScript which doesnt try to access the
DOM Window or other client side specific objects should work in Server Side XSJS Generally if you have a
library you just cut and paste into your XSJS or an XSJSLIB file and then call the functions from your code
Milan VrozinaJul 21 2013 339 PM
Hello
first and foremost thank you for perfect openSAP classes related to HANA development and for this blog as
well
I have one question related to server-side javascript You mentioned in course that is possible to use 3rd party
libraries or reuse 3rd party code But I cant find a possible way how to import 3rd party javascript library -as
is- to server and use it For example I would like to use JSZip library to zip some file before sending it to client
from xsjs application Is that possible Thank you
Chandrashekhar MahajanJul 3 2013 734 PM
This is excellent blog Now HANA XS is very much clear to me
Mohan krishnaJul 1 2013 144 PM
WOW - great blog Thomas This will be very helpful in understanding SAP hana Good Job
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010050
Abdul Hakim in response to Thomas Jung on page 50Jun 27 2013 833 PM
Thanks for the clarification
Thomas Jung in response to Abdul Hakim on page 50Jun 27 2013 659 PM
HANA Extended Application Services uses SQLScript and JavaScript as its two primary programming
languages
gtwhether the current SAP Business suite based on ABAP will be completely migrated to HANA service
No The Business Suite already runs on HANA but still via the ABAP application server It will continue to
leverage HANA via a combination of enhancements to ABAP and utilizing some of the technologies described
in this blog
gtAlso whether ABAP can be used to built application in HANA extended services
No There is no ABAP language container in HANA Extended Application Services
Abdul HakimJun 27 2013 405 PM
Hi Thomas - What is the programming language used for HANA Extended application services
As HANA is more than a database ie application platform by itself and as you mentioned that more and more
applications will be built on HANA i have question as how the future SAP ERP system looks likewhether the
current SAP Business suite based on ABAP will be completely migrated to HANA service in the future or SAP
ABAP server will continue to evolve and receive focus investment from SAP Also whether ABAP can be used
to built application in HANA extended services Your thoughts
Thanks
Abdul Hakim
Thomas Jung in response to Ravindra Channe on page 50Jun 11 2013 830 PM
Yes it is still planned However we are still a couple of weeks away and Ive not seen the final installers to say
for certain its there
Ravindra ChanneJun 11 2013 815 PM
Hi Thomas
Thanks for a wonderful and very informative blog Is there any update on 32 bit REGI file
Is it expected along with SPS6
Regards
Ravi
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010051
Thomas Jung in response to Amanda Rzepka on page Jun 7 2013 942 PM
gtCan the XS Services be used in a BW on HANA Scenario
Yes XS is part of ALL HANA systems You should check and make sure you are licensed for direct access to
the underlying HANA instance however
Thomas Jung in response to Holger Schimanski on page Jun 7 2013 941 PM
gtIs there a similar library which could be used in XS Engine
The XSODATA development object is similar We also have higher level frameworks for XMLA and Search
Services (InA) You can expect more such high level frameworks to be added to the HANA Extended
Application Services in the future
Thomas Jung in response to Manav Mehra on page Jun 7 2013 939 PM
Have you used something like the Chrome developer tools to see see if you are getting any client side
javascript errors or to see if the request to your xsodata service is successful
Thomas Jung in response to Christian Hufnagl on page 52Jun 7 2013 938 PM
It will ship as non-automatic content in SPS6 (all systems will have it and it just needs to be imported) The
delivery units are also part of this weeks updates to the Cloudshare and AWS developer center images They
are also available for download as part of the content of the openSAP course
Thomas Jung in response to Matthew Pickell on page 51Jun 7 2013 937 PM
CORS support will come with SPS6 at the end of June
Thomas Jung in response to Jeroen Custers on page 51Jun 7 2013 936 PM
gtWill this bug be fixed in HANA ver 56
Personally Ive still experienced this bug in SPS6 internal builds Must be a tricky one to find Luckily the
workaround of closing and reopening isnt too difficult Just annoying This also probably makes the bug low
priority
Jeroen Custers in response to Vivek Singh Bhoj on page 52Jun 7 2013 411 PM
This issue also occurs on rev56
Matthew PickellJun 7 2013 258 PM
Thomas
Has CORS been included in a release yet
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010052
Vivek Singh Bhoj in response to Chandra Edem on page 52Jun 5 2013 601 AM
Hi Chandra
Date for Week1 Assignment has been extended till June 11
So you can give Week 1 Assignment now
Christian HufnaglJun 4 2013 543 PM
Hi Thomas
thank you for the interesting tutorial
Can you tell me whether it is possible to download the source code of the ldquoPutting it all togetherrdquovideo And if yes Where can I download itThanks
Christoph
Vivek Singh BhojJun 4 2013 1116 AM
Hi Thomas
Thanks for OpenSAP classes
Your Youtube Account also have very good exercises
IN OpenSAP Week 2 Unit 3 tutorial after assigning admin role to my user Id i am not able to see sequences
synonyms triggers under my schema or any other schema i am only able to see Column Views Procedures
Tables and Views
Though now i am able to insert data into my created table
Can you let me know how i will be able to see Sequences under my schema without removing the admin role
I am using HANA revision 52
Got to know from OpenSAP that
This is a known issue and the only way that Ive seen to fix it is to actually close the studio and open it again
then refresh the node
Cheers
Rich Heilman
SAP HANA Product Management
Will this bug be fixed in HANA ver 56
Chandra Edem in response to Thomas Jung on page 53Jun 4 2013 646 AM
Thomas
I registered for OpenSAP course Introduction to Software Development on SAP HANA on June 2 900PM
I didnt know that it is going to end WEEK1 assignment test on 632013 300PM Is there any way can take
that WEEK1 Assignment Test
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010053
Thanks
Chandra
Thomas Jung in response to Alexander Bauer on page Jun 3 2013 856 PM
SAPUI5 gets updated auutomatically when you apply HANA revisions There is no additional download or
update needed
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010040
My Button for this looks like
ltcodegt
var oButton3 = new sapuicommonsButton(
text Save to Excel
icon imagessave_buttonjpg
lite true
press function() alert(oButton3getText())
downloadExcel()
ltcodegt
and the function for this action looks like
ltcodegt
function downloadExcel()
var body =
alert(drin)
print($query)
var query = SELECT CompanyName PartnerId PostalCode City PurchaseOrderId
LifecycleStatus GrossAmount TaxAmount CM_NET_Amount_001 Currency FROM
_SYS_BICWorkshop_001PG1_BL_TIANGE1CA_TBN_001 order by PurchaseOrderId
var conn = $dbgetConnection()
var pstmt = connprepareStatement(query)
var rs = pstmtexecuteQuery()
body =
tCompanyName tPartnerId tPostalCode tCity tPurchase Order Id tLifecycle Status tGross Amount tTax
Amount tNetto Amount tCurrency n
while(rsnext())
if(rsnext() == )
alert($responsesetBody( Failed to retrieve data ))
alert($responsestatus = $nethttpINTERNAL_SERVER_ERROR)
else
body += rsgetString(1)+
t+rsgetString(2)+t+rsgetString(3)+t+rsgetString(4)+t+rsgetString(5)+t+rsgetString(6)+t+rsgetDecimal(7)+t+rsgetDecimal(8)+t+rsgetDecimal(9)+t+rsgetString(10)+n
$responsesetBody(body)
$responsecontentType = applicationvndms-excel charset=utf-16le
$responseheadersset(Content-Dispositionattachment filename=Excelxls)
$responseheadersset(access-control-allow-origin)
$responsestatus = $nethttpOK
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010041
ltcodegt
Iacutem afraid and hope that you can help me
Kind regards
Andreacute
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1246 PM
gtIs there any restriction or development limitation in the XSJSLIB files
Thats a very general question Difficult to answer without any context
Vikas Madaan in response to Thomas Jung on page 41Feb 11 2014 1245 PM
Thanks Thomas
I think we are on same page
Once quick question that came to my mind Is there any restriction or development limitation in the XSJSLIB
files
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1230 PM
gtCould please help me in understanding in more advantagesdisadvantages for both techniques
Youve summarized it pretty well already
gtbecuase i dont want to use both the approaches
Even with the CRUD support and exits in XSODATA its still pretty hard to do 100 via XSODATA There are
still valid use cases for XSJS when you need custom body custom read processing job scheduling etc Its
good to try and use XSODATA whenever possible but I wouldnt automatically exclude the use of XSJS
Vikas MadaanFeb 11 2014 1008 AM
Hi Thomas
Thanks a lot for sharing useful information through various blogs
In my current project we are evaluating use of XSOData or XSJS applications I saw your videos like the one
mentioned below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010042
httpwwwsaphanacomdocsDOC-4376
Want i understood from various blog is this
From SP7 we can write exsits in the OData services and it is very easy to consume at the client side just like
any REST base service and from my understanding it is Scalable as well I would love to use XSOData always
becuase development effort is very less compare to XSJS and it is very easy to rampup the team on OData
related development objects
XSJS were as provide more control becuase of server side scripting becuase it allows development on the
server side using JavaScript Core APIs of SAP HANA Extended Application Services are therefore exposed
as JavaScript functions providing easy access to the HTTP Request and Response object as well database
access to execute SQL or call SQLScript Procedures It provide us control over the body format and and URL
parameter definition
Could please help me in understanding in more advantagesdisadvantages for both techniques
I am very keen to understand and also explain the same to team members becuase i dont want to use both the
approaches and even sometimes customer can also ask the same to us
Also If we are on SP6 then from my understanding XSJS provides us more capability in terms of complex
application Corrent me If i am wrong
Thanks
Regards
Vikas Madaan
Thomas Jung in response to Raghuveer Phull on page 42Feb 5 2014 312 PM
Yes there are videos on the CRUD features of XSODATA which were new in SP6
For more on CRUD support in SP6 see this video
oData CreateUpdateDelete Support in SAP HANA SPS6
For the extended support for XSJS exits in SP7 see this video
SAP HANA SPS 07 XSODATA Exits in XSJS
Raghuveer PhullFeb 5 2014 122 AM
Do you have an exampledocumentationvideo where you can write a service which will populate Hana DB
What I am asking for is a way for my external script to populate the DB tables i have created in Hana DB
Thomas Jung in response to reda miraoui on page 43Jan 29 2014 411 PM
The source code for the examples shown here are shipped as part of SHINE (SAP HANA Interactive
Education)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010043
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Vivek Singh Bhoj in response to reda miraoui on page 43Jan 29 2014 352 PM
Hi Reda
You can import Shine Content in HANA and then check all these source codes
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Regards
Vivek
reda miraoui in response to Thomas Jung on page Jan 29 2014 344 PM
Hey Thomas
Is it possible to download source code of your project from this HANA tutorial
Thanks
Reda
Thomas Jung in response to Abdul Hakim on page 43Nov 21 2013 1133 PM
Yes River can be used as an alternative and when activated it will generate Server Side JavaScript andor
SQLScript
Abdul Hakim in response to Thomas Jung on page 44Nov 21 2013 747 PM
Hi Thomas - Was going through blog regarding River (RDL)Just a question on this
When you say Programming language for HANA native development is Server side Javascript SQL SQL
ScriptOnce RDL is rolled out whether RDL can be used for native application development instead of Server
side Java script SQL SQL Script I am very much new to this stuff so appreciate if you can also help on
how to get started with Server Side Java script SQL SQL Script for HANA
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 30 2013 750 AM
Hi Thomas
Thanks for your response I am talking about more content on shine
thanks
Ashutosh
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010044
Baskar Gopalakrishnan in response to Thomas Jung on page 44Oct 30 2013 1249 AM
Hi Thomas
Im a SAP PI Middleware consultantSAP topic leader in XIPI heavily worked on Java related
Netweaver stack I have knowledge in ABAP but not worked heavily in abap I have enrolled your sap hana
native application development course I feel very interesting I did work heavily in java and javascript projects
using eclipse development tool Do you think if I invest my time in just native hana development and proceed
in HANA field is a good step I dont have BW experience either
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 819 PM
Thanks for the clarification Much appreciated
Thomas Jung in response to Abdul Hakim on page 44Oct 29 2013 120 PM
gtABAP Close to HANA means whether we can expect a similar 2 tier architecture similar to HANA XS in the
future or what does that mean
No it doesnt mean that ABAP will become a 2 tier architecture We will not move the ABAP VMKernel into
HANA itself It will remain a separate application server At least for the current plansforeseeable future What
he was referring to was bringing the programming models closer For instance the new 740 SP5 feature that
allows you to write SQLScript directly within an ABAP class method
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 650 AM
Thomas - Thanks for the clarificationMuch appreciatedI was listening to ABAP on HANA session by
Thorsten Schneider this year Teched and he was mentioning that SAP Plans to bring ABAP very close to
HANA in the coming future but not much details have been discussed in the sessionABAP Close to HANA
means whether we can expect a similar 2 tier architecture similar to HANA XS in the future or what does that
mean
Thanks
Hakim
Thomas Jung in response to Abdul Hakim on page 45Oct 28 2013 703 PM
gt whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the option is
recommended by SAP then kindly share the pros and cons of each of the item
Taken from the TechEd CD103 session slides
Guidance
bulluse ABAP for optimization of existing progams (in context of SAP Business Suite or BW)
bullconsider HANA Native Development for development of new applications which will solely run on SAP HANA
bullcombine ABAP and HANA Native Development to enrich existing applications (eg SAP HANA Live Fiori)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010045
ABAP
bullapplications follow 3-tier architecture
bullABAP is in general database agnostic but with release 74 optimized for SAP HANA
bullProgramming language ABAP ABAP OO with the option to use SAP HANA features
bullIDE eclipse-based ABAP Development Tools
HANA Native Development
bullapplications follow 2-tier architecture
bullHANA Native Development is SAP HANA specific and embedded in the database
bullProgramming language River server-side JavaScript SQLSQLScript
bullIDE eclipse-based SAP HANA Studio + web IDE
Thomas Jung in response to ashutosh dixit on page 45Oct 28 2013 701 PM
gtIs there any more demos for the SHINE
Im not exactly sure what you mean by that We are building additional content for SHINE that will be delivered
in SP7
Abdul HakimOct 28 2013 326 PM
Thomas - Let us say a customer is running SAP Netweaver 74 ABAP with HANA DB and they have HANA
extended service as wellIf the customer wants to do new developments then what is the recommendation
from SAP ie whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the
option is recommended by SAP then kindly share the pros and cons of each of the item (SAP Netweaver 74
ABAP Vs SAP HANA XS)
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 28 2013 221 PM
Hi Thomas
Thanks a lot for your its working now
Is there any more demos for the SHINE
Thanks
Ashutosh
Thomas Jung in response to ashutosh dixit on page 46Oct 25 2013 809 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010046
As this content is now standard in SP6 as part of SHINE (SAP HANA INteractive Education) there also some
setup instructions on helpsapcom
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Basic points to check - have you generated the synonyms in the data generator Ran the data generator to
create some data Have the role assigned Added client 001 to your user profile
ashutosh dixitOct 24 2013 130 PM
Hi Thomas
Amazing blog - once again Thomas thanks
I have been following you for many days attended your OPEN SAP course also
That was an amazing course for new learner like me
One of our client is looking forward for XS based search Application identical to what you have created in your
DEMO
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010047
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010048
But I am not able to fetch the data on blank HTML page is coming with no data
If there is any step by step document related to this please help in getting that
Any help will be highly appreciated
Thanks
Ashutosh
Naveen KumarSep 26 2013 1130 AM
Good Document
Heber FabianoAug 27 2013 323 PM
Great content as always Keep sharing with us
Thomas Jung in response to Orel Stringa on page 48Aug 27 2013 147 PM
This is currently not possible The CORS support is for all origins We dont yet have the feature to maintain a
whitelist of CORS origins
Orel Stringa in response to Thomas Jung on page Aug 27 2013 801 AM
Hi Thomas
nice to see that SAP has made it possible with SP6 to specify cross origin resource sharing (CORS) support
via the xsaccess file SP6 HANA development guide has example of how to specify CORS support
I have build an XS application and would like to serve SAPUI5 on a diffhost than XSHANA
How can I specify that I would like to allow cross origin access restricted to certain domain(s) only
Is there a special keyword syntax for specifying that
Thank yoi
Orel
Vijay UthayakumarAug 27 2013 131 AM
Highly informative amp digestible Fantastic work
Jerry WangAug 1 2013 955 AM
Hi Tomas
Thank you
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010049
Jerry
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 644 PM
JSLint checks are very strict and often produce syntax errors for items that just stylistic and wont actually
cause an error upon activation or runtime You can either ignore the JSLint errors or deactivate JSLint for this
project in these cases However it might also be an indication that the JavaScript code you are trying to import
isnt compatible with Strict mode
httpsdevelopermozillaorgen-USdocsWebJavaScriptReferenceFunctions_and_function_scope
Strict_mode
Milan Vrozina in response to Thomas Jung on page 49Jul 21 2013 624 PM
Thanks for clarification I thought there would be some kind of import
But anyway in case of this specific library I have some problems with JSLint validation when I do cut and paste
of the original code
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 343 PM
What kind of problem are you having using this library Strict mode JavaScript which doesnt try to access the
DOM Window or other client side specific objects should work in Server Side XSJS Generally if you have a
library you just cut and paste into your XSJS or an XSJSLIB file and then call the functions from your code
Milan VrozinaJul 21 2013 339 PM
Hello
first and foremost thank you for perfect openSAP classes related to HANA development and for this blog as
well
I have one question related to server-side javascript You mentioned in course that is possible to use 3rd party
libraries or reuse 3rd party code But I cant find a possible way how to import 3rd party javascript library -as
is- to server and use it For example I would like to use JSZip library to zip some file before sending it to client
from xsjs application Is that possible Thank you
Chandrashekhar MahajanJul 3 2013 734 PM
This is excellent blog Now HANA XS is very much clear to me
Mohan krishnaJul 1 2013 144 PM
WOW - great blog Thomas This will be very helpful in understanding SAP hana Good Job
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010050
Abdul Hakim in response to Thomas Jung on page 50Jun 27 2013 833 PM
Thanks for the clarification
Thomas Jung in response to Abdul Hakim on page 50Jun 27 2013 659 PM
HANA Extended Application Services uses SQLScript and JavaScript as its two primary programming
languages
gtwhether the current SAP Business suite based on ABAP will be completely migrated to HANA service
No The Business Suite already runs on HANA but still via the ABAP application server It will continue to
leverage HANA via a combination of enhancements to ABAP and utilizing some of the technologies described
in this blog
gtAlso whether ABAP can be used to built application in HANA extended services
No There is no ABAP language container in HANA Extended Application Services
Abdul HakimJun 27 2013 405 PM
Hi Thomas - What is the programming language used for HANA Extended application services
As HANA is more than a database ie application platform by itself and as you mentioned that more and more
applications will be built on HANA i have question as how the future SAP ERP system looks likewhether the
current SAP Business suite based on ABAP will be completely migrated to HANA service in the future or SAP
ABAP server will continue to evolve and receive focus investment from SAP Also whether ABAP can be used
to built application in HANA extended services Your thoughts
Thanks
Abdul Hakim
Thomas Jung in response to Ravindra Channe on page 50Jun 11 2013 830 PM
Yes it is still planned However we are still a couple of weeks away and Ive not seen the final installers to say
for certain its there
Ravindra ChanneJun 11 2013 815 PM
Hi Thomas
Thanks for a wonderful and very informative blog Is there any update on 32 bit REGI file
Is it expected along with SPS6
Regards
Ravi
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010051
Thomas Jung in response to Amanda Rzepka on page Jun 7 2013 942 PM
gtCan the XS Services be used in a BW on HANA Scenario
Yes XS is part of ALL HANA systems You should check and make sure you are licensed for direct access to
the underlying HANA instance however
Thomas Jung in response to Holger Schimanski on page Jun 7 2013 941 PM
gtIs there a similar library which could be used in XS Engine
The XSODATA development object is similar We also have higher level frameworks for XMLA and Search
Services (InA) You can expect more such high level frameworks to be added to the HANA Extended
Application Services in the future
Thomas Jung in response to Manav Mehra on page Jun 7 2013 939 PM
Have you used something like the Chrome developer tools to see see if you are getting any client side
javascript errors or to see if the request to your xsodata service is successful
Thomas Jung in response to Christian Hufnagl on page 52Jun 7 2013 938 PM
It will ship as non-automatic content in SPS6 (all systems will have it and it just needs to be imported) The
delivery units are also part of this weeks updates to the Cloudshare and AWS developer center images They
are also available for download as part of the content of the openSAP course
Thomas Jung in response to Matthew Pickell on page 51Jun 7 2013 937 PM
CORS support will come with SPS6 at the end of June
Thomas Jung in response to Jeroen Custers on page 51Jun 7 2013 936 PM
gtWill this bug be fixed in HANA ver 56
Personally Ive still experienced this bug in SPS6 internal builds Must be a tricky one to find Luckily the
workaround of closing and reopening isnt too difficult Just annoying This also probably makes the bug low
priority
Jeroen Custers in response to Vivek Singh Bhoj on page 52Jun 7 2013 411 PM
This issue also occurs on rev56
Matthew PickellJun 7 2013 258 PM
Thomas
Has CORS been included in a release yet
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010052
Vivek Singh Bhoj in response to Chandra Edem on page 52Jun 5 2013 601 AM
Hi Chandra
Date for Week1 Assignment has been extended till June 11
So you can give Week 1 Assignment now
Christian HufnaglJun 4 2013 543 PM
Hi Thomas
thank you for the interesting tutorial
Can you tell me whether it is possible to download the source code of the ldquoPutting it all togetherrdquovideo And if yes Where can I download itThanks
Christoph
Vivek Singh BhojJun 4 2013 1116 AM
Hi Thomas
Thanks for OpenSAP classes
Your Youtube Account also have very good exercises
IN OpenSAP Week 2 Unit 3 tutorial after assigning admin role to my user Id i am not able to see sequences
synonyms triggers under my schema or any other schema i am only able to see Column Views Procedures
Tables and Views
Though now i am able to insert data into my created table
Can you let me know how i will be able to see Sequences under my schema without removing the admin role
I am using HANA revision 52
Got to know from OpenSAP that
This is a known issue and the only way that Ive seen to fix it is to actually close the studio and open it again
then refresh the node
Cheers
Rich Heilman
SAP HANA Product Management
Will this bug be fixed in HANA ver 56
Chandra Edem in response to Thomas Jung on page 53Jun 4 2013 646 AM
Thomas
I registered for OpenSAP course Introduction to Software Development on SAP HANA on June 2 900PM
I didnt know that it is going to end WEEK1 assignment test on 632013 300PM Is there any way can take
that WEEK1 Assignment Test
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010053
Thanks
Chandra
Thomas Jung in response to Alexander Bauer on page Jun 3 2013 856 PM
SAPUI5 gets updated auutomatically when you apply HANA revisions There is no additional download or
update needed
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010041
ltcodegt
Iacutem afraid and hope that you can help me
Kind regards
Andreacute
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1246 PM
gtIs there any restriction or development limitation in the XSJSLIB files
Thats a very general question Difficult to answer without any context
Vikas Madaan in response to Thomas Jung on page 41Feb 11 2014 1245 PM
Thanks Thomas
I think we are on same page
Once quick question that came to my mind Is there any restriction or development limitation in the XSJSLIB
files
Regards
Vikas Madaan
Thomas Jung in response to Vikas Madaan on page 41Feb 11 2014 1230 PM
gtCould please help me in understanding in more advantagesdisadvantages for both techniques
Youve summarized it pretty well already
gtbecuase i dont want to use both the approaches
Even with the CRUD support and exits in XSODATA its still pretty hard to do 100 via XSODATA There are
still valid use cases for XSJS when you need custom body custom read processing job scheduling etc Its
good to try and use XSODATA whenever possible but I wouldnt automatically exclude the use of XSJS
Vikas MadaanFeb 11 2014 1008 AM
Hi Thomas
Thanks a lot for sharing useful information through various blogs
In my current project we are evaluating use of XSOData or XSJS applications I saw your videos like the one
mentioned below
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010042
httpwwwsaphanacomdocsDOC-4376
Want i understood from various blog is this
From SP7 we can write exsits in the OData services and it is very easy to consume at the client side just like
any REST base service and from my understanding it is Scalable as well I would love to use XSOData always
becuase development effort is very less compare to XSJS and it is very easy to rampup the team on OData
related development objects
XSJS were as provide more control becuase of server side scripting becuase it allows development on the
server side using JavaScript Core APIs of SAP HANA Extended Application Services are therefore exposed
as JavaScript functions providing easy access to the HTTP Request and Response object as well database
access to execute SQL or call SQLScript Procedures It provide us control over the body format and and URL
parameter definition
Could please help me in understanding in more advantagesdisadvantages for both techniques
I am very keen to understand and also explain the same to team members becuase i dont want to use both the
approaches and even sometimes customer can also ask the same to us
Also If we are on SP6 then from my understanding XSJS provides us more capability in terms of complex
application Corrent me If i am wrong
Thanks
Regards
Vikas Madaan
Thomas Jung in response to Raghuveer Phull on page 42Feb 5 2014 312 PM
Yes there are videos on the CRUD features of XSODATA which were new in SP6
For more on CRUD support in SP6 see this video
oData CreateUpdateDelete Support in SAP HANA SPS6
For the extended support for XSJS exits in SP7 see this video
SAP HANA SPS 07 XSODATA Exits in XSJS
Raghuveer PhullFeb 5 2014 122 AM
Do you have an exampledocumentationvideo where you can write a service which will populate Hana DB
What I am asking for is a way for my external script to populate the DB tables i have created in Hana DB
Thomas Jung in response to reda miraoui on page 43Jan 29 2014 411 PM
The source code for the examples shown here are shipped as part of SHINE (SAP HANA Interactive
Education)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010043
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Vivek Singh Bhoj in response to reda miraoui on page 43Jan 29 2014 352 PM
Hi Reda
You can import Shine Content in HANA and then check all these source codes
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Regards
Vivek
reda miraoui in response to Thomas Jung on page Jan 29 2014 344 PM
Hey Thomas
Is it possible to download source code of your project from this HANA tutorial
Thanks
Reda
Thomas Jung in response to Abdul Hakim on page 43Nov 21 2013 1133 PM
Yes River can be used as an alternative and when activated it will generate Server Side JavaScript andor
SQLScript
Abdul Hakim in response to Thomas Jung on page 44Nov 21 2013 747 PM
Hi Thomas - Was going through blog regarding River (RDL)Just a question on this
When you say Programming language for HANA native development is Server side Javascript SQL SQL
ScriptOnce RDL is rolled out whether RDL can be used for native application development instead of Server
side Java script SQL SQL Script I am very much new to this stuff so appreciate if you can also help on
how to get started with Server Side Java script SQL SQL Script for HANA
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 30 2013 750 AM
Hi Thomas
Thanks for your response I am talking about more content on shine
thanks
Ashutosh
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010044
Baskar Gopalakrishnan in response to Thomas Jung on page 44Oct 30 2013 1249 AM
Hi Thomas
Im a SAP PI Middleware consultantSAP topic leader in XIPI heavily worked on Java related
Netweaver stack I have knowledge in ABAP but not worked heavily in abap I have enrolled your sap hana
native application development course I feel very interesting I did work heavily in java and javascript projects
using eclipse development tool Do you think if I invest my time in just native hana development and proceed
in HANA field is a good step I dont have BW experience either
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 819 PM
Thanks for the clarification Much appreciated
Thomas Jung in response to Abdul Hakim on page 44Oct 29 2013 120 PM
gtABAP Close to HANA means whether we can expect a similar 2 tier architecture similar to HANA XS in the
future or what does that mean
No it doesnt mean that ABAP will become a 2 tier architecture We will not move the ABAP VMKernel into
HANA itself It will remain a separate application server At least for the current plansforeseeable future What
he was referring to was bringing the programming models closer For instance the new 740 SP5 feature that
allows you to write SQLScript directly within an ABAP class method
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 650 AM
Thomas - Thanks for the clarificationMuch appreciatedI was listening to ABAP on HANA session by
Thorsten Schneider this year Teched and he was mentioning that SAP Plans to bring ABAP very close to
HANA in the coming future but not much details have been discussed in the sessionABAP Close to HANA
means whether we can expect a similar 2 tier architecture similar to HANA XS in the future or what does that
mean
Thanks
Hakim
Thomas Jung in response to Abdul Hakim on page 45Oct 28 2013 703 PM
gt whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the option is
recommended by SAP then kindly share the pros and cons of each of the item
Taken from the TechEd CD103 session slides
Guidance
bulluse ABAP for optimization of existing progams (in context of SAP Business Suite or BW)
bullconsider HANA Native Development for development of new applications which will solely run on SAP HANA
bullcombine ABAP and HANA Native Development to enrich existing applications (eg SAP HANA Live Fiori)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010045
ABAP
bullapplications follow 3-tier architecture
bullABAP is in general database agnostic but with release 74 optimized for SAP HANA
bullProgramming language ABAP ABAP OO with the option to use SAP HANA features
bullIDE eclipse-based ABAP Development Tools
HANA Native Development
bullapplications follow 2-tier architecture
bullHANA Native Development is SAP HANA specific and embedded in the database
bullProgramming language River server-side JavaScript SQLSQLScript
bullIDE eclipse-based SAP HANA Studio + web IDE
Thomas Jung in response to ashutosh dixit on page 45Oct 28 2013 701 PM
gtIs there any more demos for the SHINE
Im not exactly sure what you mean by that We are building additional content for SHINE that will be delivered
in SP7
Abdul HakimOct 28 2013 326 PM
Thomas - Let us say a customer is running SAP Netweaver 74 ABAP with HANA DB and they have HANA
extended service as wellIf the customer wants to do new developments then what is the recommendation
from SAP ie whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the
option is recommended by SAP then kindly share the pros and cons of each of the item (SAP Netweaver 74
ABAP Vs SAP HANA XS)
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 28 2013 221 PM
Hi Thomas
Thanks a lot for your its working now
Is there any more demos for the SHINE
Thanks
Ashutosh
Thomas Jung in response to ashutosh dixit on page 46Oct 25 2013 809 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010046
As this content is now standard in SP6 as part of SHINE (SAP HANA INteractive Education) there also some
setup instructions on helpsapcom
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Basic points to check - have you generated the synonyms in the data generator Ran the data generator to
create some data Have the role assigned Added client 001 to your user profile
ashutosh dixitOct 24 2013 130 PM
Hi Thomas
Amazing blog - once again Thomas thanks
I have been following you for many days attended your OPEN SAP course also
That was an amazing course for new learner like me
One of our client is looking forward for XS based search Application identical to what you have created in your
DEMO
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010047
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010048
But I am not able to fetch the data on blank HTML page is coming with no data
If there is any step by step document related to this please help in getting that
Any help will be highly appreciated
Thanks
Ashutosh
Naveen KumarSep 26 2013 1130 AM
Good Document
Heber FabianoAug 27 2013 323 PM
Great content as always Keep sharing with us
Thomas Jung in response to Orel Stringa on page 48Aug 27 2013 147 PM
This is currently not possible The CORS support is for all origins We dont yet have the feature to maintain a
whitelist of CORS origins
Orel Stringa in response to Thomas Jung on page Aug 27 2013 801 AM
Hi Thomas
nice to see that SAP has made it possible with SP6 to specify cross origin resource sharing (CORS) support
via the xsaccess file SP6 HANA development guide has example of how to specify CORS support
I have build an XS application and would like to serve SAPUI5 on a diffhost than XSHANA
How can I specify that I would like to allow cross origin access restricted to certain domain(s) only
Is there a special keyword syntax for specifying that
Thank yoi
Orel
Vijay UthayakumarAug 27 2013 131 AM
Highly informative amp digestible Fantastic work
Jerry WangAug 1 2013 955 AM
Hi Tomas
Thank you
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010049
Jerry
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 644 PM
JSLint checks are very strict and often produce syntax errors for items that just stylistic and wont actually
cause an error upon activation or runtime You can either ignore the JSLint errors or deactivate JSLint for this
project in these cases However it might also be an indication that the JavaScript code you are trying to import
isnt compatible with Strict mode
httpsdevelopermozillaorgen-USdocsWebJavaScriptReferenceFunctions_and_function_scope
Strict_mode
Milan Vrozina in response to Thomas Jung on page 49Jul 21 2013 624 PM
Thanks for clarification I thought there would be some kind of import
But anyway in case of this specific library I have some problems with JSLint validation when I do cut and paste
of the original code
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 343 PM
What kind of problem are you having using this library Strict mode JavaScript which doesnt try to access the
DOM Window or other client side specific objects should work in Server Side XSJS Generally if you have a
library you just cut and paste into your XSJS or an XSJSLIB file and then call the functions from your code
Milan VrozinaJul 21 2013 339 PM
Hello
first and foremost thank you for perfect openSAP classes related to HANA development and for this blog as
well
I have one question related to server-side javascript You mentioned in course that is possible to use 3rd party
libraries or reuse 3rd party code But I cant find a possible way how to import 3rd party javascript library -as
is- to server and use it For example I would like to use JSZip library to zip some file before sending it to client
from xsjs application Is that possible Thank you
Chandrashekhar MahajanJul 3 2013 734 PM
This is excellent blog Now HANA XS is very much clear to me
Mohan krishnaJul 1 2013 144 PM
WOW - great blog Thomas This will be very helpful in understanding SAP hana Good Job
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010050
Abdul Hakim in response to Thomas Jung on page 50Jun 27 2013 833 PM
Thanks for the clarification
Thomas Jung in response to Abdul Hakim on page 50Jun 27 2013 659 PM
HANA Extended Application Services uses SQLScript and JavaScript as its two primary programming
languages
gtwhether the current SAP Business suite based on ABAP will be completely migrated to HANA service
No The Business Suite already runs on HANA but still via the ABAP application server It will continue to
leverage HANA via a combination of enhancements to ABAP and utilizing some of the technologies described
in this blog
gtAlso whether ABAP can be used to built application in HANA extended services
No There is no ABAP language container in HANA Extended Application Services
Abdul HakimJun 27 2013 405 PM
Hi Thomas - What is the programming language used for HANA Extended application services
As HANA is more than a database ie application platform by itself and as you mentioned that more and more
applications will be built on HANA i have question as how the future SAP ERP system looks likewhether the
current SAP Business suite based on ABAP will be completely migrated to HANA service in the future or SAP
ABAP server will continue to evolve and receive focus investment from SAP Also whether ABAP can be used
to built application in HANA extended services Your thoughts
Thanks
Abdul Hakim
Thomas Jung in response to Ravindra Channe on page 50Jun 11 2013 830 PM
Yes it is still planned However we are still a couple of weeks away and Ive not seen the final installers to say
for certain its there
Ravindra ChanneJun 11 2013 815 PM
Hi Thomas
Thanks for a wonderful and very informative blog Is there any update on 32 bit REGI file
Is it expected along with SPS6
Regards
Ravi
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010051
Thomas Jung in response to Amanda Rzepka on page Jun 7 2013 942 PM
gtCan the XS Services be used in a BW on HANA Scenario
Yes XS is part of ALL HANA systems You should check and make sure you are licensed for direct access to
the underlying HANA instance however
Thomas Jung in response to Holger Schimanski on page Jun 7 2013 941 PM
gtIs there a similar library which could be used in XS Engine
The XSODATA development object is similar We also have higher level frameworks for XMLA and Search
Services (InA) You can expect more such high level frameworks to be added to the HANA Extended
Application Services in the future
Thomas Jung in response to Manav Mehra on page Jun 7 2013 939 PM
Have you used something like the Chrome developer tools to see see if you are getting any client side
javascript errors or to see if the request to your xsodata service is successful
Thomas Jung in response to Christian Hufnagl on page 52Jun 7 2013 938 PM
It will ship as non-automatic content in SPS6 (all systems will have it and it just needs to be imported) The
delivery units are also part of this weeks updates to the Cloudshare and AWS developer center images They
are also available for download as part of the content of the openSAP course
Thomas Jung in response to Matthew Pickell on page 51Jun 7 2013 937 PM
CORS support will come with SPS6 at the end of June
Thomas Jung in response to Jeroen Custers on page 51Jun 7 2013 936 PM
gtWill this bug be fixed in HANA ver 56
Personally Ive still experienced this bug in SPS6 internal builds Must be a tricky one to find Luckily the
workaround of closing and reopening isnt too difficult Just annoying This also probably makes the bug low
priority
Jeroen Custers in response to Vivek Singh Bhoj on page 52Jun 7 2013 411 PM
This issue also occurs on rev56
Matthew PickellJun 7 2013 258 PM
Thomas
Has CORS been included in a release yet
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010052
Vivek Singh Bhoj in response to Chandra Edem on page 52Jun 5 2013 601 AM
Hi Chandra
Date for Week1 Assignment has been extended till June 11
So you can give Week 1 Assignment now
Christian HufnaglJun 4 2013 543 PM
Hi Thomas
thank you for the interesting tutorial
Can you tell me whether it is possible to download the source code of the ldquoPutting it all togetherrdquovideo And if yes Where can I download itThanks
Christoph
Vivek Singh BhojJun 4 2013 1116 AM
Hi Thomas
Thanks for OpenSAP classes
Your Youtube Account also have very good exercises
IN OpenSAP Week 2 Unit 3 tutorial after assigning admin role to my user Id i am not able to see sequences
synonyms triggers under my schema or any other schema i am only able to see Column Views Procedures
Tables and Views
Though now i am able to insert data into my created table
Can you let me know how i will be able to see Sequences under my schema without removing the admin role
I am using HANA revision 52
Got to know from OpenSAP that
This is a known issue and the only way that Ive seen to fix it is to actually close the studio and open it again
then refresh the node
Cheers
Rich Heilman
SAP HANA Product Management
Will this bug be fixed in HANA ver 56
Chandra Edem in response to Thomas Jung on page 53Jun 4 2013 646 AM
Thomas
I registered for OpenSAP course Introduction to Software Development on SAP HANA on June 2 900PM
I didnt know that it is going to end WEEK1 assignment test on 632013 300PM Is there any way can take
that WEEK1 Assignment Test
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010053
Thanks
Chandra
Thomas Jung in response to Alexander Bauer on page Jun 3 2013 856 PM
SAPUI5 gets updated auutomatically when you apply HANA revisions There is no additional download or
update needed
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010042
httpwwwsaphanacomdocsDOC-4376
Want i understood from various blog is this
From SP7 we can write exsits in the OData services and it is very easy to consume at the client side just like
any REST base service and from my understanding it is Scalable as well I would love to use XSOData always
becuase development effort is very less compare to XSJS and it is very easy to rampup the team on OData
related development objects
XSJS were as provide more control becuase of server side scripting becuase it allows development on the
server side using JavaScript Core APIs of SAP HANA Extended Application Services are therefore exposed
as JavaScript functions providing easy access to the HTTP Request and Response object as well database
access to execute SQL or call SQLScript Procedures It provide us control over the body format and and URL
parameter definition
Could please help me in understanding in more advantagesdisadvantages for both techniques
I am very keen to understand and also explain the same to team members becuase i dont want to use both the
approaches and even sometimes customer can also ask the same to us
Also If we are on SP6 then from my understanding XSJS provides us more capability in terms of complex
application Corrent me If i am wrong
Thanks
Regards
Vikas Madaan
Thomas Jung in response to Raghuveer Phull on page 42Feb 5 2014 312 PM
Yes there are videos on the CRUD features of XSODATA which were new in SP6
For more on CRUD support in SP6 see this video
oData CreateUpdateDelete Support in SAP HANA SPS6
For the extended support for XSJS exits in SP7 see this video
SAP HANA SPS 07 XSODATA Exits in XSJS
Raghuveer PhullFeb 5 2014 122 AM
Do you have an exampledocumentationvideo where you can write a service which will populate Hana DB
What I am asking for is a way for my external script to populate the DB tables i have created in Hana DB
Thomas Jung in response to reda miraoui on page 43Jan 29 2014 411 PM
The source code for the examples shown here are shipped as part of SHINE (SAP HANA Interactive
Education)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010043
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Vivek Singh Bhoj in response to reda miraoui on page 43Jan 29 2014 352 PM
Hi Reda
You can import Shine Content in HANA and then check all these source codes
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Regards
Vivek
reda miraoui in response to Thomas Jung on page Jan 29 2014 344 PM
Hey Thomas
Is it possible to download source code of your project from this HANA tutorial
Thanks
Reda
Thomas Jung in response to Abdul Hakim on page 43Nov 21 2013 1133 PM
Yes River can be used as an alternative and when activated it will generate Server Side JavaScript andor
SQLScript
Abdul Hakim in response to Thomas Jung on page 44Nov 21 2013 747 PM
Hi Thomas - Was going through blog regarding River (RDL)Just a question on this
When you say Programming language for HANA native development is Server side Javascript SQL SQL
ScriptOnce RDL is rolled out whether RDL can be used for native application development instead of Server
side Java script SQL SQL Script I am very much new to this stuff so appreciate if you can also help on
how to get started with Server Side Java script SQL SQL Script for HANA
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 30 2013 750 AM
Hi Thomas
Thanks for your response I am talking about more content on shine
thanks
Ashutosh
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010044
Baskar Gopalakrishnan in response to Thomas Jung on page 44Oct 30 2013 1249 AM
Hi Thomas
Im a SAP PI Middleware consultantSAP topic leader in XIPI heavily worked on Java related
Netweaver stack I have knowledge in ABAP but not worked heavily in abap I have enrolled your sap hana
native application development course I feel very interesting I did work heavily in java and javascript projects
using eclipse development tool Do you think if I invest my time in just native hana development and proceed
in HANA field is a good step I dont have BW experience either
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 819 PM
Thanks for the clarification Much appreciated
Thomas Jung in response to Abdul Hakim on page 44Oct 29 2013 120 PM
gtABAP Close to HANA means whether we can expect a similar 2 tier architecture similar to HANA XS in the
future or what does that mean
No it doesnt mean that ABAP will become a 2 tier architecture We will not move the ABAP VMKernel into
HANA itself It will remain a separate application server At least for the current plansforeseeable future What
he was referring to was bringing the programming models closer For instance the new 740 SP5 feature that
allows you to write SQLScript directly within an ABAP class method
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 650 AM
Thomas - Thanks for the clarificationMuch appreciatedI was listening to ABAP on HANA session by
Thorsten Schneider this year Teched and he was mentioning that SAP Plans to bring ABAP very close to
HANA in the coming future but not much details have been discussed in the sessionABAP Close to HANA
means whether we can expect a similar 2 tier architecture similar to HANA XS in the future or what does that
mean
Thanks
Hakim
Thomas Jung in response to Abdul Hakim on page 45Oct 28 2013 703 PM
gt whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the option is
recommended by SAP then kindly share the pros and cons of each of the item
Taken from the TechEd CD103 session slides
Guidance
bulluse ABAP for optimization of existing progams (in context of SAP Business Suite or BW)
bullconsider HANA Native Development for development of new applications which will solely run on SAP HANA
bullcombine ABAP and HANA Native Development to enrich existing applications (eg SAP HANA Live Fiori)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010045
ABAP
bullapplications follow 3-tier architecture
bullABAP is in general database agnostic but with release 74 optimized for SAP HANA
bullProgramming language ABAP ABAP OO with the option to use SAP HANA features
bullIDE eclipse-based ABAP Development Tools
HANA Native Development
bullapplications follow 2-tier architecture
bullHANA Native Development is SAP HANA specific and embedded in the database
bullProgramming language River server-side JavaScript SQLSQLScript
bullIDE eclipse-based SAP HANA Studio + web IDE
Thomas Jung in response to ashutosh dixit on page 45Oct 28 2013 701 PM
gtIs there any more demos for the SHINE
Im not exactly sure what you mean by that We are building additional content for SHINE that will be delivered
in SP7
Abdul HakimOct 28 2013 326 PM
Thomas - Let us say a customer is running SAP Netweaver 74 ABAP with HANA DB and they have HANA
extended service as wellIf the customer wants to do new developments then what is the recommendation
from SAP ie whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the
option is recommended by SAP then kindly share the pros and cons of each of the item (SAP Netweaver 74
ABAP Vs SAP HANA XS)
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 28 2013 221 PM
Hi Thomas
Thanks a lot for your its working now
Is there any more demos for the SHINE
Thanks
Ashutosh
Thomas Jung in response to ashutosh dixit on page 46Oct 25 2013 809 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010046
As this content is now standard in SP6 as part of SHINE (SAP HANA INteractive Education) there also some
setup instructions on helpsapcom
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Basic points to check - have you generated the synonyms in the data generator Ran the data generator to
create some data Have the role assigned Added client 001 to your user profile
ashutosh dixitOct 24 2013 130 PM
Hi Thomas
Amazing blog - once again Thomas thanks
I have been following you for many days attended your OPEN SAP course also
That was an amazing course for new learner like me
One of our client is looking forward for XS based search Application identical to what you have created in your
DEMO
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010047
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010048
But I am not able to fetch the data on blank HTML page is coming with no data
If there is any step by step document related to this please help in getting that
Any help will be highly appreciated
Thanks
Ashutosh
Naveen KumarSep 26 2013 1130 AM
Good Document
Heber FabianoAug 27 2013 323 PM
Great content as always Keep sharing with us
Thomas Jung in response to Orel Stringa on page 48Aug 27 2013 147 PM
This is currently not possible The CORS support is for all origins We dont yet have the feature to maintain a
whitelist of CORS origins
Orel Stringa in response to Thomas Jung on page Aug 27 2013 801 AM
Hi Thomas
nice to see that SAP has made it possible with SP6 to specify cross origin resource sharing (CORS) support
via the xsaccess file SP6 HANA development guide has example of how to specify CORS support
I have build an XS application and would like to serve SAPUI5 on a diffhost than XSHANA
How can I specify that I would like to allow cross origin access restricted to certain domain(s) only
Is there a special keyword syntax for specifying that
Thank yoi
Orel
Vijay UthayakumarAug 27 2013 131 AM
Highly informative amp digestible Fantastic work
Jerry WangAug 1 2013 955 AM
Hi Tomas
Thank you
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010049
Jerry
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 644 PM
JSLint checks are very strict and often produce syntax errors for items that just stylistic and wont actually
cause an error upon activation or runtime You can either ignore the JSLint errors or deactivate JSLint for this
project in these cases However it might also be an indication that the JavaScript code you are trying to import
isnt compatible with Strict mode
httpsdevelopermozillaorgen-USdocsWebJavaScriptReferenceFunctions_and_function_scope
Strict_mode
Milan Vrozina in response to Thomas Jung on page 49Jul 21 2013 624 PM
Thanks for clarification I thought there would be some kind of import
But anyway in case of this specific library I have some problems with JSLint validation when I do cut and paste
of the original code
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 343 PM
What kind of problem are you having using this library Strict mode JavaScript which doesnt try to access the
DOM Window or other client side specific objects should work in Server Side XSJS Generally if you have a
library you just cut and paste into your XSJS or an XSJSLIB file and then call the functions from your code
Milan VrozinaJul 21 2013 339 PM
Hello
first and foremost thank you for perfect openSAP classes related to HANA development and for this blog as
well
I have one question related to server-side javascript You mentioned in course that is possible to use 3rd party
libraries or reuse 3rd party code But I cant find a possible way how to import 3rd party javascript library -as
is- to server and use it For example I would like to use JSZip library to zip some file before sending it to client
from xsjs application Is that possible Thank you
Chandrashekhar MahajanJul 3 2013 734 PM
This is excellent blog Now HANA XS is very much clear to me
Mohan krishnaJul 1 2013 144 PM
WOW - great blog Thomas This will be very helpful in understanding SAP hana Good Job
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010050
Abdul Hakim in response to Thomas Jung on page 50Jun 27 2013 833 PM
Thanks for the clarification
Thomas Jung in response to Abdul Hakim on page 50Jun 27 2013 659 PM
HANA Extended Application Services uses SQLScript and JavaScript as its two primary programming
languages
gtwhether the current SAP Business suite based on ABAP will be completely migrated to HANA service
No The Business Suite already runs on HANA but still via the ABAP application server It will continue to
leverage HANA via a combination of enhancements to ABAP and utilizing some of the technologies described
in this blog
gtAlso whether ABAP can be used to built application in HANA extended services
No There is no ABAP language container in HANA Extended Application Services
Abdul HakimJun 27 2013 405 PM
Hi Thomas - What is the programming language used for HANA Extended application services
As HANA is more than a database ie application platform by itself and as you mentioned that more and more
applications will be built on HANA i have question as how the future SAP ERP system looks likewhether the
current SAP Business suite based on ABAP will be completely migrated to HANA service in the future or SAP
ABAP server will continue to evolve and receive focus investment from SAP Also whether ABAP can be used
to built application in HANA extended services Your thoughts
Thanks
Abdul Hakim
Thomas Jung in response to Ravindra Channe on page 50Jun 11 2013 830 PM
Yes it is still planned However we are still a couple of weeks away and Ive not seen the final installers to say
for certain its there
Ravindra ChanneJun 11 2013 815 PM
Hi Thomas
Thanks for a wonderful and very informative blog Is there any update on 32 bit REGI file
Is it expected along with SPS6
Regards
Ravi
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010051
Thomas Jung in response to Amanda Rzepka on page Jun 7 2013 942 PM
gtCan the XS Services be used in a BW on HANA Scenario
Yes XS is part of ALL HANA systems You should check and make sure you are licensed for direct access to
the underlying HANA instance however
Thomas Jung in response to Holger Schimanski on page Jun 7 2013 941 PM
gtIs there a similar library which could be used in XS Engine
The XSODATA development object is similar We also have higher level frameworks for XMLA and Search
Services (InA) You can expect more such high level frameworks to be added to the HANA Extended
Application Services in the future
Thomas Jung in response to Manav Mehra on page Jun 7 2013 939 PM
Have you used something like the Chrome developer tools to see see if you are getting any client side
javascript errors or to see if the request to your xsodata service is successful
Thomas Jung in response to Christian Hufnagl on page 52Jun 7 2013 938 PM
It will ship as non-automatic content in SPS6 (all systems will have it and it just needs to be imported) The
delivery units are also part of this weeks updates to the Cloudshare and AWS developer center images They
are also available for download as part of the content of the openSAP course
Thomas Jung in response to Matthew Pickell on page 51Jun 7 2013 937 PM
CORS support will come with SPS6 at the end of June
Thomas Jung in response to Jeroen Custers on page 51Jun 7 2013 936 PM
gtWill this bug be fixed in HANA ver 56
Personally Ive still experienced this bug in SPS6 internal builds Must be a tricky one to find Luckily the
workaround of closing and reopening isnt too difficult Just annoying This also probably makes the bug low
priority
Jeroen Custers in response to Vivek Singh Bhoj on page 52Jun 7 2013 411 PM
This issue also occurs on rev56
Matthew PickellJun 7 2013 258 PM
Thomas
Has CORS been included in a release yet
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010052
Vivek Singh Bhoj in response to Chandra Edem on page 52Jun 5 2013 601 AM
Hi Chandra
Date for Week1 Assignment has been extended till June 11
So you can give Week 1 Assignment now
Christian HufnaglJun 4 2013 543 PM
Hi Thomas
thank you for the interesting tutorial
Can you tell me whether it is possible to download the source code of the ldquoPutting it all togetherrdquovideo And if yes Where can I download itThanks
Christoph
Vivek Singh BhojJun 4 2013 1116 AM
Hi Thomas
Thanks for OpenSAP classes
Your Youtube Account also have very good exercises
IN OpenSAP Week 2 Unit 3 tutorial after assigning admin role to my user Id i am not able to see sequences
synonyms triggers under my schema or any other schema i am only able to see Column Views Procedures
Tables and Views
Though now i am able to insert data into my created table
Can you let me know how i will be able to see Sequences under my schema without removing the admin role
I am using HANA revision 52
Got to know from OpenSAP that
This is a known issue and the only way that Ive seen to fix it is to actually close the studio and open it again
then refresh the node
Cheers
Rich Heilman
SAP HANA Product Management
Will this bug be fixed in HANA ver 56
Chandra Edem in response to Thomas Jung on page 53Jun 4 2013 646 AM
Thomas
I registered for OpenSAP course Introduction to Software Development on SAP HANA on June 2 900PM
I didnt know that it is going to end WEEK1 assignment test on 632013 300PM Is there any way can take
that WEEK1 Assignment Test
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010053
Thanks
Chandra
Thomas Jung in response to Alexander Bauer on page Jun 3 2013 856 PM
SAPUI5 gets updated auutomatically when you apply HANA revisions There is no additional download or
update needed
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010043
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Vivek Singh Bhoj in response to reda miraoui on page 43Jan 29 2014 352 PM
Hi Reda
You can import Shine Content in HANA and then check all these source codes
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Regards
Vivek
reda miraoui in response to Thomas Jung on page Jan 29 2014 344 PM
Hey Thomas
Is it possible to download source code of your project from this HANA tutorial
Thanks
Reda
Thomas Jung in response to Abdul Hakim on page 43Nov 21 2013 1133 PM
Yes River can be used as an alternative and when activated it will generate Server Side JavaScript andor
SQLScript
Abdul Hakim in response to Thomas Jung on page 44Nov 21 2013 747 PM
Hi Thomas - Was going through blog regarding River (RDL)Just a question on this
When you say Programming language for HANA native development is Server side Javascript SQL SQL
ScriptOnce RDL is rolled out whether RDL can be used for native application development instead of Server
side Java script SQL SQL Script I am very much new to this stuff so appreciate if you can also help on
how to get started with Server Side Java script SQL SQL Script for HANA
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 30 2013 750 AM
Hi Thomas
Thanks for your response I am talking about more content on shine
thanks
Ashutosh
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010044
Baskar Gopalakrishnan in response to Thomas Jung on page 44Oct 30 2013 1249 AM
Hi Thomas
Im a SAP PI Middleware consultantSAP topic leader in XIPI heavily worked on Java related
Netweaver stack I have knowledge in ABAP but not worked heavily in abap I have enrolled your sap hana
native application development course I feel very interesting I did work heavily in java and javascript projects
using eclipse development tool Do you think if I invest my time in just native hana development and proceed
in HANA field is a good step I dont have BW experience either
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 819 PM
Thanks for the clarification Much appreciated
Thomas Jung in response to Abdul Hakim on page 44Oct 29 2013 120 PM
gtABAP Close to HANA means whether we can expect a similar 2 tier architecture similar to HANA XS in the
future or what does that mean
No it doesnt mean that ABAP will become a 2 tier architecture We will not move the ABAP VMKernel into
HANA itself It will remain a separate application server At least for the current plansforeseeable future What
he was referring to was bringing the programming models closer For instance the new 740 SP5 feature that
allows you to write SQLScript directly within an ABAP class method
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 650 AM
Thomas - Thanks for the clarificationMuch appreciatedI was listening to ABAP on HANA session by
Thorsten Schneider this year Teched and he was mentioning that SAP Plans to bring ABAP very close to
HANA in the coming future but not much details have been discussed in the sessionABAP Close to HANA
means whether we can expect a similar 2 tier architecture similar to HANA XS in the future or what does that
mean
Thanks
Hakim
Thomas Jung in response to Abdul Hakim on page 45Oct 28 2013 703 PM
gt whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the option is
recommended by SAP then kindly share the pros and cons of each of the item
Taken from the TechEd CD103 session slides
Guidance
bulluse ABAP for optimization of existing progams (in context of SAP Business Suite or BW)
bullconsider HANA Native Development for development of new applications which will solely run on SAP HANA
bullcombine ABAP and HANA Native Development to enrich existing applications (eg SAP HANA Live Fiori)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010045
ABAP
bullapplications follow 3-tier architecture
bullABAP is in general database agnostic but with release 74 optimized for SAP HANA
bullProgramming language ABAP ABAP OO with the option to use SAP HANA features
bullIDE eclipse-based ABAP Development Tools
HANA Native Development
bullapplications follow 2-tier architecture
bullHANA Native Development is SAP HANA specific and embedded in the database
bullProgramming language River server-side JavaScript SQLSQLScript
bullIDE eclipse-based SAP HANA Studio + web IDE
Thomas Jung in response to ashutosh dixit on page 45Oct 28 2013 701 PM
gtIs there any more demos for the SHINE
Im not exactly sure what you mean by that We are building additional content for SHINE that will be delivered
in SP7
Abdul HakimOct 28 2013 326 PM
Thomas - Let us say a customer is running SAP Netweaver 74 ABAP with HANA DB and they have HANA
extended service as wellIf the customer wants to do new developments then what is the recommendation
from SAP ie whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the
option is recommended by SAP then kindly share the pros and cons of each of the item (SAP Netweaver 74
ABAP Vs SAP HANA XS)
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 28 2013 221 PM
Hi Thomas
Thanks a lot for your its working now
Is there any more demos for the SHINE
Thanks
Ashutosh
Thomas Jung in response to ashutosh dixit on page 46Oct 25 2013 809 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010046
As this content is now standard in SP6 as part of SHINE (SAP HANA INteractive Education) there also some
setup instructions on helpsapcom
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Basic points to check - have you generated the synonyms in the data generator Ran the data generator to
create some data Have the role assigned Added client 001 to your user profile
ashutosh dixitOct 24 2013 130 PM
Hi Thomas
Amazing blog - once again Thomas thanks
I have been following you for many days attended your OPEN SAP course also
That was an amazing course for new learner like me
One of our client is looking forward for XS based search Application identical to what you have created in your
DEMO
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010047
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010048
But I am not able to fetch the data on blank HTML page is coming with no data
If there is any step by step document related to this please help in getting that
Any help will be highly appreciated
Thanks
Ashutosh
Naveen KumarSep 26 2013 1130 AM
Good Document
Heber FabianoAug 27 2013 323 PM
Great content as always Keep sharing with us
Thomas Jung in response to Orel Stringa on page 48Aug 27 2013 147 PM
This is currently not possible The CORS support is for all origins We dont yet have the feature to maintain a
whitelist of CORS origins
Orel Stringa in response to Thomas Jung on page Aug 27 2013 801 AM
Hi Thomas
nice to see that SAP has made it possible with SP6 to specify cross origin resource sharing (CORS) support
via the xsaccess file SP6 HANA development guide has example of how to specify CORS support
I have build an XS application and would like to serve SAPUI5 on a diffhost than XSHANA
How can I specify that I would like to allow cross origin access restricted to certain domain(s) only
Is there a special keyword syntax for specifying that
Thank yoi
Orel
Vijay UthayakumarAug 27 2013 131 AM
Highly informative amp digestible Fantastic work
Jerry WangAug 1 2013 955 AM
Hi Tomas
Thank you
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010049
Jerry
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 644 PM
JSLint checks are very strict and often produce syntax errors for items that just stylistic and wont actually
cause an error upon activation or runtime You can either ignore the JSLint errors or deactivate JSLint for this
project in these cases However it might also be an indication that the JavaScript code you are trying to import
isnt compatible with Strict mode
httpsdevelopermozillaorgen-USdocsWebJavaScriptReferenceFunctions_and_function_scope
Strict_mode
Milan Vrozina in response to Thomas Jung on page 49Jul 21 2013 624 PM
Thanks for clarification I thought there would be some kind of import
But anyway in case of this specific library I have some problems with JSLint validation when I do cut and paste
of the original code
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 343 PM
What kind of problem are you having using this library Strict mode JavaScript which doesnt try to access the
DOM Window or other client side specific objects should work in Server Side XSJS Generally if you have a
library you just cut and paste into your XSJS or an XSJSLIB file and then call the functions from your code
Milan VrozinaJul 21 2013 339 PM
Hello
first and foremost thank you for perfect openSAP classes related to HANA development and for this blog as
well
I have one question related to server-side javascript You mentioned in course that is possible to use 3rd party
libraries or reuse 3rd party code But I cant find a possible way how to import 3rd party javascript library -as
is- to server and use it For example I would like to use JSZip library to zip some file before sending it to client
from xsjs application Is that possible Thank you
Chandrashekhar MahajanJul 3 2013 734 PM
This is excellent blog Now HANA XS is very much clear to me
Mohan krishnaJul 1 2013 144 PM
WOW - great blog Thomas This will be very helpful in understanding SAP hana Good Job
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010050
Abdul Hakim in response to Thomas Jung on page 50Jun 27 2013 833 PM
Thanks for the clarification
Thomas Jung in response to Abdul Hakim on page 50Jun 27 2013 659 PM
HANA Extended Application Services uses SQLScript and JavaScript as its two primary programming
languages
gtwhether the current SAP Business suite based on ABAP will be completely migrated to HANA service
No The Business Suite already runs on HANA but still via the ABAP application server It will continue to
leverage HANA via a combination of enhancements to ABAP and utilizing some of the technologies described
in this blog
gtAlso whether ABAP can be used to built application in HANA extended services
No There is no ABAP language container in HANA Extended Application Services
Abdul HakimJun 27 2013 405 PM
Hi Thomas - What is the programming language used for HANA Extended application services
As HANA is more than a database ie application platform by itself and as you mentioned that more and more
applications will be built on HANA i have question as how the future SAP ERP system looks likewhether the
current SAP Business suite based on ABAP will be completely migrated to HANA service in the future or SAP
ABAP server will continue to evolve and receive focus investment from SAP Also whether ABAP can be used
to built application in HANA extended services Your thoughts
Thanks
Abdul Hakim
Thomas Jung in response to Ravindra Channe on page 50Jun 11 2013 830 PM
Yes it is still planned However we are still a couple of weeks away and Ive not seen the final installers to say
for certain its there
Ravindra ChanneJun 11 2013 815 PM
Hi Thomas
Thanks for a wonderful and very informative blog Is there any update on 32 bit REGI file
Is it expected along with SPS6
Regards
Ravi
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010051
Thomas Jung in response to Amanda Rzepka on page Jun 7 2013 942 PM
gtCan the XS Services be used in a BW on HANA Scenario
Yes XS is part of ALL HANA systems You should check and make sure you are licensed for direct access to
the underlying HANA instance however
Thomas Jung in response to Holger Schimanski on page Jun 7 2013 941 PM
gtIs there a similar library which could be used in XS Engine
The XSODATA development object is similar We also have higher level frameworks for XMLA and Search
Services (InA) You can expect more such high level frameworks to be added to the HANA Extended
Application Services in the future
Thomas Jung in response to Manav Mehra on page Jun 7 2013 939 PM
Have you used something like the Chrome developer tools to see see if you are getting any client side
javascript errors or to see if the request to your xsodata service is successful
Thomas Jung in response to Christian Hufnagl on page 52Jun 7 2013 938 PM
It will ship as non-automatic content in SPS6 (all systems will have it and it just needs to be imported) The
delivery units are also part of this weeks updates to the Cloudshare and AWS developer center images They
are also available for download as part of the content of the openSAP course
Thomas Jung in response to Matthew Pickell on page 51Jun 7 2013 937 PM
CORS support will come with SPS6 at the end of June
Thomas Jung in response to Jeroen Custers on page 51Jun 7 2013 936 PM
gtWill this bug be fixed in HANA ver 56
Personally Ive still experienced this bug in SPS6 internal builds Must be a tricky one to find Luckily the
workaround of closing and reopening isnt too difficult Just annoying This also probably makes the bug low
priority
Jeroen Custers in response to Vivek Singh Bhoj on page 52Jun 7 2013 411 PM
This issue also occurs on rev56
Matthew PickellJun 7 2013 258 PM
Thomas
Has CORS been included in a release yet
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010052
Vivek Singh Bhoj in response to Chandra Edem on page 52Jun 5 2013 601 AM
Hi Chandra
Date for Week1 Assignment has been extended till June 11
So you can give Week 1 Assignment now
Christian HufnaglJun 4 2013 543 PM
Hi Thomas
thank you for the interesting tutorial
Can you tell me whether it is possible to download the source code of the ldquoPutting it all togetherrdquovideo And if yes Where can I download itThanks
Christoph
Vivek Singh BhojJun 4 2013 1116 AM
Hi Thomas
Thanks for OpenSAP classes
Your Youtube Account also have very good exercises
IN OpenSAP Week 2 Unit 3 tutorial after assigning admin role to my user Id i am not able to see sequences
synonyms triggers under my schema or any other schema i am only able to see Column Views Procedures
Tables and Views
Though now i am able to insert data into my created table
Can you let me know how i will be able to see Sequences under my schema without removing the admin role
I am using HANA revision 52
Got to know from OpenSAP that
This is a known issue and the only way that Ive seen to fix it is to actually close the studio and open it again
then refresh the node
Cheers
Rich Heilman
SAP HANA Product Management
Will this bug be fixed in HANA ver 56
Chandra Edem in response to Thomas Jung on page 53Jun 4 2013 646 AM
Thomas
I registered for OpenSAP course Introduction to Software Development on SAP HANA on June 2 900PM
I didnt know that it is going to end WEEK1 assignment test on 632013 300PM Is there any way can take
that WEEK1 Assignment Test
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010053
Thanks
Chandra
Thomas Jung in response to Alexander Bauer on page Jun 3 2013 856 PM
SAPUI5 gets updated auutomatically when you apply HANA revisions There is no additional download or
update needed
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010044
Baskar Gopalakrishnan in response to Thomas Jung on page 44Oct 30 2013 1249 AM
Hi Thomas
Im a SAP PI Middleware consultantSAP topic leader in XIPI heavily worked on Java related
Netweaver stack I have knowledge in ABAP but not worked heavily in abap I have enrolled your sap hana
native application development course I feel very interesting I did work heavily in java and javascript projects
using eclipse development tool Do you think if I invest my time in just native hana development and proceed
in HANA field is a good step I dont have BW experience either
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 819 PM
Thanks for the clarification Much appreciated
Thomas Jung in response to Abdul Hakim on page 44Oct 29 2013 120 PM
gtABAP Close to HANA means whether we can expect a similar 2 tier architecture similar to HANA XS in the
future or what does that mean
No it doesnt mean that ABAP will become a 2 tier architecture We will not move the ABAP VMKernel into
HANA itself It will remain a separate application server At least for the current plansforeseeable future What
he was referring to was bringing the programming models closer For instance the new 740 SP5 feature that
allows you to write SQLScript directly within an ABAP class method
Abdul Hakim in response to Thomas Jung on page 44Oct 29 2013 650 AM
Thomas - Thanks for the clarificationMuch appreciatedI was listening to ABAP on HANA session by
Thorsten Schneider this year Teched and he was mentioning that SAP Plans to bring ABAP very close to
HANA in the coming future but not much details have been discussed in the sessionABAP Close to HANA
means whether we can expect a similar 2 tier architecture similar to HANA XS in the future or what does that
mean
Thanks
Hakim
Thomas Jung in response to Abdul Hakim on page 45Oct 28 2013 703 PM
gt whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the option is
recommended by SAP then kindly share the pros and cons of each of the item
Taken from the TechEd CD103 session slides
Guidance
bulluse ABAP for optimization of existing progams (in context of SAP Business Suite or BW)
bullconsider HANA Native Development for development of new applications which will solely run on SAP HANA
bullcombine ABAP and HANA Native Development to enrich existing applications (eg SAP HANA Live Fiori)
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010045
ABAP
bullapplications follow 3-tier architecture
bullABAP is in general database agnostic but with release 74 optimized for SAP HANA
bullProgramming language ABAP ABAP OO with the option to use SAP HANA features
bullIDE eclipse-based ABAP Development Tools
HANA Native Development
bullapplications follow 2-tier architecture
bullHANA Native Development is SAP HANA specific and embedded in the database
bullProgramming language River server-side JavaScript SQLSQLScript
bullIDE eclipse-based SAP HANA Studio + web IDE
Thomas Jung in response to ashutosh dixit on page 45Oct 28 2013 701 PM
gtIs there any more demos for the SHINE
Im not exactly sure what you mean by that We are building additional content for SHINE that will be delivered
in SP7
Abdul HakimOct 28 2013 326 PM
Thomas - Let us say a customer is running SAP Netweaver 74 ABAP with HANA DB and they have HANA
extended service as wellIf the customer wants to do new developments then what is the recommendation
from SAP ie whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the
option is recommended by SAP then kindly share the pros and cons of each of the item (SAP Netweaver 74
ABAP Vs SAP HANA XS)
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 28 2013 221 PM
Hi Thomas
Thanks a lot for your its working now
Is there any more demos for the SHINE
Thanks
Ashutosh
Thomas Jung in response to ashutosh dixit on page 46Oct 25 2013 809 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010046
As this content is now standard in SP6 as part of SHINE (SAP HANA INteractive Education) there also some
setup instructions on helpsapcom
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Basic points to check - have you generated the synonyms in the data generator Ran the data generator to
create some data Have the role assigned Added client 001 to your user profile
ashutosh dixitOct 24 2013 130 PM
Hi Thomas
Amazing blog - once again Thomas thanks
I have been following you for many days attended your OPEN SAP course also
That was an amazing course for new learner like me
One of our client is looking forward for XS based search Application identical to what you have created in your
DEMO
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010047
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010048
But I am not able to fetch the data on blank HTML page is coming with no data
If there is any step by step document related to this please help in getting that
Any help will be highly appreciated
Thanks
Ashutosh
Naveen KumarSep 26 2013 1130 AM
Good Document
Heber FabianoAug 27 2013 323 PM
Great content as always Keep sharing with us
Thomas Jung in response to Orel Stringa on page 48Aug 27 2013 147 PM
This is currently not possible The CORS support is for all origins We dont yet have the feature to maintain a
whitelist of CORS origins
Orel Stringa in response to Thomas Jung on page Aug 27 2013 801 AM
Hi Thomas
nice to see that SAP has made it possible with SP6 to specify cross origin resource sharing (CORS) support
via the xsaccess file SP6 HANA development guide has example of how to specify CORS support
I have build an XS application and would like to serve SAPUI5 on a diffhost than XSHANA
How can I specify that I would like to allow cross origin access restricted to certain domain(s) only
Is there a special keyword syntax for specifying that
Thank yoi
Orel
Vijay UthayakumarAug 27 2013 131 AM
Highly informative amp digestible Fantastic work
Jerry WangAug 1 2013 955 AM
Hi Tomas
Thank you
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010049
Jerry
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 644 PM
JSLint checks are very strict and often produce syntax errors for items that just stylistic and wont actually
cause an error upon activation or runtime You can either ignore the JSLint errors or deactivate JSLint for this
project in these cases However it might also be an indication that the JavaScript code you are trying to import
isnt compatible with Strict mode
httpsdevelopermozillaorgen-USdocsWebJavaScriptReferenceFunctions_and_function_scope
Strict_mode
Milan Vrozina in response to Thomas Jung on page 49Jul 21 2013 624 PM
Thanks for clarification I thought there would be some kind of import
But anyway in case of this specific library I have some problems with JSLint validation when I do cut and paste
of the original code
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 343 PM
What kind of problem are you having using this library Strict mode JavaScript which doesnt try to access the
DOM Window or other client side specific objects should work in Server Side XSJS Generally if you have a
library you just cut and paste into your XSJS or an XSJSLIB file and then call the functions from your code
Milan VrozinaJul 21 2013 339 PM
Hello
first and foremost thank you for perfect openSAP classes related to HANA development and for this blog as
well
I have one question related to server-side javascript You mentioned in course that is possible to use 3rd party
libraries or reuse 3rd party code But I cant find a possible way how to import 3rd party javascript library -as
is- to server and use it For example I would like to use JSZip library to zip some file before sending it to client
from xsjs application Is that possible Thank you
Chandrashekhar MahajanJul 3 2013 734 PM
This is excellent blog Now HANA XS is very much clear to me
Mohan krishnaJul 1 2013 144 PM
WOW - great blog Thomas This will be very helpful in understanding SAP hana Good Job
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010050
Abdul Hakim in response to Thomas Jung on page 50Jun 27 2013 833 PM
Thanks for the clarification
Thomas Jung in response to Abdul Hakim on page 50Jun 27 2013 659 PM
HANA Extended Application Services uses SQLScript and JavaScript as its two primary programming
languages
gtwhether the current SAP Business suite based on ABAP will be completely migrated to HANA service
No The Business Suite already runs on HANA but still via the ABAP application server It will continue to
leverage HANA via a combination of enhancements to ABAP and utilizing some of the technologies described
in this blog
gtAlso whether ABAP can be used to built application in HANA extended services
No There is no ABAP language container in HANA Extended Application Services
Abdul HakimJun 27 2013 405 PM
Hi Thomas - What is the programming language used for HANA Extended application services
As HANA is more than a database ie application platform by itself and as you mentioned that more and more
applications will be built on HANA i have question as how the future SAP ERP system looks likewhether the
current SAP Business suite based on ABAP will be completely migrated to HANA service in the future or SAP
ABAP server will continue to evolve and receive focus investment from SAP Also whether ABAP can be used
to built application in HANA extended services Your thoughts
Thanks
Abdul Hakim
Thomas Jung in response to Ravindra Channe on page 50Jun 11 2013 830 PM
Yes it is still planned However we are still a couple of weeks away and Ive not seen the final installers to say
for certain its there
Ravindra ChanneJun 11 2013 815 PM
Hi Thomas
Thanks for a wonderful and very informative blog Is there any update on 32 bit REGI file
Is it expected along with SPS6
Regards
Ravi
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010051
Thomas Jung in response to Amanda Rzepka on page Jun 7 2013 942 PM
gtCan the XS Services be used in a BW on HANA Scenario
Yes XS is part of ALL HANA systems You should check and make sure you are licensed for direct access to
the underlying HANA instance however
Thomas Jung in response to Holger Schimanski on page Jun 7 2013 941 PM
gtIs there a similar library which could be used in XS Engine
The XSODATA development object is similar We also have higher level frameworks for XMLA and Search
Services (InA) You can expect more such high level frameworks to be added to the HANA Extended
Application Services in the future
Thomas Jung in response to Manav Mehra on page Jun 7 2013 939 PM
Have you used something like the Chrome developer tools to see see if you are getting any client side
javascript errors or to see if the request to your xsodata service is successful
Thomas Jung in response to Christian Hufnagl on page 52Jun 7 2013 938 PM
It will ship as non-automatic content in SPS6 (all systems will have it and it just needs to be imported) The
delivery units are also part of this weeks updates to the Cloudshare and AWS developer center images They
are also available for download as part of the content of the openSAP course
Thomas Jung in response to Matthew Pickell on page 51Jun 7 2013 937 PM
CORS support will come with SPS6 at the end of June
Thomas Jung in response to Jeroen Custers on page 51Jun 7 2013 936 PM
gtWill this bug be fixed in HANA ver 56
Personally Ive still experienced this bug in SPS6 internal builds Must be a tricky one to find Luckily the
workaround of closing and reopening isnt too difficult Just annoying This also probably makes the bug low
priority
Jeroen Custers in response to Vivek Singh Bhoj on page 52Jun 7 2013 411 PM
This issue also occurs on rev56
Matthew PickellJun 7 2013 258 PM
Thomas
Has CORS been included in a release yet
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010052
Vivek Singh Bhoj in response to Chandra Edem on page 52Jun 5 2013 601 AM
Hi Chandra
Date for Week1 Assignment has been extended till June 11
So you can give Week 1 Assignment now
Christian HufnaglJun 4 2013 543 PM
Hi Thomas
thank you for the interesting tutorial
Can you tell me whether it is possible to download the source code of the ldquoPutting it all togetherrdquovideo And if yes Where can I download itThanks
Christoph
Vivek Singh BhojJun 4 2013 1116 AM
Hi Thomas
Thanks for OpenSAP classes
Your Youtube Account also have very good exercises
IN OpenSAP Week 2 Unit 3 tutorial after assigning admin role to my user Id i am not able to see sequences
synonyms triggers under my schema or any other schema i am only able to see Column Views Procedures
Tables and Views
Though now i am able to insert data into my created table
Can you let me know how i will be able to see Sequences under my schema without removing the admin role
I am using HANA revision 52
Got to know from OpenSAP that
This is a known issue and the only way that Ive seen to fix it is to actually close the studio and open it again
then refresh the node
Cheers
Rich Heilman
SAP HANA Product Management
Will this bug be fixed in HANA ver 56
Chandra Edem in response to Thomas Jung on page 53Jun 4 2013 646 AM
Thomas
I registered for OpenSAP course Introduction to Software Development on SAP HANA on June 2 900PM
I didnt know that it is going to end WEEK1 assignment test on 632013 300PM Is there any way can take
that WEEK1 Assignment Test
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010053
Thanks
Chandra
Thomas Jung in response to Alexander Bauer on page Jun 3 2013 856 PM
SAPUI5 gets updated auutomatically when you apply HANA revisions There is no additional download or
update needed
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010045
ABAP
bullapplications follow 3-tier architecture
bullABAP is in general database agnostic but with release 74 optimized for SAP HANA
bullProgramming language ABAP ABAP OO with the option to use SAP HANA features
bullIDE eclipse-based ABAP Development Tools
HANA Native Development
bullapplications follow 2-tier architecture
bullHANA Native Development is SAP HANA specific and embedded in the database
bullProgramming language River server-side JavaScript SQLSQLScript
bullIDE eclipse-based SAP HANA Studio + web IDE
Thomas Jung in response to ashutosh dixit on page 45Oct 28 2013 701 PM
gtIs there any more demos for the SHINE
Im not exactly sure what you mean by that We are building additional content for SHINE that will be delivered
in SP7
Abdul HakimOct 28 2013 326 PM
Thomas - Let us say a customer is running SAP Netweaver 74 ABAP with HANA DB and they have HANA
extended service as wellIf the customer wants to do new developments then what is the recommendation
from SAP ie whether to build application using HANA XS or use SAP Netweaver 74 ABAPIf any one of the
option is recommended by SAP then kindly share the pros and cons of each of the item (SAP Netweaver 74
ABAP Vs SAP HANA XS)
Thanks
Hakim
ashutosh dixit in response to Thomas Jung on page 45Oct 28 2013 221 PM
Hi Thomas
Thanks a lot for your its working now
Is there any more demos for the SHINE
Thanks
Ashutosh
Thomas Jung in response to ashutosh dixit on page 46Oct 25 2013 809 PM
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010046
As this content is now standard in SP6 as part of SHINE (SAP HANA INteractive Education) there also some
setup instructions on helpsapcom
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Basic points to check - have you generated the synonyms in the data generator Ran the data generator to
create some data Have the role assigned Added client 001 to your user profile
ashutosh dixitOct 24 2013 130 PM
Hi Thomas
Amazing blog - once again Thomas thanks
I have been following you for many days attended your OPEN SAP course also
That was an amazing course for new learner like me
One of our client is looking forward for XS based search Application identical to what you have created in your
DEMO
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010047
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010048
But I am not able to fetch the data on blank HTML page is coming with no data
If there is any step by step document related to this please help in getting that
Any help will be highly appreciated
Thanks
Ashutosh
Naveen KumarSep 26 2013 1130 AM
Good Document
Heber FabianoAug 27 2013 323 PM
Great content as always Keep sharing with us
Thomas Jung in response to Orel Stringa on page 48Aug 27 2013 147 PM
This is currently not possible The CORS support is for all origins We dont yet have the feature to maintain a
whitelist of CORS origins
Orel Stringa in response to Thomas Jung on page Aug 27 2013 801 AM
Hi Thomas
nice to see that SAP has made it possible with SP6 to specify cross origin resource sharing (CORS) support
via the xsaccess file SP6 HANA development guide has example of how to specify CORS support
I have build an XS application and would like to serve SAPUI5 on a diffhost than XSHANA
How can I specify that I would like to allow cross origin access restricted to certain domain(s) only
Is there a special keyword syntax for specifying that
Thank yoi
Orel
Vijay UthayakumarAug 27 2013 131 AM
Highly informative amp digestible Fantastic work
Jerry WangAug 1 2013 955 AM
Hi Tomas
Thank you
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010049
Jerry
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 644 PM
JSLint checks are very strict and often produce syntax errors for items that just stylistic and wont actually
cause an error upon activation or runtime You can either ignore the JSLint errors or deactivate JSLint for this
project in these cases However it might also be an indication that the JavaScript code you are trying to import
isnt compatible with Strict mode
httpsdevelopermozillaorgen-USdocsWebJavaScriptReferenceFunctions_and_function_scope
Strict_mode
Milan Vrozina in response to Thomas Jung on page 49Jul 21 2013 624 PM
Thanks for clarification I thought there would be some kind of import
But anyway in case of this specific library I have some problems with JSLint validation when I do cut and paste
of the original code
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 343 PM
What kind of problem are you having using this library Strict mode JavaScript which doesnt try to access the
DOM Window or other client side specific objects should work in Server Side XSJS Generally if you have a
library you just cut and paste into your XSJS or an XSJSLIB file and then call the functions from your code
Milan VrozinaJul 21 2013 339 PM
Hello
first and foremost thank you for perfect openSAP classes related to HANA development and for this blog as
well
I have one question related to server-side javascript You mentioned in course that is possible to use 3rd party
libraries or reuse 3rd party code But I cant find a possible way how to import 3rd party javascript library -as
is- to server and use it For example I would like to use JSZip library to zip some file before sending it to client
from xsjs application Is that possible Thank you
Chandrashekhar MahajanJul 3 2013 734 PM
This is excellent blog Now HANA XS is very much clear to me
Mohan krishnaJul 1 2013 144 PM
WOW - great blog Thomas This will be very helpful in understanding SAP hana Good Job
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010050
Abdul Hakim in response to Thomas Jung on page 50Jun 27 2013 833 PM
Thanks for the clarification
Thomas Jung in response to Abdul Hakim on page 50Jun 27 2013 659 PM
HANA Extended Application Services uses SQLScript and JavaScript as its two primary programming
languages
gtwhether the current SAP Business suite based on ABAP will be completely migrated to HANA service
No The Business Suite already runs on HANA but still via the ABAP application server It will continue to
leverage HANA via a combination of enhancements to ABAP and utilizing some of the technologies described
in this blog
gtAlso whether ABAP can be used to built application in HANA extended services
No There is no ABAP language container in HANA Extended Application Services
Abdul HakimJun 27 2013 405 PM
Hi Thomas - What is the programming language used for HANA Extended application services
As HANA is more than a database ie application platform by itself and as you mentioned that more and more
applications will be built on HANA i have question as how the future SAP ERP system looks likewhether the
current SAP Business suite based on ABAP will be completely migrated to HANA service in the future or SAP
ABAP server will continue to evolve and receive focus investment from SAP Also whether ABAP can be used
to built application in HANA extended services Your thoughts
Thanks
Abdul Hakim
Thomas Jung in response to Ravindra Channe on page 50Jun 11 2013 830 PM
Yes it is still planned However we are still a couple of weeks away and Ive not seen the final installers to say
for certain its there
Ravindra ChanneJun 11 2013 815 PM
Hi Thomas
Thanks for a wonderful and very informative blog Is there any update on 32 bit REGI file
Is it expected along with SPS6
Regards
Ravi
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010051
Thomas Jung in response to Amanda Rzepka on page Jun 7 2013 942 PM
gtCan the XS Services be used in a BW on HANA Scenario
Yes XS is part of ALL HANA systems You should check and make sure you are licensed for direct access to
the underlying HANA instance however
Thomas Jung in response to Holger Schimanski on page Jun 7 2013 941 PM
gtIs there a similar library which could be used in XS Engine
The XSODATA development object is similar We also have higher level frameworks for XMLA and Search
Services (InA) You can expect more such high level frameworks to be added to the HANA Extended
Application Services in the future
Thomas Jung in response to Manav Mehra on page Jun 7 2013 939 PM
Have you used something like the Chrome developer tools to see see if you are getting any client side
javascript errors or to see if the request to your xsodata service is successful
Thomas Jung in response to Christian Hufnagl on page 52Jun 7 2013 938 PM
It will ship as non-automatic content in SPS6 (all systems will have it and it just needs to be imported) The
delivery units are also part of this weeks updates to the Cloudshare and AWS developer center images They
are also available for download as part of the content of the openSAP course
Thomas Jung in response to Matthew Pickell on page 51Jun 7 2013 937 PM
CORS support will come with SPS6 at the end of June
Thomas Jung in response to Jeroen Custers on page 51Jun 7 2013 936 PM
gtWill this bug be fixed in HANA ver 56
Personally Ive still experienced this bug in SPS6 internal builds Must be a tricky one to find Luckily the
workaround of closing and reopening isnt too difficult Just annoying This also probably makes the bug low
priority
Jeroen Custers in response to Vivek Singh Bhoj on page 52Jun 7 2013 411 PM
This issue also occurs on rev56
Matthew PickellJun 7 2013 258 PM
Thomas
Has CORS been included in a release yet
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010052
Vivek Singh Bhoj in response to Chandra Edem on page 52Jun 5 2013 601 AM
Hi Chandra
Date for Week1 Assignment has been extended till June 11
So you can give Week 1 Assignment now
Christian HufnaglJun 4 2013 543 PM
Hi Thomas
thank you for the interesting tutorial
Can you tell me whether it is possible to download the source code of the ldquoPutting it all togetherrdquovideo And if yes Where can I download itThanks
Christoph
Vivek Singh BhojJun 4 2013 1116 AM
Hi Thomas
Thanks for OpenSAP classes
Your Youtube Account also have very good exercises
IN OpenSAP Week 2 Unit 3 tutorial after assigning admin role to my user Id i am not able to see sequences
synonyms triggers under my schema or any other schema i am only able to see Column Views Procedures
Tables and Views
Though now i am able to insert data into my created table
Can you let me know how i will be able to see Sequences under my schema without removing the admin role
I am using HANA revision 52
Got to know from OpenSAP that
This is a known issue and the only way that Ive seen to fix it is to actually close the studio and open it again
then refresh the node
Cheers
Rich Heilman
SAP HANA Product Management
Will this bug be fixed in HANA ver 56
Chandra Edem in response to Thomas Jung on page 53Jun 4 2013 646 AM
Thomas
I registered for OpenSAP course Introduction to Software Development on SAP HANA on June 2 900PM
I didnt know that it is going to end WEEK1 assignment test on 632013 300PM Is there any way can take
that WEEK1 Assignment Test
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010053
Thanks
Chandra
Thomas Jung in response to Alexander Bauer on page Jun 3 2013 856 PM
SAPUI5 gets updated auutomatically when you apply HANA revisions There is no additional download or
update needed
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010046
As this content is now standard in SP6 as part of SHINE (SAP HANA INteractive Education) there also some
setup instructions on helpsapcom
httphelpsapcomhanaSAP_HANA_Interactive_Education_SHINE_enpdf
Basic points to check - have you generated the synonyms in the data generator Ran the data generator to
create some data Have the role assigned Added client 001 to your user profile
ashutosh dixitOct 24 2013 130 PM
Hi Thomas
Amazing blog - once again Thomas thanks
I have been following you for many days attended your OPEN SAP course also
That was an amazing course for new learner like me
One of our client is looking forward for XS based search Application identical to what you have created in your
DEMO
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010047
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010048
But I am not able to fetch the data on blank HTML page is coming with no data
If there is any step by step document related to this please help in getting that
Any help will be highly appreciated
Thanks
Ashutosh
Naveen KumarSep 26 2013 1130 AM
Good Document
Heber FabianoAug 27 2013 323 PM
Great content as always Keep sharing with us
Thomas Jung in response to Orel Stringa on page 48Aug 27 2013 147 PM
This is currently not possible The CORS support is for all origins We dont yet have the feature to maintain a
whitelist of CORS origins
Orel Stringa in response to Thomas Jung on page Aug 27 2013 801 AM
Hi Thomas
nice to see that SAP has made it possible with SP6 to specify cross origin resource sharing (CORS) support
via the xsaccess file SP6 HANA development guide has example of how to specify CORS support
I have build an XS application and would like to serve SAPUI5 on a diffhost than XSHANA
How can I specify that I would like to allow cross origin access restricted to certain domain(s) only
Is there a special keyword syntax for specifying that
Thank yoi
Orel
Vijay UthayakumarAug 27 2013 131 AM
Highly informative amp digestible Fantastic work
Jerry WangAug 1 2013 955 AM
Hi Tomas
Thank you
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010049
Jerry
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 644 PM
JSLint checks are very strict and often produce syntax errors for items that just stylistic and wont actually
cause an error upon activation or runtime You can either ignore the JSLint errors or deactivate JSLint for this
project in these cases However it might also be an indication that the JavaScript code you are trying to import
isnt compatible with Strict mode
httpsdevelopermozillaorgen-USdocsWebJavaScriptReferenceFunctions_and_function_scope
Strict_mode
Milan Vrozina in response to Thomas Jung on page 49Jul 21 2013 624 PM
Thanks for clarification I thought there would be some kind of import
But anyway in case of this specific library I have some problems with JSLint validation when I do cut and paste
of the original code
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 343 PM
What kind of problem are you having using this library Strict mode JavaScript which doesnt try to access the
DOM Window or other client side specific objects should work in Server Side XSJS Generally if you have a
library you just cut and paste into your XSJS or an XSJSLIB file and then call the functions from your code
Milan VrozinaJul 21 2013 339 PM
Hello
first and foremost thank you for perfect openSAP classes related to HANA development and for this blog as
well
I have one question related to server-side javascript You mentioned in course that is possible to use 3rd party
libraries or reuse 3rd party code But I cant find a possible way how to import 3rd party javascript library -as
is- to server and use it For example I would like to use JSZip library to zip some file before sending it to client
from xsjs application Is that possible Thank you
Chandrashekhar MahajanJul 3 2013 734 PM
This is excellent blog Now HANA XS is very much clear to me
Mohan krishnaJul 1 2013 144 PM
WOW - great blog Thomas This will be very helpful in understanding SAP hana Good Job
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010050
Abdul Hakim in response to Thomas Jung on page 50Jun 27 2013 833 PM
Thanks for the clarification
Thomas Jung in response to Abdul Hakim on page 50Jun 27 2013 659 PM
HANA Extended Application Services uses SQLScript and JavaScript as its two primary programming
languages
gtwhether the current SAP Business suite based on ABAP will be completely migrated to HANA service
No The Business Suite already runs on HANA but still via the ABAP application server It will continue to
leverage HANA via a combination of enhancements to ABAP and utilizing some of the technologies described
in this blog
gtAlso whether ABAP can be used to built application in HANA extended services
No There is no ABAP language container in HANA Extended Application Services
Abdul HakimJun 27 2013 405 PM
Hi Thomas - What is the programming language used for HANA Extended application services
As HANA is more than a database ie application platform by itself and as you mentioned that more and more
applications will be built on HANA i have question as how the future SAP ERP system looks likewhether the
current SAP Business suite based on ABAP will be completely migrated to HANA service in the future or SAP
ABAP server will continue to evolve and receive focus investment from SAP Also whether ABAP can be used
to built application in HANA extended services Your thoughts
Thanks
Abdul Hakim
Thomas Jung in response to Ravindra Channe on page 50Jun 11 2013 830 PM
Yes it is still planned However we are still a couple of weeks away and Ive not seen the final installers to say
for certain its there
Ravindra ChanneJun 11 2013 815 PM
Hi Thomas
Thanks for a wonderful and very informative blog Is there any update on 32 bit REGI file
Is it expected along with SPS6
Regards
Ravi
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010051
Thomas Jung in response to Amanda Rzepka on page Jun 7 2013 942 PM
gtCan the XS Services be used in a BW on HANA Scenario
Yes XS is part of ALL HANA systems You should check and make sure you are licensed for direct access to
the underlying HANA instance however
Thomas Jung in response to Holger Schimanski on page Jun 7 2013 941 PM
gtIs there a similar library which could be used in XS Engine
The XSODATA development object is similar We also have higher level frameworks for XMLA and Search
Services (InA) You can expect more such high level frameworks to be added to the HANA Extended
Application Services in the future
Thomas Jung in response to Manav Mehra on page Jun 7 2013 939 PM
Have you used something like the Chrome developer tools to see see if you are getting any client side
javascript errors or to see if the request to your xsodata service is successful
Thomas Jung in response to Christian Hufnagl on page 52Jun 7 2013 938 PM
It will ship as non-automatic content in SPS6 (all systems will have it and it just needs to be imported) The
delivery units are also part of this weeks updates to the Cloudshare and AWS developer center images They
are also available for download as part of the content of the openSAP course
Thomas Jung in response to Matthew Pickell on page 51Jun 7 2013 937 PM
CORS support will come with SPS6 at the end of June
Thomas Jung in response to Jeroen Custers on page 51Jun 7 2013 936 PM
gtWill this bug be fixed in HANA ver 56
Personally Ive still experienced this bug in SPS6 internal builds Must be a tricky one to find Luckily the
workaround of closing and reopening isnt too difficult Just annoying This also probably makes the bug low
priority
Jeroen Custers in response to Vivek Singh Bhoj on page 52Jun 7 2013 411 PM
This issue also occurs on rev56
Matthew PickellJun 7 2013 258 PM
Thomas
Has CORS been included in a release yet
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010052
Vivek Singh Bhoj in response to Chandra Edem on page 52Jun 5 2013 601 AM
Hi Chandra
Date for Week1 Assignment has been extended till June 11
So you can give Week 1 Assignment now
Christian HufnaglJun 4 2013 543 PM
Hi Thomas
thank you for the interesting tutorial
Can you tell me whether it is possible to download the source code of the ldquoPutting it all togetherrdquovideo And if yes Where can I download itThanks
Christoph
Vivek Singh BhojJun 4 2013 1116 AM
Hi Thomas
Thanks for OpenSAP classes
Your Youtube Account also have very good exercises
IN OpenSAP Week 2 Unit 3 tutorial after assigning admin role to my user Id i am not able to see sequences
synonyms triggers under my schema or any other schema i am only able to see Column Views Procedures
Tables and Views
Though now i am able to insert data into my created table
Can you let me know how i will be able to see Sequences under my schema without removing the admin role
I am using HANA revision 52
Got to know from OpenSAP that
This is a known issue and the only way that Ive seen to fix it is to actually close the studio and open it again
then refresh the node
Cheers
Rich Heilman
SAP HANA Product Management
Will this bug be fixed in HANA ver 56
Chandra Edem in response to Thomas Jung on page 53Jun 4 2013 646 AM
Thomas
I registered for OpenSAP course Introduction to Software Development on SAP HANA on June 2 900PM
I didnt know that it is going to end WEEK1 assignment test on 632013 300PM Is there any way can take
that WEEK1 Assignment Test
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010053
Thanks
Chandra
Thomas Jung in response to Alexander Bauer on page Jun 3 2013 856 PM
SAPUI5 gets updated auutomatically when you apply HANA revisions There is no additional download or
update needed
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010047
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010048
But I am not able to fetch the data on blank HTML page is coming with no data
If there is any step by step document related to this please help in getting that
Any help will be highly appreciated
Thanks
Ashutosh
Naveen KumarSep 26 2013 1130 AM
Good Document
Heber FabianoAug 27 2013 323 PM
Great content as always Keep sharing with us
Thomas Jung in response to Orel Stringa on page 48Aug 27 2013 147 PM
This is currently not possible The CORS support is for all origins We dont yet have the feature to maintain a
whitelist of CORS origins
Orel Stringa in response to Thomas Jung on page Aug 27 2013 801 AM
Hi Thomas
nice to see that SAP has made it possible with SP6 to specify cross origin resource sharing (CORS) support
via the xsaccess file SP6 HANA development guide has example of how to specify CORS support
I have build an XS application and would like to serve SAPUI5 on a diffhost than XSHANA
How can I specify that I would like to allow cross origin access restricted to certain domain(s) only
Is there a special keyword syntax for specifying that
Thank yoi
Orel
Vijay UthayakumarAug 27 2013 131 AM
Highly informative amp digestible Fantastic work
Jerry WangAug 1 2013 955 AM
Hi Tomas
Thank you
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010049
Jerry
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 644 PM
JSLint checks are very strict and often produce syntax errors for items that just stylistic and wont actually
cause an error upon activation or runtime You can either ignore the JSLint errors or deactivate JSLint for this
project in these cases However it might also be an indication that the JavaScript code you are trying to import
isnt compatible with Strict mode
httpsdevelopermozillaorgen-USdocsWebJavaScriptReferenceFunctions_and_function_scope
Strict_mode
Milan Vrozina in response to Thomas Jung on page 49Jul 21 2013 624 PM
Thanks for clarification I thought there would be some kind of import
But anyway in case of this specific library I have some problems with JSLint validation when I do cut and paste
of the original code
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 343 PM
What kind of problem are you having using this library Strict mode JavaScript which doesnt try to access the
DOM Window or other client side specific objects should work in Server Side XSJS Generally if you have a
library you just cut and paste into your XSJS or an XSJSLIB file and then call the functions from your code
Milan VrozinaJul 21 2013 339 PM
Hello
first and foremost thank you for perfect openSAP classes related to HANA development and for this blog as
well
I have one question related to server-side javascript You mentioned in course that is possible to use 3rd party
libraries or reuse 3rd party code But I cant find a possible way how to import 3rd party javascript library -as
is- to server and use it For example I would like to use JSZip library to zip some file before sending it to client
from xsjs application Is that possible Thank you
Chandrashekhar MahajanJul 3 2013 734 PM
This is excellent blog Now HANA XS is very much clear to me
Mohan krishnaJul 1 2013 144 PM
WOW - great blog Thomas This will be very helpful in understanding SAP hana Good Job
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010050
Abdul Hakim in response to Thomas Jung on page 50Jun 27 2013 833 PM
Thanks for the clarification
Thomas Jung in response to Abdul Hakim on page 50Jun 27 2013 659 PM
HANA Extended Application Services uses SQLScript and JavaScript as its two primary programming
languages
gtwhether the current SAP Business suite based on ABAP will be completely migrated to HANA service
No The Business Suite already runs on HANA but still via the ABAP application server It will continue to
leverage HANA via a combination of enhancements to ABAP and utilizing some of the technologies described
in this blog
gtAlso whether ABAP can be used to built application in HANA extended services
No There is no ABAP language container in HANA Extended Application Services
Abdul HakimJun 27 2013 405 PM
Hi Thomas - What is the programming language used for HANA Extended application services
As HANA is more than a database ie application platform by itself and as you mentioned that more and more
applications will be built on HANA i have question as how the future SAP ERP system looks likewhether the
current SAP Business suite based on ABAP will be completely migrated to HANA service in the future or SAP
ABAP server will continue to evolve and receive focus investment from SAP Also whether ABAP can be used
to built application in HANA extended services Your thoughts
Thanks
Abdul Hakim
Thomas Jung in response to Ravindra Channe on page 50Jun 11 2013 830 PM
Yes it is still planned However we are still a couple of weeks away and Ive not seen the final installers to say
for certain its there
Ravindra ChanneJun 11 2013 815 PM
Hi Thomas
Thanks for a wonderful and very informative blog Is there any update on 32 bit REGI file
Is it expected along with SPS6
Regards
Ravi
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010051
Thomas Jung in response to Amanda Rzepka on page Jun 7 2013 942 PM
gtCan the XS Services be used in a BW on HANA Scenario
Yes XS is part of ALL HANA systems You should check and make sure you are licensed for direct access to
the underlying HANA instance however
Thomas Jung in response to Holger Schimanski on page Jun 7 2013 941 PM
gtIs there a similar library which could be used in XS Engine
The XSODATA development object is similar We also have higher level frameworks for XMLA and Search
Services (InA) You can expect more such high level frameworks to be added to the HANA Extended
Application Services in the future
Thomas Jung in response to Manav Mehra on page Jun 7 2013 939 PM
Have you used something like the Chrome developer tools to see see if you are getting any client side
javascript errors or to see if the request to your xsodata service is successful
Thomas Jung in response to Christian Hufnagl on page 52Jun 7 2013 938 PM
It will ship as non-automatic content in SPS6 (all systems will have it and it just needs to be imported) The
delivery units are also part of this weeks updates to the Cloudshare and AWS developer center images They
are also available for download as part of the content of the openSAP course
Thomas Jung in response to Matthew Pickell on page 51Jun 7 2013 937 PM
CORS support will come with SPS6 at the end of June
Thomas Jung in response to Jeroen Custers on page 51Jun 7 2013 936 PM
gtWill this bug be fixed in HANA ver 56
Personally Ive still experienced this bug in SPS6 internal builds Must be a tricky one to find Luckily the
workaround of closing and reopening isnt too difficult Just annoying This also probably makes the bug low
priority
Jeroen Custers in response to Vivek Singh Bhoj on page 52Jun 7 2013 411 PM
This issue also occurs on rev56
Matthew PickellJun 7 2013 258 PM
Thomas
Has CORS been included in a release yet
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010052
Vivek Singh Bhoj in response to Chandra Edem on page 52Jun 5 2013 601 AM
Hi Chandra
Date for Week1 Assignment has been extended till June 11
So you can give Week 1 Assignment now
Christian HufnaglJun 4 2013 543 PM
Hi Thomas
thank you for the interesting tutorial
Can you tell me whether it is possible to download the source code of the ldquoPutting it all togetherrdquovideo And if yes Where can I download itThanks
Christoph
Vivek Singh BhojJun 4 2013 1116 AM
Hi Thomas
Thanks for OpenSAP classes
Your Youtube Account also have very good exercises
IN OpenSAP Week 2 Unit 3 tutorial after assigning admin role to my user Id i am not able to see sequences
synonyms triggers under my schema or any other schema i am only able to see Column Views Procedures
Tables and Views
Though now i am able to insert data into my created table
Can you let me know how i will be able to see Sequences under my schema without removing the admin role
I am using HANA revision 52
Got to know from OpenSAP that
This is a known issue and the only way that Ive seen to fix it is to actually close the studio and open it again
then refresh the node
Cheers
Rich Heilman
SAP HANA Product Management
Will this bug be fixed in HANA ver 56
Chandra Edem in response to Thomas Jung on page 53Jun 4 2013 646 AM
Thomas
I registered for OpenSAP course Introduction to Software Development on SAP HANA on June 2 900PM
I didnt know that it is going to end WEEK1 assignment test on 632013 300PM Is there any way can take
that WEEK1 Assignment Test
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010053
Thanks
Chandra
Thomas Jung in response to Alexander Bauer on page Jun 3 2013 856 PM
SAPUI5 gets updated auutomatically when you apply HANA revisions There is no additional download or
update needed
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010048
But I am not able to fetch the data on blank HTML page is coming with no data
If there is any step by step document related to this please help in getting that
Any help will be highly appreciated
Thanks
Ashutosh
Naveen KumarSep 26 2013 1130 AM
Good Document
Heber FabianoAug 27 2013 323 PM
Great content as always Keep sharing with us
Thomas Jung in response to Orel Stringa on page 48Aug 27 2013 147 PM
This is currently not possible The CORS support is for all origins We dont yet have the feature to maintain a
whitelist of CORS origins
Orel Stringa in response to Thomas Jung on page Aug 27 2013 801 AM
Hi Thomas
nice to see that SAP has made it possible with SP6 to specify cross origin resource sharing (CORS) support
via the xsaccess file SP6 HANA development guide has example of how to specify CORS support
I have build an XS application and would like to serve SAPUI5 on a diffhost than XSHANA
How can I specify that I would like to allow cross origin access restricted to certain domain(s) only
Is there a special keyword syntax for specifying that
Thank yoi
Orel
Vijay UthayakumarAug 27 2013 131 AM
Highly informative amp digestible Fantastic work
Jerry WangAug 1 2013 955 AM
Hi Tomas
Thank you
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010049
Jerry
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 644 PM
JSLint checks are very strict and often produce syntax errors for items that just stylistic and wont actually
cause an error upon activation or runtime You can either ignore the JSLint errors or deactivate JSLint for this
project in these cases However it might also be an indication that the JavaScript code you are trying to import
isnt compatible with Strict mode
httpsdevelopermozillaorgen-USdocsWebJavaScriptReferenceFunctions_and_function_scope
Strict_mode
Milan Vrozina in response to Thomas Jung on page 49Jul 21 2013 624 PM
Thanks for clarification I thought there would be some kind of import
But anyway in case of this specific library I have some problems with JSLint validation when I do cut and paste
of the original code
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 343 PM
What kind of problem are you having using this library Strict mode JavaScript which doesnt try to access the
DOM Window or other client side specific objects should work in Server Side XSJS Generally if you have a
library you just cut and paste into your XSJS or an XSJSLIB file and then call the functions from your code
Milan VrozinaJul 21 2013 339 PM
Hello
first and foremost thank you for perfect openSAP classes related to HANA development and for this blog as
well
I have one question related to server-side javascript You mentioned in course that is possible to use 3rd party
libraries or reuse 3rd party code But I cant find a possible way how to import 3rd party javascript library -as
is- to server and use it For example I would like to use JSZip library to zip some file before sending it to client
from xsjs application Is that possible Thank you
Chandrashekhar MahajanJul 3 2013 734 PM
This is excellent blog Now HANA XS is very much clear to me
Mohan krishnaJul 1 2013 144 PM
WOW - great blog Thomas This will be very helpful in understanding SAP hana Good Job
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010050
Abdul Hakim in response to Thomas Jung on page 50Jun 27 2013 833 PM
Thanks for the clarification
Thomas Jung in response to Abdul Hakim on page 50Jun 27 2013 659 PM
HANA Extended Application Services uses SQLScript and JavaScript as its two primary programming
languages
gtwhether the current SAP Business suite based on ABAP will be completely migrated to HANA service
No The Business Suite already runs on HANA but still via the ABAP application server It will continue to
leverage HANA via a combination of enhancements to ABAP and utilizing some of the technologies described
in this blog
gtAlso whether ABAP can be used to built application in HANA extended services
No There is no ABAP language container in HANA Extended Application Services
Abdul HakimJun 27 2013 405 PM
Hi Thomas - What is the programming language used for HANA Extended application services
As HANA is more than a database ie application platform by itself and as you mentioned that more and more
applications will be built on HANA i have question as how the future SAP ERP system looks likewhether the
current SAP Business suite based on ABAP will be completely migrated to HANA service in the future or SAP
ABAP server will continue to evolve and receive focus investment from SAP Also whether ABAP can be used
to built application in HANA extended services Your thoughts
Thanks
Abdul Hakim
Thomas Jung in response to Ravindra Channe on page 50Jun 11 2013 830 PM
Yes it is still planned However we are still a couple of weeks away and Ive not seen the final installers to say
for certain its there
Ravindra ChanneJun 11 2013 815 PM
Hi Thomas
Thanks for a wonderful and very informative blog Is there any update on 32 bit REGI file
Is it expected along with SPS6
Regards
Ravi
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010051
Thomas Jung in response to Amanda Rzepka on page Jun 7 2013 942 PM
gtCan the XS Services be used in a BW on HANA Scenario
Yes XS is part of ALL HANA systems You should check and make sure you are licensed for direct access to
the underlying HANA instance however
Thomas Jung in response to Holger Schimanski on page Jun 7 2013 941 PM
gtIs there a similar library which could be used in XS Engine
The XSODATA development object is similar We also have higher level frameworks for XMLA and Search
Services (InA) You can expect more such high level frameworks to be added to the HANA Extended
Application Services in the future
Thomas Jung in response to Manav Mehra on page Jun 7 2013 939 PM
Have you used something like the Chrome developer tools to see see if you are getting any client side
javascript errors or to see if the request to your xsodata service is successful
Thomas Jung in response to Christian Hufnagl on page 52Jun 7 2013 938 PM
It will ship as non-automatic content in SPS6 (all systems will have it and it just needs to be imported) The
delivery units are also part of this weeks updates to the Cloudshare and AWS developer center images They
are also available for download as part of the content of the openSAP course
Thomas Jung in response to Matthew Pickell on page 51Jun 7 2013 937 PM
CORS support will come with SPS6 at the end of June
Thomas Jung in response to Jeroen Custers on page 51Jun 7 2013 936 PM
gtWill this bug be fixed in HANA ver 56
Personally Ive still experienced this bug in SPS6 internal builds Must be a tricky one to find Luckily the
workaround of closing and reopening isnt too difficult Just annoying This also probably makes the bug low
priority
Jeroen Custers in response to Vivek Singh Bhoj on page 52Jun 7 2013 411 PM
This issue also occurs on rev56
Matthew PickellJun 7 2013 258 PM
Thomas
Has CORS been included in a release yet
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010052
Vivek Singh Bhoj in response to Chandra Edem on page 52Jun 5 2013 601 AM
Hi Chandra
Date for Week1 Assignment has been extended till June 11
So you can give Week 1 Assignment now
Christian HufnaglJun 4 2013 543 PM
Hi Thomas
thank you for the interesting tutorial
Can you tell me whether it is possible to download the source code of the ldquoPutting it all togetherrdquovideo And if yes Where can I download itThanks
Christoph
Vivek Singh BhojJun 4 2013 1116 AM
Hi Thomas
Thanks for OpenSAP classes
Your Youtube Account also have very good exercises
IN OpenSAP Week 2 Unit 3 tutorial after assigning admin role to my user Id i am not able to see sequences
synonyms triggers under my schema or any other schema i am only able to see Column Views Procedures
Tables and Views
Though now i am able to insert data into my created table
Can you let me know how i will be able to see Sequences under my schema without removing the admin role
I am using HANA revision 52
Got to know from OpenSAP that
This is a known issue and the only way that Ive seen to fix it is to actually close the studio and open it again
then refresh the node
Cheers
Rich Heilman
SAP HANA Product Management
Will this bug be fixed in HANA ver 56
Chandra Edem in response to Thomas Jung on page 53Jun 4 2013 646 AM
Thomas
I registered for OpenSAP course Introduction to Software Development on SAP HANA on June 2 900PM
I didnt know that it is going to end WEEK1 assignment test on 632013 300PM Is there any way can take
that WEEK1 Assignment Test
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010053
Thanks
Chandra
Thomas Jung in response to Alexander Bauer on page Jun 3 2013 856 PM
SAPUI5 gets updated auutomatically when you apply HANA revisions There is no additional download or
update needed
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010049
Jerry
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 644 PM
JSLint checks are very strict and often produce syntax errors for items that just stylistic and wont actually
cause an error upon activation or runtime You can either ignore the JSLint errors or deactivate JSLint for this
project in these cases However it might also be an indication that the JavaScript code you are trying to import
isnt compatible with Strict mode
httpsdevelopermozillaorgen-USdocsWebJavaScriptReferenceFunctions_and_function_scope
Strict_mode
Milan Vrozina in response to Thomas Jung on page 49Jul 21 2013 624 PM
Thanks for clarification I thought there would be some kind of import
But anyway in case of this specific library I have some problems with JSLint validation when I do cut and paste
of the original code
Thomas Jung in response to Milan Vrozina on page 49Jul 21 2013 343 PM
What kind of problem are you having using this library Strict mode JavaScript which doesnt try to access the
DOM Window or other client side specific objects should work in Server Side XSJS Generally if you have a
library you just cut and paste into your XSJS or an XSJSLIB file and then call the functions from your code
Milan VrozinaJul 21 2013 339 PM
Hello
first and foremost thank you for perfect openSAP classes related to HANA development and for this blog as
well
I have one question related to server-side javascript You mentioned in course that is possible to use 3rd party
libraries or reuse 3rd party code But I cant find a possible way how to import 3rd party javascript library -as
is- to server and use it For example I would like to use JSZip library to zip some file before sending it to client
from xsjs application Is that possible Thank you
Chandrashekhar MahajanJul 3 2013 734 PM
This is excellent blog Now HANA XS is very much clear to me
Mohan krishnaJul 1 2013 144 PM
WOW - great blog Thomas This will be very helpful in understanding SAP hana Good Job
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010050
Abdul Hakim in response to Thomas Jung on page 50Jun 27 2013 833 PM
Thanks for the clarification
Thomas Jung in response to Abdul Hakim on page 50Jun 27 2013 659 PM
HANA Extended Application Services uses SQLScript and JavaScript as its two primary programming
languages
gtwhether the current SAP Business suite based on ABAP will be completely migrated to HANA service
No The Business Suite already runs on HANA but still via the ABAP application server It will continue to
leverage HANA via a combination of enhancements to ABAP and utilizing some of the technologies described
in this blog
gtAlso whether ABAP can be used to built application in HANA extended services
No There is no ABAP language container in HANA Extended Application Services
Abdul HakimJun 27 2013 405 PM
Hi Thomas - What is the programming language used for HANA Extended application services
As HANA is more than a database ie application platform by itself and as you mentioned that more and more
applications will be built on HANA i have question as how the future SAP ERP system looks likewhether the
current SAP Business suite based on ABAP will be completely migrated to HANA service in the future or SAP
ABAP server will continue to evolve and receive focus investment from SAP Also whether ABAP can be used
to built application in HANA extended services Your thoughts
Thanks
Abdul Hakim
Thomas Jung in response to Ravindra Channe on page 50Jun 11 2013 830 PM
Yes it is still planned However we are still a couple of weeks away and Ive not seen the final installers to say
for certain its there
Ravindra ChanneJun 11 2013 815 PM
Hi Thomas
Thanks for a wonderful and very informative blog Is there any update on 32 bit REGI file
Is it expected along with SPS6
Regards
Ravi
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010051
Thomas Jung in response to Amanda Rzepka on page Jun 7 2013 942 PM
gtCan the XS Services be used in a BW on HANA Scenario
Yes XS is part of ALL HANA systems You should check and make sure you are licensed for direct access to
the underlying HANA instance however
Thomas Jung in response to Holger Schimanski on page Jun 7 2013 941 PM
gtIs there a similar library which could be used in XS Engine
The XSODATA development object is similar We also have higher level frameworks for XMLA and Search
Services (InA) You can expect more such high level frameworks to be added to the HANA Extended
Application Services in the future
Thomas Jung in response to Manav Mehra on page Jun 7 2013 939 PM
Have you used something like the Chrome developer tools to see see if you are getting any client side
javascript errors or to see if the request to your xsodata service is successful
Thomas Jung in response to Christian Hufnagl on page 52Jun 7 2013 938 PM
It will ship as non-automatic content in SPS6 (all systems will have it and it just needs to be imported) The
delivery units are also part of this weeks updates to the Cloudshare and AWS developer center images They
are also available for download as part of the content of the openSAP course
Thomas Jung in response to Matthew Pickell on page 51Jun 7 2013 937 PM
CORS support will come with SPS6 at the end of June
Thomas Jung in response to Jeroen Custers on page 51Jun 7 2013 936 PM
gtWill this bug be fixed in HANA ver 56
Personally Ive still experienced this bug in SPS6 internal builds Must be a tricky one to find Luckily the
workaround of closing and reopening isnt too difficult Just annoying This also probably makes the bug low
priority
Jeroen Custers in response to Vivek Singh Bhoj on page 52Jun 7 2013 411 PM
This issue also occurs on rev56
Matthew PickellJun 7 2013 258 PM
Thomas
Has CORS been included in a release yet
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010052
Vivek Singh Bhoj in response to Chandra Edem on page 52Jun 5 2013 601 AM
Hi Chandra
Date for Week1 Assignment has been extended till June 11
So you can give Week 1 Assignment now
Christian HufnaglJun 4 2013 543 PM
Hi Thomas
thank you for the interesting tutorial
Can you tell me whether it is possible to download the source code of the ldquoPutting it all togetherrdquovideo And if yes Where can I download itThanks
Christoph
Vivek Singh BhojJun 4 2013 1116 AM
Hi Thomas
Thanks for OpenSAP classes
Your Youtube Account also have very good exercises
IN OpenSAP Week 2 Unit 3 tutorial after assigning admin role to my user Id i am not able to see sequences
synonyms triggers under my schema or any other schema i am only able to see Column Views Procedures
Tables and Views
Though now i am able to insert data into my created table
Can you let me know how i will be able to see Sequences under my schema without removing the admin role
I am using HANA revision 52
Got to know from OpenSAP that
This is a known issue and the only way that Ive seen to fix it is to actually close the studio and open it again
then refresh the node
Cheers
Rich Heilman
SAP HANA Product Management
Will this bug be fixed in HANA ver 56
Chandra Edem in response to Thomas Jung on page 53Jun 4 2013 646 AM
Thomas
I registered for OpenSAP course Introduction to Software Development on SAP HANA on June 2 900PM
I didnt know that it is going to end WEEK1 assignment test on 632013 300PM Is there any way can take
that WEEK1 Assignment Test
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010053
Thanks
Chandra
Thomas Jung in response to Alexander Bauer on page Jun 3 2013 856 PM
SAPUI5 gets updated auutomatically when you apply HANA revisions There is no additional download or
update needed
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010050
Abdul Hakim in response to Thomas Jung on page 50Jun 27 2013 833 PM
Thanks for the clarification
Thomas Jung in response to Abdul Hakim on page 50Jun 27 2013 659 PM
HANA Extended Application Services uses SQLScript and JavaScript as its two primary programming
languages
gtwhether the current SAP Business suite based on ABAP will be completely migrated to HANA service
No The Business Suite already runs on HANA but still via the ABAP application server It will continue to
leverage HANA via a combination of enhancements to ABAP and utilizing some of the technologies described
in this blog
gtAlso whether ABAP can be used to built application in HANA extended services
No There is no ABAP language container in HANA Extended Application Services
Abdul HakimJun 27 2013 405 PM
Hi Thomas - What is the programming language used for HANA Extended application services
As HANA is more than a database ie application platform by itself and as you mentioned that more and more
applications will be built on HANA i have question as how the future SAP ERP system looks likewhether the
current SAP Business suite based on ABAP will be completely migrated to HANA service in the future or SAP
ABAP server will continue to evolve and receive focus investment from SAP Also whether ABAP can be used
to built application in HANA extended services Your thoughts
Thanks
Abdul Hakim
Thomas Jung in response to Ravindra Channe on page 50Jun 11 2013 830 PM
Yes it is still planned However we are still a couple of weeks away and Ive not seen the final installers to say
for certain its there
Ravindra ChanneJun 11 2013 815 PM
Hi Thomas
Thanks for a wonderful and very informative blog Is there any update on 32 bit REGI file
Is it expected along with SPS6
Regards
Ravi
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010051
Thomas Jung in response to Amanda Rzepka on page Jun 7 2013 942 PM
gtCan the XS Services be used in a BW on HANA Scenario
Yes XS is part of ALL HANA systems You should check and make sure you are licensed for direct access to
the underlying HANA instance however
Thomas Jung in response to Holger Schimanski on page Jun 7 2013 941 PM
gtIs there a similar library which could be used in XS Engine
The XSODATA development object is similar We also have higher level frameworks for XMLA and Search
Services (InA) You can expect more such high level frameworks to be added to the HANA Extended
Application Services in the future
Thomas Jung in response to Manav Mehra on page Jun 7 2013 939 PM
Have you used something like the Chrome developer tools to see see if you are getting any client side
javascript errors or to see if the request to your xsodata service is successful
Thomas Jung in response to Christian Hufnagl on page 52Jun 7 2013 938 PM
It will ship as non-automatic content in SPS6 (all systems will have it and it just needs to be imported) The
delivery units are also part of this weeks updates to the Cloudshare and AWS developer center images They
are also available for download as part of the content of the openSAP course
Thomas Jung in response to Matthew Pickell on page 51Jun 7 2013 937 PM
CORS support will come with SPS6 at the end of June
Thomas Jung in response to Jeroen Custers on page 51Jun 7 2013 936 PM
gtWill this bug be fixed in HANA ver 56
Personally Ive still experienced this bug in SPS6 internal builds Must be a tricky one to find Luckily the
workaround of closing and reopening isnt too difficult Just annoying This also probably makes the bug low
priority
Jeroen Custers in response to Vivek Singh Bhoj on page 52Jun 7 2013 411 PM
This issue also occurs on rev56
Matthew PickellJun 7 2013 258 PM
Thomas
Has CORS been included in a release yet
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010052
Vivek Singh Bhoj in response to Chandra Edem on page 52Jun 5 2013 601 AM
Hi Chandra
Date for Week1 Assignment has been extended till June 11
So you can give Week 1 Assignment now
Christian HufnaglJun 4 2013 543 PM
Hi Thomas
thank you for the interesting tutorial
Can you tell me whether it is possible to download the source code of the ldquoPutting it all togetherrdquovideo And if yes Where can I download itThanks
Christoph
Vivek Singh BhojJun 4 2013 1116 AM
Hi Thomas
Thanks for OpenSAP classes
Your Youtube Account also have very good exercises
IN OpenSAP Week 2 Unit 3 tutorial after assigning admin role to my user Id i am not able to see sequences
synonyms triggers under my schema or any other schema i am only able to see Column Views Procedures
Tables and Views
Though now i am able to insert data into my created table
Can you let me know how i will be able to see Sequences under my schema without removing the admin role
I am using HANA revision 52
Got to know from OpenSAP that
This is a known issue and the only way that Ive seen to fix it is to actually close the studio and open it again
then refresh the node
Cheers
Rich Heilman
SAP HANA Product Management
Will this bug be fixed in HANA ver 56
Chandra Edem in response to Thomas Jung on page 53Jun 4 2013 646 AM
Thomas
I registered for OpenSAP course Introduction to Software Development on SAP HANA on June 2 900PM
I didnt know that it is going to end WEEK1 assignment test on 632013 300PM Is there any way can take
that WEEK1 Assignment Test
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010053
Thanks
Chandra
Thomas Jung in response to Alexander Bauer on page Jun 3 2013 856 PM
SAPUI5 gets updated auutomatically when you apply HANA revisions There is no additional download or
update needed
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010051
Thomas Jung in response to Amanda Rzepka on page Jun 7 2013 942 PM
gtCan the XS Services be used in a BW on HANA Scenario
Yes XS is part of ALL HANA systems You should check and make sure you are licensed for direct access to
the underlying HANA instance however
Thomas Jung in response to Holger Schimanski on page Jun 7 2013 941 PM
gtIs there a similar library which could be used in XS Engine
The XSODATA development object is similar We also have higher level frameworks for XMLA and Search
Services (InA) You can expect more such high level frameworks to be added to the HANA Extended
Application Services in the future
Thomas Jung in response to Manav Mehra on page Jun 7 2013 939 PM
Have you used something like the Chrome developer tools to see see if you are getting any client side
javascript errors or to see if the request to your xsodata service is successful
Thomas Jung in response to Christian Hufnagl on page 52Jun 7 2013 938 PM
It will ship as non-automatic content in SPS6 (all systems will have it and it just needs to be imported) The
delivery units are also part of this weeks updates to the Cloudshare and AWS developer center images They
are also available for download as part of the content of the openSAP course
Thomas Jung in response to Matthew Pickell on page 51Jun 7 2013 937 PM
CORS support will come with SPS6 at the end of June
Thomas Jung in response to Jeroen Custers on page 51Jun 7 2013 936 PM
gtWill this bug be fixed in HANA ver 56
Personally Ive still experienced this bug in SPS6 internal builds Must be a tricky one to find Luckily the
workaround of closing and reopening isnt too difficult Just annoying This also probably makes the bug low
priority
Jeroen Custers in response to Vivek Singh Bhoj on page 52Jun 7 2013 411 PM
This issue also occurs on rev56
Matthew PickellJun 7 2013 258 PM
Thomas
Has CORS been included in a release yet
Thanks
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010052
Vivek Singh Bhoj in response to Chandra Edem on page 52Jun 5 2013 601 AM
Hi Chandra
Date for Week1 Assignment has been extended till June 11
So you can give Week 1 Assignment now
Christian HufnaglJun 4 2013 543 PM
Hi Thomas
thank you for the interesting tutorial
Can you tell me whether it is possible to download the source code of the ldquoPutting it all togetherrdquovideo And if yes Where can I download itThanks
Christoph
Vivek Singh BhojJun 4 2013 1116 AM
Hi Thomas
Thanks for OpenSAP classes
Your Youtube Account also have very good exercises
IN OpenSAP Week 2 Unit 3 tutorial after assigning admin role to my user Id i am not able to see sequences
synonyms triggers under my schema or any other schema i am only able to see Column Views Procedures
Tables and Views
Though now i am able to insert data into my created table
Can you let me know how i will be able to see Sequences under my schema without removing the admin role
I am using HANA revision 52
Got to know from OpenSAP that
This is a known issue and the only way that Ive seen to fix it is to actually close the studio and open it again
then refresh the node
Cheers
Rich Heilman
SAP HANA Product Management
Will this bug be fixed in HANA ver 56
Chandra Edem in response to Thomas Jung on page 53Jun 4 2013 646 AM
Thomas
I registered for OpenSAP course Introduction to Software Development on SAP HANA on June 2 900PM
I didnt know that it is going to end WEEK1 assignment test on 632013 300PM Is there any way can take
that WEEK1 Assignment Test
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010053
Thanks
Chandra
Thomas Jung in response to Alexander Bauer on page Jun 3 2013 856 PM
SAPUI5 gets updated auutomatically when you apply HANA revisions There is no additional download or
update needed
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010052
Vivek Singh Bhoj in response to Chandra Edem on page 52Jun 5 2013 601 AM
Hi Chandra
Date for Week1 Assignment has been extended till June 11
So you can give Week 1 Assignment now
Christian HufnaglJun 4 2013 543 PM
Hi Thomas
thank you for the interesting tutorial
Can you tell me whether it is possible to download the source code of the ldquoPutting it all togetherrdquovideo And if yes Where can I download itThanks
Christoph
Vivek Singh BhojJun 4 2013 1116 AM
Hi Thomas
Thanks for OpenSAP classes
Your Youtube Account also have very good exercises
IN OpenSAP Week 2 Unit 3 tutorial after assigning admin role to my user Id i am not able to see sequences
synonyms triggers under my schema or any other schema i am only able to see Column Views Procedures
Tables and Views
Though now i am able to insert data into my created table
Can you let me know how i will be able to see Sequences under my schema without removing the admin role
I am using HANA revision 52
Got to know from OpenSAP that
This is a known issue and the only way that Ive seen to fix it is to actually close the studio and open it again
then refresh the node
Cheers
Rich Heilman
SAP HANA Product Management
Will this bug be fixed in HANA ver 56
Chandra Edem in response to Thomas Jung on page 53Jun 4 2013 646 AM
Thomas
I registered for OpenSAP course Introduction to Software Development on SAP HANA on June 2 900PM
I didnt know that it is going to end WEEK1 assignment test on 632013 300PM Is there any way can take
that WEEK1 Assignment Test
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010053
Thanks
Chandra
Thomas Jung in response to Alexander Bauer on page Jun 3 2013 856 PM
SAPUI5 gets updated auutomatically when you apply HANA revisions There is no additional download or
update needed
SAP HANA Developer Center SAP HANA Extended Application Services
Generated by Jive on 2015-02-28+010053
Thanks
Chandra
Thomas Jung in response to Alexander Bauer on page Jun 3 2013 856 PM
SAPUI5 gets updated auutomatically when you apply HANA revisions There is no additional download or
update needed