Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Read/Write on an oDdata Service

darkwingmcquack
Explorer
0 Kudos
140
  • SAP Managed Tags:

Hi All, I have create a Hana oData Service which is constructed on a Calculation view with several input parameters.

The Calc view is based on a TableFunction with the same params (linked 1 to 1).

The TF returns a result set of data, as type table

All this works perfect J

I now have an added requirement to track the data that was sent. I modified the TF to insert the primary key of the rows select, into a new table created in order to maintain the state.

I now get an errors activating implying that i am un able to update data because my TF is read only

I have tried it a few different ways,

ie Insert / update inside the TF

****

Syntax error in table function object: feature not supported; INSERT/UPDATE/DELETE are not supported in the READ ONLY procedure/function: line 17 col 1 (at pos 353)

****

I then tried calling a procedure from the TF that in turn will do the insert, which returned a similar error

****

Could not create catalog object: EXPLAIN PLAN and CALL statement are not allowed; CALL for non read only procedure/function is not supported in the READ ONLY procedure/function: line 17 col 12 (at pos 364) info Runtime 'Table Function Runtime' finished activation of 1 object(s) in 28ms

****

I then tried to create an odata service to call my procedure directly (ie not the calc view) but have not been able to get it working yet.

when I compile the service I get the following error when connecting to the procedures. see below error for code as samples

****

Unsupported object type for "Test.MySpace::PRC_GET_DATA"

****

Odata service for procedure code snipit:

"Test.MySpace::PRC_GET_DATA" as "Data" keys generate local "oDataID" parameters via entity;

As much as i understand the read only restriction is somewhat applicable i would not think it applies in all cases. Is there a way to change the 'mode' from read only to read write to enable this or something.

If not, this leads me to believe that oData is only used for reading of datasets, which i did not think it was is sole / limited intention or purpose. I don't see or understand any compelling reason why i should not be able to update data via oData.

0 REPLIES 0