With UI.SelectionFields
in the local annotation file, you now need to edit it so that new filter of Product Name shows up in your SAP Fiori elements application. To do so, you will use the XML Annotation Language Server, which provides features that assist with defining annotations in the code editor.
The features used in this tutorial include:
- Code Completion, which provides a list of suggestions based on the project metadata and OData vocabularies;
- Micro-Snippets, which are generic snippets that add bigger blocks of code patterns, such as Annotations and Annotation and Record.
These features help you to quickly and consistently generate code for your projects.
-
To start, ensure that local annotation file annotation.xml
is open. If its closed, navigate to myfioriapp(or your project name)->webapp->annotations->annotation.xml
in the project explorer.
-
For the SAP.SEPMRA_C_PD_ProductType
annotation term UI.SelectionFields
, place your cursor after the line below and press Enter.
-
In your new line, trigger the code completion by pressing CMD/Ctrl + Space, which displays a list of suggested values.
Select <PropertyPath>
and accept it by pressing Enter or clicking with your mouse. Your cursor will be between the tags <PropertyPath>
and </PropertyPath>
.
Press CMD/Ctrl + Space again to see the next list of options (the properties of target SEPMRA_C_PD_ProductType
). Your desired value is Name
.
Use the up/down arrows on your keyboard or your mouse to navigate to it in the list and then press Enter or select it with your mouse.
-
Save your annotation.xml
file and then check your running application. The new Product Name filter should now be in your app.
At this point, you should have a List Report Object Page with Export to Excel and multi-select functionality, in addition to the ability to filter by product name.
Good job! In the next tutorial, you will configure the object pages that users can access from this list.