Closed gregorwolf closed 1 year ago
Hi Gregor,
you are correct, there is no mention of field controls in the documentation. This will be corrected in the next release.
With regards to field controls, there are 2 types, static and dynamic. There are actually examples of static field control, namely readonly and mandatory. If you look through the $metadata of the service, you will find the following:
<Annotations Target="SAP__self.RootType/Email">
<Annotation Term="SAP__common.FieldControl" EnumMember="SAP__common.FieldControlType/Mandatory"/>
</Annotations>
Defined in the Behaviour Definition with
field ( mandatory ) Email;
<Annotations Target="SAP__self.ChildType/StringProperty">
<Annotation Term="SAP__core.Immutable"/>
</Annotations>
Defined in the Behaviour Definition with
field ( mandatory : create, readonly : update ) StringProperty;
In the next release, there will be examples of dynamic field control.
Regards, Jessie
Here the link to the updated Guide on Feature Control https://github.com/SAP-samples/abap-platform-fiori-feature-showcase/wiki/Feature-Showcase-App-Guide#feature-control
Hello ABAP Fiori Feature Showcase Team,
thank you for closing the gap to CAP and providing also an ABAP Fiori Feature Showcase. I've searched in the documentation and the source but was not able to find an example that shows how to achieve sap:field-control (OData V2) or @Common.FieldControl. Can such an example please be added?
Best Regards Gregor