An ABAP SMI API instance represents the “entry point” to ABAP SMI in your code. To get an API instance (a reference to interface IF_ODL_API), use the static method s_create in class CL_ODL_API. You can supply optional method parameters for the following:
For these parameter values, there must be corresponding entries in Customizing for ABAP SMI to establish connectivity between ABAP SMI and the collaboration platform. For more information, see Connecting to SAP Jam with ABAP SMI.
If you do not supply these parameters to the s_create method, it uses the default Customizing entries delivered with ABAP SMI:
The following code snippet creates an API instance for the default Customizing entries.
DATA lo_api TYPE REF TO if_odl_api. lo_api = cl_odl_api=>s_create( ).
This is equivalent to the following code:
DATA lo_api TYPE REF TO if_odl_api. lo_api = cl_odl_api=>s_create( iv_application_id = 'DEFAULT' iv_platformtype = 'Jam' iv_service = 'DEFAULT' ).
Once an API instance is available in your code, you can use that instance to build OData requests.