2024 Mar 15 5:42 PM - edited 2024 Mar 15 5:44 PM
Hi experts!
when changing a line item value (e.g. item1-quantity) of a Business Object, I need to calculate another value for all line items (e.g.e Item1-price and Item2-price) and update all line items.
ID | Quantity | Price |
Item1 | 2 PC | 11,90 € |
Item2 | 2 PC | 8,80 € |
the calculation works fine but the new value of item2-price won't be displayed.
I created a determination in the Item (Child) BDEF.
determination calculatePrice on modify { field Quantity; }
side effects
{ field Quantity affects field Price; }
and the Implementation looks like
...some calculation...
MODIFY ENTITIES OF zr_test IN LOCAL MODE
ENTITY Item
UPDATE FIELDS ( Price )
WITH VALUE #( FOR item IN items INDEX INTO i
( %tky = item-%tky
Price = item-Price ) ).
It seems that the side effect only works for the changed item1 but doesn't effect the values of other entities.
Does anyone know how to solve this issue?
Thanks and regards, Sebastian
Hi Sebastian,
You can use the following side effect to refresh only a specific column for all items:
side effects
{
field Quantity affects field _Header._Item.Price;
}
Best Regards,
Maryia
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
59 | |
11 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.