Skip to Content
Jan 17 at 07:24 AM

CAP: Service Consumption : Trial Balance


Hello Experts,

I am new to CAP and have requirement to consume trial balance API ( for the entity C_TrialBalance. In this entity, if we see, it has a navigation property called Results and I have to consume the service as it is given in the "business documentation" of this API here. Putting the snapshot of the sample URL here:'2018-01-01T00%3A00%3A00',P_ToPostingDate=datetime'2018-12-31T00%3A00%3A00')/Results?

What I did so far:-

1. Created srv->Catalog-Service.cds file with the entity definition from C_TRIALBALANCE & C_TRIALBALANCEResults entity.

2. Created srv->Catalog-Service.js file with the implementation to call READ on C_TRIALBALANCE.

3. Package.json is all in place with the destination created.

Of course, this is incomplete. I am not sure what do I write code to have the call given as in the above URL with navigation properties filtered and main entity queried with date values.

Kindly help.

Thanks & Regards

Srinivas Rao.