cancel
Showing results for 
Search instead for 
Did you mean: 

Creating API in Sap XS

Former Member
0 Kudos

Hi,

I want to expose an API from SAP Hana XS Project.

So that i want to call it from other web application using JQuery.

Please help me.

Accepted Solutions (0)

Answers (1)

Answers (1)

sreehari_vpillai
Active Contributor
0 Kudos

XSJS - is executed in the server side(hence server side JS), but jQuery is meant for UI side or client side . What kind of API you want to expose from XS side ? To call any XS service(or web service ) from a web based client, you can use ajax calls.

Sreehari

Former Member
0 Kudos

Hi

I am working in Hana Client server resides on different Machine.

Using this below I am done with O data Service

How Can I access the O Data Service ?

I am trying url using server host name not working.

Please help me.

sreehari_vpillai
Active Contributor
0 Kudos

You have created OData service . Open the XS Project , right click on the .xsodata file, right click and  run as -> XS Application server. This should give you the base URL. From this URL, you can execute and see the data .

go through the below URLs .

http://scn.sap.com/thread/3511748

Tutorial: Consume an OData Service from SAPUI5 - SAP HANA Developer Guide for SAP HANA Studio - SAP ...

Sreehari

Former Member
0 Kudos

Thanks.

But There is no Run Configuration.

In Run Configuration which server details I need to pass Hana Remote Server or my Local machine ?

Please help me.

sreehari_vpillai
Active Contributor
0 Kudos

First you login to the hana system from your hana studio. Then only you will get eh option which I said. Or you can directly give http://<ip>:port/package hierarchy .

Sree

Former Member
0 Kudos

Hi,

I did not see run as -> XS Application server option Please help me.

sreehari_vpillai
Active Contributor
0 Kudos

share a screen shot of your xs project .

Former Member
0 Kudos