cancel
Showing results for 
Search instead for 
Did you mean: 

XSOdata - POST on table with no key column

BenedictV
Active Contributor
0 Kudos

I have a table that does not require a key column to be specified. When defining an odata service, I used the 'Keys generate as local("ID")' to specify a key.

Problem is when I use a POST method to create records, I get 'Status - 501 not implemented', both when I use an ID column or if I drop it. Is there a way around this or should I define a dummy key column in my table?

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member182302
Active Contributor
0 Kudos

This should work benedict. Can you share your code which you are trying to use.
I didn't double check in my system but as per this post this should work

https://archive.sap.com/discussions/thread/3945703

Regards,
Krishna Tangudu

BenedictV
Active Contributor
0 Kudos

I use a simple definition,

TABLE:

table.schemaName = "<schema>"; table.tableType = COLUMNSTORE; // ROWSTORE is an alternative value table.columns = [ {name = "MY_COL1"; sqlType = VARCHAR; length = 200; }, {name = "MY_COL2"; sqlType = INTEGER; defaultValue = "1";}, {name = "MY_COL3"; sqlType = NVARCHAR; length = 200; } ]; //table.primaryKey.pkcolumns = ["MY_COL1", "MY_COL2"];

ODATA:

service { "VENMANBV"."sce_tdm.test.venmanbv_D75.catalogObjects::ODATA_SAMPLE" as "MyView"

keys generate local "ID";

}