Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
YVL
Advisor
Advisor

SAP HANA has this XS engine which runs a light-weight web platform.  It allows mobile applicationor web application directly communicate to the HANA appliance via HTTP protocol.

The development of XS application is well-documented in the HANA developer guide (http://help.sap.com/hana/hana_dev_en.pdf).  However, during the development process, a few things were overlooked.  Therefore, some points are highlighted here for anyone going to try this approach.  The iPhone portion of the development process will be in another blog.

  1. XSengine enablement: XS engine is not installed by default.  Therefore, not all HANA installation has XSengine enabled.  Check the OS process for XSengine or the XSengine service on administrator  console.  To enable the XSengine, add/change parameters inside the file daemon.ini.
  2. OData REST protocol “read”-support from HANA starts from HANA SPS5.  The other actions (delete,update, insert) are unavailable for SPS5 and will be available for SPS6.  Javascript, however, was supported since HANA SPS3.  Therefore, take this into consideration about which interface format you will use for which release.
  3. Sharing projects among team members requires creating a role and assigning the role to each member.  HANA developer guide (http://help.sap.com/hana/hana_dev_en.pdf) section 13 describes the creation and definition of roles.  You cannot miss this if you are developing in
    a team.
  4. Sequence object of HANA: The object “Sequence” is used to create a set of unique numbers.  The repository file .hdbsequence is for creating the sequence object .  Sequence object is analogous to the “number range” object that ABAP world is familiar with.  Detail can be found in SPS 5 developer guide (http://help.sap.com/hana/hana_dev_en.pdf) section 6.6 Sequences.
  5. Timestamp of HANA:  Instead of passing timestamp from clients, the timestamp in UTC can be obtained from HANA platform by using the SQL statement: 'select CURRENT_UTCTIMESTAMP "Coordinated Universal Timestamp" from DUMMY'.
  6. Debugging of HANA javascript.  The recording from saphana.com (http://www.saphana.com/docs/DOC-3037) is very useful.

          Example of sequence object:

            

var query = 'select\"schema\".\"package::sequence object\".NEXTVAL from DUMMY';

var pstmt = conn.prepareStatement(query);

var rs = pstmt.executeQuery();

if (rs.next()){id = rs.getString(1);}

     The variable id can be used as a parameter in the insert SQL statement afterwards.