Skip to Content
Author's profile photo Simon Xu

Extending the Interface of an OData Entity Using Custom Fields

The OData service model delivered in SAP Multichannel Foundation for Utilities is built via the Gateway Service Builder (SEGW) tool. Depending on the business needs, the Gateway service model can be extended on different levels:

  1. OData entity structure extension (adding append structure with custom fields)
  2. Addition of new OData entities
  3. OData entity logic extension (for example, adding additional validations)

In this blog, we will illustrate how to add a custom field to an existing entity. Extension on other levels ( new OData entities, etc.) will be covered in another blog post.

The common situation a customer faces is that the field a customer requires is not in our standard structure of an OData entity.


  Customer requirement:  The OData entity should include Nationality information.

  1. Start SEGW in the SAP CRM system and create a new service model project ZCRM_UTILITIES_UMC.
  2. Right click on Data Model, select Redefine OData service (GW)./wp-content/uploads/2014/07/p1_509775.png
  3. Select CRM_UTILITIES_UMC as a service to be redefined.
  4. Select all entities to be included in the new service./wp-content/uploads/2014/07/p2_509776.png/wp-content/uploads/2014/07/p3_509777.png
  5. Please check the API structure and make sure if it exists in the backend interface./wp-content/uploads/2014/07/p4_509778.png
  6. In SE80, add append structure to CRMS_IU_UMC_ACCOUNT.
  7. Add field Nationality.
  8. Since we always do move-corresponding in our implementation behind each entity, newly added field should become visible in the entity after adding to the service model.  

/wp-content/uploads/2014/07/p5_509786.png    /wp-content/uploads/2014/07/p6_509787.png

9.Back to SEGW, add a new attribute to the Account entity structure./wp-content/uploads/2014/07/p7_509788.png

10.Choose Generate model.

11.The newly added field should become visible in the service metadata.


Assigned Tags

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

      Hi Simon,

      Thanks for the info.


      Author's profile photo Former Member
      Former Member


      my requirment is to add field in Invoice.

      Why you are coping the standard project?

      In my requirment need to add field in Invoice.



      Author's profile photo Simon Xu
      Simon Xu
      Blog Post Author


      Standard project is delivered by sap and can be modified by SAP only.



      Author's profile photo Pavan Golesar
      Pavan Golesar

      Great Blog.

      Got Clarity. 🙂

      Thanks Simon,

      Pavan G

      Author's profile photo Gaurav Kashinath Pednekar
      Gaurav Kashinath Pednekar

      hi ,

      the field I am extending do not have ABAP structure at the backend ? How to extend such scenario?