This section describes how you use callable entities as OData developer.
Create an instance of the factory class:
DATA: lr type ref to /UI2/CL_NAVIGATION_FACTORY
create object lr.
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:
lr->GET_TARGET_HTML( Importing
IV_ID = 'ID of NAV TARGET XYZ'
IT_BUSINESS_PARAMS = 'Possible Business Parameter' ... )
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).