
The optimized SADL $expand is not provided out of the box by the generated DPC. The SADL $expand must be triggered by the application in the DPC_EXT class.
If you use the optimized SADL $expand, you have to be aware that the following methods of the DPC_EXT class are not called whenever an OData request contains the $expand clause:
If you do not redefine any of the methods listed above in your the DCP_EXT class, you can use the optimized SADL $expand as described in the Redefining the Expand Methods of the Extension DPC chapter.
If you do redefine any of the methods listed above, you can use the optimized SADL $expand only provided you are able to implement the same logic in the /iwbep/if_mgw_appl_srv_runtime~get_expanded_entity and /iwbep/if_mgw_appl_srv_runtime~get_expanded_entityset methods. The following DPC_EXT methods are called if the optimized SADL $expand is used:
If you cannot implement the logic from the getter methods in the get_expanded_entityand get_expanded_entityset, the optimized SADL $expand cannot be used.