cancel
Showing results for 
Search instead for 
Did you mean: 

Facing errors while creating a odata service consuming a calculation view.

0 Kudos

HI All.

I am pretty new to XS , I am trying to create an ODATA service from a calculation view . But whenever I try to activate the service I get the following error

"Missing specification of keys for view "demo::CV_PASS1".

Thanks,

Tanush

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

An OData service must have a key specification as a unique URL for each record must be generated. For table sources XSODATA uses the key specification of the table itself as the source of the OData key.  Calculation views, on the other hand, have no key structure. You must either specify the key columns within the XSODATA document itself

service  {

  "sap.hana.democontent.epmNext.data::MD.BuyerView"

  as "Buyer"

  keys("Id"); 

}

Or use the KEYS GENERATE LOCAL option to have the framework generate a key for you (useful when you have aggregation):

service namespace "sap.hana.democontent.epmNext"  {

   "sap.hana.democontent.epmNext.models::SALESORDER_DYNAMIC_JOIN"

    as "SalesByCountry" with ("COUNTRY", "TOTAL_SALES", "SALES", "SHARE_SALES")  

  keys generate local "ID"

    aggregates always; 

}

0 Kudos

Thanks a lot it worked

former_member198402
Participant
0 Kudos

Dear Expert,

One of the big challenge or we can say drawback of SAP-Fiori which has not provide Feature to handle Object lock ./

As we know OData is Straight Less connection hence Unable to keep Controlling the Lock Object.

PI any one me out if one have any idea, please share me as it's creating big problem while doing work flow related Approval

Thanks for your Time and consideration.

Thanks in advance.

former_member198402
Participant
0 Kudos

Hi Thomas/Rich,

Request you to please go through mentioned below Open issued &  guide me what to do.

OData is Straight Less connection hence Unable to keep Controlling the Lock Object / Enqueue Dequeue.

PI help me out if one have any idea, please share me as it's creating big problem while doing work flow related Approval.

Thanks for your Time and consideration.

Thanks in advance.

Answers (0)