Skip to Content
Author's profile photo John Paul

C4C Utilities Custom OData To Fetch Premise Info and Related Tickets

Any coding or configuration examples provided in this document are only examples and are NOT intended for use in a productive system. The example is only done to better explain and visualize the topic.

The Objective this blog is to explain how C4C Utilities Premise Object can be exposed through Custom OData. Blog will also explain how someone can expose Premise Address Info and Premise related Tickets.

Below is the detailed scope of this Blog: –

  • Create a Custom OData.
  • Create an entity called PremiseInfo with Premise related data.
  • Create another entity called TicketInfo with Ticket basic info.

Implementation Details: –

  1. Navigate to Administrator->OData Service Explorer
  2. Create a new Custom OData Service.
  3. Select the Premise BO to create base entity.
  4. Select the correct Premise Info.
  5. Create & Select Ticket entity.
  6. Activate Custom OData.

Exact steps and details of creating Custom OData through C4C is explained Admin  Guide focus will be more about how to expose Premise Data.

https://help.sap.com/viewer/1364b70b9cbb417ea5e2d80e966d4f49/1808/en-US/8e4220fa6dc943ef891fb3d0e91515d3.html

1. Navigate to OData Service Explorer

Navigate to Administrator->OData Service Explorer

Select the option to create a Custom OData Services

2. Create a new Custom OData Service

3. Select the Premise BO to create base entity

4. Select the correct Premise Info

4.1 Premise Address Info -:-

Premise Address info is split between associated Installation Point association and it’s hierarchical Upper installation Point ( Installation Point Created for Connection Object during replication). Below table explains the split of information.

5. Create & Select Ticket entity

Use the association from premise to Service Request called Ticket, to create an entity called TicketInfo.

Select the required information from Service Request (Ticket) needed as part of Custom OData. In this example i have selected ID and Name.

6. Activate Custom OData

When you Save the custom OData it will be “Inactive” state. We have to Activate it for it to be used.

Once Activated there will be dedicated URL created for the new OData service.

Premise end point to fetch record with Premise External ID = ‘12345’

https://<Tenant_URL>/sap/c4c/odata/cust/v1/premisedata/PremiseInfoCollection?$filter=ExternalID%20eq%20%2712345%27

To fetch the Ticket for the above related to the above Premise

https://<Tenant_URL>/sap/c4c/odata/cust/v1/premisedata/PremiseInfoCollection(‘<Unique ID’) /TicketInfo

 

Assigned tags

      4 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Hi John,

      We have tried to recreate your blog example to get our hands on OData, but when we are selecting the UtilitiesPremise Root node, we are unable to see the Ticket Associated Entity as seen in your blogs screenshots.

      Attaching screen for reference.

       

      Please let me know if I am missing something.

      Regards,
      Akash

      Author's profile photo John Paul
      John Paul
      Blog Post Author

      Hi Akash,

      Can you send an email (john.paul@sap.com) with details so that i can have a look, ideally at Root level you should have found an association called Ticket.

      Regards,

      John

      Author's profile photo John Paul
      John Paul
      Blog Post Author

      Hi Akash,

      The Association to Ticket can't be used for "Data Workbench Enabled" OData, above blog is meant for creating OData web service which will be used externally not intended for "Data Workbench".

      I hope this information helps.

      Thanks & Regards,

      John

      Author's profile photo Akanksha Gupta
      Akanksha Gupta

      Hi John,

      Following your blog , I also tried to create a custom service which is not DWB enabled, still I cannot find the association to Ticket entity.

      I can only see an association available - ToInstallPoint.

      Please check and revert.

      Thanks,

      Akanksha.