SAP Knowledge Base Article - Public

2510650 - How to use Odata Function Import

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

  1. Go to Administrator workcenter.
  2. Open the Odata Service Explorer.
  3. Open the Custom Odata Service.
  4. Here check required Odata Service and check the function import tab.
  5. 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:

  1. From the metadata, take the Function Import name, and HttpMethod.

    Action_FunctionImport.PNG
  2. The URL with parameters in console should be:

  3. Set the Request Header value should be same as HttpMethod from the metadata, in this case it is GET.
  4. 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