cancel
Showing results for 
Search instead for 
Did you mean: 

SAP CAP virtual field leads to out of memory

T1mey
Active Participant
750

Hello @all,

we have some trouble with virtual fileds in CAP 7.2.1

virtual isAdmin           : Boolean default false;
virtual appTypeIcon       : String default 'img/phenix_blue.svg';

We're controlling some input fields and switching an icon depending on the type.

It seems that we're ending up in an infinite loop when accessing the object page for some reason.

The Fiori elements UI freezes and ends up in an out of memory exception.

CAP log shows this

AFTER READ DRAFT !!!
[odata] - POST /odata/v4/application/$batch
[odata] - > READ Applications(ID=09ed2125-03a0-401c-affe-203670e7a83c,IsActiveEntity=false) { '$select': 'appTypeIcon' }
AFTER READ DRAFT !!!
[odata] - POST /odata/v4/application/$batch
[odata] - > READ Applications(ID=09ed2125-03a0-401c-affe-203670e7a83c,IsActiveEntity=false) { '$select': 'appTypeIcon' }
AFTER READ DRAFT !!!
[odata] - POST /odata/v4/application/$batch
[odata] - > READ Applications(ID=09ed2125-03a0-401c-affe-203670e7a83c,IsActiveEntity=false) { '$select': 'appTypeIcon' }
AFTER READ DRAFT !!!
[odata] - POST /odata/v4/application/$batch
[odata] - > READ Applications(ID=09ed2125-03a0-401c-affe-203670e7a83c,IsActiveEntity=false) { '$select': 'appTypeIcon' }
AFTER READ DRAFT !!!
[odata] - POST /odata/v4/application/$batch
[odata] - > READ Applications(ID=09ed2125-03a0-401c-affe-203670e7a83c,IsActiveEntity=false) { '$select': 'appTypeIcon' }

In previous versions used our coding worked. Seems to be some problem with 7.2.x maybe.

Or it might be related to the new sqlite package, as we switched to that as well.

Anybody similar problems ?

View Entire Topic
T1mey
Active Participant

Please make sure to set the virtual field(s) in your event handler in every case (not only conditiuonal) to a value.

Cmdd
Participant
0 Kudos

Thanks! I (apparently) solved all my problems by setting default values to virtual fields both in "regular" and in draft mode

T1mey
Active Participant
0 Kudos
enjoy... took me some time to understand it