cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Hello Team,

I have two determination like below where I want to update admin fields,

determination AdminCreate on save { create; }

determination AdminUpdate on save { create, update; }

While creating instance, I want create admin fields should be populated and while updating instance, update admin fields should be populated but somehow it causes infinite loop and getting below dump

Error analysis

The application has indicated exception "LCX_ABAP_BEHV_DETVAL_ERROR" as the reason for the
termination:
Infinite loop caused by cyclical triggering of on-save determinations

I need to understand,

  1. How to resolve this because without using update EML inside the determination, how to populate values ?
  2. Why create & update should need to define together in the trigger conditions ?
  3. Any other approach is there for this use case ?

Thanks a lot.

Best Regards,

Muthu

0 Likes
View Entire Topic
JessieCheah
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Muthu,

why not just have determination AdminUpdate on save { create, update; } and in your determination, evaluate if AdminCreate fields are initial, to skip AdminUpdate fields and vice versa (When AdminCreate fields are not initial, to populate AdminUpdate fields)?

Regards,

Jessie

muthuhana37
Explorer
0 Likes

Hello jessie.cheah,

This again going for infinite loop because I have update request EML inside determination which triggers itself again and again.

When I change the trigger conditions to create alone which doesn't trigger for while updating the instance.

JessieCheah
Product and Topic Expert
Product and Topic Expert
0 Likes

Oh yes you're right, because of the { update; }

But before we go further in, what are the admin fields that you are trying to populate? Are those self defined fields, or just fields like CreatedBy, LastChangedBy etc. ?

muthuhana37
Explorer
0 Likes

just fields like CreatedBy, LastChangedBy etc.

JessieCheah
Product and Topic Expert
Product and Topic Expert

You can use the following annotations in your base view, the framework will then fill up the admin fields automatically.

@Semantics.user.createdBy: true

@Semantics.user.lastChangedBy : true

@Semantics.user.localInstanceLastChangedBy: true

@Semantics.systemDateTime.createdAt: true

@Semantics.systemDateTime.lastChangedAt: true

@Semantics.systemDateTime.LocalInstanceLastChangedAt: true

See example https://github.com/SAP-samples/abap-platform-fiori-feature-showcase/blob/ABAP-platform-cloud/src/%23...