cancel
Showing results for 
Search instead for 
Did you mean: 

XSODATA: 'create using' procedure leads to authorization error

b_deterd2
Active Contributor
0 Kudos

Hello all,

I have an odata (xsodata) service in which I want to call a CREATE operation using a procedure: create_new.


service  {    "ccm.data::model.dynamicCase.DynamicCaseView"                  

   as "MyView"                                 

   with ( "caseId", "TITLE")                       

   key  ("caseId")

   create using "ccm.data::create_new" ;

   }

The CREATE operation works fine if I call the operation without the procedure 'create_new'. However if I want to create an entry with the procedure I get an error in SAPUI5:


{ "error": { "code": "", "message": { "lang": "en-US", "value": "Service exception: insufficient privilege."},

"innererror":{"exception":"exception  1: no.71000258  (ptime\/query\/checker\/query_check.cc:2588)\n   

Not authorized\nNO exception throw location recorded. Stack generation suppressed.\n"}}}

So it looks like I have to give (myself?) an authorization to call the procedure? Is that a right assumption?

Any one encountered this problem?

Any help will be appreciated.

Regards,

Bert

Accepted Solutions (0)

Answers (1)

Answers (1)

b_deterd2
Active Contributor
0 Kudos

Okay, works now for my own userID.

What I did is to log in with another userID (you cannot alter privileges for yourself):

Go to Security Administration (.../sap/hana/xs/ide/security ).

Go to my userID (Users/<UserID>)

Go to Object Privileges

Select ALL

Save

I cannot imagine this is the regular way of being authorized for executing a procedure, but hey....it works for me and maybe it helps someone else.

Regards,

Bert

Former Member
0 Kudos

Hi,

This is applicable when you have very limited number of users for whom you can assign roles individually but it is not practical when thousands of users may need to access the app.