cancel
Showing results for 
Search instead for 
Did you mean: 

Virtual fields on CAP with version 7

smorenod
Explorer

Hello experts !!

We are checking the new version of @sap/cds@7.0.2 and we found an issue:

S4.PurchaseOrders it's a view to fetch data through SDA HANA Cloud

entity PurchaseOrders as projection on s4.PurchaseOrders{
*,
virtual null as Errors:refs.ErrorMessages
}

We have created this virtual with refs.ErrorMessages arrayed type:

type: ErrorMessages: array of{
category:String(20);
shortMessage:String(100);
}

And we are getting an error on executing cds build command

[ERROR] db/refs.cds:19:5: Artifact “cds.String” has not been found (in element:)<br>

This doesn't happen with last version 6, please can you suggest what is the issue??

Best regards,

Sara.

patricebender
Product and Topic Expert
Product and Topic Expert
0 Kudos

please provide a minimal sample to reproduce the issue. Your snippet is incomplete. Alternatively, provide a link to your project and detailed steps to reproduce. Thanks.

martinfrick
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi morensar

might be another issue but the colon after the "type" keyword is obviously wrong.

Martin

smorenod
Explorer
0 Kudos

Hello martinfrick patricetao

Here you have an example saradasilva/capv7issue1: Virtual table view issue (github.com)

You just need to execute cds build and the error will be triggered

martinfrick
Product and Topic Expert
Product and Topic Expert
0 Kudos

Yes, I face the same issue. Seems to be a bug from my PoV.

Maybe david.kunz2 can take it to the right folks?

Thanks!

Martin

david_kunz2
Advisor
Advisor
0 Kudos

Hi hans-joachim.both , could you have a look?

patricebender
Product and Topic Expert
Product and Topic Expert
0 Kudos

thanks for providing the snippet. We will look into this and get back to you asap.

View Entire Topic
patricebender
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Sara,

Thanks for reporting and for your example project.

We identified this as a regression in the `cds-compiler`. The issue is actually that the compiler can't handle the structured type in your cdl-style cast.

We will prepare a fix for this. Once we have released the version which includes the fix, I'll let you know by updating this answer.

Best Regards,

Patrice

smorenod
Explorer
0 Kudos

Thanks a lot for the support and really quick response!!

patricebender
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Sara,

we just released @sap/cds-compiler v4.1.2 which includes the fix for your issue.

Best Regards,
Patrice

smorenod
Explorer
0 Kudos

Thanks a lot patricetao

I will check and come back to you again to confirm that now it's working for us 🙂

smorenod
Explorer
0 Kudos

Hello patricetao now it's working perfectly 😉 thanks a lot again!