I read about the Gateway's Simple Field Extensibility and set up a small example with:
- a database view on an existing table
- a new OData Service based on the view with a single Entity Type and its Collection Type - i.e. the entity type is linked to the view structure
- I implemented the get_entityset method in the data provider extension class with a simple SELECT * statement
- when I execute a query on the Collection I get back the view data, as expected
So far, so good. Then I created an append structure for the underlying transparent table with a single field and a view append for the view I use as data source. When I then execute a query on the Collection I get back exactly the same view data as before, i.e. without the appended field.
The SAP help documentation (like above) tells us that:
At runtime SAP NetWeaver Gateway classes (model provider class and data provider class) consider the fields in the extension includes in ABAP Dictionary structures. That means that entity sets that are technically based on ABAP Dictionary structures for which SAP provides the option to extend them via append structures will automatically show new properties if the underlying ABAP Dictionary structure has been enhanced by the customer. This process is called Simple Field Extensibility (SFE). Properties that have been created by using SFE contain the annotation sap:is-extension-field="true".
I supposed that this works with append views as well, and am a bit astonished that it doesn't seem to work with my example.
Does anyone have some experience with using the Simple Field Extensibility feature?