Skip to Content
0
Jan 26, 2023 at 01:59 PM

Feature Instance Control cannot access actual object data

145 Views Last edit Jan 26, 2023 at 03:26 PM 4 rev

I have activated feature instance function in my behaviour definition as this let me dynamically set the fields to read only in UI. Here is the part of my behaviour definition

update (features: instance);<br>delete (features: instance);<br>field (features: instance) deviceLocation, deviceNumber, orderCode;

Also I hav a determination on the field orderCode

determination setKonfigFlg on modify { field orderCode; }

In the implementation class I have added the following code

METHOD get_instance_features.<br>    READ ENTITIES OF zi_dm_csorder_root IN LOCAL MODE<br>    ENTITY csorder<br>    FIELDS ( status deviceLocation deviceNumber bzgsobjtyp orderCode<br>     ) WITH CORRESPONDING #( keys )<br>    RESULT DATA(csorders)<br>    FAILED failed.<br>    LOOP AT csorders ASSIGNING FIELD-SYMBOL(<fs_order>).<br>      DATA(lv) = <fs_order>-orderCode.<br>    ENDLOOP.

and set the breackpoint into the LOOP to see in debugger, which data will be returned during execution and set the second breackpoint to determination.

When I create a new record the feature instance method will be called twice and return empty orderCode.

empty.png

This is okey as this is a new empty record.

When I enter something into orderCode in UI using valueHelp

za01.png

the feature instance method will be triggered again, but orderCode remains empty.

empty-deb.png

Determination is called directly after feature instance method and the changed object data seems to be readable there

za01-deb.png

When I change the value again in UI to ZA02

za02-ui.png

the feature instance finds still the previous value in object data.

za01-deb-after.png

it looks like feature instance method is called always before the object is actualized with new data from UI.

Is it a bug?

Attachments

empty.png (42.3 kB)
za01.png (5.0 kB)
za01-deb-after.png (45.6 kB)
za01-deb.png (1.7 kB)
empty-deb.png (11.4 kB)
za02-ui.png (3.4 kB)