28.01.2013 Views

SAP HANA Developer Guide - Get a Free Blog

SAP HANA Developer Guide - Get a Free Blog

SAP HANA Developer Guide - Get a Free Blog

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

var pstatement1 = conn.prepareStatement( "SELECT * FROM<br />

\"TiPackage::TiTable\" WHERE \"Surname\"='Meyer");<br />

var result = pstatement1.executeQuery();<br />

if (result)<br />

{<br />

if (result.next())<br />

{<br />

$.response.setBody('The sql statement execution was successful.');<br />

}<br />

else<br />

{<br />

$.response.setBody("No data found");<br />

}<br />

$.response.status = $.net.http.OK;<br />

}<br />

else<br />

{<br />

$.response.status = $.net.http.INTERNAL_SERVER_ERROR;<br />

}<br />

result.close();<br />

pstatement1.close();<br />

conn.close();<br />

6. Select the package that you created in the first step.<br />

7. Click the alternate mouse button and choose Commit.<br />

8. Click the alternate mouse button and choose Activate.<br />

9. Access the <strong>SAP</strong> <strong>HANA</strong> XS application with the following URL http://:<br />

80//.xsjs.<br />

You receive the message, The SQL statement execution was sucessful.<br />

5.13 Extending a Table Import<br />

Extend an existing table import file by creating a new table-import configuration file that you use to specify how to<br />

modify the relation to an existing table-import file.<br />

Before you start, ensure that you have deployed a table import; the following files are required for a table import<br />

extension scenario.<br />

● The table-import data file, for example, TiData.hdbtid<br />

Links the new comma-separated-values CSV data files to the data fields and, in turn, the target tables via the<br />

model<br />

● The table-import extension file, for example, TiDataExtend.hdbtid<br />

Extends the table-import data file TiData.hdbtid<br />

● A table-import model, for example, TiModel.hdbtim<br />

Defines the data fields and import target tables of each data field<br />

● A table import package, for example, TiPackage<br />

Contains all the artifacts you need to complete the table-import operation<br />

<strong>SAP</strong> <strong>HANA</strong> <strong>Developer</strong> <strong>Guide</strong><br />

Setting Up the Persistence Model<br />

P U B L I C<br />

© 2012 <strong>SAP</strong> AG. All rights reserved. 89

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!