This is the interface for functions for OData version 4 (V4). This interface provides methods to maintain a function during the creation of a service model in a model provider class.
Functions and also actions are so called operations. Functions are operations that do not have side effects and may support further composition, for example, with additional filter operations. Functions always have to return data.
This interface includes interface /iwbep/if_v4_med_element.
Visibility and Level |
Alias |
Component |
---|---|---|
public |
get_edm_name | //IWBEP/IF_V4_MED_ELEMENT~GET_EDM_NAME |
public |
get_internal_name |
/IWBEP/IF_V4_MED_ELEMENT~GET_INTERNAL_NAME |
This method creates the function import for a function.
Function imports enable unbound actions to be called from the service root.
IMPORTING iv_function_import_name TYPE /iwbep/if_v4_med_element=>ty_e_med_internal_name RETURNING VALUE(ro_function_import) TYPE REF TO /iwbep/if_v4_med_func_imp RAISING /iwbep/cx_v4_med .
Parameter |
Description |
---|---|
iv_function_import_name |
Internal function import name. |
ro_function_import |
Function import. |
Exceptions
The metadata exception is iwbep/cx_v4_med.
This method creates a return for a function.
Functions always have to return data which represents the result of the function. Use this method to create a return type for the function, for example a primitive type or an entity type.
RETURNING VALUE(ro_return) TYPE REF TO /iwbep/if_v4_med_func_return RAISING /iwbep/cx_v4_med .
Parameter |
Description |
---|---|
ro_return |
Function name. |
Exceptions
The metadata exception is iwbep/cx_v4_med.
This method gets a parameter of a function.
After retrieving the parameter, the characteristics of the parameter can be enhanced or changed.
IMPORTING iv_parameter_name TYPE /iwbep/if_v4_med_element=>ty_e_med_internal_name RETURNING VALUE(ro_parameter) TYPE REF TO /iwbep/if_v4_med_func_param RAISING /iwbep/cx_v4_med .
Parameter |
Description |
---|---|
iv_parameter_name |
Internal parameter name. |
ro_parameter |
Function parameter. |
Exceptions
The metadata exception is iwbep/cx_v4_med.
This method gets all parameters of a function.
After retrieving the parameters, the characteristics of the parameters can be enhanced or changed.
EXPORTING et_parameter TYPE /iwbep/if_v4_med_element=>ty_t_function_parameter RAISING /iwbep/cx_v4_med .
Parameter |
Description |
---|---|
et_parameter |
Function parameter. |
Exceptions
The metadata exception is iwbep/cx_v4_med.
This method gets the return of an function.
After retrieving the return, the characteristics of the return can be enhanced or changed.
RETURNING VALUE(ro_return) TYPE REF TO /iwbep/if_v4_med_func_return RAISING /iwbep/cx_v4_med .
Parameter |
Description |
---|---|
ro_return |
Function return. |
Exceptions
The metadata exception is iwbep/cx_v4_med.
This method sets the EDM name of a function.
The EDM name must be unique within the model.
IMPORTING iv_edm_name TYPE /iwbep/if_v4_med_element=>ty_e_med_edm_name RAISING /iwbep/cx_v4_med .
Parameter |
Description |
---|---|
iv_edm_name |
EDM name. |
Exceptions
The metadata exception is iwbep/cx_v4_med.