Symptom
You created Custom Action in Function Import. While testing this Custom Odata Service you cannot find Odata Function Import.
"Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental."
Environment
SAP Cloud for Customer
Reproducing the Issue
- Go to Administrator workcenter.
- Open the Odata Service Explorer.
- Open the Custom Odata Service.
- Here check required Odata Service and check the function import tab.
- Select Test option.
You will not find the Custom Action to test the Odata Service.
Cause
Function Imports for particular OData Service are not visible in OData Console UI.
Resolution
To use Function Imports, use the following solutions:
- From the metadata, take the Function Import name, and HttpMethod.
- The URL with parameters in console should be:
- Syntax : https://www.example.com/sap/c4c/odata/v1/c4codata/<FunctionImportName>?<Parameter>=’<value>’
- Example : https://www.example.com/sap/c4c/odata/v1/c4codata/AccountFindByCommunicationData?Phone=’XXXXXXXXXX’ (where XXXXXXXX is Phone Number)
- However, if it's a GET reuqest, please use the syntax https://www.example.com/sap/c4c/odata/v1/c4codata/<FunctionImportName>
- Set the Request Header value should be same as HttpMethod from the metadata, in this case it is GET.
- For example, for the Function Imports below, the link to retrieve data is https://myxxxxxx.crm.ondemand.com/sap/c4c/odata/cust/v1/service_test/TEST (where xxxxxx represents the number)
Keywords
Odata Function Import , KBA , LOD-CRM-INT-API , OData API (C4C Only) , How To
Product
SAP Cloud for Customer core applications all versions