Overview
- Here we see the process to activate and register custom Odata Service in SAP-Fiori (Front-End) server.
- Odata Service 'ZTEST_ODATA' is been created/defined in t-code 'SEGW' of SAP-Fiori, as can be seen in below screen:
- This blog is part of below parent blog:
Steps to Activate/Register OData Service:
[1] System Alias Maintainance
We can configure ‘
system alias‘ Alias using below details:
- T-Code SPRO
- Path ‘SAP Reference IMG’ -> SAP Customizing Implementation Guide -> SAP NetWeaver -> SAP Gateway -> OData Channel -> Configuration -> Connection Settings -> SAP Gateway to SAP System -> Manage SAP System Aliases
In SAP-Fiori (Front-End) System, we need to configure two ‘
system alias‘ Alias:
- System Alias for SAP-Fiori (Front-End) System: 'Local'
- Local System alias is required to refer objects of same system
- Below settings needs to be configured in 'Manage SAP System Aliases' window

- Here check boxes 'Local GW' & 'For Local App' should be checked.
- System Alias for SAP-ECC (Back-End) System
- This system alias is required to refer objects of for SAP-ECC (Back-End) System
- Below settings needs to be configured in 'Manage SAP System Aliases' window

- Enter RFC-Destination and check boxes 'Local GW' & 'For Local App' should be un-checked.
- RFC-Destination should have enabled 'Current-User' logon settings

[2] Activate ICF node of OData Service
- In SAP-Fiori (fron-end server) use following details:
- T-Code 'SICF'
- Path '/default_host/sap/opu/odata/sap/'
- service ZTEST_ODATA
- steps right click -> select 'Activate'
- This ICF node can be activated during service registration also.
[3] Register OData Service
- To register Odata service for accessibility in UI5 application, In SAP-Fiori (fron-end server) use following details:
- T-Code '/n/iwfnd/maint_service'
- Opened windows shows list of registered services
- Click on button 'Add Service' to proceed with new service registrations

- In next window, to get un-registered service list of same fiori system,
- select System Alias 'Local' -> click on button 'Get Services'

- From the unregistered service list, select desired service
- and click on button 'Add Selected Service'

- In appear pop-up click select input detaisl as shown in below scree and here enter your desired package, for example purpose $TMP

- Click ok in next pop-up

- Once service gets registered, we can view it in t-code '/n/iwfnd/maint_service' within registered list

- For testing the service, either select service as in above screen and click on button 'SAP Gatway Client' or go to t-code '/n/iwfnd/gw_client'
- Please note:
- Post registration of Odata Service, its name gets a postFix like "_SRV", for e.g. in our case, Odata-Service gets registered with name 'ZTEST_ODATA_SRV'
- And service definition name is 'ZTEST_ODATA'
[4] Test OData Service
- For testing registerd OdataService, in SAP-Fiori (fron-end server) use following details:
- T-Code '/n/iwfnd/gw_client'
- Enter Service url patterns like:
- To check Service registration Status, try service url as below
- /sap/opu/odata/sap/ZTEST_ODATA_SRV/?$format=xml

- To get complete metadata structure of OData Service, try service url as below
- /sap/opu/odata/sap/ZTEST_ODATA_SRV/$metadata

- Status Code '200' and reason 'OK' with green color response layout represents everything is ok.
[5] Error Log Monitoring
- To view error logs OdataService in SAP-Fiori (fron-end server), go to T-Code '/n/iwfnd/error_log'
- Here we can identify root cause and possible action also been suggested in case of standard error