Hi everybody,
I'm pretty new to SAP HANA Cloud Platform and have a big problem with my application. I wrote a SAPUI5 application which is currently running on HANA Cloud Platform. The app has a normal database schema. I created via a database-tunnel a connection to the schema and created a database and filled it with data. What I wanna do now is to connect my SAPUI5 application with this database table. I want to receive the data as a odata service but this doen't work. I read something about creating a .xsodata file which has the following structure:
service namespace "myNamespace" {
"SCHEMANAME"."TABLENAME"
as "TABLE_ALIAS";
}
The SCHEMANAME is exactly the name of the schema how it is named on SAP HANA Cloud Platform. The table name is the name how the table is named in the schema.
Just for your information... the .xsodata file is inside a folder in my SAPUI5 application. When I create the oData Model I call the url of the application -> .xsodata.
Doesn't work at all... Can somebody help me solving this issue?
Looking forward to your answers!
Greetings
Hi,
what have you exactly done? I have my custom schema "NEO_XXXXX..." and in this is my table. Afterwards I created a repository and checked this out. Then I created a normal XS-Project. In this XS-Project there are the following files:
- .xsapp --> no content
- .xsaccess
{
"exposed" : true
}
- .xsprivileges
{ "privileges" :
[ { "name" : "Basic", "description" : "Basic usage privilege" } ]}
- .odata.xsodata
service{
"NEO_XXXXX..."."TABLE_NAME";
}
- model_access.hdbrole
role pMYUSERtriall.MYPACKAGE::model_access {
catalog schema "NEO_XXXX...": SELECT, UPDATE, INSERT, DELETE;
}
- application_access.hdbrole
role pMYUSERtrial.MYPACKAGE::application_access {
application privilege: pMYUSERtrial.MYPACKAGE::Basic;
}
After activating these objects, calling the SQL Statement you wrote and calling my odata.xsodata service I get again
Service exception: insufficient privilege.
What have I made wrong? ...
Looking forward to your help.
Greetings
Stef
Hi,
here is a small status update! I made it now to call the .xsodata file. I don't have a problem with calling the .xsodata/ and also not with calling .xsodata/$metadata
But when I try the following: .xsodata/DETAIL I receive the following message:
Service exception: insufficient privilege.
I also tried then to build up a .hdbrole file with the following content:
role pMYUSERtrial.MYPACKAGE::schema_role {
catalog sql object "NEO_MYSCHEMA"."MYTABLE" : SELECT,UPDATE,INSERT,DELETE;
}
After activating all the files I try to call the following:
call "HCP"."HCP_GRANT_ROLE_TO_USER"('pMYUSERtrial.MYPACKAGE::schema_role', 'MYUSER');
But I can't because I get an error saying "insufficient privileges" ... By the way ... I work with the SAP HANA Cloud Platform Trial
I really hope that somebody can help me solving this problem...
Greetings
HI,
I have followed all steps mentioned above to create odata service on hcp. i have also executed both sql commands which executed successfully but if i try to run odata file then it gives page not found error on hcp,
please help me to resolve this issue.
HI,
I have followed all steps mentioned above to create odata service on hcp. i have also executed both sql commands which executed successfully but if i try to run odata file then it gives page not found error on hcp,
please help me to resolve this issue.
Add a comment