To navigate from OVP (Overview Page) to LRP (List Report Page) using CDS annotations in SAP, you can follow these steps:
Define the OVP annotation in your CDS view: Begin by defining the OVP annotation for your CDS view. This annotation specifies that the CDS view serves as the data source for the OVP. Here's an example of how the OVP annotation looks:
In the above example, /myOVP is the path that will be used to access the OVP, and 'LRP' is the navigation target for the List Report Page.
Define the LRP annotation in your CDS view: Next, define the LRP annotation for your CDS view. This annotation specifies the configuration details for the List Report Page, such as filters, sorting, and search fields. Here's an example of how the LRP annotation looks:
In the above example, 'to_LRP' is the navigation target defined in the OVP annotation. The targetControlID specifies the ID of the control that represents the link to the LRP in the OVP.
Implement the List Report Page (LRP): Implement the List Report Page using Fiori Elements or UI5 development. The LRP should be designed to consume the data provided by the CDS view and display it in a list format.
Link the OVP to the LRP: In the OVP, you need to create a link or navigation target that triggers the navigation to the LRP. This can be achieved using UI annotations or by configuring the OVP application. For example, you can add a link or button in the OVP that triggers navigation to the List Report Page when clicked.
By following these steps and defining the appropriate CDS annotations, you can navigate from the OVP to the LRP within your SAP application. Remember to adapt the annotations and code examples to fit your specific CDS view and application requirements.