cancel
Showing results for 
Search instead for 
Did you mean: 

Fiori elements object page - Determinations

mhappe
Participant
0 Kudos

Hi All, jocelyn.dart

Currently I'm developing a new fiori elements application based on the S4/HANA programming model. I'm facing an issue with BOPF determinations. In the backend I configured and code some determinations. Based on certain changes the value of another field is adjusted (and saved in the draft table). After the determination has been executed the UI doesn't react on this determation. Only after creating a new entity using the + button the changed data is available in the new entity UI, but after a field update the UI is not reacting on this.

Only after refreshing the changed field value is being updated.

Is this a missing feature in the current version of Fiori elements or is there a solution to achieve the UI to be updated after executing a determination in the S/4 HANA backend?

Thnks!

Mattijs

Accepted Solutions (1)

Accepted Solutions (1)

Jocelyn_Dart
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Mattjs

Sorry it's taken a while...

Ok so what you want to do is use an a custom action breakout. You can then add a refresh function after your BOPF call.

It would be great if you could write a short blog on this once you have it working!

Good luck!

Jocelyn

Answers (1)

Answers (1)

mhappe
Participant

Hi Jocelyn,

Thanks! No problem.

I'm not performing a BOPF call, but just changing a field value in the UI for example a validfrom date in a table of node X. After changing the field the draft is being saved in the backend. During this save a BOPF determination in the backend is called (automatically by the BOPF framework), in this determaintion based on the changed validfrom date the validto date of another node is adjusted and some other data is being changed. These adjustments are updated correctly in the draft table.

But when returning to my UI, tge UI still contains the old values for the fields which were changed in the determination.

For now I found a solution by setting the RefreshAfterChange property of my model in the fiori elements application to true:

this.getOwnerComponent().getModel().setRefreshAfterChange(true);

But now only the entity will be refreshed which is being changed. In case an update will lead to cross entity changes in the BOPF determination these entities will not be updated. Seet attached image for an example. Is there a solution to referesh all the entities?

Should this be default functionality of a fiori elements application based on the S4 programming model?

Grtz
Mattijs

Jocelyn_Dart
Product and Topic Expert
Product and Topic Expert

Hi Matt,

Ok there are a couple of techniques here.

If you have OData v4, we'd suggest trying the SideEffects annotation first.

https://wiki.scn.sap.com/wiki/display/EmTech/OData+4.0+Vocabularies+-+SAP+Common#SideEffectsType

If you only have OData v2 you can fudge it by using a dummy FieldGroup to expand the related OData Services... a bit of a hack but it works.

Rgds,

Jocelyn

mhappe
Participant

Thnx Jocelyn.

I'll give it a try next week and get back to you 🙂

Grtz Mattijs

mhappe
Participant
0 Kudos

Hi Jocelyn,

The Odata side effects seems to be the way to go.

We're using a S/4HANA 1610 release with an ABAP 7.51 SP02 stack and a FIORI frontend with UI version 1.44.25.

Unfortunately the odata side effects doesn't have any effect at all, or maybe my annotation are not correctly used.

I added below annotations to my annotation file to achieve the total amount will be updated after an amount is entered in one or more table rows:

Annotations added to the entity type of my table:

After updating an amount in the table, the total amount is calculated in my backend using a determination in my BOPF object, but the UI is not refreshed afterwards, when tracking the odata calls no odata call with an expand to the parent entry is visible.

Any idea what is missing? Does the S/4 HANA 1610 release not support side effects?
I'm pretty sure we are using Odata 4.0

Thanks in advance!!

Regards Mattijs.

Jocelyn_Dart
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Mattijs,

While S/4HANA 1610 does have some support for OData v4 it is not complete in that version.

Unfortunately it looks like Side Effects are supported in 7.52 = S/4HANA 1709

You can find more on it here:

https://help.sap.com/viewer/468a97775123488ab3345a0c48cadd8f/7.52.0/en-US/18b17bdd49d1436fa9172cbb01...

Rgds,

Jocelyn