Using Callable Entities as OData Developer
This section describes how you use callable entities as OData developer.
Using the Factory Class
- Data for the semantic objects, the navigation provider, and the BAdI implementation of the assigned repositories (navigation provider) has been maintained.
- The class can be used especially in your OData services.
Create an instance of the factory class:
-
Retrieving the target link list (ID, description) of a semantic object
Use the following code to obtain all navigation links of your semantic object 'PRODUCTS':
-
Obtaining the bootstrap-HTML for an entry of the target link list
Use the following code to obtain the navigation target HTML for the navigation on the UI:
Creating an OData Service for the Navigation Provider
An OData service is required to enable the navigation based on callable entities. You can use the SAP Gateway Service Builder to model and generate your OData service.
Using SAP Gateway to Create an OData Service
Start Gateway Service Builder (transaction SEGW). As an example you can refer to system U00 (client 010), the service /UI2/ESPM_NAV with the description UI2 Demo on UI Navigation via Callable Entities. In the generation process of the Gateway Service Builder, several classes are generated in the package /UI2/SERVICES_ESPM_NAV (see transaction /nse80).
Then you need to code special methods for the data access, here class /UI2/CL_ESPM_NAV_DPC_EXT (Data Provider Secondary Class).